@flamingo-stack/openframe-frontend-core 0.0.550 → 0.0.551-snapshot.20260817110133
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/chat-protocol/events.d.ts +2 -0
- package/dist/chat-protocol/events.d.ts.map +1 -1
- package/dist/chat-protocol/index.cjs +1 -0
- package/dist/chat-protocol/index.cjs.map +1 -1
- package/dist/chat-protocol/index.js +1 -0
- package/dist/chat-protocol/index.js.map +1 -1
- package/dist/chat-protocol/nats-decoder.d.ts.map +1 -1
- package/dist/{chunk-7YDLMRVR.js → chunk-4DD3223G.js} +6 -6
- package/dist/{chunk-A4L6BEB7.cjs → chunk-4XG7TG7B.cjs} +7 -7
- package/dist/{chunk-A4L6BEB7.cjs.map → chunk-4XG7TG7B.cjs.map} +1 -1
- package/dist/{chunk-CN2VQPLX.cjs → chunk-6J6Q5QEM.cjs} +4 -4
- package/dist/{chunk-CN2VQPLX.cjs.map → chunk-6J6Q5QEM.cjs.map} +1 -1
- package/dist/{chunk-EVCAPL5A.cjs → chunk-6MHMEF5W.cjs} +39 -39
- package/dist/{chunk-EVCAPL5A.cjs.map → chunk-6MHMEF5W.cjs.map} +1 -1
- package/dist/{chunk-WTCXDYK7.js → chunk-6XOJTTWY.js} +2 -2
- package/dist/{chunk-M3GOE7OF.js → chunk-7MPOW46J.js} +2 -2
- package/dist/{chunk-R7RCGLII.js → chunk-7TRIUG7Q.js} +5 -5
- package/dist/{chunk-XO4YU5GN.js → chunk-BFOXIIM4.js} +2 -2
- package/dist/{chunk-HWYUSB5A.js → chunk-CMDPARDV.js} +2 -2
- package/dist/{chunk-HCGS2AAS.cjs → chunk-DOPZ5LCH.cjs} +14 -14
- package/dist/{chunk-HCGS2AAS.cjs.map → chunk-DOPZ5LCH.cjs.map} +1 -1
- package/dist/{chunk-ISLQTWWW.cjs → chunk-HK5YRHEN.cjs} +9 -9
- package/dist/{chunk-ISLQTWWW.cjs.map → chunk-HK5YRHEN.cjs.map} +1 -1
- package/dist/{chunk-IRV6TOEZ.js → chunk-KSGQG6WU.js} +2 -2
- package/dist/{chunk-GXNSFW3N.cjs → chunk-MVE2YQVG.cjs} +20 -20
- package/dist/{chunk-GXNSFW3N.cjs.map → chunk-MVE2YQVG.cjs.map} +1 -1
- package/dist/{chunk-MGRCFN2K.cjs → chunk-OVQ3O66O.cjs} +5 -5
- package/dist/{chunk-MGRCFN2K.cjs.map → chunk-OVQ3O66O.cjs.map} +1 -1
- package/dist/{chunk-6M6EZK4R.cjs → chunk-PVPXI5V6.cjs} +31 -31
- package/dist/{chunk-6M6EZK4R.cjs.map → chunk-PVPXI5V6.cjs.map} +1 -1
- package/dist/{chunk-5VGIDZAM.js → chunk-RJEP74Z4.js} +2 -2
- package/dist/{chunk-6RTSYEBE.js → chunk-RJSDYOFD.js} +2 -2
- package/dist/{chunk-LLBU7RI5.cjs → chunk-RMTTW7LG.cjs} +27 -27
- package/dist/{chunk-LLBU7RI5.cjs.map → chunk-RMTTW7LG.cjs.map} +1 -1
- package/dist/{chunk-H7ORFGB6.cjs → chunk-RMWLUKTC.cjs} +11 -11
- package/dist/{chunk-H7ORFGB6.cjs.map → chunk-RMWLUKTC.cjs.map} +1 -1
- package/dist/{chunk-5KAQ2JUQ.js → chunk-SIXNMDYY.js} +2 -2
- package/dist/{chunk-UYQFUEIK.cjs → chunk-SXXIV7IL.cjs} +86 -86
- package/dist/{chunk-UYQFUEIK.cjs.map → chunk-SXXIV7IL.cjs.map} +1 -1
- package/dist/{chunk-JS7FDV27.js → chunk-TI75367M.js} +248 -211
- package/dist/chunk-TI75367M.js.map +1 -0
- package/dist/{chunk-2I6KJN7F.js → chunk-WXDDPK7T.js} +4 -4
- package/dist/{chunk-LDS54O26.cjs → chunk-X4RCWYYF.cjs} +839 -802
- package/dist/chunk-X4RCWYYF.cjs.map +1 -0
- package/dist/{chunk-ISCWUJ72.cjs → chunk-XEOZB5DX.cjs} +3 -3
- package/dist/{chunk-ISCWUJ72.cjs.map → chunk-XEOZB5DX.cjs.map} +1 -1
- package/dist/{chunk-4A5RDQ6L.cjs → chunk-Y64725GI.cjs} +61 -61
- package/dist/{chunk-4A5RDQ6L.cjs.map → chunk-Y64725GI.cjs.map} +1 -1
- package/dist/{chunk-7T2HI44L.js → chunk-Y6PD76R6.js} +2 -2
- package/dist/{chunk-U7UPMD3Z.js → chunk-Z5UK7SKC.js} +4 -4
- package/dist/components/case-studies/index.cjs +8 -8
- package/dist/components/case-studies/index.js +2 -2
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/chat/stream/chat-stream-reducer.d.ts.map +1 -1
- package/dist/components/chat/ticket-event-message.d.ts +4 -3
- package/dist/components/chat/ticket-event-message.d.ts.map +1 -1
- package/dist/components/chat/types/message.types.d.ts +6 -0
- package/dist/components/chat/types/message.types.d.ts.map +1 -1
- package/dist/components/chat/utils/message-segment-accumulator.d.ts.map +1 -1
- package/dist/components/chat/utils/process-historical-messages.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/docs/index.cjs +5 -5
- package/dist/components/docs/index.js +4 -4
- package/dist/components/embeds/index.cjs +3 -3
- package/dist/components/embeds/index.js +2 -2
- package/dist/components/faq/index.cjs +3 -3
- package/dist/components/faq/index.js +2 -2
- package/dist/components/features/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/features/use-ios-native-video-fullscreen.d.ts +4 -0
- package/dist/components/features/use-ios-native-video-fullscreen.d.ts.map +1 -0
- package/dist/components/features/video.d.ts.map +1 -1
- package/dist/components/help-center-pages/index.cjs +22 -22
- package/dist/components/help-center-pages/index.js +13 -13
- package/dist/components/index.cjs +131 -131
- package/dist/components/index.js +11 -11
- package/dist/components/meeting-scheduler/index.cjs +28 -28
- package/dist/components/meeting-scheduler/index.js +3 -3
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/onboarding-guides/index.cjs +5 -5
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +6 -6
- package/dist/components/tickets/index.js +5 -5
- 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/utils/index.cjs.map +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/chat-protocol/__tests__/__snapshots__/nats-decoder-golden.test.ts.snap +25 -0
- package/src/chat-protocol/__tests__/nats-decoder-golden.test.ts +17 -0
- package/src/chat-protocol/events.ts +2 -0
- package/src/chat-protocol/nats-decoder.ts +4 -0
- package/src/components/chat/__tests__/ticket-event.test.ts +19 -0
- package/src/components/chat/stream/chat-stream-reducer.ts +1 -0
- package/src/components/chat/ticket-event-message.tsx +18 -8
- package/src/components/chat/types/message.types.ts +6 -0
- package/src/components/chat/utils/message-segment-accumulator.ts +2 -1
- package/src/components/chat/utils/process-historical-messages.ts +5 -0
- package/src/components/features/__tests__/use-ios-native-video-fullscreen.test.tsx +116 -0
- package/src/components/features/use-ios-native-video-fullscreen.ts +89 -0
- package/src/components/features/video.tsx +5 -0
- package/src/stories/TicketEventMessage.stories.tsx +12 -4
- package/dist/chunk-JS7FDV27.js.map +0 -1
- package/dist/chunk-LDS54O26.cjs.map +0 -1
- /package/dist/{chunk-7YDLMRVR.js.map → chunk-4DD3223G.js.map} +0 -0
- /package/dist/{chunk-WTCXDYK7.js.map → chunk-6XOJTTWY.js.map} +0 -0
- /package/dist/{chunk-M3GOE7OF.js.map → chunk-7MPOW46J.js.map} +0 -0
- /package/dist/{chunk-R7RCGLII.js.map → chunk-7TRIUG7Q.js.map} +0 -0
- /package/dist/{chunk-XO4YU5GN.js.map → chunk-BFOXIIM4.js.map} +0 -0
- /package/dist/{chunk-HWYUSB5A.js.map → chunk-CMDPARDV.js.map} +0 -0
- /package/dist/{chunk-IRV6TOEZ.js.map → chunk-KSGQG6WU.js.map} +0 -0
- /package/dist/{chunk-5VGIDZAM.js.map → chunk-RJEP74Z4.js.map} +0 -0
- /package/dist/{chunk-6RTSYEBE.js.map → chunk-RJSDYOFD.js.map} +0 -0
- /package/dist/{chunk-5KAQ2JUQ.js.map → chunk-SIXNMDYY.js.map} +0 -0
- /package/dist/{chunk-2I6KJN7F.js.map → chunk-WXDDPK7T.js.map} +0 -0
- /package/dist/{chunk-7T2HI44L.js.map → chunk-Y6PD76R6.js.map} +0 -0
- /package/dist/{chunk-U7UPMD3Z.js.map → chunk-Z5UK7SKC.js.map} +0 -0
|
@@ -1438,9 +1438,13 @@ function isAiActor(actorType) {
|
|
|
1438
1438
|
function humanizeKind(kind) {
|
|
1439
1439
|
return kind.split(/[_\s-]+/).filter(Boolean).map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" ");
|
|
1440
1440
|
}
|
|
1441
|
+
var REOPEN_TARGET_COPY = {
|
|
1442
|
+
AI_ASSISTANCE: "The AI assistant will continue helping you in this conversation.",
|
|
1443
|
+
TECH_REQUIRED: "A technician will reply when available."
|
|
1444
|
+
};
|
|
1441
1445
|
var TicketEventMessage = forwardRef6(
|
|
1442
1446
|
({ data, timestamp, ...props }, ref) => {
|
|
1443
|
-
const { kind, actorName, actorType, reason } = data;
|
|
1447
|
+
const { kind, actorName, actorType, reason, targetStatusKind } = data;
|
|
1444
1448
|
const resolved = kind === TICKET_EVENT_KIND.RESOLVED;
|
|
1445
1449
|
const reopened = kind === TICKET_EVENT_KIND.REOPENED;
|
|
1446
1450
|
const title = resolved ? "Ticket Resolved" : reopened ? "Ticket Reopened" : humanizeKind(kind);
|
|
@@ -1448,7 +1452,7 @@ var TicketEventMessage = forwardRef6(
|
|
|
1448
1452
|
if (resolved) {
|
|
1449
1453
|
body = actorName ? `Resolved by ${actorName}.` : "The ticket has been resolved.";
|
|
1450
1454
|
} else if (reopened) {
|
|
1451
|
-
body = reason ? `Reason: ${reason}` : isAiActor(actorType) ? `${actorName || "Fae"} will continue assisting in this conversation.` : "A technician will reply when available.";
|
|
1455
|
+
body = (reason ? `Reason: ${reason}` : void 0) ?? (targetStatusKind ? REOPEN_TARGET_COPY[targetStatusKind] : void 0) ?? (isAiActor(actorType) ? `${actorName || "Fae"} will continue assisting in this conversation.` : "A technician will reply when available.");
|
|
1452
1456
|
} else {
|
|
1453
1457
|
body = reason || (actorName ? `By ${actorName}.` : void 0);
|
|
1454
1458
|
}
|
|
@@ -13611,7 +13615,7 @@ var TabsContent = React37.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
13611
13615
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
13612
13616
|
|
|
13613
13617
|
// src/components/features/video.tsx
|
|
13614
|
-
import { useCallback as useCallback13, useEffect as
|
|
13618
|
+
import { useCallback as useCallback13, useEffect as useEffect25, useImperativeHandle as useImperativeHandle3, useMemo as useMemo19, useRef as useRef20, useState as useState29 } from "react";
|
|
13615
13619
|
import MuxPlayer from "@mux/mux-player-react";
|
|
13616
13620
|
|
|
13617
13621
|
// src/components/features/video-center-badge.tsx
|
|
@@ -13666,8 +13670,36 @@ function fetchPriorityProp(priority) {
|
|
|
13666
13670
|
return USE_CAMEL_CASE_FETCH_PRIORITY ? { fetchPriority: value } : { fetchpriority: value };
|
|
13667
13671
|
}
|
|
13668
13672
|
|
|
13669
|
-
// src/components/features/use-video-
|
|
13673
|
+
// src/components/features/use-ios-native-video-fullscreen.ts
|
|
13670
13674
|
import { useEffect as useEffect23 } from "react";
|
|
13675
|
+
var ENTER_FULLSCREEN_REQUEST = "mediaenterfullscreenrequest";
|
|
13676
|
+
function isIosAppShell() {
|
|
13677
|
+
const capacitor = globalThis.Capacitor;
|
|
13678
|
+
return capacitor?.isNativePlatform?.() === true && capacitor.getPlatform?.() === "ios";
|
|
13679
|
+
}
|
|
13680
|
+
function nativeVideoElement(player) {
|
|
13681
|
+
const media = player.media;
|
|
13682
|
+
const element = media?.nativeEl ?? media;
|
|
13683
|
+
return element instanceof HTMLVideoElement ? element : null;
|
|
13684
|
+
}
|
|
13685
|
+
function useIosNativeVideoFullscreen(playerRef) {
|
|
13686
|
+
useEffect23(() => {
|
|
13687
|
+
if (!isIosAppShell()) return;
|
|
13688
|
+
const player = playerRef.current;
|
|
13689
|
+
if (!(player instanceof EventTarget)) return;
|
|
13690
|
+
const takeOver = (event) => {
|
|
13691
|
+
const video = nativeVideoElement(player);
|
|
13692
|
+
if (!video?.webkitSupportsFullscreen || typeof video.webkitEnterFullscreen !== "function") return;
|
|
13693
|
+
event.stopImmediatePropagation();
|
|
13694
|
+
video.webkitEnterFullscreen();
|
|
13695
|
+
};
|
|
13696
|
+
player.addEventListener(ENTER_FULLSCREEN_REQUEST, takeOver, true);
|
|
13697
|
+
return () => player.removeEventListener(ENTER_FULLSCREEN_REQUEST, takeOver, true);
|
|
13698
|
+
}, [playerRef]);
|
|
13699
|
+
}
|
|
13700
|
+
|
|
13701
|
+
// src/components/features/use-video-warmup.ts
|
|
13702
|
+
import { useEffect as useEffect24 } from "react";
|
|
13671
13703
|
import ReactDOM from "react-dom";
|
|
13672
13704
|
|
|
13673
13705
|
// src/components/features/mux-origins.ts
|
|
@@ -13719,7 +13751,7 @@ function useVideoWarmup({
|
|
|
13719
13751
|
const resolvedOrigin = supabaseStorageOrigin ?? runtime?.endpoints.supabaseStorageOrigin;
|
|
13720
13752
|
useVideoOriginPreconnect({ supabaseStorageOrigin: resolvedOrigin });
|
|
13721
13753
|
const { ref, isNear } = useNearViewport(nearMargin);
|
|
13722
|
-
|
|
13754
|
+
useEffect24(() => {
|
|
13723
13755
|
if (!isNear || !videoUrl || !resolvedOrigin) return;
|
|
13724
13756
|
if (saveDataEnabled()) return;
|
|
13725
13757
|
let videoOrigin;
|
|
@@ -14003,7 +14035,7 @@ function FilePlayer({
|
|
|
14003
14035
|
perfListenerRef.current = null;
|
|
14004
14036
|
}
|
|
14005
14037
|
}, []);
|
|
14006
|
-
|
|
14038
|
+
useEffect25(() => clearPerfListener, [clearPerfListener]);
|
|
14007
14039
|
const hoverActiveRef = useRef20(false);
|
|
14008
14040
|
const hoverGenerationRef = useRef20(0);
|
|
14009
14041
|
const activationWaiterRef = useRef20(null);
|
|
@@ -14013,7 +14045,7 @@ function FilePlayer({
|
|
|
14013
14045
|
activationWaiterRef.current = null;
|
|
14014
14046
|
}
|
|
14015
14047
|
}, []);
|
|
14016
|
-
|
|
14048
|
+
useEffect25(() => clearActivationWaiter, [clearActivationWaiter]);
|
|
14017
14049
|
const startHoverPlayback = useCallback13(() => {
|
|
14018
14050
|
hoverActiveRef.current = true;
|
|
14019
14051
|
const generation = ++hoverGenerationRef.current;
|
|
@@ -14103,7 +14135,7 @@ function FilePlayer({
|
|
|
14103
14135
|
setHoverMutedFallback(false);
|
|
14104
14136
|
}, []);
|
|
14105
14137
|
const hoverControlled = typeof playWhenHovered === "boolean";
|
|
14106
|
-
|
|
14138
|
+
useEffect25(() => {
|
|
14107
14139
|
if (!hoverControlled) return;
|
|
14108
14140
|
if (playWhenHovered) startHoverPlayback();
|
|
14109
14141
|
else stopHoverPlayback();
|
|
@@ -14114,14 +14146,14 @@ function FilePlayer({
|
|
|
14114
14146
|
mutedIntentRef.current = mutedIntent;
|
|
14115
14147
|
const onMutedFallbackChangeRef = useRef20(onMutedFallbackChange);
|
|
14116
14148
|
onMutedFallbackChangeRef.current = onMutedFallbackChange;
|
|
14117
|
-
|
|
14149
|
+
useEffect25(() => {
|
|
14118
14150
|
onMutedFallbackChangeRef.current?.({
|
|
14119
14151
|
muted: hoverMutedFallback,
|
|
14120
14152
|
blocked: hoverMutedFallback && mutedFallbackBlocked
|
|
14121
14153
|
});
|
|
14122
14154
|
}, [hoverMutedFallback, mutedFallbackBlocked]);
|
|
14123
14155
|
const autoPlayKickedRef = useRef20(false);
|
|
14124
|
-
|
|
14156
|
+
useEffect25(() => {
|
|
14125
14157
|
if (autoPlayKickedRef.current) return;
|
|
14126
14158
|
if (startMuted) {
|
|
14127
14159
|
const mutedEl = hoverPlayerRef.current;
|
|
@@ -14168,7 +14200,7 @@ function FilePlayer({
|
|
|
14168
14200
|
} catch {
|
|
14169
14201
|
}
|
|
14170
14202
|
}, [autoPlayUnmuted, startMuted, autoPlay]);
|
|
14171
|
-
|
|
14203
|
+
useEffect25(() => {
|
|
14172
14204
|
const el = hoverPlayerRef.current;
|
|
14173
14205
|
if (!el?.addEventListener) return;
|
|
14174
14206
|
const onVolumeChange = () => {
|
|
@@ -14188,7 +14220,7 @@ function FilePlayer({
|
|
|
14188
14220
|
}
|
|
14189
14221
|
};
|
|
14190
14222
|
}, []);
|
|
14191
|
-
|
|
14223
|
+
useEffect25(() => {
|
|
14192
14224
|
const el = hoverPlayerRef.current;
|
|
14193
14225
|
if (!el?.addEventListener) return;
|
|
14194
14226
|
const onPlaying = () => setMutedFallbackBlocked(false);
|
|
@@ -14205,7 +14237,7 @@ function FilePlayer({
|
|
|
14205
14237
|
}, []);
|
|
14206
14238
|
const onEndedRef = useRef20(onEnded);
|
|
14207
14239
|
onEndedRef.current = onEnded;
|
|
14208
|
-
|
|
14240
|
+
useEffect25(() => {
|
|
14209
14241
|
const el = hoverPlayerRef.current;
|
|
14210
14242
|
if (!el?.addEventListener) return;
|
|
14211
14243
|
const handler = () => onEndedRef.current?.();
|
|
@@ -14220,6 +14252,7 @@ function FilePlayer({
|
|
|
14220
14252
|
}
|
|
14221
14253
|
};
|
|
14222
14254
|
}, []);
|
|
14255
|
+
useIosNativeVideoFullscreen(hoverPlayerRef);
|
|
14223
14256
|
useImperativeHandle3(playerHandleRef, () => ({
|
|
14224
14257
|
getCurrentTime: () => hoverPlayerRef.current?.currentTime ?? 0,
|
|
14225
14258
|
getDuration: () => {
|
|
@@ -14382,14 +14415,14 @@ function YouTubeFacadeInner({
|
|
|
14382
14415
|
return `${YT_NOCOOKIE_ORIGIN}/embed/${videoId}?${params.toString()}`;
|
|
14383
14416
|
}, [videoId, minimalControls]);
|
|
14384
14417
|
const [posterTier, setPosterTier] = useState29(0);
|
|
14385
|
-
|
|
14418
|
+
useEffect25(() => {
|
|
14386
14419
|
setPosterTier(0);
|
|
14387
14420
|
}, [videoId]);
|
|
14388
14421
|
const posterQuality = YT_POSTER_TIERS[posterTier];
|
|
14389
14422
|
const posterJpg = `https://i.ytimg.com/vi/${videoId}/${posterQuality}.jpg`;
|
|
14390
14423
|
const posterWebp = `https://i.ytimg.com/vi_webp/${videoId}/${posterQuality}.webp`;
|
|
14391
14424
|
const handlePosterError = () => setPosterTier((tier) => Math.min(tier + 1, YT_POSTER_TIERS.length - 1));
|
|
14392
|
-
|
|
14425
|
+
useEffect25(() => {
|
|
14393
14426
|
if (!activated) return;
|
|
14394
14427
|
const iframe = iframeRef.current;
|
|
14395
14428
|
if (!iframe) return;
|
|
@@ -14434,7 +14467,7 @@ function YouTubeFacadeInner({
|
|
|
14434
14467
|
};
|
|
14435
14468
|
}, [activated]);
|
|
14436
14469
|
const prevSuspendedRef = useRef20(false);
|
|
14437
|
-
|
|
14470
|
+
useEffect25(() => {
|
|
14438
14471
|
const wasSuspended = prevSuspendedRef.current;
|
|
14439
14472
|
prevSuspendedRef.current = Boolean(suspended);
|
|
14440
14473
|
if (!activated) return;
|
|
@@ -14496,7 +14529,7 @@ import { useMemo as useMemo21, useState as useState32 } from "react";
|
|
|
14496
14529
|
|
|
14497
14530
|
// src/components/features/video-hover-preview.tsx
|
|
14498
14531
|
init_cn();
|
|
14499
|
-
import { useEffect as
|
|
14532
|
+
import { useEffect as useEffect26, useRef as useRef21, useState as useState30 } from "react";
|
|
14500
14533
|
import { Fragment as Fragment21, jsx as jsx90, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
14501
14534
|
function VideoHoverPreviewSurface({
|
|
14502
14535
|
url,
|
|
@@ -14523,7 +14556,7 @@ function VideoHoverPreviewSurface({
|
|
|
14523
14556
|
const gateControlled = playerMounted !== void 0;
|
|
14524
14557
|
const rootElRef = useRef21(null);
|
|
14525
14558
|
const [isNear, setIsNear] = useState30(false);
|
|
14526
|
-
|
|
14559
|
+
useEffect26(() => {
|
|
14527
14560
|
if (gateControlled) return;
|
|
14528
14561
|
const el = rootElRef.current;
|
|
14529
14562
|
if (!el || typeof IntersectionObserver === "undefined") return;
|
|
@@ -14718,7 +14751,7 @@ function sortBitesByCreatedAtDesc(a, b) {
|
|
|
14718
14751
|
|
|
14719
14752
|
// src/components/features/cards-strip.tsx
|
|
14720
14753
|
init_cn();
|
|
14721
|
-
import React41, { useCallback as useCallback14, useEffect as
|
|
14754
|
+
import React41, { useCallback as useCallback14, useEffect as useEffect27, useMemo as useMemo20, useRef as useRef22, useState as useState31 } from "react";
|
|
14722
14755
|
init_button2();
|
|
14723
14756
|
|
|
14724
14757
|
// src/components/layout/page-heading.tsx
|
|
@@ -14805,7 +14838,7 @@ function CardsStrip(props) {
|
|
|
14805
14838
|
const items = childrenMode ? childItems : props.items;
|
|
14806
14839
|
const cardWidthDesktop = childrenMode ? props.cardWidthDesktop ?? 400 : 0;
|
|
14807
14840
|
const cardWidthMobile = childrenMode ? props.cardWidthMobile ?? 320 : 0;
|
|
14808
|
-
|
|
14841
|
+
useEffect27(() => {
|
|
14809
14842
|
if (process.env.NODE_ENV === "production" || !childrenMode) return;
|
|
14810
14843
|
const only = childItems.length === 1 ? childItems[0] : null;
|
|
14811
14844
|
if (React41.isValidElement(only) && only.type === React41.Fragment) {
|
|
@@ -14826,7 +14859,7 @@ function CardsStrip(props) {
|
|
|
14826
14859
|
const [reducedMotion, setReducedMotion] = useState31(false);
|
|
14827
14860
|
const [isTouch, setIsTouch] = useState31(false);
|
|
14828
14861
|
const [isMobile, setIsMobile] = useState31(false);
|
|
14829
|
-
|
|
14862
|
+
useEffect27(() => {
|
|
14830
14863
|
const subs = [];
|
|
14831
14864
|
const watch = (query, set) => {
|
|
14832
14865
|
const mq = window.matchMedia(query);
|
|
@@ -14854,7 +14887,7 @@ function CardsStrip(props) {
|
|
|
14854
14887
|
setOverflows(singleCopy > scroller.clientWidth + 1);
|
|
14855
14888
|
setMarqueeEligible(singleCopy > scroller.clientWidth + TRACK_GAP_PX);
|
|
14856
14889
|
}, []);
|
|
14857
|
-
|
|
14890
|
+
useEffect27(() => {
|
|
14858
14891
|
measure();
|
|
14859
14892
|
const scroller = scrollerRef.current;
|
|
14860
14893
|
const track = trackRef.current;
|
|
@@ -14867,7 +14900,7 @@ function CardsStrip(props) {
|
|
|
14867
14900
|
const chevronSuppressUntilRef = useRef22(0);
|
|
14868
14901
|
const userScrollSuppressUntilRef = useRef22(0);
|
|
14869
14902
|
const [nearViewport, setNearViewport] = useState31(true);
|
|
14870
|
-
|
|
14903
|
+
useEffect27(() => {
|
|
14871
14904
|
const el = wrapperRef.current;
|
|
14872
14905
|
if (!el || typeof IntersectionObserver === "undefined") return;
|
|
14873
14906
|
const io = new IntersectionObserver(
|
|
@@ -14953,7 +14986,7 @@ function CardsStrip(props) {
|
|
|
14953
14986
|
const cardObserverRef = useRef22(null);
|
|
14954
14987
|
const cardElIdxRef = useRef22(/* @__PURE__ */ new Map());
|
|
14955
14988
|
const cardElNearRef = useRef22(/* @__PURE__ */ new Map());
|
|
14956
|
-
|
|
14989
|
+
useEffect27(() => {
|
|
14957
14990
|
if (typeof IntersectionObserver === "undefined") return;
|
|
14958
14991
|
const io = new IntersectionObserver((entries) => {
|
|
14959
14992
|
for (const e of entries) cardElNearRef.current.set(e.target, e.isIntersecting);
|
|
@@ -17170,7 +17203,7 @@ function AvatarStack({
|
|
|
17170
17203
|
init_button();
|
|
17171
17204
|
|
|
17172
17205
|
// src/components/ui/image-gallery-modal.tsx
|
|
17173
|
-
import { useState as useState115, useEffect as
|
|
17206
|
+
import { useState as useState115, useEffect as useEffect88 } from "react";
|
|
17174
17207
|
|
|
17175
17208
|
// src/components/ui/allowed-domains-input.tsx
|
|
17176
17209
|
init_cn();
|
|
@@ -17339,7 +17372,7 @@ function AnnouncementBarView({
|
|
|
17339
17372
|
// src/components/ui/autocomplete.tsx
|
|
17340
17373
|
import {
|
|
17341
17374
|
forwardRef as forwardRef31,
|
|
17342
|
-
useEffect as
|
|
17375
|
+
useEffect as useEffect28,
|
|
17343
17376
|
useImperativeHandle as useImperativeHandle4,
|
|
17344
17377
|
useMemo as useMemo23,
|
|
17345
17378
|
useRef as useRef24,
|
|
@@ -17538,7 +17571,7 @@ function AutocompleteInner(props, ref) {
|
|
|
17538
17571
|
const hiddenTagsCount = multiple ? selectedOptions.length - visibleCount : 0;
|
|
17539
17572
|
const [showHiddenTags, setShowHiddenTags] = useState34(false);
|
|
17540
17573
|
const hiddenTagsRef = useRef24(null);
|
|
17541
|
-
|
|
17574
|
+
useEffect28(() => {
|
|
17542
17575
|
if (!showHiddenTags) return;
|
|
17543
17576
|
const handleClick = (e) => {
|
|
17544
17577
|
const target = e.target;
|
|
@@ -17590,7 +17623,7 @@ function AutocompleteInner(props, ref) {
|
|
|
17590
17623
|
setIsOpen(false);
|
|
17591
17624
|
onCreateOption?.(trimmed);
|
|
17592
17625
|
};
|
|
17593
|
-
|
|
17626
|
+
useEffect28(() => {
|
|
17594
17627
|
setHighlightedIndex(-1);
|
|
17595
17628
|
}, [filteredOptions.length]);
|
|
17596
17629
|
const handleInputChange = (e) => {
|
|
@@ -19226,7 +19259,7 @@ function DateFilterMenu({
|
|
|
19226
19259
|
|
|
19227
19260
|
// src/components/ui/duration-input.tsx
|
|
19228
19261
|
init_cn();
|
|
19229
|
-
import { Fragment as Fragment31, useEffect as
|
|
19262
|
+
import { Fragment as Fragment31, useEffect as useEffect30, useRef as useRef25, useState as useState36 } from "react";
|
|
19230
19263
|
import { jsx as jsx118, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
19231
19264
|
var SEGMENT_META = [
|
|
19232
19265
|
{ label: "Hours", placeholder: "HH", max: 99 },
|
|
@@ -19242,7 +19275,7 @@ var split = (value) => {
|
|
|
19242
19275
|
function DurationInput({ value, onChange, invalid, className }) {
|
|
19243
19276
|
const [segments, setSegments] = useState36(() => split(value));
|
|
19244
19277
|
const refs = [useRef25(null), useRef25(null), useRef25(null)];
|
|
19245
|
-
|
|
19278
|
+
useEffect30(() => {
|
|
19246
19279
|
setSegments((prev) => compose(prev) === value ? prev : split(value));
|
|
19247
19280
|
}, [value]);
|
|
19248
19281
|
const focusSegment = (i) => {
|
|
@@ -19487,7 +19520,7 @@ init_cn();
|
|
|
19487
19520
|
import React52 from "react";
|
|
19488
19521
|
|
|
19489
19522
|
// src/components/ui/progress-bar.tsx
|
|
19490
|
-
import { useEffect as
|
|
19523
|
+
import { useEffect as useEffect31, useRef as useRef26, useState as useState37 } from "react";
|
|
19491
19524
|
import { jsx as jsx123 } from "react/jsx-runtime";
|
|
19492
19525
|
var ProgressBar = ({
|
|
19493
19526
|
progress,
|
|
@@ -19505,7 +19538,7 @@ var ProgressBar = ({
|
|
|
19505
19538
|
const effectiveHeight = isMdUp ? height : mobileHeight;
|
|
19506
19539
|
const containerRef = useRef26(null);
|
|
19507
19540
|
const [segmentCount, setSegmentCount] = useState37(0);
|
|
19508
|
-
|
|
19541
|
+
useEffect31(() => {
|
|
19509
19542
|
if (!containerRef.current) return;
|
|
19510
19543
|
const resizeObserver = new ResizeObserver(() => {
|
|
19511
19544
|
if (containerRef.current) {
|
|
@@ -21648,13 +21681,13 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
|
21648
21681
|
// src/components/ui/modal.tsx
|
|
21649
21682
|
init_cn();
|
|
21650
21683
|
import * as React68 from "react";
|
|
21651
|
-
import { useEffect as
|
|
21684
|
+
import { useEffect as useEffect36 } from "react";
|
|
21652
21685
|
import { usePreventScroll } from "@react-aria/overlays";
|
|
21653
21686
|
import { jsx as jsx145, jsxs as jsxs111 } from "react/jsx-runtime";
|
|
21654
21687
|
var Modal2 = React68.forwardRef(
|
|
21655
21688
|
({ isOpen, onClose, children, className }, ref) => {
|
|
21656
21689
|
usePreventScroll({ isDisabled: !isOpen });
|
|
21657
|
-
|
|
21690
|
+
useEffect36(() => {
|
|
21658
21691
|
const handleKeyDown = (event) => {
|
|
21659
21692
|
if (event.key === "Escape") {
|
|
21660
21693
|
onClose();
|
|
@@ -22884,7 +22917,7 @@ function TabContent({
|
|
|
22884
22917
|
// src/components/ui/tab-navigation.tsx
|
|
22885
22918
|
init_next_navigation();
|
|
22886
22919
|
init_cn();
|
|
22887
|
-
import { useState as useState47, useEffect as
|
|
22920
|
+
import { useState as useState47, useEffect as useEffect39, useLayoutEffect as useLayoutEffect7, useDeferredValue, useMemo as useMemo28, useRef as useRef30, useCallback as useCallback20, memo as memo4, startTransition } from "react";
|
|
22888
22921
|
import { Fragment as Fragment34, jsx as jsx157, jsxs as jsxs121 } from "react/jsx-runtime";
|
|
22889
22922
|
var HIDDEN_INDICATOR = { left: 0, width: 0 };
|
|
22890
22923
|
var StatusDot = ({ indicator, className }) => /* @__PURE__ */ jsx157("div", { className: cn(
|
|
@@ -22928,7 +22961,7 @@ var TabBar = memo4(function TabBar2({
|
|
|
22928
22961
|
useLayoutEffect7(() => {
|
|
22929
22962
|
if (indicator.width > 0) hasPlacedIndicatorRef.current = true;
|
|
22930
22963
|
}, [indicator]);
|
|
22931
|
-
|
|
22964
|
+
useEffect39(() => {
|
|
22932
22965
|
const el = scrollRef.current;
|
|
22933
22966
|
if (!el) return;
|
|
22934
22967
|
updateScrollShadows();
|
|
@@ -22961,7 +22994,7 @@ var TabBar = memo4(function TabBar2({
|
|
|
22961
22994
|
ro.disconnect();
|
|
22962
22995
|
};
|
|
22963
22996
|
}, [updateScrollShadows, measureIndicator]);
|
|
22964
|
-
|
|
22997
|
+
useEffect39(() => {
|
|
22965
22998
|
const el = scrollRef.current;
|
|
22966
22999
|
const active = activeTabRef.current;
|
|
22967
23000
|
if (!el || !active) return;
|
|
@@ -23097,7 +23130,7 @@ function TabNavigation({
|
|
|
23097
23130
|
const activeTab = isUrlSyncEnabled ? internalActiveTab : controlledActiveTab || "";
|
|
23098
23131
|
const lastSyncedUrlTabRef = useRef30(urlTab);
|
|
23099
23132
|
const inFlightUrlTabsRef = useRef30([]);
|
|
23100
|
-
|
|
23133
|
+
useEffect39(() => {
|
|
23101
23134
|
if (!isUrlSyncEnabled) return;
|
|
23102
23135
|
const landed = inFlightUrlTabsRef.current.indexOf(urlTab);
|
|
23103
23136
|
if (landed !== -1) {
|
|
@@ -23116,7 +23149,7 @@ function TabNavigation({
|
|
|
23116
23149
|
setInternalActiveTab(validTabIds.has(urlTab) ? urlTab : fallbackTab);
|
|
23117
23150
|
}, [isUrlSyncEnabled, urlTab, validTabIds, fallbackTab]);
|
|
23118
23151
|
const navRef = useRef30({ isUrlSyncEnabled, controlledOnTabChange, searchParams, pathname, paramName, replaceState });
|
|
23119
|
-
|
|
23152
|
+
useEffect39(() => {
|
|
23120
23153
|
navRef.current = { isUrlSyncEnabled, controlledOnTabChange, searchParams, pathname, paramName, replaceState };
|
|
23121
23154
|
});
|
|
23122
23155
|
const handleTabChange = useCallback20((tabId) => {
|
|
@@ -23221,7 +23254,7 @@ function AIGeneratedBadge({ className }) {
|
|
|
23221
23254
|
}
|
|
23222
23255
|
|
|
23223
23256
|
// src/components/ui/fade-preview.tsx
|
|
23224
|
-
import { useState as useState48, useRef as useRef31, useEffect as
|
|
23257
|
+
import { useState as useState48, useRef as useRef31, useEffect as useEffect40 } from "react";
|
|
23225
23258
|
import { ChevronDown as ChevronDown4 } from "lucide-react";
|
|
23226
23259
|
import { Fragment as Fragment35, jsx as jsx160, jsxs as jsxs123 } from "react/jsx-runtime";
|
|
23227
23260
|
function FadePreview({
|
|
@@ -23232,7 +23265,7 @@ function FadePreview({
|
|
|
23232
23265
|
}) {
|
|
23233
23266
|
const [expanded, setExpanded] = useState48(false);
|
|
23234
23267
|
const contentRef = useRef31(null);
|
|
23235
|
-
|
|
23268
|
+
useEffect40(() => {
|
|
23236
23269
|
setExpanded(false);
|
|
23237
23270
|
}, [resetKey]);
|
|
23238
23271
|
const needsFade = hiddenCount > 0;
|
|
@@ -23336,7 +23369,7 @@ function useRichMarkdownRuntime() {
|
|
|
23336
23369
|
}
|
|
23337
23370
|
|
|
23338
23371
|
// src/components/embeds/reddit-embed-client.tsx
|
|
23339
|
-
import { useState as useState50, useEffect as
|
|
23372
|
+
import { useState as useState50, useEffect as useEffect42, useRef as useRef33 } from "react";
|
|
23340
23373
|
|
|
23341
23374
|
// src/utils/social-embed-cache.ts
|
|
23342
23375
|
var dataCache = /* @__PURE__ */ new Map();
|
|
@@ -23412,7 +23445,7 @@ var socialCache = SocialEmbedCache.getInstance();
|
|
|
23412
23445
|
|
|
23413
23446
|
// src/components/media-carousel.tsx
|
|
23414
23447
|
init_cn();
|
|
23415
|
-
import { useState as useState49, useRef as useRef32, useEffect as
|
|
23448
|
+
import { useState as useState49, useRef as useRef32, useEffect as useEffect41, memo as memo5, useCallback as useCallback21 } from "react";
|
|
23416
23449
|
init_button2();
|
|
23417
23450
|
import { Fragment as Fragment36, jsx as jsx163, jsxs as jsxs124 } from "react/jsx-runtime";
|
|
23418
23451
|
var ChevronLeftIcon = () => /* @__PURE__ */ jsx163("svg", { width: "24", height: "24", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx163("polyline", { points: "15,18 9,12 15,6" }) });
|
|
@@ -23437,7 +23470,7 @@ var MediaCarousel = memo5(function MediaCarousel2({
|
|
|
23437
23470
|
const key = originalUrl.trim() || "__missing_src__";
|
|
23438
23471
|
setBrokenResourceUrls((b) => b[key] ? b : { ...b, [key]: true });
|
|
23439
23472
|
}, []);
|
|
23440
|
-
|
|
23473
|
+
useEffect41(() => {
|
|
23441
23474
|
if (currentIndex >= media.length && media.length > 0) {
|
|
23442
23475
|
setCurrentIndex(media.length - 1);
|
|
23443
23476
|
}
|
|
@@ -23726,7 +23759,7 @@ function RedditEmbedClient({ url, maxWidth = 700 }) {
|
|
|
23726
23759
|
const [loading, setLoading] = useState50(true);
|
|
23727
23760
|
const [error, setError] = useState50(null);
|
|
23728
23761
|
const initializationDone = useRef33(false);
|
|
23729
|
-
|
|
23762
|
+
useEffect42(() => {
|
|
23730
23763
|
if (initializationDone.current) return;
|
|
23731
23764
|
initializationDone.current = true;
|
|
23732
23765
|
const jsonUrl = url.endsWith(".json") ? url : `${url.replace(/\/$/, "")}.json`;
|
|
@@ -24032,7 +24065,7 @@ function RedditEmbedClient({ url, maxWidth = 700 }) {
|
|
|
24032
24065
|
}
|
|
24033
24066
|
|
|
24034
24067
|
// src/components/embeds/twitter-embed-client.tsx
|
|
24035
|
-
import { useState as useState51, useEffect as
|
|
24068
|
+
import { useState as useState51, useEffect as useEffect43, useRef as useRef34 } from "react";
|
|
24036
24069
|
import { jsx as jsx166, jsxs as jsxs126 } from "react/jsx-runtime";
|
|
24037
24070
|
var MessageCircleIcon2 = () => /* @__PURE__ */ jsx166("svg", { width: "16", height: "16", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx166("path", { d: "M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z" }) });
|
|
24038
24071
|
var ExternalLinkIcon3 = () => /* @__PURE__ */ jsxs126("svg", { width: "16", height: "16", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: [
|
|
@@ -24064,7 +24097,7 @@ function TwitterEmbedClient({ url, tweetId, maxWidth = 700 }) {
|
|
|
24064
24097
|
const initializationDone = useRef34(false);
|
|
24065
24098
|
const extractedTweetId = tweetId || url.match(/status\/(\d+)/)?.[1];
|
|
24066
24099
|
const tweetUrl = url.includes("twitter.com") || url.includes("x.com") ? url : `https://twitter.com/twitter/status/${extractedTweetId}`;
|
|
24067
|
-
|
|
24100
|
+
useEffect43(() => {
|
|
24068
24101
|
if (initializationDone.current) return;
|
|
24069
24102
|
initializationDone.current = true;
|
|
24070
24103
|
if (!extractedTweetId) {
|
|
@@ -24312,7 +24345,7 @@ function LinkedInEmbedClient({ url, height = 600 }) {
|
|
|
24312
24345
|
}
|
|
24313
24346
|
|
|
24314
24347
|
// src/components/embeds/og-link-preview.tsx
|
|
24315
|
-
import { useState as useState53, useEffect as
|
|
24348
|
+
import { useState as useState53, useEffect as useEffect44, Component as Component2 } from "react";
|
|
24316
24349
|
import { jsx as jsx168, jsxs as jsxs128 } from "react/jsx-runtime";
|
|
24317
24350
|
var OGLinkErrorBoundary = class extends Component2 {
|
|
24318
24351
|
constructor(props) {
|
|
@@ -24377,7 +24410,7 @@ var OGLinkPreview = ({
|
|
|
24377
24410
|
} catch {
|
|
24378
24411
|
isValidUrl = false;
|
|
24379
24412
|
}
|
|
24380
|
-
|
|
24413
|
+
useEffect44(() => {
|
|
24381
24414
|
if (!isValidUrl || isLocalhost) return;
|
|
24382
24415
|
const fetchOGData = async () => {
|
|
24383
24416
|
try {
|
|
@@ -24690,7 +24723,7 @@ function toFigmaOriginalUrl(url) {
|
|
|
24690
24723
|
init_cn();
|
|
24691
24724
|
|
|
24692
24725
|
// src/components/embeds/embed-iframe.tsx
|
|
24693
|
-
import { useState as useState54, useCallback as useCallback22, useRef as useRef35, useEffect as
|
|
24726
|
+
import { useState as useState54, useCallback as useCallback22, useRef as useRef35, useEffect as useEffect45 } from "react";
|
|
24694
24727
|
import { Fragment as Fragment37, jsx as jsx169, jsxs as jsxs129 } from "react/jsx-runtime";
|
|
24695
24728
|
function EmbedLoadingSkeleton({ height }) {
|
|
24696
24729
|
return /* @__PURE__ */ jsx169(
|
|
@@ -24714,10 +24747,10 @@ function EmbedIframe({
|
|
|
24714
24747
|
const [isLoaded, setIsLoaded] = useState54(false);
|
|
24715
24748
|
const iframeRef = useRef35(null);
|
|
24716
24749
|
const handleLoad = useCallback22(() => setIsLoaded(true), []);
|
|
24717
|
-
|
|
24750
|
+
useEffect45(() => {
|
|
24718
24751
|
setIsLoaded(false);
|
|
24719
24752
|
}, [src]);
|
|
24720
|
-
|
|
24753
|
+
useEffect45(() => {
|
|
24721
24754
|
const iframe = iframeRef.current;
|
|
24722
24755
|
return () => {
|
|
24723
24756
|
if (iframe) {
|
|
@@ -24888,14 +24921,14 @@ function FigmaEmbed({ url, title, height, loading = "lazy" }) {
|
|
|
24888
24921
|
}
|
|
24889
24922
|
|
|
24890
24923
|
// src/components/embeds/markdown-image.tsx
|
|
24891
|
-
import { useEffect as
|
|
24924
|
+
import { useEffect as useEffect46, useState as useState56 } from "react";
|
|
24892
24925
|
import { jsx as jsx172 } from "react/jsx-runtime";
|
|
24893
24926
|
var MAX_H_REM = 32;
|
|
24894
24927
|
var DISPLAY_W = 768;
|
|
24895
24928
|
function MarkdownImage({ src, alt }) {
|
|
24896
24929
|
const { transformImageSrc } = useRichMarkdownRuntime();
|
|
24897
24930
|
const [ratio, setRatio] = useState56(null);
|
|
24898
|
-
|
|
24931
|
+
useEffect46(() => {
|
|
24899
24932
|
let cancelled = false;
|
|
24900
24933
|
setRatio(null);
|
|
24901
24934
|
const probeSrc = transformImageSrc(src, { width: 48, resize: "contain", quality: 20 }) ?? src;
|
|
@@ -25709,11 +25742,11 @@ function BackButton({ label = "Back", className, type = "button", ...props }) {
|
|
|
25709
25742
|
|
|
25710
25743
|
// src/components/layout/list-page-layout.tsx
|
|
25711
25744
|
init_cn();
|
|
25712
|
-
import { useEffect as
|
|
25745
|
+
import { useEffect as useEffect48, useState as useState60 } from "react";
|
|
25713
25746
|
|
|
25714
25747
|
// src/components/ui/filter-modal.tsx
|
|
25715
25748
|
init_cn();
|
|
25716
|
-
import { useEffect as
|
|
25749
|
+
import { useEffect as useEffect47, useState as useState59 } from "react";
|
|
25717
25750
|
init_button2();
|
|
25718
25751
|
|
|
25719
25752
|
// src/components/ui/filter-checkbox-item.tsx
|
|
@@ -25918,7 +25951,7 @@ function FilterModal({
|
|
|
25918
25951
|
const [draftDateSort, setDraftDateSort] = useState59(dateFilter?.sort ?? dateDefaultSort);
|
|
25919
25952
|
const [draftDateRange, setDraftDateRange] = useState59(dateFilter?.range);
|
|
25920
25953
|
const { scrollRef, fadeTop, fadeBottom, update: updateFade } = useScrollFade();
|
|
25921
|
-
|
|
25954
|
+
useEffect47(() => {
|
|
25922
25955
|
if (isOpen) {
|
|
25923
25956
|
setSelectedFilters({ ...currentFilters });
|
|
25924
25957
|
setPendingTags(selectedTags ?? []);
|
|
@@ -26543,10 +26576,10 @@ function ListPageLayout({
|
|
|
26543
26576
|
const [mobileFilterOpen, setMobileFilterOpen] = useState60(false);
|
|
26544
26577
|
const [localSearchValue, setLocalSearchValue] = useState60(searchValue);
|
|
26545
26578
|
const debouncedSearchValue = useDebounce(localSearchValue, 500);
|
|
26546
|
-
|
|
26579
|
+
useEffect48(() => {
|
|
26547
26580
|
setLocalSearchValue(searchValue);
|
|
26548
26581
|
}, [searchValue]);
|
|
26549
|
-
|
|
26582
|
+
useEffect48(() => {
|
|
26550
26583
|
if (debouncedSearchValue !== searchValue) {
|
|
26551
26584
|
onSearch(debouncedSearchValue);
|
|
26552
26585
|
}
|
|
@@ -30220,7 +30253,7 @@ import { ExternalLink as ExternalLink8 } from "lucide-react";
|
|
|
30220
30253
|
import { createContext as createContext7, useContext as useContext7 } from "react";
|
|
30221
30254
|
|
|
30222
30255
|
// src/hooks/use-dynamic-theming.ts
|
|
30223
|
-
import { useState as useState61, useEffect as
|
|
30256
|
+
import { useState as useState61, useEffect as useEffect49 } from "react";
|
|
30224
30257
|
var defaultTheme = {
|
|
30225
30258
|
primaryColor: "#FFC008",
|
|
30226
30259
|
secondaryColor: "#161616",
|
|
@@ -30231,7 +30264,7 @@ var defaultTheme = {
|
|
|
30231
30264
|
function useDynamicTheming() {
|
|
30232
30265
|
const [theme, setTheme] = useState61(defaultTheme);
|
|
30233
30266
|
const [isDark, setIsDark] = useState61(false);
|
|
30234
|
-
|
|
30267
|
+
useEffect49(() => {
|
|
30235
30268
|
const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
30236
30269
|
setIsDark(mediaQuery.matches);
|
|
30237
30270
|
const handleChange = (e) => {
|
|
@@ -30319,7 +30352,7 @@ function useThemeToggle() {
|
|
|
30319
30352
|
}
|
|
30320
30353
|
|
|
30321
30354
|
// src/components/features/array-entry-manager.tsx
|
|
30322
|
-
import { useState as useState63, useEffect as
|
|
30355
|
+
import { useState as useState63, useEffect as useEffect51 } from "react";
|
|
30323
30356
|
import { Trash2, Plus as Plus2, Save, Loader2 as Loader22 } from "lucide-react";
|
|
30324
30357
|
import { jsx as jsx216, jsxs as jsxs165 } from "react/jsx-runtime";
|
|
30325
30358
|
function ArrayEntryManager({
|
|
@@ -30340,12 +30373,12 @@ function ArrayEntryManager({
|
|
|
30340
30373
|
}) {
|
|
30341
30374
|
const [draftItems, setDraftItems] = useState63(items);
|
|
30342
30375
|
const [isDirty, setIsDirty] = useState63(false);
|
|
30343
|
-
|
|
30376
|
+
useEffect51(() => {
|
|
30344
30377
|
if (!isDirty && !isSaving) {
|
|
30345
30378
|
setDraftItems(items);
|
|
30346
30379
|
}
|
|
30347
30380
|
}, [items, isDirty, isSaving]);
|
|
30348
|
-
|
|
30381
|
+
useEffect51(() => {
|
|
30349
30382
|
if (onDirtyChange) {
|
|
30350
30383
|
onDirtyChange(isDirty);
|
|
30351
30384
|
}
|
|
@@ -31580,7 +31613,7 @@ function AuthProvidersList({
|
|
|
31580
31613
|
|
|
31581
31614
|
// src/components/features/changelog-manager.tsx
|
|
31582
31615
|
import { Trash2 as Trash22, Plus as Plus3, ChevronDown as ChevronDown7, ChevronUp as ChevronUp3, Eye as Eye3, EyeOff } from "lucide-react";
|
|
31583
|
-
import { useState as useState66, useEffect as
|
|
31616
|
+
import { useState as useState66, useEffect as useEffect52 } from "react";
|
|
31584
31617
|
import { jsx as jsx234, jsxs as jsxs179 } from "react/jsx-runtime";
|
|
31585
31618
|
function ChangelogManager({
|
|
31586
31619
|
title,
|
|
@@ -31591,7 +31624,7 @@ function ChangelogManager({
|
|
|
31591
31624
|
showVisibilityToggle = false
|
|
31592
31625
|
}) {
|
|
31593
31626
|
const [expandedIndices, setExpandedIndices] = useState66(/* @__PURE__ */ new Set());
|
|
31594
|
-
|
|
31627
|
+
useEffect52(() => {
|
|
31595
31628
|
if (expandAll && entries.length > 0) {
|
|
31596
31629
|
setExpandedIndices(new Set(entries.map((_, i) => i)));
|
|
31597
31630
|
}
|
|
@@ -31934,7 +31967,7 @@ var ErrorBoundary = class extends Component3 {
|
|
|
31934
31967
|
|
|
31935
31968
|
// src/components/features/figma-prototype-viewer.tsx
|
|
31936
31969
|
init_cn();
|
|
31937
|
-
import { useState as useState67, useRef as useRef37, useEffect as
|
|
31970
|
+
import { useState as useState67, useRef as useRef37, useEffect as useEffect53, useCallback as useCallback26, useMemo as useMemo33 } from "react";
|
|
31938
31971
|
|
|
31939
31972
|
// src/components/features/section-selector.tsx
|
|
31940
31973
|
init_cn();
|
|
@@ -32372,7 +32405,7 @@ var FigmaPrototypeViewer = ({
|
|
|
32372
32405
|
embedUrl,
|
|
32373
32406
|
iframeKey
|
|
32374
32407
|
]);
|
|
32375
|
-
|
|
32408
|
+
useEffect53(() => {
|
|
32376
32409
|
const handleResize = () => {
|
|
32377
32410
|
const newWidth = window.innerWidth;
|
|
32378
32411
|
setScreenWidth(newWidth);
|
|
@@ -32386,7 +32419,7 @@ var FigmaPrototypeViewer = ({
|
|
|
32386
32419
|
return () => window.removeEventListener("resize", handleResize);
|
|
32387
32420
|
}, []);
|
|
32388
32421
|
const [lastViewMode, setLastViewMode] = useState67(viewMode);
|
|
32389
|
-
|
|
32422
|
+
useEffect53(() => {
|
|
32390
32423
|
if (lastViewMode !== viewMode && iframeState === "READY") {
|
|
32391
32424
|
console.log("[ViewMode Change]", lastViewMode, "\u2192", viewMode);
|
|
32392
32425
|
setIframeState("RELOADING");
|
|
@@ -32394,7 +32427,7 @@ var FigmaPrototypeViewer = ({
|
|
|
32394
32427
|
}
|
|
32395
32428
|
setLastViewMode(viewMode);
|
|
32396
32429
|
}, [viewMode, lastViewMode, iframeState]);
|
|
32397
|
-
|
|
32430
|
+
useEffect53(() => {
|
|
32398
32431
|
const handleVisibilityChange = () => {
|
|
32399
32432
|
if (document.visibilityState === "visible" && iframeState === "READY") {
|
|
32400
32433
|
console.log("[Sleep Recovery] Reloading iframe after sleep");
|
|
@@ -32405,7 +32438,7 @@ var FigmaPrototypeViewer = ({
|
|
|
32405
32438
|
document.addEventListener("visibilitychange", handleVisibilityChange);
|
|
32406
32439
|
return () => document.removeEventListener("visibilitychange", handleVisibilityChange);
|
|
32407
32440
|
}, [iframeState]);
|
|
32408
|
-
|
|
32441
|
+
useEffect53(() => {
|
|
32409
32442
|
const handleMessage = (event) => {
|
|
32410
32443
|
if (event.origin !== "https://www.figma.com") return;
|
|
32411
32444
|
const validEvents = ["INITIAL_LOAD", "NEW_STATE", "PRESENTED_NODE_CHANGED"];
|
|
@@ -32489,12 +32522,12 @@ var FigmaPrototypeViewer = ({
|
|
|
32489
32522
|
}
|
|
32490
32523
|
}, 500);
|
|
32491
32524
|
}, []);
|
|
32492
|
-
|
|
32525
|
+
useEffect53(() => {
|
|
32493
32526
|
if (externalActiveSection && externalActiveSection !== activeSection && isInitialized) {
|
|
32494
32527
|
navigateToSection(externalActiveSection);
|
|
32495
32528
|
}
|
|
32496
32529
|
}, [externalActiveSection, activeSection, isInitialized, navigateToSection]);
|
|
32497
|
-
|
|
32530
|
+
useEffect53(() => {
|
|
32498
32531
|
return () => {
|
|
32499
32532
|
if (navTimerRef.current) clearTimeout(navTimerRef.current);
|
|
32500
32533
|
if (touchTimerRef.current) clearTimeout(touchTimerRef.current);
|
|
@@ -32597,7 +32630,7 @@ var FigmaPrototypeViewer = ({
|
|
|
32597
32630
|
|
|
32598
32631
|
// src/components/features/filters-dropdown.tsx
|
|
32599
32632
|
init_cn();
|
|
32600
|
-
import { useEffect as
|
|
32633
|
+
import { useEffect as useEffect54, useRef as useRef38, useState as useState68 } from "react";
|
|
32601
32634
|
import { jsx as jsx241, jsxs as jsxs185 } from "react/jsx-runtime";
|
|
32602
32635
|
var FilterCheckbox = ({ checked, disabled = false, className }) => {
|
|
32603
32636
|
return /* @__PURE__ */ jsx241(
|
|
@@ -32637,7 +32670,7 @@ var FiltersDropdown = ({
|
|
|
32637
32670
|
const dropdownRef = useRef38(null);
|
|
32638
32671
|
const triggerRef = useRef38(null);
|
|
32639
32672
|
const containerRef = useRef38(null);
|
|
32640
|
-
|
|
32673
|
+
useEffect54(() => {
|
|
32641
32674
|
if (isOpen) {
|
|
32642
32675
|
setShouldRender(true);
|
|
32643
32676
|
let id2 = 0;
|
|
@@ -32653,7 +32686,7 @@ var FiltersDropdown = ({
|
|
|
32653
32686
|
const t = setTimeout(() => setShouldRender(false), ANIMATION_MS);
|
|
32654
32687
|
return () => clearTimeout(t);
|
|
32655
32688
|
}, [isOpen]);
|
|
32656
|
-
|
|
32689
|
+
useEffect54(() => {
|
|
32657
32690
|
if (!responsive) {
|
|
32658
32691
|
setIsMobile(false);
|
|
32659
32692
|
return;
|
|
@@ -32665,7 +32698,7 @@ var FiltersDropdown = ({
|
|
|
32665
32698
|
window.addEventListener("resize", checkMobile);
|
|
32666
32699
|
return () => window.removeEventListener("resize", checkMobile);
|
|
32667
32700
|
}, [responsive]);
|
|
32668
|
-
|
|
32701
|
+
useEffect54(() => {
|
|
32669
32702
|
if (!isOpen || isMobile || !triggerRef.current) return;
|
|
32670
32703
|
const calculateOptimalPlacement = () => {
|
|
32671
32704
|
const trigger = triggerRef.current;
|
|
@@ -32702,12 +32735,12 @@ var FiltersDropdown = ({
|
|
|
32702
32735
|
return initial;
|
|
32703
32736
|
});
|
|
32704
32737
|
const currentFiltersStr = currentFilters ? JSON.stringify(currentFilters) : "";
|
|
32705
|
-
|
|
32738
|
+
useEffect54(() => {
|
|
32706
32739
|
if (currentFilters) {
|
|
32707
32740
|
setSelectedFilters({ ...currentFilters });
|
|
32708
32741
|
}
|
|
32709
32742
|
}, [currentFiltersStr]);
|
|
32710
|
-
|
|
32743
|
+
useEffect54(() => {
|
|
32711
32744
|
const handleClickOutside = (event) => {
|
|
32712
32745
|
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
32713
32746
|
setIsOpen(false);
|
|
@@ -32723,7 +32756,7 @@ var FiltersDropdown = ({
|
|
|
32723
32756
|
};
|
|
32724
32757
|
}
|
|
32725
32758
|
}, [isOpen]);
|
|
32726
|
-
|
|
32759
|
+
useEffect54(() => {
|
|
32727
32760
|
const handleEscape = (e) => {
|
|
32728
32761
|
if (e.key === "Escape" && isOpen) {
|
|
32729
32762
|
setIsOpen(false);
|
|
@@ -32987,13 +33020,13 @@ function KnowledgeBaseLinksManager({
|
|
|
32987
33020
|
}
|
|
32988
33021
|
|
|
32989
33022
|
// src/components/features/loading-provider.tsx
|
|
32990
|
-
import { createContext as createContext8, useContext as useContext8, useState as useState69, useEffect as
|
|
33023
|
+
import { createContext as createContext8, useContext as useContext8, useState as useState69, useEffect as useEffect55 } from "react";
|
|
32991
33024
|
import { jsx as jsx244, jsxs as jsxs186 } from "react/jsx-runtime";
|
|
32992
33025
|
var LoadingContext = createContext8(void 0);
|
|
32993
33026
|
function LoadingProvider({ children }) {
|
|
32994
33027
|
const [isLoading, setIsLoading] = useState69(false);
|
|
32995
33028
|
const [progress, setProgress] = useState69(0);
|
|
32996
|
-
|
|
33029
|
+
useEffect55(() => {
|
|
32997
33030
|
let interval;
|
|
32998
33031
|
if (isLoading) {
|
|
32999
33032
|
setProgress(10);
|
|
@@ -33266,7 +33299,7 @@ function OSTypeBadgeGroup({
|
|
|
33266
33299
|
}
|
|
33267
33300
|
|
|
33268
33301
|
// src/components/features/parallax-image-showcase.tsx
|
|
33269
|
-
import { useEffect as
|
|
33302
|
+
import { useEffect as useEffect56, useState as useState71, useRef as useRef40 } from "react";
|
|
33270
33303
|
import { motion, useScroll, useTransform, useMotionValue, useSpring } from "framer-motion";
|
|
33271
33304
|
import { jsx as jsx248, jsxs as jsxs189 } from "react/jsx-runtime";
|
|
33272
33305
|
var ParallaxImageShowcase = ({
|
|
@@ -33286,7 +33319,7 @@ var ParallaxImageShowcase = ({
|
|
|
33286
33319
|
const mouseYSpring = useSpring(mouseY, springConfig);
|
|
33287
33320
|
const [componentRect, setComponentRect] = useState71(null);
|
|
33288
33321
|
const componentRef = useRef40(null);
|
|
33289
|
-
|
|
33322
|
+
useEffect56(() => {
|
|
33290
33323
|
const updateRect = () => {
|
|
33291
33324
|
if (componentRef.current) {
|
|
33292
33325
|
setComponentRect(componentRef.current.getBoundingClientRect());
|
|
@@ -33300,7 +33333,7 @@ var ParallaxImageShowcase = ({
|
|
|
33300
33333
|
window.removeEventListener("scroll", updateRect);
|
|
33301
33334
|
};
|
|
33302
33335
|
}, []);
|
|
33303
|
-
|
|
33336
|
+
useEffect56(() => {
|
|
33304
33337
|
const handleGlobalMouseMove = (e) => {
|
|
33305
33338
|
if (!componentRect) return;
|
|
33306
33339
|
const centerX = componentRect.left + componentRect.width / 2;
|
|
@@ -34808,7 +34841,7 @@ function VideoBitesDisplay({
|
|
|
34808
34841
|
// src/components/features/floating-walkthrough-video.tsx
|
|
34809
34842
|
init_cn();
|
|
34810
34843
|
init_button2();
|
|
34811
|
-
import { useCallback as useCallback28, useEffect as
|
|
34844
|
+
import { useCallback as useCallback28, useEffect as useEffect57, useMemo as useMemo34, useRef as useRef42, useState as useState75 } from "react";
|
|
34812
34845
|
import * as DialogPrimitive3 from "@radix-ui/react-dialog";
|
|
34813
34846
|
import { Fragment as Fragment48, jsx as jsx261, jsxs as jsxs200 } from "react/jsx-runtime";
|
|
34814
34847
|
var isAtEnd = (duration, time) => duration > 0 && duration - time < 1;
|
|
@@ -34832,7 +34865,7 @@ function FloatingWalkthroughVideo({
|
|
|
34832
34865
|
const dismissalId = video?.id != null ? String(video.id) : "dismissed";
|
|
34833
34866
|
const [mounted, setMounted] = useState75(false);
|
|
34834
34867
|
const [dismissed, setDismissed] = useState75(false);
|
|
34835
|
-
|
|
34868
|
+
useEffect57(() => {
|
|
34836
34869
|
let idleHandle = null;
|
|
34837
34870
|
if (!video) return;
|
|
34838
34871
|
const timer = setTimeout(() => {
|
|
@@ -34855,7 +34888,7 @@ function FloatingWalkthroughVideo({
|
|
|
34855
34888
|
};
|
|
34856
34889
|
}, [appearDelayMs, dismissEnabled, storageKey, dismissalId, video?.id]);
|
|
34857
34890
|
const [previewSuppressed, setPreviewSuppressed] = useState75(false);
|
|
34858
|
-
|
|
34891
|
+
useEffect57(() => {
|
|
34859
34892
|
try {
|
|
34860
34893
|
const reducedMotion = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? false;
|
|
34861
34894
|
const conn = navigator.connection;
|
|
@@ -34896,7 +34929,7 @@ function FloatingWalkthroughVideo({
|
|
|
34896
34929
|
const isYouTube = Boolean(video?.youtubeUrl);
|
|
34897
34930
|
const resumeMode = !open && handoff !== null && !isYouTube;
|
|
34898
34931
|
const previewAllowed = !previewSuppressed && !isYouTube;
|
|
34899
|
-
|
|
34932
|
+
useEffect57(() => {
|
|
34900
34933
|
if (!mounted) return;
|
|
34901
34934
|
const el = typeof document !== "undefined" ? document.querySelector(hideNearSelector) : null;
|
|
34902
34935
|
if (!el || typeof IntersectionObserver === "undefined") {
|
|
@@ -34910,7 +34943,7 @@ function FloatingWalkthroughVideo({
|
|
|
34910
34943
|
io.observe(el);
|
|
34911
34944
|
return () => io.disconnect();
|
|
34912
34945
|
}, [mounted, hideNearSelector, pathname]);
|
|
34913
|
-
|
|
34946
|
+
useEffect57(() => {
|
|
34914
34947
|
if (!resumeMode) return;
|
|
34915
34948
|
const onVis = () => {
|
|
34916
34949
|
if (document.visibilityState === "hidden") {
|
|
@@ -34924,7 +34957,7 @@ function FloatingWalkthroughVideo({
|
|
|
34924
34957
|
document.addEventListener("visibilitychange", onVis);
|
|
34925
34958
|
return () => document.removeEventListener("visibilitychange", onVis);
|
|
34926
34959
|
}, [resumeMode]);
|
|
34927
|
-
|
|
34960
|
+
useEffect57(() => {
|
|
34928
34961
|
if (!footerHidden) return;
|
|
34929
34962
|
const h = resumeHandleRef.current ?? previewHandleRef.current;
|
|
34930
34963
|
try {
|
|
@@ -35072,13 +35105,13 @@ function FloatingWalkthroughVideo({
|
|
|
35072
35105
|
setCardFallback(s);
|
|
35073
35106
|
setCardMuted(s.muted);
|
|
35074
35107
|
}, []);
|
|
35075
|
-
|
|
35108
|
+
useEffect57(() => {
|
|
35076
35109
|
if (resumeMode) {
|
|
35077
35110
|
setCardMuted(handoff?.muted ?? false);
|
|
35078
35111
|
setCardPaused(handoff?.playing === false);
|
|
35079
35112
|
}
|
|
35080
35113
|
}, [resumeMode]);
|
|
35081
|
-
|
|
35114
|
+
useEffect57(() => {
|
|
35082
35115
|
if (hovered) {
|
|
35083
35116
|
setCardPaused(false);
|
|
35084
35117
|
setCardMuted(userMutedRef.current);
|
|
@@ -36939,7 +36972,7 @@ function ViewToggle({
|
|
|
36939
36972
|
|
|
36940
36973
|
// src/components/features/policy-configuration-panel.tsx
|
|
36941
36974
|
init_cn();
|
|
36942
|
-
import { useEffect as
|
|
36975
|
+
import { useEffect as useEffect58, useState as useState78 } from "react";
|
|
36943
36976
|
import { ChevronDown as ChevronDown8, Shield as Shield2 } from "lucide-react";
|
|
36944
36977
|
init_button2();
|
|
36945
36978
|
import { Fragment as Fragment49, jsx as jsx281, jsxs as jsxs216 } from "react/jsx-runtime";
|
|
@@ -37117,7 +37150,7 @@ var PolicyConfigurationPanel = ({
|
|
|
37117
37150
|
}) => {
|
|
37118
37151
|
const [expandedIds, setExpandedIds] = useState78(/* @__PURE__ */ new Set());
|
|
37119
37152
|
const [bulkLevels, setBulkLevels] = useState78({});
|
|
37120
|
-
|
|
37153
|
+
useEffect58(() => {
|
|
37121
37154
|
setBulkLevels({});
|
|
37122
37155
|
}, [editMode]);
|
|
37123
37156
|
const handleToggle = (categoryId) => {
|
|
@@ -37157,7 +37190,7 @@ PolicyConfigurationPanel.displayName = "PolicyConfigurationPanel";
|
|
|
37157
37190
|
init_button2();
|
|
37158
37191
|
|
|
37159
37192
|
// src/components/ui/phone-input.tsx
|
|
37160
|
-
import { useCallback as useCallback30, useEffect as
|
|
37193
|
+
import { useCallback as useCallback30, useEffect as useEffect59, useMemo as useMemo35, useRef as useRef43, useState as useState79 } from "react";
|
|
37161
37194
|
import { jsx as jsx282, jsxs as jsxs217 } from "react/jsx-runtime";
|
|
37162
37195
|
function PhoneInput({
|
|
37163
37196
|
value,
|
|
@@ -37191,7 +37224,7 @@ function PhoneInput({
|
|
|
37191
37224
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
37192
37225
|
debounceRef.current = setTimeout(() => runValidation(phone), 300);
|
|
37193
37226
|
}, [runValidation]);
|
|
37194
|
-
|
|
37227
|
+
useEffect59(() => {
|
|
37195
37228
|
return () => {
|
|
37196
37229
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
37197
37230
|
};
|
|
@@ -37258,7 +37291,7 @@ function CountryOption({ country }) {
|
|
|
37258
37291
|
// src/components/features/waitlist-form.tsx
|
|
37259
37292
|
init_cn();
|
|
37260
37293
|
import { getCountries as getCountries2 } from "libphonenumber-js";
|
|
37261
|
-
import { useEffect as
|
|
37294
|
+
import { useEffect as useEffect60, useState as useState80 } from "react";
|
|
37262
37295
|
import { Fragment as Fragment50, jsx as jsx283, jsxs as jsxs218 } from "react/jsx-runtime";
|
|
37263
37296
|
function WaitlistForm({
|
|
37264
37297
|
id = "waitlist-form",
|
|
@@ -37288,12 +37321,12 @@ function WaitlistForm({
|
|
|
37288
37321
|
const [isPhoneInvalid, setIsPhoneInvalid] = useState80(false);
|
|
37289
37322
|
const [showConsentError, setShowConsentError] = useState80(false);
|
|
37290
37323
|
const isMailDomainGeneric = hasGenericEmailDomain(email);
|
|
37291
|
-
|
|
37324
|
+
useEffect60(() => {
|
|
37292
37325
|
if (defaultEmail) {
|
|
37293
37326
|
setEmail(defaultEmail);
|
|
37294
37327
|
}
|
|
37295
37328
|
}, [defaultEmail]);
|
|
37296
|
-
|
|
37329
|
+
useEffect60(() => {
|
|
37297
37330
|
setIsClient(true);
|
|
37298
37331
|
if (!geoApiUrl) return;
|
|
37299
37332
|
const supportedCountries = new Set(getCountries2());
|
|
@@ -37681,7 +37714,7 @@ function useOptionalNotifications() {
|
|
|
37681
37714
|
}
|
|
37682
37715
|
|
|
37683
37716
|
// src/components/features/notifications/notification-drawer.tsx
|
|
37684
|
-
import { useEffect as
|
|
37717
|
+
import { useEffect as useEffect64, useRef as useRef46 } from "react";
|
|
37685
37718
|
|
|
37686
37719
|
// src/components/navigation/app-layout-context.ts
|
|
37687
37720
|
import { createContext as createContext10, useContext as useContext10 } from "react";
|
|
@@ -38176,7 +38209,7 @@ init_button2();
|
|
|
38176
38209
|
init_cn();
|
|
38177
38210
|
|
|
38178
38211
|
// src/components/features/notifications/notification-tile.tsx
|
|
38179
|
-
import { useMemo as useMemo37, useEffect as
|
|
38212
|
+
import { useMemo as useMemo37, useEffect as useEffect63, useState as useState83 } from "react";
|
|
38180
38213
|
init_cn();
|
|
38181
38214
|
import { jsx as jsx286, jsxs as jsxs220 } from "react/jsx-runtime";
|
|
38182
38215
|
var variantBySeverity = {
|
|
@@ -38224,7 +38257,7 @@ function NotificationTile({
|
|
|
38224
38257
|
const initialElapsed = useMemo37(() => Date.now() - createdAt, [createdAt]);
|
|
38225
38258
|
const isLive = !read && !settled && initialElapsed < liveDurationMs;
|
|
38226
38259
|
const counting = isLive && !paused;
|
|
38227
|
-
|
|
38260
|
+
useEffect63(() => {
|
|
38228
38261
|
if (!counting) return;
|
|
38229
38262
|
const remaining = Math.max(0, liveDurationMs - initialElapsed);
|
|
38230
38263
|
const timer = window.setTimeout(() => {
|
|
@@ -38453,7 +38486,7 @@ function DrawerScrollList({
|
|
|
38453
38486
|
const sentinelRef = useRef46(null);
|
|
38454
38487
|
const loadMoreRef = useRef46(loadMore);
|
|
38455
38488
|
loadMoreRef.current = loadMore;
|
|
38456
|
-
|
|
38489
|
+
useEffect64(() => {
|
|
38457
38490
|
if (!loadMore || !hasMore || isLoadingMore) return;
|
|
38458
38491
|
const sentinel = sentinelRef.current;
|
|
38459
38492
|
const root = scrollRef.current;
|
|
@@ -38990,12 +39023,12 @@ function useOptionalTimeTracker() {
|
|
|
38990
39023
|
|
|
38991
39024
|
// src/components/features/time-tracker/time-tracker-panel.tsx
|
|
38992
39025
|
init_cn();
|
|
38993
|
-
import { useEffect as
|
|
39026
|
+
import { useEffect as useEffect66, useState as useState87 } from "react";
|
|
38994
39027
|
init_button();
|
|
38995
39028
|
init_split_button();
|
|
38996
39029
|
|
|
38997
39030
|
// src/components/features/time-tracker/use-tracker-clock.ts
|
|
38998
|
-
import { useEffect as
|
|
39031
|
+
import { useEffect as useEffect65, useState as useState86 } from "react";
|
|
38999
39032
|
function formatElapsed(totalMs) {
|
|
39000
39033
|
const totalSeconds = Math.max(0, Math.floor(totalMs / 1e3));
|
|
39001
39034
|
const hours = Math.floor(totalSeconds / 3600);
|
|
@@ -39006,7 +39039,7 @@ function formatElapsed(totalMs) {
|
|
|
39006
39039
|
}
|
|
39007
39040
|
function useTrackerClock({ status, runningSince, accumulatedMs = 0 }) {
|
|
39008
39041
|
const [now, setNow] = useState86(() => Date.now());
|
|
39009
|
-
|
|
39042
|
+
useEffect65(() => {
|
|
39010
39043
|
if (status !== "tracking") return;
|
|
39011
39044
|
setNow(Date.now());
|
|
39012
39045
|
const id = setInterval(() => setNow(Date.now()), 1e3);
|
|
@@ -39066,7 +39099,7 @@ function TimeTrackerPanel({
|
|
|
39066
39099
|
const isActive = status !== "ready";
|
|
39067
39100
|
const hasContent2 = selectedTicketId != null || notes.trim() !== "";
|
|
39068
39101
|
const showFieldError = isActive && showValidationError && !hasContent2;
|
|
39069
|
-
|
|
39102
|
+
useEffect66(() => {
|
|
39070
39103
|
if (status === "ready") setShowValidationError(false);
|
|
39071
39104
|
}, [status]);
|
|
39072
39105
|
const handleSubmit = () => {
|
|
@@ -39317,7 +39350,7 @@ function LastEntryRow({ entry, onClick }) {
|
|
|
39317
39350
|
// src/components/features/time-tracker/time-tracker-header-button.tsx
|
|
39318
39351
|
init_cn();
|
|
39319
39352
|
import * as PopoverPrimitive5 from "@radix-ui/react-popover";
|
|
39320
|
-
import { useEffect as
|
|
39353
|
+
import { useEffect as useEffect67, useRef as useRef47 } from "react";
|
|
39321
39354
|
|
|
39322
39355
|
// src/components/navigation/header-button.tsx
|
|
39323
39356
|
init_cn();
|
|
@@ -39412,10 +39445,10 @@ function TimeTrackerHeaderButton({ className, disabled }) {
|
|
|
39412
39445
|
}
|
|
39413
39446
|
};
|
|
39414
39447
|
}
|
|
39415
|
-
|
|
39448
|
+
useEffect67(() => {
|
|
39416
39449
|
if (isOpen) coordination?.notifyDrawerDidOpen(selfHandleRef.current ?? void 0);
|
|
39417
39450
|
}, [isOpen, coordination]);
|
|
39418
|
-
|
|
39451
|
+
useEffect67(() => {
|
|
39419
39452
|
if (!selfHandleRef.current) return;
|
|
39420
39453
|
return coordination?.registerDrawer(selfHandleRef.current);
|
|
39421
39454
|
}, [coordination]);
|
|
@@ -40461,7 +40494,7 @@ function SortableRow({
|
|
|
40461
40494
|
|
|
40462
40495
|
// src/components/navigation/header.tsx
|
|
40463
40496
|
init_next_link();
|
|
40464
|
-
import React117, { useEffect as
|
|
40497
|
+
import React117, { useEffect as useEffect71, useRef as useRef51, useState as useState92 } from "react";
|
|
40465
40498
|
init_button2();
|
|
40466
40499
|
|
|
40467
40500
|
// src/components/navigation/mingo-ai-button.tsx
|
|
@@ -40642,7 +40675,7 @@ import React116 from "react";
|
|
|
40642
40675
|
import { useQueryClient } from "@tanstack/react-query";
|
|
40643
40676
|
|
|
40644
40677
|
// src/components/chat/hooks/use-chat-identity.ts
|
|
40645
|
-
import { createContext as createContext13, createElement as createElement2, useContext as useContext13, useEffect as
|
|
40678
|
+
import { createContext as createContext13, createElement as createElement2, useContext as useContext13, useEffect as useEffect70, useState as useState91 } from "react";
|
|
40646
40679
|
var ANON_DEFAULTS = {
|
|
40647
40680
|
authTier: "anon",
|
|
40648
40681
|
source: null,
|
|
@@ -40655,7 +40688,7 @@ function useResolveChatIdentity(enabled) {
|
|
|
40655
40688
|
const proxyEmail = getEmbedProxyAuth()?.email ?? null;
|
|
40656
40689
|
const [data, setData] = useState91(ANON_DEFAULTS);
|
|
40657
40690
|
const [isLoading, setIsLoading] = useState91(enabled);
|
|
40658
|
-
|
|
40691
|
+
useEffect70(() => {
|
|
40659
40692
|
if (!enabled) return;
|
|
40660
40693
|
let cancelled = false;
|
|
40661
40694
|
const ctrl = new AbortController();
|
|
@@ -41070,7 +41103,7 @@ function Header2({ config, platform }) {
|
|
|
41070
41103
|
const [openDropdowns, setOpenDropdowns] = useState92({});
|
|
41071
41104
|
const dropdownRefs = useRef51({});
|
|
41072
41105
|
const triggerRefs = useRef51({});
|
|
41073
|
-
|
|
41106
|
+
useEffect71(() => {
|
|
41074
41107
|
const handleClickOutside = (event) => {
|
|
41075
41108
|
const target = event.target;
|
|
41076
41109
|
if (!target) return;
|
|
@@ -41099,14 +41132,14 @@ function Header2({ config, platform }) {
|
|
|
41099
41132
|
document.removeEventListener("keydown", handleEscapeKey);
|
|
41100
41133
|
};
|
|
41101
41134
|
}, [openDropdowns]);
|
|
41102
|
-
|
|
41135
|
+
useEffect71(() => {
|
|
41103
41136
|
return () => {
|
|
41104
41137
|
setOpenDropdowns({});
|
|
41105
41138
|
dropdownRefs.current = {};
|
|
41106
41139
|
triggerRefs.current = {};
|
|
41107
41140
|
};
|
|
41108
41141
|
}, []);
|
|
41109
|
-
|
|
41142
|
+
useEffect71(() => {
|
|
41110
41143
|
if (!config.autoHide) {
|
|
41111
41144
|
setShow(true);
|
|
41112
41145
|
return;
|
|
@@ -41360,7 +41393,7 @@ function Header2({ config, platform }) {
|
|
|
41360
41393
|
}
|
|
41361
41394
|
|
|
41362
41395
|
// src/components/navigation/client-only-header.tsx
|
|
41363
|
-
import { useState as useState93, useEffect as
|
|
41396
|
+
import { useState as useState93, useEffect as useEffect72 } from "react";
|
|
41364
41397
|
|
|
41365
41398
|
// src/components/navigation/header-skeleton.tsx
|
|
41366
41399
|
import { Fragment as Fragment59, jsx as jsx308, jsxs as jsxs237 } from "react/jsx-runtime";
|
|
@@ -41400,7 +41433,7 @@ function HeaderSkeleton({ config }) {
|
|
|
41400
41433
|
import { jsx as jsx309 } from "react/jsx-runtime";
|
|
41401
41434
|
function ClientOnlyHeader({ config, skeleton }) {
|
|
41402
41435
|
const [isClient, setIsClient] = useState93(false);
|
|
41403
|
-
|
|
41436
|
+
useEffect72(() => {
|
|
41404
41437
|
setIsClient(true);
|
|
41405
41438
|
}, []);
|
|
41406
41439
|
if (!isClient) {
|
|
@@ -41410,7 +41443,7 @@ function ClientOnlyHeader({ config, skeleton }) {
|
|
|
41410
41443
|
}
|
|
41411
41444
|
|
|
41412
41445
|
// src/components/navigation/sliding-sidebar.tsx
|
|
41413
|
-
import { useState as useState94, useEffect as
|
|
41446
|
+
import { useState as useState94, useEffect as useEffect73, useRef as useRef52 } from "react";
|
|
41414
41447
|
import { motion as motion2, AnimatePresence, useReducedMotion } from "framer-motion";
|
|
41415
41448
|
import { usePreventScroll as usePreventScroll3 } from "@react-aria/overlays";
|
|
41416
41449
|
init_button2();
|
|
@@ -41423,7 +41456,7 @@ function SlidingSidebar({ config }) {
|
|
|
41423
41456
|
const prefersReducedMotion2 = useReducedMotion();
|
|
41424
41457
|
usePreventScroll3({ isDisabled: !config.isOpen });
|
|
41425
41458
|
useFocusTrap(asideRef, config.isOpen, { onEscape: config.onClose, contain: false });
|
|
41426
|
-
|
|
41459
|
+
useEffect73(() => {
|
|
41427
41460
|
setMounted(true);
|
|
41428
41461
|
}, []);
|
|
41429
41462
|
const toggleExpanded = (itemId) => {
|
|
@@ -41591,7 +41624,7 @@ function SlidingSidebar({ config }) {
|
|
|
41591
41624
|
}
|
|
41592
41625
|
|
|
41593
41626
|
// src/components/navigation/sticky-section-nav.tsx
|
|
41594
|
-
import { useEffect as
|
|
41627
|
+
import { useEffect as useEffect74, useState as useState95, useCallback as useCallback37, useRef as useRef53 } from "react";
|
|
41595
41628
|
import { jsx as jsx311, jsxs as jsxs239 } from "react/jsx-runtime";
|
|
41596
41629
|
function StickySectionNav({
|
|
41597
41630
|
sections,
|
|
@@ -41665,14 +41698,14 @@ function useSectionNavigation(sections, options) {
|
|
|
41665
41698
|
isScrollingFromClick.current = false;
|
|
41666
41699
|
}, 500);
|
|
41667
41700
|
}, [offset2]);
|
|
41668
|
-
|
|
41701
|
+
useEffect74(() => {
|
|
41669
41702
|
sections.forEach((section) => {
|
|
41670
41703
|
if (section.ref.current && !section.ref.current.id) {
|
|
41671
41704
|
section.ref.current.id = section.id;
|
|
41672
41705
|
}
|
|
41673
41706
|
});
|
|
41674
41707
|
}, [sections]);
|
|
41675
|
-
|
|
41708
|
+
useEffect74(() => {
|
|
41676
41709
|
const handleScroll = () => {
|
|
41677
41710
|
if (isScrollingFromClick.current) return;
|
|
41678
41711
|
const scrollPosition = window.scrollY + offset2 + 50;
|
|
@@ -41705,7 +41738,7 @@ function useSectionNavigation(sections, options) {
|
|
|
41705
41738
|
}
|
|
41706
41739
|
|
|
41707
41740
|
// src/components/navigation/navigation-sidebar.tsx
|
|
41708
|
-
import { useCallback as useCallback38, useEffect as
|
|
41741
|
+
import { useCallback as useCallback38, useEffect as useEffect75, useMemo as useMemo42, useState as useState96 } from "react";
|
|
41709
41742
|
|
|
41710
41743
|
// src/components/navigation/navigation-sidebar-header.tsx
|
|
41711
41744
|
import { jsx as jsx312, jsxs as jsxs240 } from "react/jsx-runtime";
|
|
@@ -41877,11 +41910,11 @@ function NavigationSidebar({ config, disabled = false }) {
|
|
|
41877
41910
|
config.minimized ?? false
|
|
41878
41911
|
);
|
|
41879
41912
|
const [tabletMinimized, setTabletMinimized] = useState96(true);
|
|
41880
|
-
|
|
41913
|
+
useEffect75(() => {
|
|
41881
41914
|
if (isTablet) setTabletMinimized(true);
|
|
41882
41915
|
}, [isTablet]);
|
|
41883
41916
|
const [hydrated, setHydrated] = useState96(false);
|
|
41884
|
-
|
|
41917
|
+
useEffect75(() => setHydrated(true), []);
|
|
41885
41918
|
const minimized = hydrated ? isTablet ? tabletMinimized : desktopMinimized : config.minimized ?? false;
|
|
41886
41919
|
const [transitionsEnabled, setTransitionsEnabled] = useState96(false);
|
|
41887
41920
|
const isOverlayOpen = isTablet && !minimized;
|
|
@@ -41897,7 +41930,7 @@ function NavigationSidebar({ config, disabled = false }) {
|
|
|
41897
41930
|
const closeOverlay = useCallback38(() => {
|
|
41898
41931
|
setTabletMinimized(true);
|
|
41899
41932
|
}, []);
|
|
41900
|
-
|
|
41933
|
+
useEffect75(() => {
|
|
41901
41934
|
if (!isOverlayOpen) return;
|
|
41902
41935
|
const handleKeyDown = (e) => {
|
|
41903
41936
|
if (e.key === "Escape") closeOverlay();
|
|
@@ -41910,7 +41943,7 @@ function NavigationSidebar({ config, disabled = false }) {
|
|
|
41910
41943
|
() => config.items.find((item) => item.isActive)?.id ?? null,
|
|
41911
41944
|
[config.items]
|
|
41912
41945
|
);
|
|
41913
|
-
|
|
41946
|
+
useEffect75(() => {
|
|
41914
41947
|
setPendingItemId(null);
|
|
41915
41948
|
}, [committedActiveId]);
|
|
41916
41949
|
const handleItemClick = useCallback38((item, event) => {
|
|
@@ -44093,7 +44126,7 @@ var ListLoader = (props) => /* @__PURE__ */ jsx338(ContentLoader, { ...props, va
|
|
|
44093
44126
|
|
|
44094
44127
|
// src/components/ui/table/table.tsx
|
|
44095
44128
|
init_cn();
|
|
44096
|
-
import { useEffect as
|
|
44129
|
+
import { useEffect as useEffect77, useRef as useRef58 } from "react";
|
|
44097
44130
|
init_pagination();
|
|
44098
44131
|
init_button2();
|
|
44099
44132
|
|
|
@@ -44704,10 +44737,10 @@ function TableRow({
|
|
|
44704
44737
|
}
|
|
44705
44738
|
|
|
44706
44739
|
// src/components/ui/table/use-table-motion.ts
|
|
44707
|
-
import { useEffect as
|
|
44740
|
+
import { useEffect as useEffect76, useState as useState99 } from "react";
|
|
44708
44741
|
function useTableMotion(enabled) {
|
|
44709
44742
|
const [runtime, setRuntime] = useState99(null);
|
|
44710
|
-
|
|
44743
|
+
useEffect76(() => {
|
|
44711
44744
|
if (!enabled || runtime) return;
|
|
44712
44745
|
let active = true;
|
|
44713
44746
|
import("framer-motion").then((m) => {
|
|
@@ -44856,7 +44889,7 @@ function Table({
|
|
|
44856
44889
|
const sentinelRef = useRef58(null);
|
|
44857
44890
|
const onLoadMoreRef = useRef58(infiniteScroll?.onLoadMore);
|
|
44858
44891
|
onLoadMoreRef.current = infiniteScroll?.onLoadMore;
|
|
44859
|
-
|
|
44892
|
+
useEffect77(() => {
|
|
44860
44893
|
if (!infiniteScroll?.hasNextPage || infiniteScroll.isFetchingNextPage) return;
|
|
44861
44894
|
const sentinel = sentinelRef.current;
|
|
44862
44895
|
if (!sentinel) return;
|
|
@@ -46050,7 +46083,7 @@ function DataTableBody({
|
|
|
46050
46083
|
}
|
|
46051
46084
|
|
|
46052
46085
|
// src/components/ui/data-table/data-table-infinite-footer.tsx
|
|
46053
|
-
import { useEffect as
|
|
46086
|
+
import { useEffect as useEffect78, useRef as useRef62 } from "react";
|
|
46054
46087
|
import { Fragment as Fragment72, jsx as jsx361, jsxs as jsxs282 } from "react/jsx-runtime";
|
|
46055
46088
|
function DataTableInfiniteFooter({
|
|
46056
46089
|
hasNextPage,
|
|
@@ -46062,7 +46095,7 @@ function DataTableInfiniteFooter({
|
|
|
46062
46095
|
const sentinelRef = useRef62(null);
|
|
46063
46096
|
const onLoadMoreRef = useRef62(onLoadMore);
|
|
46064
46097
|
onLoadMoreRef.current = onLoadMore;
|
|
46065
|
-
|
|
46098
|
+
useEffect78(() => {
|
|
46066
46099
|
if (!hasNextPage || isFetchingNextPage) return;
|
|
46067
46100
|
const sentinel = sentinelRef.current;
|
|
46068
46101
|
if (!sentinel) return;
|
|
@@ -46700,7 +46733,7 @@ function FilterList({
|
|
|
46700
46733
|
|
|
46701
46734
|
// src/components/ui/tag-search-input.tsx
|
|
46702
46735
|
import {
|
|
46703
|
-
useEffect as
|
|
46736
|
+
useEffect as useEffect80,
|
|
46704
46737
|
useRef as useRef64,
|
|
46705
46738
|
useState as useState103
|
|
46706
46739
|
} from "react";
|
|
@@ -46740,7 +46773,7 @@ function TagSearchInput({
|
|
|
46740
46773
|
const hiddenTagsRef = useRef64(null);
|
|
46741
46774
|
const hiddenTagsPopupRef = useRef64(null);
|
|
46742
46775
|
const [showHiddenTags, setShowHiddenTags] = useState103(false);
|
|
46743
|
-
|
|
46776
|
+
useEffect80(() => {
|
|
46744
46777
|
if (!showHiddenTags) return;
|
|
46745
46778
|
const handleClick = (e) => {
|
|
46746
46779
|
const target = e.target;
|
|
@@ -46902,7 +46935,7 @@ function TagSearchInput({
|
|
|
46902
46935
|
}
|
|
46903
46936
|
|
|
46904
46937
|
// src/components/ui/markdown-editor.tsx
|
|
46905
|
-
import { useRef as useRef65, useCallback as useCallback46, useState as useState104, useEffect as
|
|
46938
|
+
import { useRef as useRef65, useCallback as useCallback46, useState as useState104, useEffect as useEffect81 } from "react";
|
|
46906
46939
|
init_cn();
|
|
46907
46940
|
import { Loader2 as Loader28, Upload as Upload8 } from "lucide-react";
|
|
46908
46941
|
import { jsx as jsx366, jsxs as jsxs287 } from "react/jsx-runtime";
|
|
@@ -46933,7 +46966,7 @@ body .w-md-editor .w-md-editor-bar::after { content: '' !important; display: blo
|
|
|
46933
46966
|
body .w-md-editor .w-md-editor-bar:hover::after { border-color: var(--color-text-secondary) !important; }
|
|
46934
46967
|
`;
|
|
46935
46968
|
function MarkdownEditorStyles() {
|
|
46936
|
-
|
|
46969
|
+
useEffect81(() => {
|
|
46937
46970
|
if (document.getElementById(MARKDOWN_EDITOR_STYLE_ID)) return;
|
|
46938
46971
|
const style = document.createElement("style");
|
|
46939
46972
|
style.id = MARKDOWN_EDITOR_STYLE_ID;
|
|
@@ -46961,7 +46994,7 @@ function MarkdownEditor({
|
|
|
46961
46994
|
const [isUploading, setIsUploading] = useState104(false);
|
|
46962
46995
|
const [uploadProgress, setUploadProgress] = useState104("");
|
|
46963
46996
|
const [defaultExtraCommands, setDefaultExtraCommands] = useState104([]);
|
|
46964
|
-
|
|
46997
|
+
useEffect81(() => {
|
|
46965
46998
|
import("@uiw/react-md-editor").then((mod) => {
|
|
46966
46999
|
if (mod.commands?.getExtraCommands) {
|
|
46967
47000
|
setDefaultExtraCommands(mod.commands.getExtraCommands());
|
|
@@ -47084,7 +47117,7 @@ function MarkdownEditor({
|
|
|
47084
47117
|
}
|
|
47085
47118
|
rafRef.current = requestAnimationFrame(scrollLoop);
|
|
47086
47119
|
}, []);
|
|
47087
|
-
|
|
47120
|
+
useEffect81(() => {
|
|
47088
47121
|
const wrapper = wrapperRef.current;
|
|
47089
47122
|
if (!wrapper) return;
|
|
47090
47123
|
const onMouseMove = (e) => {
|
|
@@ -49047,7 +49080,7 @@ function ImageGalleryModal({
|
|
|
49047
49080
|
initialIndex = 0
|
|
49048
49081
|
}) {
|
|
49049
49082
|
const [selectedImageIndex, setSelectedImageIndex] = useState115(initialIndex);
|
|
49050
|
-
|
|
49083
|
+
useEffect88(() => {
|
|
49051
49084
|
if (isOpen) {
|
|
49052
49085
|
setSelectedImageIndex(initialIndex);
|
|
49053
49086
|
}
|
|
@@ -49062,7 +49095,7 @@ function ImageGalleryModal({
|
|
|
49062
49095
|
setSelectedImageIndex(selectedImageIndex + 1);
|
|
49063
49096
|
}
|
|
49064
49097
|
};
|
|
49065
|
-
|
|
49098
|
+
useEffect88(() => {
|
|
49066
49099
|
const handleKeyPress = (event) => {
|
|
49067
49100
|
if (!isOpen) return;
|
|
49068
49101
|
switch (event.key) {
|
|
@@ -53651,7 +53684,7 @@ function useChunkCatchup({
|
|
|
53651
53684
|
}
|
|
53652
53685
|
|
|
53653
53686
|
// src/components/chat/hooks/use-scripted-stream.ts
|
|
53654
|
-
import { useEffect as
|
|
53687
|
+
import { useEffect as useEffect89, useState as useState118 } from "react";
|
|
53655
53688
|
var EMPTY_FRAME = { messages: [], phase: "idle", typing: false, delayMs: 0 };
|
|
53656
53689
|
function prefersReducedMotion() {
|
|
53657
53690
|
return typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === true;
|
|
@@ -53664,7 +53697,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
|
|
|
53664
53697
|
setPrevKey(resetKey);
|
|
53665
53698
|
setIndex(0);
|
|
53666
53699
|
}
|
|
53667
|
-
|
|
53700
|
+
useEffect89(() => {
|
|
53668
53701
|
setReducedMotion(prefersReducedMotion());
|
|
53669
53702
|
const mq = window.matchMedia?.("(prefers-reduced-motion: reduce)");
|
|
53670
53703
|
if (!mq) return;
|
|
@@ -53674,7 +53707,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
|
|
|
53674
53707
|
}, []);
|
|
53675
53708
|
const playing = enabled && !reducedMotion && frames.length > 0;
|
|
53676
53709
|
const lastIndex = Math.max(0, frames.length - 1);
|
|
53677
|
-
|
|
53710
|
+
useEffect89(() => {
|
|
53678
53711
|
if (!playing || index >= lastIndex) return;
|
|
53679
53712
|
const current = frames[Math.min(index, lastIndex)] ?? EMPTY_FRAME;
|
|
53680
53713
|
const t = setTimeout(() => setIndex((i) => Math.min(i + 1, lastIndex)), current.delayMs);
|
|
@@ -53686,7 +53719,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
|
|
|
53686
53719
|
}
|
|
53687
53720
|
|
|
53688
53721
|
// src/components/chat/hooks/use-jetstream-dialog-subscription.ts
|
|
53689
|
-
import { useCallback as useCallback50, useEffect as
|
|
53722
|
+
import { useCallback as useCallback50, useEffect as useEffect90, useRef as useRef70, useState as useState119 } from "react";
|
|
53690
53723
|
var DEFAULT_STREAM_NAME = "CHAT_CHUNKS";
|
|
53691
53724
|
var RESYNC_AFTER_HIDDEN_MS = 1e4;
|
|
53692
53725
|
var RESYNC_COALESCE_MS = 1e3;
|
|
@@ -53720,49 +53753,49 @@ function useJetStreamDialogSubscription({
|
|
|
53720
53753
|
const subscriptionRef = useRef70(null);
|
|
53721
53754
|
const highestStreamSeqRef = useRef70(null);
|
|
53722
53755
|
const onEventRef = useRef70(onEvent);
|
|
53723
|
-
|
|
53756
|
+
useEffect90(() => {
|
|
53724
53757
|
onEventRef.current = onEvent;
|
|
53725
53758
|
}, [onEvent]);
|
|
53726
53759
|
const onConnectRef = useRef70(onConnect);
|
|
53727
|
-
|
|
53760
|
+
useEffect90(() => {
|
|
53728
53761
|
onConnectRef.current = onConnect;
|
|
53729
53762
|
}, [onConnect]);
|
|
53730
53763
|
const onDisconnectRef = useRef70(onDisconnect);
|
|
53731
|
-
|
|
53764
|
+
useEffect90(() => {
|
|
53732
53765
|
onDisconnectRef.current = onDisconnect;
|
|
53733
53766
|
}, [onDisconnect]);
|
|
53734
53767
|
const onSubscribedRef = useRef70(onSubscribed);
|
|
53735
|
-
|
|
53768
|
+
useEffect90(() => {
|
|
53736
53769
|
onSubscribedRef.current = onSubscribed;
|
|
53737
53770
|
}, [onSubscribed]);
|
|
53738
53771
|
const onBeforeReconnectRef = useRef70(onBeforeReconnect);
|
|
53739
|
-
|
|
53772
|
+
useEffect90(() => {
|
|
53740
53773
|
onBeforeReconnectRef.current = onBeforeReconnect;
|
|
53741
53774
|
}, [onBeforeReconnect]);
|
|
53742
53775
|
const getNatsWsUrlRef = useRef70(getNatsWsUrl);
|
|
53743
|
-
|
|
53776
|
+
useEffect90(() => {
|
|
53744
53777
|
getNatsWsUrlRef.current = getNatsWsUrl;
|
|
53745
53778
|
}, [getNatsWsUrl]);
|
|
53746
53779
|
const reconnectionBackoffRef = useRef70(reconnectionBackoff);
|
|
53747
|
-
|
|
53780
|
+
useEffect90(() => {
|
|
53748
53781
|
reconnectionBackoffRef.current = reconnectionBackoff;
|
|
53749
53782
|
}, [reconnectionBackoff]);
|
|
53750
53783
|
const optStartSeqRef = useRef70(optStartSeq);
|
|
53751
|
-
|
|
53784
|
+
useEffect90(() => {
|
|
53752
53785
|
optStartSeqRef.current = optStartSeq;
|
|
53753
53786
|
}, [optStartSeq]);
|
|
53754
53787
|
const inactiveThresholdRef = useRef70(inactiveThresholdMs);
|
|
53755
|
-
|
|
53788
|
+
useEffect90(() => {
|
|
53756
53789
|
inactiveThresholdRef.current = inactiveThresholdMs;
|
|
53757
53790
|
}, [inactiveThresholdMs]);
|
|
53758
53791
|
const hadConnectionBeforeRef = useRef70(false);
|
|
53759
53792
|
const clientConfigRef = useRef70(clientConfig);
|
|
53760
|
-
|
|
53793
|
+
useEffect90(() => {
|
|
53761
53794
|
clientConfigRef.current = clientConfig;
|
|
53762
53795
|
}, [clientConfig]);
|
|
53763
53796
|
const currentWsUrlRef = useRef70("");
|
|
53764
53797
|
const wsUrl = getNatsWsUrl();
|
|
53765
|
-
|
|
53798
|
+
useEffect90(() => {
|
|
53766
53799
|
if (!enabled || !wsUrl) {
|
|
53767
53800
|
if (currentWsUrlRef.current && clientRef.current) {
|
|
53768
53801
|
releaseClient(currentWsUrlRef.current);
|
|
@@ -53843,7 +53876,7 @@ function useJetStreamDialogSubscription({
|
|
|
53843
53876
|
}
|
|
53844
53877
|
};
|
|
53845
53878
|
}, [enabled, wsUrl]);
|
|
53846
|
-
|
|
53879
|
+
useEffect90(() => {
|
|
53847
53880
|
highestStreamSeqRef.current = null;
|
|
53848
53881
|
lastResyncSignalRef.current = resyncSignal;
|
|
53849
53882
|
setCurrentStreamSeq(null);
|
|
@@ -53861,7 +53894,7 @@ function useJetStreamDialogSubscription({
|
|
|
53861
53894
|
setReconnectionCount((c) => c + 1);
|
|
53862
53895
|
}, RESYNC_COALESCE_MS);
|
|
53863
53896
|
}, []);
|
|
53864
|
-
|
|
53897
|
+
useEffect90(() => {
|
|
53865
53898
|
if (!enabled) return;
|
|
53866
53899
|
let hiddenSince = document.visibilityState === "hidden" ? Date.now() : 0;
|
|
53867
53900
|
const onVisibilityChange = () => {
|
|
@@ -53878,13 +53911,13 @@ function useJetStreamDialogSubscription({
|
|
|
53878
53911
|
document.addEventListener("visibilitychange", onVisibilityChange);
|
|
53879
53912
|
return () => document.removeEventListener("visibilitychange", onVisibilityChange);
|
|
53880
53913
|
}, [enabled, requestResync]);
|
|
53881
|
-
|
|
53914
|
+
useEffect90(() => {
|
|
53882
53915
|
if (!enabled) return;
|
|
53883
53916
|
if (resyncSignal <= lastResyncSignalRef.current) return;
|
|
53884
53917
|
lastResyncSignalRef.current = resyncSignal;
|
|
53885
53918
|
requestResync();
|
|
53886
53919
|
}, [enabled, resyncSignal, requestResync]);
|
|
53887
|
-
|
|
53920
|
+
useEffect90(() => {
|
|
53888
53921
|
if (!enabled || !dialogId || !isConnected) {
|
|
53889
53922
|
if (subscriptionRef.current) {
|
|
53890
53923
|
try {
|
|
@@ -53985,7 +54018,7 @@ function useJetStreamDialogSubscription({
|
|
|
53985
54018
|
}
|
|
53986
54019
|
|
|
53987
54020
|
// src/components/chat/hooks/use-nats-dialog-subscription.ts
|
|
53988
|
-
import { useEffect as
|
|
54021
|
+
import { useEffect as useEffect91, useRef as useRef71, useState as useState120 } from "react";
|
|
53989
54022
|
function useNatsDialogSubscription({
|
|
53990
54023
|
enabled,
|
|
53991
54024
|
dialogId,
|
|
@@ -54005,41 +54038,41 @@ function useNatsDialogSubscription({
|
|
|
54005
54038
|
const clientRef = useRef71(null);
|
|
54006
54039
|
const subscriptionRefs = useRef71(/* @__PURE__ */ new Map());
|
|
54007
54040
|
const onEventRef = useRef71(onEvent);
|
|
54008
|
-
|
|
54041
|
+
useEffect91(() => {
|
|
54009
54042
|
onEventRef.current = onEvent;
|
|
54010
54043
|
}, [onEvent]);
|
|
54011
54044
|
const onConnectRef = useRef71(onConnect);
|
|
54012
|
-
|
|
54045
|
+
useEffect91(() => {
|
|
54013
54046
|
onConnectRef.current = onConnect;
|
|
54014
54047
|
}, [onConnect]);
|
|
54015
54048
|
const onDisconnectRef = useRef71(onDisconnect);
|
|
54016
|
-
|
|
54049
|
+
useEffect91(() => {
|
|
54017
54050
|
onDisconnectRef.current = onDisconnect;
|
|
54018
54051
|
}, [onDisconnect]);
|
|
54019
54052
|
const onSubscribedRef = useRef71(onSubscribed);
|
|
54020
|
-
|
|
54053
|
+
useEffect91(() => {
|
|
54021
54054
|
onSubscribedRef.current = onSubscribed;
|
|
54022
54055
|
}, [onSubscribed]);
|
|
54023
54056
|
const onBeforeReconnectRef = useRef71(onBeforeReconnect);
|
|
54024
|
-
|
|
54057
|
+
useEffect91(() => {
|
|
54025
54058
|
onBeforeReconnectRef.current = onBeforeReconnect;
|
|
54026
54059
|
}, [onBeforeReconnect]);
|
|
54027
54060
|
const hadConnectionBeforeRef = useRef71(false);
|
|
54028
54061
|
const getNatsWsUrlRef = useRef71(getNatsWsUrl);
|
|
54029
|
-
|
|
54062
|
+
useEffect91(() => {
|
|
54030
54063
|
getNatsWsUrlRef.current = getNatsWsUrl;
|
|
54031
54064
|
}, [getNatsWsUrl]);
|
|
54032
54065
|
const reconnectionBackoffRef = useRef71(reconnectionBackoff);
|
|
54033
|
-
|
|
54066
|
+
useEffect91(() => {
|
|
54034
54067
|
reconnectionBackoffRef.current = reconnectionBackoff;
|
|
54035
54068
|
}, [reconnectionBackoff]);
|
|
54036
54069
|
const clientConfigRef = useRef71(clientConfig);
|
|
54037
|
-
|
|
54070
|
+
useEffect91(() => {
|
|
54038
54071
|
clientConfigRef.current = clientConfig;
|
|
54039
54072
|
}, [clientConfig]);
|
|
54040
54073
|
const currentWsUrlRef = useRef71("");
|
|
54041
54074
|
const wsUrl = getNatsWsUrl();
|
|
54042
|
-
|
|
54075
|
+
useEffect91(() => {
|
|
54043
54076
|
if (!enabled || !wsUrl) {
|
|
54044
54077
|
if (currentWsUrlRef.current && clientRef.current) {
|
|
54045
54078
|
releaseClient(currentWsUrlRef.current);
|
|
@@ -54125,12 +54158,12 @@ function useNatsDialogSubscription({
|
|
|
54125
54158
|
topicsRef.current = topics;
|
|
54126
54159
|
const lastSubscribedDialogIdRef = useRef71(null);
|
|
54127
54160
|
const isConnectedRef = useRef71(isConnected);
|
|
54128
|
-
|
|
54161
|
+
useEffect91(() => {
|
|
54129
54162
|
isConnectedRef.current = isConnected;
|
|
54130
54163
|
}, [isConnected]);
|
|
54131
54164
|
const currentDialogIdRef = useRef71(null);
|
|
54132
54165
|
const abortControllerRef = useRef71(null);
|
|
54133
|
-
|
|
54166
|
+
useEffect91(() => {
|
|
54134
54167
|
currentDialogIdRef.current = dialogId;
|
|
54135
54168
|
if (!enabled || !dialogId) {
|
|
54136
54169
|
if (subscriptionRefs.current.size > 0) {
|
|
@@ -54211,7 +54244,7 @@ function useNatsDialogSubscription({
|
|
|
54211
54244
|
abortControllerRef.current = null;
|
|
54212
54245
|
};
|
|
54213
54246
|
}, [enabled, dialogId, topicsKey]);
|
|
54214
|
-
|
|
54247
|
+
useEffect91(() => {
|
|
54215
54248
|
if (!enabled || !currentDialogIdRef.current || !isConnected) {
|
|
54216
54249
|
return;
|
|
54217
54250
|
}
|
|
@@ -54261,7 +54294,7 @@ function buildNatsWsUrl(apiBaseUrl, options) {
|
|
|
54261
54294
|
}
|
|
54262
54295
|
|
|
54263
54296
|
// src/components/chat/hooks/use-slash-commands.ts
|
|
54264
|
-
import { useEffect as
|
|
54297
|
+
import { useEffect as useEffect92, useState as useState121 } from "react";
|
|
54265
54298
|
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
|
54266
54299
|
async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
54267
54300
|
try {
|
|
@@ -54280,7 +54313,7 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
|
54280
54313
|
function useSlashCommands(prefix, commandsUrl) {
|
|
54281
54314
|
const [commands, setCommands] = useState121([]);
|
|
54282
54315
|
const [loading, setLoading] = useState121(false);
|
|
54283
|
-
|
|
54316
|
+
useEffect92(() => {
|
|
54284
54317
|
if (prefix == null) {
|
|
54285
54318
|
setCommands([]);
|
|
54286
54319
|
return;
|
|
@@ -54629,7 +54662,7 @@ function useChatAttachments() {
|
|
|
54629
54662
|
}
|
|
54630
54663
|
|
|
54631
54664
|
// src/components/chat/hooks/use-chat-attachment-image-gallery.tsx
|
|
54632
|
-
import { useCallback as useCallback52, useEffect as
|
|
54665
|
+
import { useCallback as useCallback52, useEffect as useEffect93, useRef as useRef73, useState as useState123 } from "react";
|
|
54633
54666
|
import { jsx as jsx395 } from "react/jsx-runtime";
|
|
54634
54667
|
var CLOSED = { isOpen: false, images: [], initialIndex: 0 };
|
|
54635
54668
|
function useChatAttachmentImageGallery() {
|
|
@@ -54638,7 +54671,7 @@ function useChatAttachmentImageGallery() {
|
|
|
54638
54671
|
const panelRef = useRef73(null);
|
|
54639
54672
|
const [state, setState] = useState123(CLOSED);
|
|
54640
54673
|
const handleClose = useCallback52(() => setState(CLOSED), []);
|
|
54641
|
-
|
|
54674
|
+
useEffect93(() => {
|
|
54642
54675
|
const root = panelRef.current;
|
|
54643
54676
|
if (!root) return;
|
|
54644
54677
|
const onClick = (ev) => {
|
|
@@ -54684,11 +54717,11 @@ function absolutize(prefix) {
|
|
|
54684
54717
|
}
|
|
54685
54718
|
|
|
54686
54719
|
// src/components/chat/hooks/use-close-on-navigation.ts
|
|
54687
|
-
import { useEffect as
|
|
54720
|
+
import { useEffect as useEffect94, useRef as useRef74 } from "react";
|
|
54688
54721
|
function useCloseOnNavigation(close, pathname) {
|
|
54689
54722
|
const prevPathnameRef = useRef74(null);
|
|
54690
54723
|
const initializedRef = useRef74(false);
|
|
54691
|
-
|
|
54724
|
+
useEffect94(() => {
|
|
54692
54725
|
if (!initializedRef.current) {
|
|
54693
54726
|
initializedRef.current = true;
|
|
54694
54727
|
prevPathnameRef.current = pathname;
|
|
@@ -54702,7 +54735,7 @@ function useCloseOnNavigation(close, pathname) {
|
|
|
54702
54735
|
}
|
|
54703
54736
|
|
|
54704
54737
|
// src/components/chat/hooks/use-chat.ts
|
|
54705
|
-
import { useState as useState125, useCallback as useCallback54, useEffect as
|
|
54738
|
+
import { useState as useState125, useCallback as useCallback54, useEffect as useEffect95, useRef as useRef76 } from "react";
|
|
54706
54739
|
|
|
54707
54740
|
// src/components/chat/hooks/use-sse.ts
|
|
54708
54741
|
import { useState as useState124, useCallback as useCallback53, useRef as useRef75 } from "react";
|
|
@@ -54780,7 +54813,7 @@ function useChat({
|
|
|
54780
54813
|
const currentAssistantSegmentsRef = useRef76([]);
|
|
54781
54814
|
const onMessagesChangeRef = useRef76(onMessagesChange);
|
|
54782
54815
|
onMessagesChangeRef.current = onMessagesChange;
|
|
54783
|
-
|
|
54816
|
+
useEffect95(() => {
|
|
54784
54817
|
onMessagesChangeRef.current?.(messages);
|
|
54785
54818
|
}, [messages]);
|
|
54786
54819
|
const {
|
|
@@ -55317,7 +55350,7 @@ function pruneStaleChatConversationStorage(source) {
|
|
|
55317
55350
|
}
|
|
55318
55351
|
|
|
55319
55352
|
// src/components/chat/hooks/use-chat-history-hydration.ts
|
|
55320
|
-
import { useEffect as
|
|
55353
|
+
import { useEffect as useEffect96, useRef as useRef77, useState as useState126 } from "react";
|
|
55321
55354
|
function useChatHistoryHydration({
|
|
55322
55355
|
active,
|
|
55323
55356
|
source,
|
|
@@ -55329,7 +55362,7 @@ function useChatHistoryHydration({
|
|
|
55329
55362
|
}) {
|
|
55330
55363
|
const [isHydratingHistory, setIsHydratingHistory] = useState126(false);
|
|
55331
55364
|
const hydratedKeyRef = useRef77(null);
|
|
55332
|
-
|
|
55365
|
+
useEffect96(() => {
|
|
55333
55366
|
if (!active) return;
|
|
55334
55367
|
const conversationId = conversationIdRef.current;
|
|
55335
55368
|
if (!conversationId) return;
|
|
@@ -56013,7 +56046,7 @@ var MessageSegmentAccumulator = class {
|
|
|
56013
56046
|
const existingIndex = this.segments.findIndex((s) => {
|
|
56014
56047
|
if (s.type !== "ticket_event") return false;
|
|
56015
56048
|
if (s.streamSeq !== void 0 && streamSeq !== void 0) return s.streamSeq === streamSeq;
|
|
56016
|
-
return s.data.kind === data.kind && s.data.actorId === data.actorId && s.data.actorName === data.actorName && s.data.actorType === data.actorType && s.data.reason === data.reason;
|
|
56049
|
+
return s.data.kind === data.kind && s.data.actorId === data.actorId && s.data.actorName === data.actorName && s.data.actorType === data.actorType && s.data.reason === data.reason && s.data.targetStatusKind === data.targetStatusKind;
|
|
56017
56050
|
});
|
|
56018
56051
|
if (existingIndex !== -1) {
|
|
56019
56052
|
this.segments[existingIndex] = segment;
|
|
@@ -56782,7 +56815,8 @@ function createChatStreamReducer(options = {}) {
|
|
|
56782
56815
|
actorId: event.actorId,
|
|
56783
56816
|
actorName: event.actorName,
|
|
56784
56817
|
actorType: event.actorType,
|
|
56785
|
-
reason: event.reason
|
|
56818
|
+
reason: event.reason,
|
|
56819
|
+
targetStatusKind: event.targetStatusKind
|
|
56786
56820
|
},
|
|
56787
56821
|
seq
|
|
56788
56822
|
);
|
|
@@ -57514,7 +57548,7 @@ function createChatDialogStore(options = {}) {
|
|
|
57514
57548
|
}
|
|
57515
57549
|
|
|
57516
57550
|
// src/components/chat/stream/use-chat-stream-reducer.ts
|
|
57517
|
-
import { useCallback as useCallback55, useEffect as
|
|
57551
|
+
import { useCallback as useCallback55, useEffect as useEffect97, useMemo as useMemo51, useRef as useRef78, useSyncExternalStore } from "react";
|
|
57518
57552
|
|
|
57519
57553
|
// src/components/chat/stream/delta-batcher.ts
|
|
57520
57554
|
var DELTA_FLUSH_FALLBACK_MS = 50;
|
|
@@ -57610,7 +57644,7 @@ function useChatStreamReducer({
|
|
|
57610
57644
|
const getServerSnapshot = useCallback55(() => store.getServerSnapshot(), [store]);
|
|
57611
57645
|
const subscribe = useCallback55((listener) => store.subscribe(listener), [store]);
|
|
57612
57646
|
const state = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
57613
|
-
|
|
57647
|
+
useEffect97(() => store.retain(dialogId, side), [store, dialogId, side]);
|
|
57614
57648
|
const keyRef = useRef78({ dialogId, side });
|
|
57615
57649
|
if (keyRef.current.dialogId !== dialogId || keyRef.current.side !== side) {
|
|
57616
57650
|
keyRef.current = { dialogId, side };
|
|
@@ -57635,7 +57669,7 @@ function useChatStreamReducer({
|
|
|
57635
57669
|
},
|
|
57636
57670
|
[batcher, store, dialogId, side]
|
|
57637
57671
|
);
|
|
57638
|
-
|
|
57672
|
+
useEffect97(() => () => batcher.dispose(), [batcher]);
|
|
57639
57673
|
const mutate = useCallback55(
|
|
57640
57674
|
(fn) => store.mutate(dialogId, side, fn),
|
|
57641
57675
|
[store, dialogId, side]
|
|
@@ -58016,7 +58050,7 @@ var noopBumpMetaTick = () => {
|
|
|
58016
58050
|
};
|
|
58017
58051
|
|
|
58018
58052
|
// src/components/chat/hooks/use-nats-chat-adapter.ts
|
|
58019
|
-
import { useCallback as useCallback57, useEffect as
|
|
58053
|
+
import { useCallback as useCallback57, useEffect as useEffect98, useMemo as useMemo53, useRef as useRef80, useState as useState127 } from "react";
|
|
58020
58054
|
|
|
58021
58055
|
// src/chat-protocol/nats-decoder.ts
|
|
58022
58056
|
function normalizeToolCalls(raw) {
|
|
@@ -58241,6 +58275,7 @@ function decodeNatsChunk(chunk) {
|
|
|
58241
58275
|
actorName: typeof data.actorName === "string" ? data.actorName : void 0,
|
|
58242
58276
|
actorType: typeof data.actorType === "string" ? data.actorType : void 0,
|
|
58243
58277
|
reason: typeof data.reason === "string" && data.reason.trim() ? data.reason : void 0,
|
|
58278
|
+
targetStatusKind: typeof data.targetStatusKind === "string" && data.targetStatusKind.trim() ? data.targetStatusKind : void 0,
|
|
58244
58279
|
...eventSeq
|
|
58245
58280
|
};
|
|
58246
58281
|
}
|
|
@@ -58482,7 +58517,8 @@ function decodeHistoricalMessageData(data) {
|
|
|
58482
58517
|
actorId: typeof data.actorId === "string" ? data.actorId : void 0,
|
|
58483
58518
|
actorName: typeof data.actorName === "string" ? data.actorName : void 0,
|
|
58484
58519
|
actorType: typeof data.actorType === "string" ? data.actorType : void 0,
|
|
58485
|
-
reason: typeof data.reason === "string" && data.reason.trim() ? data.reason : void 0
|
|
58520
|
+
reason: typeof data.reason === "string" && data.reason.trim() ? data.reason : void 0,
|
|
58521
|
+
targetStatusKind: typeof data.targetStatusKind === "string" && data.targetStatusKind.trim() ? data.targetStatusKind : void 0
|
|
58486
58522
|
};
|
|
58487
58523
|
}
|
|
58488
58524
|
case MESSAGE_TYPE.ERROR:
|
|
@@ -58540,7 +58576,8 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
58540
58576
|
actorId: event.actorId,
|
|
58541
58577
|
actorName: event.actorName,
|
|
58542
58578
|
actorType: event.actorType,
|
|
58543
|
-
reason: event.reason
|
|
58579
|
+
reason: event.reason,
|
|
58580
|
+
targetStatusKind: event.targetStatusKind
|
|
58544
58581
|
});
|
|
58545
58582
|
break;
|
|
58546
58583
|
case "escalation-offer-resolved":
|
|
@@ -59198,7 +59235,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
59198
59235
|
]
|
|
59199
59236
|
);
|
|
59200
59237
|
const prevDialogIdRef = useRef80(void 0);
|
|
59201
|
-
|
|
59238
|
+
useEffect98(() => {
|
|
59202
59239
|
if (prevDialogIdRef.current === dialogId) return;
|
|
59203
59240
|
prevDialogIdRef.current = dialogId;
|
|
59204
59241
|
historyLoadSeqRef.current += 1;
|
|
@@ -59211,7 +59248,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
59211
59248
|
if (!active || !dialogId) return;
|
|
59212
59249
|
void loadDialogHistory(dialogId);
|
|
59213
59250
|
}, [active, dialogId, dialogKey, loadDialogHistory]);
|
|
59214
|
-
|
|
59251
|
+
useEffect98(() => {
|
|
59215
59252
|
if (!active || !dialogId) return;
|
|
59216
59253
|
const store = storeRef.current;
|
|
59217
59254
|
store.mutate(dialogId, DEFAULT_DIALOG_SIDE, (r) => r.adjustAgentBusySuppression(1));
|
|
@@ -59274,7 +59311,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
59274
59311
|
})();
|
|
59275
59312
|
}
|
|
59276
59313
|
});
|
|
59277
|
-
|
|
59314
|
+
useEffect98(() => {
|
|
59278
59315
|
if (!active || !dialogId) {
|
|
59279
59316
|
setConnectionState("connected");
|
|
59280
59317
|
return;
|
|
@@ -59313,7 +59350,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
59313
59350
|
const reloadDialogs = useCallback57(() => {
|
|
59314
59351
|
void loadDialogsPage();
|
|
59315
59352
|
}, [loadDialogsPage]);
|
|
59316
|
-
|
|
59353
|
+
useEffect98(() => {
|
|
59317
59354
|
if (!fetchDialogs) return;
|
|
59318
59355
|
if (!active) return;
|
|
59319
59356
|
if (initialDialogsLoadedRef.current) return;
|
|
@@ -59977,7 +60014,7 @@ function buildStreamFrames(messages) {
|
|
|
59977
60014
|
|
|
59978
60015
|
// src/components/chat/embeddable-chat.tsx
|
|
59979
60016
|
init_cn();
|
|
59980
|
-
import { useCallback as useCallback60, useEffect as
|
|
60017
|
+
import { useCallback as useCallback60, useEffect as useEffect99, useMemo as useMemo56, useRef as useRef83, useState as useState129 } from "react";
|
|
59981
60018
|
import * as DialogPrimitive5 from "@radix-ui/react-dialog";
|
|
59982
60019
|
import { usePreventScroll as usePreventScroll5 } from "@react-aria/overlays";
|
|
59983
60020
|
import { isIOS } from "@react-aria/utils";
|
|
@@ -60262,7 +60299,7 @@ var RAIL_ANIM_MS = 320;
|
|
|
60262
60299
|
function useRailPresence(open) {
|
|
60263
60300
|
const [mounted, setMounted] = useState129(open);
|
|
60264
60301
|
const [active, setActive] = useState129(false);
|
|
60265
|
-
|
|
60302
|
+
useEffect99(() => {
|
|
60266
60303
|
if (open) {
|
|
60267
60304
|
setMounted(true);
|
|
60268
60305
|
let raf2 = 0;
|
|
@@ -60589,7 +60626,7 @@ function EmbeddableChatInner({
|
|
|
60589
60626
|
const commandsUrl = runtime.endpoints.commandsUrl;
|
|
60590
60627
|
const { attachmentsEnabled, user: identityUser } = useChatIdentity();
|
|
60591
60628
|
const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
|
|
60592
|
-
|
|
60629
|
+
useEffect99(() => {
|
|
60593
60630
|
if (process.env.NODE_ENV !== "production") {
|
|
60594
60631
|
const hasOpen = open !== void 0;
|
|
60595
60632
|
const hasHandler = onOpenChange !== void 0;
|
|
@@ -60611,7 +60648,7 @@ function EmbeddableChatInner({
|
|
|
60611
60648
|
});
|
|
60612
60649
|
usePreventScroll5({ isDisabled: !isOpen || shellLess });
|
|
60613
60650
|
const navigatingAwayRef = useRef83(false);
|
|
60614
|
-
|
|
60651
|
+
useEffect99(() => {
|
|
60615
60652
|
if (!isOpen) return;
|
|
60616
60653
|
if (shellLess) return;
|
|
60617
60654
|
if (typeof window === "undefined") return;
|
|
@@ -60744,7 +60781,7 @@ function EmbeddableChatInner({
|
|
|
60744
60781
|
loadMoreMessages
|
|
60745
60782
|
} = useUnifiedChat({ modes: effectiveModes, activeMode, mingoStateOverride: mingoState });
|
|
60746
60783
|
const guidePromptSentRef = useRef83(false);
|
|
60747
|
-
|
|
60784
|
+
useEffect99(() => {
|
|
60748
60785
|
if (!guidePendingPrompt) {
|
|
60749
60786
|
guidePromptSentRef.current = false;
|
|
60750
60787
|
return;
|
|
@@ -60769,11 +60806,11 @@ function EmbeddableChatInner({
|
|
|
60769
60806
|
const [contextPickerOpen, setContextPickerOpen] = useState129(false);
|
|
60770
60807
|
const [mentionQuery, setMentionQuery] = useState129(null);
|
|
60771
60808
|
const mentionActiveRef = useRef83(false);
|
|
60772
|
-
|
|
60809
|
+
useEffect99(() => {
|
|
60773
60810
|
mentionActiveRef.current = mentionQuery !== null;
|
|
60774
60811
|
}, [mentionQuery]);
|
|
60775
60812
|
const mentionKeysRef = useRef83(/* @__PURE__ */ new Set());
|
|
60776
|
-
|
|
60813
|
+
useEffect99(() => {
|
|
60777
60814
|
setContextItems([]);
|
|
60778
60815
|
setMentionQuery(null);
|
|
60779
60816
|
mentionKeysRef.current.clear();
|
|
@@ -61007,7 +61044,7 @@ function EmbeddableChatInner({
|
|
|
61007
61044
|
});
|
|
61008
61045
|
const handleOpen = useCallback60(() => setIsOpen(true), [setIsOpen]);
|
|
61009
61046
|
useCloseOnNavigation(handleNavigationClose, null);
|
|
61010
|
-
|
|
61047
|
+
useEffect99(() => {
|
|
61011
61048
|
const handler = (e) => {
|
|
61012
61049
|
const detail = e.detail;
|
|
61013
61050
|
if (!detail || detail.source !== source) return;
|
|
@@ -61017,7 +61054,7 @@ function EmbeddableChatInner({
|
|
|
61017
61054
|
window.addEventListener("ask-ai:open-with-ref", handler);
|
|
61018
61055
|
return () => window.removeEventListener("ask-ai:open-with-ref", handler);
|
|
61019
61056
|
}, [source, discussRef, setIsOpen]);
|
|
61020
|
-
|
|
61057
|
+
useEffect99(() => {
|
|
61021
61058
|
const handler = (e) => {
|
|
61022
61059
|
const detail = e.detail;
|
|
61023
61060
|
if (!detail || detail.source !== source) return;
|
|
@@ -61034,7 +61071,7 @@ function EmbeddableChatInner({
|
|
|
61034
61071
|
const contentViewKey = hasConversation ? "conversation" : activeMode;
|
|
61035
61072
|
const isGuideEmpty = !hasConversation && activeMode === "guide";
|
|
61036
61073
|
const isQuickActionEmpty = !hasConversation && (activeMode === "guide" || activeMode === "mingo");
|
|
61037
|
-
|
|
61074
|
+
useEffect99(() => {
|
|
61038
61075
|
if (!isQuickActionEmpty) setQuickActionPreview(null);
|
|
61039
61076
|
}, [isQuickActionEmpty]);
|
|
61040
61077
|
const guideCanReturnToMingo = isGuideEmpty && hasMingoMode;
|
|
@@ -61080,7 +61117,7 @@ function EmbeddableChatInner({
|
|
|
61080
61117
|
const [panelBoundary, setPanelBoundary] = useState129(null);
|
|
61081
61118
|
const [panelWidth, setPanelWidth] = useState129(0);
|
|
61082
61119
|
const panelMeasureRef = useRef83(null);
|
|
61083
|
-
|
|
61120
|
+
useEffect99(() => {
|
|
61084
61121
|
const el = panelMeasureRef.current;
|
|
61085
61122
|
if (!el || typeof ResizeObserver === "undefined") return;
|
|
61086
61123
|
const ro = new ResizeObserver((entries) => {
|
|
@@ -61096,7 +61133,7 @@ function EmbeddableChatInner({
|
|
|
61096
61133
|
setPanelBoundary(node);
|
|
61097
61134
|
}, []);
|
|
61098
61135
|
const [railCollapsed, setRailCollapsed] = useState129(false);
|
|
61099
|
-
|
|
61136
|
+
useEffect99(() => {
|
|
61100
61137
|
try {
|
|
61101
61138
|
if (window.localStorage.getItem(RAIL_COLLAPSED_STORAGE_KEY) === "1")
|
|
61102
61139
|
setRailCollapsed(true);
|
|
@@ -61121,7 +61158,7 @@ function EmbeddableChatInner({
|
|
|
61121
61158
|
const railPresence = useRailPresence(splitActive);
|
|
61122
61159
|
const showWideHeader = wideMingo || railPresence.mounted;
|
|
61123
61160
|
const [composeOpen, setComposeOpen] = useState129(false);
|
|
61124
|
-
|
|
61161
|
+
useEffect99(() => {
|
|
61125
61162
|
if (hasConversation) setComposeOpen(false);
|
|
61126
61163
|
}, [hasConversation]);
|
|
61127
61164
|
const isMingoMode = activeMode === "mingo";
|
|
@@ -62785,4 +62822,4 @@ export {
|
|
|
62785
62822
|
LogsList,
|
|
62786
62823
|
assets
|
|
62787
62824
|
};
|
|
62788
|
-
//# sourceMappingURL=chunk-
|
|
62825
|
+
//# sourceMappingURL=chunk-TI75367M.js.map
|