@flamingo-stack/openframe-frontend-core 0.0.175 → 0.0.176-snapshot.20260514140351
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-KCKMK4UF.js → chunk-6LDN3CIY.js} +132 -129
- package/dist/chunk-6LDN3CIY.js.map +1 -0
- package/dist/{chunk-JI43U7UN.cjs → chunk-C6ZMI4UB.cjs} +372 -369
- package/dist/{chunk-KCKMK4UF.js.map → chunk-C6ZMI4UB.cjs.map} +1 -1
- package/dist/components/chat/chat-message-list.d.ts.map +1 -1
- package/dist/components/features/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/index.cjs +2 -2
- package/dist/components/index.js +1 -1
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/ui/index.cjs +2 -2
- package/dist/components/ui/index.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/chat/chat-message-list.tsx +48 -27
- package/src/components/ui/info-card.tsx +1 -1
- package/dist/chunk-JI43U7UN.cjs.map +0 -1
|
@@ -5315,7 +5315,7 @@ MemoizedChatMessageEnhanced.displayName = "MemoizedChatMessageEnhanced";
|
|
|
5315
5315
|
|
|
5316
5316
|
// src/components/chat/chat-message-list.tsx
|
|
5317
5317
|
init_cn();
|
|
5318
|
-
import { useRef as useRef6, useState as useState14, useEffect as useEffect6, useLayoutEffect as useLayoutEffect2, useImperativeHandle as useImperativeHandle3, forwardRef as forwardRef22 } from "react";
|
|
5318
|
+
import { useRef as useRef6, useState as useState14, useEffect as useEffect6, useLayoutEffect as useLayoutEffect2, useCallback as useCallback3, useImperativeHandle as useImperativeHandle3, forwardRef as forwardRef22 } from "react";
|
|
5319
5319
|
import { useStickToBottom } from "use-stick-to-bottom";
|
|
5320
5320
|
|
|
5321
5321
|
// src/components/chat/chat-message-loader.tsx
|
|
@@ -5432,10 +5432,13 @@ var ChatMessageList = forwardRef22(
|
|
|
5432
5432
|
return;
|
|
5433
5433
|
}
|
|
5434
5434
|
if (newCount > prevCount) {
|
|
5435
|
-
const
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5435
|
+
const isPrepend = prependRef.current.firstMessageId !== void 0 && messages[0]?.id !== prependRef.current.firstMessageId;
|
|
5436
|
+
if (!isPrepend) {
|
|
5437
|
+
const newSlice = messages.slice(prevCount);
|
|
5438
|
+
const hasNewUser = newSlice.some((m) => m.role === "user");
|
|
5439
|
+
if (hasNewUser) {
|
|
5440
|
+
void scrollToBottom({ animation: "instant", ignoreEscapes: true });
|
|
5441
|
+
}
|
|
5439
5442
|
}
|
|
5440
5443
|
}
|
|
5441
5444
|
}, [autoScroll, messages, dialogId, scrollToBottom, scrollEl]);
|
|
@@ -5499,6 +5502,13 @@ var ChatMessageList = forwardRef22(
|
|
|
5499
5502
|
}, [hasNextPage, scrollEl, sentinelEl, messages.length]);
|
|
5500
5503
|
useImperativeHandle3(ref, () => scrollRef.current, [scrollRef]);
|
|
5501
5504
|
const showLoader = useDelayedFlag(isLoading, { delay: 200, minDuration: 400 });
|
|
5505
|
+
const setScrollRef = useCallback3((el) => {
|
|
5506
|
+
scrollRef(el);
|
|
5507
|
+
setScrollEl(el);
|
|
5508
|
+
}, [scrollRef]);
|
|
5509
|
+
const setContentRef = useCallback3((el) => {
|
|
5510
|
+
contentRef(el);
|
|
5511
|
+
}, [contentRef]);
|
|
5502
5512
|
if (showLoader) {
|
|
5503
5513
|
return /* @__PURE__ */ jsx33(
|
|
5504
5514
|
ChatMessageListLoader,
|
|
@@ -5509,13 +5519,6 @@ var ChatMessageList = forwardRef22(
|
|
|
5509
5519
|
}
|
|
5510
5520
|
);
|
|
5511
5521
|
}
|
|
5512
|
-
const setScrollRef = (el) => {
|
|
5513
|
-
scrollRef(el);
|
|
5514
|
-
setScrollEl(el);
|
|
5515
|
-
};
|
|
5516
|
-
const setContentRef = (el) => {
|
|
5517
|
-
contentRef(el);
|
|
5518
|
-
};
|
|
5519
5522
|
return /* @__PURE__ */ jsxs28("div", { className: "relative flex-1 min-h-0 flex flex-col", children: [
|
|
5520
5523
|
/* @__PURE__ */ jsx33(
|
|
5521
5524
|
"div",
|
|
@@ -6220,7 +6223,7 @@ var NETWORK_CONFIG = {
|
|
|
6220
6223
|
};
|
|
6221
6224
|
|
|
6222
6225
|
// src/components/chat/hooks/use-chunk-catchup.ts
|
|
6223
|
-
import { useCallback as
|
|
6226
|
+
import { useCallback as useCallback6, useRef as useRef9 } from "react";
|
|
6224
6227
|
function makeSeqKey(messageType, chunkType, sequenceId) {
|
|
6225
6228
|
return `${messageType}:${chunkType}:${sequenceId}`;
|
|
6226
6229
|
}
|
|
@@ -6257,7 +6260,7 @@ function useChunkCatchup({
|
|
|
6257
6260
|
fetchChunksRef.current = fetchChunks;
|
|
6258
6261
|
const onChunkReceivedRef = useRef9(onChunkReceived);
|
|
6259
6262
|
onChunkReceivedRef.current = onChunkReceived;
|
|
6260
|
-
const processChunk =
|
|
6263
|
+
const processChunk = useCallback6((chunk, messageType, forceProcess = false) => {
|
|
6261
6264
|
if (bufferUntilInitialCatchupComplete.current && !forceProcess) {
|
|
6262
6265
|
chunkBuffer.current.push({ chunk, messageType });
|
|
6263
6266
|
return true;
|
|
@@ -6270,7 +6273,7 @@ function useChunkCatchup({
|
|
|
6270
6273
|
onChunkReceivedRef.current(chunk, messageType);
|
|
6271
6274
|
return true;
|
|
6272
6275
|
}, []);
|
|
6273
|
-
const flushBufferedRealtimeChunks =
|
|
6276
|
+
const flushBufferedRealtimeChunks = useCallback6(() => {
|
|
6274
6277
|
if (chunkBuffer.current.length === 0) return;
|
|
6275
6278
|
const buffered = [...chunkBuffer.current];
|
|
6276
6279
|
chunkBuffer.current = [];
|
|
@@ -6283,7 +6286,7 @@ function useChunkCatchup({
|
|
|
6283
6286
|
processChunk(chunk, messageType, true);
|
|
6284
6287
|
});
|
|
6285
6288
|
}, [processChunk]);
|
|
6286
|
-
const catchUpChunks =
|
|
6289
|
+
const catchUpChunks = useCallback6(async (fromSequenceId) => {
|
|
6287
6290
|
const dialogId2 = dialogIdRef.current;
|
|
6288
6291
|
const chatTypes2 = chatTypesRef.current;
|
|
6289
6292
|
const fetchChunks2 = fetchChunksRef.current;
|
|
@@ -6396,7 +6399,7 @@ function useChunkCatchup({
|
|
|
6396
6399
|
}
|
|
6397
6400
|
}
|
|
6398
6401
|
}, [flushBufferedRealtimeChunks]);
|
|
6399
|
-
const resetChunkTracking =
|
|
6402
|
+
const resetChunkTracking = useCallback6(() => {
|
|
6400
6403
|
processedSequenceKeys.current.clear();
|
|
6401
6404
|
lastSequenceId.current = null;
|
|
6402
6405
|
fetchingInProgress.current = false;
|
|
@@ -6405,13 +6408,13 @@ function useChunkCatchup({
|
|
|
6405
6408
|
bufferUntilInitialCatchupComplete.current = false;
|
|
6406
6409
|
hasCompletedInitialCatchup.current = false;
|
|
6407
6410
|
}, []);
|
|
6408
|
-
const startInitialBuffering =
|
|
6411
|
+
const startInitialBuffering = useCallback6(() => {
|
|
6409
6412
|
chunkBuffer.current = [];
|
|
6410
6413
|
bufferUntilInitialCatchupComplete.current = true;
|
|
6411
6414
|
hasCompletedInitialCatchup.current = false;
|
|
6412
6415
|
}, []);
|
|
6413
|
-
const isBufferingActive =
|
|
6414
|
-
const resetAndCatchUp =
|
|
6416
|
+
const isBufferingActive = useCallback6(() => bufferUntilInitialCatchupComplete.current, []);
|
|
6417
|
+
const resetAndCatchUp = useCallback6(async () => {
|
|
6415
6418
|
if (!dialogIdRef.current) return;
|
|
6416
6419
|
const fromSeq = lastSequenceId.current;
|
|
6417
6420
|
hasCompletedInitialCatchup.current = false;
|
|
@@ -6432,7 +6435,7 @@ function useChunkCatchup({
|
|
|
6432
6435
|
}
|
|
6433
6436
|
|
|
6434
6437
|
// src/components/chat/hooks/use-nats-dialog-subscription.ts
|
|
6435
|
-
import { useCallback as
|
|
6438
|
+
import { useCallback as useCallback7, useEffect as useEffect8, useRef as useRef10, useState as useState16 } from "react";
|
|
6436
6439
|
var shared = null;
|
|
6437
6440
|
function useNatsDialogSubscription({
|
|
6438
6441
|
enabled,
|
|
@@ -6481,7 +6484,7 @@ function useNatsDialogSubscription({
|
|
|
6481
6484
|
useEffect8(() => {
|
|
6482
6485
|
reconnectionBackoffRef.current = reconnectionBackoff;
|
|
6483
6486
|
}, [reconnectionBackoff]);
|
|
6484
|
-
const acquireClient =
|
|
6487
|
+
const acquireClient = useCallback7((url) => {
|
|
6485
6488
|
if (shared?.wsUrl !== url) {
|
|
6486
6489
|
if (shared) {
|
|
6487
6490
|
shared.closeTimer && clearTimeout(shared.closeTimer);
|
|
@@ -6508,7 +6511,7 @@ function useNatsDialogSubscription({
|
|
|
6508
6511
|
shared.closeTimer = null;
|
|
6509
6512
|
return shared;
|
|
6510
6513
|
}, [clientConfig]);
|
|
6511
|
-
const releaseClient =
|
|
6514
|
+
const releaseClient = useCallback7((url) => {
|
|
6512
6515
|
if (!shared || shared.wsUrl !== url) return;
|
|
6513
6516
|
shared.refCount = Math.max(0, shared.refCount - 1);
|
|
6514
6517
|
if (shared.refCount > 0) return;
|
|
@@ -6805,7 +6808,7 @@ function buildNatsWsUrl(apiBaseUrl, options) {
|
|
|
6805
6808
|
}
|
|
6806
6809
|
|
|
6807
6810
|
// src/components/chat/hooks/use-realtime-chunk-processor.ts
|
|
6808
|
-
import { useCallback as
|
|
6811
|
+
import { useCallback as useCallback8, useRef as useRef11, useEffect as useEffect9 } from "react";
|
|
6809
6812
|
|
|
6810
6813
|
// src/components/chat/utils/chunk-parser.ts
|
|
6811
6814
|
function normalizeToolCalls(raw) {
|
|
@@ -7429,7 +7432,7 @@ function useRealtimeChunkProcessor(options) {
|
|
|
7429
7432
|
}, [initialState, callbacks]);
|
|
7430
7433
|
const isInStreamRef = useRef11(false);
|
|
7431
7434
|
const pendingEscalatedRef = useRef11(/* @__PURE__ */ new Map());
|
|
7432
|
-
const processChunk =
|
|
7435
|
+
const processChunk = useCallback8(
|
|
7433
7436
|
(chunk) => {
|
|
7434
7437
|
if (!enableThinking && chunk && typeof chunk === "object" && chunk.type === MESSAGE_TYPE.THINKING) {
|
|
7435
7438
|
return;
|
|
@@ -7628,21 +7631,21 @@ function useRealtimeChunkProcessor(options) {
|
|
|
7628
7631
|
},
|
|
7629
7632
|
[callbacks, displayApprovalTypes, approvalStatuses, initialState, enableThinking]
|
|
7630
7633
|
);
|
|
7631
|
-
const getSegments =
|
|
7634
|
+
const getSegments = useCallback8(() => {
|
|
7632
7635
|
return accumulatorRef.current.getSegments();
|
|
7633
7636
|
}, []);
|
|
7634
|
-
const reset =
|
|
7637
|
+
const reset = useCallback8(() => {
|
|
7635
7638
|
accumulatorRef.current.reset();
|
|
7636
7639
|
pendingEscalatedRef.current.clear();
|
|
7637
7640
|
hasInitializedWithData.current = false;
|
|
7638
7641
|
}, []);
|
|
7639
|
-
const updateApprovalStatus =
|
|
7642
|
+
const updateApprovalStatus = useCallback8(
|
|
7640
7643
|
(requestId, status) => {
|
|
7641
7644
|
return accumulatorRef.current.updateApprovalStatus(requestId, status);
|
|
7642
7645
|
},
|
|
7643
7646
|
[]
|
|
7644
7647
|
);
|
|
7645
|
-
const getPendingApprovals =
|
|
7648
|
+
const getPendingApprovals = useCallback8(() => {
|
|
7646
7649
|
return new Map(pendingEscalatedRef.current);
|
|
7647
7650
|
}, []);
|
|
7648
7651
|
return {
|
|
@@ -8774,7 +8777,7 @@ function SlidingSidebar({ config }) {
|
|
|
8774
8777
|
}
|
|
8775
8778
|
|
|
8776
8779
|
// src/components/navigation/sticky-section-nav.tsx
|
|
8777
|
-
import { useEffect as useEffect14, useState as useState20, useCallback as
|
|
8780
|
+
import { useEffect as useEffect14, useState as useState20, useCallback as useCallback9, useRef as useRef14 } from "react";
|
|
8778
8781
|
import { jsx as jsx46, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
8779
8782
|
function StickySectionNav({
|
|
8780
8783
|
sections,
|
|
@@ -8838,7 +8841,7 @@ function useSectionNavigation(sections, options) {
|
|
|
8838
8841
|
const [activeSection, setActiveSection] = useState20(sections[0]?.id || "");
|
|
8839
8842
|
const isScrollingFromClick = useRef14(false);
|
|
8840
8843
|
const { offset: offset2 = 100 } = options || {};
|
|
8841
|
-
const handleSectionClick =
|
|
8844
|
+
const handleSectionClick = useCallback9((sectionId) => {
|
|
8842
8845
|
const targetElement = document.getElementById(sectionId);
|
|
8843
8846
|
if (!targetElement) return;
|
|
8844
8847
|
isScrollingFromClick.current = true;
|
|
@@ -8889,7 +8892,7 @@ function useSectionNavigation(sections, options) {
|
|
|
8889
8892
|
}
|
|
8890
8893
|
|
|
8891
8894
|
// src/components/navigation/navigation-sidebar.tsx
|
|
8892
|
-
import { useCallback as
|
|
8895
|
+
import { useCallback as useCallback10, useLayoutEffect as useLayoutEffect4, useMemo as useMemo7, useState as useState21 } from "react";
|
|
8893
8896
|
|
|
8894
8897
|
// src/components/navigation/navigation-sidebar-header.tsx
|
|
8895
8898
|
import { jsx as jsx47, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
@@ -9042,11 +9045,11 @@ function NavigationSidebar({ config, disabled = false }) {
|
|
|
9042
9045
|
const [transitionsEnabled, setTransitionsEnabled] = useState21(false);
|
|
9043
9046
|
const isMinimized = !isLgUp || minimized;
|
|
9044
9047
|
const showLabel = isLgUp && !minimized;
|
|
9045
|
-
const handleToggle =
|
|
9048
|
+
const handleToggle = useCallback10(() => {
|
|
9046
9049
|
setMinimized((prev) => !prev);
|
|
9047
9050
|
config.onToggleMinimized?.();
|
|
9048
9051
|
}, [setMinimized, config]);
|
|
9049
|
-
const handleItemClick =
|
|
9052
|
+
const handleItemClick = useCallback10((item, event) => {
|
|
9050
9053
|
event?.stopPropagation();
|
|
9051
9054
|
if (item.onClick) {
|
|
9052
9055
|
item.onClick();
|
|
@@ -9569,7 +9572,7 @@ function NotificationsHeaderButton({
|
|
|
9569
9572
|
}
|
|
9570
9573
|
|
|
9571
9574
|
// src/components/navigation/app-layout.tsx
|
|
9572
|
-
import { Suspense, useCallback as
|
|
9575
|
+
import { Suspense, useCallback as useCallback13, useState as useState24 } from "react";
|
|
9573
9576
|
|
|
9574
9577
|
// src/components/features/notifications/notification-drawer.tsx
|
|
9575
9578
|
import * as DialogPrimitive2 from "@radix-ui/react-dialog";
|
|
@@ -9949,7 +9952,7 @@ function NotificationsHistoryButton({ onClick }) {
|
|
|
9949
9952
|
}
|
|
9950
9953
|
|
|
9951
9954
|
// src/components/navigation/mobile-burger-menu.tsx
|
|
9952
|
-
import React29, { useCallback as
|
|
9955
|
+
import React29, { useCallback as useCallback12, useEffect as useEffect17 } from "react";
|
|
9953
9956
|
import { Fragment as Fragment8, jsx as jsx60, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
9954
9957
|
var HEADER_HEIGHT = 48;
|
|
9955
9958
|
var MobileBurgerMenu = React29.memo(function MobileBurgerMenu2({
|
|
@@ -9983,7 +9986,7 @@ var MobileBurgerMenu = React29.memo(function MobileBurgerMenu2({
|
|
|
9983
9986
|
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
9984
9987
|
}
|
|
9985
9988
|
}, [isOpen, onClose]);
|
|
9986
|
-
const handleItemClick =
|
|
9989
|
+
const handleItemClick = useCallback12((item) => {
|
|
9987
9990
|
if (item.onClick) {
|
|
9988
9991
|
item.onClick();
|
|
9989
9992
|
} else if (item.path) {
|
|
@@ -10159,10 +10162,10 @@ function AppLayout({
|
|
|
10159
10162
|
disabled = false
|
|
10160
10163
|
}) {
|
|
10161
10164
|
const [mobileMenuOpen, setMobileMenuOpen] = useState24(false);
|
|
10162
|
-
const handleToggleMobileMenu =
|
|
10165
|
+
const handleToggleMobileMenu = useCallback13(() => {
|
|
10163
10166
|
setMobileMenuOpen((prev) => !prev);
|
|
10164
10167
|
}, []);
|
|
10165
|
-
const handleCloseMobileMenu =
|
|
10168
|
+
const handleCloseMobileMenu = useCallback13(() => {
|
|
10166
10169
|
setMobileMenuOpen(false);
|
|
10167
10170
|
}, []);
|
|
10168
10171
|
return /* @__PURE__ */ jsxs51("div", { className: cn("flex h-screen bg-ods-bg", className), children: [
|
|
@@ -11878,7 +11881,7 @@ function EmptyState2({
|
|
|
11878
11881
|
}
|
|
11879
11882
|
|
|
11880
11883
|
// src/components/faq-accordion.tsx
|
|
11881
|
-
import { useRef as useRef15, useState as useState26, useEffect as useEffect19, useCallback as
|
|
11884
|
+
import { useRef as useRef15, useState as useState26, useEffect as useEffect19, useCallback as useCallback14 } from "react";
|
|
11882
11885
|
|
|
11883
11886
|
// src/components/ui/chevron-button.tsx
|
|
11884
11887
|
init_cn();
|
|
@@ -11920,7 +11923,7 @@ import { jsx as jsx85, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
|
11920
11923
|
var useMeasuredHeight = (isOpen) => {
|
|
11921
11924
|
const ref = useRef15(null);
|
|
11922
11925
|
const [maxHeight, setMaxHeight] = useState26("0px");
|
|
11923
|
-
const measure =
|
|
11926
|
+
const measure = useCallback14(() => {
|
|
11924
11927
|
if (ref.current) {
|
|
11925
11928
|
const height = ref.current.scrollHeight;
|
|
11926
11929
|
setMaxHeight(`${height}px`);
|
|
@@ -12506,13 +12509,13 @@ init_unified_pagination();
|
|
|
12506
12509
|
|
|
12507
12510
|
// src/components/footer-waitlist-button.tsx
|
|
12508
12511
|
import { usePathname as usePathname2, useRouter as useRouter4 } from "next/navigation";
|
|
12509
|
-
import { useCallback as
|
|
12512
|
+
import { useCallback as useCallback15 } from "react";
|
|
12510
12513
|
init_button2();
|
|
12511
12514
|
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
12512
12515
|
function FooterWaitlistButton({ className }) {
|
|
12513
12516
|
const router = useRouter4();
|
|
12514
12517
|
const pathname = usePathname2();
|
|
12515
|
-
const handleClick =
|
|
12518
|
+
const handleClick = useCallback15(() => {
|
|
12516
12519
|
if (pathname?.startsWith("/waitlist")) {
|
|
12517
12520
|
const anchor = document.getElementById("waitlist-form");
|
|
12518
12521
|
if (anchor) {
|
|
@@ -12816,7 +12819,7 @@ function ResponsiveIconsBlock({ loading = false }) {
|
|
|
12816
12819
|
|
|
12817
12820
|
// src/components/image-cropper.tsx
|
|
12818
12821
|
init_button2();
|
|
12819
|
-
import { useCallback as
|
|
12822
|
+
import { useCallback as useCallback16, useState as useState29 } from "react";
|
|
12820
12823
|
import Cropper from "react-easy-crop";
|
|
12821
12824
|
|
|
12822
12825
|
// src/components/ui/slider.tsx
|
|
@@ -12878,11 +12881,11 @@ var ImageCropper = ({
|
|
|
12878
12881
|
const [zoom, setZoom] = useState29(1);
|
|
12879
12882
|
const [rotation, setRotation] = useState29(0);
|
|
12880
12883
|
const [croppedAreaPixels, setCroppedAreaPixels] = useState29(null);
|
|
12881
|
-
const onCropComplete =
|
|
12884
|
+
const onCropComplete = useCallback16((_, area) => {
|
|
12882
12885
|
setCroppedAreaPixels(area);
|
|
12883
12886
|
}, []);
|
|
12884
12887
|
const checkerBg = "bg-[length:16px_16px] bg-[linear-gradient(45deg,transparent_25%,#2a2a2a_25%,#2a2a2a_75%,transparent_75%,transparent),linear-gradient(45deg,#2a2a2a_25%,transparent_25%,transparent_75%,#2a2a2a_75%,#2a2a2a)]";
|
|
12885
|
-
const exportCrop =
|
|
12888
|
+
const exportCrop = useCallback16(async () => {
|
|
12886
12889
|
if (!croppedAreaPixels) return void 0;
|
|
12887
12890
|
const img = await loadImage(src);
|
|
12888
12891
|
const canvas = document.createElement("canvas");
|
|
@@ -13045,7 +13048,7 @@ var ImageCropper = ({
|
|
|
13045
13048
|
|
|
13046
13049
|
// src/components/media-carousel.tsx
|
|
13047
13050
|
init_cn();
|
|
13048
|
-
import { useState as useState30, useRef as useRef19, useEffect as useEffect22, memo as memo3, useCallback as
|
|
13051
|
+
import { useState as useState30, useRef as useRef19, useEffect as useEffect22, memo as memo3, useCallback as useCallback17 } from "react";
|
|
13049
13052
|
import { Fragment as Fragment13, jsx as jsx96, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
13050
13053
|
var ChevronLeftIcon = () => /* @__PURE__ */ jsx96("svg", { width: "24", height: "24", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx96("polyline", { points: "15,18 9,12 15,6" }) });
|
|
13051
13054
|
var ChevronRightIcon = () => /* @__PURE__ */ jsx96("svg", { width: "24", height: "24", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx96("polyline", { points: "9,18 15,12 9,6" }) });
|
|
@@ -13121,7 +13124,7 @@ var MediaCarousel = memo3(function MediaCarousel2({
|
|
|
13121
13124
|
if (!currentItem) {
|
|
13122
13125
|
return null;
|
|
13123
13126
|
}
|
|
13124
|
-
const handleVideoClick =
|
|
13127
|
+
const handleVideoClick = useCallback17((index) => {
|
|
13125
13128
|
const item = media[index];
|
|
13126
13129
|
if (item.type !== "video") return;
|
|
13127
13130
|
const videoElements = document.querySelectorAll(`video[data-video-index="${index}"]`);
|
|
@@ -13163,7 +13166,7 @@ var MediaCarousel = memo3(function MediaCarousel2({
|
|
|
13163
13166
|
}
|
|
13164
13167
|
}
|
|
13165
13168
|
}, [media]);
|
|
13166
|
-
const nextSlide =
|
|
13169
|
+
const nextSlide = useCallback17(() => {
|
|
13167
13170
|
const currentVideo = document.querySelector(`[data-video-index="${currentIndex}"]`);
|
|
13168
13171
|
if (currentVideo && !currentVideo.paused) {
|
|
13169
13172
|
currentVideo.pause();
|
|
@@ -13171,7 +13174,7 @@ var MediaCarousel = memo3(function MediaCarousel2({
|
|
|
13171
13174
|
setPlayingVideos(/* @__PURE__ */ new Set());
|
|
13172
13175
|
setCurrentIndex((prev) => (prev + 1) % media.length);
|
|
13173
13176
|
}, [currentIndex, media.length]);
|
|
13174
|
-
const prevSlide =
|
|
13177
|
+
const prevSlide = useCallback17(() => {
|
|
13175
13178
|
const currentVideo = document.querySelector(`[data-video-index="${currentIndex}"]`);
|
|
13176
13179
|
if (currentVideo && !currentVideo.paused) {
|
|
13177
13180
|
currentVideo.pause();
|
|
@@ -13179,7 +13182,7 @@ var MediaCarousel = memo3(function MediaCarousel2({
|
|
|
13179
13182
|
setPlayingVideos(/* @__PURE__ */ new Set());
|
|
13180
13183
|
setCurrentIndex((prev) => (prev - 1 + media.length) % media.length);
|
|
13181
13184
|
}, [currentIndex, media.length]);
|
|
13182
|
-
const selectSlide =
|
|
13185
|
+
const selectSlide = useCallback17((index) => {
|
|
13183
13186
|
if (index === currentIndex) return;
|
|
13184
13187
|
const currentVideo = document.querySelector(`[data-video-index="${currentIndex}"]`);
|
|
13185
13188
|
if (currentVideo && !currentVideo.paused) {
|
|
@@ -13188,7 +13191,7 @@ var MediaCarousel = memo3(function MediaCarousel2({
|
|
|
13188
13191
|
setPlayingVideos(/* @__PURE__ */ new Set());
|
|
13189
13192
|
setCurrentIndex(index);
|
|
13190
13193
|
}, [currentIndex]);
|
|
13191
|
-
const handleKeyDown =
|
|
13194
|
+
const handleKeyDown = useCallback17((e) => {
|
|
13192
13195
|
if (media.length <= 1) return;
|
|
13193
13196
|
if (e.key === "ArrowLeft") {
|
|
13194
13197
|
e.preventDefault();
|
|
@@ -15860,7 +15863,7 @@ function DateTimePicker({
|
|
|
15860
15863
|
|
|
15861
15864
|
// src/components/shared/onboarding/onboarding-walkthrough.tsx
|
|
15862
15865
|
init_button2();
|
|
15863
|
-
import React41, { useRef as useRef20, useCallback as
|
|
15866
|
+
import React41, { useRef as useRef20, useCallback as useCallback18 } from "react";
|
|
15864
15867
|
|
|
15865
15868
|
// src/components/shared/onboarding/onboarding-step-card.tsx
|
|
15866
15869
|
import React40 from "react";
|
|
@@ -16155,7 +16158,7 @@ function OnboardingWalkthrough({
|
|
|
16155
16158
|
lastCompletionStatusRef.current = statusKey;
|
|
16156
16159
|
}
|
|
16157
16160
|
}, [completionStatus, isLoadingCompletion, state.completedSteps, markMultipleComplete]);
|
|
16158
|
-
const handleStepAction =
|
|
16161
|
+
const handleStepAction = useCallback18(async (step) => {
|
|
16159
16162
|
if (actionInProgressRef.current.has(step.id)) {
|
|
16160
16163
|
console.log(`\u23F3 Action already in progress for "${step.id}", skipping`);
|
|
16161
16164
|
return;
|
|
@@ -16803,7 +16806,7 @@ var YouTubeLinkParser = ({ href, children }) => {
|
|
|
16803
16806
|
};
|
|
16804
16807
|
|
|
16805
16808
|
// src/components/features/video-player.tsx
|
|
16806
|
-
import { useState as useState35, useEffect as useEffect26, useRef as useRef21, useMemo as useMemo11, useCallback as
|
|
16809
|
+
import { useState as useState35, useEffect as useEffect26, useRef as useRef21, useMemo as useMemo11, useCallback as useCallback19 } from "react";
|
|
16807
16810
|
import ReactPlayer2 from "react-player";
|
|
16808
16811
|
init_button2();
|
|
16809
16812
|
import { jsx as jsx139, jsxs as jsxs112 } from "react/jsx-runtime";
|
|
@@ -16918,7 +16921,7 @@ function parseSrtTimestamp(ts) {
|
|
|
16918
16921
|
function useSubtitleOverlay(srtContent) {
|
|
16919
16922
|
const cues = useMemo11(() => srtContent ? parseSrt(srtContent) : [], [srtContent]);
|
|
16920
16923
|
const [activeText, setActiveText] = useState35(null);
|
|
16921
|
-
const updateTime =
|
|
16924
|
+
const updateTime = useCallback19((playedSeconds) => {
|
|
16922
16925
|
const timeMs = playedSeconds * 1e3;
|
|
16923
16926
|
const active = cues.find((c) => timeMs >= c.from && timeMs <= c.to);
|
|
16924
16927
|
setActiveText(active?.text ?? null);
|
|
@@ -16983,14 +16986,14 @@ var VideoPlayer = ({
|
|
|
16983
16986
|
document.removeEventListener("webkitfullscreenchange", onChange);
|
|
16984
16987
|
};
|
|
16985
16988
|
}, []);
|
|
16986
|
-
const activateCaptionTracks =
|
|
16989
|
+
const activateCaptionTracks = useCallback19((video) => {
|
|
16987
16990
|
for (let i = 0; i < video.textTracks.length; i++) {
|
|
16988
16991
|
if (video.textTracks[i].kind === "captions" || video.textTracks[i].kind === "subtitles") {
|
|
16989
16992
|
video.textTracks[i].mode = "showing";
|
|
16990
16993
|
}
|
|
16991
16994
|
}
|
|
16992
16995
|
}, []);
|
|
16993
|
-
const enterNativeVideoFullscreen =
|
|
16996
|
+
const enterNativeVideoFullscreen = useCallback19(() => {
|
|
16994
16997
|
const video = playerRef.current?.getInternalPlayer();
|
|
16995
16998
|
if (!video || !video.webkitEnterFullscreen) return;
|
|
16996
16999
|
ensureWebkitCaptionCSS();
|
|
@@ -17029,7 +17032,7 @@ var VideoPlayer = ({
|
|
|
17029
17032
|
doFullscreen();
|
|
17030
17033
|
}, 500);
|
|
17031
17034
|
}, [captionsUrl, subtitleLabel, activateCaptionTracks]);
|
|
17032
|
-
const toggleFullscreen =
|
|
17035
|
+
const toggleFullscreen = useCallback19(() => {
|
|
17033
17036
|
const container = containerRef.current;
|
|
17034
17037
|
if (!container) return;
|
|
17035
17038
|
if (isFullscreen) {
|
|
@@ -17048,7 +17051,7 @@ var VideoPlayer = ({
|
|
|
17048
17051
|
enterNativeVideoFullscreen();
|
|
17049
17052
|
}
|
|
17050
17053
|
}, [isFullscreen, enterNativeVideoFullscreen]);
|
|
17051
|
-
const toggleMute =
|
|
17054
|
+
const toggleMute = useCallback19(() => {
|
|
17052
17055
|
if (isMuted) {
|
|
17053
17056
|
setIsMuted(false);
|
|
17054
17057
|
setVolume(prevVolume || 0.5);
|
|
@@ -17058,23 +17061,23 @@ var VideoPlayer = ({
|
|
|
17058
17061
|
setVolume(0);
|
|
17059
17062
|
}
|
|
17060
17063
|
}, [isMuted, volume, prevVolume]);
|
|
17061
|
-
const handleVolumeChange =
|
|
17064
|
+
const handleVolumeChange = useCallback19((e) => {
|
|
17062
17065
|
const val = parseFloat(e.target.value);
|
|
17063
17066
|
setVolume(val);
|
|
17064
17067
|
setIsMuted(val === 0);
|
|
17065
17068
|
if (val > 0) setPrevVolume(val);
|
|
17066
17069
|
}, []);
|
|
17067
|
-
const startHideTimer =
|
|
17070
|
+
const startHideTimer = useCallback19(() => {
|
|
17068
17071
|
clearTimeout(hideTimeoutRef.current);
|
|
17069
17072
|
if (isPlaying) {
|
|
17070
17073
|
hideTimeoutRef.current = setTimeout(() => setShowControls(false), 3e3);
|
|
17071
17074
|
}
|
|
17072
17075
|
}, [isPlaying]);
|
|
17073
|
-
const handleMouseMove =
|
|
17076
|
+
const handleMouseMove = useCallback19(() => {
|
|
17074
17077
|
setShowControls(true);
|
|
17075
17078
|
startHideTimer();
|
|
17076
17079
|
}, [startHideTimer]);
|
|
17077
|
-
const handleTouchToggle =
|
|
17080
|
+
const handleTouchToggle = useCallback19(() => {
|
|
17078
17081
|
if (!hasStarted) return;
|
|
17079
17082
|
setShowControls((prev) => {
|
|
17080
17083
|
const next = !prev;
|
|
@@ -17143,7 +17146,7 @@ var VideoPlayer = ({
|
|
|
17143
17146
|
}, [hasStarted, duration, toggleMute, toggleFullscreen]);
|
|
17144
17147
|
const [seekPreview, setSeekPreview] = useState35(null);
|
|
17145
17148
|
const [playbackRate, setPlaybackRate] = useState35(1);
|
|
17146
|
-
const cycleSpeed =
|
|
17149
|
+
const cycleSpeed = useCallback19(() => {
|
|
17147
17150
|
setPlaybackRate((prev) => {
|
|
17148
17151
|
const idx = SPEED_OPTIONS.indexOf(prev);
|
|
17149
17152
|
return SPEED_OPTIONS[(idx + 1) % SPEED_OPTIONS.length];
|
|
@@ -17152,14 +17155,14 @@ var VideoPlayer = ({
|
|
|
17152
17155
|
const progressBarRef = useRef21(null);
|
|
17153
17156
|
const isDraggingRef = useRef21(false);
|
|
17154
17157
|
const dragListenersRef = useRef21(null);
|
|
17155
|
-
const seekToClientX =
|
|
17158
|
+
const seekToClientX = useCallback19((clientX) => {
|
|
17156
17159
|
const rect = progressBarRef.current?.getBoundingClientRect();
|
|
17157
17160
|
if (!rect) return;
|
|
17158
17161
|
const fraction = Math.max(0, Math.min(1, (clientX - rect.left) / rect.width));
|
|
17159
17162
|
setPlayed(fraction);
|
|
17160
17163
|
playerRef.current?.seekTo(fraction, "fraction");
|
|
17161
17164
|
}, []);
|
|
17162
|
-
const handleProgressMouseDown =
|
|
17165
|
+
const handleProgressMouseDown = useCallback19((e) => {
|
|
17163
17166
|
e.stopPropagation();
|
|
17164
17167
|
e.preventDefault();
|
|
17165
17168
|
isDraggingRef.current = true;
|
|
@@ -17182,17 +17185,17 @@ var VideoPlayer = ({
|
|
|
17182
17185
|
document.addEventListener("mousemove", onMouseMove);
|
|
17183
17186
|
document.addEventListener("mouseup", onMouseUp);
|
|
17184
17187
|
}, [seekToClientX]);
|
|
17185
|
-
const handleProgressTouchStart =
|
|
17188
|
+
const handleProgressTouchStart = useCallback19((e) => {
|
|
17186
17189
|
e.stopPropagation();
|
|
17187
17190
|
const touch = e.touches[0];
|
|
17188
17191
|
if (touch) seekToClientX(touch.clientX);
|
|
17189
17192
|
}, [seekToClientX]);
|
|
17190
|
-
const handleProgressTouchMove =
|
|
17193
|
+
const handleProgressTouchMove = useCallback19((e) => {
|
|
17191
17194
|
e.stopPropagation();
|
|
17192
17195
|
const touch = e.touches[0];
|
|
17193
17196
|
if (touch) seekToClientX(touch.clientX);
|
|
17194
17197
|
}, [seekToClientX]);
|
|
17195
|
-
const handleProgressKeyDown =
|
|
17198
|
+
const handleProgressKeyDown = useCallback19((e) => {
|
|
17196
17199
|
if (e.key === "ArrowRight") {
|
|
17197
17200
|
e.preventDefault();
|
|
17198
17201
|
e.stopPropagation();
|
|
@@ -17214,7 +17217,7 @@ var VideoPlayer = ({
|
|
|
17214
17217
|
playerRef.current?.seekTo(duration, "seconds");
|
|
17215
17218
|
}
|
|
17216
17219
|
}, [duration]);
|
|
17217
|
-
const handleProgressHover =
|
|
17220
|
+
const handleProgressHover = useCallback19((e) => {
|
|
17218
17221
|
if (isDraggingRef.current) return;
|
|
17219
17222
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
17220
17223
|
const fraction = Math.max(0, Math.min(1, (e.clientX - rect.left) / rect.width));
|
|
@@ -17222,7 +17225,7 @@ var VideoPlayer = ({
|
|
|
17222
17225
|
setSeekPreview({ fraction, x });
|
|
17223
17226
|
}, []);
|
|
17224
17227
|
const isTouchRef = useRef21(false);
|
|
17225
|
-
const handleContainerClick =
|
|
17228
|
+
const handleContainerClick = useCallback19((e) => {
|
|
17226
17229
|
if (isTouchRef.current) {
|
|
17227
17230
|
isTouchRef.current = false;
|
|
17228
17231
|
return;
|
|
@@ -17240,7 +17243,7 @@ var VideoPlayer = ({
|
|
|
17240
17243
|
}, 250);
|
|
17241
17244
|
}
|
|
17242
17245
|
}, [hasStarted, toggleFullscreen]);
|
|
17243
|
-
const handleContainerTouchEnd =
|
|
17246
|
+
const handleContainerTouchEnd = useCallback19((e) => {
|
|
17244
17247
|
if (e.target.closest(".video-controls-bar")) return;
|
|
17245
17248
|
isTouchRef.current = true;
|
|
17246
17249
|
if (!hasStarted) return;
|
|
@@ -17272,14 +17275,14 @@ var VideoPlayer = ({
|
|
|
17272
17275
|
video.addEventListener("webkitbeginfullscreen", onBeginFS);
|
|
17273
17276
|
return () => video.removeEventListener("webkitbeginfullscreen", onBeginFS);
|
|
17274
17277
|
}, [hasStarted, activateCaptionTracks]);
|
|
17275
|
-
const handleError =
|
|
17276
|
-
const handlePlay =
|
|
17278
|
+
const handleError = useCallback19(() => setHasError(true), []);
|
|
17279
|
+
const handlePlay = useCallback19(() => {
|
|
17277
17280
|
setIsPlaying(true);
|
|
17278
17281
|
setHasStarted(true);
|
|
17279
17282
|
}, []);
|
|
17280
|
-
const handlePause =
|
|
17281
|
-
const handleEnded =
|
|
17282
|
-
const handlePlayClick =
|
|
17283
|
+
const handlePause = useCallback19(() => setIsPlaying(false), []);
|
|
17284
|
+
const handleEnded = useCallback19(() => setIsPlaying(false), []);
|
|
17285
|
+
const handlePlayClick = useCallback19(() => {
|
|
17283
17286
|
if (lazyMount) {
|
|
17284
17287
|
const native = playerRef.current?.getInternalPlayer();
|
|
17285
17288
|
if (native instanceof HTMLVideoElement) {
|
|
@@ -17296,13 +17299,13 @@ var VideoPlayer = ({
|
|
|
17296
17299
|
setHasStarted(true);
|
|
17297
17300
|
setIsPlaying(true);
|
|
17298
17301
|
}, [lazyMount]);
|
|
17299
|
-
const handleProgress =
|
|
17302
|
+
const handleProgress = useCallback19(({ played: p, loaded: l, playedSeconds }) => {
|
|
17300
17303
|
setPlayed(p);
|
|
17301
17304
|
setLoaded(l);
|
|
17302
17305
|
updateTime(playedSeconds);
|
|
17303
17306
|
}, [updateTime]);
|
|
17304
|
-
const handleBuffer =
|
|
17305
|
-
const handleBufferEnd =
|
|
17307
|
+
const handleBuffer = useCallback19(() => setIsBuffering(true), []);
|
|
17308
|
+
const handleBufferEnd = useCallback19(() => setIsBuffering(false), []);
|
|
17306
17309
|
if (!mounted) {
|
|
17307
17310
|
return /* @__PURE__ */ jsx139("div", { className: `video-player-container ${className}`, children: /* @__PURE__ */ jsx139(
|
|
17308
17311
|
"div",
|
|
@@ -17585,7 +17588,7 @@ import React46 from "react";
|
|
|
17585
17588
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
17586
17589
|
import { Check as Check2 } from "lucide-react";
|
|
17587
17590
|
import Link3 from "next/link";
|
|
17588
|
-
import React45, { useCallback as
|
|
17591
|
+
import React45, { useCallback as useCallback20, useState as useState36 } from "react";
|
|
17589
17592
|
init_cn();
|
|
17590
17593
|
init_button2();
|
|
17591
17594
|
import { Fragment as Fragment19, jsx as jsx140, jsxs as jsxs113 } from "react/jsx-runtime";
|
|
@@ -17593,7 +17596,7 @@ var ROW_CLASSES = "flex flex-1 min-w-0 items-center gap-2 px-3 py-3 cursor-point
|
|
|
17593
17596
|
var WRAPPER_CLASSES = "relative flex items-stretch border-b border-ods-border last:border-b-0";
|
|
17594
17597
|
var SECONDARY_ACTION_CLASSES = "flex w-10 shrink-0 items-center justify-center self-stretch border-l border-ods-border transition-colors hover:bg-ods-bg-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ods-focus";
|
|
17595
17598
|
var SecondaryAction = ({ action }) => {
|
|
17596
|
-
const handleClick =
|
|
17599
|
+
const handleClick = useCallback20(
|
|
17597
17600
|
(e) => {
|
|
17598
17601
|
e.stopPropagation();
|
|
17599
17602
|
if (action.disabled) {
|
|
@@ -17638,7 +17641,7 @@ var SecondaryAction = ({ action }) => {
|
|
|
17638
17641
|
);
|
|
17639
17642
|
};
|
|
17640
17643
|
var MenuItem = ({ item, onItemClick }) => {
|
|
17641
|
-
const activate =
|
|
17644
|
+
const activate = useCallback20(() => {
|
|
17642
17645
|
if (item.disabled) return;
|
|
17643
17646
|
if (item.type === "checkbox") {
|
|
17644
17647
|
item.onClick?.();
|
|
@@ -17649,7 +17652,7 @@ var MenuItem = ({ item, onItemClick }) => {
|
|
|
17649
17652
|
item.onClick?.();
|
|
17650
17653
|
onItemClick?.(item);
|
|
17651
17654
|
}, [item, onItemClick]);
|
|
17652
|
-
const handleClick =
|
|
17655
|
+
const handleClick = useCallback20(
|
|
17653
17656
|
(e) => {
|
|
17654
17657
|
e.stopPropagation();
|
|
17655
17658
|
e.preventDefault();
|
|
@@ -17657,7 +17660,7 @@ var MenuItem = ({ item, onItemClick }) => {
|
|
|
17657
17660
|
},
|
|
17658
17661
|
[activate]
|
|
17659
17662
|
);
|
|
17660
|
-
const handleKeyDown =
|
|
17663
|
+
const handleKeyDown = useCallback20(
|
|
17661
17664
|
(e) => {
|
|
17662
17665
|
if (e.key !== "Enter" && e.key !== " ") return;
|
|
17663
17666
|
e.preventDefault();
|
|
@@ -17666,7 +17669,7 @@ var MenuItem = ({ item, onItemClick }) => {
|
|
|
17666
17669
|
},
|
|
17667
17670
|
[activate]
|
|
17668
17671
|
);
|
|
17669
|
-
const handleLinkClick =
|
|
17672
|
+
const handleLinkClick = useCallback20(
|
|
17670
17673
|
(e) => {
|
|
17671
17674
|
if (item.disabled) {
|
|
17672
17675
|
e.preventDefault();
|
|
@@ -17827,7 +17830,7 @@ var ActionsMenuDropdown = ({
|
|
|
17827
17830
|
sideOffset = 6
|
|
17828
17831
|
}) => {
|
|
17829
17832
|
const [open, setOpen] = useState36(false);
|
|
17830
|
-
const handleItemClick =
|
|
17833
|
+
const handleItemClick = useCallback20(
|
|
17831
17834
|
(item) => {
|
|
17832
17835
|
onItemClick?.(item);
|
|
17833
17836
|
if (item.type !== "checkbox" && item.type !== "submenu") {
|
|
@@ -18712,7 +18715,7 @@ function InfoCard({ data, className = "" }) {
|
|
|
18712
18715
|
}
|
|
18713
18716
|
function InfoCardValueRow({ label, value, showLabel, copyable, copyAriaLabel }) {
|
|
18714
18717
|
const { copy, copied } = useCopyToClipboard();
|
|
18715
|
-
return /* @__PURE__ */ jsxs119("div", { className: "flex h-6 items-center gap-
|
|
18718
|
+
return /* @__PURE__ */ jsxs119("div", { className: "flex h-6 items-center gap-[var(--spacing-system-xs)] self-stretch w-full", children: [
|
|
18716
18719
|
/* @__PURE__ */ jsx147("span", { className: "text-h4 text-ods-text-primary whitespace-nowrap", children: showLabel ? label : "" }),
|
|
18717
18720
|
/* @__PURE__ */ jsx147("div", { className: "flex-1 h-px bg-ods-divider" }),
|
|
18718
18721
|
/* @__PURE__ */ jsxs119("div", { className: "flex items-center gap-[var(--spacing-system-xsf)] max-w-[60%]", children: [
|
|
@@ -20518,7 +20521,7 @@ function TabContent({
|
|
|
20518
20521
|
|
|
20519
20522
|
// src/components/ui/tab-navigation.tsx
|
|
20520
20523
|
init_cn();
|
|
20521
|
-
import { useState as useState42, useEffect as useEffect32, useMemo as useMemo12, useRef as useRef24, useCallback as
|
|
20524
|
+
import { useState as useState42, useEffect as useEffect32, useMemo as useMemo12, useRef as useRef24, useCallback as useCallback22 } from "react";
|
|
20522
20525
|
import { useSearchParams as useSearchParams3, useRouter as useRouter5, usePathname as usePathname3 } from "next/navigation";
|
|
20523
20526
|
import { Fragment as Fragment22, jsx as jsx168, jsxs as jsxs137 } from "react/jsx-runtime";
|
|
20524
20527
|
function TabNavigation({
|
|
@@ -20574,7 +20577,7 @@ function TabNavigation({
|
|
|
20574
20577
|
const scrollRef = useRef24(null);
|
|
20575
20578
|
const [canScrollLeft, setCanScrollLeft] = useState42(false);
|
|
20576
20579
|
const [canScrollRight, setCanScrollRight] = useState42(false);
|
|
20577
|
-
const updateScrollShadows =
|
|
20580
|
+
const updateScrollShadows = useCallback22(() => {
|
|
20578
20581
|
const el = scrollRef.current;
|
|
20579
20582
|
if (!el) return;
|
|
20580
20583
|
setCanScrollLeft(el.scrollLeft > 0);
|
|
@@ -24265,7 +24268,7 @@ import { useMemo as useMemo16 } from "react";
|
|
|
24265
24268
|
|
|
24266
24269
|
// src/components/ui/query-report-table/query-report-table-header.tsx
|
|
24267
24270
|
init_cn();
|
|
24268
|
-
import { useRef as useRef28, useState as useState47, useCallback as
|
|
24271
|
+
import { useRef as useRef28, useState as useState47, useCallback as useCallback23 } from "react";
|
|
24269
24272
|
import { jsx as jsx217, jsxs as jsxs176 } from "react/jsx-runtime";
|
|
24270
24273
|
function QueryReportTableHeader({
|
|
24271
24274
|
columns,
|
|
@@ -24296,7 +24299,7 @@ function QueryReportTableHeader({
|
|
|
24296
24299
|
function TruncatedHeaderCell({ value, width }) {
|
|
24297
24300
|
const textRef = useRef28(null);
|
|
24298
24301
|
const [isTruncated, setIsTruncated] = useState47(false);
|
|
24299
|
-
const checkTruncation =
|
|
24302
|
+
const checkTruncation = useCallback23(() => {
|
|
24300
24303
|
const el = textRef.current;
|
|
24301
24304
|
if (el) {
|
|
24302
24305
|
setIsTruncated(el.scrollWidth > el.clientWidth);
|
|
@@ -24324,7 +24327,7 @@ function TruncatedHeaderCell({ value, width }) {
|
|
|
24324
24327
|
|
|
24325
24328
|
// src/components/ui/query-report-table/query-report-table-row.tsx
|
|
24326
24329
|
init_cn();
|
|
24327
|
-
import { useRef as useRef29, useState as useState48, useCallback as
|
|
24330
|
+
import { useRef as useRef29, useState as useState48, useCallback as useCallback24 } from "react";
|
|
24328
24331
|
import { jsx as jsx218, jsxs as jsxs177 } from "react/jsx-runtime";
|
|
24329
24332
|
function QueryReportTableRow({
|
|
24330
24333
|
row,
|
|
@@ -24372,7 +24375,7 @@ function QueryReportTableRow({
|
|
|
24372
24375
|
function TruncatedCell({ value, className }) {
|
|
24373
24376
|
const textRef = useRef29(null);
|
|
24374
24377
|
const [isTruncated, setIsTruncated] = useState48(false);
|
|
24375
|
-
const checkTruncation =
|
|
24378
|
+
const checkTruncation = useCallback24(() => {
|
|
24376
24379
|
const el = textRef.current;
|
|
24377
24380
|
if (el) {
|
|
24378
24381
|
setIsTruncated(el.scrollWidth > el.clientWidth);
|
|
@@ -24635,7 +24638,7 @@ init_cn();
|
|
|
24635
24638
|
|
|
24636
24639
|
// src/components/ui/data-table/data-table-column-filter.tsx
|
|
24637
24640
|
init_cn();
|
|
24638
|
-
import { useCallback as
|
|
24641
|
+
import { useCallback as useCallback25, useMemo as useMemo17 } from "react";
|
|
24639
24642
|
|
|
24640
24643
|
// src/components/ui/data-table/utils.ts
|
|
24641
24644
|
function getHideClasses2(hideAt) {
|
|
@@ -24695,14 +24698,14 @@ function DataTableColumnFilter({
|
|
|
24695
24698
|
() => ({ [column.id]: currentValue ?? EMPTY_ARRAY }),
|
|
24696
24699
|
[column.id, currentValue]
|
|
24697
24700
|
);
|
|
24698
|
-
const handleApply =
|
|
24701
|
+
const handleApply = useCallback25(
|
|
24699
24702
|
(applied) => {
|
|
24700
24703
|
const next = applied[column.id] ?? [];
|
|
24701
24704
|
column.setFilterValue(next.length > 0 ? next : void 0);
|
|
24702
24705
|
},
|
|
24703
24706
|
[column]
|
|
24704
24707
|
);
|
|
24705
|
-
const handleReset =
|
|
24708
|
+
const handleReset = useCallback25(() => {
|
|
24706
24709
|
column.setFilterValue(void 0);
|
|
24707
24710
|
}, [column]);
|
|
24708
24711
|
return /* @__PURE__ */ jsx222(
|
|
@@ -24889,7 +24892,7 @@ function DataTableEmpty({
|
|
|
24889
24892
|
// src/components/ui/data-table/data-table-row.tsx
|
|
24890
24893
|
init_cn();
|
|
24891
24894
|
import Link10 from "next/link";
|
|
24892
|
-
import { memo as memo4, useCallback as
|
|
24895
|
+
import { memo as memo4, useCallback as useCallback26 } from "react";
|
|
24893
24896
|
import { flexRender as flexRender2 } from "@tanstack/react-table";
|
|
24894
24897
|
|
|
24895
24898
|
// src/components/ui/data-table/data-table-skeleton.tsx
|
|
@@ -24970,7 +24973,7 @@ function DataTableRowImpl({
|
|
|
24970
24973
|
className
|
|
24971
24974
|
}) {
|
|
24972
24975
|
const isLinkMode = Boolean(href) && !onClick;
|
|
24973
|
-
const handleClick =
|
|
24976
|
+
const handleClick = useCallback26(
|
|
24974
24977
|
(e) => {
|
|
24975
24978
|
const target = e.target;
|
|
24976
24979
|
if (target.closest("[data-no-row-click]")) return;
|
|
@@ -25244,7 +25247,7 @@ var DataTable = Object.assign(DataTableRoot, {
|
|
|
25244
25247
|
});
|
|
25245
25248
|
|
|
25246
25249
|
// src/components/ui/phone-input.tsx
|
|
25247
|
-
import { useCallback as
|
|
25250
|
+
import { useCallback as useCallback27, useEffect as useEffect37, useMemo as useMemo18, useRef as useRef31, useState as useState49 } from "react";
|
|
25248
25251
|
import { jsx as jsx230, jsxs as jsxs188 } from "react/jsx-runtime";
|
|
25249
25252
|
function PhoneInput({
|
|
25250
25253
|
value,
|
|
@@ -25263,8 +25266,8 @@ function PhoneInput({
|
|
|
25263
25266
|
);
|
|
25264
25267
|
const [isInvalid, setIsInvalid] = useState49(false);
|
|
25265
25268
|
const debounceRef = useRef31(null);
|
|
25266
|
-
const digitCount =
|
|
25267
|
-
const runValidation =
|
|
25269
|
+
const digitCount = useCallback27((val) => val.replace(/[^0-9]/g, "").length, []);
|
|
25270
|
+
const runValidation = useCallback27((phone) => {
|
|
25268
25271
|
if (!phone || digitCount(phone) === 0) {
|
|
25269
25272
|
setIsInvalid(false);
|
|
25270
25273
|
onValidationChange?.(false);
|
|
@@ -25274,7 +25277,7 @@ function PhoneInput({
|
|
|
25274
25277
|
setIsInvalid(invalid);
|
|
25275
25278
|
onValidationChange?.(invalid);
|
|
25276
25279
|
}, [countryCode, digitCount, onValidationChange]);
|
|
25277
|
-
const debouncedValidation =
|
|
25280
|
+
const debouncedValidation = useCallback27((phone) => {
|
|
25278
25281
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
25279
25282
|
debounceRef.current = setTimeout(() => runValidation(phone), 300);
|
|
25280
25283
|
}, [runValidation]);
|
|
@@ -26036,7 +26039,7 @@ function TagSearchInput({
|
|
|
26036
26039
|
|
|
26037
26040
|
// src/components/ui/markdown-editor.tsx
|
|
26038
26041
|
init_cn();
|
|
26039
|
-
import { useRef as useRef34, useCallback as
|
|
26042
|
+
import { useRef as useRef34, useCallback as useCallback28, useState as useState52, useEffect as useEffect40 } from "react";
|
|
26040
26043
|
import dynamic from "next/dynamic";
|
|
26041
26044
|
import { Loader2 as Loader23, Upload as Upload2 } from "lucide-react";
|
|
26042
26045
|
import { jsx as jsx234, jsxs as jsxs192 } from "react/jsx-runtime";
|
|
@@ -26105,7 +26108,7 @@ function MarkdownEditor({
|
|
|
26105
26108
|
const handleChange = (val) => {
|
|
26106
26109
|
onChange(val || "");
|
|
26107
26110
|
};
|
|
26108
|
-
const insertTextAtCursor =
|
|
26111
|
+
const insertTextAtCursor = useCallback28(
|
|
26109
26112
|
(text) => {
|
|
26110
26113
|
const textarea = document.querySelector(
|
|
26111
26114
|
".w-md-editor-text-textarea"
|
|
@@ -26121,7 +26124,7 @@ function MarkdownEditor({
|
|
|
26121
26124
|
},
|
|
26122
26125
|
[value, onChange]
|
|
26123
26126
|
);
|
|
26124
|
-
const handleFileUpload =
|
|
26127
|
+
const handleFileUpload = useCallback28(
|
|
26125
26128
|
async (file) => {
|
|
26126
26129
|
if (!onUploadFile) return;
|
|
26127
26130
|
setIsUploading(true);
|
|
@@ -26142,7 +26145,7 @@ function MarkdownEditor({
|
|
|
26142
26145
|
},
|
|
26143
26146
|
[onUploadFile, insertTextAtCursor, onFileUploaded]
|
|
26144
26147
|
);
|
|
26145
|
-
const handleFileInputChange =
|
|
26148
|
+
const handleFileInputChange = useCallback28(
|
|
26146
26149
|
(e) => {
|
|
26147
26150
|
const file = e.target.files?.[0];
|
|
26148
26151
|
if (file) {
|
|
@@ -26152,7 +26155,7 @@ function MarkdownEditor({
|
|
|
26152
26155
|
},
|
|
26153
26156
|
[handleFileUpload]
|
|
26154
26157
|
);
|
|
26155
|
-
const handlePaste =
|
|
26158
|
+
const handlePaste = useCallback28(
|
|
26156
26159
|
(e) => {
|
|
26157
26160
|
if (!onUploadFile) return;
|
|
26158
26161
|
const items = e.clipboardData?.items;
|
|
@@ -26191,7 +26194,7 @@ function MarkdownEditor({
|
|
|
26191
26194
|
const scrollParentRef = useRef34(window);
|
|
26192
26195
|
const EDGE_ZONE = 60;
|
|
26193
26196
|
const MAX_SCROLL_SPEED = 15;
|
|
26194
|
-
const findScrollParent =
|
|
26197
|
+
const findScrollParent = useCallback28((el) => {
|
|
26195
26198
|
let node = el?.parentElement;
|
|
26196
26199
|
while (node && node !== document.documentElement) {
|
|
26197
26200
|
const { overflowY } = window.getComputedStyle(node);
|
|
@@ -26202,7 +26205,7 @@ function MarkdownEditor({
|
|
|
26202
26205
|
}
|
|
26203
26206
|
return window;
|
|
26204
26207
|
}, []);
|
|
26205
|
-
const scrollLoop =
|
|
26208
|
+
const scrollLoop = useCallback28(() => {
|
|
26206
26209
|
if (!isDraggingRef.current) return;
|
|
26207
26210
|
const parent = scrollParentRef.current;
|
|
26208
26211
|
const isWindow = parent === window;
|
|
@@ -28043,7 +28046,7 @@ var ErrorBoundary = class extends Component {
|
|
|
28043
28046
|
|
|
28044
28047
|
// src/components/features/figma-prototype-viewer.tsx
|
|
28045
28048
|
init_cn();
|
|
28046
|
-
import { useState as useState61, useRef as useRef37, useEffect as useEffect45, useCallback as
|
|
28049
|
+
import { useState as useState61, useRef as useRef37, useEffect as useEffect45, useCallback as useCallback30, useMemo as useMemo22 } from "react";
|
|
28047
28050
|
|
|
28048
28051
|
// src/components/features/section-selector.tsx
|
|
28049
28052
|
init_cn();
|
|
@@ -28551,7 +28554,7 @@ var FigmaPrototypeViewer = ({
|
|
|
28551
28554
|
window.addEventListener("message", handleMessage);
|
|
28552
28555
|
return () => window.removeEventListener("message", handleMessage);
|
|
28553
28556
|
}, [config.sections, activeSection, isNavigating, externalActiveSection, config.onSectionChange, viewMode]);
|
|
28554
|
-
const navigateToSection =
|
|
28557
|
+
const navigateToSection = useCallback30((sectionId) => {
|
|
28555
28558
|
const section = config.sections.find((s) => s.id === sectionId);
|
|
28556
28559
|
if (!section || !iframeRef.current?.contentWindow || !isInitialized) {
|
|
28557
28560
|
return;
|
|
@@ -28575,7 +28578,7 @@ var FigmaPrototypeViewer = ({
|
|
|
28575
28578
|
if (navTimerRef.current) clearTimeout(navTimerRef.current);
|
|
28576
28579
|
navTimerRef.current = setTimeout(() => setIsNavigating(false), 500);
|
|
28577
28580
|
}, [config, isInitialized, viewMode, externalActiveSection]);
|
|
28578
|
-
const handleSectionClick =
|
|
28581
|
+
const handleSectionClick = useCallback30((sectionId) => {
|
|
28579
28582
|
const sectionsDisabled = iframeState !== "READY" || isNavigating;
|
|
28580
28583
|
if (sectionId === activeSection || sectionsDisabled) {
|
|
28581
28584
|
return;
|
|
@@ -28586,7 +28589,7 @@ var FigmaPrototypeViewer = ({
|
|
|
28586
28589
|
navigateToSection(sectionId);
|
|
28587
28590
|
}
|
|
28588
28591
|
}, [activeSection, iframeState, isNavigating, externalOnSectionClick, navigateToSection]);
|
|
28589
|
-
const handleTouchStart =
|
|
28592
|
+
const handleTouchStart = useCallback30((e) => {
|
|
28590
28593
|
const overlayElement = e.currentTarget;
|
|
28591
28594
|
console.log("[Touch] Touch detected, allowing iframe interaction");
|
|
28592
28595
|
overlayElement.style.pointerEvents = "none";
|
|
@@ -29150,7 +29153,7 @@ function useLoading() {
|
|
|
29150
29153
|
}
|
|
29151
29154
|
|
|
29152
29155
|
// src/components/features/media-gallery-manager.tsx
|
|
29153
|
-
import { useState as useState64, useRef as useRef39, useCallback as
|
|
29156
|
+
import { useState as useState64, useRef as useRef39, useCallback as useCallback31 } from "react";
|
|
29154
29157
|
import {
|
|
29155
29158
|
Upload as Upload3,
|
|
29156
29159
|
Image as ImageIcon2,
|
|
@@ -29174,7 +29177,7 @@ function MediaGalleryManager({
|
|
|
29174
29177
|
const fileInputRef = useRef39(null);
|
|
29175
29178
|
const [deletingIndex, setDeletingIndex] = useState64(null);
|
|
29176
29179
|
const [draggedIndex, setDraggedIndex] = useState64(null);
|
|
29177
|
-
const handleFileSelect =
|
|
29180
|
+
const handleFileSelect = useCallback31(async (event) => {
|
|
29178
29181
|
const file = event.target.files?.[0];
|
|
29179
29182
|
if (!file) return;
|
|
29180
29183
|
let mediaType;
|
|
@@ -29200,18 +29203,18 @@ function MediaGalleryManager({
|
|
|
29200
29203
|
console.error("Upload failed:", error);
|
|
29201
29204
|
}
|
|
29202
29205
|
}, [media, onChange, onUpload]);
|
|
29203
|
-
const handleDeleteMedia =
|
|
29206
|
+
const handleDeleteMedia = useCallback31((index) => {
|
|
29204
29207
|
setDeletingIndex(index);
|
|
29205
29208
|
onChange(media.filter((_, i) => i !== index));
|
|
29206
29209
|
setDeletingIndex(null);
|
|
29207
29210
|
}, [media, onChange]);
|
|
29208
|
-
const handleDragStart =
|
|
29211
|
+
const handleDragStart = useCallback31((index) => {
|
|
29209
29212
|
setDraggedIndex(index);
|
|
29210
29213
|
}, []);
|
|
29211
|
-
const handleDragOver =
|
|
29214
|
+
const handleDragOver = useCallback31((e) => {
|
|
29212
29215
|
e.preventDefault();
|
|
29213
29216
|
}, []);
|
|
29214
|
-
const handleDrop =
|
|
29217
|
+
const handleDrop = useCallback31((e, targetIndex) => {
|
|
29215
29218
|
e.preventDefault();
|
|
29216
29219
|
if (draggedIndex === null || draggedIndex === targetIndex) {
|
|
29217
29220
|
setDraggedIndex(null);
|
|
@@ -29223,7 +29226,7 @@ function MediaGalleryManager({
|
|
|
29223
29226
|
onChange(newMedia.map((item, i) => ({ ...item, display_order: i })));
|
|
29224
29227
|
setDraggedIndex(null);
|
|
29225
29228
|
}, [media, draggedIndex, onChange]);
|
|
29226
|
-
const renderMediaItem =
|
|
29229
|
+
const renderMediaItem = useCallback31((mediaItem, index) => {
|
|
29227
29230
|
const isDeleting = deletingIndex === index;
|
|
29228
29231
|
return /* @__PURE__ */ jsxs211(
|
|
29229
29232
|
Card,
|
|
@@ -30986,7 +30989,7 @@ function TagsSelector({
|
|
|
30986
30989
|
|
|
30987
30990
|
// src/components/features/video-source-selector.tsx
|
|
30988
30991
|
init_button2();
|
|
30989
|
-
import { useState as useState69, useCallback as
|
|
30992
|
+
import { useState as useState69, useCallback as useCallback32 } from "react";
|
|
30990
30993
|
import { Upload as Upload6, Sparkles as Sparkles3, X as X13, Video as Video5 } from "lucide-react";
|
|
30991
30994
|
import { jsx as jsx272, jsxs as jsxs224 } from "react/jsx-runtime";
|
|
30992
30995
|
function VideoSourceSelector({
|
|
@@ -31015,7 +31018,7 @@ function VideoSourceSelector({
|
|
|
31015
31018
|
const [uploadProgress, setUploadProgress] = useState69(0);
|
|
31016
31019
|
const [uploadMessage, setUploadMessage] = useState69("");
|
|
31017
31020
|
const [uploadError, setUploadError] = useState69(null);
|
|
31018
|
-
const handleUploadClick =
|
|
31021
|
+
const handleUploadClick = useCallback32(() => {
|
|
31019
31022
|
const input = document.createElement("input");
|
|
31020
31023
|
input.type = "file";
|
|
31021
31024
|
input.accept = "video/*";
|
|
@@ -31046,7 +31049,7 @@ function VideoSourceSelector({
|
|
|
31046
31049
|
};
|
|
31047
31050
|
input.click();
|
|
31048
31051
|
}, [onUploadVideo, onUploadedVideoUrlChange]);
|
|
31049
|
-
const handleDeleteVideo =
|
|
31052
|
+
const handleDeleteVideo = useCallback32(() => {
|
|
31050
31053
|
onUploadedVideoUrlChange("");
|
|
31051
31054
|
}, [onUploadedVideoUrlChange]);
|
|
31052
31055
|
return /* @__PURE__ */ jsxs224("div", { className: `space-y-4 p-6 bg-ods-card border border-ods-border rounded-lg ${className}`, children: [
|
|
@@ -33454,7 +33457,7 @@ function EmptyState3() {
|
|
|
33454
33457
|
}
|
|
33455
33458
|
|
|
33456
33459
|
// src/components/features/board/use-board-collapse.ts
|
|
33457
|
-
import { useCallback as
|
|
33460
|
+
import { useCallback as useCallback34, useState as useState73 } from "react";
|
|
33458
33461
|
function useBoardCollapse(storageKey) {
|
|
33459
33462
|
const [persisted, setPersisted] = useLocalStorage(
|
|
33460
33463
|
storageKey ?? "__board_collapse_unused__",
|
|
@@ -33463,13 +33466,13 @@ function useBoardCollapse(storageKey) {
|
|
|
33463
33466
|
const [memory, setMemory] = useState73({});
|
|
33464
33467
|
const collapsed = storageKey ? persisted : memory;
|
|
33465
33468
|
const setMap = storageKey ? setPersisted : setMemory;
|
|
33466
|
-
const toggle =
|
|
33469
|
+
const toggle = useCallback34(
|
|
33467
33470
|
(columnId) => {
|
|
33468
33471
|
setMap((prev) => ({ ...prev, [columnId]: !prev[columnId] }));
|
|
33469
33472
|
},
|
|
33470
33473
|
[setMap]
|
|
33471
33474
|
);
|
|
33472
|
-
const setCollapsed =
|
|
33475
|
+
const setCollapsed = useCallback34(
|
|
33473
33476
|
(columnId, value) => {
|
|
33474
33477
|
setMap((prev) => ({ ...prev, [columnId]: value }));
|
|
33475
33478
|
},
|
|
@@ -34342,4 +34345,4 @@ export {
|
|
|
34342
34345
|
TMCG_SOCIAL_PLATFORMS,
|
|
34343
34346
|
assets
|
|
34344
34347
|
};
|
|
34345
|
-
//# sourceMappingURL=chunk-
|
|
34348
|
+
//# sourceMappingURL=chunk-6LDN3CIY.js.map
|