@flamingo-stack/openframe-frontend-core 0.0.269 → 0.0.270-snapshot.20260615173546
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-3DYASQEL.js} +2 -2
- package/dist/{chunk-DATYABIL.js → chunk-56V4MC32.js} +2 -2
- package/dist/{chunk-QDA2XVFP.cjs → chunk-5CTV435G.cjs} +60 -24
- package/dist/chunk-5CTV435G.cjs.map +1 -0
- package/dist/{chunk-ALCUDWKJ.js → chunk-BCPLTDRW.js} +168 -132
- package/dist/chunk-BCPLTDRW.js.map +1 -0
- package/dist/{chunk-TZEHP5IW.cjs → chunk-FC6YVRUW.cjs} +11 -11
- package/dist/{chunk-TZEHP5IW.cjs.map → chunk-FC6YVRUW.cjs.map} +1 -1
- package/dist/{chunk-HQGGXT2T.js → chunk-J35EWU2W.js} +2 -2
- package/dist/{chunk-NM7J44WP.cjs → chunk-LELTRQZV.cjs} +30 -30
- package/dist/{chunk-NM7J44WP.cjs.map → chunk-LELTRQZV.cjs.map} +1 -1
- package/dist/{chunk-FEIRH7ER.cjs → chunk-YH74UZRG.cjs} +25 -25
- package/dist/{chunk-FEIRH7ER.cjs.map → chunk-YH74UZRG.cjs.map} +1 -1
- 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/status-filter-component.d.ts +6 -1
- package/dist/components/features/status-filter-component.d.ts.map +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/dist/types/marketing.d.ts +1 -1
- package/dist/types/marketing.d.ts.map +1 -1
- package/dist/types/video-processing.d.ts +2 -1
- package/dist/types/video-processing.d.ts.map +1 -1
- package/dist/utils/content-ref-groups.d.ts.map +1 -1
- package/dist/utils/index.cjs +2 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js +2 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/features/status-filter-component.tsx +9 -1
- package/src/components/features/video-source-selector.tsx +83 -18
- package/src/types/marketing.ts +1 -0
- package/src/types/video-processing.ts +2 -0
- package/src/utils/content-ref-groups.ts +1 -0
- package/dist/chunk-ALCUDWKJ.js.map +0 -1
- package/dist/chunk-QDA2XVFP.cjs.map +0 -1
- /package/dist/{chunk-TOQH27ZP.js.map → chunk-3DYASQEL.js.map} +0 -0
- /package/dist/{chunk-DATYABIL.js.map → chunk-56V4MC32.js.map} +0 -0
- /package/dist/{chunk-HQGGXT2T.js.map → chunk-J35EWU2W.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();
|
|
@@ -13704,7 +13704,8 @@ var CONTENT_REF_GROUPS = {
|
|
|
13704
13704
|
event: { label: "Events", order: 6, layout: "list", gridSize: "default" },
|
|
13705
13705
|
blog_post_existing: { label: "Blog Posts", order: 7, layout: "grid", gridSize: "default" },
|
|
13706
13706
|
customer_interview: { label: "Customer Interviews", order: 8, layout: "grid", gridSize: "default" },
|
|
13707
|
-
onboarding_guide: { label: "Onboarding Guides", order: 9, layout: "list", gridSize: "default" }
|
|
13707
|
+
onboarding_guide: { label: "Onboarding Guides", order: 9, layout: "list", gridSize: "default" },
|
|
13708
|
+
what_i_shipped: { label: "What I Shipped", order: 10, layout: "grid", gridSize: "default" }
|
|
13708
13709
|
};
|
|
13709
13710
|
function getContentRefLabel(type) {
|
|
13710
13711
|
return CONTENT_REF_GROUPS[type]?.label ?? null;
|
|
@@ -18287,7 +18288,8 @@ function StatusFilterComponent({
|
|
|
18287
18288
|
statusOptions,
|
|
18288
18289
|
showCount = false,
|
|
18289
18290
|
count = 0,
|
|
18290
|
-
className = ""
|
|
18291
|
+
className = "",
|
|
18292
|
+
disabledValues = []
|
|
18291
18293
|
}) {
|
|
18292
18294
|
const filteredOptions = statusOptions.filter((option) => option.value !== "all");
|
|
18293
18295
|
return /* @__PURE__ */ jsxs121("div", { className: `flex flex-wrap items-center gap-3 p-4 bg-ods-card border border-ods-border rounded-lg ${className}`, children: [
|
|
@@ -18302,6 +18304,7 @@ function StatusFilterComponent({
|
|
|
18302
18304
|
variant: selectedStatus === "all" ? "accent" : "outline",
|
|
18303
18305
|
size: "small-legacy",
|
|
18304
18306
|
onClick: () => onStatusChange("all"),
|
|
18307
|
+
disabled: disabledValues.includes("all"),
|
|
18305
18308
|
className: "text-h3",
|
|
18306
18309
|
children: "All"
|
|
18307
18310
|
}
|
|
@@ -18313,6 +18316,7 @@ function StatusFilterComponent({
|
|
|
18313
18316
|
variant: selectedStatus === option.value ? "accent" : "outline",
|
|
18314
18317
|
size: "small-legacy",
|
|
18315
18318
|
onClick: () => onStatusChange(option.value),
|
|
18319
|
+
disabled: disabledValues.includes(option.value),
|
|
18316
18320
|
className: "text-h3",
|
|
18317
18321
|
children: option.label
|
|
18318
18322
|
},
|
|
@@ -18507,8 +18511,8 @@ function TagsSelector({
|
|
|
18507
18511
|
|
|
18508
18512
|
// src/components/features/video-source-selector.tsx
|
|
18509
18513
|
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";
|
|
18514
|
+
import { useState as useState47, useCallback as useCallback14, useEffect as useEffect31 } from "react";
|
|
18515
|
+
import { Upload as Upload4, Sparkles as Sparkles3, X as X8, Video as Video5, Loader2 as Loader27 } from "lucide-react";
|
|
18512
18516
|
import { jsx as jsx158, jsxs as jsxs123 } from "react/jsx-runtime";
|
|
18513
18517
|
function VideoSourceSelector({
|
|
18514
18518
|
videoSourceType,
|
|
@@ -18527,6 +18531,7 @@ function VideoSourceSelector({
|
|
|
18527
18531
|
uploadEmptyText = 'No video uploaded yet. Click "Upload Video" to add one.',
|
|
18528
18532
|
disabled = false,
|
|
18529
18533
|
VideoPreviewComponent,
|
|
18534
|
+
resolveVideoUrl,
|
|
18530
18535
|
UploadProgressComponent,
|
|
18531
18536
|
title = "Video",
|
|
18532
18537
|
showTitle = true,
|
|
@@ -18668,31 +18673,62 @@ function VideoSourceSelector({
|
|
|
18668
18673
|
isAIGenerated
|
|
18669
18674
|
}
|
|
18670
18675
|
) : (
|
|
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
|
-
] })
|
|
18676
|
+
// Default simple preview (resolver-aware — see DefaultVideoPreview)
|
|
18677
|
+
/* @__PURE__ */ jsx158(
|
|
18678
|
+
DefaultVideoPreview,
|
|
18679
|
+
{
|
|
18680
|
+
videoUrl: mainVideoUrl,
|
|
18681
|
+
resolveVideoUrl,
|
|
18682
|
+
onDelete: handleDeleteVideo,
|
|
18683
|
+
disabled
|
|
18684
|
+
}
|
|
18685
|
+
)
|
|
18692
18686
|
) : /* @__PURE__ */ jsx158("p", { className: "text-sm text-ods-text-secondary italic", children: uploadEmptyText })
|
|
18693
18687
|
] })
|
|
18694
18688
|
] });
|
|
18695
18689
|
}
|
|
18690
|
+
function DefaultVideoPreview({ videoUrl, resolveVideoUrl, onDelete, disabled }) {
|
|
18691
|
+
const [resolvedUrl, setResolvedUrl] = useState47(
|
|
18692
|
+
resolveVideoUrl ? void 0 : videoUrl
|
|
18693
|
+
);
|
|
18694
|
+
useEffect31(() => {
|
|
18695
|
+
if (!resolveVideoUrl) {
|
|
18696
|
+
setResolvedUrl(videoUrl);
|
|
18697
|
+
return;
|
|
18698
|
+
}
|
|
18699
|
+
let active = true;
|
|
18700
|
+
setResolvedUrl(void 0);
|
|
18701
|
+
resolveVideoUrl(videoUrl).then((url) => {
|
|
18702
|
+
if (active) setResolvedUrl(url);
|
|
18703
|
+
}).catch(() => {
|
|
18704
|
+
if (active) setResolvedUrl(videoUrl);
|
|
18705
|
+
});
|
|
18706
|
+
return () => {
|
|
18707
|
+
active = false;
|
|
18708
|
+
};
|
|
18709
|
+
}, [videoUrl, resolveVideoUrl]);
|
|
18710
|
+
return /* @__PURE__ */ jsxs123("div", { className: "relative rounded-lg border border-ods-border overflow-hidden", children: [
|
|
18711
|
+
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(
|
|
18712
|
+
"video",
|
|
18713
|
+
{
|
|
18714
|
+
src: resolvedUrl,
|
|
18715
|
+
className: "w-full h-auto max-h-[300px] object-contain bg-black",
|
|
18716
|
+
controls: true
|
|
18717
|
+
}
|
|
18718
|
+
),
|
|
18719
|
+
/* @__PURE__ */ jsx158(
|
|
18720
|
+
"button",
|
|
18721
|
+
{
|
|
18722
|
+
type: "button",
|
|
18723
|
+
onClick: onDelete,
|
|
18724
|
+
"aria-label": "Delete video",
|
|
18725
|
+
className: "absolute top-2 right-2 p-1.5 bg-black/60 hover:bg-black/80 rounded-full transition-colors",
|
|
18726
|
+
disabled,
|
|
18727
|
+
children: /* @__PURE__ */ jsx158(X8, { className: "h-4 w-4 text-white" })
|
|
18728
|
+
}
|
|
18729
|
+
)
|
|
18730
|
+
] });
|
|
18731
|
+
}
|
|
18696
18732
|
|
|
18697
18733
|
// src/components/features/transcript-summary-editor.tsx
|
|
18698
18734
|
import { Sparkles as Sparkles4 } from "lucide-react";
|
|
@@ -18988,7 +19024,7 @@ var AIWarningsSection = ({
|
|
|
18988
19024
|
|
|
18989
19025
|
// src/components/features/ai-enrich/AIEnrichSection.tsx
|
|
18990
19026
|
init_button2();
|
|
18991
|
-
import { CheckCircle as CheckCircle2, AlertCircle as AlertCircle2, Loader2 as
|
|
19027
|
+
import { CheckCircle as CheckCircle2, AlertCircle as AlertCircle2, Loader2 as Loader28, X as X9 } from "lucide-react";
|
|
18992
19028
|
import { jsx as jsx163, jsxs as jsxs127 } from "react/jsx-runtime";
|
|
18993
19029
|
var AIEnrichSection = ({
|
|
18994
19030
|
onEnrich,
|
|
@@ -19100,7 +19136,7 @@ var AIEnrichSection = ({
|
|
|
19100
19136
|
size: "small-legacy",
|
|
19101
19137
|
onClick: onCancel,
|
|
19102
19138
|
disabled: isCancelling,
|
|
19103
|
-
leftIcon: isCancelling ? /* @__PURE__ */ jsx163(
|
|
19139
|
+
leftIcon: isCancelling ? /* @__PURE__ */ jsx163(Loader28, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx163(X9, { className: "h-4 w-4" }),
|
|
19104
19140
|
className: "!w-full",
|
|
19105
19141
|
children: isCancelling ? "Cancelling..." : "Cancel Processing"
|
|
19106
19142
|
}
|
|
@@ -19121,7 +19157,7 @@ var AIEnrichSection = ({
|
|
|
19121
19157
|
)) })
|
|
19122
19158
|
] }),
|
|
19123
19159
|
loading && statusMessage && /* @__PURE__ */ jsxs127("div", { className: "flex items-center gap-3 p-3 rounded-lg bg-ods-card-secondary", children: [
|
|
19124
|
-
/* @__PURE__ */ jsx163(
|
|
19160
|
+
/* @__PURE__ */ jsx163(Loader28, { className: "h-5 w-5 text-ods-accent animate-spin" }),
|
|
19125
19161
|
/* @__PURE__ */ jsx163("span", { className: "text-sm text-ods-text-primary font-['DM_Sans']", children: statusMessage })
|
|
19126
19162
|
] }),
|
|
19127
19163
|
hasResults && /* @__PURE__ */ jsxs127("div", { className: "space-y-4", children: [
|
|
@@ -20029,7 +20065,7 @@ function ViewToggle({
|
|
|
20029
20065
|
|
|
20030
20066
|
// src/components/features/policy-configuration-panel.tsx
|
|
20031
20067
|
init_cn();
|
|
20032
|
-
import { useRef as useRef25, useEffect as
|
|
20068
|
+
import { useRef as useRef25, useEffect as useEffect32, useState as useState49 } from "react";
|
|
20033
20069
|
import { ChevronDown as ChevronDown7 } from "lucide-react";
|
|
20034
20070
|
init_button2();
|
|
20035
20071
|
|
|
@@ -20212,7 +20248,7 @@ var PolicyRow = ({ policy, categoryId, editMode, onPermissionChange }) => {
|
|
|
20212
20248
|
var useAnimatedHeight = (isExpanded) => {
|
|
20213
20249
|
const [height, setHeight] = useState49(0);
|
|
20214
20250
|
const contentRef = useRef25(null);
|
|
20215
|
-
|
|
20251
|
+
useEffect32(() => {
|
|
20216
20252
|
if (contentRef.current) {
|
|
20217
20253
|
const contentHeight = contentRef.current.scrollHeight;
|
|
20218
20254
|
setHeight(isExpanded ? contentHeight : 0);
|
|
@@ -20369,7 +20405,7 @@ PolicyConfigurationPanel.displayName = "PolicyConfigurationPanel";
|
|
|
20369
20405
|
init_button2();
|
|
20370
20406
|
|
|
20371
20407
|
// src/components/ui/phone-input.tsx
|
|
20372
|
-
import { useCallback as useCallback15, useEffect as
|
|
20408
|
+
import { useCallback as useCallback15, useEffect as useEffect33, useMemo as useMemo12, useRef as useRef26, useState as useState50 } from "react";
|
|
20373
20409
|
import { jsx as jsx178, jsxs as jsxs139 } from "react/jsx-runtime";
|
|
20374
20410
|
function PhoneInput({
|
|
20375
20411
|
value,
|
|
@@ -20403,7 +20439,7 @@ function PhoneInput({
|
|
|
20403
20439
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
20404
20440
|
debounceRef.current = setTimeout(() => runValidation(phone), 300);
|
|
20405
20441
|
}, [runValidation]);
|
|
20406
|
-
|
|
20442
|
+
useEffect33(() => {
|
|
20407
20443
|
return () => {
|
|
20408
20444
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
20409
20445
|
};
|
|
@@ -20470,7 +20506,7 @@ function CountryOption({ country }) {
|
|
|
20470
20506
|
// src/components/features/waitlist-form.tsx
|
|
20471
20507
|
init_cn();
|
|
20472
20508
|
import { getCountries as getCountries2 } from "libphonenumber-js";
|
|
20473
|
-
import { useEffect as
|
|
20509
|
+
import { useEffect as useEffect34, useState as useState51 } from "react";
|
|
20474
20510
|
import { Fragment as Fragment22, jsx as jsx179, jsxs as jsxs140 } from "react/jsx-runtime";
|
|
20475
20511
|
function WaitlistForm({
|
|
20476
20512
|
id = "waitlist-form",
|
|
@@ -20500,12 +20536,12 @@ function WaitlistForm({
|
|
|
20500
20536
|
const [isPhoneInvalid, setIsPhoneInvalid] = useState51(false);
|
|
20501
20537
|
const [showConsentError, setShowConsentError] = useState51(false);
|
|
20502
20538
|
const isMailDomainGeneric = hasGenericEmailDomain(email);
|
|
20503
|
-
|
|
20539
|
+
useEffect34(() => {
|
|
20504
20540
|
if (defaultEmail) {
|
|
20505
20541
|
setEmail(defaultEmail);
|
|
20506
20542
|
}
|
|
20507
20543
|
}, [defaultEmail]);
|
|
20508
|
-
|
|
20544
|
+
useEffect34(() => {
|
|
20509
20545
|
setIsClient(true);
|
|
20510
20546
|
if (!geoApiUrl) return;
|
|
20511
20547
|
const supportedCountries = new Set(getCountries2());
|
|
@@ -20890,12 +20926,12 @@ function useOptionalNotifications() {
|
|
|
20890
20926
|
}
|
|
20891
20927
|
|
|
20892
20928
|
// src/components/features/notifications/notification-drawer.tsx
|
|
20893
|
-
import { useEffect as
|
|
20929
|
+
import { useEffect as useEffect37, useRef as useRef28 } from "react";
|
|
20894
20930
|
init_button();
|
|
20895
20931
|
init_cn();
|
|
20896
20932
|
|
|
20897
20933
|
// src/components/features/notifications/notification-tile.tsx
|
|
20898
|
-
import { useMemo as useMemo14, useEffect as
|
|
20934
|
+
import { useMemo as useMemo14, useEffect as useEffect36 } from "react";
|
|
20899
20935
|
init_button();
|
|
20900
20936
|
init_cn();
|
|
20901
20937
|
import { jsx as jsx181, jsxs as jsxs141 } from "react/jsx-runtime";
|
|
@@ -20912,7 +20948,7 @@ function NotificationTile({
|
|
|
20912
20948
|
const initialElapsed = useMemo14(() => Date.now() - createdAt, [createdAt]);
|
|
20913
20949
|
const isLive = !read && !settled && initialElapsed < liveDurationMs;
|
|
20914
20950
|
const counting = isLive && !paused;
|
|
20915
|
-
|
|
20951
|
+
useEffect36(() => {
|
|
20916
20952
|
if (!counting) return;
|
|
20917
20953
|
const remaining = Math.max(0, liveDurationMs - initialElapsed);
|
|
20918
20954
|
const timer = window.setTimeout(() => {
|
|
@@ -21102,7 +21138,7 @@ function DrawerScrollList({
|
|
|
21102
21138
|
const sentinelRef = useRef28(null);
|
|
21103
21139
|
const loadMoreRef = useRef28(loadMore);
|
|
21104
21140
|
loadMoreRef.current = loadMore;
|
|
21105
|
-
|
|
21141
|
+
useEffect37(() => {
|
|
21106
21142
|
if (!loadMore || !hasMore || isLoadingMore) return;
|
|
21107
21143
|
const sentinel = sentinelRef.current;
|
|
21108
21144
|
const root = scrollRef.current;
|
|
@@ -22430,7 +22466,7 @@ function SortableRow({
|
|
|
22430
22466
|
|
|
22431
22467
|
// src/components/navigation/header.tsx
|
|
22432
22468
|
init_next_link();
|
|
22433
|
-
import React78, { useEffect as
|
|
22469
|
+
import React78, { useEffect as useEffect40, useRef as useRef31, useState as useState56 } from "react";
|
|
22434
22470
|
init_button2();
|
|
22435
22471
|
import { Fragment as Fragment27, jsx as jsx191, jsxs as jsxs149 } from "react/jsx-runtime";
|
|
22436
22472
|
function Header2({ config, platform }) {
|
|
@@ -22439,7 +22475,7 @@ function Header2({ config, platform }) {
|
|
|
22439
22475
|
const [openDropdowns, setOpenDropdowns] = useState56({});
|
|
22440
22476
|
const dropdownRefs = useRef31({});
|
|
22441
22477
|
const triggerRefs = useRef31({});
|
|
22442
|
-
|
|
22478
|
+
useEffect40(() => {
|
|
22443
22479
|
const handleClickOutside = (event) => {
|
|
22444
22480
|
const target = event.target;
|
|
22445
22481
|
if (!target) return;
|
|
@@ -22468,14 +22504,14 @@ function Header2({ config, platform }) {
|
|
|
22468
22504
|
document.removeEventListener("keydown", handleEscapeKey);
|
|
22469
22505
|
};
|
|
22470
22506
|
}, [openDropdowns]);
|
|
22471
|
-
|
|
22507
|
+
useEffect40(() => {
|
|
22472
22508
|
return () => {
|
|
22473
22509
|
setOpenDropdowns({});
|
|
22474
22510
|
dropdownRefs.current = {};
|
|
22475
22511
|
triggerRefs.current = {};
|
|
22476
22512
|
};
|
|
22477
22513
|
}, []);
|
|
22478
|
-
|
|
22514
|
+
useEffect40(() => {
|
|
22479
22515
|
if (!config.autoHide) {
|
|
22480
22516
|
setShow(true);
|
|
22481
22517
|
return;
|
|
@@ -22698,7 +22734,7 @@ function Header2({ config, platform }) {
|
|
|
22698
22734
|
}
|
|
22699
22735
|
|
|
22700
22736
|
// src/components/navigation/client-only-header.tsx
|
|
22701
|
-
import { useState as useState57, useEffect as
|
|
22737
|
+
import { useState as useState57, useEffect as useEffect41 } from "react";
|
|
22702
22738
|
|
|
22703
22739
|
// src/components/navigation/header-skeleton.tsx
|
|
22704
22740
|
import { jsx as jsx192, jsxs as jsxs150 } from "react/jsx-runtime";
|
|
@@ -22747,7 +22783,7 @@ function HeaderSkeleton({ config }) {
|
|
|
22747
22783
|
import { jsx as jsx193 } from "react/jsx-runtime";
|
|
22748
22784
|
function ClientOnlyHeader({ config, skeleton }) {
|
|
22749
22785
|
const [isClient, setIsClient] = useState57(false);
|
|
22750
|
-
|
|
22786
|
+
useEffect41(() => {
|
|
22751
22787
|
setIsClient(true);
|
|
22752
22788
|
}, []);
|
|
22753
22789
|
if (!isClient) {
|
|
@@ -22757,13 +22793,13 @@ function ClientOnlyHeader({ config, skeleton }) {
|
|
|
22757
22793
|
}
|
|
22758
22794
|
|
|
22759
22795
|
// src/components/navigation/mobile-nav-panel.tsx
|
|
22760
|
-
import { useEffect as
|
|
22796
|
+
import { useEffect as useEffect42, useRef as useRef32 } from "react";
|
|
22761
22797
|
init_button2();
|
|
22762
22798
|
import { X as X10 } from "lucide-react";
|
|
22763
22799
|
import { Fragment as Fragment28, jsx as jsx194, jsxs as jsxs151 } from "react/jsx-runtime";
|
|
22764
22800
|
function MobileNavPanel({ isOpen, config }) {
|
|
22765
22801
|
const panelRef = useRef32(null);
|
|
22766
|
-
|
|
22802
|
+
useEffect42(() => {
|
|
22767
22803
|
if (isOpen) {
|
|
22768
22804
|
document.body.style.overflow = "hidden";
|
|
22769
22805
|
} else {
|
|
@@ -22773,7 +22809,7 @@ function MobileNavPanel({ isOpen, config }) {
|
|
|
22773
22809
|
document.body.style.overflow = "unset";
|
|
22774
22810
|
};
|
|
22775
22811
|
}, [isOpen]);
|
|
22776
|
-
|
|
22812
|
+
useEffect42(() => {
|
|
22777
22813
|
const handleKeyDown = (e) => {
|
|
22778
22814
|
if (e.key === "Escape" && isOpen) {
|
|
22779
22815
|
config.onClose?.();
|
|
@@ -22881,7 +22917,7 @@ function MobileNavPanel({ isOpen, config }) {
|
|
|
22881
22917
|
}
|
|
22882
22918
|
|
|
22883
22919
|
// src/components/navigation/sliding-sidebar.tsx
|
|
22884
|
-
import { useState as useState58, useEffect as
|
|
22920
|
+
import { useState as useState58, useEffect as useEffect43 } from "react";
|
|
22885
22921
|
import { motion as motion2, AnimatePresence } from "framer-motion";
|
|
22886
22922
|
init_button2();
|
|
22887
22923
|
import { Fragment as Fragment29, jsx as jsx195, jsxs as jsxs152 } from "react/jsx-runtime";
|
|
@@ -22889,7 +22925,7 @@ function SlidingSidebar({ config }) {
|
|
|
22889
22925
|
const [expandedItems, setExpandedItems] = useState58(/* @__PURE__ */ new Set());
|
|
22890
22926
|
const [mounted, setMounted] = useState58(false);
|
|
22891
22927
|
const headerHeight = useHeaderHeight();
|
|
22892
|
-
|
|
22928
|
+
useEffect43(() => {
|
|
22893
22929
|
setMounted(true);
|
|
22894
22930
|
}, []);
|
|
22895
22931
|
const toggleExpanded = (itemId) => {
|
|
@@ -23052,7 +23088,7 @@ function SlidingSidebar({ config }) {
|
|
|
23052
23088
|
}
|
|
23053
23089
|
|
|
23054
23090
|
// src/components/navigation/sticky-section-nav.tsx
|
|
23055
|
-
import { useEffect as
|
|
23091
|
+
import { useEffect as useEffect44, useState as useState59, useCallback as useCallback20, useRef as useRef33 } from "react";
|
|
23056
23092
|
import { jsx as jsx196, jsxs as jsxs153 } from "react/jsx-runtime";
|
|
23057
23093
|
function StickySectionNav({
|
|
23058
23094
|
sections,
|
|
@@ -23126,14 +23162,14 @@ function useSectionNavigation(sections, options) {
|
|
|
23126
23162
|
isScrollingFromClick.current = false;
|
|
23127
23163
|
}, 500);
|
|
23128
23164
|
}, [offset2]);
|
|
23129
|
-
|
|
23165
|
+
useEffect44(() => {
|
|
23130
23166
|
sections.forEach((section) => {
|
|
23131
23167
|
if (section.ref.current && !section.ref.current.id) {
|
|
23132
23168
|
section.ref.current.id = section.id;
|
|
23133
23169
|
}
|
|
23134
23170
|
});
|
|
23135
23171
|
}, [sections]);
|
|
23136
|
-
|
|
23172
|
+
useEffect44(() => {
|
|
23137
23173
|
const handleScroll = () => {
|
|
23138
23174
|
if (isScrollingFromClick.current) return;
|
|
23139
23175
|
const scrollPosition = window.scrollY + offset2 + 50;
|
|
@@ -23166,7 +23202,7 @@ function useSectionNavigation(sections, options) {
|
|
|
23166
23202
|
}
|
|
23167
23203
|
|
|
23168
23204
|
// src/components/navigation/navigation-sidebar.tsx
|
|
23169
|
-
import { useCallback as useCallback21, useEffect as
|
|
23205
|
+
import { useCallback as useCallback21, useEffect as useEffect45, useLayoutEffect as useLayoutEffect4, useMemo as useMemo19, useState as useState60 } from "react";
|
|
23170
23206
|
|
|
23171
23207
|
// src/components/navigation/navigation-sidebar-header.tsx
|
|
23172
23208
|
import { jsx as jsx197, jsxs as jsxs154 } from "react/jsx-runtime";
|
|
@@ -23325,7 +23361,7 @@ function NavigationSidebar({ config, disabled = false }) {
|
|
|
23325
23361
|
config.minimized ?? false
|
|
23326
23362
|
);
|
|
23327
23363
|
const [tabletMinimized, setTabletMinimized] = useState60(true);
|
|
23328
|
-
|
|
23364
|
+
useEffect45(() => {
|
|
23329
23365
|
if (isTablet) setTabletMinimized(true);
|
|
23330
23366
|
}, [isTablet]);
|
|
23331
23367
|
const minimized = isTablet ? tabletMinimized : desktopMinimized;
|
|
@@ -23343,7 +23379,7 @@ function NavigationSidebar({ config, disabled = false }) {
|
|
|
23343
23379
|
const closeOverlay = useCallback21(() => {
|
|
23344
23380
|
setTabletMinimized(true);
|
|
23345
23381
|
}, []);
|
|
23346
|
-
|
|
23382
|
+
useEffect45(() => {
|
|
23347
23383
|
if (!isOverlayOpen) return;
|
|
23348
23384
|
const handleKeyDown = (e) => {
|
|
23349
23385
|
if (e.key === "Escape") closeOverlay();
|
|
@@ -23842,7 +23878,7 @@ function NotificationsHeaderButton({
|
|
|
23842
23878
|
import { createContext as createContext7, Suspense, useCallback as useCallback23, useContext as useContext7, useState as useState61 } from "react";
|
|
23843
23879
|
|
|
23844
23880
|
// src/components/navigation/mobile-burger-menu.tsx
|
|
23845
|
-
import React84, { useCallback as useCallback22, useEffect as
|
|
23881
|
+
import React84, { useCallback as useCallback22, useEffect as useEffect46 } from "react";
|
|
23846
23882
|
import { Fragment as Fragment31, jsx as jsx206, jsxs as jsxs162 } from "react/jsx-runtime";
|
|
23847
23883
|
var HEADER_HEIGHT = 48;
|
|
23848
23884
|
var MobileBurgerMenu = React84.memo(function MobileBurgerMenu2({
|
|
@@ -23855,7 +23891,7 @@ var MobileBurgerMenu = React84.memo(function MobileBurgerMenu2({
|
|
|
23855
23891
|
onLogout,
|
|
23856
23892
|
disabled = false
|
|
23857
23893
|
}) {
|
|
23858
|
-
|
|
23894
|
+
useEffect46(() => {
|
|
23859
23895
|
if (isOpen) {
|
|
23860
23896
|
document.body.style.overflow = "hidden";
|
|
23861
23897
|
} else {
|
|
@@ -23865,7 +23901,7 @@ var MobileBurgerMenu = React84.memo(function MobileBurgerMenu2({
|
|
|
23865
23901
|
document.body.style.overflow = "unset";
|
|
23866
23902
|
};
|
|
23867
23903
|
}, [isOpen]);
|
|
23868
|
-
|
|
23904
|
+
useEffect46(() => {
|
|
23869
23905
|
const handleKeyDown = (e) => {
|
|
23870
23906
|
if (e.key === "Escape" && isOpen) {
|
|
23871
23907
|
onClose();
|
|
@@ -25590,7 +25626,7 @@ var ListLoader = (props) => /* @__PURE__ */ jsx224(ContentLoader, { ...props, va
|
|
|
25590
25626
|
|
|
25591
25627
|
// src/components/ui/table/table.tsx
|
|
25592
25628
|
init_cn();
|
|
25593
|
-
import { useEffect as
|
|
25629
|
+
import { useEffect as useEffect48, useRef as useRef37 } from "react";
|
|
25594
25630
|
init_pagination();
|
|
25595
25631
|
init_button2();
|
|
25596
25632
|
|
|
@@ -26344,7 +26380,7 @@ function Table({
|
|
|
26344
26380
|
const sentinelRef = useRef37(null);
|
|
26345
26381
|
const onLoadMoreRef = useRef37(infiniteScroll?.onLoadMore);
|
|
26346
26382
|
onLoadMoreRef.current = infiniteScroll?.onLoadMore;
|
|
26347
|
-
|
|
26383
|
+
useEffect48(() => {
|
|
26348
26384
|
if (!infiniteScroll?.hasNextPage || infiniteScroll.isFetchingNextPage) return;
|
|
26349
26385
|
const sentinel = sentinelRef.current;
|
|
26350
26386
|
if (!sentinel) return;
|
|
@@ -27429,7 +27465,7 @@ function DataTableBody({
|
|
|
27429
27465
|
}
|
|
27430
27466
|
|
|
27431
27467
|
// src/components/ui/data-table/data-table-infinite-footer.tsx
|
|
27432
|
-
import { useEffect as
|
|
27468
|
+
import { useEffect as useEffect49, useRef as useRef41 } from "react";
|
|
27433
27469
|
import { Fragment as Fragment39, jsx as jsx247, jsxs as jsxs198 } from "react/jsx-runtime";
|
|
27434
27470
|
function DataTableInfiniteFooter({
|
|
27435
27471
|
hasNextPage,
|
|
@@ -27441,7 +27477,7 @@ function DataTableInfiniteFooter({
|
|
|
27441
27477
|
const sentinelRef = useRef41(null);
|
|
27442
27478
|
const onLoadMoreRef = useRef41(onLoadMore);
|
|
27443
27479
|
onLoadMoreRef.current = onLoadMore;
|
|
27444
|
-
|
|
27480
|
+
useEffect49(() => {
|
|
27445
27481
|
if (!hasNextPage || isFetchingNextPage) return;
|
|
27446
27482
|
const sentinel = sentinelRef.current;
|
|
27447
27483
|
if (!sentinel) return;
|
|
@@ -27682,7 +27718,7 @@ function FilterList({
|
|
|
27682
27718
|
|
|
27683
27719
|
// src/components/ui/tag-search-input.tsx
|
|
27684
27720
|
import {
|
|
27685
|
-
useEffect as
|
|
27721
|
+
useEffect as useEffect50,
|
|
27686
27722
|
useRef as useRef42,
|
|
27687
27723
|
useState as useState66
|
|
27688
27724
|
} from "react";
|
|
@@ -27722,7 +27758,7 @@ function TagSearchInput({
|
|
|
27722
27758
|
const hiddenTagsRef = useRef42(null);
|
|
27723
27759
|
const hiddenTagsPopupRef = useRef42(null);
|
|
27724
27760
|
const [showHiddenTags, setShowHiddenTags] = useState66(false);
|
|
27725
|
-
|
|
27761
|
+
useEffect50(() => {
|
|
27726
27762
|
if (!showHiddenTags) return;
|
|
27727
27763
|
const handleClick = (e) => {
|
|
27728
27764
|
const target = e.target;
|
|
@@ -27877,9 +27913,9 @@ function TagSearchInput({
|
|
|
27877
27913
|
}
|
|
27878
27914
|
|
|
27879
27915
|
// src/components/ui/markdown-editor.tsx
|
|
27880
|
-
import { useRef as useRef43, useCallback as useCallback30, useState as useState67, useEffect as
|
|
27916
|
+
import { useRef as useRef43, useCallback as useCallback30, useState as useState67, useEffect as useEffect51 } from "react";
|
|
27881
27917
|
init_cn();
|
|
27882
|
-
import { Loader2 as
|
|
27918
|
+
import { Loader2 as Loader29, Upload as Upload8 } from "lucide-react";
|
|
27883
27919
|
import { jsx as jsx251, jsxs as jsxs202 } from "react/jsx-runtime";
|
|
27884
27920
|
var MDEditor = dynamic(() => import("@uiw/react-md-editor"), { ssr: false });
|
|
27885
27921
|
var MARKDOWN_EDITOR_STYLE_ID = "ods-markdown-editor-styles";
|
|
@@ -27908,7 +27944,7 @@ body .w-md-editor .w-md-editor-bar::after { content: '' !important; display: blo
|
|
|
27908
27944
|
body .w-md-editor .w-md-editor-bar:hover::after { border-color: var(--color-text-secondary) !important; }
|
|
27909
27945
|
`;
|
|
27910
27946
|
function MarkdownEditorStyles() {
|
|
27911
|
-
|
|
27947
|
+
useEffect51(() => {
|
|
27912
27948
|
if (document.getElementById(MARKDOWN_EDITOR_STYLE_ID)) return;
|
|
27913
27949
|
const style = document.createElement("style");
|
|
27914
27950
|
style.id = MARKDOWN_EDITOR_STYLE_ID;
|
|
@@ -27936,7 +27972,7 @@ function MarkdownEditor({
|
|
|
27936
27972
|
const [isUploading, setIsUploading] = useState67(false);
|
|
27937
27973
|
const [uploadProgress, setUploadProgress] = useState67("");
|
|
27938
27974
|
const [defaultExtraCommands, setDefaultExtraCommands] = useState67([]);
|
|
27939
|
-
|
|
27975
|
+
useEffect51(() => {
|
|
27940
27976
|
import("@uiw/react-md-editor").then((mod) => {
|
|
27941
27977
|
if (mod.commands?.getExtraCommands) {
|
|
27942
27978
|
setDefaultExtraCommands(mod.commands.getExtraCommands());
|
|
@@ -28019,7 +28055,7 @@ function MarkdownEditor({
|
|
|
28019
28055
|
name: "upload",
|
|
28020
28056
|
keyCommand: "upload",
|
|
28021
28057
|
buttonProps: { "aria-label": "Upload file", title: "Upload file" },
|
|
28022
|
-
icon: isUploading ? /* @__PURE__ */ jsx251(
|
|
28058
|
+
icon: isUploading ? /* @__PURE__ */ jsx251(Loader29, { className: "w-3 h-3 animate-spin" }) : /* @__PURE__ */ jsx251(Upload8, { className: "w-3 h-3" }),
|
|
28023
28059
|
execute: () => {
|
|
28024
28060
|
fileInputRef.current?.click();
|
|
28025
28061
|
}
|
|
@@ -28059,7 +28095,7 @@ function MarkdownEditor({
|
|
|
28059
28095
|
}
|
|
28060
28096
|
rafRef.current = requestAnimationFrame(scrollLoop);
|
|
28061
28097
|
}, []);
|
|
28062
|
-
|
|
28098
|
+
useEffect51(() => {
|
|
28063
28099
|
const wrapper = wrapperRef.current;
|
|
28064
28100
|
if (!wrapper) return;
|
|
28065
28101
|
const onMouseMove = (e) => {
|
|
@@ -28107,7 +28143,7 @@ function MarkdownEditor({
|
|
|
28107
28143
|
accept: "image/*,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.zip,.txt"
|
|
28108
28144
|
}
|
|
28109
28145
|
),
|
|
28110
|
-
!MDEditor && /* @__PURE__ */ jsx251("div", { className: "flex items-center justify-center h-64", children: /* @__PURE__ */ jsx251(
|
|
28146
|
+
!MDEditor && /* @__PURE__ */ jsx251("div", { className: "flex items-center justify-center h-64", children: /* @__PURE__ */ jsx251(Loader29, { className: "h-8 w-8 animate-spin" }) }),
|
|
28111
28147
|
MDEditor && /* @__PURE__ */ jsx251(
|
|
28112
28148
|
MDEditor,
|
|
28113
28149
|
{
|
|
@@ -28153,7 +28189,7 @@ function MarkdownEditor({
|
|
|
28153
28189
|
|
|
28154
28190
|
// src/components/ui/file-upload.tsx
|
|
28155
28191
|
import * as React96 from "react";
|
|
28156
|
-
import { Loader2 as
|
|
28192
|
+
import { Loader2 as Loader210, X as X11 } from "lucide-react";
|
|
28157
28193
|
init_cn();
|
|
28158
28194
|
import { jsx as jsx252, jsxs as jsxs203 } from "react/jsx-runtime";
|
|
28159
28195
|
function formatFileSize2(bytes) {
|
|
@@ -28406,7 +28442,7 @@ function FileUpload({
|
|
|
28406
28442
|
/* @__PURE__ */ jsxs203("div", { className: "flex items-center gap-2", children: [
|
|
28407
28443
|
/* @__PURE__ */ jsx252("span", { className: "text-heading-6 text-ods-text-secondary", children: formatFileSize2(entry.fileSize) }),
|
|
28408
28444
|
entry.status === "uploading" && /* @__PURE__ */ jsxs203("span", { className: "flex items-center gap-1 text-heading-6 text-ods-text-secondary", children: [
|
|
28409
|
-
/* @__PURE__ */ jsx252(
|
|
28445
|
+
/* @__PURE__ */ jsx252(Loader210, { className: "size-3 animate-spin" }),
|
|
28410
28446
|
"Uploading..."
|
|
28411
28447
|
] }),
|
|
28412
28448
|
entry.status === "error" && /* @__PURE__ */ jsx252("span", { className: "text-heading-6 text-[var(--ods-attention-red-error)]", children: entry.error || "Upload failed" })
|
|
@@ -28477,7 +28513,7 @@ function FileUpload({
|
|
|
28477
28513
|
|
|
28478
28514
|
// src/components/ui/image-uploader.tsx
|
|
28479
28515
|
import * as React97 from "react";
|
|
28480
|
-
import { Loader2 as
|
|
28516
|
+
import { Loader2 as Loader211 } from "lucide-react";
|
|
28481
28517
|
init_cn();
|
|
28482
28518
|
import { Fragment as Fragment41, jsx as jsx253, jsxs as jsxs204 } from "react/jsx-runtime";
|
|
28483
28519
|
var DEFAULT_MAX_SIZE = 25 * 1024 * 1024;
|
|
@@ -28641,8 +28677,8 @@ function ImageUploader({
|
|
|
28641
28677
|
}
|
|
28642
28678
|
)
|
|
28643
28679
|
] }),
|
|
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(
|
|
28680
|
+
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" }) })
|
|
28681
|
+
] }) : loading ? /* @__PURE__ */ jsx253(Loader211, { className: "size-8 animate-spin text-ods-accent" }) : /* @__PURE__ */ jsxs204(Fragment41, { children: [
|
|
28646
28682
|
/* @__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
28683
|
/* @__PURE__ */ jsxs204("div", { className: "flex w-full flex-col items-center text-center", children: [
|
|
28648
28684
|
/* @__PURE__ */ jsx253("p", { className: "text-h4 text-ods-text-primary", children: label }),
|
|
@@ -29748,7 +29784,7 @@ function ImageGalleryModal({
|
|
|
29748
29784
|
initialIndex = 0
|
|
29749
29785
|
}) {
|
|
29750
29786
|
const [selectedImageIndex, setSelectedImageIndex] = useState75(initialIndex);
|
|
29751
|
-
|
|
29787
|
+
useEffect55(() => {
|
|
29752
29788
|
if (isOpen) {
|
|
29753
29789
|
setSelectedImageIndex(initialIndex);
|
|
29754
29790
|
}
|
|
@@ -29763,7 +29799,7 @@ function ImageGalleryModal({
|
|
|
29763
29799
|
setSelectedImageIndex(selectedImageIndex + 1);
|
|
29764
29800
|
}
|
|
29765
29801
|
};
|
|
29766
|
-
|
|
29802
|
+
useEffect55(() => {
|
|
29767
29803
|
const handleKeyPress = (event) => {
|
|
29768
29804
|
if (!isOpen) return;
|
|
29769
29805
|
switch (event.key) {
|
|
@@ -33905,7 +33941,7 @@ function useChunkCatchup({
|
|
|
33905
33941
|
}
|
|
33906
33942
|
|
|
33907
33943
|
// src/components/chat/hooks/use-jetstream-dialog-subscription.ts
|
|
33908
|
-
import { useEffect as
|
|
33944
|
+
import { useEffect as useEffect56, useRef as useRef48, useState as useState78 } from "react";
|
|
33909
33945
|
var DEFAULT_INACTIVE_THRESHOLD_MS = 5 * 6e4;
|
|
33910
33946
|
var DEFAULT_STREAM_NAME = "CHAT_CHUNKS";
|
|
33911
33947
|
function useJetStreamDialogSubscription({
|
|
@@ -33932,49 +33968,49 @@ function useJetStreamDialogSubscription({
|
|
|
33932
33968
|
const subscriptionRef = useRef48(null);
|
|
33933
33969
|
const highestStreamSeqRef = useRef48(null);
|
|
33934
33970
|
const onEventRef = useRef48(onEvent);
|
|
33935
|
-
|
|
33971
|
+
useEffect56(() => {
|
|
33936
33972
|
onEventRef.current = onEvent;
|
|
33937
33973
|
}, [onEvent]);
|
|
33938
33974
|
const onConnectRef = useRef48(onConnect);
|
|
33939
|
-
|
|
33975
|
+
useEffect56(() => {
|
|
33940
33976
|
onConnectRef.current = onConnect;
|
|
33941
33977
|
}, [onConnect]);
|
|
33942
33978
|
const onDisconnectRef = useRef48(onDisconnect);
|
|
33943
|
-
|
|
33979
|
+
useEffect56(() => {
|
|
33944
33980
|
onDisconnectRef.current = onDisconnect;
|
|
33945
33981
|
}, [onDisconnect]);
|
|
33946
33982
|
const onSubscribedRef = useRef48(onSubscribed);
|
|
33947
|
-
|
|
33983
|
+
useEffect56(() => {
|
|
33948
33984
|
onSubscribedRef.current = onSubscribed;
|
|
33949
33985
|
}, [onSubscribed]);
|
|
33950
33986
|
const onBeforeReconnectRef = useRef48(onBeforeReconnect);
|
|
33951
|
-
|
|
33987
|
+
useEffect56(() => {
|
|
33952
33988
|
onBeforeReconnectRef.current = onBeforeReconnect;
|
|
33953
33989
|
}, [onBeforeReconnect]);
|
|
33954
33990
|
const getNatsWsUrlRef = useRef48(getNatsWsUrl);
|
|
33955
|
-
|
|
33991
|
+
useEffect56(() => {
|
|
33956
33992
|
getNatsWsUrlRef.current = getNatsWsUrl;
|
|
33957
33993
|
}, [getNatsWsUrl]);
|
|
33958
33994
|
const reconnectionBackoffRef = useRef48(reconnectionBackoff);
|
|
33959
|
-
|
|
33995
|
+
useEffect56(() => {
|
|
33960
33996
|
reconnectionBackoffRef.current = reconnectionBackoff;
|
|
33961
33997
|
}, [reconnectionBackoff]);
|
|
33962
33998
|
const optStartSeqRef = useRef48(optStartSeq);
|
|
33963
|
-
|
|
33999
|
+
useEffect56(() => {
|
|
33964
34000
|
optStartSeqRef.current = optStartSeq;
|
|
33965
34001
|
}, [optStartSeq]);
|
|
33966
34002
|
const inactiveThresholdRef = useRef48(inactiveThresholdMs);
|
|
33967
|
-
|
|
34003
|
+
useEffect56(() => {
|
|
33968
34004
|
inactiveThresholdRef.current = inactiveThresholdMs;
|
|
33969
34005
|
}, [inactiveThresholdMs]);
|
|
33970
34006
|
const hadConnectionBeforeRef = useRef48(false);
|
|
33971
34007
|
const clientConfigRef = useRef48(clientConfig);
|
|
33972
|
-
|
|
34008
|
+
useEffect56(() => {
|
|
33973
34009
|
clientConfigRef.current = clientConfig;
|
|
33974
34010
|
}, [clientConfig]);
|
|
33975
34011
|
const currentWsUrlRef = useRef48("");
|
|
33976
34012
|
const wsUrl = getNatsWsUrl();
|
|
33977
|
-
|
|
34013
|
+
useEffect56(() => {
|
|
33978
34014
|
if (!enabled || !wsUrl) {
|
|
33979
34015
|
if (currentWsUrlRef.current && clientRef.current) {
|
|
33980
34016
|
releaseClient(currentWsUrlRef.current);
|
|
@@ -34055,7 +34091,7 @@ function useJetStreamDialogSubscription({
|
|
|
34055
34091
|
}
|
|
34056
34092
|
};
|
|
34057
34093
|
}, [enabled, wsUrl]);
|
|
34058
|
-
|
|
34094
|
+
useEffect56(() => {
|
|
34059
34095
|
if (!enabled || !dialogId || !isConnected) {
|
|
34060
34096
|
if (subscriptionRef.current) {
|
|
34061
34097
|
try {
|
|
@@ -34138,7 +34174,7 @@ function useJetStreamDialogSubscription({
|
|
|
34138
34174
|
setIsSubscribed(false);
|
|
34139
34175
|
};
|
|
34140
34176
|
}, [enabled, dialogId, isConnected, streamName, topic, reconnectionCount]);
|
|
34141
|
-
|
|
34177
|
+
useEffect56(() => {
|
|
34142
34178
|
highestStreamSeqRef.current = null;
|
|
34143
34179
|
setCurrentStreamSeq(null);
|
|
34144
34180
|
}, [dialogId]);
|
|
@@ -34146,7 +34182,7 @@ function useJetStreamDialogSubscription({
|
|
|
34146
34182
|
}
|
|
34147
34183
|
|
|
34148
34184
|
// src/components/chat/hooks/use-nats-dialog-subscription.ts
|
|
34149
|
-
import { useEffect as
|
|
34185
|
+
import { useEffect as useEffect57, useRef as useRef49, useState as useState79 } from "react";
|
|
34150
34186
|
function useNatsDialogSubscription({
|
|
34151
34187
|
enabled,
|
|
34152
34188
|
dialogId,
|
|
@@ -34166,41 +34202,41 @@ function useNatsDialogSubscription({
|
|
|
34166
34202
|
const clientRef = useRef49(null);
|
|
34167
34203
|
const subscriptionRefs = useRef49(/* @__PURE__ */ new Map());
|
|
34168
34204
|
const onEventRef = useRef49(onEvent);
|
|
34169
|
-
|
|
34205
|
+
useEffect57(() => {
|
|
34170
34206
|
onEventRef.current = onEvent;
|
|
34171
34207
|
}, [onEvent]);
|
|
34172
34208
|
const onConnectRef = useRef49(onConnect);
|
|
34173
|
-
|
|
34209
|
+
useEffect57(() => {
|
|
34174
34210
|
onConnectRef.current = onConnect;
|
|
34175
34211
|
}, [onConnect]);
|
|
34176
34212
|
const onDisconnectRef = useRef49(onDisconnect);
|
|
34177
|
-
|
|
34213
|
+
useEffect57(() => {
|
|
34178
34214
|
onDisconnectRef.current = onDisconnect;
|
|
34179
34215
|
}, [onDisconnect]);
|
|
34180
34216
|
const onSubscribedRef = useRef49(onSubscribed);
|
|
34181
|
-
|
|
34217
|
+
useEffect57(() => {
|
|
34182
34218
|
onSubscribedRef.current = onSubscribed;
|
|
34183
34219
|
}, [onSubscribed]);
|
|
34184
34220
|
const onBeforeReconnectRef = useRef49(onBeforeReconnect);
|
|
34185
|
-
|
|
34221
|
+
useEffect57(() => {
|
|
34186
34222
|
onBeforeReconnectRef.current = onBeforeReconnect;
|
|
34187
34223
|
}, [onBeforeReconnect]);
|
|
34188
34224
|
const hadConnectionBeforeRef = useRef49(false);
|
|
34189
34225
|
const getNatsWsUrlRef = useRef49(getNatsWsUrl);
|
|
34190
|
-
|
|
34226
|
+
useEffect57(() => {
|
|
34191
34227
|
getNatsWsUrlRef.current = getNatsWsUrl;
|
|
34192
34228
|
}, [getNatsWsUrl]);
|
|
34193
34229
|
const reconnectionBackoffRef = useRef49(reconnectionBackoff);
|
|
34194
|
-
|
|
34230
|
+
useEffect57(() => {
|
|
34195
34231
|
reconnectionBackoffRef.current = reconnectionBackoff;
|
|
34196
34232
|
}, [reconnectionBackoff]);
|
|
34197
34233
|
const clientConfigRef = useRef49(clientConfig);
|
|
34198
|
-
|
|
34234
|
+
useEffect57(() => {
|
|
34199
34235
|
clientConfigRef.current = clientConfig;
|
|
34200
34236
|
}, [clientConfig]);
|
|
34201
34237
|
const currentWsUrlRef = useRef49("");
|
|
34202
34238
|
const wsUrl = getNatsWsUrl();
|
|
34203
|
-
|
|
34239
|
+
useEffect57(() => {
|
|
34204
34240
|
if (!enabled || !wsUrl) {
|
|
34205
34241
|
if (currentWsUrlRef.current && clientRef.current) {
|
|
34206
34242
|
releaseClient(currentWsUrlRef.current);
|
|
@@ -34284,12 +34320,12 @@ function useNatsDialogSubscription({
|
|
|
34284
34320
|
const topicsKey = topics.join(",");
|
|
34285
34321
|
const lastSubscribedDialogIdRef = useRef49(null);
|
|
34286
34322
|
const isConnectedRef = useRef49(isConnected);
|
|
34287
|
-
|
|
34323
|
+
useEffect57(() => {
|
|
34288
34324
|
isConnectedRef.current = isConnected;
|
|
34289
34325
|
}, [isConnected]);
|
|
34290
34326
|
const currentDialogIdRef = useRef49(null);
|
|
34291
34327
|
const abortControllerRef = useRef49(null);
|
|
34292
|
-
|
|
34328
|
+
useEffect57(() => {
|
|
34293
34329
|
currentDialogIdRef.current = dialogId;
|
|
34294
34330
|
if (!enabled || !dialogId) {
|
|
34295
34331
|
if (subscriptionRefs.current.size > 0) {
|
|
@@ -34370,7 +34406,7 @@ function useNatsDialogSubscription({
|
|
|
34370
34406
|
abortControllerRef.current = null;
|
|
34371
34407
|
};
|
|
34372
34408
|
}, [enabled, dialogId, topicsKey, topics]);
|
|
34373
|
-
|
|
34409
|
+
useEffect57(() => {
|
|
34374
34410
|
if (!enabled || !currentDialogIdRef.current || !isConnected) {
|
|
34375
34411
|
return;
|
|
34376
34412
|
}
|
|
@@ -34420,7 +34456,7 @@ function buildNatsWsUrl(apiBaseUrl, options) {
|
|
|
34420
34456
|
}
|
|
34421
34457
|
|
|
34422
34458
|
// src/components/chat/hooks/use-realtime-chunk-processor.ts
|
|
34423
|
-
import { useCallback as useCallback34, useRef as useRef50, useEffect as
|
|
34459
|
+
import { useCallback as useCallback34, useRef as useRef50, useEffect as useEffect58 } from "react";
|
|
34424
34460
|
|
|
34425
34461
|
// src/components/chat/utils/chunk-parser.ts
|
|
34426
34462
|
function normalizeToolCalls(raw) {
|
|
@@ -35064,7 +35100,7 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35064
35100
|
})
|
|
35065
35101
|
);
|
|
35066
35102
|
const hasInitializedWithData = useRef50(false);
|
|
35067
|
-
|
|
35103
|
+
useEffect58(() => {
|
|
35068
35104
|
if (initialState && !hasInitializedWithData.current) {
|
|
35069
35105
|
accumulatorRef.current.initializeWithState(initialState);
|
|
35070
35106
|
if (initialState.escalatedApprovals) {
|
|
@@ -35081,7 +35117,7 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35081
35117
|
const hasEverStreamedRef = useRef50(false);
|
|
35082
35118
|
const directModeFlagRef = useRef50(isDirectMode);
|
|
35083
35119
|
const sawDirectMessageRef = useRef50(false);
|
|
35084
|
-
|
|
35120
|
+
useEffect58(() => {
|
|
35085
35121
|
directModeFlagRef.current = isDirectMode;
|
|
35086
35122
|
}, [isDirectMode]);
|
|
35087
35123
|
const pendingEscalatedRef = useRef50(/* @__PURE__ */ new Map());
|
|
@@ -35338,7 +35374,7 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35338
35374
|
}
|
|
35339
35375
|
|
|
35340
35376
|
// src/components/chat/hooks/use-slash-commands.ts
|
|
35341
|
-
import { useEffect as
|
|
35377
|
+
import { useEffect as useEffect59, useState as useState80 } from "react";
|
|
35342
35378
|
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
|
35343
35379
|
async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
35344
35380
|
const url = new URL(commandsUrl, window.location.origin);
|
|
@@ -35351,7 +35387,7 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
|
35351
35387
|
function useSlashCommands(prefix, commandsUrl) {
|
|
35352
35388
|
const [commands, setCommands] = useState80([]);
|
|
35353
35389
|
const [loading, setLoading] = useState80(false);
|
|
35354
|
-
|
|
35390
|
+
useEffect59(() => {
|
|
35355
35391
|
if (prefix == null) {
|
|
35356
35392
|
setCommands([]);
|
|
35357
35393
|
return;
|
|
@@ -35639,7 +35675,7 @@ function useChatAttachments() {
|
|
|
35639
35675
|
}
|
|
35640
35676
|
|
|
35641
35677
|
// src/components/chat/hooks/use-chat-attachment-image-gallery.tsx
|
|
35642
|
-
import { useCallback as useCallback36, useEffect as
|
|
35678
|
+
import { useCallback as useCallback36, useEffect as useEffect60, useRef as useRef52, useState as useState82 } from "react";
|
|
35643
35679
|
import { jsx as jsx275 } from "react/jsx-runtime";
|
|
35644
35680
|
var CLOSED = { isOpen: false, images: [], initialIndex: 0 };
|
|
35645
35681
|
function useChatAttachmentImageGallery() {
|
|
@@ -35648,7 +35684,7 @@ function useChatAttachmentImageGallery() {
|
|
|
35648
35684
|
const panelRef = useRef52(null);
|
|
35649
35685
|
const [state, setState] = useState82(CLOSED);
|
|
35650
35686
|
const handleClose = useCallback36(() => setState(CLOSED), []);
|
|
35651
|
-
|
|
35687
|
+
useEffect60(() => {
|
|
35652
35688
|
const root = panelRef.current;
|
|
35653
35689
|
if (!root) return;
|
|
35654
35690
|
const onClick = (ev) => {
|
|
@@ -35694,7 +35730,7 @@ function absolutize(prefix) {
|
|
|
35694
35730
|
}
|
|
35695
35731
|
|
|
35696
35732
|
// src/components/chat/hooks/use-chat-identity.ts
|
|
35697
|
-
import { createContext as createContext10, createElement, useContext as useContext10, useEffect as
|
|
35733
|
+
import { createContext as createContext10, createElement, useContext as useContext10, useEffect as useEffect61, useState as useState83 } from "react";
|
|
35698
35734
|
var ANON_DEFAULTS = {
|
|
35699
35735
|
authTier: "anon",
|
|
35700
35736
|
source: null,
|
|
@@ -35707,7 +35743,7 @@ function useResolveChatIdentity(enabled) {
|
|
|
35707
35743
|
const proxyEmail = getEmbedProxyAuth()?.email ?? null;
|
|
35708
35744
|
const [data, setData] = useState83(ANON_DEFAULTS);
|
|
35709
35745
|
const [isLoading, setIsLoading] = useState83(enabled);
|
|
35710
|
-
|
|
35746
|
+
useEffect61(() => {
|
|
35711
35747
|
if (!enabled) return;
|
|
35712
35748
|
let cancelled = false;
|
|
35713
35749
|
const ctrl = new AbortController();
|
|
@@ -35746,11 +35782,11 @@ function useChatIdentity() {
|
|
|
35746
35782
|
}
|
|
35747
35783
|
|
|
35748
35784
|
// src/components/chat/hooks/use-close-on-navigation.ts
|
|
35749
|
-
import { useEffect as
|
|
35785
|
+
import { useEffect as useEffect62, useRef as useRef53 } from "react";
|
|
35750
35786
|
function useCloseOnNavigation(close, pathname) {
|
|
35751
35787
|
const prevPathnameRef = useRef53(null);
|
|
35752
35788
|
const initializedRef = useRef53(false);
|
|
35753
|
-
|
|
35789
|
+
useEffect62(() => {
|
|
35754
35790
|
if (!initializedRef.current) {
|
|
35755
35791
|
initializedRef.current = true;
|
|
35756
35792
|
prevPathnameRef.current = pathname;
|
|
@@ -35764,7 +35800,7 @@ function useCloseOnNavigation(close, pathname) {
|
|
|
35764
35800
|
}
|
|
35765
35801
|
|
|
35766
35802
|
// src/components/chat/hooks/use-chat.ts
|
|
35767
|
-
import { useState as useState85, useCallback as useCallback38, useEffect as
|
|
35803
|
+
import { useState as useState85, useCallback as useCallback38, useEffect as useEffect63, useRef as useRef55 } from "react";
|
|
35768
35804
|
|
|
35769
35805
|
// src/components/chat/hooks/use-sse.ts
|
|
35770
35806
|
import { useState as useState84, useCallback as useCallback37, useRef as useRef54 } from "react";
|
|
@@ -35842,7 +35878,7 @@ function useChat({
|
|
|
35842
35878
|
const currentAssistantSegmentsRef = useRef55([]);
|
|
35843
35879
|
const onMessagesChangeRef = useRef55(onMessagesChange);
|
|
35844
35880
|
onMessagesChangeRef.current = onMessagesChange;
|
|
35845
|
-
|
|
35881
|
+
useEffect63(() => {
|
|
35846
35882
|
onMessagesChangeRef.current?.(messages);
|
|
35847
35883
|
}, [messages]);
|
|
35848
35884
|
const {
|
|
@@ -36131,7 +36167,7 @@ function useChat({
|
|
|
36131
36167
|
}
|
|
36132
36168
|
|
|
36133
36169
|
// src/components/chat/hooks/use-sse-chat-adapter.ts
|
|
36134
|
-
import { useState as useState86, useEffect as
|
|
36170
|
+
import { useState as useState86, useEffect as useEffect64, useCallback as useCallback39, useMemo as useMemo26, useRef as useRef56 } from "react";
|
|
36135
36171
|
function createEmptyTurnMeta() {
|
|
36136
36172
|
return {
|
|
36137
36173
|
provider: null,
|
|
@@ -36655,7 +36691,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
36655
36691
|
}
|
|
36656
36692
|
}
|
|
36657
36693
|
}, [chatClearMessages, source, bumpMetaTick]);
|
|
36658
|
-
|
|
36694
|
+
useEffect64(() => {
|
|
36659
36695
|
if (!isTyping && !isStreaming && streamingPhase !== "idle") {
|
|
36660
36696
|
setStreamingPhase("idle");
|
|
36661
36697
|
}
|
|
@@ -36737,7 +36773,7 @@ var noopRejectRequest = async (_id, _reason) => {
|
|
|
36737
36773
|
// src/components/chat/hooks/use-nats-chat-adapter.ts
|
|
36738
36774
|
import {
|
|
36739
36775
|
useCallback as useCallback40,
|
|
36740
|
-
useEffect as
|
|
36776
|
+
useEffect as useEffect65,
|
|
36741
36777
|
useMemo as useMemo27,
|
|
36742
36778
|
useRef as useRef57,
|
|
36743
36779
|
useState as useState87
|
|
@@ -37380,7 +37416,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
37380
37416
|
]
|
|
37381
37417
|
);
|
|
37382
37418
|
const prevDialogIdRef = useRef57(void 0);
|
|
37383
|
-
|
|
37419
|
+
useEffect65(() => {
|
|
37384
37420
|
if (prevDialogIdRef.current === dialogId) return;
|
|
37385
37421
|
prevDialogIdRef.current = dialogId;
|
|
37386
37422
|
historyLoadSeqRef.current += 1;
|
|
@@ -37394,7 +37430,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
37394
37430
|
if (!active || !dialogId) return;
|
|
37395
37431
|
void loadDialogHistory(dialogId);
|
|
37396
37432
|
}, [active, dialogId, loadDialogHistory, resetAccumulator]);
|
|
37397
|
-
|
|
37433
|
+
useEffect65(() => {
|
|
37398
37434
|
if (!active || !dialogId) return;
|
|
37399
37435
|
resetChunkTracking();
|
|
37400
37436
|
startInitialBuffering();
|
|
@@ -37416,7 +37452,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
37416
37452
|
setConnectionState("connected");
|
|
37417
37453
|
}
|
|
37418
37454
|
});
|
|
37419
|
-
|
|
37455
|
+
useEffect65(() => {
|
|
37420
37456
|
if (!active || !dialogId) {
|
|
37421
37457
|
setConnectionState("connected");
|
|
37422
37458
|
return;
|
|
@@ -37455,7 +37491,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
37455
37491
|
const reloadDialogs = useCallback40(() => {
|
|
37456
37492
|
void loadDialogsPage();
|
|
37457
37493
|
}, [loadDialogsPage]);
|
|
37458
|
-
|
|
37494
|
+
useEffect65(() => {
|
|
37459
37495
|
if (!fetchDialogs) return;
|
|
37460
37496
|
if (!active) return;
|
|
37461
37497
|
if (initialDialogsLoadedRef.current) return;
|
|
@@ -38021,7 +38057,7 @@ function chatChipClass({ tone, density = "chip", extra }) {
|
|
|
38021
38057
|
}
|
|
38022
38058
|
|
|
38023
38059
|
// src/components/chat/embeddable-chat.tsx
|
|
38024
|
-
import { useCallback as useCallback43, useEffect as
|
|
38060
|
+
import { useCallback as useCallback43, useEffect as useEffect66, useMemo as useMemo30, useRef as useRef59, useState as useState89 } from "react";
|
|
38025
38061
|
import * as DialogPrimitive4 from "@radix-ui/react-dialog";
|
|
38026
38062
|
import { usePreventScroll } from "@react-aria/overlays";
|
|
38027
38063
|
import { isIOS } from "@react-aria/utils";
|
|
@@ -38528,7 +38564,7 @@ function EmbeddableChatInner({
|
|
|
38528
38564
|
const commandsUrl = runtime.endpoints.commandsUrl;
|
|
38529
38565
|
const { attachmentsEnabled, user: identityUser } = useChatIdentity();
|
|
38530
38566
|
const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
|
|
38531
|
-
|
|
38567
|
+
useEffect66(() => {
|
|
38532
38568
|
if (process.env.NODE_ENV !== "production") {
|
|
38533
38569
|
const hasOpen = open !== void 0;
|
|
38534
38570
|
const hasHandler = onOpenChange !== void 0;
|
|
@@ -38550,7 +38586,7 @@ function EmbeddableChatInner({
|
|
|
38550
38586
|
});
|
|
38551
38587
|
usePreventScroll({ isDisabled: !isOpen || shellLess });
|
|
38552
38588
|
const navigatingAwayRef = useRef59(false);
|
|
38553
|
-
|
|
38589
|
+
useEffect66(() => {
|
|
38554
38590
|
if (!isOpen) return;
|
|
38555
38591
|
if (shellLess) return;
|
|
38556
38592
|
if (typeof window === "undefined") return;
|
|
@@ -38787,7 +38823,7 @@ function EmbeddableChatInner({
|
|
|
38787
38823
|
});
|
|
38788
38824
|
const handleOpen = useCallback43(() => setIsOpen(true), [setIsOpen]);
|
|
38789
38825
|
useCloseOnNavigation(handleNavigationClose, null);
|
|
38790
|
-
|
|
38826
|
+
useEffect66(() => {
|
|
38791
38827
|
const handler = (e) => {
|
|
38792
38828
|
const detail = e.detail;
|
|
38793
38829
|
if (!detail || detail.source !== source) return;
|
|
@@ -39815,4 +39851,4 @@ export {
|
|
|
39815
39851
|
LogsList,
|
|
39816
39852
|
assets
|
|
39817
39853
|
};
|
|
39818
|
-
//# sourceMappingURL=chunk-
|
|
39854
|
+
//# sourceMappingURL=chunk-BCPLTDRW.js.map
|