@flamingo-stack/openframe-frontend-core 0.0.269 → 0.0.270
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/{chunk-TOQH27ZP.js → chunk-37OJ53QH.js} +2 -2
- package/dist/{chunk-FEIRH7ER.cjs → chunk-3H5TSZMU.cjs} +25 -25
- package/dist/{chunk-FEIRH7ER.cjs.map → chunk-3H5TSZMU.cjs.map} +1 -1
- package/dist/{chunk-HQGGXT2T.js → chunk-EMRSIP4Q.js} +2 -2
- package/dist/{chunk-NM7J44WP.cjs → chunk-JIJEVSCC.cjs} +30 -30
- package/dist/{chunk-NM7J44WP.cjs.map → chunk-JIJEVSCC.cjs.map} +1 -1
- package/dist/{chunk-QDA2XVFP.cjs → chunk-N3OPJQYI.cjs} +54 -22
- package/dist/chunk-N3OPJQYI.cjs.map +1 -0
- package/dist/{chunk-TZEHP5IW.cjs → chunk-NDSCF6LB.cjs} +11 -11
- package/dist/{chunk-TZEHP5IW.cjs.map → chunk-NDSCF6LB.cjs.map} +1 -1
- package/dist/{chunk-ALCUDWKJ.js → chunk-RM7ZT3UU.js} +162 -130
- package/dist/{chunk-ALCUDWKJ.js.map → chunk-RM7ZT3UU.js.map} +1 -1
- package/dist/{chunk-DATYABIL.js → chunk-XOKXFW77.js} +2 -2
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/features/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/features/video-source-selector.d.ts +11 -1
- package/dist/components/features/video-source-selector.d.ts.map +1 -1
- package/dist/components/index.cjs +47 -47
- package/dist/components/index.js +3 -3
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +53 -53
- package/dist/components/tickets/index.js +3 -3
- package/dist/components/ui/index.cjs +2 -2
- package/dist/components/ui/index.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/features/video-source-selector.tsx +83 -18
- package/dist/chunk-QDA2XVFP.cjs.map +0 -1
- /package/dist/{chunk-TOQH27ZP.js.map → chunk-37OJ53QH.js.map} +0 -0
- /package/dist/{chunk-HQGGXT2T.js.map → chunk-EMRSIP4Q.js.map} +0 -0
- /package/dist/{chunk-DATYABIL.js.map → chunk-XOKXFW77.js.map} +0 -0
|
@@ -7133,7 +7133,7 @@ function RoadmapVoteButton({
|
|
|
7133
7133
|
init_button();
|
|
7134
7134
|
|
|
7135
7135
|
// src/components/ui/image-gallery-modal.tsx
|
|
7136
|
-
import { useState as useState75, useEffect as
|
|
7136
|
+
import { useState as useState75, useEffect as useEffect55 } from "react";
|
|
7137
7137
|
|
|
7138
7138
|
// src/components/ui/allowed-domains-input.tsx
|
|
7139
7139
|
init_cn();
|
|
@@ -18507,8 +18507,8 @@ function TagsSelector({
|
|
|
18507
18507
|
|
|
18508
18508
|
// src/components/features/video-source-selector.tsx
|
|
18509
18509
|
init_button2();
|
|
18510
|
-
import { useState as useState47, useCallback as useCallback14 } from "react";
|
|
18511
|
-
import { Upload as Upload4, Sparkles as Sparkles3, X as X8, Video as Video5 } from "lucide-react";
|
|
18510
|
+
import { useState as useState47, useCallback as useCallback14, useEffect as useEffect31 } from "react";
|
|
18511
|
+
import { Upload as Upload4, Sparkles as Sparkles3, X as X8, Video as Video5, Loader2 as Loader27 } from "lucide-react";
|
|
18512
18512
|
import { jsx as jsx158, jsxs as jsxs123 } from "react/jsx-runtime";
|
|
18513
18513
|
function VideoSourceSelector({
|
|
18514
18514
|
videoSourceType,
|
|
@@ -18527,6 +18527,7 @@ function VideoSourceSelector({
|
|
|
18527
18527
|
uploadEmptyText = 'No video uploaded yet. Click "Upload Video" to add one.',
|
|
18528
18528
|
disabled = false,
|
|
18529
18529
|
VideoPreviewComponent,
|
|
18530
|
+
resolveVideoUrl,
|
|
18530
18531
|
UploadProgressComponent,
|
|
18531
18532
|
title = "Video",
|
|
18532
18533
|
showTitle = true,
|
|
@@ -18668,31 +18669,62 @@ function VideoSourceSelector({
|
|
|
18668
18669
|
isAIGenerated
|
|
18669
18670
|
}
|
|
18670
18671
|
) : (
|
|
18671
|
-
// Default simple preview
|
|
18672
|
-
/* @__PURE__ */
|
|
18673
|
-
|
|
18674
|
-
|
|
18675
|
-
|
|
18676
|
-
|
|
18677
|
-
|
|
18678
|
-
|
|
18679
|
-
|
|
18680
|
-
|
|
18681
|
-
/* @__PURE__ */ jsx158(
|
|
18682
|
-
"button",
|
|
18683
|
-
{
|
|
18684
|
-
type: "button",
|
|
18685
|
-
onClick: handleDeleteVideo,
|
|
18686
|
-
className: "absolute top-2 right-2 p-1.5 bg-black/60 hover:bg-black/80 rounded-full transition-colors",
|
|
18687
|
-
disabled,
|
|
18688
|
-
children: /* @__PURE__ */ jsx158(X8, { className: "h-4 w-4 text-white" })
|
|
18689
|
-
}
|
|
18690
|
-
)
|
|
18691
|
-
] })
|
|
18672
|
+
// Default simple preview (resolver-aware — see DefaultVideoPreview)
|
|
18673
|
+
/* @__PURE__ */ jsx158(
|
|
18674
|
+
DefaultVideoPreview,
|
|
18675
|
+
{
|
|
18676
|
+
videoUrl: mainVideoUrl,
|
|
18677
|
+
resolveVideoUrl,
|
|
18678
|
+
onDelete: handleDeleteVideo,
|
|
18679
|
+
disabled
|
|
18680
|
+
}
|
|
18681
|
+
)
|
|
18692
18682
|
) : /* @__PURE__ */ jsx158("p", { className: "text-sm text-ods-text-secondary italic", children: uploadEmptyText })
|
|
18693
18683
|
] })
|
|
18694
18684
|
] });
|
|
18695
18685
|
}
|
|
18686
|
+
function DefaultVideoPreview({ videoUrl, resolveVideoUrl, onDelete, disabled }) {
|
|
18687
|
+
const [resolvedUrl, setResolvedUrl] = useState47(
|
|
18688
|
+
resolveVideoUrl ? void 0 : videoUrl
|
|
18689
|
+
);
|
|
18690
|
+
useEffect31(() => {
|
|
18691
|
+
if (!resolveVideoUrl) {
|
|
18692
|
+
setResolvedUrl(videoUrl);
|
|
18693
|
+
return;
|
|
18694
|
+
}
|
|
18695
|
+
let active = true;
|
|
18696
|
+
setResolvedUrl(void 0);
|
|
18697
|
+
resolveVideoUrl(videoUrl).then((url) => {
|
|
18698
|
+
if (active) setResolvedUrl(url);
|
|
18699
|
+
}).catch(() => {
|
|
18700
|
+
if (active) setResolvedUrl(videoUrl);
|
|
18701
|
+
});
|
|
18702
|
+
return () => {
|
|
18703
|
+
active = false;
|
|
18704
|
+
};
|
|
18705
|
+
}, [videoUrl, resolveVideoUrl]);
|
|
18706
|
+
return /* @__PURE__ */ jsxs123("div", { className: "relative rounded-lg border border-ods-border overflow-hidden", children: [
|
|
18707
|
+
resolvedUrl === void 0 ? /* @__PURE__ */ jsx158("div", { className: "w-full h-[200px] flex items-center justify-center bg-black", children: /* @__PURE__ */ jsx158(Loader27, { className: "h-6 w-6 animate-spin text-ods-accent" }) }) : /* @__PURE__ */ jsx158(
|
|
18708
|
+
"video",
|
|
18709
|
+
{
|
|
18710
|
+
src: resolvedUrl,
|
|
18711
|
+
className: "w-full h-auto max-h-[300px] object-contain bg-black",
|
|
18712
|
+
controls: true
|
|
18713
|
+
}
|
|
18714
|
+
),
|
|
18715
|
+
/* @__PURE__ */ jsx158(
|
|
18716
|
+
"button",
|
|
18717
|
+
{
|
|
18718
|
+
type: "button",
|
|
18719
|
+
onClick: onDelete,
|
|
18720
|
+
"aria-label": "Delete video",
|
|
18721
|
+
className: "absolute top-2 right-2 p-1.5 bg-black/60 hover:bg-black/80 rounded-full transition-colors",
|
|
18722
|
+
disabled,
|
|
18723
|
+
children: /* @__PURE__ */ jsx158(X8, { className: "h-4 w-4 text-white" })
|
|
18724
|
+
}
|
|
18725
|
+
)
|
|
18726
|
+
] });
|
|
18727
|
+
}
|
|
18696
18728
|
|
|
18697
18729
|
// src/components/features/transcript-summary-editor.tsx
|
|
18698
18730
|
import { Sparkles as Sparkles4 } from "lucide-react";
|
|
@@ -18988,7 +19020,7 @@ var AIWarningsSection = ({
|
|
|
18988
19020
|
|
|
18989
19021
|
// src/components/features/ai-enrich/AIEnrichSection.tsx
|
|
18990
19022
|
init_button2();
|
|
18991
|
-
import { CheckCircle as CheckCircle2, AlertCircle as AlertCircle2, Loader2 as
|
|
19023
|
+
import { CheckCircle as CheckCircle2, AlertCircle as AlertCircle2, Loader2 as Loader28, X as X9 } from "lucide-react";
|
|
18992
19024
|
import { jsx as jsx163, jsxs as jsxs127 } from "react/jsx-runtime";
|
|
18993
19025
|
var AIEnrichSection = ({
|
|
18994
19026
|
onEnrich,
|
|
@@ -19100,7 +19132,7 @@ var AIEnrichSection = ({
|
|
|
19100
19132
|
size: "small-legacy",
|
|
19101
19133
|
onClick: onCancel,
|
|
19102
19134
|
disabled: isCancelling,
|
|
19103
|
-
leftIcon: isCancelling ? /* @__PURE__ */ jsx163(
|
|
19135
|
+
leftIcon: isCancelling ? /* @__PURE__ */ jsx163(Loader28, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx163(X9, { className: "h-4 w-4" }),
|
|
19104
19136
|
className: "!w-full",
|
|
19105
19137
|
children: isCancelling ? "Cancelling..." : "Cancel Processing"
|
|
19106
19138
|
}
|
|
@@ -19121,7 +19153,7 @@ var AIEnrichSection = ({
|
|
|
19121
19153
|
)) })
|
|
19122
19154
|
] }),
|
|
19123
19155
|
loading && statusMessage && /* @__PURE__ */ jsxs127("div", { className: "flex items-center gap-3 p-3 rounded-lg bg-ods-card-secondary", children: [
|
|
19124
|
-
/* @__PURE__ */ jsx163(
|
|
19156
|
+
/* @__PURE__ */ jsx163(Loader28, { className: "h-5 w-5 text-ods-accent animate-spin" }),
|
|
19125
19157
|
/* @__PURE__ */ jsx163("span", { className: "text-sm text-ods-text-primary font-['DM_Sans']", children: statusMessage })
|
|
19126
19158
|
] }),
|
|
19127
19159
|
hasResults && /* @__PURE__ */ jsxs127("div", { className: "space-y-4", children: [
|
|
@@ -20029,7 +20061,7 @@ function ViewToggle({
|
|
|
20029
20061
|
|
|
20030
20062
|
// src/components/features/policy-configuration-panel.tsx
|
|
20031
20063
|
init_cn();
|
|
20032
|
-
import { useRef as useRef25, useEffect as
|
|
20064
|
+
import { useRef as useRef25, useEffect as useEffect32, useState as useState49 } from "react";
|
|
20033
20065
|
import { ChevronDown as ChevronDown7 } from "lucide-react";
|
|
20034
20066
|
init_button2();
|
|
20035
20067
|
|
|
@@ -20212,7 +20244,7 @@ var PolicyRow = ({ policy, categoryId, editMode, onPermissionChange }) => {
|
|
|
20212
20244
|
var useAnimatedHeight = (isExpanded) => {
|
|
20213
20245
|
const [height, setHeight] = useState49(0);
|
|
20214
20246
|
const contentRef = useRef25(null);
|
|
20215
|
-
|
|
20247
|
+
useEffect32(() => {
|
|
20216
20248
|
if (contentRef.current) {
|
|
20217
20249
|
const contentHeight = contentRef.current.scrollHeight;
|
|
20218
20250
|
setHeight(isExpanded ? contentHeight : 0);
|
|
@@ -20369,7 +20401,7 @@ PolicyConfigurationPanel.displayName = "PolicyConfigurationPanel";
|
|
|
20369
20401
|
init_button2();
|
|
20370
20402
|
|
|
20371
20403
|
// src/components/ui/phone-input.tsx
|
|
20372
|
-
import { useCallback as useCallback15, useEffect as
|
|
20404
|
+
import { useCallback as useCallback15, useEffect as useEffect33, useMemo as useMemo12, useRef as useRef26, useState as useState50 } from "react";
|
|
20373
20405
|
import { jsx as jsx178, jsxs as jsxs139 } from "react/jsx-runtime";
|
|
20374
20406
|
function PhoneInput({
|
|
20375
20407
|
value,
|
|
@@ -20403,7 +20435,7 @@ function PhoneInput({
|
|
|
20403
20435
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
20404
20436
|
debounceRef.current = setTimeout(() => runValidation(phone), 300);
|
|
20405
20437
|
}, [runValidation]);
|
|
20406
|
-
|
|
20438
|
+
useEffect33(() => {
|
|
20407
20439
|
return () => {
|
|
20408
20440
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
20409
20441
|
};
|
|
@@ -20470,7 +20502,7 @@ function CountryOption({ country }) {
|
|
|
20470
20502
|
// src/components/features/waitlist-form.tsx
|
|
20471
20503
|
init_cn();
|
|
20472
20504
|
import { getCountries as getCountries2 } from "libphonenumber-js";
|
|
20473
|
-
import { useEffect as
|
|
20505
|
+
import { useEffect as useEffect34, useState as useState51 } from "react";
|
|
20474
20506
|
import { Fragment as Fragment22, jsx as jsx179, jsxs as jsxs140 } from "react/jsx-runtime";
|
|
20475
20507
|
function WaitlistForm({
|
|
20476
20508
|
id = "waitlist-form",
|
|
@@ -20500,12 +20532,12 @@ function WaitlistForm({
|
|
|
20500
20532
|
const [isPhoneInvalid, setIsPhoneInvalid] = useState51(false);
|
|
20501
20533
|
const [showConsentError, setShowConsentError] = useState51(false);
|
|
20502
20534
|
const isMailDomainGeneric = hasGenericEmailDomain(email);
|
|
20503
|
-
|
|
20535
|
+
useEffect34(() => {
|
|
20504
20536
|
if (defaultEmail) {
|
|
20505
20537
|
setEmail(defaultEmail);
|
|
20506
20538
|
}
|
|
20507
20539
|
}, [defaultEmail]);
|
|
20508
|
-
|
|
20540
|
+
useEffect34(() => {
|
|
20509
20541
|
setIsClient(true);
|
|
20510
20542
|
if (!geoApiUrl) return;
|
|
20511
20543
|
const supportedCountries = new Set(getCountries2());
|
|
@@ -20890,12 +20922,12 @@ function useOptionalNotifications() {
|
|
|
20890
20922
|
}
|
|
20891
20923
|
|
|
20892
20924
|
// src/components/features/notifications/notification-drawer.tsx
|
|
20893
|
-
import { useEffect as
|
|
20925
|
+
import { useEffect as useEffect37, useRef as useRef28 } from "react";
|
|
20894
20926
|
init_button();
|
|
20895
20927
|
init_cn();
|
|
20896
20928
|
|
|
20897
20929
|
// src/components/features/notifications/notification-tile.tsx
|
|
20898
|
-
import { useMemo as useMemo14, useEffect as
|
|
20930
|
+
import { useMemo as useMemo14, useEffect as useEffect36 } from "react";
|
|
20899
20931
|
init_button();
|
|
20900
20932
|
init_cn();
|
|
20901
20933
|
import { jsx as jsx181, jsxs as jsxs141 } from "react/jsx-runtime";
|
|
@@ -20912,7 +20944,7 @@ function NotificationTile({
|
|
|
20912
20944
|
const initialElapsed = useMemo14(() => Date.now() - createdAt, [createdAt]);
|
|
20913
20945
|
const isLive = !read && !settled && initialElapsed < liveDurationMs;
|
|
20914
20946
|
const counting = isLive && !paused;
|
|
20915
|
-
|
|
20947
|
+
useEffect36(() => {
|
|
20916
20948
|
if (!counting) return;
|
|
20917
20949
|
const remaining = Math.max(0, liveDurationMs - initialElapsed);
|
|
20918
20950
|
const timer = window.setTimeout(() => {
|
|
@@ -21102,7 +21134,7 @@ function DrawerScrollList({
|
|
|
21102
21134
|
const sentinelRef = useRef28(null);
|
|
21103
21135
|
const loadMoreRef = useRef28(loadMore);
|
|
21104
21136
|
loadMoreRef.current = loadMore;
|
|
21105
|
-
|
|
21137
|
+
useEffect37(() => {
|
|
21106
21138
|
if (!loadMore || !hasMore || isLoadingMore) return;
|
|
21107
21139
|
const sentinel = sentinelRef.current;
|
|
21108
21140
|
const root = scrollRef.current;
|
|
@@ -22430,7 +22462,7 @@ function SortableRow({
|
|
|
22430
22462
|
|
|
22431
22463
|
// src/components/navigation/header.tsx
|
|
22432
22464
|
init_next_link();
|
|
22433
|
-
import React78, { useEffect as
|
|
22465
|
+
import React78, { useEffect as useEffect40, useRef as useRef31, useState as useState56 } from "react";
|
|
22434
22466
|
init_button2();
|
|
22435
22467
|
import { Fragment as Fragment27, jsx as jsx191, jsxs as jsxs149 } from "react/jsx-runtime";
|
|
22436
22468
|
function Header2({ config, platform }) {
|
|
@@ -22439,7 +22471,7 @@ function Header2({ config, platform }) {
|
|
|
22439
22471
|
const [openDropdowns, setOpenDropdowns] = useState56({});
|
|
22440
22472
|
const dropdownRefs = useRef31({});
|
|
22441
22473
|
const triggerRefs = useRef31({});
|
|
22442
|
-
|
|
22474
|
+
useEffect40(() => {
|
|
22443
22475
|
const handleClickOutside = (event) => {
|
|
22444
22476
|
const target = event.target;
|
|
22445
22477
|
if (!target) return;
|
|
@@ -22468,14 +22500,14 @@ function Header2({ config, platform }) {
|
|
|
22468
22500
|
document.removeEventListener("keydown", handleEscapeKey);
|
|
22469
22501
|
};
|
|
22470
22502
|
}, [openDropdowns]);
|
|
22471
|
-
|
|
22503
|
+
useEffect40(() => {
|
|
22472
22504
|
return () => {
|
|
22473
22505
|
setOpenDropdowns({});
|
|
22474
22506
|
dropdownRefs.current = {};
|
|
22475
22507
|
triggerRefs.current = {};
|
|
22476
22508
|
};
|
|
22477
22509
|
}, []);
|
|
22478
|
-
|
|
22510
|
+
useEffect40(() => {
|
|
22479
22511
|
if (!config.autoHide) {
|
|
22480
22512
|
setShow(true);
|
|
22481
22513
|
return;
|
|
@@ -22698,7 +22730,7 @@ function Header2({ config, platform }) {
|
|
|
22698
22730
|
}
|
|
22699
22731
|
|
|
22700
22732
|
// src/components/navigation/client-only-header.tsx
|
|
22701
|
-
import { useState as useState57, useEffect as
|
|
22733
|
+
import { useState as useState57, useEffect as useEffect41 } from "react";
|
|
22702
22734
|
|
|
22703
22735
|
// src/components/navigation/header-skeleton.tsx
|
|
22704
22736
|
import { jsx as jsx192, jsxs as jsxs150 } from "react/jsx-runtime";
|
|
@@ -22747,7 +22779,7 @@ function HeaderSkeleton({ config }) {
|
|
|
22747
22779
|
import { jsx as jsx193 } from "react/jsx-runtime";
|
|
22748
22780
|
function ClientOnlyHeader({ config, skeleton }) {
|
|
22749
22781
|
const [isClient, setIsClient] = useState57(false);
|
|
22750
|
-
|
|
22782
|
+
useEffect41(() => {
|
|
22751
22783
|
setIsClient(true);
|
|
22752
22784
|
}, []);
|
|
22753
22785
|
if (!isClient) {
|
|
@@ -22757,13 +22789,13 @@ function ClientOnlyHeader({ config, skeleton }) {
|
|
|
22757
22789
|
}
|
|
22758
22790
|
|
|
22759
22791
|
// src/components/navigation/mobile-nav-panel.tsx
|
|
22760
|
-
import { useEffect as
|
|
22792
|
+
import { useEffect as useEffect42, useRef as useRef32 } from "react";
|
|
22761
22793
|
init_button2();
|
|
22762
22794
|
import { X as X10 } from "lucide-react";
|
|
22763
22795
|
import { Fragment as Fragment28, jsx as jsx194, jsxs as jsxs151 } from "react/jsx-runtime";
|
|
22764
22796
|
function MobileNavPanel({ isOpen, config }) {
|
|
22765
22797
|
const panelRef = useRef32(null);
|
|
22766
|
-
|
|
22798
|
+
useEffect42(() => {
|
|
22767
22799
|
if (isOpen) {
|
|
22768
22800
|
document.body.style.overflow = "hidden";
|
|
22769
22801
|
} else {
|
|
@@ -22773,7 +22805,7 @@ function MobileNavPanel({ isOpen, config }) {
|
|
|
22773
22805
|
document.body.style.overflow = "unset";
|
|
22774
22806
|
};
|
|
22775
22807
|
}, [isOpen]);
|
|
22776
|
-
|
|
22808
|
+
useEffect42(() => {
|
|
22777
22809
|
const handleKeyDown = (e) => {
|
|
22778
22810
|
if (e.key === "Escape" && isOpen) {
|
|
22779
22811
|
config.onClose?.();
|
|
@@ -22881,7 +22913,7 @@ function MobileNavPanel({ isOpen, config }) {
|
|
|
22881
22913
|
}
|
|
22882
22914
|
|
|
22883
22915
|
// src/components/navigation/sliding-sidebar.tsx
|
|
22884
|
-
import { useState as useState58, useEffect as
|
|
22916
|
+
import { useState as useState58, useEffect as useEffect43 } from "react";
|
|
22885
22917
|
import { motion as motion2, AnimatePresence } from "framer-motion";
|
|
22886
22918
|
init_button2();
|
|
22887
22919
|
import { Fragment as Fragment29, jsx as jsx195, jsxs as jsxs152 } from "react/jsx-runtime";
|
|
@@ -22889,7 +22921,7 @@ function SlidingSidebar({ config }) {
|
|
|
22889
22921
|
const [expandedItems, setExpandedItems] = useState58(/* @__PURE__ */ new Set());
|
|
22890
22922
|
const [mounted, setMounted] = useState58(false);
|
|
22891
22923
|
const headerHeight = useHeaderHeight();
|
|
22892
|
-
|
|
22924
|
+
useEffect43(() => {
|
|
22893
22925
|
setMounted(true);
|
|
22894
22926
|
}, []);
|
|
22895
22927
|
const toggleExpanded = (itemId) => {
|
|
@@ -23052,7 +23084,7 @@ function SlidingSidebar({ config }) {
|
|
|
23052
23084
|
}
|
|
23053
23085
|
|
|
23054
23086
|
// src/components/navigation/sticky-section-nav.tsx
|
|
23055
|
-
import { useEffect as
|
|
23087
|
+
import { useEffect as useEffect44, useState as useState59, useCallback as useCallback20, useRef as useRef33 } from "react";
|
|
23056
23088
|
import { jsx as jsx196, jsxs as jsxs153 } from "react/jsx-runtime";
|
|
23057
23089
|
function StickySectionNav({
|
|
23058
23090
|
sections,
|
|
@@ -23126,14 +23158,14 @@ function useSectionNavigation(sections, options) {
|
|
|
23126
23158
|
isScrollingFromClick.current = false;
|
|
23127
23159
|
}, 500);
|
|
23128
23160
|
}, [offset2]);
|
|
23129
|
-
|
|
23161
|
+
useEffect44(() => {
|
|
23130
23162
|
sections.forEach((section) => {
|
|
23131
23163
|
if (section.ref.current && !section.ref.current.id) {
|
|
23132
23164
|
section.ref.current.id = section.id;
|
|
23133
23165
|
}
|
|
23134
23166
|
});
|
|
23135
23167
|
}, [sections]);
|
|
23136
|
-
|
|
23168
|
+
useEffect44(() => {
|
|
23137
23169
|
const handleScroll = () => {
|
|
23138
23170
|
if (isScrollingFromClick.current) return;
|
|
23139
23171
|
const scrollPosition = window.scrollY + offset2 + 50;
|
|
@@ -23166,7 +23198,7 @@ function useSectionNavigation(sections, options) {
|
|
|
23166
23198
|
}
|
|
23167
23199
|
|
|
23168
23200
|
// src/components/navigation/navigation-sidebar.tsx
|
|
23169
|
-
import { useCallback as useCallback21, useEffect as
|
|
23201
|
+
import { useCallback as useCallback21, useEffect as useEffect45, useLayoutEffect as useLayoutEffect4, useMemo as useMemo19, useState as useState60 } from "react";
|
|
23170
23202
|
|
|
23171
23203
|
// src/components/navigation/navigation-sidebar-header.tsx
|
|
23172
23204
|
import { jsx as jsx197, jsxs as jsxs154 } from "react/jsx-runtime";
|
|
@@ -23325,7 +23357,7 @@ function NavigationSidebar({ config, disabled = false }) {
|
|
|
23325
23357
|
config.minimized ?? false
|
|
23326
23358
|
);
|
|
23327
23359
|
const [tabletMinimized, setTabletMinimized] = useState60(true);
|
|
23328
|
-
|
|
23360
|
+
useEffect45(() => {
|
|
23329
23361
|
if (isTablet) setTabletMinimized(true);
|
|
23330
23362
|
}, [isTablet]);
|
|
23331
23363
|
const minimized = isTablet ? tabletMinimized : desktopMinimized;
|
|
@@ -23343,7 +23375,7 @@ function NavigationSidebar({ config, disabled = false }) {
|
|
|
23343
23375
|
const closeOverlay = useCallback21(() => {
|
|
23344
23376
|
setTabletMinimized(true);
|
|
23345
23377
|
}, []);
|
|
23346
|
-
|
|
23378
|
+
useEffect45(() => {
|
|
23347
23379
|
if (!isOverlayOpen) return;
|
|
23348
23380
|
const handleKeyDown = (e) => {
|
|
23349
23381
|
if (e.key === "Escape") closeOverlay();
|
|
@@ -23842,7 +23874,7 @@ function NotificationsHeaderButton({
|
|
|
23842
23874
|
import { createContext as createContext7, Suspense, useCallback as useCallback23, useContext as useContext7, useState as useState61 } from "react";
|
|
23843
23875
|
|
|
23844
23876
|
// src/components/navigation/mobile-burger-menu.tsx
|
|
23845
|
-
import React84, { useCallback as useCallback22, useEffect as
|
|
23877
|
+
import React84, { useCallback as useCallback22, useEffect as useEffect46 } from "react";
|
|
23846
23878
|
import { Fragment as Fragment31, jsx as jsx206, jsxs as jsxs162 } from "react/jsx-runtime";
|
|
23847
23879
|
var HEADER_HEIGHT = 48;
|
|
23848
23880
|
var MobileBurgerMenu = React84.memo(function MobileBurgerMenu2({
|
|
@@ -23855,7 +23887,7 @@ var MobileBurgerMenu = React84.memo(function MobileBurgerMenu2({
|
|
|
23855
23887
|
onLogout,
|
|
23856
23888
|
disabled = false
|
|
23857
23889
|
}) {
|
|
23858
|
-
|
|
23890
|
+
useEffect46(() => {
|
|
23859
23891
|
if (isOpen) {
|
|
23860
23892
|
document.body.style.overflow = "hidden";
|
|
23861
23893
|
} else {
|
|
@@ -23865,7 +23897,7 @@ var MobileBurgerMenu = React84.memo(function MobileBurgerMenu2({
|
|
|
23865
23897
|
document.body.style.overflow = "unset";
|
|
23866
23898
|
};
|
|
23867
23899
|
}, [isOpen]);
|
|
23868
|
-
|
|
23900
|
+
useEffect46(() => {
|
|
23869
23901
|
const handleKeyDown = (e) => {
|
|
23870
23902
|
if (e.key === "Escape" && isOpen) {
|
|
23871
23903
|
onClose();
|
|
@@ -25590,7 +25622,7 @@ var ListLoader = (props) => /* @__PURE__ */ jsx224(ContentLoader, { ...props, va
|
|
|
25590
25622
|
|
|
25591
25623
|
// src/components/ui/table/table.tsx
|
|
25592
25624
|
init_cn();
|
|
25593
|
-
import { useEffect as
|
|
25625
|
+
import { useEffect as useEffect48, useRef as useRef37 } from "react";
|
|
25594
25626
|
init_pagination();
|
|
25595
25627
|
init_button2();
|
|
25596
25628
|
|
|
@@ -26344,7 +26376,7 @@ function Table({
|
|
|
26344
26376
|
const sentinelRef = useRef37(null);
|
|
26345
26377
|
const onLoadMoreRef = useRef37(infiniteScroll?.onLoadMore);
|
|
26346
26378
|
onLoadMoreRef.current = infiniteScroll?.onLoadMore;
|
|
26347
|
-
|
|
26379
|
+
useEffect48(() => {
|
|
26348
26380
|
if (!infiniteScroll?.hasNextPage || infiniteScroll.isFetchingNextPage) return;
|
|
26349
26381
|
const sentinel = sentinelRef.current;
|
|
26350
26382
|
if (!sentinel) return;
|
|
@@ -27429,7 +27461,7 @@ function DataTableBody({
|
|
|
27429
27461
|
}
|
|
27430
27462
|
|
|
27431
27463
|
// src/components/ui/data-table/data-table-infinite-footer.tsx
|
|
27432
|
-
import { useEffect as
|
|
27464
|
+
import { useEffect as useEffect49, useRef as useRef41 } from "react";
|
|
27433
27465
|
import { Fragment as Fragment39, jsx as jsx247, jsxs as jsxs198 } from "react/jsx-runtime";
|
|
27434
27466
|
function DataTableInfiniteFooter({
|
|
27435
27467
|
hasNextPage,
|
|
@@ -27441,7 +27473,7 @@ function DataTableInfiniteFooter({
|
|
|
27441
27473
|
const sentinelRef = useRef41(null);
|
|
27442
27474
|
const onLoadMoreRef = useRef41(onLoadMore);
|
|
27443
27475
|
onLoadMoreRef.current = onLoadMore;
|
|
27444
|
-
|
|
27476
|
+
useEffect49(() => {
|
|
27445
27477
|
if (!hasNextPage || isFetchingNextPage) return;
|
|
27446
27478
|
const sentinel = sentinelRef.current;
|
|
27447
27479
|
if (!sentinel) return;
|
|
@@ -27682,7 +27714,7 @@ function FilterList({
|
|
|
27682
27714
|
|
|
27683
27715
|
// src/components/ui/tag-search-input.tsx
|
|
27684
27716
|
import {
|
|
27685
|
-
useEffect as
|
|
27717
|
+
useEffect as useEffect50,
|
|
27686
27718
|
useRef as useRef42,
|
|
27687
27719
|
useState as useState66
|
|
27688
27720
|
} from "react";
|
|
@@ -27722,7 +27754,7 @@ function TagSearchInput({
|
|
|
27722
27754
|
const hiddenTagsRef = useRef42(null);
|
|
27723
27755
|
const hiddenTagsPopupRef = useRef42(null);
|
|
27724
27756
|
const [showHiddenTags, setShowHiddenTags] = useState66(false);
|
|
27725
|
-
|
|
27757
|
+
useEffect50(() => {
|
|
27726
27758
|
if (!showHiddenTags) return;
|
|
27727
27759
|
const handleClick = (e) => {
|
|
27728
27760
|
const target = e.target;
|
|
@@ -27877,9 +27909,9 @@ function TagSearchInput({
|
|
|
27877
27909
|
}
|
|
27878
27910
|
|
|
27879
27911
|
// src/components/ui/markdown-editor.tsx
|
|
27880
|
-
import { useRef as useRef43, useCallback as useCallback30, useState as useState67, useEffect as
|
|
27912
|
+
import { useRef as useRef43, useCallback as useCallback30, useState as useState67, useEffect as useEffect51 } from "react";
|
|
27881
27913
|
init_cn();
|
|
27882
|
-
import { Loader2 as
|
|
27914
|
+
import { Loader2 as Loader29, Upload as Upload8 } from "lucide-react";
|
|
27883
27915
|
import { jsx as jsx251, jsxs as jsxs202 } from "react/jsx-runtime";
|
|
27884
27916
|
var MDEditor = dynamic(() => import("@uiw/react-md-editor"), { ssr: false });
|
|
27885
27917
|
var MARKDOWN_EDITOR_STYLE_ID = "ods-markdown-editor-styles";
|
|
@@ -27908,7 +27940,7 @@ body .w-md-editor .w-md-editor-bar::after { content: '' !important; display: blo
|
|
|
27908
27940
|
body .w-md-editor .w-md-editor-bar:hover::after { border-color: var(--color-text-secondary) !important; }
|
|
27909
27941
|
`;
|
|
27910
27942
|
function MarkdownEditorStyles() {
|
|
27911
|
-
|
|
27943
|
+
useEffect51(() => {
|
|
27912
27944
|
if (document.getElementById(MARKDOWN_EDITOR_STYLE_ID)) return;
|
|
27913
27945
|
const style = document.createElement("style");
|
|
27914
27946
|
style.id = MARKDOWN_EDITOR_STYLE_ID;
|
|
@@ -27936,7 +27968,7 @@ function MarkdownEditor({
|
|
|
27936
27968
|
const [isUploading, setIsUploading] = useState67(false);
|
|
27937
27969
|
const [uploadProgress, setUploadProgress] = useState67("");
|
|
27938
27970
|
const [defaultExtraCommands, setDefaultExtraCommands] = useState67([]);
|
|
27939
|
-
|
|
27971
|
+
useEffect51(() => {
|
|
27940
27972
|
import("@uiw/react-md-editor").then((mod) => {
|
|
27941
27973
|
if (mod.commands?.getExtraCommands) {
|
|
27942
27974
|
setDefaultExtraCommands(mod.commands.getExtraCommands());
|
|
@@ -28019,7 +28051,7 @@ function MarkdownEditor({
|
|
|
28019
28051
|
name: "upload",
|
|
28020
28052
|
keyCommand: "upload",
|
|
28021
28053
|
buttonProps: { "aria-label": "Upload file", title: "Upload file" },
|
|
28022
|
-
icon: isUploading ? /* @__PURE__ */ jsx251(
|
|
28054
|
+
icon: isUploading ? /* @__PURE__ */ jsx251(Loader29, { className: "w-3 h-3 animate-spin" }) : /* @__PURE__ */ jsx251(Upload8, { className: "w-3 h-3" }),
|
|
28023
28055
|
execute: () => {
|
|
28024
28056
|
fileInputRef.current?.click();
|
|
28025
28057
|
}
|
|
@@ -28059,7 +28091,7 @@ function MarkdownEditor({
|
|
|
28059
28091
|
}
|
|
28060
28092
|
rafRef.current = requestAnimationFrame(scrollLoop);
|
|
28061
28093
|
}, []);
|
|
28062
|
-
|
|
28094
|
+
useEffect51(() => {
|
|
28063
28095
|
const wrapper = wrapperRef.current;
|
|
28064
28096
|
if (!wrapper) return;
|
|
28065
28097
|
const onMouseMove = (e) => {
|
|
@@ -28107,7 +28139,7 @@ function MarkdownEditor({
|
|
|
28107
28139
|
accept: "image/*,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.zip,.txt"
|
|
28108
28140
|
}
|
|
28109
28141
|
),
|
|
28110
|
-
!MDEditor && /* @__PURE__ */ jsx251("div", { className: "flex items-center justify-center h-64", children: /* @__PURE__ */ jsx251(
|
|
28142
|
+
!MDEditor && /* @__PURE__ */ jsx251("div", { className: "flex items-center justify-center h-64", children: /* @__PURE__ */ jsx251(Loader29, { className: "h-8 w-8 animate-spin" }) }),
|
|
28111
28143
|
MDEditor && /* @__PURE__ */ jsx251(
|
|
28112
28144
|
MDEditor,
|
|
28113
28145
|
{
|
|
@@ -28153,7 +28185,7 @@ function MarkdownEditor({
|
|
|
28153
28185
|
|
|
28154
28186
|
// src/components/ui/file-upload.tsx
|
|
28155
28187
|
import * as React96 from "react";
|
|
28156
|
-
import { Loader2 as
|
|
28188
|
+
import { Loader2 as Loader210, X as X11 } from "lucide-react";
|
|
28157
28189
|
init_cn();
|
|
28158
28190
|
import { jsx as jsx252, jsxs as jsxs203 } from "react/jsx-runtime";
|
|
28159
28191
|
function formatFileSize2(bytes) {
|
|
@@ -28406,7 +28438,7 @@ function FileUpload({
|
|
|
28406
28438
|
/* @__PURE__ */ jsxs203("div", { className: "flex items-center gap-2", children: [
|
|
28407
28439
|
/* @__PURE__ */ jsx252("span", { className: "text-heading-6 text-ods-text-secondary", children: formatFileSize2(entry.fileSize) }),
|
|
28408
28440
|
entry.status === "uploading" && /* @__PURE__ */ jsxs203("span", { className: "flex items-center gap-1 text-heading-6 text-ods-text-secondary", children: [
|
|
28409
|
-
/* @__PURE__ */ jsx252(
|
|
28441
|
+
/* @__PURE__ */ jsx252(Loader210, { className: "size-3 animate-spin" }),
|
|
28410
28442
|
"Uploading..."
|
|
28411
28443
|
] }),
|
|
28412
28444
|
entry.status === "error" && /* @__PURE__ */ jsx252("span", { className: "text-heading-6 text-[var(--ods-attention-red-error)]", children: entry.error || "Upload failed" })
|
|
@@ -28477,7 +28509,7 @@ function FileUpload({
|
|
|
28477
28509
|
|
|
28478
28510
|
// src/components/ui/image-uploader.tsx
|
|
28479
28511
|
import * as React97 from "react";
|
|
28480
|
-
import { Loader2 as
|
|
28512
|
+
import { Loader2 as Loader211 } from "lucide-react";
|
|
28481
28513
|
init_cn();
|
|
28482
28514
|
import { Fragment as Fragment41, jsx as jsx253, jsxs as jsxs204 } from "react/jsx-runtime";
|
|
28483
28515
|
var DEFAULT_MAX_SIZE = 25 * 1024 * 1024;
|
|
@@ -28641,8 +28673,8 @@ function ImageUploader({
|
|
|
28641
28673
|
}
|
|
28642
28674
|
)
|
|
28643
28675
|
] }),
|
|
28644
|
-
loading && /* @__PURE__ */ jsx253("div", { className: "absolute inset-0 flex items-center justify-center rounded-md bg-ods-overlay", children: /* @__PURE__ */ jsx253(
|
|
28645
|
-
] }) : loading ? /* @__PURE__ */ jsx253(
|
|
28676
|
+
loading && /* @__PURE__ */ jsx253("div", { className: "absolute inset-0 flex items-center justify-center rounded-md bg-ods-overlay", children: /* @__PURE__ */ jsx253(Loader211, { className: "size-8 animate-spin text-ods-text-on-dark" }) })
|
|
28677
|
+
] }) : loading ? /* @__PURE__ */ jsx253(Loader211, { className: "size-8 animate-spin text-ods-accent" }) : /* @__PURE__ */ jsxs204(Fragment41, { children: [
|
|
28646
28678
|
/* @__PURE__ */ jsx253("div", { className: "flex shrink-0 items-center justify-center rounded-full border border-ods-border bg-ods-card p-[var(--spacing-system-s)]", children: /* @__PURE__ */ jsx253(ImagePlusIcon, { className: "size-6 text-ods-text-primary" }) }),
|
|
28647
28679
|
/* @__PURE__ */ jsxs204("div", { className: "flex w-full flex-col items-center text-center", children: [
|
|
28648
28680
|
/* @__PURE__ */ jsx253("p", { className: "text-h4 text-ods-text-primary", children: label }),
|
|
@@ -29748,7 +29780,7 @@ function ImageGalleryModal({
|
|
|
29748
29780
|
initialIndex = 0
|
|
29749
29781
|
}) {
|
|
29750
29782
|
const [selectedImageIndex, setSelectedImageIndex] = useState75(initialIndex);
|
|
29751
|
-
|
|
29783
|
+
useEffect55(() => {
|
|
29752
29784
|
if (isOpen) {
|
|
29753
29785
|
setSelectedImageIndex(initialIndex);
|
|
29754
29786
|
}
|
|
@@ -29763,7 +29795,7 @@ function ImageGalleryModal({
|
|
|
29763
29795
|
setSelectedImageIndex(selectedImageIndex + 1);
|
|
29764
29796
|
}
|
|
29765
29797
|
};
|
|
29766
|
-
|
|
29798
|
+
useEffect55(() => {
|
|
29767
29799
|
const handleKeyPress = (event) => {
|
|
29768
29800
|
if (!isOpen) return;
|
|
29769
29801
|
switch (event.key) {
|
|
@@ -33905,7 +33937,7 @@ function useChunkCatchup({
|
|
|
33905
33937
|
}
|
|
33906
33938
|
|
|
33907
33939
|
// src/components/chat/hooks/use-jetstream-dialog-subscription.ts
|
|
33908
|
-
import { useEffect as
|
|
33940
|
+
import { useEffect as useEffect56, useRef as useRef48, useState as useState78 } from "react";
|
|
33909
33941
|
var DEFAULT_INACTIVE_THRESHOLD_MS = 5 * 6e4;
|
|
33910
33942
|
var DEFAULT_STREAM_NAME = "CHAT_CHUNKS";
|
|
33911
33943
|
function useJetStreamDialogSubscription({
|
|
@@ -33932,49 +33964,49 @@ function useJetStreamDialogSubscription({
|
|
|
33932
33964
|
const subscriptionRef = useRef48(null);
|
|
33933
33965
|
const highestStreamSeqRef = useRef48(null);
|
|
33934
33966
|
const onEventRef = useRef48(onEvent);
|
|
33935
|
-
|
|
33967
|
+
useEffect56(() => {
|
|
33936
33968
|
onEventRef.current = onEvent;
|
|
33937
33969
|
}, [onEvent]);
|
|
33938
33970
|
const onConnectRef = useRef48(onConnect);
|
|
33939
|
-
|
|
33971
|
+
useEffect56(() => {
|
|
33940
33972
|
onConnectRef.current = onConnect;
|
|
33941
33973
|
}, [onConnect]);
|
|
33942
33974
|
const onDisconnectRef = useRef48(onDisconnect);
|
|
33943
|
-
|
|
33975
|
+
useEffect56(() => {
|
|
33944
33976
|
onDisconnectRef.current = onDisconnect;
|
|
33945
33977
|
}, [onDisconnect]);
|
|
33946
33978
|
const onSubscribedRef = useRef48(onSubscribed);
|
|
33947
|
-
|
|
33979
|
+
useEffect56(() => {
|
|
33948
33980
|
onSubscribedRef.current = onSubscribed;
|
|
33949
33981
|
}, [onSubscribed]);
|
|
33950
33982
|
const onBeforeReconnectRef = useRef48(onBeforeReconnect);
|
|
33951
|
-
|
|
33983
|
+
useEffect56(() => {
|
|
33952
33984
|
onBeforeReconnectRef.current = onBeforeReconnect;
|
|
33953
33985
|
}, [onBeforeReconnect]);
|
|
33954
33986
|
const getNatsWsUrlRef = useRef48(getNatsWsUrl);
|
|
33955
|
-
|
|
33987
|
+
useEffect56(() => {
|
|
33956
33988
|
getNatsWsUrlRef.current = getNatsWsUrl;
|
|
33957
33989
|
}, [getNatsWsUrl]);
|
|
33958
33990
|
const reconnectionBackoffRef = useRef48(reconnectionBackoff);
|
|
33959
|
-
|
|
33991
|
+
useEffect56(() => {
|
|
33960
33992
|
reconnectionBackoffRef.current = reconnectionBackoff;
|
|
33961
33993
|
}, [reconnectionBackoff]);
|
|
33962
33994
|
const optStartSeqRef = useRef48(optStartSeq);
|
|
33963
|
-
|
|
33995
|
+
useEffect56(() => {
|
|
33964
33996
|
optStartSeqRef.current = optStartSeq;
|
|
33965
33997
|
}, [optStartSeq]);
|
|
33966
33998
|
const inactiveThresholdRef = useRef48(inactiveThresholdMs);
|
|
33967
|
-
|
|
33999
|
+
useEffect56(() => {
|
|
33968
34000
|
inactiveThresholdRef.current = inactiveThresholdMs;
|
|
33969
34001
|
}, [inactiveThresholdMs]);
|
|
33970
34002
|
const hadConnectionBeforeRef = useRef48(false);
|
|
33971
34003
|
const clientConfigRef = useRef48(clientConfig);
|
|
33972
|
-
|
|
34004
|
+
useEffect56(() => {
|
|
33973
34005
|
clientConfigRef.current = clientConfig;
|
|
33974
34006
|
}, [clientConfig]);
|
|
33975
34007
|
const currentWsUrlRef = useRef48("");
|
|
33976
34008
|
const wsUrl = getNatsWsUrl();
|
|
33977
|
-
|
|
34009
|
+
useEffect56(() => {
|
|
33978
34010
|
if (!enabled || !wsUrl) {
|
|
33979
34011
|
if (currentWsUrlRef.current && clientRef.current) {
|
|
33980
34012
|
releaseClient(currentWsUrlRef.current);
|
|
@@ -34055,7 +34087,7 @@ function useJetStreamDialogSubscription({
|
|
|
34055
34087
|
}
|
|
34056
34088
|
};
|
|
34057
34089
|
}, [enabled, wsUrl]);
|
|
34058
|
-
|
|
34090
|
+
useEffect56(() => {
|
|
34059
34091
|
if (!enabled || !dialogId || !isConnected) {
|
|
34060
34092
|
if (subscriptionRef.current) {
|
|
34061
34093
|
try {
|
|
@@ -34138,7 +34170,7 @@ function useJetStreamDialogSubscription({
|
|
|
34138
34170
|
setIsSubscribed(false);
|
|
34139
34171
|
};
|
|
34140
34172
|
}, [enabled, dialogId, isConnected, streamName, topic, reconnectionCount]);
|
|
34141
|
-
|
|
34173
|
+
useEffect56(() => {
|
|
34142
34174
|
highestStreamSeqRef.current = null;
|
|
34143
34175
|
setCurrentStreamSeq(null);
|
|
34144
34176
|
}, [dialogId]);
|
|
@@ -34146,7 +34178,7 @@ function useJetStreamDialogSubscription({
|
|
|
34146
34178
|
}
|
|
34147
34179
|
|
|
34148
34180
|
// src/components/chat/hooks/use-nats-dialog-subscription.ts
|
|
34149
|
-
import { useEffect as
|
|
34181
|
+
import { useEffect as useEffect57, useRef as useRef49, useState as useState79 } from "react";
|
|
34150
34182
|
function useNatsDialogSubscription({
|
|
34151
34183
|
enabled,
|
|
34152
34184
|
dialogId,
|
|
@@ -34166,41 +34198,41 @@ function useNatsDialogSubscription({
|
|
|
34166
34198
|
const clientRef = useRef49(null);
|
|
34167
34199
|
const subscriptionRefs = useRef49(/* @__PURE__ */ new Map());
|
|
34168
34200
|
const onEventRef = useRef49(onEvent);
|
|
34169
|
-
|
|
34201
|
+
useEffect57(() => {
|
|
34170
34202
|
onEventRef.current = onEvent;
|
|
34171
34203
|
}, [onEvent]);
|
|
34172
34204
|
const onConnectRef = useRef49(onConnect);
|
|
34173
|
-
|
|
34205
|
+
useEffect57(() => {
|
|
34174
34206
|
onConnectRef.current = onConnect;
|
|
34175
34207
|
}, [onConnect]);
|
|
34176
34208
|
const onDisconnectRef = useRef49(onDisconnect);
|
|
34177
|
-
|
|
34209
|
+
useEffect57(() => {
|
|
34178
34210
|
onDisconnectRef.current = onDisconnect;
|
|
34179
34211
|
}, [onDisconnect]);
|
|
34180
34212
|
const onSubscribedRef = useRef49(onSubscribed);
|
|
34181
|
-
|
|
34213
|
+
useEffect57(() => {
|
|
34182
34214
|
onSubscribedRef.current = onSubscribed;
|
|
34183
34215
|
}, [onSubscribed]);
|
|
34184
34216
|
const onBeforeReconnectRef = useRef49(onBeforeReconnect);
|
|
34185
|
-
|
|
34217
|
+
useEffect57(() => {
|
|
34186
34218
|
onBeforeReconnectRef.current = onBeforeReconnect;
|
|
34187
34219
|
}, [onBeforeReconnect]);
|
|
34188
34220
|
const hadConnectionBeforeRef = useRef49(false);
|
|
34189
34221
|
const getNatsWsUrlRef = useRef49(getNatsWsUrl);
|
|
34190
|
-
|
|
34222
|
+
useEffect57(() => {
|
|
34191
34223
|
getNatsWsUrlRef.current = getNatsWsUrl;
|
|
34192
34224
|
}, [getNatsWsUrl]);
|
|
34193
34225
|
const reconnectionBackoffRef = useRef49(reconnectionBackoff);
|
|
34194
|
-
|
|
34226
|
+
useEffect57(() => {
|
|
34195
34227
|
reconnectionBackoffRef.current = reconnectionBackoff;
|
|
34196
34228
|
}, [reconnectionBackoff]);
|
|
34197
34229
|
const clientConfigRef = useRef49(clientConfig);
|
|
34198
|
-
|
|
34230
|
+
useEffect57(() => {
|
|
34199
34231
|
clientConfigRef.current = clientConfig;
|
|
34200
34232
|
}, [clientConfig]);
|
|
34201
34233
|
const currentWsUrlRef = useRef49("");
|
|
34202
34234
|
const wsUrl = getNatsWsUrl();
|
|
34203
|
-
|
|
34235
|
+
useEffect57(() => {
|
|
34204
34236
|
if (!enabled || !wsUrl) {
|
|
34205
34237
|
if (currentWsUrlRef.current && clientRef.current) {
|
|
34206
34238
|
releaseClient(currentWsUrlRef.current);
|
|
@@ -34284,12 +34316,12 @@ function useNatsDialogSubscription({
|
|
|
34284
34316
|
const topicsKey = topics.join(",");
|
|
34285
34317
|
const lastSubscribedDialogIdRef = useRef49(null);
|
|
34286
34318
|
const isConnectedRef = useRef49(isConnected);
|
|
34287
|
-
|
|
34319
|
+
useEffect57(() => {
|
|
34288
34320
|
isConnectedRef.current = isConnected;
|
|
34289
34321
|
}, [isConnected]);
|
|
34290
34322
|
const currentDialogIdRef = useRef49(null);
|
|
34291
34323
|
const abortControllerRef = useRef49(null);
|
|
34292
|
-
|
|
34324
|
+
useEffect57(() => {
|
|
34293
34325
|
currentDialogIdRef.current = dialogId;
|
|
34294
34326
|
if (!enabled || !dialogId) {
|
|
34295
34327
|
if (subscriptionRefs.current.size > 0) {
|
|
@@ -34370,7 +34402,7 @@ function useNatsDialogSubscription({
|
|
|
34370
34402
|
abortControllerRef.current = null;
|
|
34371
34403
|
};
|
|
34372
34404
|
}, [enabled, dialogId, topicsKey, topics]);
|
|
34373
|
-
|
|
34405
|
+
useEffect57(() => {
|
|
34374
34406
|
if (!enabled || !currentDialogIdRef.current || !isConnected) {
|
|
34375
34407
|
return;
|
|
34376
34408
|
}
|
|
@@ -34420,7 +34452,7 @@ function buildNatsWsUrl(apiBaseUrl, options) {
|
|
|
34420
34452
|
}
|
|
34421
34453
|
|
|
34422
34454
|
// src/components/chat/hooks/use-realtime-chunk-processor.ts
|
|
34423
|
-
import { useCallback as useCallback34, useRef as useRef50, useEffect as
|
|
34455
|
+
import { useCallback as useCallback34, useRef as useRef50, useEffect as useEffect58 } from "react";
|
|
34424
34456
|
|
|
34425
34457
|
// src/components/chat/utils/chunk-parser.ts
|
|
34426
34458
|
function normalizeToolCalls(raw) {
|
|
@@ -35064,7 +35096,7 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35064
35096
|
})
|
|
35065
35097
|
);
|
|
35066
35098
|
const hasInitializedWithData = useRef50(false);
|
|
35067
|
-
|
|
35099
|
+
useEffect58(() => {
|
|
35068
35100
|
if (initialState && !hasInitializedWithData.current) {
|
|
35069
35101
|
accumulatorRef.current.initializeWithState(initialState);
|
|
35070
35102
|
if (initialState.escalatedApprovals) {
|
|
@@ -35081,7 +35113,7 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35081
35113
|
const hasEverStreamedRef = useRef50(false);
|
|
35082
35114
|
const directModeFlagRef = useRef50(isDirectMode);
|
|
35083
35115
|
const sawDirectMessageRef = useRef50(false);
|
|
35084
|
-
|
|
35116
|
+
useEffect58(() => {
|
|
35085
35117
|
directModeFlagRef.current = isDirectMode;
|
|
35086
35118
|
}, [isDirectMode]);
|
|
35087
35119
|
const pendingEscalatedRef = useRef50(/* @__PURE__ */ new Map());
|
|
@@ -35338,7 +35370,7 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35338
35370
|
}
|
|
35339
35371
|
|
|
35340
35372
|
// src/components/chat/hooks/use-slash-commands.ts
|
|
35341
|
-
import { useEffect as
|
|
35373
|
+
import { useEffect as useEffect59, useState as useState80 } from "react";
|
|
35342
35374
|
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
|
35343
35375
|
async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
35344
35376
|
const url = new URL(commandsUrl, window.location.origin);
|
|
@@ -35351,7 +35383,7 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
|
35351
35383
|
function useSlashCommands(prefix, commandsUrl) {
|
|
35352
35384
|
const [commands, setCommands] = useState80([]);
|
|
35353
35385
|
const [loading, setLoading] = useState80(false);
|
|
35354
|
-
|
|
35386
|
+
useEffect59(() => {
|
|
35355
35387
|
if (prefix == null) {
|
|
35356
35388
|
setCommands([]);
|
|
35357
35389
|
return;
|
|
@@ -35639,7 +35671,7 @@ function useChatAttachments() {
|
|
|
35639
35671
|
}
|
|
35640
35672
|
|
|
35641
35673
|
// src/components/chat/hooks/use-chat-attachment-image-gallery.tsx
|
|
35642
|
-
import { useCallback as useCallback36, useEffect as
|
|
35674
|
+
import { useCallback as useCallback36, useEffect as useEffect60, useRef as useRef52, useState as useState82 } from "react";
|
|
35643
35675
|
import { jsx as jsx275 } from "react/jsx-runtime";
|
|
35644
35676
|
var CLOSED = { isOpen: false, images: [], initialIndex: 0 };
|
|
35645
35677
|
function useChatAttachmentImageGallery() {
|
|
@@ -35648,7 +35680,7 @@ function useChatAttachmentImageGallery() {
|
|
|
35648
35680
|
const panelRef = useRef52(null);
|
|
35649
35681
|
const [state, setState] = useState82(CLOSED);
|
|
35650
35682
|
const handleClose = useCallback36(() => setState(CLOSED), []);
|
|
35651
|
-
|
|
35683
|
+
useEffect60(() => {
|
|
35652
35684
|
const root = panelRef.current;
|
|
35653
35685
|
if (!root) return;
|
|
35654
35686
|
const onClick = (ev) => {
|
|
@@ -35694,7 +35726,7 @@ function absolutize(prefix) {
|
|
|
35694
35726
|
}
|
|
35695
35727
|
|
|
35696
35728
|
// src/components/chat/hooks/use-chat-identity.ts
|
|
35697
|
-
import { createContext as createContext10, createElement, useContext as useContext10, useEffect as
|
|
35729
|
+
import { createContext as createContext10, createElement, useContext as useContext10, useEffect as useEffect61, useState as useState83 } from "react";
|
|
35698
35730
|
var ANON_DEFAULTS = {
|
|
35699
35731
|
authTier: "anon",
|
|
35700
35732
|
source: null,
|
|
@@ -35707,7 +35739,7 @@ function useResolveChatIdentity(enabled) {
|
|
|
35707
35739
|
const proxyEmail = getEmbedProxyAuth()?.email ?? null;
|
|
35708
35740
|
const [data, setData] = useState83(ANON_DEFAULTS);
|
|
35709
35741
|
const [isLoading, setIsLoading] = useState83(enabled);
|
|
35710
|
-
|
|
35742
|
+
useEffect61(() => {
|
|
35711
35743
|
if (!enabled) return;
|
|
35712
35744
|
let cancelled = false;
|
|
35713
35745
|
const ctrl = new AbortController();
|
|
@@ -35746,11 +35778,11 @@ function useChatIdentity() {
|
|
|
35746
35778
|
}
|
|
35747
35779
|
|
|
35748
35780
|
// src/components/chat/hooks/use-close-on-navigation.ts
|
|
35749
|
-
import { useEffect as
|
|
35781
|
+
import { useEffect as useEffect62, useRef as useRef53 } from "react";
|
|
35750
35782
|
function useCloseOnNavigation(close, pathname) {
|
|
35751
35783
|
const prevPathnameRef = useRef53(null);
|
|
35752
35784
|
const initializedRef = useRef53(false);
|
|
35753
|
-
|
|
35785
|
+
useEffect62(() => {
|
|
35754
35786
|
if (!initializedRef.current) {
|
|
35755
35787
|
initializedRef.current = true;
|
|
35756
35788
|
prevPathnameRef.current = pathname;
|
|
@@ -35764,7 +35796,7 @@ function useCloseOnNavigation(close, pathname) {
|
|
|
35764
35796
|
}
|
|
35765
35797
|
|
|
35766
35798
|
// src/components/chat/hooks/use-chat.ts
|
|
35767
|
-
import { useState as useState85, useCallback as useCallback38, useEffect as
|
|
35799
|
+
import { useState as useState85, useCallback as useCallback38, useEffect as useEffect63, useRef as useRef55 } from "react";
|
|
35768
35800
|
|
|
35769
35801
|
// src/components/chat/hooks/use-sse.ts
|
|
35770
35802
|
import { useState as useState84, useCallback as useCallback37, useRef as useRef54 } from "react";
|
|
@@ -35842,7 +35874,7 @@ function useChat({
|
|
|
35842
35874
|
const currentAssistantSegmentsRef = useRef55([]);
|
|
35843
35875
|
const onMessagesChangeRef = useRef55(onMessagesChange);
|
|
35844
35876
|
onMessagesChangeRef.current = onMessagesChange;
|
|
35845
|
-
|
|
35877
|
+
useEffect63(() => {
|
|
35846
35878
|
onMessagesChangeRef.current?.(messages);
|
|
35847
35879
|
}, [messages]);
|
|
35848
35880
|
const {
|
|
@@ -36131,7 +36163,7 @@ function useChat({
|
|
|
36131
36163
|
}
|
|
36132
36164
|
|
|
36133
36165
|
// src/components/chat/hooks/use-sse-chat-adapter.ts
|
|
36134
|
-
import { useState as useState86, useEffect as
|
|
36166
|
+
import { useState as useState86, useEffect as useEffect64, useCallback as useCallback39, useMemo as useMemo26, useRef as useRef56 } from "react";
|
|
36135
36167
|
function createEmptyTurnMeta() {
|
|
36136
36168
|
return {
|
|
36137
36169
|
provider: null,
|
|
@@ -36655,7 +36687,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
36655
36687
|
}
|
|
36656
36688
|
}
|
|
36657
36689
|
}, [chatClearMessages, source, bumpMetaTick]);
|
|
36658
|
-
|
|
36690
|
+
useEffect64(() => {
|
|
36659
36691
|
if (!isTyping && !isStreaming && streamingPhase !== "idle") {
|
|
36660
36692
|
setStreamingPhase("idle");
|
|
36661
36693
|
}
|
|
@@ -36737,7 +36769,7 @@ var noopRejectRequest = async (_id, _reason) => {
|
|
|
36737
36769
|
// src/components/chat/hooks/use-nats-chat-adapter.ts
|
|
36738
36770
|
import {
|
|
36739
36771
|
useCallback as useCallback40,
|
|
36740
|
-
useEffect as
|
|
36772
|
+
useEffect as useEffect65,
|
|
36741
36773
|
useMemo as useMemo27,
|
|
36742
36774
|
useRef as useRef57,
|
|
36743
36775
|
useState as useState87
|
|
@@ -37380,7 +37412,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
37380
37412
|
]
|
|
37381
37413
|
);
|
|
37382
37414
|
const prevDialogIdRef = useRef57(void 0);
|
|
37383
|
-
|
|
37415
|
+
useEffect65(() => {
|
|
37384
37416
|
if (prevDialogIdRef.current === dialogId) return;
|
|
37385
37417
|
prevDialogIdRef.current = dialogId;
|
|
37386
37418
|
historyLoadSeqRef.current += 1;
|
|
@@ -37394,7 +37426,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
37394
37426
|
if (!active || !dialogId) return;
|
|
37395
37427
|
void loadDialogHistory(dialogId);
|
|
37396
37428
|
}, [active, dialogId, loadDialogHistory, resetAccumulator]);
|
|
37397
|
-
|
|
37429
|
+
useEffect65(() => {
|
|
37398
37430
|
if (!active || !dialogId) return;
|
|
37399
37431
|
resetChunkTracking();
|
|
37400
37432
|
startInitialBuffering();
|
|
@@ -37416,7 +37448,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
37416
37448
|
setConnectionState("connected");
|
|
37417
37449
|
}
|
|
37418
37450
|
});
|
|
37419
|
-
|
|
37451
|
+
useEffect65(() => {
|
|
37420
37452
|
if (!active || !dialogId) {
|
|
37421
37453
|
setConnectionState("connected");
|
|
37422
37454
|
return;
|
|
@@ -37455,7 +37487,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
37455
37487
|
const reloadDialogs = useCallback40(() => {
|
|
37456
37488
|
void loadDialogsPage();
|
|
37457
37489
|
}, [loadDialogsPage]);
|
|
37458
|
-
|
|
37490
|
+
useEffect65(() => {
|
|
37459
37491
|
if (!fetchDialogs) return;
|
|
37460
37492
|
if (!active) return;
|
|
37461
37493
|
if (initialDialogsLoadedRef.current) return;
|
|
@@ -38021,7 +38053,7 @@ function chatChipClass({ tone, density = "chip", extra }) {
|
|
|
38021
38053
|
}
|
|
38022
38054
|
|
|
38023
38055
|
// src/components/chat/embeddable-chat.tsx
|
|
38024
|
-
import { useCallback as useCallback43, useEffect as
|
|
38056
|
+
import { useCallback as useCallback43, useEffect as useEffect66, useMemo as useMemo30, useRef as useRef59, useState as useState89 } from "react";
|
|
38025
38057
|
import * as DialogPrimitive4 from "@radix-ui/react-dialog";
|
|
38026
38058
|
import { usePreventScroll } from "@react-aria/overlays";
|
|
38027
38059
|
import { isIOS } from "@react-aria/utils";
|
|
@@ -38528,7 +38560,7 @@ function EmbeddableChatInner({
|
|
|
38528
38560
|
const commandsUrl = runtime.endpoints.commandsUrl;
|
|
38529
38561
|
const { attachmentsEnabled, user: identityUser } = useChatIdentity();
|
|
38530
38562
|
const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
|
|
38531
|
-
|
|
38563
|
+
useEffect66(() => {
|
|
38532
38564
|
if (process.env.NODE_ENV !== "production") {
|
|
38533
38565
|
const hasOpen = open !== void 0;
|
|
38534
38566
|
const hasHandler = onOpenChange !== void 0;
|
|
@@ -38550,7 +38582,7 @@ function EmbeddableChatInner({
|
|
|
38550
38582
|
});
|
|
38551
38583
|
usePreventScroll({ isDisabled: !isOpen || shellLess });
|
|
38552
38584
|
const navigatingAwayRef = useRef59(false);
|
|
38553
|
-
|
|
38585
|
+
useEffect66(() => {
|
|
38554
38586
|
if (!isOpen) return;
|
|
38555
38587
|
if (shellLess) return;
|
|
38556
38588
|
if (typeof window === "undefined") return;
|
|
@@ -38787,7 +38819,7 @@ function EmbeddableChatInner({
|
|
|
38787
38819
|
});
|
|
38788
38820
|
const handleOpen = useCallback43(() => setIsOpen(true), [setIsOpen]);
|
|
38789
38821
|
useCloseOnNavigation(handleNavigationClose, null);
|
|
38790
|
-
|
|
38822
|
+
useEffect66(() => {
|
|
38791
38823
|
const handler = (e) => {
|
|
38792
38824
|
const detail = e.detail;
|
|
38793
38825
|
if (!detail || detail.source !== source) return;
|
|
@@ -39815,4 +39847,4 @@ export {
|
|
|
39815
39847
|
LogsList,
|
|
39816
39848
|
assets
|
|
39817
39849
|
};
|
|
39818
|
-
//# sourceMappingURL=chunk-
|
|
39850
|
+
//# sourceMappingURL=chunk-RM7ZT3UU.js.map
|