@flamingo-stack/openframe-frontend-core 0.0.568 → 0.0.569
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-P7QGTNEW.cjs → chunk-2DSDGWWU.cjs} +101 -101
- package/dist/{chunk-P7QGTNEW.cjs.map → chunk-2DSDGWWU.cjs.map} +1 -1
- package/dist/{chunk-ZARYIFCI.js → chunk-3UPQAOES.js} +5 -3
- package/dist/{chunk-ZARYIFCI.js.map → chunk-3UPQAOES.js.map} +1 -1
- package/dist/{chunk-KL6ZDLDF.js → chunk-4NN7V443.js} +2 -2
- package/dist/{chunk-G2PAUMV6.js → chunk-6STF67EF.js} +4 -4
- package/dist/{chunk-6RSKK4E7.cjs → chunk-74DB5H5T.cjs} +1258 -1162
- package/dist/chunk-74DB5H5T.cjs.map +1 -0
- package/dist/{chunk-6TDWCBQM.js → chunk-A2T266F3.js} +7 -7
- package/dist/{chunk-HKG7BZON.cjs → chunk-AAROYQ4O.cjs} +14 -14
- package/dist/{chunk-HKG7BZON.cjs.map → chunk-AAROYQ4O.cjs.map} +1 -1
- package/dist/{chunk-CEAAOVCV.cjs → chunk-AJPGQCZ2.cjs} +1 -1
- package/dist/chunk-AJPGQCZ2.cjs.map +1 -0
- package/dist/{chunk-ZXASQL3E.js → chunk-C5GKBUT7.js} +4 -4
- package/dist/{chunk-RBYMJF2V.cjs → chunk-D6SBYELJ.cjs} +35 -35
- package/dist/{chunk-RBYMJF2V.cjs.map → chunk-D6SBYELJ.cjs.map} +1 -1
- package/dist/{chunk-LNUXUOPN.cjs → chunk-EBE22KOQ.cjs} +4 -4
- package/dist/{chunk-LNUXUOPN.cjs.map → chunk-EBE22KOQ.cjs.map} +1 -1
- package/dist/{chunk-EYXZF46V.js → chunk-FE5QR7PT.js} +995 -899
- package/dist/chunk-FE5QR7PT.js.map +1 -0
- package/dist/{chunk-6PWUUWCO.cjs → chunk-FMWIA5IH.cjs} +42 -42
- package/dist/{chunk-6PWUUWCO.cjs.map → chunk-FMWIA5IH.cjs.map} +1 -1
- package/dist/{chunk-DHTT77AG.cjs → chunk-GY22CIEF.cjs} +78 -78
- package/dist/{chunk-DHTT77AG.cjs.map → chunk-GY22CIEF.cjs.map} +1 -1
- package/dist/{chunk-O3JCKEVG.js → chunk-HOMYI5RR.js} +2 -2
- package/dist/{chunk-BZ7B255K.js → chunk-KCAGMTJ6.js} +9 -9
- package/dist/{chunk-DZ2Z7HRF.js → chunk-KO333Q2B.js} +3 -3
- package/dist/{chunk-MQQM4NCN.js → chunk-LJBNHO6B.js} +3 -3
- package/dist/{chunk-KZS2DFC2.cjs → chunk-ME346OJF.cjs} +42 -42
- package/dist/{chunk-KZS2DFC2.cjs.map → chunk-ME346OJF.cjs.map} +1 -1
- package/dist/{chunk-UWY722RH.js → chunk-MR6RRXSD.js} +1 -1
- package/dist/chunk-MR6RRXSD.js.map +1 -0
- package/dist/{chunk-ZIZJDXUI.js → chunk-MZG3QQUR.js} +2 -2
- package/dist/{chunk-HB3IG2MC.js → chunk-OS5RFMW5.js} +3 -3
- package/dist/{chunk-VEXTUGUA.js → chunk-OWCN3BM6.js} +7 -7
- package/dist/{chunk-QVQLNKFS.js → chunk-P7ZENKIA.js} +2 -2
- package/dist/{chunk-T7AE7CKV.cjs → chunk-PCL6WYYT.cjs} +7 -7
- package/dist/{chunk-T7AE7CKV.cjs.map → chunk-PCL6WYYT.cjs.map} +1 -1
- package/dist/{chunk-2LKVYI7H.js → chunk-PLJAOZYZ.js} +6 -6
- package/dist/{chunk-L22CSZZU.cjs → chunk-QY3VTOB6.cjs} +18 -18
- package/dist/{chunk-L22CSZZU.cjs.map → chunk-QY3VTOB6.cjs.map} +1 -1
- package/dist/{chunk-Y2BYHTEN.cjs → chunk-SMW5Z4NW.cjs} +23 -23
- package/dist/{chunk-Y2BYHTEN.cjs.map → chunk-SMW5Z4NW.cjs.map} +1 -1
- package/dist/{chunk-LXWQLUBR.cjs → chunk-SW3K3JSP.cjs} +9 -7
- package/dist/chunk-SW3K3JSP.cjs.map +1 -0
- package/dist/{chunk-NKEOD2AD.cjs → chunk-TDYTAED2.cjs} +3 -3
- package/dist/{chunk-NKEOD2AD.cjs.map → chunk-TDYTAED2.cjs.map} +1 -1
- package/dist/{chunk-ZNEVGXMU.js → chunk-TXEI4PES.js} +112 -4
- package/dist/chunk-TXEI4PES.js.map +1 -0
- package/dist/{chunk-KZ3PIUCH.cjs → chunk-VNE2EHCD.cjs} +14 -14
- package/dist/{chunk-KZ3PIUCH.cjs.map → chunk-VNE2EHCD.cjs.map} +1 -1
- package/dist/{chunk-6I76UK2Z.cjs → chunk-XMECOGLY.cjs} +3 -3
- package/dist/{chunk-6I76UK2Z.cjs.map → chunk-XMECOGLY.cjs.map} +1 -1
- package/dist/{chunk-NK3M6F5A.cjs → chunk-Z3SRMLMK.cjs} +121 -13
- package/dist/chunk-Z3SRMLMK.cjs.map +1 -0
- package/dist/components/case-studies/index.cjs +10 -10
- package/dist/components/case-studies/index.js +4 -4
- package/dist/components/chat/index.cjs +4 -17
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.js +3 -16
- package/dist/components/chat/utils/index.d.ts +0 -2
- package/dist/components/chat/utils/index.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +5 -5
- package/dist/components/contact/index.js +4 -4
- package/dist/components/docs/index.cjs +7 -7
- package/dist/components/docs/index.js +6 -6
- package/dist/components/embeds/claude-embed.d.ts +15 -8
- package/dist/components/embeds/claude-embed.d.ts.map +1 -1
- package/dist/components/embeds/embed-viewer-frame.d.ts +8 -1
- package/dist/components/embeds/embed-viewer-frame.d.ts.map +1 -1
- package/dist/components/embeds/index.cjs +5 -5
- package/dist/components/embeds/index.js +4 -4
- package/dist/components/faq/index.cjs +6 -6
- package/dist/components/faq/index.js +5 -5
- package/dist/components/features/index.cjs +4 -4
- package/dist/components/features/index.js +3 -3
- package/dist/components/help-center-pages/index.cjs +25 -25
- package/dist/components/help-center-pages/index.js +16 -16
- package/dist/components/index.cjs +142 -154
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +14 -26
- package/dist/components/index.js.map +1 -1
- package/dist/components/meeting-scheduler/index.cjs +36 -36
- package/dist/components/meeting-scheduler/index.js +5 -5
- package/dist/components/navigation/index.cjs +4 -4
- package/dist/components/navigation/index.js +3 -3
- package/dist/components/onboarding-guides/index.cjs +8 -8
- package/dist/components/onboarding-guides/index.js +7 -7
- package/dist/components/related-content/index.cjs +6 -6
- package/dist/components/related-content/index.js +5 -5
- package/dist/components/tickets/index.cjs +8 -8
- package/dist/components/tickets/index.js +7 -7
- package/dist/components/ui/index.cjs +4 -16
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +3 -15
- package/dist/components/ui/markdown/sanitize.d.ts.map +1 -1
- package/dist/components/ui/table/table.d.ts +1 -1
- package/dist/components/ui/table/table.d.ts.map +1 -1
- package/dist/components/ui/table/types.d.ts +9 -0
- package/dist/components/ui/table/types.d.ts.map +1 -1
- package/dist/contexts/endpoints-runtime-context.d.ts +6 -0
- package/dist/contexts/endpoints-runtime-context.d.ts.map +1 -1
- package/dist/contexts/index.cjs +2 -2
- package/dist/contexts/index.js +1 -1
- package/dist/hooks/index.cjs +5 -3
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +4 -2
- package/dist/hooks/use-claude-mirror-src.d.ts +17 -0
- package/dist/hooks/use-claude-mirror-src.d.ts.map +1 -0
- package/dist/index.cjs +10 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -13
- package/dist/utils/embed-proxy-auth-storage.d.ts.map +1 -1
- package/dist/utils/embed-url-converters.d.ts +20 -0
- package/dist/utils/embed-url-converters.d.ts.map +1 -1
- package/dist/utils/fullscreen-switch.d.ts +85 -0
- package/dist/utils/fullscreen-switch.d.ts.map +1 -0
- package/dist/utils/index.cjs +114 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +113 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/hooks/use-chat-attachments.ts +3 -3
- package/src/components/chat/hooks/use-chat-history-hydration.ts +2 -2
- package/src/components/chat/hooks/use-chat-identity.ts +5 -5
- package/src/components/chat/hooks/use-sse-chat-adapter.ts +3 -3
- package/src/components/chat/utils/.index.md +1 -2
- package/src/components/chat/utils/chat-conversation-storage.ts +2 -2
- package/src/components/chat/utils/index.ts +3 -10
- package/src/components/embeds/claude-embed.tsx +41 -14
- package/src/components/embeds/embed-viewer-frame.tsx +77 -4
- package/src/components/ui/markdown/__tests__/sanitize-invariant.test.ts +30 -0
- package/src/components/ui/markdown/rich/__tests__/shortcodes.test.ts +8 -0
- package/src/components/ui/markdown/sanitize.ts +4 -0
- package/src/components/ui/table/table.tsx +7 -2
- package/src/components/ui/table/types.ts +9 -0
- package/src/contexts/endpoints-runtime-context.tsx +6 -0
- package/src/hooks/index.ts +4 -0
- package/src/hooks/use-claude-mirror-src.ts +43 -0
- package/src/utils/.embed-proxy-auth-storage.md +2 -2
- package/src/utils/embed-proxy-auth-storage.ts +19 -14
- package/src/utils/embed-url-converters.ts +45 -0
- package/src/utils/fullscreen-switch.ts +180 -0
- package/src/utils/index.ts +8 -6
- package/dist/chunk-6RSKK4E7.cjs.map +0 -1
- package/dist/chunk-CEAAOVCV.cjs.map +0 -1
- package/dist/chunk-EYXZF46V.js.map +0 -1
- package/dist/chunk-LXWQLUBR.cjs.map +0 -1
- package/dist/chunk-NK3M6F5A.cjs.map +0 -1
- package/dist/chunk-UWY722RH.js.map +0 -1
- package/dist/chunk-ZNEVGXMU.js.map +0 -1
- package/dist/components/chat/utils/chat-authed-fetch.d.ts +0 -15
- package/dist/components/chat/utils/chat-authed-fetch.d.ts.map +0 -1
- package/dist/components/chat/utils/chat-proxy-auth-storage.d.ts +0 -16
- package/dist/components/chat/utils/chat-proxy-auth-storage.d.ts.map +0 -1
- package/src/components/chat/utils/.chat-authed-fetch.md +0 -25
- package/src/components/chat/utils/.chat-proxy-auth-storage.md +0 -38
- package/src/components/chat/utils/chat-authed-fetch.ts +0 -17
- package/src/components/chat/utils/chat-proxy-auth-storage.ts +0 -25
- /package/dist/{chunk-KL6ZDLDF.js.map → chunk-4NN7V443.js.map} +0 -0
- /package/dist/{chunk-G2PAUMV6.js.map → chunk-6STF67EF.js.map} +0 -0
- /package/dist/{chunk-6TDWCBQM.js.map → chunk-A2T266F3.js.map} +0 -0
- /package/dist/{chunk-ZXASQL3E.js.map → chunk-C5GKBUT7.js.map} +0 -0
- /package/dist/{chunk-O3JCKEVG.js.map → chunk-HOMYI5RR.js.map} +0 -0
- /package/dist/{chunk-BZ7B255K.js.map → chunk-KCAGMTJ6.js.map} +0 -0
- /package/dist/{chunk-DZ2Z7HRF.js.map → chunk-KO333Q2B.js.map} +0 -0
- /package/dist/{chunk-MQQM4NCN.js.map → chunk-LJBNHO6B.js.map} +0 -0
- /package/dist/{chunk-ZIZJDXUI.js.map → chunk-MZG3QQUR.js.map} +0 -0
- /package/dist/{chunk-HB3IG2MC.js.map → chunk-OS5RFMW5.js.map} +0 -0
- /package/dist/{chunk-VEXTUGUA.js.map → chunk-OWCN3BM6.js.map} +0 -0
- /package/dist/{chunk-QVQLNKFS.js.map → chunk-P7ZENKIA.js.map} +0 -0
- /package/dist/{chunk-2LKVYI7H.js.map → chunk-PLJAOZYZ.js.map} +0 -0
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
getHashTargetElement,
|
|
20
20
|
getSmallPlatformIcon,
|
|
21
21
|
isBlankLine,
|
|
22
|
+
isFigmaSlidesUrl,
|
|
22
23
|
navigateSamePageHash,
|
|
23
24
|
progressColorByVariant,
|
|
24
25
|
scanHeadings,
|
|
@@ -26,10 +27,14 @@ import {
|
|
|
26
27
|
slugifyHeadingBase,
|
|
27
28
|
slugifyHeadingText,
|
|
28
29
|
stripHeadingEmojis,
|
|
30
|
+
toClaudeEmbedUrl,
|
|
31
|
+
toFigmaEmbedUrl,
|
|
32
|
+
toFigmaOriginalUrl,
|
|
29
33
|
toolLabels,
|
|
30
34
|
useAuthedAssetSrc,
|
|
31
35
|
useAuthedImageSrc,
|
|
32
36
|
useAutoLimitTags,
|
|
37
|
+
useClaudeMirrorSrc,
|
|
33
38
|
useCopyToClipboard,
|
|
34
39
|
useDebounce,
|
|
35
40
|
useDeferredError,
|
|
@@ -53,7 +58,7 @@ import {
|
|
|
53
58
|
useResetOnPageHidden,
|
|
54
59
|
useSuppressCloneFocus,
|
|
55
60
|
useToast
|
|
56
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-TXEI4PES.js";
|
|
57
62
|
import {
|
|
58
63
|
init_next_navigation,
|
|
59
64
|
usePathname,
|
|
@@ -242,7 +247,7 @@ import {
|
|
|
242
247
|
import {
|
|
243
248
|
useChatRuntime,
|
|
244
249
|
useRequiredChatRuntime
|
|
245
|
-
} from "./chunk-
|
|
250
|
+
} from "./chunk-MR6RRXSD.js";
|
|
246
251
|
import {
|
|
247
252
|
COLLISION_PADDING_PX,
|
|
248
253
|
Checkbox,
|
|
@@ -294,7 +299,7 @@ import {
|
|
|
294
299
|
|
|
295
300
|
// src/components/pagination.tsx
|
|
296
301
|
import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight6, MoreHorizontal as MoreHorizontal2 } from "lucide-react";
|
|
297
|
-
import * as
|
|
302
|
+
import * as React128 from "react";
|
|
298
303
|
import { jsx as jsx342, jsxs as jsxs267 } from "react/jsx-runtime";
|
|
299
304
|
var Pagination, PaginationContent, PaginationItem, PaginationLink, PaginationEllipsis, PaginationPrevious, PaginationNext;
|
|
300
305
|
var init_pagination = __esm({
|
|
@@ -386,19 +391,19 @@ var init_pagination = __esm({
|
|
|
386
391
|
) })
|
|
387
392
|
] }) });
|
|
388
393
|
};
|
|
389
|
-
PaginationContent =
|
|
394
|
+
PaginationContent = React128.forwardRef(
|
|
390
395
|
({ className, ...props }, ref) => {
|
|
391
396
|
return /* @__PURE__ */ jsx342("ul", { ref, className: cn("flex items-center justify-center", className), ...props });
|
|
392
397
|
}
|
|
393
398
|
);
|
|
394
399
|
PaginationContent.displayName = "PaginationContent";
|
|
395
|
-
PaginationItem =
|
|
400
|
+
PaginationItem = React128.forwardRef(
|
|
396
401
|
({ className, ...props }, ref) => {
|
|
397
402
|
return /* @__PURE__ */ jsx342("li", { ref, className: cn("", className), ...props });
|
|
398
403
|
}
|
|
399
404
|
);
|
|
400
405
|
PaginationItem.displayName = "PaginationItem";
|
|
401
|
-
PaginationLink =
|
|
406
|
+
PaginationLink = React128.forwardRef(
|
|
402
407
|
({ className, ...props }, ref) => {
|
|
403
408
|
return /* @__PURE__ */ jsx342(
|
|
404
409
|
"button",
|
|
@@ -414,7 +419,7 @@ var init_pagination = __esm({
|
|
|
414
419
|
}
|
|
415
420
|
);
|
|
416
421
|
PaginationLink.displayName = "PaginationLink";
|
|
417
|
-
PaginationEllipsis =
|
|
422
|
+
PaginationEllipsis = React128.forwardRef(
|
|
418
423
|
({ className, ...props }, ref) => {
|
|
419
424
|
return /* @__PURE__ */ jsxs267(
|
|
420
425
|
"span",
|
|
@@ -431,7 +436,7 @@ var init_pagination = __esm({
|
|
|
431
436
|
}
|
|
432
437
|
);
|
|
433
438
|
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
434
|
-
PaginationPrevious =
|
|
439
|
+
PaginationPrevious = React128.forwardRef(
|
|
435
440
|
({ className, ...props }, ref) => {
|
|
436
441
|
return /* @__PURE__ */ jsxs267(Button, { ref, variant: "outline", size: "icon", className: cn("h-10 w-10", className), ...props, children: [
|
|
437
442
|
/* @__PURE__ */ jsx342(ChevronLeft2, { className: "h-4 w-4" }),
|
|
@@ -440,7 +445,7 @@ var init_pagination = __esm({
|
|
|
440
445
|
}
|
|
441
446
|
);
|
|
442
447
|
PaginationPrevious.displayName = "PaginationPrevious";
|
|
443
|
-
PaginationNext =
|
|
448
|
+
PaginationNext = React128.forwardRef(
|
|
444
449
|
({ className, ...props }, ref) => {
|
|
445
450
|
return /* @__PURE__ */ jsxs267(Button, { ref, variant: "outline", size: "icon", className: cn("h-10 w-10", className), ...props, children: [
|
|
446
451
|
/* @__PURE__ */ jsx342(ChevronRight6, { className: "h-4 w-4" }),
|
|
@@ -1857,7 +1862,11 @@ var URL_ATTRS = /* @__PURE__ */ new Set([
|
|
|
1857
1862
|
"poster",
|
|
1858
1863
|
"data",
|
|
1859
1864
|
"action",
|
|
1860
|
-
"background"
|
|
1865
|
+
"background",
|
|
1866
|
+
// The embed shortcodes' primary url (`data-url` → `dataUrl`) — it
|
|
1867
|
+
// becomes an anchor href ("Open in Claude") and a link-preview fetch
|
|
1868
|
+
// target, so a `javascript:`/`data:` scheme there is a live sink too.
|
|
1869
|
+
"dataurl"
|
|
1861
1870
|
]);
|
|
1862
1871
|
function srcsetHasUnsafeCandidate(srcset) {
|
|
1863
1872
|
for (const candidate of srcset.split(",")) {
|
|
@@ -17208,7 +17217,7 @@ function OnboardingGuideCard({
|
|
|
17208
17217
|
}
|
|
17209
17218
|
|
|
17210
17219
|
// src/components/chat/entity-cards/roadmap-card.tsx
|
|
17211
|
-
import { useState as
|
|
17220
|
+
import { useState as useState121 } from "react";
|
|
17212
17221
|
import { ThumbsUp, ThumbsDown } from "lucide-react";
|
|
17213
17222
|
|
|
17214
17223
|
// src/components/chat/entity-cards/roadmap-vote-button.tsx
|
|
@@ -17310,7 +17319,7 @@ function AvatarStack({
|
|
|
17310
17319
|
init_button();
|
|
17311
17320
|
|
|
17312
17321
|
// src/components/ui/image-gallery-modal.tsx
|
|
17313
|
-
import { useState as
|
|
17322
|
+
import { useState as useState120, useEffect as useEffect92 } from "react";
|
|
17314
17323
|
|
|
17315
17324
|
// src/components/ui/allowed-domains-input.tsx
|
|
17316
17325
|
init_cn();
|
|
@@ -23484,7 +23493,7 @@ var Progress = React80.forwardRef(({ className, value, indicatorClassName, ...pr
|
|
|
23484
23493
|
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
23485
23494
|
|
|
23486
23495
|
// src/components/ui/release-changelog-section.tsx
|
|
23487
|
-
import { useState as
|
|
23496
|
+
import { useState as useState58 } from "react";
|
|
23488
23497
|
import { ChevronDown as ChevronDown5 } from "lucide-react";
|
|
23489
23498
|
|
|
23490
23499
|
// src/components/ui/markdown/rich/rich-markdown-renderer.tsx
|
|
@@ -24820,72 +24829,113 @@ var OGLinkPreview = ({
|
|
|
24820
24829
|
};
|
|
24821
24830
|
|
|
24822
24831
|
// src/components/embeds/figma-embed.tsx
|
|
24823
|
-
import { useState as
|
|
24832
|
+
import { useState as useState56 } from "react";
|
|
24824
24833
|
import { ExternalLink as ExternalLink3, Play as Play3, LayoutGrid } from "lucide-react";
|
|
24825
24834
|
|
|
24826
|
-
// src/
|
|
24827
|
-
|
|
24828
|
-
|
|
24829
|
-
|
|
24830
|
-
|
|
24831
|
-
|
|
24832
|
-
|
|
24833
|
-
|
|
24834
|
-
|
|
24835
|
-
|
|
24836
|
-
|
|
24837
|
-
|
|
24838
|
-
|
|
24839
|
-
|
|
24840
|
-
|
|
24841
|
-
|
|
24842
|
-
|
|
24843
|
-
|
|
24844
|
-
|
|
24845
|
-
|
|
24846
|
-
|
|
24847
|
-
|
|
24848
|
-
|
|
24849
|
-
|
|
24850
|
-
|
|
24851
|
-
|
|
24852
|
-
|
|
24853
|
-
|
|
24854
|
-
|
|
24855
|
-
|
|
24856
|
-
|
|
24857
|
-
|
|
24858
|
-
|
|
24859
|
-
|
|
24860
|
-
|
|
24861
|
-
|
|
24862
|
-
|
|
24863
|
-
|
|
24864
|
-
|
|
24865
|
-
|
|
24866
|
-
|
|
24867
|
-
|
|
24868
|
-
|
|
24869
|
-
|
|
24870
|
-
|
|
24871
|
-
|
|
24835
|
+
// src/components/embeds/embed-viewer-frame.tsx
|
|
24836
|
+
init_cn();
|
|
24837
|
+
import { useEffect as useEffect46, useRef as useRef36, useState as useState55 } from "react";
|
|
24838
|
+
import { Maximize2, Minimize2 } from "lucide-react";
|
|
24839
|
+
|
|
24840
|
+
// src/utils/fullscreen-switch.ts
|
|
24841
|
+
var fullscreenElementOf = (doc) => doc.fullscreenElement ?? doc.webkitFullscreenElement ?? null;
|
|
24842
|
+
var DEFAULT_QUIET_MS = 200;
|
|
24843
|
+
var DEFAULT_CAP_MS = 1e3;
|
|
24844
|
+
var FullscreenSwitchController = class {
|
|
24845
|
+
constructor(opts) {
|
|
24846
|
+
this.opts = opts;
|
|
24847
|
+
this.quietTimer = 0;
|
|
24848
|
+
this.capTimer = 0;
|
|
24849
|
+
this.attached = false;
|
|
24850
|
+
/** Mask first (pre-emptive — see header), then request/exit. */
|
|
24851
|
+
this.toggle = () => {
|
|
24852
|
+
const doc = document;
|
|
24853
|
+
this.beginSwitch();
|
|
24854
|
+
if (fullscreenElementOf(doc)) {
|
|
24855
|
+
if (doc.exitFullscreen) doc.exitFullscreen().catch(() => {
|
|
24856
|
+
});
|
|
24857
|
+
else doc.webkitExitFullscreen?.();
|
|
24858
|
+
} else {
|
|
24859
|
+
const el = this.opts.target?.() ?? document.documentElement;
|
|
24860
|
+
if (el.requestFullscreen) el.requestFullscreen({ navigationUI: "hide" }).catch(() => {
|
|
24861
|
+
});
|
|
24862
|
+
else el.webkitRequestFullscreen?.();
|
|
24863
|
+
}
|
|
24864
|
+
};
|
|
24865
|
+
/** Raise the mask + start tracking. Idempotent — safe from the pre-emptive
|
|
24866
|
+
* paths (toggle, Escape) AND again from the change event. */
|
|
24867
|
+
this.beginSwitch = () => {
|
|
24868
|
+
if (this.opts.switchingClass) document.documentElement.classList.add(this.opts.switchingClass);
|
|
24869
|
+
window.addEventListener("resize", this.onResize);
|
|
24870
|
+
window.clearTimeout(this.capTimer);
|
|
24871
|
+
this.capTimer = window.setTimeout(this.endSwitch, this.opts.capMs ?? DEFAULT_CAP_MS);
|
|
24872
|
+
};
|
|
24873
|
+
this.endSwitch = () => {
|
|
24874
|
+
window.clearTimeout(this.quietTimer);
|
|
24875
|
+
window.clearTimeout(this.capTimer);
|
|
24876
|
+
window.removeEventListener("resize", this.onResize);
|
|
24877
|
+
this.opts.onGeometryPulse?.();
|
|
24878
|
+
if (this.opts.switchingClass) document.documentElement.classList.remove(this.opts.switchingClass);
|
|
24879
|
+
};
|
|
24880
|
+
this.armQuiet = () => {
|
|
24881
|
+
window.clearTimeout(this.quietTimer);
|
|
24882
|
+
this.quietTimer = window.setTimeout(this.endSwitch, this.opts.quietMs ?? DEFAULT_QUIET_MS);
|
|
24883
|
+
};
|
|
24884
|
+
this.onResize = () => {
|
|
24885
|
+
this.opts.onGeometryPulse?.();
|
|
24886
|
+
this.armQuiet();
|
|
24887
|
+
};
|
|
24888
|
+
/** Escape is the one exit path that skips toggle() — pre-mask on the
|
|
24889
|
+
* keydown (capture phase), before the browser begins the swap. */
|
|
24890
|
+
this.onEscape = (e) => {
|
|
24891
|
+
if (e.key === "Escape" && this.isFullscreen) this.beginSwitch();
|
|
24892
|
+
};
|
|
24893
|
+
this.onChange = () => {
|
|
24894
|
+
const fs = this.isFullscreen;
|
|
24895
|
+
if (this.opts.activeClass) document.documentElement.classList.toggle(this.opts.activeClass, fs);
|
|
24896
|
+
this.beginSwitch();
|
|
24897
|
+
requestAnimationFrame(() => this.opts.onGeometryPulse?.());
|
|
24898
|
+
this.armQuiet();
|
|
24899
|
+
this.opts.onFullscreenChange(fs);
|
|
24900
|
+
};
|
|
24872
24901
|
}
|
|
24873
|
-
|
|
24874
|
-
|
|
24875
|
-
|
|
24876
|
-
|
|
24877
|
-
|
|
24878
|
-
|
|
24879
|
-
|
|
24880
|
-
|
|
24881
|
-
|
|
24882
|
-
|
|
24883
|
-
return
|
|
24902
|
+
/** SSR-safe feature detection — call post-mount to gate the affordance. */
|
|
24903
|
+
static isSupported() {
|
|
24904
|
+
if (typeof document === "undefined") return false;
|
|
24905
|
+
const doc = document;
|
|
24906
|
+
const el = document.documentElement;
|
|
24907
|
+
return Boolean(el.requestFullscreen || el.webkitRequestFullscreen) && (doc.fullscreenEnabled ?? doc.webkitFullscreenEnabled ?? true) !== false;
|
|
24908
|
+
}
|
|
24909
|
+
get isFullscreen() {
|
|
24910
|
+
const fs = fullscreenElementOf(document);
|
|
24911
|
+
const target = this.opts.target?.();
|
|
24912
|
+
return target ? fs === target : Boolean(fs);
|
|
24913
|
+
}
|
|
24914
|
+
attach() {
|
|
24915
|
+
if (this.attached) return;
|
|
24916
|
+
this.attached = true;
|
|
24917
|
+
const doc = document;
|
|
24918
|
+
doc.addEventListener("fullscreenchange", this.onChange);
|
|
24919
|
+
doc.addEventListener("webkitfullscreenchange", this.onChange);
|
|
24920
|
+
window.addEventListener("keydown", this.onEscape, true);
|
|
24921
|
+
}
|
|
24922
|
+
detach() {
|
|
24923
|
+
if (!this.attached) return;
|
|
24924
|
+
this.attached = false;
|
|
24925
|
+
const doc = document;
|
|
24926
|
+
doc.removeEventListener("fullscreenchange", this.onChange);
|
|
24927
|
+
doc.removeEventListener("webkitfullscreenchange", this.onChange);
|
|
24928
|
+
window.removeEventListener("keydown", this.onEscape, true);
|
|
24929
|
+
window.removeEventListener("resize", this.onResize);
|
|
24930
|
+
window.clearTimeout(this.quietTimer);
|
|
24931
|
+
window.clearTimeout(this.capTimer);
|
|
24932
|
+
if (this.opts.activeClass) doc.documentElement.classList.remove(this.opts.activeClass);
|
|
24933
|
+
if (this.opts.switchingClass) doc.documentElement.classList.remove(this.opts.switchingClass);
|
|
24884
24934
|
}
|
|
24885
|
-
}
|
|
24935
|
+
};
|
|
24886
24936
|
|
|
24887
24937
|
// src/components/embeds/embed-viewer-frame.tsx
|
|
24888
|
-
|
|
24938
|
+
init_button();
|
|
24889
24939
|
|
|
24890
24940
|
// src/components/embeds/embed-iframe.tsx
|
|
24891
24941
|
import { useState as useState54, useCallback as useCallback22, useRef as useRef35, useEffect as useEffect45 } from "react";
|
|
@@ -24971,47 +25021,92 @@ function EmbedViewerFrame({
|
|
|
24971
25021
|
allowFullScreen,
|
|
24972
25022
|
loading,
|
|
24973
25023
|
sandbox,
|
|
24974
|
-
className
|
|
25024
|
+
className,
|
|
25025
|
+
fullscreenControl
|
|
24975
25026
|
}) {
|
|
24976
|
-
|
|
24977
|
-
|
|
24978
|
-
|
|
24979
|
-
|
|
24980
|
-
|
|
24981
|
-
|
|
24982
|
-
|
|
24983
|
-
|
|
24984
|
-
|
|
24985
|
-
|
|
24986
|
-
|
|
24987
|
-
|
|
24988
|
-
|
|
24989
|
-
|
|
24990
|
-
|
|
24991
|
-
|
|
24992
|
-
|
|
24993
|
-
|
|
24994
|
-
|
|
24995
|
-
|
|
24996
|
-
|
|
24997
|
-
|
|
24998
|
-
|
|
24999
|
-
|
|
25000
|
-
|
|
25001
|
-
|
|
25002
|
-
|
|
25003
|
-
|
|
25004
|
-
|
|
25005
|
-
|
|
25006
|
-
|
|
25007
|
-
|
|
25008
|
-
|
|
25009
|
-
|
|
25010
|
-
]
|
|
25011
|
-
|
|
25012
|
-
|
|
25013
|
-
|
|
25014
|
-
|
|
25027
|
+
const frameRef = useRef36(null);
|
|
25028
|
+
const [isFullscreen, setIsFullscreen] = useState55(false);
|
|
25029
|
+
const controllerRef = useRef36(null);
|
|
25030
|
+
useEffect46(() => {
|
|
25031
|
+
if (!fullscreenControl) return;
|
|
25032
|
+
const controller = new FullscreenSwitchController({
|
|
25033
|
+
target: () => frameRef.current,
|
|
25034
|
+
onFullscreenChange: setIsFullscreen
|
|
25035
|
+
});
|
|
25036
|
+
controllerRef.current = controller;
|
|
25037
|
+
controller.attach();
|
|
25038
|
+
return () => {
|
|
25039
|
+
controllerRef.current = null;
|
|
25040
|
+
controller.detach();
|
|
25041
|
+
};
|
|
25042
|
+
}, [fullscreenControl]);
|
|
25043
|
+
const toggleFullscreen = () => controllerRef.current?.toggle();
|
|
25044
|
+
return /* @__PURE__ */ jsxs130(
|
|
25045
|
+
"div",
|
|
25046
|
+
{
|
|
25047
|
+
ref: frameRef,
|
|
25048
|
+
className: cn(
|
|
25049
|
+
"space-y-[var(--spacing-system-mf)]",
|
|
25050
|
+
className,
|
|
25051
|
+
// Fullscreen paints its own ground (the fullscreened element
|
|
25052
|
+
// otherwise sits on the UA's black backdrop) and scrolls itself.
|
|
25053
|
+
isFullscreen && "overflow-auto bg-ods-bg p-[var(--spacing-system-mf)]"
|
|
25054
|
+
),
|
|
25055
|
+
children: [
|
|
25056
|
+
/* @__PURE__ */ jsxs130("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between", children: [
|
|
25057
|
+
/* @__PURE__ */ jsxs130("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
25058
|
+
icon,
|
|
25059
|
+
titleVariant === "h3" ? /* @__PURE__ */ jsx170("h2", { className: "text-h3 text-ods-text-primary truncate", children: title }) : /* @__PURE__ */ jsx170("span", { className: "text-h6 font-semibold text-ods-text-primary truncate", children: title })
|
|
25060
|
+
] }),
|
|
25061
|
+
fullscreenControl && src ? /* @__PURE__ */ jsxs130("div", { className: "flex flex-col gap-[var(--spacing-system-xsf)] sm:flex-row sm:items-center", children: [
|
|
25062
|
+
actions,
|
|
25063
|
+
/* @__PURE__ */ jsx170(
|
|
25064
|
+
Button,
|
|
25065
|
+
{
|
|
25066
|
+
variant: "outline",
|
|
25067
|
+
size: "small-legacy",
|
|
25068
|
+
onClick: toggleFullscreen,
|
|
25069
|
+
"aria-label": isFullscreen ? "Exit fullscreen" : "Enter fullscreen",
|
|
25070
|
+
leftIcon: isFullscreen ? /* @__PURE__ */ jsx170(Minimize2, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx170(Maximize2, { className: "w-4 h-4" }),
|
|
25071
|
+
className: "w-full sm:w-auto",
|
|
25072
|
+
children: isFullscreen ? "Exit fullscreen" : "Fullscreen"
|
|
25073
|
+
}
|
|
25074
|
+
)
|
|
25075
|
+
] }) : actions
|
|
25076
|
+
] }),
|
|
25077
|
+
src ? /* @__PURE__ */ jsx170(
|
|
25078
|
+
EmbedIframe,
|
|
25079
|
+
{
|
|
25080
|
+
src,
|
|
25081
|
+
title,
|
|
25082
|
+
height: isFullscreen ? "calc(100vh - 96px)" : height,
|
|
25083
|
+
allow,
|
|
25084
|
+
allowFullScreen,
|
|
25085
|
+
loading,
|
|
25086
|
+
sandbox
|
|
25087
|
+
}
|
|
25088
|
+
) : (
|
|
25089
|
+
// The SAME box the iframe would have filled: same height, same rounded
|
|
25090
|
+
// border. A viewer whose content is missing must not collapse the page
|
|
25091
|
+
// around it — two embeds side by side (a figma frame and a claude link
|
|
25092
|
+
// that has no embeddable view) have to read as two equal blocks.
|
|
25093
|
+
// Without a `height` the caller never asked for a fixed box, so the
|
|
25094
|
+
// intrinsic `py-16` stands.
|
|
25095
|
+
/* @__PURE__ */ jsxs130(
|
|
25096
|
+
"div",
|
|
25097
|
+
{
|
|
25098
|
+
className: "flex flex-col items-center justify-center rounded-lg border border-ods-border px-4 py-16 text-center",
|
|
25099
|
+
style: height ? { height } : void 0,
|
|
25100
|
+
children: [
|
|
25101
|
+
emptyIcon,
|
|
25102
|
+
/* @__PURE__ */ jsx170("p", { className: "text-ods-text-secondary", children: emptyMessage })
|
|
25103
|
+
]
|
|
25104
|
+
}
|
|
25105
|
+
)
|
|
25106
|
+
)
|
|
25107
|
+
]
|
|
25108
|
+
}
|
|
25109
|
+
);
|
|
25015
25110
|
}
|
|
25016
25111
|
|
|
25017
25112
|
// src/components/embeds/figma-embed.tsx
|
|
@@ -25054,7 +25149,7 @@ function SlidesViewToggle({
|
|
|
25054
25149
|
);
|
|
25055
25150
|
}
|
|
25056
25151
|
function FigmaEmbed({ url, title, height, loading = "lazy" }) {
|
|
25057
|
-
const [view, setView] =
|
|
25152
|
+
const [view, setView] = useState56("present");
|
|
25058
25153
|
const isSlides = url ? isFigmaSlidesUrl(url) : false;
|
|
25059
25154
|
const embedSrc = url ? toFigmaEmbedUrl(url, { slidesView: view }) : null;
|
|
25060
25155
|
const originalUrl = (() => {
|
|
@@ -25113,7 +25208,8 @@ var KIND_HEADING = {
|
|
|
25113
25208
|
design: "Claude Design"
|
|
25114
25209
|
};
|
|
25115
25210
|
function ClaudeEmbed({ url, kind = "artifact", title, height, loading = "lazy" }) {
|
|
25116
|
-
const
|
|
25211
|
+
const mirrorSrc = useClaudeMirrorSrc(url);
|
|
25212
|
+
const embedUrl = mirrorSrc ?? toClaudeEmbedUrl(url);
|
|
25117
25213
|
return /* @__PURE__ */ jsx172(
|
|
25118
25214
|
EmbedViewerFrame,
|
|
25119
25215
|
{
|
|
@@ -25135,10 +25231,11 @@ function ClaudeEmbed({ url, kind = "artifact", title, height, loading = "lazy" }
|
|
|
25135
25231
|
}
|
|
25136
25232
|
),
|
|
25137
25233
|
src: embedUrl,
|
|
25234
|
+
fullscreenControl: true,
|
|
25138
25235
|
loading,
|
|
25139
25236
|
height,
|
|
25140
25237
|
allow: "clipboard-write; clipboard-read; fullscreen",
|
|
25141
|
-
sandbox: "allow-scripts allow-same-origin allow-popups allow-forms",
|
|
25238
|
+
sandbox: mirrorSrc ? "allow-scripts allow-popups allow-forms" : "allow-scripts allow-same-origin allow-popups allow-forms",
|
|
25142
25239
|
allowFullScreen: true,
|
|
25143
25240
|
emptyIcon: /* @__PURE__ */ jsx172(ClaudeIcon, { className: "w-16 h-16 mb-4" }),
|
|
25144
25241
|
emptyMessage: "Open this one in Claude \xB7 it has no embeddable view"
|
|
@@ -25147,14 +25244,14 @@ function ClaudeEmbed({ url, kind = "artifact", title, height, loading = "lazy" }
|
|
|
25147
25244
|
}
|
|
25148
25245
|
|
|
25149
25246
|
// src/components/embeds/markdown-image.tsx
|
|
25150
|
-
import { useEffect as
|
|
25247
|
+
import { useEffect as useEffect47, useState as useState57 } from "react";
|
|
25151
25248
|
import { jsx as jsx173 } from "react/jsx-runtime";
|
|
25152
25249
|
var MAX_H_REM = 32;
|
|
25153
25250
|
var DISPLAY_W = 768;
|
|
25154
25251
|
function MarkdownImage({ src, alt }) {
|
|
25155
25252
|
const { transformImageSrc } = useRichMarkdownRuntime();
|
|
25156
|
-
const [ratio, setRatio] =
|
|
25157
|
-
|
|
25253
|
+
const [ratio, setRatio] = useState57(null);
|
|
25254
|
+
useEffect47(() => {
|
|
25158
25255
|
let cancelled = false;
|
|
25159
25256
|
setRatio(null);
|
|
25160
25257
|
const probeSrc = transformImageSrc(src, { width: 48, resize: "contain", quality: 20 }) ?? src;
|
|
@@ -25641,7 +25738,7 @@ function ReleaseChangelogSection({
|
|
|
25641
25738
|
icon,
|
|
25642
25739
|
MarkdownRenderer = RichMarkdownRenderer
|
|
25643
25740
|
}) {
|
|
25644
|
-
const [collapsed, setCollapsed] =
|
|
25741
|
+
const [collapsed, setCollapsed] = useState58(collapsible ? defaultCollapsed : false);
|
|
25645
25742
|
if (!entries || entries.length === 0) return null;
|
|
25646
25743
|
const inPreviewMode = previewFirst && !collapsible;
|
|
25647
25744
|
const showEntries = !collapsible || !collapsed;
|
|
@@ -25837,7 +25934,7 @@ function StatusIndicator({ status, label, href }) {
|
|
|
25837
25934
|
}
|
|
25838
25935
|
|
|
25839
25936
|
// src/components/ui/hover-dropdown.tsx
|
|
25840
|
-
import { useState as
|
|
25937
|
+
import { useState as useState59, useRef as useRef37, useCallback as useCallback24 } from "react";
|
|
25841
25938
|
import { Fragment as Fragment39, jsx as jsx180, jsxs as jsxs137 } from "react/jsx-runtime";
|
|
25842
25939
|
function DefaultAnchor({
|
|
25843
25940
|
href,
|
|
@@ -25854,9 +25951,9 @@ function HoverDropdown({
|
|
|
25854
25951
|
className,
|
|
25855
25952
|
renderAnchor
|
|
25856
25953
|
}) {
|
|
25857
|
-
const [open, setOpen] =
|
|
25858
|
-
const timeoutRef =
|
|
25859
|
-
const containerRef =
|
|
25954
|
+
const [open, setOpen] = useState59(false);
|
|
25955
|
+
const timeoutRef = useRef37(void 0);
|
|
25956
|
+
const containerRef = useRef37(null);
|
|
25860
25957
|
const show = useCallback24(() => {
|
|
25861
25958
|
clearTimeout(timeoutRef.current);
|
|
25862
25959
|
setOpen(true);
|
|
@@ -25989,11 +26086,11 @@ function BackButton({ label = "Back", className, type = "button", ...props }) {
|
|
|
25989
26086
|
|
|
25990
26087
|
// src/components/layout/list-page-layout.tsx
|
|
25991
26088
|
init_cn();
|
|
25992
|
-
import { useEffect as
|
|
26089
|
+
import { useEffect as useEffect49, useState as useState61 } from "react";
|
|
25993
26090
|
|
|
25994
26091
|
// src/components/ui/filter-modal.tsx
|
|
25995
26092
|
init_cn();
|
|
25996
|
-
import { useEffect as
|
|
26093
|
+
import { useEffect as useEffect48, useState as useState60 } from "react";
|
|
25997
26094
|
init_button2();
|
|
25998
26095
|
|
|
25999
26096
|
// src/components/ui/filter-checkbox-item.tsx
|
|
@@ -26190,15 +26287,15 @@ function FilterModal({
|
|
|
26190
26287
|
emptyStateTitle = "No filters available",
|
|
26191
26288
|
emptyStateDescription = "There are no filter options to display at the moment"
|
|
26192
26289
|
}) {
|
|
26193
|
-
const [selectedFilters, setSelectedFilters] =
|
|
26290
|
+
const [selectedFilters, setSelectedFilters] = useState60(() => {
|
|
26194
26291
|
return { ...currentFilters };
|
|
26195
26292
|
});
|
|
26196
|
-
const [pendingTags, setPendingTags] =
|
|
26293
|
+
const [pendingTags, setPendingTags] = useState60(selectedTags ?? []);
|
|
26197
26294
|
const dateDefaultSort = dateFilter?.defaultSort ?? "desc";
|
|
26198
|
-
const [draftDateSort, setDraftDateSort] =
|
|
26199
|
-
const [draftDateRange, setDraftDateRange] =
|
|
26295
|
+
const [draftDateSort, setDraftDateSort] = useState60(dateFilter?.sort ?? dateDefaultSort);
|
|
26296
|
+
const [draftDateRange, setDraftDateRange] = useState60(dateFilter?.range);
|
|
26200
26297
|
const { scrollRef, fadeTop, fadeBottom, update: updateFade } = useScrollFade();
|
|
26201
|
-
|
|
26298
|
+
useEffect48(() => {
|
|
26202
26299
|
if (isOpen) {
|
|
26203
26300
|
setSelectedFilters({ ...currentFilters });
|
|
26204
26301
|
setPendingTags(selectedTags ?? []);
|
|
@@ -26357,7 +26454,7 @@ init_cn();
|
|
|
26357
26454
|
|
|
26358
26455
|
// src/components/ui/page-actions.tsx
|
|
26359
26456
|
init_cn();
|
|
26360
|
-
import
|
|
26457
|
+
import React87 from "react";
|
|
26361
26458
|
init_button2();
|
|
26362
26459
|
import { Fragment as Fragment41, jsx as jsx186, jsxs as jsxs143 } from "react/jsx-runtime";
|
|
26363
26460
|
function actionKey(action, idx) {
|
|
@@ -26537,7 +26634,7 @@ function IconButtonsVariant({
|
|
|
26537
26634
|
/* @__PURE__ */ jsxs143("div", { className: cn("hidden md:flex items-center", ACTIONS_GAP, className), children: [
|
|
26538
26635
|
selector,
|
|
26539
26636
|
loading ? /* @__PURE__ */ jsx186(ActionSkeletons, { actions: desktopActions }) : /* @__PURE__ */ jsxs143(Fragment41, { children: [
|
|
26540
|
-
desktopActions.map((action, idx) => /* @__PURE__ */ jsx186(
|
|
26637
|
+
desktopActions.map((action, idx) => /* @__PURE__ */ jsx186(React87.Fragment, { children: renderActionButton(action) }, actionKey(action, idx))),
|
|
26541
26638
|
hasMenuActions && /* @__PURE__ */ jsx186(ActionsMenuDropdown, { groups: menuActions })
|
|
26542
26639
|
] })
|
|
26543
26640
|
] }),
|
|
@@ -26560,7 +26657,7 @@ function PrimaryButtonsVariant({
|
|
|
26560
26657
|
// No overflow trigger in this variant — an unknown action set settles
|
|
26561
26658
|
// into a labelled button, not a square one.
|
|
26562
26659
|
/* @__PURE__ */ jsx186(ActionSkeletons, { actions: desktopActions, emptyFallback: "label" })
|
|
26563
|
-
) : desktopActions.map((action, idx) => /* @__PURE__ */ jsx186(
|
|
26660
|
+
) : desktopActions.map((action, idx) => /* @__PURE__ */ jsx186(React87.Fragment, { children: renderActionButton(action) }, `desktop-${actionKey(action, idx)}`)) }),
|
|
26564
26661
|
/* @__PURE__ */ jsx186(MobileBottomActions, { actions: sortedActions, loading })
|
|
26565
26662
|
] });
|
|
26566
26663
|
}
|
|
@@ -26583,7 +26680,7 @@ function MenuPrimaryVariant({
|
|
|
26583
26680
|
selector,
|
|
26584
26681
|
loading ? /* @__PURE__ */ jsx186(ActionSkeletons, { actions: desktopActions }) : /* @__PURE__ */ jsxs143(Fragment41, { children: [
|
|
26585
26682
|
hasMenuActions && /* @__PURE__ */ jsx186(ActionsMenuDropdown, { groups: menuActions }),
|
|
26586
|
-
desktopActions.map((action, idx) => /* @__PURE__ */ jsx186(
|
|
26683
|
+
desktopActions.map((action, idx) => /* @__PURE__ */ jsx186(React87.Fragment, { children: renderActionButton({ ...action, variant: action.variant || "accent" }) }, `desktop-${actionKey(action, idx)}`))
|
|
26587
26684
|
] })
|
|
26588
26685
|
] }),
|
|
26589
26686
|
/* @__PURE__ */ jsx186("div", { className: cn("flex md:hidden", className), children: loading ? /* @__PURE__ */ jsx186(MobileTriggerSkeleton, {}) : hasMobileMenuItems ? /* @__PURE__ */ jsx186(ActionsMenuDropdown, { groups: mobileMenuGroups }) : null })
|
|
@@ -26598,7 +26695,7 @@ function MobileBottomActions({ actions, loading }) {
|
|
|
26598
26695
|
// fixed variant is what keeps the 24px the bar has always had.
|
|
26599
26696
|
"flex items-start p-[var(--spacing-system-lf)]",
|
|
26600
26697
|
ACTIONS_GAP
|
|
26601
|
-
), children: loading ? /* @__PURE__ */ jsx186(ActionSkeletons, { actions, fullWidth: true, emptyFallback: "label" }) : actions.map((action, idx) => /* @__PURE__ */ jsx186(
|
|
26698
|
+
), children: loading ? /* @__PURE__ */ jsx186(ActionSkeletons, { actions, fullWidth: true, emptyFallback: "label" }) : actions.map((action, idx) => /* @__PURE__ */ jsx186(React87.Fragment, { children: renderActionButton(action, { fullWidth: !!action.label }) }, `mobile-${actionKey(action, idx)}`)) });
|
|
26602
26699
|
}
|
|
26603
26700
|
function usePageActionsBottomPadding(variant) {
|
|
26604
26701
|
return variant === "primary-buttons" || variant === "menu-primary" ? "pb-40 md:pb-0" : "";
|
|
@@ -26820,13 +26917,13 @@ function ListPageLayout({
|
|
|
26820
26917
|
mobileFilterTitle,
|
|
26821
26918
|
stickyHeader = false
|
|
26822
26919
|
}) {
|
|
26823
|
-
const [mobileFilterOpen, setMobileFilterOpen] =
|
|
26824
|
-
const [localSearchValue, setLocalSearchValue] =
|
|
26920
|
+
const [mobileFilterOpen, setMobileFilterOpen] = useState61(false);
|
|
26921
|
+
const [localSearchValue, setLocalSearchValue] = useState61(searchValue);
|
|
26825
26922
|
const debouncedSearchValue = useDebounce(localSearchValue, 500);
|
|
26826
|
-
|
|
26923
|
+
useEffect49(() => {
|
|
26827
26924
|
setLocalSearchValue(searchValue);
|
|
26828
26925
|
}, [searchValue]);
|
|
26829
|
-
|
|
26926
|
+
useEffect49(() => {
|
|
26830
26927
|
if (debouncedSearchValue !== searchValue) {
|
|
26831
26928
|
onSearch(debouncedSearchValue);
|
|
26832
26929
|
}
|
|
@@ -26899,13 +26996,13 @@ init_cn();
|
|
|
26899
26996
|
init_cn();
|
|
26900
26997
|
|
|
26901
26998
|
// src/components/ui/entity-image.tsx
|
|
26902
|
-
import
|
|
26999
|
+
import React89 from "react";
|
|
26903
27000
|
init_cn();
|
|
26904
27001
|
import { jsx as jsx189 } from "react/jsx-runtime";
|
|
26905
27002
|
function EntityImage({ src, alt, fallbackText, className }) {
|
|
26906
27003
|
const resolvedSrc = useAuthedImageSrc(src);
|
|
26907
|
-
const [imageFailed, setImageFailed] =
|
|
26908
|
-
|
|
27004
|
+
const [imageFailed, setImageFailed] = React89.useState(false);
|
|
27005
|
+
React89.useEffect(() => {
|
|
26909
27006
|
setImageFailed(false);
|
|
26910
27007
|
}, [resolvedSrc]);
|
|
26911
27008
|
const showFallback = imageFailed || !resolvedSrc;
|
|
@@ -27133,12 +27230,12 @@ function ArticleDetailLayout({ children, schemas, contentClassName }) {
|
|
|
27133
27230
|
|
|
27134
27231
|
// src/components/toggle-group.tsx
|
|
27135
27232
|
init_cn();
|
|
27136
|
-
import * as
|
|
27233
|
+
import * as React91 from "react";
|
|
27137
27234
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
27138
27235
|
|
|
27139
27236
|
// src/components/ui/toggle.tsx
|
|
27140
27237
|
init_cn();
|
|
27141
|
-
import * as
|
|
27238
|
+
import * as React90 from "react";
|
|
27142
27239
|
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
27143
27240
|
import { cva as cva9 } from "class-variance-authority";
|
|
27144
27241
|
import { jsx as jsx193 } from "react/jsx-runtime";
|
|
@@ -27162,7 +27259,7 @@ var toggleVariants = cva9(
|
|
|
27162
27259
|
}
|
|
27163
27260
|
}
|
|
27164
27261
|
);
|
|
27165
|
-
var Toggle =
|
|
27262
|
+
var Toggle = React90.forwardRef(({ className, variant, size: size2, ...props }, ref) => /* @__PURE__ */ jsx193(
|
|
27166
27263
|
TogglePrimitive.Root,
|
|
27167
27264
|
{
|
|
27168
27265
|
ref,
|
|
@@ -27174,11 +27271,11 @@ Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
|
27174
27271
|
|
|
27175
27272
|
// src/components/toggle-group.tsx
|
|
27176
27273
|
import { jsx as jsx194 } from "react/jsx-runtime";
|
|
27177
|
-
var ToggleGroupContext =
|
|
27274
|
+
var ToggleGroupContext = React91.createContext({
|
|
27178
27275
|
size: "default",
|
|
27179
27276
|
variant: "default"
|
|
27180
27277
|
});
|
|
27181
|
-
var ToggleGroup =
|
|
27278
|
+
var ToggleGroup = React91.forwardRef(({ className, variant, size: size2, children, ...props }, ref) => /* @__PURE__ */ jsx194(
|
|
27182
27279
|
ToggleGroupPrimitive.Root,
|
|
27183
27280
|
{
|
|
27184
27281
|
ref,
|
|
@@ -27188,8 +27285,8 @@ var ToggleGroup = React90.forwardRef(({ className, variant, size: size2, childre
|
|
|
27188
27285
|
}
|
|
27189
27286
|
));
|
|
27190
27287
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
27191
|
-
var ToggleGroupItem =
|
|
27192
|
-
const context =
|
|
27288
|
+
var ToggleGroupItem = React91.forwardRef(({ className, children, variant, size: size2, value, ...props }, ref) => {
|
|
27289
|
+
const context = React91.useContext(ToggleGroupContext);
|
|
27193
27290
|
return /* @__PURE__ */ jsx194(
|
|
27194
27291
|
ToggleGroupPrimitive.Item,
|
|
27195
27292
|
{
|
|
@@ -27210,7 +27307,7 @@ var ToggleGroupItem = React90.forwardRef(({ className, children, variant, size:
|
|
|
27210
27307
|
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
27211
27308
|
|
|
27212
27309
|
// src/components/ui/benefit-card.tsx
|
|
27213
|
-
import
|
|
27310
|
+
import React92 from "react";
|
|
27214
27311
|
|
|
27215
27312
|
// src/utils/index.ts
|
|
27216
27313
|
init_cn();
|
|
@@ -29322,7 +29419,7 @@ var BenefitCardGrid = ({
|
|
|
29322
29419
|
className = "",
|
|
29323
29420
|
columns = 2
|
|
29324
29421
|
}) => {
|
|
29325
|
-
const childrenArray =
|
|
29422
|
+
const childrenArray = React92.Children.toArray(children);
|
|
29326
29423
|
const gridClass = columns === 4 ? "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4" : columns === 3 ? "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3" : "flex flex-col md:flex-row";
|
|
29327
29424
|
return /* @__PURE__ */ jsx195("div", { className: cn(
|
|
29328
29425
|
"bg-ods-card rounded-lg shadow-ods-card border border-ods-border overflow-hidden",
|
|
@@ -29343,7 +29440,7 @@ var BenefitCardGrid = ({
|
|
|
29343
29440
|
} else {
|
|
29344
29441
|
borderClass = isLastItem ? "border-b-0" : "border-b md:border-b-0 md:border-r border-ods-border";
|
|
29345
29442
|
}
|
|
29346
|
-
return
|
|
29443
|
+
return React92.cloneElement(child, {
|
|
29347
29444
|
key: index,
|
|
29348
29445
|
className: borderClass
|
|
29349
29446
|
});
|
|
@@ -29352,7 +29449,7 @@ var BenefitCardGrid = ({
|
|
|
29352
29449
|
|
|
29353
29450
|
// src/components/ui/brand-association-card.tsx
|
|
29354
29451
|
init_button2();
|
|
29355
|
-
import
|
|
29452
|
+
import React93 from "react";
|
|
29356
29453
|
import { ExternalLink as ExternalLink5 } from "lucide-react";
|
|
29357
29454
|
import { jsx as jsx196, jsxs as jsxs150 } from "react/jsx-runtime";
|
|
29358
29455
|
function BrandAssociationCard({
|
|
@@ -29360,7 +29457,7 @@ function BrandAssociationCard({
|
|
|
29360
29457
|
className = ""
|
|
29361
29458
|
}) {
|
|
29362
29459
|
const renderIcon = () => {
|
|
29363
|
-
if (
|
|
29460
|
+
if (React93.isValidElement(item.icon)) {
|
|
29364
29461
|
return item.icon;
|
|
29365
29462
|
}
|
|
29366
29463
|
const IconComponent = item.icon;
|
|
@@ -29461,10 +29558,10 @@ function BulletList({
|
|
|
29461
29558
|
|
|
29462
29559
|
// src/components/ui/chevron-button.tsx
|
|
29463
29560
|
init_cn();
|
|
29464
|
-
import * as
|
|
29561
|
+
import * as React94 from "react";
|
|
29465
29562
|
import { ChevronUp as ChevronUp2, ChevronDown as ChevronDown6 } from "lucide-react";
|
|
29466
29563
|
import { jsx as jsx199 } from "react/jsx-runtime";
|
|
29467
|
-
var ChevronButton =
|
|
29564
|
+
var ChevronButton = React94.forwardRef(
|
|
29468
29565
|
({ className, direction = "down", size: size2 = "md", isExpanded, backgroundColor, borderColor, ...props }, ref) => {
|
|
29469
29566
|
const Icon2 = (isExpanded ? ChevronUp2 : ChevronDown6) || (direction === "up" ? ChevronUp2 : ChevronDown6);
|
|
29470
29567
|
const sizeClasses2 = {
|
|
@@ -30199,9 +30296,9 @@ function HighlightCardGrid({
|
|
|
30199
30296
|
|
|
30200
30297
|
// src/components/ui/icons-block.tsx
|
|
30201
30298
|
init_cn();
|
|
30202
|
-
import * as
|
|
30299
|
+
import * as React95 from "react";
|
|
30203
30300
|
import { jsx as jsx211 } from "react/jsx-runtime";
|
|
30204
|
-
var IconsBlock =
|
|
30301
|
+
var IconsBlock = React95.forwardRef(
|
|
30205
30302
|
({ className, icons = [], size: size2 = "md", ...props }, ref) => {
|
|
30206
30303
|
const sizeClasses2 = {
|
|
30207
30304
|
sm: "h-4 w-4",
|
|
@@ -30236,7 +30333,7 @@ IconsBlock.displayName = "IconsBlock";
|
|
|
30236
30333
|
|
|
30237
30334
|
// src/components/ui/dropdown-button.tsx
|
|
30238
30335
|
init_cn();
|
|
30239
|
-
import
|
|
30336
|
+
import React96 from "react";
|
|
30240
30337
|
init_button2();
|
|
30241
30338
|
import { jsx as jsx212 } from "react/jsx-runtime";
|
|
30242
30339
|
function DropdownButton({
|
|
@@ -30254,11 +30351,11 @@ function DropdownButton({
|
|
|
30254
30351
|
side = "bottom",
|
|
30255
30352
|
onCloseAutoFocus
|
|
30256
30353
|
}) {
|
|
30257
|
-
const [open, setOpen] =
|
|
30258
|
-
|
|
30354
|
+
const [open, setOpen] = React96.useState(false);
|
|
30355
|
+
React96.useEffect(() => {
|
|
30259
30356
|
if (disabled || loading) setOpen(false);
|
|
30260
30357
|
}, [disabled, loading]);
|
|
30261
|
-
const handleOpenChange =
|
|
30358
|
+
const handleOpenChange = React96.useCallback(
|
|
30262
30359
|
(next) => {
|
|
30263
30360
|
if (next && (disabled || loading)) return;
|
|
30264
30361
|
setOpen(next);
|
|
@@ -30500,14 +30597,14 @@ function OrganizationCard({
|
|
|
30500
30597
|
|
|
30501
30598
|
// src/components/ui/service-card.tsx
|
|
30502
30599
|
init_cn();
|
|
30503
|
-
import { useMemo as useMemo46, useState as
|
|
30600
|
+
import { useMemo as useMemo46, useState as useState104 } from "react";
|
|
30504
30601
|
import { ExternalLink as ExternalLink9 } from "lucide-react";
|
|
30505
30602
|
|
|
30506
30603
|
// src/components/providers/dynamic-theme-provider.tsx
|
|
30507
30604
|
import { createContext as createContext7, useContext as useContext7 } from "react";
|
|
30508
30605
|
|
|
30509
30606
|
// src/hooks/use-dynamic-theming.ts
|
|
30510
|
-
import { useState as
|
|
30607
|
+
import { useState as useState62, useEffect as useEffect50 } from "react";
|
|
30511
30608
|
var defaultTheme = {
|
|
30512
30609
|
primaryColor: "#FFC008",
|
|
30513
30610
|
secondaryColor: "#161616",
|
|
@@ -30516,9 +30613,9 @@ var defaultTheme = {
|
|
|
30516
30613
|
textColor: "#161616"
|
|
30517
30614
|
};
|
|
30518
30615
|
function useDynamicTheming() {
|
|
30519
|
-
const [theme, setTheme] =
|
|
30520
|
-
const [isDark, setIsDark] =
|
|
30521
|
-
|
|
30616
|
+
const [theme, setTheme] = useState62(defaultTheme);
|
|
30617
|
+
const [isDark, setIsDark] = useState62(false);
|
|
30618
|
+
useEffect50(() => {
|
|
30522
30619
|
const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
30523
30620
|
setIsDark(mediaQuery.matches);
|
|
30524
30621
|
const handleChange = (e) => {
|
|
@@ -30557,7 +30654,7 @@ function useDynamicTheme() {
|
|
|
30557
30654
|
}
|
|
30558
30655
|
|
|
30559
30656
|
// src/components/providers/theme-provider.tsx
|
|
30560
|
-
import * as
|
|
30657
|
+
import * as React97 from "react";
|
|
30561
30658
|
import {
|
|
30562
30659
|
ThemeProvider as NextThemesProvider,
|
|
30563
30660
|
useTheme as useNextTheme
|
|
@@ -30584,14 +30681,14 @@ function ThemeProvider({ children, ...overrides }) {
|
|
|
30584
30681
|
var useTheme = useNextTheme;
|
|
30585
30682
|
function useThemeToggle() {
|
|
30586
30683
|
const { resolvedTheme, theme, setTheme } = useTheme();
|
|
30587
|
-
const [mounted, setMounted] =
|
|
30588
|
-
|
|
30684
|
+
const [mounted, setMounted] = React97.useState(false);
|
|
30685
|
+
React97.useEffect(() => setMounted(true), []);
|
|
30589
30686
|
const active = mounted ? resolvedTheme === "light" || theme === "light" ? "light" : "dark" : DEFAULT_THEME;
|
|
30590
|
-
const setOdsTheme =
|
|
30687
|
+
const setOdsTheme = React97.useCallback(
|
|
30591
30688
|
(next) => setTheme(next),
|
|
30592
30689
|
[setTheme]
|
|
30593
30690
|
);
|
|
30594
|
-
const toggle =
|
|
30691
|
+
const toggle = React97.useCallback(
|
|
30595
30692
|
() => setTheme(active === "dark" ? "light" : "dark"),
|
|
30596
30693
|
[active, setTheme]
|
|
30597
30694
|
);
|
|
@@ -30606,7 +30703,7 @@ function useThemeToggle() {
|
|
|
30606
30703
|
}
|
|
30607
30704
|
|
|
30608
30705
|
// src/components/features/array-entry-manager.tsx
|
|
30609
|
-
import { useState as
|
|
30706
|
+
import { useState as useState64, useEffect as useEffect52 } from "react";
|
|
30610
30707
|
import { Trash2, Plus as Plus2, Save, Loader2 as Loader22 } from "lucide-react";
|
|
30611
30708
|
import { jsx as jsx217, jsxs as jsxs165 } from "react/jsx-runtime";
|
|
30612
30709
|
function ArrayEntryManager({
|
|
@@ -30627,14 +30724,14 @@ function ArrayEntryManager({
|
|
|
30627
30724
|
titlePlaceholder,
|
|
30628
30725
|
isSaving = false
|
|
30629
30726
|
}) {
|
|
30630
|
-
const [draftItems, setDraftItems] =
|
|
30631
|
-
const [isDirty, setIsDirty] =
|
|
30632
|
-
|
|
30727
|
+
const [draftItems, setDraftItems] = useState64(items);
|
|
30728
|
+
const [isDirty, setIsDirty] = useState64(false);
|
|
30729
|
+
useEffect52(() => {
|
|
30633
30730
|
if (!isDirty && !isSaving) {
|
|
30634
30731
|
setDraftItems(items);
|
|
30635
30732
|
}
|
|
30636
30733
|
}, [items, isDirty, isSaving]);
|
|
30637
|
-
|
|
30734
|
+
useEffect52(() => {
|
|
30638
30735
|
if (onDirtyChange) {
|
|
30639
30736
|
onDirtyChange(isDirty);
|
|
30640
30737
|
}
|
|
@@ -30884,10 +30981,10 @@ init_button2();
|
|
|
30884
30981
|
|
|
30885
30982
|
// src/components/ui/password-input.tsx
|
|
30886
30983
|
init_cn();
|
|
30887
|
-
import * as
|
|
30984
|
+
import * as React98 from "react";
|
|
30888
30985
|
import { jsx as jsx222 } from "react/jsx-runtime";
|
|
30889
|
-
var PasswordInput =
|
|
30890
|
-
const [visible, setVisible] =
|
|
30986
|
+
var PasswordInput = React98.forwardRef(({ disabled, className, ...props }, ref) => {
|
|
30987
|
+
const [visible, setVisible] = React98.useState(false);
|
|
30891
30988
|
const Icon2 = visible ? EyeOffIcon : EyeIcon2;
|
|
30892
30989
|
return /* @__PURE__ */ jsx222(
|
|
30893
30990
|
Input,
|
|
@@ -31769,7 +31866,7 @@ function SsoAuthShell({ children, className }) {
|
|
|
31769
31866
|
|
|
31770
31867
|
// src/components/features/provider-button.tsx
|
|
31771
31868
|
init_button2();
|
|
31772
|
-
import { useState as
|
|
31869
|
+
import { useState as useState66 } from "react";
|
|
31773
31870
|
import { jsx as jsx233 } from "react/jsx-runtime";
|
|
31774
31871
|
var PROVIDER_CONFIG = {
|
|
31775
31872
|
microsoft: {
|
|
@@ -31794,7 +31891,7 @@ var PROVIDER_CONFIG = {
|
|
|
31794
31891
|
}
|
|
31795
31892
|
};
|
|
31796
31893
|
function ProviderButton({ provider, onClick, disabled = false, loading = false }) {
|
|
31797
|
-
const [internalLoading, setInternalLoading] =
|
|
31894
|
+
const [internalLoading, setInternalLoading] = useState66(false);
|
|
31798
31895
|
const config = PROVIDER_CONFIG[provider];
|
|
31799
31896
|
const IconComponent = config.icon;
|
|
31800
31897
|
const isLoading = loading || internalLoading;
|
|
@@ -31878,7 +31975,7 @@ function AuthProvidersList({
|
|
|
31878
31975
|
|
|
31879
31976
|
// src/components/features/changelog-manager.tsx
|
|
31880
31977
|
import { Trash2 as Trash22, Plus as Plus3, ChevronDown as ChevronDown7, ChevronUp as ChevronUp3, Eye as Eye3, EyeOff } from "lucide-react";
|
|
31881
|
-
import { useState as
|
|
31978
|
+
import { useState as useState67, useEffect as useEffect53 } from "react";
|
|
31882
31979
|
import { jsx as jsx235, jsxs as jsxs179 } from "react/jsx-runtime";
|
|
31883
31980
|
function ChangelogManager({
|
|
31884
31981
|
title,
|
|
@@ -31888,8 +31985,8 @@ function ChangelogManager({
|
|
|
31888
31985
|
expandAll = false,
|
|
31889
31986
|
showVisibilityToggle = false
|
|
31890
31987
|
}) {
|
|
31891
|
-
const [expandedIndices, setExpandedIndices] =
|
|
31892
|
-
|
|
31988
|
+
const [expandedIndices, setExpandedIndices] = useState67(/* @__PURE__ */ new Set());
|
|
31989
|
+
useEffect53(() => {
|
|
31893
31990
|
if (expandAll && entries.length > 0) {
|
|
31894
31991
|
setExpandedIndices(new Set(entries.map((_, i) => i)));
|
|
31895
31992
|
}
|
|
@@ -32250,7 +32347,7 @@ var ErrorBoundary = class extends Component3 {
|
|
|
32250
32347
|
|
|
32251
32348
|
// src/components/features/figma-prototype-viewer.tsx
|
|
32252
32349
|
init_cn();
|
|
32253
|
-
import { useState as
|
|
32350
|
+
import { useState as useState68, useRef as useRef38, useEffect as useEffect54, useCallback as useCallback26, useMemo as useMemo34 } from "react";
|
|
32254
32351
|
|
|
32255
32352
|
// src/components/features/section-selector.tsx
|
|
32256
32353
|
init_cn();
|
|
@@ -32619,27 +32716,27 @@ var FigmaPrototypeViewer = ({
|
|
|
32619
32716
|
}) => {
|
|
32620
32717
|
const clientId = process.env.NEXT_PUBLIC_FIGMA_CLIENT_ID || "UTQPwZHR9OZp68TTGPFFi5";
|
|
32621
32718
|
const showDebugPanel = process.env.NEXT_PUBLIC_FIGMA_DEBUG === "true";
|
|
32622
|
-
const iframeRef =
|
|
32623
|
-
const containerRef =
|
|
32624
|
-
const navTimerRef =
|
|
32625
|
-
const touchTimerRef =
|
|
32626
|
-
const [screenWidth, setScreenWidth] =
|
|
32719
|
+
const iframeRef = useRef38(null);
|
|
32720
|
+
const containerRef = useRef38(null);
|
|
32721
|
+
const navTimerRef = useRef38(null);
|
|
32722
|
+
const touchTimerRef = useRef38(null);
|
|
32723
|
+
const [screenWidth, setScreenWidth] = useState68(
|
|
32627
32724
|
typeof window !== "undefined" ? window.innerWidth : DESKTOP_BREAKPOINT
|
|
32628
32725
|
);
|
|
32629
|
-
const [isTouchDevice, setIsTouchDevice] =
|
|
32726
|
+
const [isTouchDevice, setIsTouchDevice] = useState68(() => {
|
|
32630
32727
|
if (typeof window === "undefined") return false;
|
|
32631
32728
|
return "ontouchstart" in window;
|
|
32632
32729
|
});
|
|
32633
|
-
const [iframeState, setIframeState] =
|
|
32634
|
-
const [iframeKey, setIframeKey] =
|
|
32635
|
-
const [isInitialized, setIsInitialized] =
|
|
32636
|
-
const [currentNodeId, setCurrentNodeId] =
|
|
32637
|
-
const [internalActiveSection, setInternalActiveSection] =
|
|
32730
|
+
const [iframeState, setIframeState] = useState68("INITIAL");
|
|
32731
|
+
const [iframeKey, setIframeKey] = useState68(0);
|
|
32732
|
+
const [isInitialized, setIsInitialized] = useState68(false);
|
|
32733
|
+
const [currentNodeId, setCurrentNodeId] = useState68(null);
|
|
32734
|
+
const [internalActiveSection, setInternalActiveSection] = useState68(
|
|
32638
32735
|
config.defaultSectionId || config.sections[0]?.id || ""
|
|
32639
32736
|
);
|
|
32640
32737
|
const activeSection = externalActiveSection || internalActiveSection;
|
|
32641
|
-
const [isNavigating, setIsNavigating] =
|
|
32642
|
-
const [containerDimensions, setContainerDimensions] =
|
|
32738
|
+
const [isNavigating, setIsNavigating] = useState68(false);
|
|
32739
|
+
const [containerDimensions, setContainerDimensions] = useState68({ width: 1200, height: 800 });
|
|
32643
32740
|
const viewMode = useMemo34(
|
|
32644
32741
|
() => getViewMode(screenWidth, isTouchDevice),
|
|
32645
32742
|
[screenWidth, isTouchDevice]
|
|
@@ -32688,7 +32785,7 @@ var FigmaPrototypeViewer = ({
|
|
|
32688
32785
|
embedUrl,
|
|
32689
32786
|
iframeKey
|
|
32690
32787
|
]);
|
|
32691
|
-
|
|
32788
|
+
useEffect54(() => {
|
|
32692
32789
|
const handleResize = () => {
|
|
32693
32790
|
const newWidth = window.innerWidth;
|
|
32694
32791
|
setScreenWidth(newWidth);
|
|
@@ -32701,8 +32798,8 @@ var FigmaPrototypeViewer = ({
|
|
|
32701
32798
|
window.addEventListener("resize", handleResize);
|
|
32702
32799
|
return () => window.removeEventListener("resize", handleResize);
|
|
32703
32800
|
}, []);
|
|
32704
|
-
const [lastViewMode, setLastViewMode] =
|
|
32705
|
-
|
|
32801
|
+
const [lastViewMode, setLastViewMode] = useState68(viewMode);
|
|
32802
|
+
useEffect54(() => {
|
|
32706
32803
|
if (lastViewMode !== viewMode && iframeState === "READY") {
|
|
32707
32804
|
console.log("[ViewMode Change]", lastViewMode, "\u2192", viewMode);
|
|
32708
32805
|
setIframeState("RELOADING");
|
|
@@ -32710,7 +32807,7 @@ var FigmaPrototypeViewer = ({
|
|
|
32710
32807
|
}
|
|
32711
32808
|
setLastViewMode(viewMode);
|
|
32712
32809
|
}, [viewMode, lastViewMode, iframeState]);
|
|
32713
|
-
|
|
32810
|
+
useEffect54(() => {
|
|
32714
32811
|
const handleVisibilityChange = () => {
|
|
32715
32812
|
if (document.visibilityState === "visible" && iframeState === "READY") {
|
|
32716
32813
|
console.log("[Sleep Recovery] Reloading iframe after sleep");
|
|
@@ -32721,7 +32818,7 @@ var FigmaPrototypeViewer = ({
|
|
|
32721
32818
|
document.addEventListener("visibilitychange", handleVisibilityChange);
|
|
32722
32819
|
return () => document.removeEventListener("visibilitychange", handleVisibilityChange);
|
|
32723
32820
|
}, [iframeState]);
|
|
32724
|
-
|
|
32821
|
+
useEffect54(() => {
|
|
32725
32822
|
const handleMessage = (event) => {
|
|
32726
32823
|
if (event.origin !== "https://www.figma.com") return;
|
|
32727
32824
|
const validEvents = ["INITIAL_LOAD", "NEW_STATE", "PRESENTED_NODE_CHANGED"];
|
|
@@ -32805,12 +32902,12 @@ var FigmaPrototypeViewer = ({
|
|
|
32805
32902
|
}
|
|
32806
32903
|
}, 500);
|
|
32807
32904
|
}, []);
|
|
32808
|
-
|
|
32905
|
+
useEffect54(() => {
|
|
32809
32906
|
if (externalActiveSection && externalActiveSection !== activeSection && isInitialized) {
|
|
32810
32907
|
navigateToSection(externalActiveSection);
|
|
32811
32908
|
}
|
|
32812
32909
|
}, [externalActiveSection, activeSection, isInitialized, navigateToSection]);
|
|
32813
|
-
|
|
32910
|
+
useEffect54(() => {
|
|
32814
32911
|
return () => {
|
|
32815
32912
|
if (navTimerRef.current) clearTimeout(navTimerRef.current);
|
|
32816
32913
|
if (touchTimerRef.current) clearTimeout(touchTimerRef.current);
|
|
@@ -32913,7 +33010,7 @@ var FigmaPrototypeViewer = ({
|
|
|
32913
33010
|
|
|
32914
33011
|
// src/components/features/filters-dropdown.tsx
|
|
32915
33012
|
init_cn();
|
|
32916
|
-
import { useEffect as
|
|
33013
|
+
import { useEffect as useEffect55, useRef as useRef39, useState as useState69 } from "react";
|
|
32917
33014
|
import { jsx as jsx242, jsxs as jsxs185 } from "react/jsx-runtime";
|
|
32918
33015
|
var FilterCheckbox = ({ checked, disabled = false, className }) => {
|
|
32919
33016
|
return /* @__PURE__ */ jsx242(
|
|
@@ -32945,15 +33042,15 @@ var FiltersDropdown = ({
|
|
|
32945
33042
|
placement = "bottom-start",
|
|
32946
33043
|
responsive = true
|
|
32947
33044
|
}) => {
|
|
32948
|
-
const [isOpen, setIsOpen] =
|
|
32949
|
-
const [shouldRender, setShouldRender] =
|
|
32950
|
-
const [isVisible, setIsVisible] =
|
|
32951
|
-
const [isMobile, setIsMobile] =
|
|
32952
|
-
const [actualPlacement, setActualPlacement] =
|
|
32953
|
-
const dropdownRef =
|
|
32954
|
-
const triggerRef =
|
|
32955
|
-
const containerRef =
|
|
32956
|
-
|
|
33045
|
+
const [isOpen, setIsOpen] = useState69(false);
|
|
33046
|
+
const [shouldRender, setShouldRender] = useState69(false);
|
|
33047
|
+
const [isVisible, setIsVisible] = useState69(false);
|
|
33048
|
+
const [isMobile, setIsMobile] = useState69(false);
|
|
33049
|
+
const [actualPlacement, setActualPlacement] = useState69(placement);
|
|
33050
|
+
const dropdownRef = useRef39(null);
|
|
33051
|
+
const triggerRef = useRef39(null);
|
|
33052
|
+
const containerRef = useRef39(null);
|
|
33053
|
+
useEffect55(() => {
|
|
32957
33054
|
if (isOpen) {
|
|
32958
33055
|
setShouldRender(true);
|
|
32959
33056
|
let id2 = 0;
|
|
@@ -32969,7 +33066,7 @@ var FiltersDropdown = ({
|
|
|
32969
33066
|
const t = setTimeout(() => setShouldRender(false), ANIMATION_MS);
|
|
32970
33067
|
return () => clearTimeout(t);
|
|
32971
33068
|
}, [isOpen]);
|
|
32972
|
-
|
|
33069
|
+
useEffect55(() => {
|
|
32973
33070
|
if (!responsive) {
|
|
32974
33071
|
setIsMobile(false);
|
|
32975
33072
|
return;
|
|
@@ -32981,7 +33078,7 @@ var FiltersDropdown = ({
|
|
|
32981
33078
|
window.addEventListener("resize", checkMobile);
|
|
32982
33079
|
return () => window.removeEventListener("resize", checkMobile);
|
|
32983
33080
|
}, [responsive]);
|
|
32984
|
-
|
|
33081
|
+
useEffect55(() => {
|
|
32985
33082
|
if (!isOpen || isMobile || !triggerRef.current) return;
|
|
32986
33083
|
const calculateOptimalPlacement = () => {
|
|
32987
33084
|
const trigger = triggerRef.current;
|
|
@@ -33007,7 +33104,7 @@ var FiltersDropdown = ({
|
|
|
33007
33104
|
window.addEventListener("resize", calculateOptimalPlacement);
|
|
33008
33105
|
return () => window.removeEventListener("resize", calculateOptimalPlacement);
|
|
33009
33106
|
}, [isOpen, isMobile, placement]);
|
|
33010
|
-
const [selectedFilters, setSelectedFilters] =
|
|
33107
|
+
const [selectedFilters, setSelectedFilters] = useState69(() => {
|
|
33011
33108
|
if (currentFilters) {
|
|
33012
33109
|
return { ...currentFilters };
|
|
33013
33110
|
}
|
|
@@ -33018,12 +33115,12 @@ var FiltersDropdown = ({
|
|
|
33018
33115
|
return initial;
|
|
33019
33116
|
});
|
|
33020
33117
|
const currentFiltersStr = currentFilters ? JSON.stringify(currentFilters) : "";
|
|
33021
|
-
|
|
33118
|
+
useEffect55(() => {
|
|
33022
33119
|
if (currentFilters) {
|
|
33023
33120
|
setSelectedFilters({ ...currentFilters });
|
|
33024
33121
|
}
|
|
33025
33122
|
}, [currentFiltersStr]);
|
|
33026
|
-
|
|
33123
|
+
useEffect55(() => {
|
|
33027
33124
|
const handleClickOutside = (event) => {
|
|
33028
33125
|
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
33029
33126
|
setIsOpen(false);
|
|
@@ -33039,7 +33136,7 @@ var FiltersDropdown = ({
|
|
|
33039
33136
|
};
|
|
33040
33137
|
}
|
|
33041
33138
|
}, [isOpen]);
|
|
33042
|
-
|
|
33139
|
+
useEffect55(() => {
|
|
33043
33140
|
const handleEscape = (e) => {
|
|
33044
33141
|
if (e.key === "Escape" && isOpen) {
|
|
33045
33142
|
setIsOpen(false);
|
|
@@ -33224,7 +33321,7 @@ var FiltersDropdown = ({
|
|
|
33224
33321
|
] });
|
|
33225
33322
|
};
|
|
33226
33323
|
var useFiltersDropdown = (initialSections) => {
|
|
33227
|
-
const [appliedFilters, setAppliedFilters] =
|
|
33324
|
+
const [appliedFilters, setAppliedFilters] = useState69(() => {
|
|
33228
33325
|
const initial = {};
|
|
33229
33326
|
initialSections.forEach((section) => {
|
|
33230
33327
|
if (section.defaultSelected) {
|
|
@@ -33303,13 +33400,13 @@ function KnowledgeBaseLinksManager({
|
|
|
33303
33400
|
}
|
|
33304
33401
|
|
|
33305
33402
|
// src/components/features/loading-provider.tsx
|
|
33306
|
-
import { createContext as createContext8, useContext as useContext8, useState as
|
|
33403
|
+
import { createContext as createContext8, useContext as useContext8, useState as useState70, useEffect as useEffect56 } from "react";
|
|
33307
33404
|
import { jsx as jsx245, jsxs as jsxs186 } from "react/jsx-runtime";
|
|
33308
33405
|
var LoadingContext = createContext8(void 0);
|
|
33309
33406
|
function LoadingProvider({ children }) {
|
|
33310
|
-
const [isLoading, setIsLoading] =
|
|
33311
|
-
const [progress, setProgress] =
|
|
33312
|
-
|
|
33407
|
+
const [isLoading, setIsLoading] = useState70(false);
|
|
33408
|
+
const [progress, setProgress] = useState70(0);
|
|
33409
|
+
useEffect56(() => {
|
|
33313
33410
|
let interval;
|
|
33314
33411
|
if (isLoading) {
|
|
33315
33412
|
setProgress(10);
|
|
@@ -33354,7 +33451,7 @@ function useLoading() {
|
|
|
33354
33451
|
}
|
|
33355
33452
|
|
|
33356
33453
|
// src/components/features/media-gallery-manager.tsx
|
|
33357
|
-
import { useState as
|
|
33454
|
+
import { useState as useState71, useRef as useRef40, useCallback as useCallback27 } from "react";
|
|
33358
33455
|
import {
|
|
33359
33456
|
Upload,
|
|
33360
33457
|
Image as ImageIcon2,
|
|
@@ -33374,9 +33471,9 @@ function MediaGalleryManager({
|
|
|
33374
33471
|
modalTitle = "Media Gallery",
|
|
33375
33472
|
className = ""
|
|
33376
33473
|
}) {
|
|
33377
|
-
const fileInputRef =
|
|
33378
|
-
const [deletingIndex, setDeletingIndex] =
|
|
33379
|
-
const [draggedIndex, setDraggedIndex] =
|
|
33474
|
+
const fileInputRef = useRef40(null);
|
|
33475
|
+
const [deletingIndex, setDeletingIndex] = useState71(null);
|
|
33476
|
+
const [draggedIndex, setDraggedIndex] = useState71(null);
|
|
33380
33477
|
const handleFileSelect = useCallback27(async (event) => {
|
|
33381
33478
|
const file = event.target.files?.[0];
|
|
33382
33479
|
if (!file) return;
|
|
@@ -33582,7 +33679,7 @@ function OSTypeBadgeGroup({
|
|
|
33582
33679
|
}
|
|
33583
33680
|
|
|
33584
33681
|
// src/components/features/parallax-image-showcase.tsx
|
|
33585
|
-
import { useEffect as
|
|
33682
|
+
import { useEffect as useEffect57, useState as useState72, useRef as useRef41 } from "react";
|
|
33586
33683
|
import { motion, useScroll, useTransform, useMotionValue, useSpring } from "framer-motion";
|
|
33587
33684
|
import { jsx as jsx249, jsxs as jsxs189 } from "react/jsx-runtime";
|
|
33588
33685
|
var ParallaxImageShowcase = ({
|
|
@@ -33600,9 +33697,9 @@ var ParallaxImageShowcase = ({
|
|
|
33600
33697
|
const springConfig = { stiffness: 100, damping: 30 };
|
|
33601
33698
|
const mouseXSpring = useSpring(mouseX, springConfig);
|
|
33602
33699
|
const mouseYSpring = useSpring(mouseY, springConfig);
|
|
33603
|
-
const [componentRect, setComponentRect] =
|
|
33604
|
-
const componentRef =
|
|
33605
|
-
|
|
33700
|
+
const [componentRect, setComponentRect] = useState72(null);
|
|
33701
|
+
const componentRef = useRef41(null);
|
|
33702
|
+
useEffect57(() => {
|
|
33606
33703
|
const updateRect = () => {
|
|
33607
33704
|
if (componentRef.current) {
|
|
33608
33705
|
setComponentRect(componentRef.current.getBoundingClientRect());
|
|
@@ -33616,7 +33713,7 @@ var ParallaxImageShowcase = ({
|
|
|
33616
33713
|
window.removeEventListener("scroll", updateRect);
|
|
33617
33714
|
};
|
|
33618
33715
|
}, []);
|
|
33619
|
-
|
|
33716
|
+
useEffect57(() => {
|
|
33620
33717
|
const handleGlobalMouseMove = (e) => {
|
|
33621
33718
|
if (!componentRect) return;
|
|
33622
33719
|
const centerX = componentRect.left + componentRect.width / 2;
|
|
@@ -34141,7 +34238,7 @@ function PushButtonSelector({
|
|
|
34141
34238
|
}
|
|
34142
34239
|
|
|
34143
34240
|
// src/components/features/release-media-manager.tsx
|
|
34144
|
-
import { useState as
|
|
34241
|
+
import { useState as useState73, useRef as useRef42 } from "react";
|
|
34145
34242
|
import { Trash2 as Trash24, Plus as Plus5, Image as ImageIcon3, Video as VideoIcon2, Upload as Upload2, Loader2 as Loader24, GripVertical as GripVertical2 } from "lucide-react";
|
|
34146
34243
|
import { jsx as jsx253, jsxs as jsxs193 } from "react/jsx-runtime";
|
|
34147
34244
|
function ReleaseMediaManager({
|
|
@@ -34150,8 +34247,8 @@ function ReleaseMediaManager({
|
|
|
34150
34247
|
onUpload,
|
|
34151
34248
|
className = ""
|
|
34152
34249
|
}) {
|
|
34153
|
-
const fileInputRef =
|
|
34154
|
-
const [uploadingIndex, setUploadingIndex] =
|
|
34250
|
+
const fileInputRef = useRef42(null);
|
|
34251
|
+
const [uploadingIndex, setUploadingIndex] = useState73(null);
|
|
34155
34252
|
const handleFileSelect = async (event) => {
|
|
34156
34253
|
const file = event.target.files?.[0];
|
|
34157
34254
|
if (!file) return;
|
|
@@ -34349,9 +34446,9 @@ function ReleaseMediaManager({
|
|
|
34349
34446
|
|
|
34350
34447
|
// src/components/features/select-button.tsx
|
|
34351
34448
|
init_cn();
|
|
34352
|
-
import
|
|
34449
|
+
import React102 from "react";
|
|
34353
34450
|
import { jsx as jsx254, jsxs as jsxs194 } from "react/jsx-runtime";
|
|
34354
|
-
var SelectButton =
|
|
34451
|
+
var SelectButton = React102.forwardRef(
|
|
34355
34452
|
({ title, description, selected = false, disabled = false, icon, image, tag, tagVariant = "outline", onClick, className }, ref) => {
|
|
34356
34453
|
return /* @__PURE__ */ jsxs194(
|
|
34357
34454
|
"button",
|
|
@@ -34412,7 +34509,7 @@ var SelectButton = React101.forwardRef(
|
|
|
34412
34509
|
SelectButton.displayName = "SelectButton";
|
|
34413
34510
|
|
|
34414
34511
|
// src/components/features/seo-editor-preview.tsx
|
|
34415
|
-
import { useState as
|
|
34512
|
+
import { useState as useState74 } from "react";
|
|
34416
34513
|
import { Globe as Globe3, ExternalLink as ExternalLink8, Upload as Upload3, X as X6, Loader2 as Loader25 } from "lucide-react";
|
|
34417
34514
|
import { Fragment as Fragment47, jsx as jsx255, jsxs as jsxs195 } from "react/jsx-runtime";
|
|
34418
34515
|
var SEO_MEDIA_BOX_HEIGHT = "h-[280px]";
|
|
@@ -34436,9 +34533,9 @@ function SEOEditorPreview({
|
|
|
34436
34533
|
disabled = false,
|
|
34437
34534
|
className = ""
|
|
34438
34535
|
}) {
|
|
34439
|
-
const [imageError, setImageError] =
|
|
34440
|
-
const [isUploading, setIsUploading] =
|
|
34441
|
-
const [fileInputRef, setFileInputRef] =
|
|
34536
|
+
const [imageError, setImageError] = useState74(false);
|
|
34537
|
+
const [isUploading, setIsUploading] = useState74(false);
|
|
34538
|
+
const [fileInputRef, setFileInputRef] = useState74(null);
|
|
34442
34539
|
const seoTitleLength = (seoTitle || "").length;
|
|
34443
34540
|
const seoTitleTooLong = seoTitleLength > SEO_TITLE_MAX_LENGTH;
|
|
34444
34541
|
const seoDescriptionLength = (seoDescription || "").length;
|
|
@@ -34776,9 +34873,9 @@ function SocialLinksManager({
|
|
|
34776
34873
|
|
|
34777
34874
|
// src/components/features/start-with-openframe-button.tsx
|
|
34778
34875
|
init_button2();
|
|
34779
|
-
import * as
|
|
34876
|
+
import * as React103 from "react";
|
|
34780
34877
|
import { jsx as jsx257 } from "react/jsx-runtime";
|
|
34781
|
-
var StartWithOpenFrameButton =
|
|
34878
|
+
var StartWithOpenFrameButton = React103.forwardRef(({ children = "Start Free Trial", mode = "outline", className, buttonSize, loading = false, buttonBackgroundColor, buttonTextColor, ...props }, ref) => {
|
|
34782
34879
|
const isYellow = mode === "yellow";
|
|
34783
34880
|
const isPink = mode === "pink" || mode === "purple";
|
|
34784
34881
|
const isCyan = mode === "cyan";
|
|
@@ -34899,7 +34996,7 @@ function StatusFilterComponent({
|
|
|
34899
34996
|
}
|
|
34900
34997
|
|
|
34901
34998
|
// src/components/features/tags-selector.tsx
|
|
34902
|
-
import { useState as
|
|
34999
|
+
import { useState as useState75 } from "react";
|
|
34903
35000
|
import { Search as Search2, X as X7, Plus as Plus6, Loader2 as Loader26 } from "lucide-react";
|
|
34904
35001
|
import { jsx as jsx259, jsxs as jsxs198 } from "react/jsx-runtime";
|
|
34905
35002
|
function TagsSelector({
|
|
@@ -34913,9 +35010,9 @@ function TagsSelector({
|
|
|
34913
35010
|
disabled = false,
|
|
34914
35011
|
allowCreate = true
|
|
34915
35012
|
}) {
|
|
34916
|
-
const [searchQuery, setSearchQuery] =
|
|
34917
|
-
const [showDropdown, setShowDropdown] =
|
|
34918
|
-
const [isCreating, setIsCreating] =
|
|
35013
|
+
const [searchQuery, setSearchQuery] = useState75("");
|
|
35014
|
+
const [showDropdown, setShowDropdown] = useState75(false);
|
|
35015
|
+
const [isCreating, setIsCreating] = useState75(false);
|
|
34919
35016
|
const handleTagAdd = (tagId) => {
|
|
34920
35017
|
if (!selectedTagIds.includes(tagId) && selectedTagIds.length < maxTags) {
|
|
34921
35018
|
onTagsChange([...selectedTagIds, tagId]);
|
|
@@ -35124,7 +35221,7 @@ function VideoBitesDisplay({
|
|
|
35124
35221
|
// src/components/features/walkthrough-video.tsx
|
|
35125
35222
|
init_cn();
|
|
35126
35223
|
init_button2();
|
|
35127
|
-
import { useCallback as useCallback28, useEffect as
|
|
35224
|
+
import { useCallback as useCallback28, useEffect as useEffect58, useMemo as useMemo35, useRef as useRef43, useState as useState76 } from "react";
|
|
35128
35225
|
import * as DialogPrimitive3 from "@radix-ui/react-dialog";
|
|
35129
35226
|
import { Fragment as Fragment48, jsx as jsx262, jsxs as jsxs200 } from "react/jsx-runtime";
|
|
35130
35227
|
var isAtEnd = (duration, time) => duration > 0 && duration - time < 1;
|
|
@@ -35151,9 +35248,9 @@ function WalkthroughVideo({
|
|
|
35151
35248
|
const dismissEnabled = dismissal !== false;
|
|
35152
35249
|
const storageKey = dismissEnabled && dismissal.storageKey || WALKTHROUGH_VIDEO_DISMISS_KEY;
|
|
35153
35250
|
const dismissalId = video?.id != null ? String(video.id) : "dismissed";
|
|
35154
|
-
const [mounted, setMounted] =
|
|
35155
|
-
const [dismissed, setDismissed] =
|
|
35156
|
-
|
|
35251
|
+
const [mounted, setMounted] = useState76(false);
|
|
35252
|
+
const [dismissed, setDismissed] = useState76(false);
|
|
35253
|
+
useEffect58(() => {
|
|
35157
35254
|
let idleHandle = null;
|
|
35158
35255
|
if (!video) return;
|
|
35159
35256
|
const timer = setTimeout(() => {
|
|
@@ -35175,8 +35272,8 @@ function WalkthroughVideo({
|
|
|
35175
35272
|
if (idleHandle !== null && typeof cic === "function") cic(idleHandle);
|
|
35176
35273
|
};
|
|
35177
35274
|
}, [appearDelayMs, dismissEnabled, storageKey, dismissalId, video?.id]);
|
|
35178
|
-
const [previewSuppressed, setPreviewSuppressed] =
|
|
35179
|
-
|
|
35275
|
+
const [previewSuppressed, setPreviewSuppressed] = useState76(false);
|
|
35276
|
+
useEffect58(() => {
|
|
35180
35277
|
try {
|
|
35181
35278
|
const reducedMotion = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? false;
|
|
35182
35279
|
const conn = navigator.connection;
|
|
@@ -35185,7 +35282,7 @@ function WalkthroughVideo({
|
|
|
35185
35282
|
} catch {
|
|
35186
35283
|
}
|
|
35187
35284
|
}, []);
|
|
35188
|
-
const [deepLinkHit] =
|
|
35285
|
+
const [deepLinkHit] = useState76(() => {
|
|
35189
35286
|
if (!deepLinkParam || typeof window === "undefined") return false;
|
|
35190
35287
|
try {
|
|
35191
35288
|
return new URLSearchParams(window.location.search).has(deepLinkParam);
|
|
@@ -35193,31 +35290,31 @@ function WalkthroughVideo({
|
|
|
35193
35290
|
return false;
|
|
35194
35291
|
}
|
|
35195
35292
|
});
|
|
35196
|
-
const [openState, setOpenState] =
|
|
35293
|
+
const [openState, setOpenState] = useState76(Boolean(defaultOpen) || deepLinkHit);
|
|
35197
35294
|
const open = openProp !== void 0 ? openProp : openState;
|
|
35198
|
-
const [pausedOpenSession, setPausedOpenSession] =
|
|
35295
|
+
const [pausedOpenSession, setPausedOpenSession] = useState76(
|
|
35199
35296
|
Boolean(defaultOpen && defaultOpenPaused) || deepLinkHit
|
|
35200
35297
|
);
|
|
35201
|
-
const previewHandleRef =
|
|
35202
|
-
const theaterHandleRef =
|
|
35203
|
-
const theaterForcedMuteRef =
|
|
35204
|
-
const resumeHandleRef =
|
|
35205
|
-
const closeButtonRef =
|
|
35206
|
-
const userMutedRef =
|
|
35207
|
-
const endedLatchRef =
|
|
35208
|
-
const [hovered, setHovered] =
|
|
35209
|
-
const [handoff, setHandoff] =
|
|
35210
|
-
const [suspended, setSuspended] =
|
|
35211
|
-
const [theaterStart, setTheaterStart] =
|
|
35212
|
-
const [footerHidden, setFooterHidden] =
|
|
35213
|
-
const [cardFallback, setCardFallback] =
|
|
35214
|
-
const [cardMuted, setCardMuted] =
|
|
35215
|
-
const [cardPaused, setCardPaused] =
|
|
35216
|
-
const [userMuted, setUserMuted] =
|
|
35298
|
+
const previewHandleRef = useRef43(null);
|
|
35299
|
+
const theaterHandleRef = useRef43(null);
|
|
35300
|
+
const theaterForcedMuteRef = useRef43(false);
|
|
35301
|
+
const resumeHandleRef = useRef43(null);
|
|
35302
|
+
const closeButtonRef = useRef43(null);
|
|
35303
|
+
const userMutedRef = useRef43(false);
|
|
35304
|
+
const endedLatchRef = useRef43(false);
|
|
35305
|
+
const [hovered, setHovered] = useState76(false);
|
|
35306
|
+
const [handoff, setHandoff] = useState76(null);
|
|
35307
|
+
const [suspended, setSuspended] = useState76(false);
|
|
35308
|
+
const [theaterStart, setTheaterStart] = useState76({ time: 0, muted: false });
|
|
35309
|
+
const [footerHidden, setFooterHidden] = useState76(false);
|
|
35310
|
+
const [cardFallback, setCardFallback] = useState76({ muted: false, blocked: false });
|
|
35311
|
+
const [cardMuted, setCardMuted] = useState76(false);
|
|
35312
|
+
const [cardPaused, setCardPaused] = useState76(false);
|
|
35313
|
+
const [userMuted, setUserMuted] = useState76(false);
|
|
35217
35314
|
const isYouTube = Boolean(video?.youtubeUrl);
|
|
35218
35315
|
const resumeMode = !open && handoff !== null && !isYouTube;
|
|
35219
35316
|
const previewAllowed = !previewSuppressed && !isYouTube;
|
|
35220
|
-
|
|
35317
|
+
useEffect58(() => {
|
|
35221
35318
|
if (!mounted) return;
|
|
35222
35319
|
if (inline) {
|
|
35223
35320
|
setFooterHidden(false);
|
|
@@ -35235,7 +35332,7 @@ function WalkthroughVideo({
|
|
|
35235
35332
|
io.observe(el);
|
|
35236
35333
|
return () => io.disconnect();
|
|
35237
35334
|
}, [mounted, inline, hideNearSelector, pathname]);
|
|
35238
|
-
|
|
35335
|
+
useEffect58(() => {
|
|
35239
35336
|
if (!resumeMode) return;
|
|
35240
35337
|
const onVis = () => {
|
|
35241
35338
|
if (document.visibilityState === "hidden") {
|
|
@@ -35249,7 +35346,7 @@ function WalkthroughVideo({
|
|
|
35249
35346
|
document.addEventListener("visibilitychange", onVis);
|
|
35250
35347
|
return () => document.removeEventListener("visibilitychange", onVis);
|
|
35251
35348
|
}, [resumeMode]);
|
|
35252
|
-
|
|
35349
|
+
useEffect58(() => {
|
|
35253
35350
|
if (!footerHidden) return;
|
|
35254
35351
|
const h = resumeHandleRef.current ?? previewHandleRef.current;
|
|
35255
35352
|
try {
|
|
@@ -35259,10 +35356,10 @@ function WalkthroughVideo({
|
|
|
35259
35356
|
setCardPaused(true);
|
|
35260
35357
|
setHovered(false);
|
|
35261
35358
|
}, [footerHidden, resumeMode, hovered]);
|
|
35262
|
-
const cardModeRef =
|
|
35263
|
-
const selfDrivenForRef =
|
|
35264
|
-
const justClosedRef =
|
|
35265
|
-
const justClosedTimerRef =
|
|
35359
|
+
const cardModeRef = useRef43("poster");
|
|
35360
|
+
const selfDrivenForRef = useRef43(null);
|
|
35361
|
+
const justClosedRef = useRef43(false);
|
|
35362
|
+
const justClosedTimerRef = useRef43(null);
|
|
35266
35363
|
const commitOpen = useCallback28((next) => {
|
|
35267
35364
|
if (!next) {
|
|
35268
35365
|
justClosedRef.current = true;
|
|
@@ -35315,7 +35412,7 @@ function WalkthroughVideo({
|
|
|
35315
35412
|
selfDrivenForRef.current = true;
|
|
35316
35413
|
commitOpen(true);
|
|
35317
35414
|
}, [handoff, cardFallback.muted, commitOpen]);
|
|
35318
|
-
const [prevOpen, setPrevOpen] =
|
|
35415
|
+
const [prevOpen, setPrevOpen] = useState76(open);
|
|
35319
35416
|
if (open !== prevOpen) {
|
|
35320
35417
|
setPrevOpen(open);
|
|
35321
35418
|
if (open && pausedOpenSession) setPausedOpenSession(false);
|
|
@@ -35397,13 +35494,13 @@ function WalkthroughVideo({
|
|
|
35397
35494
|
setCardFallback(s);
|
|
35398
35495
|
setCardMuted(s.muted);
|
|
35399
35496
|
}, []);
|
|
35400
|
-
|
|
35497
|
+
useEffect58(() => {
|
|
35401
35498
|
if (resumeMode) {
|
|
35402
35499
|
setCardMuted(handoff?.muted ?? false);
|
|
35403
35500
|
setCardPaused(handoff?.playing === false);
|
|
35404
35501
|
}
|
|
35405
35502
|
}, [resumeMode]);
|
|
35406
|
-
|
|
35503
|
+
useEffect58(() => {
|
|
35407
35504
|
if (hovered) {
|
|
35408
35505
|
setCardPaused(false);
|
|
35409
35506
|
setCardMuted(userMutedRef.current);
|
|
@@ -35768,7 +35865,7 @@ function useWalkthroughVideo(opts) {
|
|
|
35768
35865
|
}
|
|
35769
35866
|
|
|
35770
35867
|
// src/components/features/video-source-selector.tsx
|
|
35771
|
-
import { useState as
|
|
35868
|
+
import { useState as useState77, useCallback as useCallback29 } from "react";
|
|
35772
35869
|
import { Upload as Upload4, X as X8, Video as VideoIcon3 } from "lucide-react";
|
|
35773
35870
|
init_button2();
|
|
35774
35871
|
import { jsx as jsx263, jsxs as jsxs201 } from "react/jsx-runtime";
|
|
@@ -35794,10 +35891,10 @@ function VideoSourceSelector({
|
|
|
35794
35891
|
showTitle = true,
|
|
35795
35892
|
className = ""
|
|
35796
35893
|
}) {
|
|
35797
|
-
const [isUploading, setIsUploading] =
|
|
35798
|
-
const [uploadProgress, setUploadProgress] =
|
|
35799
|
-
const [uploadMessage, setUploadMessage] =
|
|
35800
|
-
const [uploadError, setUploadError] =
|
|
35894
|
+
const [isUploading, setIsUploading] = useState77(false);
|
|
35895
|
+
const [uploadProgress, setUploadProgress] = useState77(0);
|
|
35896
|
+
const [uploadMessage, setUploadMessage] = useState77("");
|
|
35897
|
+
const [uploadError, setUploadError] = useState77(null);
|
|
35801
35898
|
const handleUploadClick = useCallback29(() => {
|
|
35802
35899
|
const input = document.createElement("input");
|
|
35803
35900
|
input.type = "file";
|
|
@@ -36169,7 +36266,7 @@ function TranscriptSummaryEditor({
|
|
|
36169
36266
|
}
|
|
36170
36267
|
|
|
36171
36268
|
// src/components/features/highlight-video-section.tsx
|
|
36172
|
-
import { useState as
|
|
36269
|
+
import { useState as useState78 } from "react";
|
|
36173
36270
|
import { Sparkles as Sparkles4, Upload as Upload5 } from "lucide-react";
|
|
36174
36271
|
init_button2();
|
|
36175
36272
|
|
|
@@ -36469,7 +36566,7 @@ function HighlightVideoSection({
|
|
|
36469
36566
|
disabled = false,
|
|
36470
36567
|
className = ""
|
|
36471
36568
|
}) {
|
|
36472
|
-
const [uploadError, setUploadError] =
|
|
36569
|
+
const [uploadError, setUploadError] = useState78(null);
|
|
36473
36570
|
const handleUploadClick = () => {
|
|
36474
36571
|
const input = document.createElement("input");
|
|
36475
36572
|
input.type = "file";
|
|
@@ -37274,7 +37371,7 @@ function ViewToggle({
|
|
|
37274
37371
|
|
|
37275
37372
|
// src/components/features/policy-configuration-panel.tsx
|
|
37276
37373
|
init_cn();
|
|
37277
|
-
import { useEffect as
|
|
37374
|
+
import { useEffect as useEffect59, useState as useState79 } from "react";
|
|
37278
37375
|
import { ChevronDown as ChevronDown8, Shield as Shield2 } from "lucide-react";
|
|
37279
37376
|
init_button2();
|
|
37280
37377
|
import { Fragment as Fragment49, jsx as jsx282, jsxs as jsxs216 } from "react/jsx-runtime";
|
|
@@ -37450,9 +37547,9 @@ var PolicyConfigurationPanel = ({
|
|
|
37450
37547
|
onCategoryPermissionChange,
|
|
37451
37548
|
className
|
|
37452
37549
|
}) => {
|
|
37453
|
-
const [expandedIds, setExpandedIds] =
|
|
37454
|
-
const [bulkLevels, setBulkLevels] =
|
|
37455
|
-
|
|
37550
|
+
const [expandedIds, setExpandedIds] = useState79(/* @__PURE__ */ new Set());
|
|
37551
|
+
const [bulkLevels, setBulkLevels] = useState79({});
|
|
37552
|
+
useEffect59(() => {
|
|
37456
37553
|
setBulkLevels({});
|
|
37457
37554
|
}, [editMode]);
|
|
37458
37555
|
const handleToggle = (categoryId) => {
|
|
@@ -37492,7 +37589,7 @@ PolicyConfigurationPanel.displayName = "PolicyConfigurationPanel";
|
|
|
37492
37589
|
init_button2();
|
|
37493
37590
|
|
|
37494
37591
|
// src/components/ui/phone-input.tsx
|
|
37495
|
-
import { useCallback as useCallback30, useEffect as
|
|
37592
|
+
import { useCallback as useCallback30, useEffect as useEffect60, useMemo as useMemo36, useRef as useRef44, useState as useState80 } from "react";
|
|
37496
37593
|
import { jsx as jsx283, jsxs as jsxs217 } from "react/jsx-runtime";
|
|
37497
37594
|
function PhoneInput({
|
|
37498
37595
|
value,
|
|
@@ -37509,8 +37606,8 @@ function PhoneInput({
|
|
|
37509
37606
|
() => [...priority, ...others].find((c) => c.code === countryCode),
|
|
37510
37607
|
[countryCode, priority, others]
|
|
37511
37608
|
);
|
|
37512
|
-
const [isInvalid, setIsInvalid] =
|
|
37513
|
-
const debounceRef =
|
|
37609
|
+
const [isInvalid, setIsInvalid] = useState80(false);
|
|
37610
|
+
const debounceRef = useRef44(null);
|
|
37514
37611
|
const digitCount = useCallback30((val) => val.replace(/[^0-9]/g, "").length, []);
|
|
37515
37612
|
const runValidation = useCallback30((phone) => {
|
|
37516
37613
|
if (!phone || digitCount(phone) === 0) {
|
|
@@ -37526,7 +37623,7 @@ function PhoneInput({
|
|
|
37526
37623
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
37527
37624
|
debounceRef.current = setTimeout(() => runValidation(phone), 300);
|
|
37528
37625
|
}, [runValidation]);
|
|
37529
|
-
|
|
37626
|
+
useEffect60(() => {
|
|
37530
37627
|
return () => {
|
|
37531
37628
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
37532
37629
|
};
|
|
@@ -37593,7 +37690,7 @@ function CountryOption({ country }) {
|
|
|
37593
37690
|
// src/components/features/waitlist-form.tsx
|
|
37594
37691
|
init_cn();
|
|
37595
37692
|
import { getCountries as getCountries2 } from "libphonenumber-js";
|
|
37596
|
-
import { useEffect as
|
|
37693
|
+
import { useEffect as useEffect61, useState as useState81 } from "react";
|
|
37597
37694
|
import { Fragment as Fragment50, jsx as jsx284, jsxs as jsxs218 } from "react/jsx-runtime";
|
|
37598
37695
|
function WaitlistForm({
|
|
37599
37696
|
id = "waitlist-form",
|
|
@@ -37613,22 +37710,22 @@ function WaitlistForm({
|
|
|
37613
37710
|
privacyPolicyUrl,
|
|
37614
37711
|
consentText = "I agree to receive recurring automated text messages at the phone number provided. Msg & data rates may apply. Msg frequency varies. Reply HELP for help and STOP to cancel."
|
|
37615
37712
|
}) {
|
|
37616
|
-
const [email, setEmail] =
|
|
37617
|
-
const [phone, setPhone] =
|
|
37618
|
-
const [countryCode, setCountryCode] =
|
|
37713
|
+
const [email, setEmail] = useState81(defaultEmail);
|
|
37714
|
+
const [phone, setPhone] = useState81(defaultPhone);
|
|
37715
|
+
const [countryCode, setCountryCode] = useState81("US");
|
|
37619
37716
|
const { toast } = useToast();
|
|
37620
37717
|
const { honeypotInputProps, getSignals, resetSignals } = useHumanitySignals();
|
|
37621
|
-
const [smsConsent, setSmsConsent] =
|
|
37622
|
-
const [isClient, setIsClient] =
|
|
37623
|
-
const [isPhoneInvalid, setIsPhoneInvalid] =
|
|
37624
|
-
const [showConsentError, setShowConsentError] =
|
|
37718
|
+
const [smsConsent, setSmsConsent] = useState81(false);
|
|
37719
|
+
const [isClient, setIsClient] = useState81(false);
|
|
37720
|
+
const [isPhoneInvalid, setIsPhoneInvalid] = useState81(false);
|
|
37721
|
+
const [showConsentError, setShowConsentError] = useState81(false);
|
|
37625
37722
|
const isMailDomainGeneric = hasGenericEmailDomain(email);
|
|
37626
|
-
|
|
37723
|
+
useEffect61(() => {
|
|
37627
37724
|
if (defaultEmail) {
|
|
37628
37725
|
setEmail(defaultEmail);
|
|
37629
37726
|
}
|
|
37630
37727
|
}, [defaultEmail]);
|
|
37631
|
-
|
|
37728
|
+
useEffect61(() => {
|
|
37632
37729
|
setIsClient(true);
|
|
37633
37730
|
if (!geoApiUrl) return;
|
|
37634
37731
|
const supportedCountries = new Set(getCountries2());
|
|
@@ -37788,9 +37885,9 @@ function WaitlistForm({
|
|
|
37788
37885
|
}
|
|
37789
37886
|
|
|
37790
37887
|
// src/components/features/notifications/notifications-context.tsx
|
|
37791
|
-
import * as
|
|
37888
|
+
import * as React107 from "react";
|
|
37792
37889
|
import { jsx as jsx285 } from "react/jsx-runtime";
|
|
37793
|
-
var NotificationsContext =
|
|
37890
|
+
var NotificationsContext = React107.createContext(null);
|
|
37794
37891
|
function mergeNotification(base, incoming) {
|
|
37795
37892
|
const out = { ...base };
|
|
37796
37893
|
for (const key of Object.keys(incoming)) {
|
|
@@ -37869,16 +37966,16 @@ function NotificationsProvider({
|
|
|
37869
37966
|
onLoadMore,
|
|
37870
37967
|
renderTile
|
|
37871
37968
|
}) {
|
|
37872
|
-
const [notifications, dispatch] =
|
|
37873
|
-
const [isOpen, setIsOpen] =
|
|
37874
|
-
const [showPopups, setShowPopupsState] =
|
|
37875
|
-
const [showDesktopPopups, setShowDesktopPopupsState] =
|
|
37969
|
+
const [notifications, dispatch] = React107.useReducer(reducer, initialNotifications);
|
|
37970
|
+
const [isOpen, setIsOpen] = React107.useState(false);
|
|
37971
|
+
const [showPopups, setShowPopupsState] = React107.useState(defaultShowPopups);
|
|
37972
|
+
const [showDesktopPopups, setShowDesktopPopupsState] = React107.useState(defaultShowDesktopPopups);
|
|
37876
37973
|
const desktopPopupsConfigured = onShowDesktopPopupsChange !== void 0;
|
|
37877
|
-
const actionsRef =
|
|
37878
|
-
|
|
37974
|
+
const actionsRef = React107.useRef(actions);
|
|
37975
|
+
React107.useEffect(() => {
|
|
37879
37976
|
actionsRef.current = actions;
|
|
37880
37977
|
}, [actions]);
|
|
37881
|
-
const addNotification =
|
|
37978
|
+
const addNotification = React107.useCallback(
|
|
37882
37979
|
(input) => {
|
|
37883
37980
|
const id = input.id ?? generateId();
|
|
37884
37981
|
const notification = {
|
|
@@ -37892,7 +37989,7 @@ function NotificationsProvider({
|
|
|
37892
37989
|
},
|
|
37893
37990
|
[maxNotifications]
|
|
37894
37991
|
);
|
|
37895
|
-
const upsertNotification =
|
|
37992
|
+
const upsertNotification = React107.useCallback(
|
|
37896
37993
|
(input) => {
|
|
37897
37994
|
const notification = {
|
|
37898
37995
|
...input,
|
|
@@ -37905,48 +38002,48 @@ function NotificationsProvider({
|
|
|
37905
38002
|
},
|
|
37906
38003
|
[maxNotifications]
|
|
37907
38004
|
);
|
|
37908
|
-
const setNotifications =
|
|
38005
|
+
const setNotifications = React107.useCallback((list) => {
|
|
37909
38006
|
dispatch({ type: "set", notifications: list });
|
|
37910
38007
|
}, []);
|
|
37911
|
-
const markRead =
|
|
38008
|
+
const markRead = React107.useCallback((id) => {
|
|
37912
38009
|
dispatch({ type: "markRead", id });
|
|
37913
38010
|
void actionsRef.current?.onMarkRead?.(id);
|
|
37914
38011
|
}, []);
|
|
37915
|
-
const markAllRead =
|
|
38012
|
+
const markAllRead = React107.useCallback(() => {
|
|
37916
38013
|
dispatch({ type: "markAllRead" });
|
|
37917
38014
|
void actionsRef.current?.onMarkAllRead?.();
|
|
37918
38015
|
}, []);
|
|
37919
|
-
const markSettled =
|
|
38016
|
+
const markSettled = React107.useCallback((id) => {
|
|
37920
38017
|
dispatch({ type: "markSettled", id });
|
|
37921
38018
|
void actionsRef.current?.onMarkSettled?.(id);
|
|
37922
38019
|
}, []);
|
|
37923
|
-
const remove =
|
|
38020
|
+
const remove = React107.useCallback((id) => {
|
|
37924
38021
|
dispatch({ type: "remove", id });
|
|
37925
38022
|
void actionsRef.current?.onRemove?.(id);
|
|
37926
38023
|
}, []);
|
|
37927
|
-
const clear =
|
|
37928
|
-
const open =
|
|
37929
|
-
const close =
|
|
37930
|
-
const toggle =
|
|
37931
|
-
const setShowPopups =
|
|
38024
|
+
const clear = React107.useCallback(() => dispatch({ type: "clear" }), []);
|
|
38025
|
+
const open = React107.useCallback(() => setIsOpen(true), []);
|
|
38026
|
+
const close = React107.useCallback(() => setIsOpen(false), []);
|
|
38027
|
+
const toggle = React107.useCallback(() => setIsOpen((v) => !v), []);
|
|
38028
|
+
const setShowPopups = React107.useCallback(
|
|
37932
38029
|
(value2) => {
|
|
37933
38030
|
setShowPopupsState(value2);
|
|
37934
38031
|
onShowPopupsChange?.(value2);
|
|
37935
38032
|
},
|
|
37936
38033
|
[onShowPopupsChange]
|
|
37937
38034
|
);
|
|
37938
|
-
const setShowDesktopPopups =
|
|
38035
|
+
const setShowDesktopPopups = React107.useCallback(
|
|
37939
38036
|
(value2) => {
|
|
37940
38037
|
setShowDesktopPopupsState(value2);
|
|
37941
38038
|
onShowDesktopPopupsChange?.(value2);
|
|
37942
38039
|
},
|
|
37943
38040
|
[onShowDesktopPopupsChange]
|
|
37944
38041
|
);
|
|
37945
|
-
const unreadCount =
|
|
38042
|
+
const unreadCount = React107.useMemo(
|
|
37946
38043
|
() => notifications.reduce((acc, n) => n.read ? acc : acc + 1, 0),
|
|
37947
38044
|
[notifications]
|
|
37948
38045
|
);
|
|
37949
|
-
const value =
|
|
38046
|
+
const value = React107.useMemo(
|
|
37950
38047
|
() => ({
|
|
37951
38048
|
notifications,
|
|
37952
38049
|
unreadCount,
|
|
@@ -38005,18 +38102,18 @@ function NotificationsProvider({
|
|
|
38005
38102
|
return /* @__PURE__ */ jsx285(NotificationsContext.Provider, { value, children });
|
|
38006
38103
|
}
|
|
38007
38104
|
function useNotifications() {
|
|
38008
|
-
const ctx =
|
|
38105
|
+
const ctx = React107.useContext(NotificationsContext);
|
|
38009
38106
|
if (!ctx) {
|
|
38010
38107
|
throw new Error("useNotifications must be used inside <NotificationsProvider>");
|
|
38011
38108
|
}
|
|
38012
38109
|
return ctx;
|
|
38013
38110
|
}
|
|
38014
38111
|
function useOptionalNotifications() {
|
|
38015
|
-
return
|
|
38112
|
+
return React107.useContext(NotificationsContext);
|
|
38016
38113
|
}
|
|
38017
38114
|
|
|
38018
38115
|
// src/components/features/notifications/notification-drawer.tsx
|
|
38019
|
-
import { useEffect as
|
|
38116
|
+
import { useEffect as useEffect65, useRef as useRef47 } from "react";
|
|
38020
38117
|
|
|
38021
38118
|
// src/components/navigation/app-layout-context.ts
|
|
38022
38119
|
import { createContext as createContext10, useContext as useContext10 } from "react";
|
|
@@ -38031,11 +38128,11 @@ function useAppLayoutDrawerCoordination() {
|
|
|
38031
38128
|
|
|
38032
38129
|
// src/components/navigation/app-layout-drawer.tsx
|
|
38033
38130
|
init_cn();
|
|
38034
|
-
import * as
|
|
38131
|
+
import * as React108 from "react";
|
|
38035
38132
|
import * as DialogPrimitive4 from "@radix-ui/react-dialog";
|
|
38036
38133
|
import { cva as cva10 } from "class-variance-authority";
|
|
38037
38134
|
import { jsx as jsx286, jsxs as jsxs219 } from "react/jsx-runtime";
|
|
38038
|
-
var DrawerOpenContext =
|
|
38135
|
+
var DrawerOpenContext = React108.createContext(false);
|
|
38039
38136
|
var AppLayoutDrawerRoot = ({
|
|
38040
38137
|
open: openProp,
|
|
38041
38138
|
defaultOpen,
|
|
@@ -38044,10 +38141,10 @@ var AppLayoutDrawerRoot = ({
|
|
|
38044
38141
|
children,
|
|
38045
38142
|
...rest
|
|
38046
38143
|
}) => {
|
|
38047
|
-
const [internalOpen, setInternalOpen] =
|
|
38144
|
+
const [internalOpen, setInternalOpen] = React108.useState(defaultOpen ?? false);
|
|
38048
38145
|
const isControlled = openProp !== void 0;
|
|
38049
38146
|
const open = isControlled ? openProp : internalOpen;
|
|
38050
|
-
const handleOpenChange =
|
|
38147
|
+
const handleOpenChange = React108.useCallback(
|
|
38051
38148
|
(next) => {
|
|
38052
38149
|
if (!isControlled) setInternalOpen(next);
|
|
38053
38150
|
onOpenChange?.(next);
|
|
@@ -38055,11 +38152,11 @@ var AppLayoutDrawerRoot = ({
|
|
|
38055
38152
|
[isControlled, onOpenChange]
|
|
38056
38153
|
);
|
|
38057
38154
|
const coordination = useAppLayoutDrawerCoordination();
|
|
38058
|
-
const openRef =
|
|
38155
|
+
const openRef = React108.useRef(open);
|
|
38059
38156
|
openRef.current = open;
|
|
38060
|
-
const handleOpenChangeRef =
|
|
38157
|
+
const handleOpenChangeRef = React108.useRef(handleOpenChange);
|
|
38061
38158
|
handleOpenChangeRef.current = handleOpenChange;
|
|
38062
|
-
const selfHandleRef =
|
|
38159
|
+
const selfHandleRef = React108.useRef(null);
|
|
38063
38160
|
if (!selfHandleRef.current) {
|
|
38064
38161
|
selfHandleRef.current = {
|
|
38065
38162
|
close: () => {
|
|
@@ -38067,10 +38164,10 @@ var AppLayoutDrawerRoot = ({
|
|
|
38067
38164
|
}
|
|
38068
38165
|
};
|
|
38069
38166
|
}
|
|
38070
|
-
|
|
38167
|
+
React108.useEffect(() => {
|
|
38071
38168
|
if (open) coordination?.notifyDrawerDidOpen(selfHandleRef.current ?? void 0);
|
|
38072
38169
|
}, [open, coordination]);
|
|
38073
|
-
|
|
38170
|
+
React108.useEffect(() => {
|
|
38074
38171
|
if (!selfHandleRef.current) return;
|
|
38075
38172
|
return coordination?.registerDrawer(selfHandleRef.current);
|
|
38076
38173
|
}, [coordination]);
|
|
@@ -38161,8 +38258,8 @@ function useContainedResizableSize({
|
|
|
38161
38258
|
storageKey,
|
|
38162
38259
|
container
|
|
38163
38260
|
}) {
|
|
38164
|
-
const [available, setAvailable] =
|
|
38165
|
-
|
|
38261
|
+
const [available, setAvailable] = React108.useState(0);
|
|
38262
|
+
React108.useEffect(() => {
|
|
38166
38263
|
if (!enabled || !container) return;
|
|
38167
38264
|
const update = () => {
|
|
38168
38265
|
setAvailable(isHorizontal ? container.clientWidth : container.clientHeight);
|
|
@@ -38172,14 +38269,14 @@ function useContainedResizableSize({
|
|
|
38172
38269
|
ro.observe(container);
|
|
38173
38270
|
return () => ro.disconnect();
|
|
38174
38271
|
}, [enabled, container, isHorizontal]);
|
|
38175
|
-
const clampToContainer =
|
|
38272
|
+
const clampToContainer = React108.useCallback(
|
|
38176
38273
|
(value) => {
|
|
38177
38274
|
const effectiveMax = available > 0 ? Math.min(maxSize, available - 40) : maxSize;
|
|
38178
38275
|
return clamp3(value, minSize, Math.max(minSize, effectiveMax));
|
|
38179
38276
|
},
|
|
38180
38277
|
[available, minSize, maxSize]
|
|
38181
38278
|
);
|
|
38182
|
-
const readInitial =
|
|
38279
|
+
const readInitial = React108.useCallback(() => {
|
|
38183
38280
|
if (!enabled) return defaultSize;
|
|
38184
38281
|
if (typeof window === "undefined") return defaultSize;
|
|
38185
38282
|
if (!storageKey) return defaultSize;
|
|
@@ -38193,19 +38290,19 @@ function useContainedResizableSize({
|
|
|
38193
38290
|
return defaultSize;
|
|
38194
38291
|
}
|
|
38195
38292
|
}, [enabled, storageKey, defaultSize]);
|
|
38196
|
-
const [size2, setSizeRaw] =
|
|
38197
|
-
const setSize =
|
|
38293
|
+
const [size2, setSizeRaw] = React108.useState(readInitial);
|
|
38294
|
+
const setSize = React108.useCallback(
|
|
38198
38295
|
(next) => setSizeRaw(clampToContainer(next)),
|
|
38199
38296
|
[clampToContainer]
|
|
38200
38297
|
);
|
|
38201
|
-
|
|
38298
|
+
React108.useEffect(() => {
|
|
38202
38299
|
if (!enabled || !storageKey || typeof window === "undefined") return;
|
|
38203
38300
|
try {
|
|
38204
38301
|
window.localStorage.setItem(storageKey, String(Math.round(size2)));
|
|
38205
38302
|
} catch {
|
|
38206
38303
|
}
|
|
38207
38304
|
}, [enabled, size2, storageKey]);
|
|
38208
|
-
|
|
38305
|
+
React108.useEffect(() => {
|
|
38209
38306
|
if (!enabled) return;
|
|
38210
38307
|
setSizeRaw((prev) => clampToContainer(prev));
|
|
38211
38308
|
}, [enabled, clampToContainer]);
|
|
@@ -38220,7 +38317,7 @@ function AppLayoutDrawerResizeHandle({
|
|
|
38220
38317
|
ariaLabel
|
|
38221
38318
|
}) {
|
|
38222
38319
|
const isHorizontal = HORIZONTAL_SIDES2.has(side);
|
|
38223
|
-
const startRef =
|
|
38320
|
+
const startRef = React108.useRef(null);
|
|
38224
38321
|
const direction = side === "right" || side === "bottom" ? -1 : 1;
|
|
38225
38322
|
const handlePointerDown = (e) => {
|
|
38226
38323
|
if (e.button !== 0 && e.pointerType === "mouse") return;
|
|
@@ -38310,7 +38407,7 @@ function AppLayoutDrawerResizeHandle({
|
|
|
38310
38407
|
}
|
|
38311
38408
|
);
|
|
38312
38409
|
}
|
|
38313
|
-
var AppLayoutDrawerContent =
|
|
38410
|
+
var AppLayoutDrawerContent = React108.forwardRef(
|
|
38314
38411
|
({
|
|
38315
38412
|
side = "right",
|
|
38316
38413
|
flush = false,
|
|
@@ -38338,13 +38435,13 @@ var AppLayoutDrawerContent = React107.forwardRef(
|
|
|
38338
38435
|
}, ref) => {
|
|
38339
38436
|
const contextContainer = useAppLayoutDrawerContainer();
|
|
38340
38437
|
const portalContainer = container !== void 0 ? container : contextContainer;
|
|
38341
|
-
const open =
|
|
38342
|
-
const [hasOpened, setHasOpened] =
|
|
38343
|
-
|
|
38438
|
+
const open = React108.useContext(DrawerOpenContext);
|
|
38439
|
+
const [hasOpened, setHasOpened] = React108.useState(Boolean(open));
|
|
38440
|
+
React108.useEffect(() => {
|
|
38344
38441
|
if (open) setHasOpened(true);
|
|
38345
38442
|
}, [open]);
|
|
38346
38443
|
const persist = keepMounted && hasOpened;
|
|
38347
|
-
|
|
38444
|
+
React108.useEffect(() => {
|
|
38348
38445
|
if (!debugLayoutShift) return;
|
|
38349
38446
|
if (!open) return;
|
|
38350
38447
|
if (typeof window === "undefined") return;
|
|
@@ -38395,8 +38492,8 @@ var AppLayoutDrawerContent = React107.forwardRef(
|
|
|
38395
38492
|
const resolvedSide = side ?? "right";
|
|
38396
38493
|
const isHorizontal = HORIZONTAL_SIDES2.has(resolvedSide);
|
|
38397
38494
|
const initialSize = defaultSize ?? (isHorizontal ? 560 : 480);
|
|
38398
|
-
const [isMobile, setIsMobile] =
|
|
38399
|
-
|
|
38495
|
+
const [isMobile, setIsMobile] = React108.useState(false);
|
|
38496
|
+
React108.useEffect(() => {
|
|
38400
38497
|
if (typeof window === "undefined") return;
|
|
38401
38498
|
const mq = window.matchMedia(`(max-width: ${mobileBreakpoint - 1}px)`);
|
|
38402
38499
|
const update = () => setIsMobile(mq.matches);
|
|
@@ -38511,7 +38608,7 @@ init_button2();
|
|
|
38511
38608
|
init_cn();
|
|
38512
38609
|
|
|
38513
38610
|
// src/components/features/notifications/notification-tile.tsx
|
|
38514
|
-
import { useMemo as useMemo38, useEffect as
|
|
38611
|
+
import { useMemo as useMemo38, useEffect as useEffect64, useState as useState84 } from "react";
|
|
38515
38612
|
init_cn();
|
|
38516
38613
|
import { jsx as jsx287, jsxs as jsxs220 } from "react/jsx-runtime";
|
|
38517
38614
|
var variantBySeverity = {
|
|
@@ -38552,14 +38649,14 @@ function NotificationTile({
|
|
|
38552
38649
|
settled
|
|
38553
38650
|
} = notification;
|
|
38554
38651
|
const accentVariant = (severity ? variantBySeverity[severity] : void 0) ?? variant;
|
|
38555
|
-
const [failedImageUrl, setFailedImageUrl] =
|
|
38652
|
+
const [failedImageUrl, setFailedImageUrl] = useState84(null);
|
|
38556
38653
|
const image = imageUrl && imageUrl !== failedImageUrl ? imageUrl : void 0;
|
|
38557
38654
|
const createdAtDate = new Date(createdAt);
|
|
38558
38655
|
const createdAtIso = Number.isNaN(createdAtDate.getTime()) ? null : createdAtDate.toISOString();
|
|
38559
38656
|
const initialElapsed = useMemo38(() => Date.now() - createdAt, [createdAt]);
|
|
38560
38657
|
const isLive = !read && !settled && initialElapsed < liveDurationMs;
|
|
38561
38658
|
const counting = isLive && !paused;
|
|
38562
|
-
|
|
38659
|
+
useEffect64(() => {
|
|
38563
38660
|
if (!counting) return;
|
|
38564
38661
|
const remaining = Math.max(0, liveDurationMs - initialElapsed);
|
|
38565
38662
|
const timer = window.setTimeout(() => {
|
|
@@ -38784,11 +38881,11 @@ function DrawerScrollList({
|
|
|
38784
38881
|
loadMoreRootMargin,
|
|
38785
38882
|
renderTile
|
|
38786
38883
|
}) {
|
|
38787
|
-
const scrollRef =
|
|
38788
|
-
const sentinelRef =
|
|
38789
|
-
const loadMoreRef =
|
|
38884
|
+
const scrollRef = useRef47(null);
|
|
38885
|
+
const sentinelRef = useRef47(null);
|
|
38886
|
+
const loadMoreRef = useRef47(loadMore);
|
|
38790
38887
|
loadMoreRef.current = loadMore;
|
|
38791
|
-
|
|
38888
|
+
useEffect65(() => {
|
|
38792
38889
|
if (!loadMore || !hasMore || isLoadingMore) return;
|
|
38793
38890
|
const sentinel = sentinelRef.current;
|
|
38794
38891
|
const root = scrollRef.current;
|
|
@@ -39008,7 +39105,7 @@ function NotificationPopups({
|
|
|
39008
39105
|
|
|
39009
39106
|
// src/components/features/notifications/approval-request-notification-tile.tsx
|
|
39010
39107
|
init_button2();
|
|
39011
|
-
import { useMemo as useMemo39, useState as
|
|
39108
|
+
import { useMemo as useMemo39, useState as useState85 } from "react";
|
|
39012
39109
|
|
|
39013
39110
|
// src/components/chat/types/chat.types.ts
|
|
39014
39111
|
var CHAT_TYPE = {
|
|
@@ -39221,10 +39318,10 @@ function ApprovalRequestNotificationTile({
|
|
|
39221
39318
|
defaultExpanded = false,
|
|
39222
39319
|
className
|
|
39223
39320
|
}) {
|
|
39224
|
-
const [expanded, setExpanded] =
|
|
39225
|
-
const [pinned, setPinned] =
|
|
39226
|
-
const [processing, setProcessing] =
|
|
39227
|
-
const [localStatus, setLocalStatus] =
|
|
39321
|
+
const [expanded, setExpanded] = useState85(defaultExpanded);
|
|
39322
|
+
const [pinned, setPinned] = useState85(defaultExpanded);
|
|
39323
|
+
const [processing, setProcessing] = useState85(false);
|
|
39324
|
+
const [localStatus, setLocalStatus] = useState85(null);
|
|
39228
39325
|
const approval = getApprovalMeta(notification);
|
|
39229
39326
|
const resolvedStatus = resolutionToStatus(approval?.resolution);
|
|
39230
39327
|
const status = resolvedStatus !== "pending" ? resolvedStatus : localStatus ?? "pending";
|
|
@@ -39301,36 +39398,36 @@ function ApprovalRequestNotificationTile({
|
|
|
39301
39398
|
}
|
|
39302
39399
|
|
|
39303
39400
|
// src/components/features/time-tracker/time-tracker-context.tsx
|
|
39304
|
-
import * as
|
|
39401
|
+
import * as React109 from "react";
|
|
39305
39402
|
import { jsx as jsx291 } from "react/jsx-runtime";
|
|
39306
|
-
var TimeTrackerContext =
|
|
39403
|
+
var TimeTrackerContext = React109.createContext(null);
|
|
39307
39404
|
function TimeTrackerProvider({ children, defaultOpen = false, ...data }) {
|
|
39308
|
-
const [isOpen, setIsOpen] =
|
|
39309
|
-
const open =
|
|
39310
|
-
const close =
|
|
39311
|
-
const toggle =
|
|
39405
|
+
const [isOpen, setIsOpen] = React109.useState(defaultOpen);
|
|
39406
|
+
const open = React109.useCallback(() => setIsOpen(true), []);
|
|
39407
|
+
const close = React109.useCallback(() => setIsOpen(false), []);
|
|
39408
|
+
const toggle = React109.useCallback(() => setIsOpen((v) => !v), []);
|
|
39312
39409
|
const value = { ...data, isOpen, open, close, toggle };
|
|
39313
39410
|
return /* @__PURE__ */ jsx291(TimeTrackerContext.Provider, { value, children });
|
|
39314
39411
|
}
|
|
39315
39412
|
function useTimeTracker() {
|
|
39316
|
-
const ctx =
|
|
39413
|
+
const ctx = React109.useContext(TimeTrackerContext);
|
|
39317
39414
|
if (!ctx) {
|
|
39318
39415
|
throw new Error("useTimeTracker must be used inside <TimeTrackerProvider>");
|
|
39319
39416
|
}
|
|
39320
39417
|
return ctx;
|
|
39321
39418
|
}
|
|
39322
39419
|
function useOptionalTimeTracker() {
|
|
39323
|
-
return
|
|
39420
|
+
return React109.useContext(TimeTrackerContext);
|
|
39324
39421
|
}
|
|
39325
39422
|
|
|
39326
39423
|
// src/components/features/time-tracker/time-tracker-panel.tsx
|
|
39327
39424
|
init_cn();
|
|
39328
|
-
import { useEffect as
|
|
39425
|
+
import { useEffect as useEffect67, useState as useState88 } from "react";
|
|
39329
39426
|
init_button();
|
|
39330
39427
|
init_split_button();
|
|
39331
39428
|
|
|
39332
39429
|
// src/components/features/time-tracker/use-tracker-clock.ts
|
|
39333
|
-
import { useEffect as
|
|
39430
|
+
import { useEffect as useEffect66, useState as useState87 } from "react";
|
|
39334
39431
|
function formatElapsed(totalMs) {
|
|
39335
39432
|
const totalSeconds = Math.max(0, Math.floor(totalMs / 1e3));
|
|
39336
39433
|
const hours = Math.floor(totalSeconds / 3600);
|
|
@@ -39340,8 +39437,8 @@ function formatElapsed(totalMs) {
|
|
|
39340
39437
|
return `${pad(hours)}:${pad(minutes)}:${pad(seconds)}`;
|
|
39341
39438
|
}
|
|
39342
39439
|
function useTrackerClock({ status, runningSince, accumulatedMs = 0 }) {
|
|
39343
|
-
const [now, setNow] =
|
|
39344
|
-
|
|
39440
|
+
const [now, setNow] = useState87(() => Date.now());
|
|
39441
|
+
useEffect66(() => {
|
|
39345
39442
|
if (status !== "tracking") return;
|
|
39346
39443
|
setNow(Date.now());
|
|
39347
39444
|
const id = setInterval(() => setNow(Date.now()), 1e3);
|
|
@@ -39396,12 +39493,12 @@ function TimeTrackerPanel({
|
|
|
39396
39493
|
className
|
|
39397
39494
|
}) {
|
|
39398
39495
|
const elapsedLabel = useTrackerClock({ status, runningSince, accumulatedMs });
|
|
39399
|
-
const [showValidationError, setShowValidationError] =
|
|
39496
|
+
const [showValidationError, setShowValidationError] = useState88(false);
|
|
39400
39497
|
const isRunning = status === "tracking";
|
|
39401
39498
|
const isActive = status !== "ready";
|
|
39402
39499
|
const hasContent2 = selectedTicketId != null || notes.trim() !== "";
|
|
39403
39500
|
const showFieldError = isActive && showValidationError && !hasContent2;
|
|
39404
|
-
|
|
39501
|
+
useEffect67(() => {
|
|
39405
39502
|
if (status === "ready") setShowValidationError(false);
|
|
39406
39503
|
}, [status]);
|
|
39407
39504
|
const handleSubmit = () => {
|
|
@@ -39652,7 +39749,7 @@ function LastEntryRow({ entry, onClick }) {
|
|
|
39652
39749
|
// src/components/features/time-tracker/time-tracker-header-button.tsx
|
|
39653
39750
|
init_cn();
|
|
39654
39751
|
import * as PopoverPrimitive5 from "@radix-ui/react-popover";
|
|
39655
|
-
import { useEffect as
|
|
39752
|
+
import { useEffect as useEffect68, useRef as useRef48 } from "react";
|
|
39656
39753
|
|
|
39657
39754
|
// src/components/navigation/header-button.tsx
|
|
39658
39755
|
init_cn();
|
|
@@ -39735,11 +39832,11 @@ function TimeTrackerHeaderButton({ className, disabled }) {
|
|
|
39735
39832
|
const layoutContainer = useAppLayoutDrawerContainer();
|
|
39736
39833
|
const coordination = useAppLayoutDrawerCoordination();
|
|
39737
39834
|
const isOpen = ctx?.isOpen ?? false;
|
|
39738
|
-
const isOpenRef =
|
|
39835
|
+
const isOpenRef = useRef48(isOpen);
|
|
39739
39836
|
isOpenRef.current = isOpen;
|
|
39740
|
-
const closeRef =
|
|
39837
|
+
const closeRef = useRef48(ctx?.close);
|
|
39741
39838
|
closeRef.current = ctx?.close;
|
|
39742
|
-
const selfHandleRef =
|
|
39839
|
+
const selfHandleRef = useRef48(null);
|
|
39743
39840
|
if (!selfHandleRef.current) {
|
|
39744
39841
|
selfHandleRef.current = {
|
|
39745
39842
|
close: () => {
|
|
@@ -39747,10 +39844,10 @@ function TimeTrackerHeaderButton({ className, disabled }) {
|
|
|
39747
39844
|
}
|
|
39748
39845
|
};
|
|
39749
39846
|
}
|
|
39750
|
-
|
|
39847
|
+
useEffect68(() => {
|
|
39751
39848
|
if (isOpen) coordination?.notifyDrawerDidOpen(selfHandleRef.current ?? void 0);
|
|
39752
39849
|
}, [isOpen, coordination]);
|
|
39753
|
-
|
|
39850
|
+
useEffect68(() => {
|
|
39754
39851
|
if (!selfHandleRef.current) return;
|
|
39755
39852
|
return coordination?.registerDrawer(selfHandleRef.current);
|
|
39756
39853
|
}, [coordination]);
|
|
@@ -39831,7 +39928,7 @@ function TimeTrackerHeaderButton({ className, disabled }) {
|
|
|
39831
39928
|
import { combine as combine3 } from "@atlaskit/pragmatic-drag-and-drop/combine";
|
|
39832
39929
|
import { monitorForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
|
39833
39930
|
import { preventUnhandled } from "@atlaskit/pragmatic-drag-and-drop/utils/prevent-unhandled";
|
|
39834
|
-
import { Fragment as Fragment56, useCallback as useCallback37, useEffect as
|
|
39931
|
+
import { Fragment as Fragment56, useCallback as useCallback37, useEffect as useEffect71, useMemo as useMemo41, useRef as useRef54, useState as useState94 } from "react";
|
|
39835
39932
|
import { createPortal } from "react-dom";
|
|
39836
39933
|
|
|
39837
39934
|
// src/utils/auto-scroll-ancestors.ts
|
|
@@ -39891,7 +39988,7 @@ init_cn();
|
|
|
39891
39988
|
|
|
39892
39989
|
// src/components/features/board/board-column.tsx
|
|
39893
39990
|
import { dropTargetForElements as dropTargetForElements2 } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
|
39894
|
-
import { memo as memo8, useCallback as useCallback35, useEffect as
|
|
39991
|
+
import { memo as memo8, useCallback as useCallback35, useEffect as useEffect70, useRef as useRef52, useState as useState92 } from "react";
|
|
39895
39992
|
init_cn();
|
|
39896
39993
|
import { attachClosestEdge as attachClosestEdge2 } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge";
|
|
39897
39994
|
|
|
@@ -39899,13 +39996,13 @@ import { attachClosestEdge as attachClosestEdge2 } from "@atlaskit/pragmatic-dra
|
|
|
39899
39996
|
init_button();
|
|
39900
39997
|
|
|
39901
39998
|
// src/components/ui/touch-friendly-tooltip.tsx
|
|
39902
|
-
import * as
|
|
39999
|
+
import * as React110 from "react";
|
|
39903
40000
|
import { jsx as jsx296, jsxs as jsxs226 } from "react/jsx-runtime";
|
|
39904
40001
|
var dismissOpenTooltip = null;
|
|
39905
40002
|
function TouchFriendlyTooltip({ content, side = "left", children }) {
|
|
39906
|
-
const [open, setOpen] =
|
|
39907
|
-
const isTouchRef =
|
|
39908
|
-
const close =
|
|
40003
|
+
const [open, setOpen] = React110.useState(false);
|
|
40004
|
+
const isTouchRef = React110.useRef(false);
|
|
40005
|
+
const close = React110.useCallback(() => setOpen(false), []);
|
|
39909
40006
|
if (!content) return children;
|
|
39910
40007
|
const toggleFromTouch = () => {
|
|
39911
40008
|
setOpen((prev) => {
|
|
@@ -40050,7 +40147,7 @@ function isSameAim(a, b) {
|
|
|
40050
40147
|
}
|
|
40051
40148
|
|
|
40052
40149
|
// src/components/features/board/use-lane-scroll-anchor.ts
|
|
40053
|
-
import { useRef as
|
|
40150
|
+
import { useRef as useRef50 } from "react";
|
|
40054
40151
|
var TICKET_ID_ATTRIBUTE = "data-ticket-id";
|
|
40055
40152
|
function cardPositions(root) {
|
|
40056
40153
|
return Array.from(root.querySelectorAll(`[${TICKET_ID_ATTRIBUTE}]`)).map((element) => ({
|
|
@@ -40059,7 +40156,7 @@ function cardPositions(root) {
|
|
|
40059
40156
|
}));
|
|
40060
40157
|
}
|
|
40061
40158
|
function useLaneScrollAnchor(scrollRef, tickets) {
|
|
40062
|
-
const positionsRef =
|
|
40159
|
+
const positionsRef = useRef50([]);
|
|
40063
40160
|
useIsomorphicLayoutEffect(() => {
|
|
40064
40161
|
const root = scrollRef.current;
|
|
40065
40162
|
if (!root) return;
|
|
@@ -40122,10 +40219,10 @@ import { setCustomNativeDragPreview } from "@atlaskit/pragmatic-drag-and-drop/el
|
|
|
40122
40219
|
import { attachClosestEdge } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge";
|
|
40123
40220
|
import {
|
|
40124
40221
|
memo as memo7,
|
|
40125
|
-
useEffect as
|
|
40222
|
+
useEffect as useEffect69,
|
|
40126
40223
|
useMemo as useMemo40,
|
|
40127
|
-
useRef as
|
|
40128
|
-
useState as
|
|
40224
|
+
useRef as useRef51,
|
|
40225
|
+
useState as useState91
|
|
40129
40226
|
} from "react";
|
|
40130
40227
|
init_cn();
|
|
40131
40228
|
|
|
@@ -40140,10 +40237,10 @@ function holdMoveDragEffect(element) {
|
|
|
40140
40237
|
|
|
40141
40238
|
// src/components/features/board/board-ticket-approval.tsx
|
|
40142
40239
|
init_cn();
|
|
40143
|
-
import * as
|
|
40240
|
+
import * as React111 from "react";
|
|
40144
40241
|
import { jsx as jsx298, jsxs as jsxs228 } from "react/jsx-runtime";
|
|
40145
40242
|
function BoardTicketApproval({ pendingApproval, onApprove, onReject }) {
|
|
40146
|
-
const [expanded, setExpanded] =
|
|
40243
|
+
const [expanded, setExpanded] = React111.useState(false);
|
|
40147
40244
|
const { innerRef, containerStyle } = useCollapsible({ expanded });
|
|
40148
40245
|
const isAdmin = pendingApproval.approvalType === "ADMIN";
|
|
40149
40246
|
return /* @__PURE__ */ jsxs228("div", { className: "pointer-events-auto flex flex-col", children: [
|
|
@@ -40348,10 +40445,10 @@ var TicketCard = memo7(function TicketCard2({
|
|
|
40348
40445
|
onApprove,
|
|
40349
40446
|
onReject
|
|
40350
40447
|
}) {
|
|
40351
|
-
const ref =
|
|
40352
|
-
const ticketRef =
|
|
40448
|
+
const ref = useRef51(null);
|
|
40449
|
+
const ticketRef = useRef51(ticket);
|
|
40353
40450
|
ticketRef.current = ticket;
|
|
40354
|
-
const [isDragging, setIsDragging] =
|
|
40451
|
+
const [isDragging, setIsDragging] = useState91(false);
|
|
40355
40452
|
const isLanding = useIsLanding(ticket.id);
|
|
40356
40453
|
const aim = useDropAim();
|
|
40357
40454
|
const closestEdge = aim && aim.columnId === columnId && aim.ticketId === ticket.id ? aim.edge : null;
|
|
@@ -40362,7 +40459,7 @@ var TicketCard = memo7(function TicketCard2({
|
|
|
40362
40459
|
e.preventDefault();
|
|
40363
40460
|
lift(ticket.id);
|
|
40364
40461
|
};
|
|
40365
|
-
|
|
40462
|
+
useEffect69(() => {
|
|
40366
40463
|
const element = ref.current;
|
|
40367
40464
|
if (!element || dragDisabled) return;
|
|
40368
40465
|
const identity = { type: "ticket", ticketId: ticket.id, columnId };
|
|
@@ -40531,10 +40628,10 @@ function TicketTagRow({ tags }) {
|
|
|
40531
40628
|
}
|
|
40532
40629
|
|
|
40533
40630
|
// src/components/features/board/ticket-card-skeleton.tsx
|
|
40534
|
-
import * as
|
|
40631
|
+
import * as React112 from "react";
|
|
40535
40632
|
init_cn();
|
|
40536
40633
|
import { jsx as jsx300, jsxs as jsxs230 } from "react/jsx-runtime";
|
|
40537
|
-
var TicketCardSkeleton =
|
|
40634
|
+
var TicketCardSkeleton = React112.forwardRef(
|
|
40538
40635
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxs230(
|
|
40539
40636
|
"div",
|
|
40540
40637
|
{
|
|
@@ -40585,9 +40682,9 @@ var BoardColumn = memo8(function BoardColumn2({
|
|
|
40585
40682
|
joinLeft = false,
|
|
40586
40683
|
joinRight = false
|
|
40587
40684
|
}) {
|
|
40588
|
-
const laneRef =
|
|
40589
|
-
const [isOver, setIsOver] =
|
|
40590
|
-
|
|
40685
|
+
const laneRef = useRef52(null);
|
|
40686
|
+
const [isOver, setIsOver] = useState92(false);
|
|
40687
|
+
useEffect70(() => {
|
|
40591
40688
|
const element = laneRef.current;
|
|
40592
40689
|
if (!element || collapsed || column.dropDisabled) return;
|
|
40593
40690
|
return dropTargetForElements2({
|
|
@@ -40672,19 +40769,19 @@ function ColumnBody({
|
|
|
40672
40769
|
onLoadMore,
|
|
40673
40770
|
loadMoreRootMargin
|
|
40674
40771
|
}) {
|
|
40675
|
-
const scrollRef =
|
|
40676
|
-
const sentinelRef =
|
|
40772
|
+
const scrollRef = useRef52(null);
|
|
40773
|
+
const sentinelRef = useRef52(null);
|
|
40677
40774
|
useLaneScrollAnchor(scrollRef, column.tickets);
|
|
40678
|
-
|
|
40775
|
+
useEffect70(() => {
|
|
40679
40776
|
const element = scrollRef.current;
|
|
40680
40777
|
if (!element) return;
|
|
40681
40778
|
return autoScrollColumn(element);
|
|
40682
40779
|
}, []);
|
|
40683
|
-
const loadMoreRef =
|
|
40780
|
+
const loadMoreRef = useRef52(onLoadMore);
|
|
40684
40781
|
loadMoreRef.current = onLoadMore;
|
|
40685
|
-
const columnIdRef =
|
|
40782
|
+
const columnIdRef = useRef52(column.id);
|
|
40686
40783
|
columnIdRef.current = column.id;
|
|
40687
|
-
|
|
40784
|
+
useEffect70(() => {
|
|
40688
40785
|
if (!column.hasMore || column.isLoadingMore) return;
|
|
40689
40786
|
const sentinel = sentinelRef.current;
|
|
40690
40787
|
const root = scrollRef.current;
|
|
@@ -40815,16 +40912,16 @@ function resolveBoardDrop(columns, { source, target }) {
|
|
|
40815
40912
|
}
|
|
40816
40913
|
|
|
40817
40914
|
// src/components/features/board/use-board-collapse.ts
|
|
40818
|
-
import { useCallback as useCallback36, useRef as
|
|
40915
|
+
import { useCallback as useCallback36, useRef as useRef53, useState as useState93 } from "react";
|
|
40819
40916
|
function useBoardCollapse(storageKey) {
|
|
40820
40917
|
const [persisted, setPersisted] = useLocalStorage(
|
|
40821
40918
|
storageKey ?? "__board_collapse_unused__",
|
|
40822
40919
|
{}
|
|
40823
40920
|
);
|
|
40824
|
-
const [memory, setMemory] =
|
|
40921
|
+
const [memory, setMemory] = useState93({});
|
|
40825
40922
|
const collapsed = storageKey ? persisted : memory;
|
|
40826
40923
|
const setMap = storageKey ? setPersisted : setMemory;
|
|
40827
|
-
const setMapRef =
|
|
40924
|
+
const setMapRef = useRef53(setMap);
|
|
40828
40925
|
setMapRef.current = setMap;
|
|
40829
40926
|
const toggle = useCallback36((columnId) => {
|
|
40830
40927
|
setMapRef.current((prev) => ({ ...prev, [columnId]: !prev[columnId] }));
|
|
@@ -40869,11 +40966,11 @@ function Board({
|
|
|
40869
40966
|
onThumbPointerMove,
|
|
40870
40967
|
onThumbPointerUp
|
|
40871
40968
|
} = useHorizontalScrollbar();
|
|
40872
|
-
const columnsRef =
|
|
40873
|
-
const onChangeRef =
|
|
40969
|
+
const columnsRef = useRef54(columns);
|
|
40970
|
+
const onChangeRef = useRef54(onChange);
|
|
40874
40971
|
onChangeRef.current = onChange;
|
|
40875
|
-
const boardRef =
|
|
40876
|
-
const scrollerRef =
|
|
40972
|
+
const boardRef = useRef54(null);
|
|
40973
|
+
const scrollerRef = useRef54(null);
|
|
40877
40974
|
const setScroller = useCallback37(
|
|
40878
40975
|
(node) => {
|
|
40879
40976
|
scrollerRef.current = node;
|
|
@@ -40881,18 +40978,18 @@ function Board({
|
|
|
40881
40978
|
},
|
|
40882
40979
|
[scrollRef]
|
|
40883
40980
|
);
|
|
40884
|
-
const [aim, setAim] =
|
|
40885
|
-
const [lifted, setLifted] =
|
|
40886
|
-
const [announcement, setAnnouncement] =
|
|
40887
|
-
const dragGeometry =
|
|
40888
|
-
const [landingPreview, setLandingPreview] =
|
|
40889
|
-
const previewRef =
|
|
40890
|
-
const [pendingMove, setPendingMove] =
|
|
40981
|
+
const [aim, setAim] = useState94(null);
|
|
40982
|
+
const [lifted, setLifted] = useState94(null);
|
|
40983
|
+
const [announcement, setAnnouncement] = useState94("");
|
|
40984
|
+
const dragGeometry = useRef54(null);
|
|
40985
|
+
const [landingPreview, setLandingPreview] = useState94(null);
|
|
40986
|
+
const previewRef = useRef54(null);
|
|
40987
|
+
const [pendingMove, setPendingMove] = useState94(null);
|
|
40891
40988
|
const view = useMemo41(() => pendingMove ? applyPendingMove(columns, pendingMove) : columns, [columns, pendingMove]);
|
|
40892
40989
|
columnsRef.current = view;
|
|
40893
|
-
const [landing, setLanding] =
|
|
40894
|
-
const landingTimer =
|
|
40895
|
-
const pointRef =
|
|
40990
|
+
const [landing, setLanding] = useState94(null);
|
|
40991
|
+
const landingTimer = useRef54(null);
|
|
40992
|
+
const pointRef = useRef54({ x: 0, y: 0 });
|
|
40896
40993
|
const laneLabel = useCallback37(
|
|
40897
40994
|
(columnId) => view.find((c) => c.id === columnId)?.label ?? columnId,
|
|
40898
40995
|
[view]
|
|
@@ -40946,7 +41043,7 @@ function Board({
|
|
|
40946
41043
|
},
|
|
40947
41044
|
[lifted, view, acceptsLifted, laneLabel]
|
|
40948
41045
|
);
|
|
40949
|
-
|
|
41046
|
+
useEffect71(() => {
|
|
40950
41047
|
if (!lifted) return;
|
|
40951
41048
|
const onKeyDown = (event) => {
|
|
40952
41049
|
if (event.key === "Escape") {
|
|
@@ -40964,7 +41061,7 @@ function Board({
|
|
|
40964
41061
|
window.addEventListener("keydown", onKeyDown);
|
|
40965
41062
|
return () => window.removeEventListener("keydown", onKeyDown);
|
|
40966
41063
|
}, [lifted, drop, walk]);
|
|
40967
|
-
|
|
41064
|
+
useEffect71(() => {
|
|
40968
41065
|
if (!lifted) return;
|
|
40969
41066
|
boardRef.current?.querySelector(`[${DROP_LINE_ATTRIBUTE}]`)?.scrollIntoView({ block: "nearest", inline: "nearest" });
|
|
40970
41067
|
}, [lifted]);
|
|
@@ -40975,7 +41072,7 @@ function Board({
|
|
|
40975
41072
|
const anchor = aimToChange(view, lifted.ticketId, lifted.aim) ? aimAnchor(view, lifted.ticketId, lifted.aim) : { ticketId: null, edge: null };
|
|
40976
41073
|
return { columnId: lifted.aim.columnId, ...anchor, ticket };
|
|
40977
41074
|
}, [lifted, view]);
|
|
40978
|
-
|
|
41075
|
+
useEffect71(() => {
|
|
40979
41076
|
if (!pendingMove) return;
|
|
40980
41077
|
if (hasMoveSettled(columns, pendingMove)) {
|
|
40981
41078
|
setPendingMove(null);
|
|
@@ -40984,7 +41081,7 @@ function Board({
|
|
|
40984
41081
|
const timer = setTimeout(() => setPendingMove(null), PENDING_MOVE_TIMEOUT_MS);
|
|
40985
41082
|
return () => clearTimeout(timer);
|
|
40986
41083
|
}, [columns, pendingMove]);
|
|
40987
|
-
|
|
41084
|
+
useEffect71(() => {
|
|
40988
41085
|
const scroller = scrollerRef.current;
|
|
40989
41086
|
const readAim = (source, target) => {
|
|
40990
41087
|
const ticket = source.data.ticket;
|
|
@@ -41283,11 +41380,11 @@ import {
|
|
|
41283
41380
|
createContext as createContext15,
|
|
41284
41381
|
useCallback as useCallback38,
|
|
41285
41382
|
useContext as useContext15,
|
|
41286
|
-
useEffect as
|
|
41383
|
+
useEffect as useEffect72,
|
|
41287
41384
|
useId as useId6,
|
|
41288
41385
|
useMemo as useMemo42,
|
|
41289
|
-
useRef as
|
|
41290
|
-
useState as
|
|
41386
|
+
useRef as useRef55,
|
|
41387
|
+
useState as useState95
|
|
41291
41388
|
} from "react";
|
|
41292
41389
|
import { jsx as jsx303, jsxs as jsxs233 } from "react/jsx-runtime";
|
|
41293
41390
|
var SORTABLE_ITEM_ATTRIBUTE = "data-sortable-item";
|
|
@@ -41301,16 +41398,16 @@ function useSortableListContext() {
|
|
|
41301
41398
|
return context;
|
|
41302
41399
|
}
|
|
41303
41400
|
function SortableList({ onReorder, getItemLabel, disabled = false, className, children }) {
|
|
41304
|
-
const listRef =
|
|
41401
|
+
const listRef = useRef55(null);
|
|
41305
41402
|
const dragType = useId6();
|
|
41306
|
-
const [announcement, setAnnouncement] =
|
|
41307
|
-
const onReorderRef =
|
|
41403
|
+
const [announcement, setAnnouncement] = useState95("");
|
|
41404
|
+
const onReorderRef = useRef55(onReorder);
|
|
41308
41405
|
onReorderRef.current = onReorder;
|
|
41309
|
-
const getItemLabelRef =
|
|
41406
|
+
const getItemLabelRef = useRef55(getItemLabel);
|
|
41310
41407
|
getItemLabelRef.current = getItemLabel;
|
|
41311
|
-
const flipFrom =
|
|
41312
|
-
const [flipTick, setFlipTick] =
|
|
41313
|
-
const flipTimer =
|
|
41408
|
+
const flipFrom = useRef55(null);
|
|
41409
|
+
const [flipTick, setFlipTick] = useState95(0);
|
|
41410
|
+
const flipTimer = useRef55(null);
|
|
41314
41411
|
const readItems = useCallback38(
|
|
41315
41412
|
() => [...listRef.current?.querySelectorAll(`[${SORTABLE_ITEM_ATTRIBUTE}]`) ?? []],
|
|
41316
41413
|
[]
|
|
@@ -41324,7 +41421,7 @@ function SortableList({ onReorder, getItemLabel, disabled = false, className, ch
|
|
|
41324
41421
|
},
|
|
41325
41422
|
[readItems]
|
|
41326
41423
|
);
|
|
41327
|
-
|
|
41424
|
+
useEffect72(() => {
|
|
41328
41425
|
const list = listRef.current;
|
|
41329
41426
|
if (!list) return;
|
|
41330
41427
|
let drag = null;
|
|
@@ -41413,7 +41510,7 @@ function SortableList({ onReorder, getItemLabel, disabled = false, className, ch
|
|
|
41413
41510
|
for (const item of moving) item.style.transition = "";
|
|
41414
41511
|
}, DROP_MS2);
|
|
41415
41512
|
}, [flipTick]);
|
|
41416
|
-
|
|
41513
|
+
useEffect72(
|
|
41417
41514
|
() => () => {
|
|
41418
41515
|
if (flipTimer.current) clearTimeout(flipTimer.current);
|
|
41419
41516
|
},
|
|
@@ -41433,17 +41530,17 @@ function SortableList({ onReorder, getItemLabel, disabled = false, className, ch
|
|
|
41433
41530
|
import { combine as combine5 } from "@atlaskit/pragmatic-drag-and-drop/combine";
|
|
41434
41531
|
import { draggable as draggable2 } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
|
41435
41532
|
import { disableNativeDragPreview } from "@atlaskit/pragmatic-drag-and-drop/element/disable-native-drag-preview";
|
|
41436
|
-
import { useCallback as useCallback39, useEffect as
|
|
41533
|
+
import { useCallback as useCallback39, useEffect as useEffect73, useState as useState96 } from "react";
|
|
41437
41534
|
function useSortableItem() {
|
|
41438
41535
|
const { dragType, disabled, reorder, readItems } = useSortableListContext();
|
|
41439
|
-
const [item, setItem] =
|
|
41440
|
-
const [handle, setHandle] =
|
|
41441
|
-
const [isDragging, setIsDragging] =
|
|
41536
|
+
const [item, setItem] = useState96(null);
|
|
41537
|
+
const [handle, setHandle] = useState96(null);
|
|
41538
|
+
const [isDragging, setIsDragging] = useState96(false);
|
|
41442
41539
|
const itemRef = useCallback39((node) => {
|
|
41443
41540
|
node?.setAttribute(SORTABLE_ITEM_ATTRIBUTE, "");
|
|
41444
41541
|
setItem(node);
|
|
41445
41542
|
}, []);
|
|
41446
|
-
|
|
41543
|
+
useEffect73(() => {
|
|
41447
41544
|
if (!item || !handle || disabled) return;
|
|
41448
41545
|
return combine5(
|
|
41449
41546
|
// The drag has to start as a "move", or its first frame is drawn with the
|
|
@@ -41494,7 +41591,7 @@ import {
|
|
|
41494
41591
|
verticalListSortingStrategy
|
|
41495
41592
|
} from "@dnd-kit/sortable";
|
|
41496
41593
|
import { CSS } from "@dnd-kit/utilities";
|
|
41497
|
-
import * as
|
|
41594
|
+
import * as React113 from "react";
|
|
41498
41595
|
import { jsx as jsx304 } from "react/jsx-runtime";
|
|
41499
41596
|
function TicketStatusConfigList({
|
|
41500
41597
|
items,
|
|
@@ -41514,7 +41611,7 @@ function TicketStatusConfigList({
|
|
|
41514
41611
|
if (oldIndex === -1 || newIndex === -1) return;
|
|
41515
41612
|
onReorder(oldIndex, newIndex);
|
|
41516
41613
|
};
|
|
41517
|
-
const sortableIds =
|
|
41614
|
+
const sortableIds = React113.useMemo(() => items.map((i) => i.id), [items]);
|
|
41518
41615
|
return /* @__PURE__ */ jsx304(DndContext, { sensors, collisionDetection: closestCenter, onDragEnd: handleDragEnd, children: /* @__PURE__ */ jsx304(SortableContext, { items: sortableIds, strategy: verticalListSortingStrategy, children: /* @__PURE__ */ jsx304("div", { className: cn("flex w-full flex-col gap-[var(--spacing-system-xs)]", className), children: items.map((item) => /* @__PURE__ */ jsx304(SortableRow, { id: item.id, children: (args) => renderRow(item, args) }, item.id)) }) }) });
|
|
41519
41616
|
}
|
|
41520
41617
|
function SortableRow({
|
|
@@ -41539,7 +41636,7 @@ function SortableRow({
|
|
|
41539
41636
|
|
|
41540
41637
|
// src/components/navigation/header.tsx
|
|
41541
41638
|
init_next_link();
|
|
41542
|
-
import
|
|
41639
|
+
import React116, { useEffect as useEffect75, useRef as useRef57, useState as useState98 } from "react";
|
|
41543
41640
|
init_button2();
|
|
41544
41641
|
|
|
41545
41642
|
// src/components/navigation/mingo-ai-button.tsx
|
|
@@ -41593,14 +41690,14 @@ function MingoAiButton({ source, icon, label = "Mingo AI", className, onClick, .
|
|
|
41593
41690
|
}
|
|
41594
41691
|
|
|
41595
41692
|
// src/components/navigation/mobile-nav-panel.tsx
|
|
41596
|
-
import { useRef as
|
|
41693
|
+
import { useRef as useRef56 } from "react";
|
|
41597
41694
|
import { usePreventScroll as usePreventScroll2 } from "@react-aria/overlays";
|
|
41598
41695
|
init_button2();
|
|
41599
41696
|
import { X as X10 } from "lucide-react";
|
|
41600
41697
|
import { Fragment as Fragment57, jsx as jsx306, jsxs as jsxs235 } from "react/jsx-runtime";
|
|
41601
41698
|
var MOBILE_NAV_PANEL_ID = "mobile-nav-panel";
|
|
41602
41699
|
function MobileNavPanel({ isOpen, config }) {
|
|
41603
|
-
const panelRef =
|
|
41700
|
+
const panelRef = useRef56(null);
|
|
41604
41701
|
usePreventScroll2({ isDisabled: !isOpen });
|
|
41605
41702
|
useFocusTrap(panelRef, isOpen, { onEscape: config.onClose });
|
|
41606
41703
|
const headerHeight = useHeaderHeight(64, { enabled: isOpen });
|
|
@@ -41716,11 +41813,11 @@ function MobileNavPanel({ isOpen, config }) {
|
|
|
41716
41813
|
init_cn();
|
|
41717
41814
|
|
|
41718
41815
|
// src/components/tickets/ticket-live-provider.tsx
|
|
41719
|
-
import
|
|
41816
|
+
import React115 from "react";
|
|
41720
41817
|
import { useQueryClient } from "@tanstack/react-query";
|
|
41721
41818
|
|
|
41722
41819
|
// src/components/chat/hooks/use-chat-identity.ts
|
|
41723
|
-
import { createContext as createContext16, createElement as createElement2, useContext as useContext16, useEffect as
|
|
41820
|
+
import { createContext as createContext16, createElement as createElement2, useContext as useContext16, useEffect as useEffect74, useState as useState97 } from "react";
|
|
41724
41821
|
var ANON_DEFAULTS = {
|
|
41725
41822
|
authTier: "anon",
|
|
41726
41823
|
source: null,
|
|
@@ -41731,9 +41828,9 @@ function useResolveChatIdentity(enabled) {
|
|
|
41731
41828
|
const runtime = useRequiredChatRuntime();
|
|
41732
41829
|
const url = runtime.endpoints.identityUrl;
|
|
41733
41830
|
const proxyEmail = getEmbedProxyAuth()?.email ?? null;
|
|
41734
|
-
const [data, setData] =
|
|
41735
|
-
const [isLoading, setIsLoading] =
|
|
41736
|
-
|
|
41831
|
+
const [data, setData] = useState97(ANON_DEFAULTS);
|
|
41832
|
+
const [isLoading, setIsLoading] = useState97(enabled);
|
|
41833
|
+
useEffect74(() => {
|
|
41737
41834
|
if (!enabled) return;
|
|
41738
41835
|
let cancelled = false;
|
|
41739
41836
|
const ctrl = new AbortController();
|
|
@@ -41785,12 +41882,12 @@ var stampMs = (stamp) => {
|
|
|
41785
41882
|
return Number.isNaN(ms) ? 0 : ms;
|
|
41786
41883
|
};
|
|
41787
41884
|
var INVALIDATE_DEBOUNCE_MS = 1500;
|
|
41788
|
-
var TicketLiveContext =
|
|
41885
|
+
var TicketLiveContext = React115.createContext(null);
|
|
41789
41886
|
function useOptionalTicketLive() {
|
|
41790
|
-
return
|
|
41887
|
+
return React115.useContext(TicketLiveContext);
|
|
41791
41888
|
}
|
|
41792
41889
|
function useTicketLive() {
|
|
41793
|
-
const ctx =
|
|
41890
|
+
const ctx = React115.useContext(TicketLiveContext);
|
|
41794
41891
|
if (!ctx) {
|
|
41795
41892
|
throw new Error("useTicketLive must be used within <TicketLiveProvider>");
|
|
41796
41893
|
}
|
|
@@ -41809,13 +41906,13 @@ function TicketLiveProvider({ children }) {
|
|
|
41809
41906
|
const streamUrl = runtime?.endpoints.ticketStreamUrl ?? TICKET_STREAM_ENDPOINT;
|
|
41810
41907
|
const readUrl = runtime?.endpoints.ticketReadUrl ?? TICKET_READ_ENDPOINT;
|
|
41811
41908
|
const authed = identity.authTier !== "anon" && !!identity.user?.email;
|
|
41812
|
-
const [connected, setConnected] =
|
|
41813
|
-
const [summary, setSummary] =
|
|
41814
|
-
const [openTicketIdState, setOpenTicketIdState] =
|
|
41815
|
-
const openTicketIdRef =
|
|
41816
|
-
const pendingTicketIdsRef =
|
|
41817
|
-
const invalidateTimerRef =
|
|
41818
|
-
const flushInvalidations =
|
|
41909
|
+
const [connected, setConnected] = React115.useState(false);
|
|
41910
|
+
const [summary, setSummary] = React115.useState(EMPTY_SUMMARY);
|
|
41911
|
+
const [openTicketIdState, setOpenTicketIdState] = React115.useState(null);
|
|
41912
|
+
const openTicketIdRef = React115.useRef(null);
|
|
41913
|
+
const pendingTicketIdsRef = React115.useRef(/* @__PURE__ */ new Set());
|
|
41914
|
+
const invalidateTimerRef = React115.useRef(null);
|
|
41915
|
+
const flushInvalidations = React115.useCallback(() => {
|
|
41819
41916
|
invalidateTimerRef.current = null;
|
|
41820
41917
|
const ids = Array.from(pendingTicketIdsRef.current);
|
|
41821
41918
|
pendingTicketIdsRef.current.clear();
|
|
@@ -41824,7 +41921,7 @@ function TicketLiveProvider({ children }) {
|
|
|
41824
41921
|
void queryClient.invalidateQueries({ queryKey: ["ticket-engagements", id] });
|
|
41825
41922
|
}
|
|
41826
41923
|
}, [queryClient]);
|
|
41827
|
-
const scheduleInvalidation =
|
|
41924
|
+
const scheduleInvalidation = React115.useCallback(
|
|
41828
41925
|
(ticketId) => {
|
|
41829
41926
|
if (ticketId) pendingTicketIdsRef.current.add(ticketId);
|
|
41830
41927
|
if (invalidateTimerRef.current) return;
|
|
@@ -41832,7 +41929,7 @@ function TicketLiveProvider({ children }) {
|
|
|
41832
41929
|
},
|
|
41833
41930
|
[flushInvalidations]
|
|
41834
41931
|
);
|
|
41835
|
-
const bumpUnread =
|
|
41932
|
+
const bumpUnread = React115.useCallback((ticketId, createdAt) => {
|
|
41836
41933
|
setSummary((prev) => {
|
|
41837
41934
|
const stamp = createdAt ?? (/* @__PURE__ */ new Date()).toISOString();
|
|
41838
41935
|
const existing = prev.latestUnreadAt[ticketId];
|
|
@@ -41846,7 +41943,7 @@ function TicketLiveProvider({ children }) {
|
|
|
41846
41943
|
};
|
|
41847
41944
|
});
|
|
41848
41945
|
}, []);
|
|
41849
|
-
const zeroUnread =
|
|
41946
|
+
const zeroUnread = React115.useCallback((ticketId) => {
|
|
41850
41947
|
setSummary((prev) => {
|
|
41851
41948
|
const current = prev.tickets[ticketId] ?? 0;
|
|
41852
41949
|
if (current === 0) return prev;
|
|
@@ -41857,9 +41954,9 @@ function TicketLiveProvider({ children }) {
|
|
|
41857
41954
|
return { totalUnread: Math.max(0, prev.totalUnread - current), tickets, latestUnreadAt };
|
|
41858
41955
|
});
|
|
41859
41956
|
}, []);
|
|
41860
|
-
const subscriptionRef =
|
|
41861
|
-
const noStreamRef =
|
|
41862
|
-
const handlersRef =
|
|
41957
|
+
const subscriptionRef = React115.useRef(null);
|
|
41958
|
+
const noStreamRef = React115.useRef(false);
|
|
41959
|
+
const handlersRef = React115.useRef({ onEvent: () => {
|
|
41863
41960
|
}, onStatus: () => {
|
|
41864
41961
|
}, onConnected: () => {
|
|
41865
41962
|
} });
|
|
@@ -41912,7 +42009,7 @@ function TicketLiveProvider({ children }) {
|
|
|
41912
42009
|
if (status === "no-stream") noStreamRef.current = true;
|
|
41913
42010
|
};
|
|
41914
42011
|
const streamEnabled = authed && !!streamUrl;
|
|
41915
|
-
|
|
42012
|
+
React115.useEffect(() => {
|
|
41916
42013
|
if (!streamEnabled) return;
|
|
41917
42014
|
if (typeof window === "undefined") return;
|
|
41918
42015
|
subscriptionRef.current = createSseSubscription({
|
|
@@ -41943,7 +42040,7 @@ function TicketLiveProvider({ children }) {
|
|
|
41943
42040
|
setSummary(EMPTY_SUMMARY);
|
|
41944
42041
|
};
|
|
41945
42042
|
}, [streamEnabled, streamUrl]);
|
|
41946
|
-
const markRead =
|
|
42043
|
+
const markRead = React115.useCallback(
|
|
41947
42044
|
async (ticketExternalId) => {
|
|
41948
42045
|
try {
|
|
41949
42046
|
const response = await embedAuthedFetch(readUrl, {
|
|
@@ -41965,15 +42062,15 @@ function TicketLiveProvider({ children }) {
|
|
|
41965
42062
|
},
|
|
41966
42063
|
[readUrl, zeroUnread]
|
|
41967
42064
|
);
|
|
41968
|
-
const setOpenTicketId =
|
|
42065
|
+
const setOpenTicketId = React115.useCallback((ticketExternalId) => {
|
|
41969
42066
|
openTicketIdRef.current = ticketExternalId;
|
|
41970
42067
|
setOpenTicketIdState(ticketExternalId);
|
|
41971
42068
|
}, []);
|
|
41972
|
-
const notifyTicketCreated =
|
|
42069
|
+
const notifyTicketCreated = React115.useCallback(() => {
|
|
41973
42070
|
noStreamRef.current = false;
|
|
41974
42071
|
subscriptionRef.current?.reconnectNow();
|
|
41975
42072
|
}, []);
|
|
41976
|
-
const value =
|
|
42073
|
+
const value = React115.useMemo(() => {
|
|
41977
42074
|
let unreadByTicket = summary.tickets;
|
|
41978
42075
|
let unreadTotal = summary.totalUnread;
|
|
41979
42076
|
if (openTicketIdState && unreadByTicket[openTicketIdState]) {
|
|
@@ -42143,12 +42240,12 @@ function TopNavigation({
|
|
|
42143
42240
|
import { Fragment as Fragment58, jsx as jsx310, jsxs as jsxs238 } from "react/jsx-runtime";
|
|
42144
42241
|
var NAV_ITEM_CLASSES = "text-h6 [&_svg]:h-6 [&_svg]:w-6";
|
|
42145
42242
|
function Header2({ config, platform }) {
|
|
42146
|
-
const [show, setShow] =
|
|
42147
|
-
const [lastScrollY, setLastScrollY] =
|
|
42148
|
-
const [openDropdowns, setOpenDropdowns] =
|
|
42149
|
-
const dropdownRefs =
|
|
42150
|
-
const triggerRefs =
|
|
42151
|
-
|
|
42243
|
+
const [show, setShow] = useState98(true);
|
|
42244
|
+
const [lastScrollY, setLastScrollY] = useState98(0);
|
|
42245
|
+
const [openDropdowns, setOpenDropdowns] = useState98({});
|
|
42246
|
+
const dropdownRefs = useRef57({});
|
|
42247
|
+
const triggerRefs = useRef57({});
|
|
42248
|
+
useEffect75(() => {
|
|
42152
42249
|
const handleClickOutside = (event) => {
|
|
42153
42250
|
const target = event.target;
|
|
42154
42251
|
if (!target) return;
|
|
@@ -42177,14 +42274,14 @@ function Header2({ config, platform }) {
|
|
|
42177
42274
|
document.removeEventListener("keydown", handleEscapeKey);
|
|
42178
42275
|
};
|
|
42179
42276
|
}, [openDropdowns]);
|
|
42180
|
-
|
|
42277
|
+
useEffect75(() => {
|
|
42181
42278
|
return () => {
|
|
42182
42279
|
setOpenDropdowns({});
|
|
42183
42280
|
dropdownRefs.current = {};
|
|
42184
42281
|
triggerRefs.current = {};
|
|
42185
42282
|
};
|
|
42186
42283
|
}, []);
|
|
42187
|
-
|
|
42284
|
+
useEffect75(() => {
|
|
42188
42285
|
if (!config.autoHide) {
|
|
42189
42286
|
setShow(true);
|
|
42190
42287
|
return;
|
|
@@ -42209,7 +42306,7 @@ function Header2({ config, platform }) {
|
|
|
42209
42306
|
}, [config.autoHide]);
|
|
42210
42307
|
const renderNavigationItem = (item) => {
|
|
42211
42308
|
if (item.element) {
|
|
42212
|
-
return /* @__PURE__ */ jsx310(
|
|
42309
|
+
return /* @__PURE__ */ jsx310(React116.Fragment, { children: item.element }, item.id);
|
|
42213
42310
|
}
|
|
42214
42311
|
if (item.children && item.children.length > 0) {
|
|
42215
42312
|
const isOpen = openDropdowns[item.id] || false;
|
|
@@ -42438,7 +42535,7 @@ function Header2({ config, platform }) {
|
|
|
42438
42535
|
}
|
|
42439
42536
|
|
|
42440
42537
|
// src/components/navigation/client-only-header.tsx
|
|
42441
|
-
import { useState as
|
|
42538
|
+
import { useState as useState99, useEffect as useEffect76 } from "react";
|
|
42442
42539
|
|
|
42443
42540
|
// src/components/navigation/header-skeleton.tsx
|
|
42444
42541
|
import { Fragment as Fragment59, jsx as jsx311, jsxs as jsxs239 } from "react/jsx-runtime";
|
|
@@ -42477,8 +42574,8 @@ function HeaderSkeleton({ config }) {
|
|
|
42477
42574
|
// src/components/navigation/client-only-header.tsx
|
|
42478
42575
|
import { jsx as jsx312 } from "react/jsx-runtime";
|
|
42479
42576
|
function ClientOnlyHeader({ config, skeleton }) {
|
|
42480
|
-
const [isClient, setIsClient] =
|
|
42481
|
-
|
|
42577
|
+
const [isClient, setIsClient] = useState99(false);
|
|
42578
|
+
useEffect76(() => {
|
|
42482
42579
|
setIsClient(true);
|
|
42483
42580
|
}, []);
|
|
42484
42581
|
if (!isClient) {
|
|
@@ -42488,20 +42585,20 @@ function ClientOnlyHeader({ config, skeleton }) {
|
|
|
42488
42585
|
}
|
|
42489
42586
|
|
|
42490
42587
|
// src/components/navigation/sliding-sidebar.tsx
|
|
42491
|
-
import { useState as
|
|
42588
|
+
import { useState as useState100, useEffect as useEffect77, useRef as useRef58 } from "react";
|
|
42492
42589
|
import { motion as motion2, AnimatePresence, useReducedMotion } from "framer-motion";
|
|
42493
42590
|
import { usePreventScroll as usePreventScroll3 } from "@react-aria/overlays";
|
|
42494
42591
|
init_button2();
|
|
42495
42592
|
import { Fragment as Fragment60, jsx as jsx313, jsxs as jsxs240 } from "react/jsx-runtime";
|
|
42496
42593
|
function SlidingSidebar({ config }) {
|
|
42497
|
-
const [expandedItems, setExpandedItems] =
|
|
42498
|
-
const [mounted, setMounted] =
|
|
42594
|
+
const [expandedItems, setExpandedItems] = useState100(/* @__PURE__ */ new Set());
|
|
42595
|
+
const [mounted, setMounted] = useState100(false);
|
|
42499
42596
|
const headerHeight = useHeaderHeight();
|
|
42500
|
-
const asideRef =
|
|
42597
|
+
const asideRef = useRef58(null);
|
|
42501
42598
|
const prefersReducedMotion2 = useReducedMotion();
|
|
42502
42599
|
usePreventScroll3({ isDisabled: !config.isOpen });
|
|
42503
42600
|
useFocusTrap(asideRef, config.isOpen, { onEscape: config.onClose, contain: false });
|
|
42504
|
-
|
|
42601
|
+
useEffect77(() => {
|
|
42505
42602
|
setMounted(true);
|
|
42506
42603
|
}, []);
|
|
42507
42604
|
const toggleExpanded = (itemId) => {
|
|
@@ -42669,7 +42766,7 @@ function SlidingSidebar({ config }) {
|
|
|
42669
42766
|
}
|
|
42670
42767
|
|
|
42671
42768
|
// src/components/navigation/sticky-section-nav.tsx
|
|
42672
|
-
import { useEffect as
|
|
42769
|
+
import { useEffect as useEffect78, useState as useState101, useCallback as useCallback40, useRef as useRef59 } from "react";
|
|
42673
42770
|
import { jsx as jsx314, jsxs as jsxs241 } from "react/jsx-runtime";
|
|
42674
42771
|
function StickySectionNav({
|
|
42675
42772
|
sections,
|
|
@@ -42730,8 +42827,8 @@ function StickySectionNav({
|
|
|
42730
42827
|
] });
|
|
42731
42828
|
}
|
|
42732
42829
|
function useSectionNavigation(sections, options) {
|
|
42733
|
-
const [activeSection, setActiveSection] =
|
|
42734
|
-
const isScrollingFromClick =
|
|
42830
|
+
const [activeSection, setActiveSection] = useState101(sections[0]?.id || "");
|
|
42831
|
+
const isScrollingFromClick = useRef59(false);
|
|
42735
42832
|
const { offset: offset2 = 100 } = options || {};
|
|
42736
42833
|
const handleSectionClick = useCallback40((sectionId) => {
|
|
42737
42834
|
const targetElement = document.getElementById(sectionId);
|
|
@@ -42743,14 +42840,14 @@ function useSectionNavigation(sections, options) {
|
|
|
42743
42840
|
isScrollingFromClick.current = false;
|
|
42744
42841
|
}, 500);
|
|
42745
42842
|
}, [offset2]);
|
|
42746
|
-
|
|
42843
|
+
useEffect78(() => {
|
|
42747
42844
|
sections.forEach((section) => {
|
|
42748
42845
|
if (section.ref.current && !section.ref.current.id) {
|
|
42749
42846
|
section.ref.current.id = section.id;
|
|
42750
42847
|
}
|
|
42751
42848
|
});
|
|
42752
42849
|
}, [sections]);
|
|
42753
|
-
|
|
42850
|
+
useEffect78(() => {
|
|
42754
42851
|
const handleScroll = () => {
|
|
42755
42852
|
if (isScrollingFromClick.current) return;
|
|
42756
42853
|
const scrollPosition = window.scrollY + offset2 + 50;
|
|
@@ -42783,7 +42880,7 @@ function useSectionNavigation(sections, options) {
|
|
|
42783
42880
|
}
|
|
42784
42881
|
|
|
42785
42882
|
// src/components/navigation/navigation-sidebar.tsx
|
|
42786
|
-
import { useCallback as useCallback41, useEffect as
|
|
42883
|
+
import { useCallback as useCallback41, useEffect as useEffect79, useMemo as useMemo44, useState as useState102 } from "react";
|
|
42787
42884
|
|
|
42788
42885
|
// src/components/navigation/navigation-sidebar-header.tsx
|
|
42789
42886
|
import { jsx as jsx315, jsxs as jsxs242 } from "react/jsx-runtime";
|
|
@@ -42954,14 +43051,14 @@ function NavigationSidebar({ config, disabled = false }) {
|
|
|
42954
43051
|
STORAGE_KEY,
|
|
42955
43052
|
config.minimized ?? false
|
|
42956
43053
|
);
|
|
42957
|
-
const [tabletMinimized, setTabletMinimized] =
|
|
42958
|
-
|
|
43054
|
+
const [tabletMinimized, setTabletMinimized] = useState102(true);
|
|
43055
|
+
useEffect79(() => {
|
|
42959
43056
|
if (isTablet) setTabletMinimized(true);
|
|
42960
43057
|
}, [isTablet]);
|
|
42961
|
-
const [hydrated, setHydrated] =
|
|
42962
|
-
|
|
43058
|
+
const [hydrated, setHydrated] = useState102(false);
|
|
43059
|
+
useEffect79(() => setHydrated(true), []);
|
|
42963
43060
|
const minimized = hydrated ? isTablet ? tabletMinimized : desktopMinimized : config.minimized ?? false;
|
|
42964
|
-
const [transitionsEnabled, setTransitionsEnabled] =
|
|
43061
|
+
const [transitionsEnabled, setTransitionsEnabled] = useState102(false);
|
|
42965
43062
|
const isOverlayOpen = isTablet && !minimized;
|
|
42966
43063
|
const showLabel = !minimized;
|
|
42967
43064
|
const handleToggle = useCallback41(() => {
|
|
@@ -42975,7 +43072,7 @@ function NavigationSidebar({ config, disabled = false }) {
|
|
|
42975
43072
|
const closeOverlay = useCallback41(() => {
|
|
42976
43073
|
setTabletMinimized(true);
|
|
42977
43074
|
}, []);
|
|
42978
|
-
|
|
43075
|
+
useEffect79(() => {
|
|
42979
43076
|
if (!isOverlayOpen) return;
|
|
42980
43077
|
const handleKeyDown = (e) => {
|
|
42981
43078
|
if (e.key === "Escape") closeOverlay();
|
|
@@ -42983,12 +43080,12 @@ function NavigationSidebar({ config, disabled = false }) {
|
|
|
42983
43080
|
document.addEventListener("keydown", handleKeyDown);
|
|
42984
43081
|
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
42985
43082
|
}, [isOverlayOpen, closeOverlay]);
|
|
42986
|
-
const [pendingItemId, setPendingItemId] =
|
|
43083
|
+
const [pendingItemId, setPendingItemId] = useState102(null);
|
|
42987
43084
|
const committedActiveId = useMemo44(
|
|
42988
43085
|
() => config.items.find((item) => item.isActive)?.id ?? null,
|
|
42989
43086
|
[config.items]
|
|
42990
43087
|
);
|
|
42991
|
-
|
|
43088
|
+
useEffect79(() => {
|
|
42992
43089
|
setPendingItemId(null);
|
|
42993
43090
|
}, [committedActiveId]);
|
|
42994
43091
|
const handleItemClick = useCallback41((item, event) => {
|
|
@@ -43112,12 +43209,12 @@ function NavigationSidebar({ config, disabled = false }) {
|
|
|
43112
43209
|
}
|
|
43113
43210
|
|
|
43114
43211
|
// src/components/navigation/app-header.tsx
|
|
43115
|
-
import
|
|
43212
|
+
import React120 from "react";
|
|
43116
43213
|
init_cn();
|
|
43117
43214
|
|
|
43118
43215
|
// src/components/navigation/header-global-search.tsx
|
|
43119
43216
|
init_cn();
|
|
43120
|
-
import
|
|
43217
|
+
import React119 from "react";
|
|
43121
43218
|
import { jsx as jsx319, jsxs as jsxs246 } from "react/jsx-runtime";
|
|
43122
43219
|
function HeaderGlobalSearch({
|
|
43123
43220
|
value = "",
|
|
@@ -43126,7 +43223,7 @@ function HeaderGlobalSearch({
|
|
|
43126
43223
|
placeholder = "Global Search",
|
|
43127
43224
|
className
|
|
43128
43225
|
}) {
|
|
43129
|
-
const [internalValue, setInternalValue] =
|
|
43226
|
+
const [internalValue, setInternalValue] = React119.useState(value);
|
|
43130
43227
|
const currentValue = onChange ? value : internalValue;
|
|
43131
43228
|
const handleChange = (e) => {
|
|
43132
43229
|
const newValue = e.target.value;
|
|
@@ -43287,7 +43384,7 @@ function HeaderOrganizationFilter({
|
|
|
43287
43384
|
|
|
43288
43385
|
// src/components/navigation/app-header.tsx
|
|
43289
43386
|
import { Fragment as Fragment63, jsx as jsx322, jsxs as jsxs249 } from "react/jsx-runtime";
|
|
43290
|
-
var AppHeader =
|
|
43387
|
+
var AppHeader = React120.memo(function AppHeader2({
|
|
43291
43388
|
showSearch,
|
|
43292
43389
|
onSearch,
|
|
43293
43390
|
showOrganizations,
|
|
@@ -43569,14 +43666,14 @@ function AppHeaderSkeleton({
|
|
|
43569
43666
|
}
|
|
43570
43667
|
|
|
43571
43668
|
// src/components/navigation/app-layout.tsx
|
|
43572
|
-
import { useCallback as useCallback43, useMemo as useMemo45, useRef as
|
|
43669
|
+
import { useCallback as useCallback43, useMemo as useMemo45, useRef as useRef61, useState as useState103 } from "react";
|
|
43573
43670
|
|
|
43574
43671
|
// src/components/navigation/mobile-burger-menu.tsx
|
|
43575
|
-
import
|
|
43672
|
+
import React121, { useCallback as useCallback42, useRef as useRef60 } from "react";
|
|
43576
43673
|
import { usePreventScroll as usePreventScroll4 } from "@react-aria/overlays";
|
|
43577
43674
|
import { Fragment as Fragment64, jsx as jsx323, jsxs as jsxs250 } from "react/jsx-runtime";
|
|
43578
43675
|
var HEADER_HEIGHT = 56;
|
|
43579
|
-
var MobileBurgerMenu =
|
|
43676
|
+
var MobileBurgerMenu = React121.memo(function MobileBurgerMenu2({
|
|
43580
43677
|
isOpen,
|
|
43581
43678
|
onClose,
|
|
43582
43679
|
config,
|
|
@@ -43586,7 +43683,7 @@ var MobileBurgerMenu = React120.memo(function MobileBurgerMenu2({
|
|
|
43586
43683
|
onLogout,
|
|
43587
43684
|
disabled = false
|
|
43588
43685
|
}) {
|
|
43589
|
-
const panelRef =
|
|
43686
|
+
const panelRef = useRef60(null);
|
|
43590
43687
|
usePreventScroll4({ isDisabled: !isOpen });
|
|
43591
43688
|
useFocusTrap(panelRef, isOpen, { onEscape: onClose });
|
|
43592
43689
|
const handleItemClick = useCallback42((item) => {
|
|
@@ -43620,7 +43717,7 @@ var MobileBurgerMenu = React120.memo(function MobileBurgerMenu2({
|
|
|
43620
43717
|
),
|
|
43621
43718
|
"aria-current": isActive ? "page" : void 0,
|
|
43622
43719
|
children: [
|
|
43623
|
-
item.icon && /* @__PURE__ */ jsx323("div", { className: "flex-shrink-0 size-4 flex items-center justify-center", children:
|
|
43720
|
+
item.icon && /* @__PURE__ */ jsx323("div", { className: "flex-shrink-0 size-4 flex items-center justify-center", children: React121.cloneElement(item.icon, {
|
|
43624
43721
|
size: 16,
|
|
43625
43722
|
color: isActive && !disabled ? "var(--color-accent-primary)" : "var(--color-text-secondary)"
|
|
43626
43723
|
}) }),
|
|
@@ -43633,7 +43730,7 @@ var MobileBurgerMenu = React120.memo(function MobileBurgerMenu2({
|
|
|
43633
43730
|
item.id
|
|
43634
43731
|
);
|
|
43635
43732
|
};
|
|
43636
|
-
const renderNavigationGrid = (items) => /* @__PURE__ */ jsx323("div", { className: "grid grid-cols-2 gap-3", children: items.map((item) => /* @__PURE__ */ jsx323(
|
|
43733
|
+
const renderNavigationGrid = (items) => /* @__PURE__ */ jsx323("div", { className: "grid grid-cols-2 gap-3", children: items.map((item) => /* @__PURE__ */ jsx323(React121.Fragment, { children: renderNavigationItem(item, true) }, item.id)) });
|
|
43637
43734
|
return /* @__PURE__ */ jsxs250(Fragment64, { children: [
|
|
43638
43735
|
/* @__PURE__ */ jsx323(
|
|
43639
43736
|
"div",
|
|
@@ -43725,7 +43822,7 @@ var MobileBurgerMenu = React120.memo(function MobileBurgerMenu2({
|
|
|
43725
43822
|
),
|
|
43726
43823
|
config.topSlot?.({ minimized: false }),
|
|
43727
43824
|
/* @__PURE__ */ jsx323("nav", { "aria-label": "Primary navigation", children: renderNavigationGrid(primaryItems) }),
|
|
43728
|
-
secondaryItems.length > 0 && /* @__PURE__ */ jsx323("nav", { "aria-label": "Secondary navigation", className: "flex flex-col gap-3", children: secondaryItems.map((item) => /* @__PURE__ */ jsx323(
|
|
43825
|
+
secondaryItems.length > 0 && /* @__PURE__ */ jsx323("nav", { "aria-label": "Secondary navigation", className: "flex flex-col gap-3", children: secondaryItems.map((item) => /* @__PURE__ */ jsx323(React121.Fragment, { children: renderNavigationItem(item, false) }, item.id)) }),
|
|
43729
43826
|
onLogout && /* @__PURE__ */ jsxs250(
|
|
43730
43827
|
"button",
|
|
43731
43828
|
{
|
|
@@ -43761,11 +43858,11 @@ function AppLayout({
|
|
|
43761
43858
|
drawer,
|
|
43762
43859
|
topBar
|
|
43763
43860
|
}) {
|
|
43764
|
-
const [mobileMenuOpen, setMobileMenuOpen] =
|
|
43765
|
-
const [drawerContainer, setDrawerContainer] =
|
|
43766
|
-
const mobileMenuOpenRef =
|
|
43861
|
+
const [mobileMenuOpen, setMobileMenuOpen] = useState103(false);
|
|
43862
|
+
const [drawerContainer, setDrawerContainer] = useState103(null);
|
|
43863
|
+
const mobileMenuOpenRef = useRef61(mobileMenuOpen);
|
|
43767
43864
|
mobileMenuOpenRef.current = mobileMenuOpen;
|
|
43768
|
-
const drawerHandlesRef =
|
|
43865
|
+
const drawerHandlesRef = useRef61(/* @__PURE__ */ new Set());
|
|
43769
43866
|
const handleToggleMobileMenu = useCallback43(() => {
|
|
43770
43867
|
const opening = !mobileMenuOpenRef.current;
|
|
43771
43868
|
if (opening) {
|
|
@@ -44392,10 +44489,10 @@ ScriptArguments.displayName = "ScriptArguments";
|
|
|
44392
44489
|
|
|
44393
44490
|
// src/components/shared/onboarding/onboarding-walkthrough.tsx
|
|
44394
44491
|
init_button2();
|
|
44395
|
-
import
|
|
44492
|
+
import React123, { useRef as useRef62, useCallback as useCallback44 } from "react";
|
|
44396
44493
|
|
|
44397
44494
|
// src/components/shared/onboarding/onboarding-step-card.tsx
|
|
44398
|
-
import
|
|
44495
|
+
import React122 from "react";
|
|
44399
44496
|
init_button2();
|
|
44400
44497
|
init_cn();
|
|
44401
44498
|
import { Fragment as Fragment65, jsx as jsx333, jsxs as jsxs260 } from "react/jsx-runtime";
|
|
@@ -44408,7 +44505,7 @@ function OnboardingStepCard({
|
|
|
44408
44505
|
onSkip,
|
|
44409
44506
|
className
|
|
44410
44507
|
}) {
|
|
44411
|
-
const [isProcessing, setIsProcessing] =
|
|
44508
|
+
const [isProcessing, setIsProcessing] = React122.useState(false);
|
|
44412
44509
|
const handleAction = async (e) => {
|
|
44413
44510
|
e.stopPropagation();
|
|
44414
44511
|
setIsProcessing(true);
|
|
@@ -44516,11 +44613,11 @@ function OnboardingWalkthrough({
|
|
|
44516
44613
|
allStepsComplete,
|
|
44517
44614
|
markMultipleComplete
|
|
44518
44615
|
} = useOnboardingState(storageKey);
|
|
44519
|
-
const hasAutoMarkedRef =
|
|
44520
|
-
const autoMarkingInProgressRef =
|
|
44521
|
-
const lastCompletionStatusRef =
|
|
44522
|
-
const actionInProgressRef =
|
|
44523
|
-
|
|
44616
|
+
const hasAutoMarkedRef = useRef62(false);
|
|
44617
|
+
const autoMarkingInProgressRef = useRef62(false);
|
|
44618
|
+
const lastCompletionStatusRef = useRef62(null);
|
|
44619
|
+
const actionInProgressRef = useRef62(/* @__PURE__ */ new Set());
|
|
44620
|
+
React123.useEffect(() => {
|
|
44524
44621
|
if (isLoadingCompletion) {
|
|
44525
44622
|
hasAutoMarkedRef.current = false;
|
|
44526
44623
|
return;
|
|
@@ -44627,11 +44724,11 @@ function OnboardingWalkthrough({
|
|
|
44627
44724
|
|
|
44628
44725
|
// src/components/logs-list.tsx
|
|
44629
44726
|
init_cn();
|
|
44630
|
-
import * as
|
|
44727
|
+
import * as React125 from "react";
|
|
44631
44728
|
|
|
44632
44729
|
// src/components/log-severity-dot.tsx
|
|
44633
44730
|
init_cn();
|
|
44634
|
-
import * as
|
|
44731
|
+
import * as React124 from "react";
|
|
44635
44732
|
|
|
44636
44733
|
// src/types/logs.types.ts
|
|
44637
44734
|
var LOG_SEVERITY_COLORS = {
|
|
@@ -44651,7 +44748,7 @@ var LOG_SEVERITY_LABELS = {
|
|
|
44651
44748
|
|
|
44652
44749
|
// src/components/log-severity-dot.tsx
|
|
44653
44750
|
import { jsx as jsx335 } from "react/jsx-runtime";
|
|
44654
|
-
var LogSeverityDot =
|
|
44751
|
+
var LogSeverityDot = React124.forwardRef(({ severity, size: size2 = "md", className }, ref) => {
|
|
44655
44752
|
const sizeClasses2 = {
|
|
44656
44753
|
sm: "w-4 h-4",
|
|
44657
44754
|
md: "w-6 h-6",
|
|
@@ -44741,7 +44838,7 @@ var LogCard = ({ log, isLast, showConnector, onClick }) => {
|
|
|
44741
44838
|
)
|
|
44742
44839
|
] });
|
|
44743
44840
|
};
|
|
44744
|
-
var LogsList =
|
|
44841
|
+
var LogsList = React125.forwardRef(({
|
|
44745
44842
|
logs,
|
|
44746
44843
|
maxHeight = "400px",
|
|
44747
44844
|
showConnector = true,
|
|
@@ -44750,7 +44847,7 @@ var LogsList = React124.forwardRef(({
|
|
|
44750
44847
|
emptyMessage = "No logs to display",
|
|
44751
44848
|
className
|
|
44752
44849
|
}, ref) => {
|
|
44753
|
-
const containerRef =
|
|
44850
|
+
const containerRef = React125.useRef(null);
|
|
44754
44851
|
const isFullHeight = maxHeight === "100%";
|
|
44755
44852
|
const getContainerStyles = () => {
|
|
44756
44853
|
if (isFullHeight) return void 0;
|
|
@@ -44858,7 +44955,7 @@ function ServiceCard({ title, subtitle, icon, tag, rows, className }) {
|
|
|
44858
44955
|
] });
|
|
44859
44956
|
}
|
|
44860
44957
|
function ServiceCardRowItem({ row }) {
|
|
44861
|
-
const [revealed, setRevealed] =
|
|
44958
|
+
const [revealed, setRevealed] = useState104(false);
|
|
44862
44959
|
const { copy, copied } = useCopyToClipboard();
|
|
44863
44960
|
const { ref: valueRef, isTruncated: valueTruncated } = useIsTruncated(row.value);
|
|
44864
44961
|
const actions = useMemo46(() => ({ copy: true, open: !!row.href, reveal: !!row.isSecret, ...row.actions }), [row]);
|
|
@@ -44920,9 +45017,9 @@ function ServiceCardRowItem({ row }) {
|
|
|
44920
45017
|
|
|
44921
45018
|
// src/components/ui/slider.tsx
|
|
44922
45019
|
init_cn();
|
|
44923
|
-
import * as
|
|
45020
|
+
import * as React127 from "react";
|
|
44924
45021
|
import { jsx as jsx338 } from "react/jsx-runtime";
|
|
44925
|
-
var Slider =
|
|
45022
|
+
var Slider = React127.forwardRef(
|
|
44926
45023
|
({ className, value = [0], onValueChange, min = 0, max = 100, step = 1, ...props }, ref) => {
|
|
44927
45024
|
const handleChange = (e) => {
|
|
44928
45025
|
const newValue = [Number(e.target.value)];
|
|
@@ -45171,7 +45268,7 @@ var ListLoader = (props) => /* @__PURE__ */ jsx341(ContentLoader, { ...props, va
|
|
|
45171
45268
|
|
|
45172
45269
|
// src/components/ui/table/table.tsx
|
|
45173
45270
|
init_cn();
|
|
45174
|
-
import { useEffect as
|
|
45271
|
+
import { useEffect as useEffect81, useRef as useRef64 } from "react";
|
|
45175
45272
|
init_pagination();
|
|
45176
45273
|
init_button2();
|
|
45177
45274
|
|
|
@@ -45790,10 +45887,10 @@ function TableRow({
|
|
|
45790
45887
|
}
|
|
45791
45888
|
|
|
45792
45889
|
// src/components/ui/table/use-table-motion.ts
|
|
45793
|
-
import { useEffect as
|
|
45890
|
+
import { useEffect as useEffect80, useState as useState105 } from "react";
|
|
45794
45891
|
function useTableMotion(enabled) {
|
|
45795
|
-
const [runtime, setRuntime] =
|
|
45796
|
-
|
|
45892
|
+
const [runtime, setRuntime] = useState105(null);
|
|
45893
|
+
useEffect80(() => {
|
|
45797
45894
|
if (!enabled || runtime) return;
|
|
45798
45895
|
let active = true;
|
|
45799
45896
|
import("framer-motion").then((m) => {
|
|
@@ -45809,14 +45906,17 @@ function useTableMotion(enabled) {
|
|
|
45809
45906
|
|
|
45810
45907
|
// src/components/ui/table/table.tsx
|
|
45811
45908
|
import { Fragment as Fragment68, jsx as jsx350, jsxs as jsxs273 } from "react/jsx-runtime";
|
|
45812
|
-
function injectSyntheticColumns(columns, rowActions, renderRowActions, rowHref) {
|
|
45909
|
+
function injectSyntheticColumns(columns, rowActions, renderRowActions, rowHref, actionsColumnWidth) {
|
|
45813
45910
|
const hasActions = Boolean(rowActions?.length) || Boolean(renderRowActions);
|
|
45814
45911
|
const result = [...columns];
|
|
45815
45912
|
if (hasActions) {
|
|
45816
45913
|
const actionsColumn = {
|
|
45817
45914
|
key: "__actions__",
|
|
45818
45915
|
label: "",
|
|
45819
|
-
|
|
45916
|
+
// A caller-fixed width keeps the header and every row on ONE grid
|
|
45917
|
+
// (see `actionsColumnWidth` in types.ts); the default stays
|
|
45918
|
+
// content-sized for back-compat.
|
|
45919
|
+
width: actionsColumnWidth ?? "min-w-[100px] w-auto shrink-0 flex-none",
|
|
45820
45920
|
align: "right",
|
|
45821
45921
|
renderCell: (item) => /* @__PURE__ */ jsx350("div", { className: "flex gap-2 items-center justify-end pointer-events-auto", "data-no-row-click": true, children: renderRowActions ? renderRowActions(item) : rowActions.map((action, actionIndex) => /* @__PURE__ */ jsx350(
|
|
45822
45922
|
Button,
|
|
@@ -45893,10 +45993,11 @@ function Table({
|
|
|
45893
45993
|
infiniteScroll,
|
|
45894
45994
|
stickyHeader,
|
|
45895
45995
|
stickyHeaderOffset,
|
|
45896
|
-
animateRowReorder
|
|
45996
|
+
animateRowReorder,
|
|
45997
|
+
actionsColumnWidth
|
|
45897
45998
|
}) {
|
|
45898
45999
|
const tableMotion = useTableMotion(Boolean(animateRowReorder));
|
|
45899
|
-
const columnsWithActions = injectSyntheticColumns(columns, rowActions, renderRowActions, rowHref);
|
|
46000
|
+
const columnsWithActions = injectSyntheticColumns(columns, rowActions, renderRowActions, rowHref, actionsColumnWidth);
|
|
45900
46001
|
const getRowHref = (item) => {
|
|
45901
46002
|
if (onRowClick || !rowHref) return void 0;
|
|
45902
46003
|
return rowHref(item) ?? void 0;
|
|
@@ -45939,10 +46040,10 @@ function Table({
|
|
|
45939
46040
|
};
|
|
45940
46041
|
const allSelected = selectedRows.length > 0 && selectedRows.length === data.length;
|
|
45941
46042
|
const someSelected = selectedRows.length > 0 && selectedRows.length < data.length;
|
|
45942
|
-
const sentinelRef =
|
|
45943
|
-
const onLoadMoreRef =
|
|
46043
|
+
const sentinelRef = useRef64(null);
|
|
46044
|
+
const onLoadMoreRef = useRef64(infiniteScroll?.onLoadMore);
|
|
45944
46045
|
onLoadMoreRef.current = infiniteScroll?.onLoadMore;
|
|
45945
|
-
|
|
46046
|
+
useEffect81(() => {
|
|
45946
46047
|
if (!infiniteScroll?.hasNextPage || infiniteScroll.isFetchingNextPage) return;
|
|
45947
46048
|
const sentinel = sentinelRef.current;
|
|
45948
46049
|
if (!sentinel) return;
|
|
@@ -46161,7 +46262,7 @@ import { useMemo as useMemo47 } from "react";
|
|
|
46161
46262
|
|
|
46162
46263
|
// src/components/ui/query-report-table/query-report-table-header.tsx
|
|
46163
46264
|
init_cn();
|
|
46164
|
-
import { useRef as
|
|
46265
|
+
import { useRef as useRef65, useState as useState106, useCallback as useCallback45 } from "react";
|
|
46165
46266
|
import { jsx as jsx353, jsxs as jsxs275 } from "react/jsx-runtime";
|
|
46166
46267
|
function QueryReportTableHeader({
|
|
46167
46268
|
columns,
|
|
@@ -46190,8 +46291,8 @@ function QueryReportTableHeader({
|
|
|
46190
46291
|
);
|
|
46191
46292
|
}
|
|
46192
46293
|
function TruncatedHeaderCell({ value, width }) {
|
|
46193
|
-
const textRef =
|
|
46194
|
-
const [isTruncated, setIsTruncated] =
|
|
46294
|
+
const textRef = useRef65(null);
|
|
46295
|
+
const [isTruncated, setIsTruncated] = useState106(false);
|
|
46195
46296
|
const checkTruncation = useCallback45(() => {
|
|
46196
46297
|
const el = textRef.current;
|
|
46197
46298
|
if (el) {
|
|
@@ -46220,7 +46321,7 @@ function TruncatedHeaderCell({ value, width }) {
|
|
|
46220
46321
|
|
|
46221
46322
|
// src/components/ui/query-report-table/query-report-table-row.tsx
|
|
46222
46323
|
init_cn();
|
|
46223
|
-
import { useRef as
|
|
46324
|
+
import { useRef as useRef66, useState as useState107, useCallback as useCallback46 } from "react";
|
|
46224
46325
|
import { jsx as jsx354, jsxs as jsxs276 } from "react/jsx-runtime";
|
|
46225
46326
|
function QueryReportTableRow({
|
|
46226
46327
|
row,
|
|
@@ -46266,8 +46367,8 @@ function QueryReportTableRow({
|
|
|
46266
46367
|
);
|
|
46267
46368
|
}
|
|
46268
46369
|
function TruncatedCell({ value, className }) {
|
|
46269
|
-
const textRef =
|
|
46270
|
-
const [isTruncated, setIsTruncated] =
|
|
46370
|
+
const textRef = useRef66(null);
|
|
46371
|
+
const [isTruncated, setIsTruncated] = useState107(false);
|
|
46271
46372
|
const checkTruncation = useCallback46(() => {
|
|
46272
46373
|
const el = textRef.current;
|
|
46273
46374
|
if (el) {
|
|
@@ -46872,7 +46973,7 @@ function DataTableEmpty({ className, ...props }) {
|
|
|
46872
46973
|
// src/components/ui/data-table/data-table-row.tsx
|
|
46873
46974
|
init_next_link();
|
|
46874
46975
|
init_cn();
|
|
46875
|
-
import { memo as memo10, useCallback as useCallback48, useRef as
|
|
46976
|
+
import { memo as memo10, useCallback as useCallback48, useRef as useRef67 } from "react";
|
|
46876
46977
|
import { flexRender as flexRender2 } from "@tanstack/react-table";
|
|
46877
46978
|
|
|
46878
46979
|
// src/components/ui/data-table/data-table-skeleton.tsx
|
|
@@ -46966,7 +47067,7 @@ function DataTableRowImpl({
|
|
|
46966
47067
|
const hasSubRow = subRow != null && subRow !== false;
|
|
46967
47068
|
const isLinkMode = Boolean(href) && !onClick;
|
|
46968
47069
|
const isWholeCardLink = isLinkMode && !hasSubRow;
|
|
46969
|
-
const containerRef =
|
|
47070
|
+
const containerRef = useRef67(null);
|
|
46970
47071
|
const handleClick = useCallback48(
|
|
46971
47072
|
(e) => {
|
|
46972
47073
|
const target = e.target;
|
|
@@ -47137,7 +47238,7 @@ function DataTableBody({
|
|
|
47137
47238
|
}
|
|
47138
47239
|
|
|
47139
47240
|
// src/components/ui/data-table/data-table-infinite-footer.tsx
|
|
47140
|
-
import { useEffect as
|
|
47241
|
+
import { useEffect as useEffect82, useRef as useRef68 } from "react";
|
|
47141
47242
|
import { Fragment as Fragment72, jsx as jsx364, jsxs as jsxs284 } from "react/jsx-runtime";
|
|
47142
47243
|
function DataTableInfiniteFooter({
|
|
47143
47244
|
hasNextPage,
|
|
@@ -47146,10 +47247,10 @@ function DataTableInfiniteFooter({
|
|
|
47146
47247
|
skeletonRows = 3,
|
|
47147
47248
|
rootMargin = "200px"
|
|
47148
47249
|
}) {
|
|
47149
|
-
const sentinelRef =
|
|
47150
|
-
const onLoadMoreRef =
|
|
47250
|
+
const sentinelRef = useRef68(null);
|
|
47251
|
+
const onLoadMoreRef = useRef68(onLoadMore);
|
|
47151
47252
|
onLoadMoreRef.current = onLoadMore;
|
|
47152
|
-
|
|
47253
|
+
useEffect82(() => {
|
|
47153
47254
|
if (!hasNextPage || isFetchingNextPage) return;
|
|
47154
47255
|
const sentinel = sentinelRef.current;
|
|
47155
47256
|
if (!sentinel) return;
|
|
@@ -47277,7 +47378,7 @@ var DataTable = Object.assign(DataTableRoot, {
|
|
|
47277
47378
|
init_cn();
|
|
47278
47379
|
import * as PopoverPrimitive6 from "@radix-ui/react-popover";
|
|
47279
47380
|
import * as ScrollAreaPrimitive3 from "@radix-ui/react-scroll-area";
|
|
47280
|
-
import * as
|
|
47381
|
+
import * as React130 from "react";
|
|
47281
47382
|
import { jsx as jsx366, jsxs as jsxs286 } from "react/jsx-runtime";
|
|
47282
47383
|
var containerStyles = cn(
|
|
47283
47384
|
// Layout & spacing — matches lib Input component
|
|
@@ -47334,13 +47435,13 @@ function SearchInput({
|
|
|
47334
47435
|
limitTags = "auto",
|
|
47335
47436
|
getLimitTagsText = (more) => `+${more}`
|
|
47336
47437
|
}) {
|
|
47337
|
-
const [internalValue, setInternalValue] =
|
|
47438
|
+
const [internalValue, setInternalValue] = React130.useState(defaultValue);
|
|
47338
47439
|
const currentValue = onChange ? value ?? "" : internalValue;
|
|
47339
47440
|
const debouncedValue = useDebounce(currentValue, debounceMs);
|
|
47340
|
-
const [isOpen, setIsOpen] =
|
|
47341
|
-
const [highlightedIndex, setHighlightedIndex] =
|
|
47441
|
+
const [isOpen, setIsOpen] = React130.useState(false);
|
|
47442
|
+
const [highlightedIndex, setHighlightedIndex] = React130.useState(-1);
|
|
47342
47443
|
const keyboardPadding = useKeyboardCollisionPadding();
|
|
47343
|
-
const containerRef =
|
|
47444
|
+
const containerRef = React130.useRef(null);
|
|
47344
47445
|
const currentPlaceholder = filterChips.length > 0 ? "Add filter..." : placeholder;
|
|
47345
47446
|
const {
|
|
47346
47447
|
visibleCount: rawVisibleCount,
|
|
@@ -47357,10 +47458,10 @@ function SearchInput({
|
|
|
47357
47458
|
placeholder: filterChips.length > 0 ? "" : placeholder
|
|
47358
47459
|
});
|
|
47359
47460
|
const visibleCount = filterChips.length > 0 ? Math.max(1, rawVisibleCount) : rawVisibleCount;
|
|
47360
|
-
const hiddenTagsRef =
|
|
47361
|
-
const hiddenTagsPopupRef =
|
|
47362
|
-
const [showHiddenTags, setShowHiddenTags] =
|
|
47363
|
-
|
|
47461
|
+
const hiddenTagsRef = React130.useRef(null);
|
|
47462
|
+
const hiddenTagsPopupRef = React130.useRef(null);
|
|
47463
|
+
const [showHiddenTags, setShowHiddenTags] = React130.useState(false);
|
|
47464
|
+
React130.useEffect(() => {
|
|
47364
47465
|
if (!showHiddenTags) return;
|
|
47365
47466
|
const handleClick = (e) => {
|
|
47366
47467
|
const target = e.target;
|
|
@@ -47374,7 +47475,7 @@ function SearchInput({
|
|
|
47374
47475
|
const hiddenCount = filterChips.length - visibleCount;
|
|
47375
47476
|
const visibleChips = filterChips.slice(0, visibleCount);
|
|
47376
47477
|
const hiddenChips = filterChips.slice(visibleCount);
|
|
47377
|
-
const { flatResults, groups } =
|
|
47478
|
+
const { flatResults, groups } = React130.useMemo(() => {
|
|
47378
47479
|
if (!groupBy) return { flatResults: results, groups: null };
|
|
47379
47480
|
const grouped = /* @__PURE__ */ new Map();
|
|
47380
47481
|
for (const r of results) {
|
|
@@ -47391,7 +47492,7 @@ function SearchInput({
|
|
|
47391
47492
|
const meetsMinQuery = debouncedValue.length >= minQueryLength;
|
|
47392
47493
|
const autoShow = meetsMinQuery;
|
|
47393
47494
|
const dropdownVisible = showDropdownProp ?? (isOpen && autoShow);
|
|
47394
|
-
|
|
47495
|
+
React130.useEffect(() => {
|
|
47395
47496
|
setHighlightedIndex(-1);
|
|
47396
47497
|
}, [flatResults.length]);
|
|
47397
47498
|
const handleChange = (e) => {
|
|
@@ -47672,7 +47773,7 @@ function SearchInput({
|
|
|
47672
47773
|
|
|
47673
47774
|
// src/components/ui/filter-list.tsx
|
|
47674
47775
|
init_cn();
|
|
47675
|
-
import * as
|
|
47776
|
+
import * as React131 from "react";
|
|
47676
47777
|
import * as CheckboxPrimitive4 from "@radix-ui/react-checkbox";
|
|
47677
47778
|
import { jsx as jsx367, jsxs as jsxs287 } from "react/jsx-runtime";
|
|
47678
47779
|
function FilterListItem({
|
|
@@ -47721,7 +47822,7 @@ function FilterListItem({
|
|
|
47721
47822
|
"flex items-start gap-[var(--spacing-system-xxs)] text-h6",
|
|
47722
47823
|
selected ? "text-ods-accent" : "text-ods-text-secondary"
|
|
47723
47824
|
),
|
|
47724
|
-
children: meta.map((item, index) => /* @__PURE__ */ jsxs287(
|
|
47825
|
+
children: meta.map((item, index) => /* @__PURE__ */ jsxs287(React131.Fragment, { children: [
|
|
47725
47826
|
index > 0 && /* @__PURE__ */ jsx367("span", { "aria-hidden": "true", children: "\u2022" }),
|
|
47726
47827
|
/* @__PURE__ */ jsx367("span", { children: item })
|
|
47727
47828
|
] }, index))
|
|
@@ -47787,9 +47888,9 @@ function FilterList({
|
|
|
47787
47888
|
|
|
47788
47889
|
// src/components/ui/tag-search-input.tsx
|
|
47789
47890
|
import {
|
|
47790
|
-
useEffect as
|
|
47791
|
-
useRef as
|
|
47792
|
-
useState as
|
|
47891
|
+
useEffect as useEffect84,
|
|
47892
|
+
useRef as useRef70,
|
|
47893
|
+
useState as useState109
|
|
47793
47894
|
} from "react";
|
|
47794
47895
|
init_cn();
|
|
47795
47896
|
import { jsx as jsx368, jsxs as jsxs288 } from "react/jsx-runtime";
|
|
@@ -47823,11 +47924,11 @@ function TagSearchInput({
|
|
|
47823
47924
|
limitTags,
|
|
47824
47925
|
placeholder: currentPlaceholder
|
|
47825
47926
|
});
|
|
47826
|
-
const wrapperRef =
|
|
47827
|
-
const hiddenTagsRef =
|
|
47828
|
-
const hiddenTagsPopupRef =
|
|
47829
|
-
const [showHiddenTags, setShowHiddenTags] =
|
|
47830
|
-
|
|
47927
|
+
const wrapperRef = useRef70(null);
|
|
47928
|
+
const hiddenTagsRef = useRef70(null);
|
|
47929
|
+
const hiddenTagsPopupRef = useRef70(null);
|
|
47930
|
+
const [showHiddenTags, setShowHiddenTags] = useState109(false);
|
|
47931
|
+
useEffect84(() => {
|
|
47831
47932
|
if (!showHiddenTags) return;
|
|
47832
47933
|
const handleClick = (e) => {
|
|
47833
47934
|
const target = e.target;
|
|
@@ -47989,7 +48090,7 @@ function TagSearchInput({
|
|
|
47989
48090
|
}
|
|
47990
48091
|
|
|
47991
48092
|
// src/components/ui/markdown-editor.tsx
|
|
47992
|
-
import { useRef as
|
|
48093
|
+
import { useRef as useRef71, useCallback as useCallback49, useState as useState110, useEffect as useEffect85 } from "react";
|
|
47993
48094
|
init_cn();
|
|
47994
48095
|
import { Loader2 as Loader28, Upload as Upload8 } from "lucide-react";
|
|
47995
48096
|
import { jsx as jsx369, jsxs as jsxs289 } from "react/jsx-runtime";
|
|
@@ -48020,7 +48121,7 @@ body .w-md-editor .w-md-editor-bar::after { content: '' !important; display: blo
|
|
|
48020
48121
|
body .w-md-editor .w-md-editor-bar:hover::after { border-color: var(--color-text-secondary) !important; }
|
|
48021
48122
|
`;
|
|
48022
48123
|
function MarkdownEditorStyles() {
|
|
48023
|
-
|
|
48124
|
+
useEffect85(() => {
|
|
48024
48125
|
if (document.getElementById(MARKDOWN_EDITOR_STYLE_ID)) return;
|
|
48025
48126
|
const style = document.createElement("style");
|
|
48026
48127
|
style.id = MARKDOWN_EDITOR_STYLE_ID;
|
|
@@ -48044,11 +48145,11 @@ function MarkdownEditor({
|
|
|
48044
48145
|
onFileUploaded,
|
|
48045
48146
|
renderPreview
|
|
48046
48147
|
}) {
|
|
48047
|
-
const fileInputRef =
|
|
48048
|
-
const [isUploading, setIsUploading] =
|
|
48049
|
-
const [uploadProgress, setUploadProgress] =
|
|
48050
|
-
const [defaultExtraCommands, setDefaultExtraCommands] =
|
|
48051
|
-
|
|
48148
|
+
const fileInputRef = useRef71(null);
|
|
48149
|
+
const [isUploading, setIsUploading] = useState110(false);
|
|
48150
|
+
const [uploadProgress, setUploadProgress] = useState110("");
|
|
48151
|
+
const [defaultExtraCommands, setDefaultExtraCommands] = useState110([]);
|
|
48152
|
+
useEffect85(() => {
|
|
48052
48153
|
import("@uiw/react-md-editor").then((mod) => {
|
|
48053
48154
|
if (mod.commands?.getExtraCommands) {
|
|
48054
48155
|
setDefaultExtraCommands(mod.commands.getExtraCommands());
|
|
@@ -48137,11 +48238,11 @@ function MarkdownEditor({
|
|
|
48137
48238
|
}
|
|
48138
48239
|
} : null;
|
|
48139
48240
|
const extraCommands = uploadCommand ? [...defaultExtraCommands, uploadCommand] : defaultExtraCommands;
|
|
48140
|
-
const wrapperRef =
|
|
48141
|
-
const isDraggingRef =
|
|
48142
|
-
const mouseYRef =
|
|
48143
|
-
const rafRef =
|
|
48144
|
-
const scrollParentRef =
|
|
48241
|
+
const wrapperRef = useRef71(null);
|
|
48242
|
+
const isDraggingRef = useRef71(false);
|
|
48243
|
+
const mouseYRef = useRef71(0);
|
|
48244
|
+
const rafRef = useRef71(0);
|
|
48245
|
+
const scrollParentRef = useRef71(window);
|
|
48145
48246
|
const EDGE_ZONE = 60;
|
|
48146
48247
|
const MAX_SCROLL_SPEED = 15;
|
|
48147
48248
|
const findScrollParent = useCallback49((el) => {
|
|
@@ -48171,7 +48272,7 @@ function MarkdownEditor({
|
|
|
48171
48272
|
}
|
|
48172
48273
|
rafRef.current = requestAnimationFrame(scrollLoop);
|
|
48173
48274
|
}, []);
|
|
48174
|
-
|
|
48275
|
+
useEffect85(() => {
|
|
48175
48276
|
const wrapper = wrapperRef.current;
|
|
48176
48277
|
if (!wrapper) return;
|
|
48177
48278
|
const onMouseMove = (e) => {
|
|
@@ -48264,7 +48365,7 @@ function MarkdownEditor({
|
|
|
48264
48365
|
}
|
|
48265
48366
|
|
|
48266
48367
|
// src/components/ui/file-upload.tsx
|
|
48267
|
-
import * as
|
|
48368
|
+
import * as React133 from "react";
|
|
48268
48369
|
import { Loader2 as Loader29 } from "lucide-react";
|
|
48269
48370
|
init_cn();
|
|
48270
48371
|
import { jsx as jsx370, jsxs as jsxs290 } from "react/jsx-runtime";
|
|
@@ -48316,11 +48417,11 @@ function FileUpload({
|
|
|
48316
48417
|
acceptWindowDrops = false,
|
|
48317
48418
|
pickFiles
|
|
48318
48419
|
}) {
|
|
48319
|
-
const [dragActive, setDragActive] =
|
|
48320
|
-
const [validationError, setValidationError] =
|
|
48321
|
-
const fileInputRef =
|
|
48420
|
+
const [dragActive, setDragActive] = React133.useState(false);
|
|
48421
|
+
const [validationError, setValidationError] = React133.useState(null);
|
|
48422
|
+
const fileInputRef = React133.useRef(null);
|
|
48322
48423
|
const isManaged = managedFiles !== void 0;
|
|
48323
|
-
const files =
|
|
48424
|
+
const files = React133.useMemo(() => {
|
|
48324
48425
|
if (!value) return [];
|
|
48325
48426
|
return Array.isArray(value) ? value : [value];
|
|
48326
48427
|
}, [value]);
|
|
@@ -48368,7 +48469,7 @@ function FileUpload({
|
|
|
48368
48469
|
fileInputRef.current.value = "";
|
|
48369
48470
|
}
|
|
48370
48471
|
};
|
|
48371
|
-
const handleFilesRef =
|
|
48472
|
+
const handleFilesRef = React133.useRef(handleFiles);
|
|
48372
48473
|
handleFilesRef.current = handleFiles;
|
|
48373
48474
|
const handleDrag = (e) => {
|
|
48374
48475
|
e.preventDefault();
|
|
@@ -48389,7 +48490,7 @@ function FileUpload({
|
|
|
48389
48490
|
handleFiles(e.dataTransfer.files);
|
|
48390
48491
|
}
|
|
48391
48492
|
};
|
|
48392
|
-
|
|
48493
|
+
React133.useEffect(() => {
|
|
48393
48494
|
if (!acceptWindowDrops || disabled) return;
|
|
48394
48495
|
let dragCounter = 0;
|
|
48395
48496
|
const onWindowDragEnter = (e) => {
|
|
@@ -48590,7 +48691,7 @@ function FileUpload({
|
|
|
48590
48691
|
}
|
|
48591
48692
|
|
|
48592
48693
|
// src/components/ui/image-uploader.tsx
|
|
48593
|
-
import * as
|
|
48694
|
+
import * as React134 from "react";
|
|
48594
48695
|
import { Loader2 as Loader210 } from "lucide-react";
|
|
48595
48696
|
init_cn();
|
|
48596
48697
|
import { Fragment as Fragment74, jsx as jsx371, jsxs as jsxs291 } from "react/jsx-runtime";
|
|
@@ -48632,10 +48733,10 @@ function ImageUploader({
|
|
|
48632
48733
|
className,
|
|
48633
48734
|
dropzoneClassName
|
|
48634
48735
|
}) {
|
|
48635
|
-
const inputRef =
|
|
48636
|
-
const [dragActive, setDragActive] =
|
|
48637
|
-
const [pressed, setPressed] =
|
|
48638
|
-
const [validationError, setValidationError] =
|
|
48736
|
+
const inputRef = React134.useRef(null);
|
|
48737
|
+
const [dragActive, setDragActive] = React134.useState(false);
|
|
48738
|
+
const [pressed, setPressed] = React134.useState(false);
|
|
48739
|
+
const [validationError, setValidationError] = React134.useState(null);
|
|
48639
48740
|
const interactive = !disabled && !loading;
|
|
48640
48741
|
const resolvedValue = useAuthedImageSrc(value);
|
|
48641
48742
|
const hasImage = Boolean(value);
|
|
@@ -48801,17 +48902,17 @@ init_cn();
|
|
|
48801
48902
|
init_button2();
|
|
48802
48903
|
|
|
48803
48904
|
// src/components/ui/color-preset-select.tsx
|
|
48804
|
-
import * as
|
|
48905
|
+
import * as React136 from "react";
|
|
48805
48906
|
import { HexColorPicker } from "react-colorful";
|
|
48806
48907
|
|
|
48807
48908
|
// src/components/popover.tsx
|
|
48808
48909
|
init_cn();
|
|
48809
|
-
import * as
|
|
48910
|
+
import * as React135 from "react";
|
|
48810
48911
|
import * as PopoverPrimitive7 from "@radix-ui/react-popover";
|
|
48811
48912
|
import { jsx as jsx372 } from "react/jsx-runtime";
|
|
48812
48913
|
var Popover2 = PopoverPrimitive7.Root;
|
|
48813
48914
|
var PopoverTrigger = PopoverPrimitive7.Trigger;
|
|
48814
|
-
var PopoverContent =
|
|
48915
|
+
var PopoverContent = React135.forwardRef(({ className, align = "center", sideOffset = 4, collisionPadding, ...props }, ref) => {
|
|
48815
48916
|
const keyboardPadding = useKeyboardCollisionPadding();
|
|
48816
48917
|
return /* @__PURE__ */ jsx372(PopoverPrimitive7.Portal, { children: /* @__PURE__ */ jsx372(
|
|
48817
48918
|
PopoverPrimitive7.Content,
|
|
@@ -48912,8 +49013,8 @@ var FORMATS = ["HEX", "RGB", "HSL"];
|
|
|
48912
49013
|
var channelInputClass = "flex-1 min-w-0 [&_input]:text-center [&_input]:tabular-nums";
|
|
48913
49014
|
var hexInputClass = "flex-1 min-w-0 [&_input]:uppercase";
|
|
48914
49015
|
function HexInputs({ value, onChange }) {
|
|
48915
|
-
const [draft, setDraft] =
|
|
48916
|
-
|
|
49016
|
+
const [draft, setDraft] = React136.useState(value);
|
|
49017
|
+
React136.useEffect(() => setDraft(value), [value]);
|
|
48917
49018
|
const commit = () => {
|
|
48918
49019
|
const candidate = (draft.startsWith("#") ? draft : `#${draft}`).toLowerCase();
|
|
48919
49020
|
if (HEX_PATTERN.test(candidate)) onChange(candidate);
|
|
@@ -48945,8 +49046,8 @@ function ChannelInput({
|
|
|
48945
49046
|
ariaLabel,
|
|
48946
49047
|
onCommit
|
|
48947
49048
|
}) {
|
|
48948
|
-
const [draft, setDraft] =
|
|
48949
|
-
|
|
49049
|
+
const [draft, setDraft] = React136.useState(String(value));
|
|
49050
|
+
React136.useEffect(() => setDraft(String(value)), [value]);
|
|
48950
49051
|
const commit = () => {
|
|
48951
49052
|
const parsed = Number.parseInt(draft, 10);
|
|
48952
49053
|
if (!Number.isFinite(parsed)) {
|
|
@@ -49006,8 +49107,8 @@ function HslInputs({ value, onChange }) {
|
|
|
49006
49107
|
] });
|
|
49007
49108
|
}
|
|
49008
49109
|
function ColorPickerInput({ value, onChange, disabled, className }) {
|
|
49009
|
-
const [open, setOpen] =
|
|
49010
|
-
const [format3, setFormat] =
|
|
49110
|
+
const [open, setOpen] = React136.useState(false);
|
|
49111
|
+
const [format3, setFormat] = React136.useState("HEX");
|
|
49011
49112
|
const formatGroups = [
|
|
49012
49113
|
{
|
|
49013
49114
|
items: FORMATS.map((f) => ({
|
|
@@ -49166,7 +49267,7 @@ function TicketStatusConfigRow({
|
|
|
49166
49267
|
}
|
|
49167
49268
|
|
|
49168
49269
|
// src/components/ui/test-run.tsx
|
|
49169
|
-
import * as
|
|
49270
|
+
import * as React137 from "react";
|
|
49170
49271
|
init_cn();
|
|
49171
49272
|
import { jsx as jsx375, jsxs as jsxs294 } from "react/jsx-runtime";
|
|
49172
49273
|
function formatTestRunDuration(ms) {
|
|
@@ -49185,8 +49286,8 @@ function TestResultsSkeleton() {
|
|
|
49185
49286
|
] }) });
|
|
49186
49287
|
}
|
|
49187
49288
|
function TestResultsTable({ rows, loading }) {
|
|
49188
|
-
const columnKeys =
|
|
49189
|
-
const columns =
|
|
49289
|
+
const columnKeys = React137.useMemo(() => rows.length > 0 ? Object.keys(rows[0]) : [], [rows]);
|
|
49290
|
+
const columns = React137.useMemo(() => {
|
|
49190
49291
|
return columnKeys.map((key) => ({
|
|
49191
49292
|
id: key,
|
|
49192
49293
|
accessorFn: (row) => row[key],
|
|
@@ -49279,10 +49380,10 @@ function TestRunStatusStat({ status, className }) {
|
|
|
49279
49380
|
] });
|
|
49280
49381
|
}
|
|
49281
49382
|
function useTestRunState(campaign) {
|
|
49282
|
-
const [hasRun, setHasRun] =
|
|
49283
|
-
const [isStarting, setIsStarting] =
|
|
49284
|
-
const [durationMs, setDurationMs] =
|
|
49285
|
-
|
|
49383
|
+
const [hasRun, setHasRun] = React137.useState(false);
|
|
49384
|
+
const [isStarting, setIsStarting] = React137.useState(false);
|
|
49385
|
+
const [durationMs, setDurationMs] = React137.useState(0);
|
|
49386
|
+
React137.useEffect(() => {
|
|
49286
49387
|
if (!campaign.startedAt || !campaign.isRunning) {
|
|
49287
49388
|
if (campaign.startedAt && !campaign.isRunning) {
|
|
49288
49389
|
setDurationMs(Date.now() - campaign.startedAt.getTime());
|
|
@@ -49295,7 +49396,7 @@ function useTestRunState(campaign) {
|
|
|
49295
49396
|
}, 1e3);
|
|
49296
49397
|
return () => clearInterval(interval);
|
|
49297
49398
|
}, [campaign.startedAt, campaign.isRunning]);
|
|
49298
|
-
const run =
|
|
49399
|
+
const run = React137.useCallback(async (start) => {
|
|
49299
49400
|
setHasRun(true);
|
|
49300
49401
|
setDurationMs(0);
|
|
49301
49402
|
setIsStarting(true);
|
|
@@ -49305,11 +49406,11 @@ function useTestRunState(campaign) {
|
|
|
49305
49406
|
setIsStarting(false);
|
|
49306
49407
|
}
|
|
49307
49408
|
}, []);
|
|
49308
|
-
const stop =
|
|
49409
|
+
const stop = React137.useCallback(() => {
|
|
49309
49410
|
setIsStarting(false);
|
|
49310
49411
|
campaign.stopCampaign();
|
|
49311
49412
|
}, [campaign.stopCampaign]);
|
|
49312
|
-
const reset =
|
|
49413
|
+
const reset = React137.useCallback(() => {
|
|
49313
49414
|
setIsStarting(false);
|
|
49314
49415
|
campaign.stopCampaign();
|
|
49315
49416
|
setDurationMs(0);
|
|
@@ -49323,7 +49424,7 @@ function useTestRunState(campaign) {
|
|
|
49323
49424
|
const showTiming = hasRun && campaign.startedAt !== null && (campaign.isRunning || isFinished);
|
|
49324
49425
|
const startedLabel = showTiming && campaign.startedAt ? formatTime(campaign.startedAt) : "00:00 PM";
|
|
49325
49426
|
const durationLabel = showTiming ? formatTestRunDuration(durationMs) : "00:00:00";
|
|
49326
|
-
const displayRows =
|
|
49427
|
+
const displayRows = React137.useMemo(
|
|
49327
49428
|
() => campaign.results.map(
|
|
49328
49429
|
(row) => Object.fromEntries(Object.entries(row).map(([key, value]) => [key.replace(/_/g, " "), value]))
|
|
49329
49430
|
),
|
|
@@ -49429,16 +49530,16 @@ function TicketDetailSection({ label, children, className }) {
|
|
|
49429
49530
|
}
|
|
49430
49531
|
|
|
49431
49532
|
// src/components/ui/ticket-notes-section.tsx
|
|
49432
|
-
import * as
|
|
49533
|
+
import * as React139 from "react";
|
|
49433
49534
|
init_cn();
|
|
49434
49535
|
|
|
49435
49536
|
// src/components/ui/ticket-note-card.tsx
|
|
49436
|
-
import * as
|
|
49537
|
+
import * as React138 from "react";
|
|
49437
49538
|
init_cn();
|
|
49438
49539
|
import { Fragment as Fragment76, jsx as jsx378, jsxs as jsxs297 } from "react/jsx-runtime";
|
|
49439
49540
|
function TicketNoteCard({ note, onEdit, onDelete, className }) {
|
|
49440
|
-
const [isEditing, setIsEditing] =
|
|
49441
|
-
const [editText, setEditText] =
|
|
49541
|
+
const [isEditing, setIsEditing] = React138.useState(false);
|
|
49542
|
+
const [editText, setEditText] = React138.useState(note.text);
|
|
49442
49543
|
const handleSave = () => {
|
|
49443
49544
|
const trimmed = editText.trim();
|
|
49444
49545
|
if (!trimmed || !onEdit) return;
|
|
@@ -49561,7 +49662,7 @@ function TicketNotesSection({
|
|
|
49561
49662
|
isAddingNote,
|
|
49562
49663
|
className
|
|
49563
49664
|
}) {
|
|
49564
|
-
const [noteText, setNoteText] =
|
|
49665
|
+
const [noteText, setNoteText] = React139.useState("");
|
|
49565
49666
|
const handleSend = () => {
|
|
49566
49667
|
const trimmed = noteText.trim();
|
|
49567
49668
|
if (!trimmed || !onAddNote || isAddingNote) return;
|
|
@@ -49757,7 +49858,7 @@ function TicketInfoSection({
|
|
|
49757
49858
|
}
|
|
49758
49859
|
|
|
49759
49860
|
// src/components/ui/take-over-ticket-modal.tsx
|
|
49760
|
-
import * as
|
|
49861
|
+
import * as React140 from "react";
|
|
49761
49862
|
init_button2();
|
|
49762
49863
|
import { jsx as jsx381, jsxs as jsxs300 } from "react/jsx-runtime";
|
|
49763
49864
|
function renderTicketStatusOption(option, isSelected) {
|
|
@@ -49792,9 +49893,9 @@ function TakeOverTicketModal({
|
|
|
49792
49893
|
isPending = false,
|
|
49793
49894
|
onConfirm
|
|
49794
49895
|
}) {
|
|
49795
|
-
const [statusId, setStatusId] =
|
|
49796
|
-
const [assigneeId, setAssigneeId] =
|
|
49797
|
-
|
|
49896
|
+
const [statusId, setStatusId] = React140.useState(null);
|
|
49897
|
+
const [assigneeId, setAssigneeId] = React140.useState(null);
|
|
49898
|
+
React140.useEffect(() => {
|
|
49798
49899
|
if (!isOpen) return;
|
|
49799
49900
|
setStatusId(initialStatusId ?? null);
|
|
49800
49901
|
setAssigneeId(initialAssigneeId ?? null);
|
|
@@ -49870,7 +49971,7 @@ function TakeOverTicketModal({
|
|
|
49870
49971
|
}
|
|
49871
49972
|
|
|
49872
49973
|
// src/components/ui/reopen-ticket-modal.tsx
|
|
49873
|
-
import * as
|
|
49974
|
+
import * as React141 from "react";
|
|
49874
49975
|
init_button2();
|
|
49875
49976
|
import { jsx as jsx382, jsxs as jsxs301 } from "react/jsx-runtime";
|
|
49876
49977
|
var REASON_MAX_LENGTH = 1e3;
|
|
@@ -49886,10 +49987,10 @@ function ReopenTicketModal({
|
|
|
49886
49987
|
isPending = false,
|
|
49887
49988
|
onConfirm
|
|
49888
49989
|
}) {
|
|
49889
|
-
const [statusId, setStatusId] =
|
|
49890
|
-
const [assigneeId, setAssigneeId] =
|
|
49891
|
-
const [reason, setReason] =
|
|
49892
|
-
|
|
49990
|
+
const [statusId, setStatusId] = React141.useState(null);
|
|
49991
|
+
const [assigneeId, setAssigneeId] = React141.useState(null);
|
|
49992
|
+
const [reason, setReason] = React141.useState("");
|
|
49993
|
+
React141.useEffect(() => {
|
|
49893
49994
|
if (!isOpen) return;
|
|
49894
49995
|
setStatusId(initialStatusId ?? null);
|
|
49895
49996
|
setAssigneeId(initialAssigneeId ?? null);
|
|
@@ -49983,7 +50084,7 @@ function ReopenTicketModal({
|
|
|
49983
50084
|
|
|
49984
50085
|
// src/components/ui/reopen-ticket-request-modal.tsx
|
|
49985
50086
|
init_button2();
|
|
49986
|
-
import * as
|
|
50087
|
+
import * as React142 from "react";
|
|
49987
50088
|
import { jsx as jsx383, jsxs as jsxs302 } from "react/jsx-runtime";
|
|
49988
50089
|
var REASON_MAX_LENGTH2 = 1e3;
|
|
49989
50090
|
function ReopenTicketRequestModal({
|
|
@@ -49993,9 +50094,9 @@ function ReopenTicketRequestModal({
|
|
|
49993
50094
|
isPending = false,
|
|
49994
50095
|
onConfirm
|
|
49995
50096
|
}) {
|
|
49996
|
-
const [reason, setReason] =
|
|
49997
|
-
const [handoff, setHandoff] =
|
|
49998
|
-
|
|
50097
|
+
const [reason, setReason] = React142.useState("");
|
|
50098
|
+
const [handoff, setHandoff] = React142.useState(false);
|
|
50099
|
+
React142.useEffect(() => {
|
|
49999
50100
|
if (!isOpen) return;
|
|
50000
50101
|
setReason("");
|
|
50001
50102
|
setHandoff(false);
|
|
@@ -50083,8 +50184,8 @@ function ImageGalleryModal({
|
|
|
50083
50184
|
onClose,
|
|
50084
50185
|
initialIndex = 0
|
|
50085
50186
|
}) {
|
|
50086
|
-
const [selectedImageIndex, setSelectedImageIndex] =
|
|
50087
|
-
|
|
50187
|
+
const [selectedImageIndex, setSelectedImageIndex] = useState120(initialIndex);
|
|
50188
|
+
useEffect92(() => {
|
|
50088
50189
|
if (isOpen) {
|
|
50089
50190
|
setSelectedImageIndex(initialIndex);
|
|
50090
50191
|
}
|
|
@@ -50099,7 +50200,7 @@ function ImageGalleryModal({
|
|
|
50099
50200
|
setSelectedImageIndex(selectedImageIndex + 1);
|
|
50100
50201
|
}
|
|
50101
50202
|
};
|
|
50102
|
-
|
|
50203
|
+
useEffect92(() => {
|
|
50103
50204
|
const handleKeyPress = (event) => {
|
|
50104
50205
|
if (!isOpen) return;
|
|
50105
50206
|
switch (event.key) {
|
|
@@ -50313,7 +50414,7 @@ function RoadmapCard({
|
|
|
50313
50414
|
onVote,
|
|
50314
50415
|
isVoting = false
|
|
50315
50416
|
}) {
|
|
50316
|
-
const [showScreenshots, setShowScreenshots] =
|
|
50417
|
+
const [showScreenshots, setShowScreenshots] = useState121(false);
|
|
50317
50418
|
const logoUrl = item.icon && item.icon.startsWith("http") ? item.icon : null;
|
|
50318
50419
|
const iconSrc = logoUrl ? getProxiedImageUrl(logoUrl, { directHttps: true }) || logoUrl : null;
|
|
50319
50420
|
if (size2 === "sm") {
|
|
@@ -50515,7 +50616,7 @@ function RoadmapCard({
|
|
|
50515
50616
|
}
|
|
50516
50617
|
|
|
50517
50618
|
// src/components/chat/entity-cards/github-activity-card.tsx
|
|
50518
|
-
import
|
|
50619
|
+
import React144 from "react";
|
|
50519
50620
|
import { GitPullRequest, Eye as Eye4, ExternalLink as ExternalLink10 } from "lucide-react";
|
|
50520
50621
|
import { Fragment as Fragment80, jsx as jsx388, jsxs as jsxs306 } from "react/jsx-runtime";
|
|
50521
50622
|
function parseRepoFromUrl(url) {
|
|
@@ -50656,7 +50757,7 @@ function GitHubActivityCard({ item, variant = "compact", className, anchorProps
|
|
|
50656
50757
|
reviewState ? /* @__PURE__ */ jsx388(ReviewStateBadge, { state: reviewState }) : null,
|
|
50657
50758
|
/* @__PURE__ */ jsx388("span", { className: COMPACT_CARD_TITLE, children: primaryText })
|
|
50658
50759
|
] }),
|
|
50659
|
-
/* @__PURE__ */ jsx388("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx388("span", { className: COMPACT_CARD_META_ROW, children: metaParts.map((part, i) => /* @__PURE__ */ jsxs306(
|
|
50760
|
+
/* @__PURE__ */ jsx388("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx388("span", { className: COMPACT_CARD_META_ROW, children: metaParts.map((part, i) => /* @__PURE__ */ jsxs306(React144.Fragment, { children: [
|
|
50660
50761
|
i > 0 ? /* @__PURE__ */ jsx388("span", { className: "text-ods-text-secondary/40 shrink-0", children: "\xB7" }) : null,
|
|
50661
50762
|
/* @__PURE__ */ jsx388("span", { className: "min-w-0 truncate", children: part })
|
|
50662
50763
|
] }, i)) }) }),
|
|
@@ -50702,7 +50803,7 @@ function GitHubActivityCardSkeleton({ variant = "compact", className }) {
|
|
|
50702
50803
|
}
|
|
50703
50804
|
|
|
50704
50805
|
// src/components/chat/entity-cards/slack-message-card.tsx
|
|
50705
|
-
import
|
|
50806
|
+
import React145 from "react";
|
|
50706
50807
|
import { ExternalLink as ExternalLink11, Hash } from "lucide-react";
|
|
50707
50808
|
import { Fragment as Fragment81, jsx as jsx389, jsxs as jsxs307 } from "react/jsx-runtime";
|
|
50708
50809
|
function parseChannelFromUrl(url) {
|
|
@@ -50748,7 +50849,7 @@ function SlackMessageCard({ item, variant = "compact", className, anchorProps })
|
|
|
50748
50849
|
/* @__PURE__ */ jsxs307("span", { className: COMPACT_CARD_TEXT_COL, children: [
|
|
50749
50850
|
/* @__PURE__ */ jsx389("span", { className: COMPACT_CARD_TITLE_ROW, children: /* @__PURE__ */ jsx389("span", { className: COMPACT_CARD_TITLE, children: item.title }) }),
|
|
50750
50851
|
/* @__PURE__ */ jsx389("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx389("span", { className: COMPACT_CARD_SUMMARY, children: item.preview || COMPACT_CARD_ROW_FILLER }) }),
|
|
50751
|
-
/* @__PURE__ */ jsx389("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx389("span", { className: COMPACT_CARD_META_ROW, children: metaParts.length > 0 ? metaParts.map((part, i) => /* @__PURE__ */ jsxs307(
|
|
50852
|
+
/* @__PURE__ */ jsx389("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx389("span", { className: COMPACT_CARD_META_ROW, children: metaParts.length > 0 ? metaParts.map((part, i) => /* @__PURE__ */ jsxs307(React145.Fragment, { children: [
|
|
50752
50853
|
i > 0 ? /* @__PURE__ */ jsx389("span", { className: "text-ods-text-secondary/40 shrink-0", children: "\xB7" }) : null,
|
|
50753
50854
|
/* @__PURE__ */ jsx389("span", { className: "min-w-0 truncate", children: part })
|
|
50754
50855
|
] }, i)) : /* @__PURE__ */ jsx389("span", { className: COMPACT_CARD_SUMMARY, children: COMPACT_CARD_ROW_FILLER }) }) })
|
|
@@ -50791,7 +50892,7 @@ function SlackMessageCardSkeleton({ variant = "compact", className }) {
|
|
|
50791
50892
|
}
|
|
50792
50893
|
|
|
50793
50894
|
// src/components/chat/entity-cards/hubspot-ticket-card.tsx
|
|
50794
|
-
import
|
|
50895
|
+
import React146 from "react";
|
|
50795
50896
|
import { ExternalLink as ExternalLink12 } from "lucide-react";
|
|
50796
50897
|
import { Fragment as Fragment82, jsx as jsx390, jsxs as jsxs308 } from "react/jsx-runtime";
|
|
50797
50898
|
function formatToken(token) {
|
|
@@ -50860,7 +50961,7 @@ function HubspotTicketCard({ item, variant = "compact", className, anchorProps }
|
|
|
50860
50961
|
/* @__PURE__ */ jsx390("span", { className: "min-w-0 truncate", children: item.customerEmail })
|
|
50861
50962
|
] }) : null,
|
|
50862
50963
|
/* @__PURE__ */ jsx390("span", { className: "flex min-w-0", children: /* @__PURE__ */ jsx390("span", { className: "line-clamp-4 whitespace-pre-wrap break-words text-h6 text-ods-text-secondary", children: item.preview || /* @__PURE__ */ jsx390("span", { className: "italic text-ods-text-secondary/60", children: "No description provided." }) }) }),
|
|
50863
|
-
metaParts.length > 0 ? /* @__PURE__ */ jsx390("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx390("span", { className: COMPACT_CARD_META_ROW, children: metaParts.map((part, i) => /* @__PURE__ */ jsxs308(
|
|
50964
|
+
metaParts.length > 0 ? /* @__PURE__ */ jsx390("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx390("span", { className: COMPACT_CARD_META_ROW, children: metaParts.map((part, i) => /* @__PURE__ */ jsxs308(React146.Fragment, { children: [
|
|
50864
50965
|
i > 0 ? /* @__PURE__ */ jsx390("span", { className: "text-ods-text-secondary/40 shrink-0", children: "\xB7" }) : null,
|
|
50865
50966
|
/* @__PURE__ */ jsx390("span", { className: "min-w-0 truncate", children: part })
|
|
50866
50967
|
] }, i)) }) }) : null
|
|
@@ -50951,7 +51052,7 @@ function DataRoomDocCardSkeleton({ className }) {
|
|
|
50951
51052
|
}
|
|
50952
51053
|
|
|
50953
51054
|
// src/components/chat/entity-cards/program-card.tsx
|
|
50954
|
-
import { useState as
|
|
51055
|
+
import { useState as useState122 } from "react";
|
|
50955
51056
|
|
|
50956
51057
|
// node_modules/date-fns/toDate.mjs
|
|
50957
51058
|
function toDate2(argument) {
|
|
@@ -52588,8 +52689,8 @@ function getHosts(hosts) {
|
|
|
52588
52689
|
return [];
|
|
52589
52690
|
}
|
|
52590
52691
|
function MediaGallery({ images, title }) {
|
|
52591
|
-
const [selectedImageIndex, setSelectedImageIndex] =
|
|
52592
|
-
const [isModalOpen, setIsModalOpen] =
|
|
52692
|
+
const [selectedImageIndex, setSelectedImageIndex] = useState122(null);
|
|
52693
|
+
const [isModalOpen, setIsModalOpen] = useState122(false);
|
|
52593
52694
|
const openImageModal = (index, event) => {
|
|
52594
52695
|
if (event) event.stopPropagation();
|
|
52595
52696
|
setSelectedImageIndex(index);
|
|
@@ -52954,7 +53055,7 @@ function GenericEntityCardSkeleton({ className }) {
|
|
|
52954
53055
|
}
|
|
52955
53056
|
|
|
52956
53057
|
// src/components/chat/entity-cards/dispatch.tsx
|
|
52957
|
-
import
|
|
53058
|
+
import React148 from "react";
|
|
52958
53059
|
init_next_navigation();
|
|
52959
53060
|
|
|
52960
53061
|
// src/components/chat/hooks/use-chat-card-item.ts
|
|
@@ -54259,7 +54360,7 @@ function ChatCardLoader({
|
|
|
54259
54360
|
extras
|
|
54260
54361
|
}) {
|
|
54261
54362
|
const runtime = useRequiredChatRuntime();
|
|
54262
|
-
const resolvedChatRef =
|
|
54363
|
+
const resolvedChatRef = React148.useMemo(() => {
|
|
54263
54364
|
const cta = resolveSourceRowCTA(
|
|
54264
54365
|
{
|
|
54265
54366
|
sourceRepo: chatRef.sourceRepo,
|
|
@@ -54407,7 +54508,7 @@ function renderChatInlineEntityCard(chatRef, options = {}) {
|
|
|
54407
54508
|
}
|
|
54408
54509
|
|
|
54409
54510
|
// src/components/chat/hooks/use-chunk-catchup.ts
|
|
54410
|
-
import { useCallback as useCallback51, useRef as
|
|
54511
|
+
import { useCallback as useCallback51, useRef as useRef74 } from "react";
|
|
54411
54512
|
function makeSeqKey(messageType, chunkType, sequenceId) {
|
|
54412
54513
|
return `${messageType}:${chunkType}:${sequenceId}`;
|
|
54413
54514
|
}
|
|
@@ -54429,22 +54530,22 @@ function useChunkCatchup({
|
|
|
54429
54530
|
chatTypes = [CHAT_TYPE.CLIENT],
|
|
54430
54531
|
fetchChunks
|
|
54431
54532
|
}) {
|
|
54432
|
-
const processedSequenceKeys =
|
|
54433
|
-
const lastSequenceId =
|
|
54434
|
-
const lastSequenceIdByType =
|
|
54435
|
-
const fetchingInProgress =
|
|
54436
|
-
const lastFetchParams =
|
|
54437
|
-
const pendingCatchupRef =
|
|
54438
|
-
const chunkBuffer =
|
|
54439
|
-
const bufferUntilInitialCatchupComplete =
|
|
54440
|
-
const hasCompletedInitialCatchup =
|
|
54441
|
-
const dialogIdRef =
|
|
54533
|
+
const processedSequenceKeys = useRef74(/* @__PURE__ */ new Set());
|
|
54534
|
+
const lastSequenceId = useRef74(null);
|
|
54535
|
+
const lastSequenceIdByType = useRef74(/* @__PURE__ */ new Map());
|
|
54536
|
+
const fetchingInProgress = useRef74(false);
|
|
54537
|
+
const lastFetchParams = useRef74(null);
|
|
54538
|
+
const pendingCatchupRef = useRef74(null);
|
|
54539
|
+
const chunkBuffer = useRef74([]);
|
|
54540
|
+
const bufferUntilInitialCatchupComplete = useRef74(false);
|
|
54541
|
+
const hasCompletedInitialCatchup = useRef74(false);
|
|
54542
|
+
const dialogIdRef = useRef74(dialogId);
|
|
54442
54543
|
dialogIdRef.current = dialogId;
|
|
54443
|
-
const chatTypesRef =
|
|
54544
|
+
const chatTypesRef = useRef74(chatTypes);
|
|
54444
54545
|
chatTypesRef.current = chatTypes;
|
|
54445
|
-
const fetchChunksRef =
|
|
54546
|
+
const fetchChunksRef = useRef74(fetchChunks);
|
|
54446
54547
|
fetchChunksRef.current = fetchChunks;
|
|
54447
|
-
const onChunkReceivedRef =
|
|
54548
|
+
const onChunkReceivedRef = useRef74(onChunkReceived);
|
|
54448
54549
|
onChunkReceivedRef.current = onChunkReceived;
|
|
54449
54550
|
const processChunk = useCallback51((chunk, messageType, forceProcess = false) => {
|
|
54450
54551
|
if (bufferUntilInitialCatchupComplete.current && !forceProcess) {
|
|
@@ -54642,7 +54743,7 @@ function useChunkCatchup({
|
|
|
54642
54743
|
}
|
|
54643
54744
|
}
|
|
54644
54745
|
}, [flushBufferedRealtimeChunks]);
|
|
54645
|
-
const catchUpChunksRef =
|
|
54746
|
+
const catchUpChunksRef = useRef74(null);
|
|
54646
54747
|
catchUpChunksRef.current = catchUpChunks;
|
|
54647
54748
|
const resetChunkTracking = useCallback51(() => {
|
|
54648
54749
|
processedSequenceKeys.current.clear();
|
|
@@ -54686,20 +54787,20 @@ function useChunkCatchup({
|
|
|
54686
54787
|
}
|
|
54687
54788
|
|
|
54688
54789
|
// src/components/chat/hooks/use-scripted-stream.ts
|
|
54689
|
-
import { useEffect as
|
|
54790
|
+
import { useEffect as useEffect93, useState as useState123 } from "react";
|
|
54690
54791
|
var EMPTY_FRAME = { messages: [], phase: "idle", typing: false, delayMs: 0 };
|
|
54691
54792
|
function prefersReducedMotion() {
|
|
54692
54793
|
return typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === true;
|
|
54693
54794
|
}
|
|
54694
54795
|
function useScriptedStream(frames, resetKey, enabled = true) {
|
|
54695
|
-
const [index, setIndex] =
|
|
54696
|
-
const [reducedMotion, setReducedMotion] =
|
|
54697
|
-
const [prevKey, setPrevKey] =
|
|
54796
|
+
const [index, setIndex] = useState123(0);
|
|
54797
|
+
const [reducedMotion, setReducedMotion] = useState123(false);
|
|
54798
|
+
const [prevKey, setPrevKey] = useState123(resetKey);
|
|
54698
54799
|
if (resetKey !== prevKey) {
|
|
54699
54800
|
setPrevKey(resetKey);
|
|
54700
54801
|
setIndex(0);
|
|
54701
54802
|
}
|
|
54702
|
-
|
|
54803
|
+
useEffect93(() => {
|
|
54703
54804
|
setReducedMotion(prefersReducedMotion());
|
|
54704
54805
|
const mq = window.matchMedia?.("(prefers-reduced-motion: reduce)");
|
|
54705
54806
|
if (!mq) return;
|
|
@@ -54709,7 +54810,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
|
|
|
54709
54810
|
}, []);
|
|
54710
54811
|
const playing = enabled && !reducedMotion && frames.length > 0;
|
|
54711
54812
|
const lastIndex = Math.max(0, frames.length - 1);
|
|
54712
|
-
|
|
54813
|
+
useEffect93(() => {
|
|
54713
54814
|
if (!playing || index >= lastIndex) return;
|
|
54714
54815
|
const current = frames[Math.min(index, lastIndex)] ?? EMPTY_FRAME;
|
|
54715
54816
|
const t = setTimeout(() => setIndex((i) => Math.min(i + 1, lastIndex)), current.delayMs);
|
|
@@ -54721,7 +54822,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
|
|
|
54721
54822
|
}
|
|
54722
54823
|
|
|
54723
54824
|
// src/components/chat/hooks/use-jetstream-dialog-subscription.ts
|
|
54724
|
-
import { useCallback as useCallback52, useEffect as
|
|
54825
|
+
import { useCallback as useCallback52, useEffect as useEffect94, useRef as useRef75, useState as useState124 } from "react";
|
|
54725
54826
|
var DEFAULT_STREAM_NAME = "CHAT_CHUNKS";
|
|
54726
54827
|
var RESYNC_AFTER_HIDDEN_MS = 1e4;
|
|
54727
54828
|
var RESYNC_COALESCE_MS = 1e3;
|
|
@@ -54743,61 +54844,61 @@ function useJetStreamDialogSubscription({
|
|
|
54743
54844
|
inactiveThresholdMs,
|
|
54744
54845
|
resyncSignal = 0
|
|
54745
54846
|
}) {
|
|
54746
|
-
const [isConnected, setIsConnected] =
|
|
54747
|
-
const [isSubscribed, setIsSubscribed] =
|
|
54748
|
-
const [reconnectionCount, setReconnectionCount] =
|
|
54749
|
-
const [recoveryCount, setRecoveryCount] =
|
|
54750
|
-
const [currentStreamSeq, setCurrentStreamSeq] =
|
|
54751
|
-
const lastRecoveryReportRef =
|
|
54752
|
-
const resyncTimerRef =
|
|
54753
|
-
const lastResyncSignalRef =
|
|
54754
|
-
const clientRef =
|
|
54755
|
-
const subscriptionRef =
|
|
54756
|
-
const highestStreamSeqRef =
|
|
54757
|
-
const onEventRef =
|
|
54758
|
-
|
|
54847
|
+
const [isConnected, setIsConnected] = useState124(false);
|
|
54848
|
+
const [isSubscribed, setIsSubscribed] = useState124(false);
|
|
54849
|
+
const [reconnectionCount, setReconnectionCount] = useState124(0);
|
|
54850
|
+
const [recoveryCount, setRecoveryCount] = useState124(0);
|
|
54851
|
+
const [currentStreamSeq, setCurrentStreamSeq] = useState124(null);
|
|
54852
|
+
const lastRecoveryReportRef = useRef75(0);
|
|
54853
|
+
const resyncTimerRef = useRef75(null);
|
|
54854
|
+
const lastResyncSignalRef = useRef75(resyncSignal);
|
|
54855
|
+
const clientRef = useRef75(null);
|
|
54856
|
+
const subscriptionRef = useRef75(null);
|
|
54857
|
+
const highestStreamSeqRef = useRef75(null);
|
|
54858
|
+
const onEventRef = useRef75(onEvent);
|
|
54859
|
+
useEffect94(() => {
|
|
54759
54860
|
onEventRef.current = onEvent;
|
|
54760
54861
|
}, [onEvent]);
|
|
54761
|
-
const onConnectRef =
|
|
54762
|
-
|
|
54862
|
+
const onConnectRef = useRef75(onConnect);
|
|
54863
|
+
useEffect94(() => {
|
|
54763
54864
|
onConnectRef.current = onConnect;
|
|
54764
54865
|
}, [onConnect]);
|
|
54765
|
-
const onDisconnectRef =
|
|
54766
|
-
|
|
54866
|
+
const onDisconnectRef = useRef75(onDisconnect);
|
|
54867
|
+
useEffect94(() => {
|
|
54767
54868
|
onDisconnectRef.current = onDisconnect;
|
|
54768
54869
|
}, [onDisconnect]);
|
|
54769
|
-
const onSubscribedRef =
|
|
54770
|
-
|
|
54870
|
+
const onSubscribedRef = useRef75(onSubscribed);
|
|
54871
|
+
useEffect94(() => {
|
|
54771
54872
|
onSubscribedRef.current = onSubscribed;
|
|
54772
54873
|
}, [onSubscribed]);
|
|
54773
|
-
const onBeforeReconnectRef =
|
|
54774
|
-
|
|
54874
|
+
const onBeforeReconnectRef = useRef75(onBeforeReconnect);
|
|
54875
|
+
useEffect94(() => {
|
|
54775
54876
|
onBeforeReconnectRef.current = onBeforeReconnect;
|
|
54776
54877
|
}, [onBeforeReconnect]);
|
|
54777
|
-
const getNatsWsUrlRef =
|
|
54778
|
-
|
|
54878
|
+
const getNatsWsUrlRef = useRef75(getNatsWsUrl);
|
|
54879
|
+
useEffect94(() => {
|
|
54779
54880
|
getNatsWsUrlRef.current = getNatsWsUrl;
|
|
54780
54881
|
}, [getNatsWsUrl]);
|
|
54781
|
-
const reconnectionBackoffRef =
|
|
54782
|
-
|
|
54882
|
+
const reconnectionBackoffRef = useRef75(reconnectionBackoff);
|
|
54883
|
+
useEffect94(() => {
|
|
54783
54884
|
reconnectionBackoffRef.current = reconnectionBackoff;
|
|
54784
54885
|
}, [reconnectionBackoff]);
|
|
54785
|
-
const optStartSeqRef =
|
|
54786
|
-
|
|
54886
|
+
const optStartSeqRef = useRef75(optStartSeq);
|
|
54887
|
+
useEffect94(() => {
|
|
54787
54888
|
optStartSeqRef.current = optStartSeq;
|
|
54788
54889
|
}, [optStartSeq]);
|
|
54789
|
-
const inactiveThresholdRef =
|
|
54790
|
-
|
|
54890
|
+
const inactiveThresholdRef = useRef75(inactiveThresholdMs);
|
|
54891
|
+
useEffect94(() => {
|
|
54791
54892
|
inactiveThresholdRef.current = inactiveThresholdMs;
|
|
54792
54893
|
}, [inactiveThresholdMs]);
|
|
54793
|
-
const hadConnectionBeforeRef =
|
|
54794
|
-
const clientConfigRef =
|
|
54795
|
-
|
|
54894
|
+
const hadConnectionBeforeRef = useRef75(false);
|
|
54895
|
+
const clientConfigRef = useRef75(clientConfig);
|
|
54896
|
+
useEffect94(() => {
|
|
54796
54897
|
clientConfigRef.current = clientConfig;
|
|
54797
54898
|
}, [clientConfig]);
|
|
54798
|
-
const currentWsUrlRef =
|
|
54899
|
+
const currentWsUrlRef = useRef75("");
|
|
54799
54900
|
const wsUrl = getNatsWsUrl();
|
|
54800
|
-
|
|
54901
|
+
useEffect94(() => {
|
|
54801
54902
|
if (!enabled || !wsUrl) {
|
|
54802
54903
|
if (currentWsUrlRef.current && clientRef.current) {
|
|
54803
54904
|
releaseClient(currentWsUrlRef.current);
|
|
@@ -54878,7 +54979,7 @@ function useJetStreamDialogSubscription({
|
|
|
54878
54979
|
}
|
|
54879
54980
|
};
|
|
54880
54981
|
}, [enabled, wsUrl]);
|
|
54881
|
-
|
|
54982
|
+
useEffect94(() => {
|
|
54882
54983
|
highestStreamSeqRef.current = null;
|
|
54883
54984
|
lastResyncSignalRef.current = resyncSignal;
|
|
54884
54985
|
setCurrentStreamSeq(null);
|
|
@@ -54896,7 +54997,7 @@ function useJetStreamDialogSubscription({
|
|
|
54896
54997
|
setReconnectionCount((c) => c + 1);
|
|
54897
54998
|
}, RESYNC_COALESCE_MS);
|
|
54898
54999
|
}, []);
|
|
54899
|
-
|
|
55000
|
+
useEffect94(() => {
|
|
54900
55001
|
if (!enabled) return;
|
|
54901
55002
|
let hiddenSince = document.visibilityState === "hidden" ? Date.now() : 0;
|
|
54902
55003
|
const onVisibilityChange = () => {
|
|
@@ -54913,13 +55014,13 @@ function useJetStreamDialogSubscription({
|
|
|
54913
55014
|
document.addEventListener("visibilitychange", onVisibilityChange);
|
|
54914
55015
|
return () => document.removeEventListener("visibilitychange", onVisibilityChange);
|
|
54915
55016
|
}, [enabled, requestResync]);
|
|
54916
|
-
|
|
55017
|
+
useEffect94(() => {
|
|
54917
55018
|
if (!enabled) return;
|
|
54918
55019
|
if (resyncSignal <= lastResyncSignalRef.current) return;
|
|
54919
55020
|
lastResyncSignalRef.current = resyncSignal;
|
|
54920
55021
|
requestResync();
|
|
54921
55022
|
}, [enabled, resyncSignal, requestResync]);
|
|
54922
|
-
|
|
55023
|
+
useEffect94(() => {
|
|
54923
55024
|
if (!enabled || !dialogId || !isConnected) {
|
|
54924
55025
|
if (subscriptionRef.current) {
|
|
54925
55026
|
try {
|
|
@@ -55020,7 +55121,7 @@ function useJetStreamDialogSubscription({
|
|
|
55020
55121
|
}
|
|
55021
55122
|
|
|
55022
55123
|
// src/components/chat/hooks/use-nats-dialog-subscription.ts
|
|
55023
|
-
import { useEffect as
|
|
55124
|
+
import { useEffect as useEffect95, useRef as useRef76, useState as useState125 } from "react";
|
|
55024
55125
|
function useNatsDialogSubscription({
|
|
55025
55126
|
enabled,
|
|
55026
55127
|
dialogId,
|
|
@@ -55034,47 +55135,47 @@ function useNatsDialogSubscription({
|
|
|
55034
55135
|
clientConfig = {},
|
|
55035
55136
|
reconnectionBackoff
|
|
55036
55137
|
}) {
|
|
55037
|
-
const [isConnected, setIsConnected] =
|
|
55038
|
-
const [isSubscribed, setIsSubscribed] =
|
|
55039
|
-
const [reconnectionCount, setReconnectionCount] =
|
|
55040
|
-
const clientRef =
|
|
55041
|
-
const subscriptionRefs =
|
|
55042
|
-
const onEventRef =
|
|
55043
|
-
|
|
55138
|
+
const [isConnected, setIsConnected] = useState125(false);
|
|
55139
|
+
const [isSubscribed, setIsSubscribed] = useState125(false);
|
|
55140
|
+
const [reconnectionCount, setReconnectionCount] = useState125(0);
|
|
55141
|
+
const clientRef = useRef76(null);
|
|
55142
|
+
const subscriptionRefs = useRef76(/* @__PURE__ */ new Map());
|
|
55143
|
+
const onEventRef = useRef76(onEvent);
|
|
55144
|
+
useEffect95(() => {
|
|
55044
55145
|
onEventRef.current = onEvent;
|
|
55045
55146
|
}, [onEvent]);
|
|
55046
|
-
const onConnectRef =
|
|
55047
|
-
|
|
55147
|
+
const onConnectRef = useRef76(onConnect);
|
|
55148
|
+
useEffect95(() => {
|
|
55048
55149
|
onConnectRef.current = onConnect;
|
|
55049
55150
|
}, [onConnect]);
|
|
55050
|
-
const onDisconnectRef =
|
|
55051
|
-
|
|
55151
|
+
const onDisconnectRef = useRef76(onDisconnect);
|
|
55152
|
+
useEffect95(() => {
|
|
55052
55153
|
onDisconnectRef.current = onDisconnect;
|
|
55053
55154
|
}, [onDisconnect]);
|
|
55054
|
-
const onSubscribedRef =
|
|
55055
|
-
|
|
55155
|
+
const onSubscribedRef = useRef76(onSubscribed);
|
|
55156
|
+
useEffect95(() => {
|
|
55056
55157
|
onSubscribedRef.current = onSubscribed;
|
|
55057
55158
|
}, [onSubscribed]);
|
|
55058
|
-
const onBeforeReconnectRef =
|
|
55059
|
-
|
|
55159
|
+
const onBeforeReconnectRef = useRef76(onBeforeReconnect);
|
|
55160
|
+
useEffect95(() => {
|
|
55060
55161
|
onBeforeReconnectRef.current = onBeforeReconnect;
|
|
55061
55162
|
}, [onBeforeReconnect]);
|
|
55062
|
-
const hadConnectionBeforeRef =
|
|
55063
|
-
const getNatsWsUrlRef =
|
|
55064
|
-
|
|
55163
|
+
const hadConnectionBeforeRef = useRef76(false);
|
|
55164
|
+
const getNatsWsUrlRef = useRef76(getNatsWsUrl);
|
|
55165
|
+
useEffect95(() => {
|
|
55065
55166
|
getNatsWsUrlRef.current = getNatsWsUrl;
|
|
55066
55167
|
}, [getNatsWsUrl]);
|
|
55067
|
-
const reconnectionBackoffRef =
|
|
55068
|
-
|
|
55168
|
+
const reconnectionBackoffRef = useRef76(reconnectionBackoff);
|
|
55169
|
+
useEffect95(() => {
|
|
55069
55170
|
reconnectionBackoffRef.current = reconnectionBackoff;
|
|
55070
55171
|
}, [reconnectionBackoff]);
|
|
55071
|
-
const clientConfigRef =
|
|
55072
|
-
|
|
55172
|
+
const clientConfigRef = useRef76(clientConfig);
|
|
55173
|
+
useEffect95(() => {
|
|
55073
55174
|
clientConfigRef.current = clientConfig;
|
|
55074
55175
|
}, [clientConfig]);
|
|
55075
|
-
const currentWsUrlRef =
|
|
55176
|
+
const currentWsUrlRef = useRef76("");
|
|
55076
55177
|
const wsUrl = getNatsWsUrl();
|
|
55077
|
-
|
|
55178
|
+
useEffect95(() => {
|
|
55078
55179
|
if (!enabled || !wsUrl) {
|
|
55079
55180
|
if (currentWsUrlRef.current && clientRef.current) {
|
|
55080
55181
|
releaseClient(currentWsUrlRef.current);
|
|
@@ -55156,16 +55257,16 @@ function useNatsDialogSubscription({
|
|
|
55156
55257
|
};
|
|
55157
55258
|
}, [enabled, wsUrl]);
|
|
55158
55259
|
const topicsKey = topics.join(",");
|
|
55159
|
-
const topicsRef =
|
|
55260
|
+
const topicsRef = useRef76(topics);
|
|
55160
55261
|
topicsRef.current = topics;
|
|
55161
|
-
const lastSubscribedDialogIdRef =
|
|
55162
|
-
const isConnectedRef =
|
|
55163
|
-
|
|
55262
|
+
const lastSubscribedDialogIdRef = useRef76(null);
|
|
55263
|
+
const isConnectedRef = useRef76(isConnected);
|
|
55264
|
+
useEffect95(() => {
|
|
55164
55265
|
isConnectedRef.current = isConnected;
|
|
55165
55266
|
}, [isConnected]);
|
|
55166
|
-
const currentDialogIdRef =
|
|
55167
|
-
const abortControllerRef =
|
|
55168
|
-
|
|
55267
|
+
const currentDialogIdRef = useRef76(null);
|
|
55268
|
+
const abortControllerRef = useRef76(null);
|
|
55269
|
+
useEffect95(() => {
|
|
55169
55270
|
currentDialogIdRef.current = dialogId;
|
|
55170
55271
|
if (!enabled || !dialogId) {
|
|
55171
55272
|
if (subscriptionRefs.current.size > 0) {
|
|
@@ -55246,7 +55347,7 @@ function useNatsDialogSubscription({
|
|
|
55246
55347
|
abortControllerRef.current = null;
|
|
55247
55348
|
};
|
|
55248
55349
|
}, [enabled, dialogId, topicsKey]);
|
|
55249
|
-
|
|
55350
|
+
useEffect95(() => {
|
|
55250
55351
|
if (!enabled || !currentDialogIdRef.current || !isConnected) {
|
|
55251
55352
|
return;
|
|
55252
55353
|
}
|
|
@@ -55296,7 +55397,7 @@ function buildNatsWsUrl(apiBaseUrl, options) {
|
|
|
55296
55397
|
}
|
|
55297
55398
|
|
|
55298
55399
|
// src/components/chat/hooks/use-slash-commands.ts
|
|
55299
|
-
import { useEffect as
|
|
55400
|
+
import { useEffect as useEffect96, useState as useState126 } from "react";
|
|
55300
55401
|
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
|
55301
55402
|
async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
55302
55403
|
try {
|
|
@@ -55313,9 +55414,9 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
|
55313
55414
|
}
|
|
55314
55415
|
}
|
|
55315
55416
|
function useSlashCommands(prefix, commandsUrl) {
|
|
55316
|
-
const [commands, setCommands] =
|
|
55317
|
-
const [loading, setLoading] =
|
|
55318
|
-
|
|
55417
|
+
const [commands, setCommands] = useState126([]);
|
|
55418
|
+
const [loading, setLoading] = useState126(false);
|
|
55419
|
+
useEffect96(() => {
|
|
55319
55420
|
if (prefix == null) {
|
|
55320
55421
|
setCommands([]);
|
|
55321
55422
|
return;
|
|
@@ -55421,7 +55522,7 @@ function useEmptyStateConfig(emptyStateUrl, options) {
|
|
|
55421
55522
|
}
|
|
55422
55523
|
|
|
55423
55524
|
// src/components/chat/hooks/use-chat-attachments.ts
|
|
55424
|
-
import { useCallback as useCallback53, useMemo as useMemo52, useRef as
|
|
55525
|
+
import { useCallback as useCallback53, useMemo as useMemo52, useRef as useRef77, useState as useState127 } from "react";
|
|
55425
55526
|
import { fileTypeFromBlob } from "file-type";
|
|
55426
55527
|
var CHAT_ATTACHMENTS_BUCKET = "chat-attachments";
|
|
55427
55528
|
var CHAT_ATTACHMENTS_FOLDER = "chat";
|
|
@@ -55497,8 +55598,8 @@ function uploadWithProgress(url, file, token, onProgress, signal) {
|
|
|
55497
55598
|
function useChatAttachments() {
|
|
55498
55599
|
const runtime = useRequiredChatRuntime();
|
|
55499
55600
|
const uploadUrlEndpoint = runtime.endpoints.attachmentUploadUrl;
|
|
55500
|
-
const [attachments, setAttachments] =
|
|
55501
|
-
const controllersRef =
|
|
55601
|
+
const [attachments, setAttachments] = useState127([]);
|
|
55602
|
+
const controllersRef = useRef77(/* @__PURE__ */ new Map());
|
|
55502
55603
|
const updateOne = useCallback53((id, patch) => {
|
|
55503
55604
|
setAttachments((prev) => prev.map((a) => a.id === id ? { ...a, ...patch } : a));
|
|
55504
55605
|
}, []);
|
|
@@ -55587,7 +55688,7 @@ function useChatAttachments() {
|
|
|
55587
55688
|
},
|
|
55588
55689
|
[uploadUrlEndpoint, updateOne]
|
|
55589
55690
|
);
|
|
55590
|
-
const attachmentsRef =
|
|
55691
|
+
const attachmentsRef = useRef77([]);
|
|
55591
55692
|
attachmentsRef.current = attachments;
|
|
55592
55693
|
const addFiles = useCallback53(
|
|
55593
55694
|
(files) => {
|
|
@@ -55664,16 +55765,16 @@ function useChatAttachments() {
|
|
|
55664
55765
|
}
|
|
55665
55766
|
|
|
55666
55767
|
// src/components/chat/hooks/use-chat-attachment-image-gallery.tsx
|
|
55667
|
-
import { useCallback as useCallback54, useEffect as
|
|
55768
|
+
import { useCallback as useCallback54, useEffect as useEffect97, useRef as useRef78, useState as useState128 } from "react";
|
|
55668
55769
|
import { jsx as jsx398 } from "react/jsx-runtime";
|
|
55669
55770
|
var CLOSED = { isOpen: false, images: [], initialIndex: 0 };
|
|
55670
55771
|
function useChatAttachmentImageGallery() {
|
|
55671
55772
|
const runtime = useRequiredChatRuntime();
|
|
55672
55773
|
const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
|
|
55673
|
-
const panelRef =
|
|
55674
|
-
const [state, setState] =
|
|
55774
|
+
const panelRef = useRef78(null);
|
|
55775
|
+
const [state, setState] = useState128(CLOSED);
|
|
55675
55776
|
const handleClose = useCallback54(() => setState(CLOSED), []);
|
|
55676
|
-
|
|
55777
|
+
useEffect97(() => {
|
|
55677
55778
|
const root = panelRef.current;
|
|
55678
55779
|
if (!root) return;
|
|
55679
55780
|
const onClick = (ev) => {
|
|
@@ -55719,11 +55820,11 @@ function absolutize(prefix) {
|
|
|
55719
55820
|
}
|
|
55720
55821
|
|
|
55721
55822
|
// src/components/chat/hooks/use-close-on-navigation.ts
|
|
55722
|
-
import { useEffect as
|
|
55823
|
+
import { useEffect as useEffect98, useRef as useRef79 } from "react";
|
|
55723
55824
|
function useCloseOnNavigation(close, pathname) {
|
|
55724
|
-
const prevPathnameRef =
|
|
55725
|
-
const initializedRef =
|
|
55726
|
-
|
|
55825
|
+
const prevPathnameRef = useRef79(null);
|
|
55826
|
+
const initializedRef = useRef79(false);
|
|
55827
|
+
useEffect98(() => {
|
|
55727
55828
|
if (!initializedRef.current) {
|
|
55728
55829
|
initializedRef.current = true;
|
|
55729
55830
|
prevPathnameRef.current = pathname;
|
|
@@ -55737,14 +55838,14 @@ function useCloseOnNavigation(close, pathname) {
|
|
|
55737
55838
|
}
|
|
55738
55839
|
|
|
55739
55840
|
// src/components/chat/hooks/use-chat.ts
|
|
55740
|
-
import { useState as
|
|
55841
|
+
import { useState as useState130, useCallback as useCallback56, useEffect as useEffect99, useRef as useRef81 } from "react";
|
|
55741
55842
|
|
|
55742
55843
|
// src/components/chat/hooks/use-sse.ts
|
|
55743
|
-
import { useState as
|
|
55844
|
+
import { useState as useState129, useCallback as useCallback55, useRef as useRef80 } from "react";
|
|
55744
55845
|
function useSSE({ useMock = true, debugMode = false, streamFn } = {}) {
|
|
55745
|
-
const [isStreaming, setIsStreaming] =
|
|
55746
|
-
const [error, setError] =
|
|
55747
|
-
const abortControllerRef =
|
|
55846
|
+
const [isStreaming, setIsStreaming] = useState129(false);
|
|
55847
|
+
const [error, setError] = useState129(null);
|
|
55848
|
+
const abortControllerRef = useRef80(null);
|
|
55748
55849
|
const fallbackStream = useCallback55(async function* () {
|
|
55749
55850
|
throw new Error(
|
|
55750
55851
|
"[useSSE] No streamFn provided and `useMock: true` is no longer wired into the lib. Supply a `streamFn` (see `createDocStreamFn` in use-embedded-chat) or migrate the mock to your host code."
|
|
@@ -55810,12 +55911,12 @@ function useChat({
|
|
|
55810
55911
|
initialMessages,
|
|
55811
55912
|
onMessagesChange
|
|
55812
55913
|
} = {}) {
|
|
55813
|
-
const [messages, setMessages] =
|
|
55814
|
-
const [isTyping, setIsTyping] =
|
|
55815
|
-
const currentAssistantSegmentsRef =
|
|
55816
|
-
const onMessagesChangeRef =
|
|
55914
|
+
const [messages, setMessages] = useState130(() => initialMessages ?? []);
|
|
55915
|
+
const [isTyping, setIsTyping] = useState130(false);
|
|
55916
|
+
const currentAssistantSegmentsRef = useRef81([]);
|
|
55917
|
+
const onMessagesChangeRef = useRef81(onMessagesChange);
|
|
55817
55918
|
onMessagesChangeRef.current = onMessagesChange;
|
|
55818
|
-
|
|
55919
|
+
useEffect99(() => {
|
|
55819
55920
|
onMessagesChangeRef.current?.(messages);
|
|
55820
55921
|
}, [messages]);
|
|
55821
55922
|
const {
|
|
@@ -56085,7 +56186,7 @@ function useChat({
|
|
|
56085
56186
|
}
|
|
56086
56187
|
|
|
56087
56188
|
// src/components/chat/hooks/use-sse-chat-adapter.ts
|
|
56088
|
-
import { useCallback as useCallback58, useMemo as useMemo54, useRef as
|
|
56189
|
+
import { useCallback as useCallback58, useMemo as useMemo54, useRef as useRef84 } from "react";
|
|
56089
56190
|
|
|
56090
56191
|
// src/chat-protocol/confirm-tool.ts
|
|
56091
56192
|
function buildConfirmToolBody(request) {
|
|
@@ -56352,7 +56453,7 @@ function pruneStaleChatConversationStorage(source) {
|
|
|
56352
56453
|
}
|
|
56353
56454
|
|
|
56354
56455
|
// src/components/chat/hooks/use-chat-history-hydration.ts
|
|
56355
|
-
import { useEffect as
|
|
56456
|
+
import { useEffect as useEffect100, useRef as useRef82, useState as useState131 } from "react";
|
|
56356
56457
|
function useChatHistoryHydration({
|
|
56357
56458
|
active,
|
|
56358
56459
|
source,
|
|
@@ -56362,9 +56463,9 @@ function useChatHistoryHydration({
|
|
|
56362
56463
|
hydrateMessages,
|
|
56363
56464
|
bumpMetaTick
|
|
56364
56465
|
}) {
|
|
56365
|
-
const [isHydratingHistory, setIsHydratingHistory] =
|
|
56366
|
-
const hydratedKeyRef =
|
|
56367
|
-
|
|
56466
|
+
const [isHydratingHistory, setIsHydratingHistory] = useState131(false);
|
|
56467
|
+
const hydratedKeyRef = useRef82(null);
|
|
56468
|
+
useEffect100(() => {
|
|
56368
56469
|
if (!active) return;
|
|
56369
56470
|
const conversationId = conversationIdRef.current;
|
|
56370
56471
|
if (!conversationId) return;
|
|
@@ -58561,7 +58662,7 @@ function createChatDialogStore(options = {}) {
|
|
|
58561
58662
|
}
|
|
58562
58663
|
|
|
58563
58664
|
// src/components/chat/stream/use-chat-stream-reducer.ts
|
|
58564
|
-
import { useCallback as useCallback57, useEffect as
|
|
58665
|
+
import { useCallback as useCallback57, useEffect as useEffect101, useMemo as useMemo53, useRef as useRef83, useSyncExternalStore } from "react";
|
|
58565
58666
|
|
|
58566
58667
|
// src/components/chat/stream/delta-batcher.ts
|
|
58567
58668
|
var DELTA_FLUSH_FALLBACK_MS = 50;
|
|
@@ -58650,21 +58751,21 @@ function useChatStreamReducer({
|
|
|
58650
58751
|
side = DEFAULT_DIALOG_SIDE,
|
|
58651
58752
|
createReducerOptions
|
|
58652
58753
|
}) {
|
|
58653
|
-
const optionsRef =
|
|
58754
|
+
const optionsRef = useRef83(createReducerOptions);
|
|
58654
58755
|
optionsRef.current = createReducerOptions;
|
|
58655
58756
|
const reducer2 = store.getReducer(dialogId, side, () => optionsRef.current?.() ?? {});
|
|
58656
58757
|
const getSnapshot = useCallback57(() => store.getSnapshot(dialogId, side), [store, dialogId, side]);
|
|
58657
58758
|
const getServerSnapshot = useCallback57(() => store.getServerSnapshot(), [store]);
|
|
58658
58759
|
const subscribe = useCallback57((listener) => store.subscribe(listener), [store]);
|
|
58659
58760
|
const state = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
58660
|
-
|
|
58661
|
-
const keyRef =
|
|
58761
|
+
useEffect101(() => store.retain(dialogId, side), [store, dialogId, side]);
|
|
58762
|
+
const keyRef = useRef83({ dialogId, side });
|
|
58662
58763
|
if (keyRef.current.dialogId !== dialogId || keyRef.current.side !== side) {
|
|
58663
58764
|
keyRef.current = { dialogId, side };
|
|
58664
58765
|
}
|
|
58665
|
-
const storeRef =
|
|
58766
|
+
const storeRef = useRef83(store);
|
|
58666
58767
|
storeRef.current = store;
|
|
58667
|
-
const batcherRef =
|
|
58768
|
+
const batcherRef = useRef83(null);
|
|
58668
58769
|
if (batcherRef.current === null) {
|
|
58669
58770
|
batcherRef.current = createDeltaBatcher({
|
|
58670
58771
|
applyOne: (event, key) => {
|
|
@@ -58682,7 +58783,7 @@ function useChatStreamReducer({
|
|
|
58682
58783
|
},
|
|
58683
58784
|
[batcher, store, dialogId, side]
|
|
58684
58785
|
);
|
|
58685
|
-
|
|
58786
|
+
useEffect101(() => () => batcher.dispose(), [batcher]);
|
|
58686
58787
|
const mutate = useCallback57(
|
|
58687
58788
|
(fn) => store.mutate(dialogId, side, fn),
|
|
58688
58789
|
[store, dialogId, side]
|
|
@@ -58713,7 +58814,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
58713
58814
|
const runtime = useRequiredChatRuntime();
|
|
58714
58815
|
const source = runtime.source || DEFAULT_CHAT_SOURCE;
|
|
58715
58816
|
const tableIdForDocumentType = options?.tableIdForDocumentType ?? defaultTableIdForDocumentType;
|
|
58716
|
-
const sendMessageRef =
|
|
58817
|
+
const sendMessageRef = useRef84(async () => true);
|
|
58717
58818
|
const cardResolve = useCallback58(
|
|
58718
58819
|
(action) => (reqId) => {
|
|
58719
58820
|
if (!reqId) return;
|
|
@@ -58733,17 +58834,17 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
58733
58834
|
}),
|
|
58734
58835
|
[cardApprove, cardReject]
|
|
58735
58836
|
);
|
|
58736
|
-
const storeRef =
|
|
58837
|
+
const storeRef = useRef84(null);
|
|
58737
58838
|
if (storeRef.current === null) storeRef.current = createChatDialogStore();
|
|
58738
58839
|
const { state, applyEvent, flushDeltas, mutate, reducer: reducer2 } = useChatStreamReducer({
|
|
58739
58840
|
store: storeRef.current,
|
|
58740
58841
|
dialogId: source,
|
|
58741
58842
|
createReducerOptions
|
|
58742
58843
|
});
|
|
58743
|
-
const abortControllerRef =
|
|
58844
|
+
const abortControllerRef = useRef84(null);
|
|
58744
58845
|
const conversationStorage = useMemo54(() => createChatConversationStorage(source), [source]);
|
|
58745
|
-
const conversationIdRef =
|
|
58746
|
-
const restoredConversationRef =
|
|
58846
|
+
const conversationIdRef = useRef84(null);
|
|
58847
|
+
const restoredConversationRef = useRef84(false);
|
|
58747
58848
|
if (!restoredConversationRef.current) {
|
|
58748
58849
|
restoredConversationRef.current = true;
|
|
58749
58850
|
pruneStaleChatConversationStorage(source);
|
|
@@ -58774,7 +58875,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
58774
58875
|
return map;
|
|
58775
58876
|
}, [slashCommands]);
|
|
58776
58877
|
const historyUrl = runtime.endpoints.chatHistoryUrl ?? `${runtime.endpoints.chatStreamUrl.replace(/\/+$/, "")}/history`;
|
|
58777
|
-
const hydrationSendCountRef =
|
|
58878
|
+
const hydrationSendCountRef = useRef84(0);
|
|
58778
58879
|
const hydrateMessages = useCallback58(
|
|
58779
58880
|
(history, sourcesSeed) => {
|
|
58780
58881
|
mutate((r) => {
|
|
@@ -58807,7 +58908,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
58807
58908
|
// `hydrateMessages` above) already invalidates the snapshot.
|
|
58808
58909
|
bumpMetaTick: noopBumpMetaTick
|
|
58809
58910
|
});
|
|
58810
|
-
const endpointsRef =
|
|
58911
|
+
const endpointsRef = useRef84(runtime.endpoints);
|
|
58811
58912
|
endpointsRef.current = runtime.endpoints;
|
|
58812
58913
|
const captureConversationId = useCallback58(
|
|
58813
58914
|
(event) => {
|
|
@@ -59063,7 +59164,7 @@ var noopBumpMetaTick = () => {
|
|
|
59063
59164
|
};
|
|
59064
59165
|
|
|
59065
59166
|
// src/components/chat/hooks/use-nats-chat-adapter.ts
|
|
59066
|
-
import { useCallback as useCallback59, useEffect as
|
|
59167
|
+
import { useCallback as useCallback59, useEffect as useEffect102, useMemo as useMemo55, useRef as useRef85, useState as useState132 } from "react";
|
|
59067
59168
|
|
|
59068
59169
|
// src/chat-protocol/nats-decoder.ts
|
|
59069
59170
|
function normalizeToolCalls(raw) {
|
|
@@ -60093,13 +60194,13 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
60093
60194
|
modelLabel = null
|
|
60094
60195
|
} = config;
|
|
60095
60196
|
const isManagedMode = fetchDialogs !== void 0;
|
|
60096
|
-
const [internalDialogId, setInternalDialogId] =
|
|
60197
|
+
const [internalDialogId, setInternalDialogId] = useState132(null);
|
|
60097
60198
|
const dialogId = isManagedMode ? internalDialogId : controlledDialogId !== void 0 ? controlledDialogId : null;
|
|
60098
|
-
const currentDialogIdRef =
|
|
60199
|
+
const currentDialogIdRef = useRef85(dialogId);
|
|
60099
60200
|
currentDialogIdRef.current = dialogId;
|
|
60100
|
-
const handleApproveRef =
|
|
60201
|
+
const handleApproveRef = useRef85(async () => {
|
|
60101
60202
|
});
|
|
60102
|
-
const handleRejectRef =
|
|
60203
|
+
const handleRejectRef = useRef85(
|
|
60103
60204
|
async () => {
|
|
60104
60205
|
}
|
|
60105
60206
|
);
|
|
@@ -60111,8 +60212,8 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
60111
60212
|
if (!requestId) return;
|
|
60112
60213
|
return handleRejectRef.current(requestId);
|
|
60113
60214
|
}, []);
|
|
60114
|
-
const storeRef =
|
|
60115
|
-
const globalApprovalStatusesRef =
|
|
60215
|
+
const storeRef = useRef85(createChatDialogStore());
|
|
60216
|
+
const globalApprovalStatusesRef = useRef85({});
|
|
60116
60217
|
const dialogKey = dialogId ?? DRAFT_DIALOG_KEY;
|
|
60117
60218
|
const { state, applyEvent, mutate } = useChatStreamReducer({
|
|
60118
60219
|
store: storeRef.current,
|
|
@@ -60168,15 +60269,15 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
60168
60269
|
},
|
|
60169
60270
|
[applyEvent]
|
|
60170
60271
|
);
|
|
60171
|
-
const [dialogs, setDialogs] =
|
|
60172
|
-
const [dialogsNextCursor, setDialogsNextCursor] =
|
|
60173
|
-
const [isDialogsLoading, setIsDialogsLoading] =
|
|
60174
|
-
const [dialogsError, setDialogsError] =
|
|
60175
|
-
const [isCreatingDialog, setIsCreatingDialog] =
|
|
60176
|
-
const [messagesNextCursor, setMessagesNextCursor] =
|
|
60177
|
-
const [isMessagesLoading, setIsMessagesLoading] =
|
|
60178
|
-
const [connectionState, setConnectionState] =
|
|
60179
|
-
const hasConnectedOnceRef =
|
|
60272
|
+
const [dialogs, setDialogs] = useState132([]);
|
|
60273
|
+
const [dialogsNextCursor, setDialogsNextCursor] = useState132(null);
|
|
60274
|
+
const [isDialogsLoading, setIsDialogsLoading] = useState132(false);
|
|
60275
|
+
const [dialogsError, setDialogsError] = useState132(false);
|
|
60276
|
+
const [isCreatingDialog, setIsCreatingDialog] = useState132(false);
|
|
60277
|
+
const [messagesNextCursor, setMessagesNextCursor] = useState132(null);
|
|
60278
|
+
const [isMessagesLoading, setIsMessagesLoading] = useState132(false);
|
|
60279
|
+
const [connectionState, setConnectionState] = useState132("connecting");
|
|
60280
|
+
const hasConnectedOnceRef = useRef85(false);
|
|
60180
60281
|
const {
|
|
60181
60282
|
processChunk: catchupProcessChunk,
|
|
60182
60283
|
catchUpChunks,
|
|
@@ -60189,7 +60290,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
60189
60290
|
onChunkReceived: (chunk) => processChunk(chunk),
|
|
60190
60291
|
fetchChunks
|
|
60191
60292
|
});
|
|
60192
|
-
const historyLoadSeqRef =
|
|
60293
|
+
const historyLoadSeqRef = useRef85(0);
|
|
60193
60294
|
const loadDialogHistory = useCallback59(
|
|
60194
60295
|
async (id, cursor) => {
|
|
60195
60296
|
if (!fetchDialogMessages) return;
|
|
@@ -60252,8 +60353,8 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
60252
60353
|
isBufferingActive
|
|
60253
60354
|
]
|
|
60254
60355
|
);
|
|
60255
|
-
const prevDialogIdRef =
|
|
60256
|
-
|
|
60356
|
+
const prevDialogIdRef = useRef85(void 0);
|
|
60357
|
+
useEffect102(() => {
|
|
60257
60358
|
if (prevDialogIdRef.current === dialogId) return;
|
|
60258
60359
|
prevDialogIdRef.current = dialogId;
|
|
60259
60360
|
historyLoadSeqRef.current += 1;
|
|
@@ -60266,7 +60367,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
60266
60367
|
if (!active || !dialogId) return;
|
|
60267
60368
|
void loadDialogHistory(dialogId);
|
|
60268
60369
|
}, [active, dialogId, dialogKey, loadDialogHistory]);
|
|
60269
|
-
|
|
60370
|
+
useEffect102(() => {
|
|
60270
60371
|
if (!active || !dialogId) return;
|
|
60271
60372
|
const store = storeRef.current;
|
|
60272
60373
|
store.mutate(dialogId, DEFAULT_DIALOG_SIDE, (r) => r.adjustAgentBusySuppression(1));
|
|
@@ -60329,14 +60430,14 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
60329
60430
|
})();
|
|
60330
60431
|
}
|
|
60331
60432
|
});
|
|
60332
|
-
|
|
60433
|
+
useEffect102(() => {
|
|
60333
60434
|
if (!active || !dialogId) {
|
|
60334
60435
|
setConnectionState("connected");
|
|
60335
60436
|
return;
|
|
60336
60437
|
}
|
|
60337
60438
|
setConnectionState("connecting");
|
|
60338
60439
|
}, [active, dialogId]);
|
|
60339
|
-
const initialDialogsLoadedRef =
|
|
60440
|
+
const initialDialogsLoadedRef = useRef85(false);
|
|
60340
60441
|
const loadDialogsPage = useCallback59(
|
|
60341
60442
|
async (cursor) => {
|
|
60342
60443
|
if (!fetchDialogs) return;
|
|
@@ -60368,7 +60469,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
60368
60469
|
const reloadDialogs = useCallback59(() => {
|
|
60369
60470
|
void loadDialogsPage();
|
|
60370
60471
|
}, [loadDialogsPage]);
|
|
60371
|
-
|
|
60472
|
+
useEffect102(() => {
|
|
60372
60473
|
if (!fetchDialogs) return;
|
|
60373
60474
|
if (!active) return;
|
|
60374
60475
|
if (initialDialogsLoadedRef.current) return;
|
|
@@ -60601,7 +60702,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
60601
60702
|
}
|
|
60602
60703
|
|
|
60603
60704
|
// src/components/chat/hooks/use-unified-chat.ts
|
|
60604
|
-
import { useCallback as useCallback60, useMemo as useMemo56, useRef as
|
|
60705
|
+
import { useCallback as useCallback60, useMemo as useMemo56, useRef as useRef86 } from "react";
|
|
60605
60706
|
var EMPTY_SSE_OPTIONS = {};
|
|
60606
60707
|
function createDisabledNatsConfig() {
|
|
60607
60708
|
return {
|
|
@@ -60616,7 +60717,7 @@ function createDisabledNatsConfig() {
|
|
|
60616
60717
|
}
|
|
60617
60718
|
function useUnifiedChat(options) {
|
|
60618
60719
|
const { modes, activeMode, mingoStateOverride } = options;
|
|
60619
|
-
const disabledNatsRef =
|
|
60720
|
+
const disabledNatsRef = useRef86(null);
|
|
60620
60721
|
if (disabledNatsRef.current === null) {
|
|
60621
60722
|
disabledNatsRef.current = createDisabledNatsConfig();
|
|
60622
60723
|
}
|
|
@@ -60630,7 +60731,7 @@ function useUnifiedChat(options) {
|
|
|
60630
60731
|
{ active: natsActive }
|
|
60631
60732
|
);
|
|
60632
60733
|
const activeState = activeMode === "guide" ? sseState : mingoStateOverride ?? natsState;
|
|
60633
|
-
const activeStateRef =
|
|
60734
|
+
const activeStateRef = useRef86(activeState);
|
|
60634
60735
|
activeStateRef.current = activeState;
|
|
60635
60736
|
const stopMessage = useCallback60(() => activeStateRef.current.stopMessage(), []);
|
|
60636
60737
|
const clearMessages = useCallback60(
|
|
@@ -61032,16 +61133,16 @@ function buildStreamFrames(messages) {
|
|
|
61032
61133
|
|
|
61033
61134
|
// src/components/chat/embeddable-chat.tsx
|
|
61034
61135
|
init_cn();
|
|
61035
|
-
import
|
|
61136
|
+
import React151, { useCallback as useCallback62, useEffect as useEffect103, useImperativeHandle as useImperativeHandle5, useMemo as useMemo58, useRef as useRef88, useState as useState134 } from "react";
|
|
61036
61137
|
import * as DialogPrimitive5 from "@radix-ui/react-dialog";
|
|
61037
61138
|
import { usePreventScroll as usePreventScroll5 } from "@react-aria/overlays";
|
|
61038
61139
|
import { isIOS } from "@react-aria/utils";
|
|
61039
61140
|
|
|
61040
61141
|
// node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
61041
|
-
import * as
|
|
61142
|
+
import * as React150 from "react";
|
|
61042
61143
|
|
|
61043
61144
|
// node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
61044
|
-
import * as
|
|
61145
|
+
import * as React149 from "react";
|
|
61045
61146
|
import * as ReactDOM2 from "react-dom";
|
|
61046
61147
|
import { createSlot } from "@radix-ui/react-slot";
|
|
61047
61148
|
import { jsx as jsx399 } from "react/jsx-runtime";
|
|
@@ -61068,7 +61169,7 @@ var NODES = [
|
|
|
61068
61169
|
];
|
|
61069
61170
|
var Primitive = NODES.reduce((primitive, node) => {
|
|
61070
61171
|
const Slot2 = createSlot(`Primitive.${node}`);
|
|
61071
|
-
const Node2 =
|
|
61172
|
+
const Node2 = React149.forwardRef((props, forwardedRef) => {
|
|
61072
61173
|
const { asChild, ...primitiveProps } = props;
|
|
61073
61174
|
const Comp = asChild ? Slot2 : node;
|
|
61074
61175
|
if (typeof window !== "undefined") {
|
|
@@ -61101,7 +61202,7 @@ var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
|
61101
61202
|
whiteSpace: "nowrap",
|
|
61102
61203
|
wordWrap: "normal"
|
|
61103
61204
|
});
|
|
61104
|
-
var VisuallyHidden = /* @__PURE__ */
|
|
61205
|
+
var VisuallyHidden = /* @__PURE__ */ React150.forwardRef(
|
|
61105
61206
|
/* @__PURE__ */ __name4(function VisuallyHidden2(props, forwardedRef) {
|
|
61106
61207
|
return /* @__PURE__ */ jsx400(
|
|
61107
61208
|
Primitive.span,
|
|
@@ -61119,7 +61220,7 @@ init_button2();
|
|
|
61119
61220
|
import { FileText as FileText8, MessageSquare as MessageSquare3 } from "lucide-react";
|
|
61120
61221
|
|
|
61121
61222
|
// src/components/chat/hooks/use-chat-dialog-manager.ts
|
|
61122
|
-
import { useCallback as useCallback61, useMemo as useMemo57, useRef as
|
|
61223
|
+
import { useCallback as useCallback61, useMemo as useMemo57, useRef as useRef87, useState as useState133 } from "react";
|
|
61123
61224
|
function useChatDialogManager({
|
|
61124
61225
|
dialogs,
|
|
61125
61226
|
activeDialogId,
|
|
@@ -61130,8 +61231,8 @@ function useChatDialogManager({
|
|
|
61130
61231
|
fetchArchivedDialogs,
|
|
61131
61232
|
unarchiveDialog
|
|
61132
61233
|
}) {
|
|
61133
|
-
const [renameTarget, setRenameTarget] =
|
|
61134
|
-
const [archiveTarget, setArchiveTarget] =
|
|
61234
|
+
const [renameTarget, setRenameTarget] = useState133(null);
|
|
61235
|
+
const [archiveTarget, setArchiveTarget] = useState133(null);
|
|
61135
61236
|
const handleConfirmRename = useCallback61(
|
|
61136
61237
|
(name) => {
|
|
61137
61238
|
if (renameTarget) void renameDialog(renameTarget.id, name);
|
|
@@ -61154,12 +61255,12 @@ function useChatDialogManager({
|
|
|
61154
61255
|
}
|
|
61155
61256
|
setArchiveTarget(null);
|
|
61156
61257
|
}, [archiveTarget, archiveDialog, activeDialogId, clearMessages]);
|
|
61157
|
-
const [archiveOpen, setArchiveOpen] =
|
|
61158
|
-
const [archivedDialogs, setArchivedDialogs] =
|
|
61159
|
-
const [archivedCursor, setArchivedCursor] =
|
|
61160
|
-
const [archivedLoading, setArchivedLoading] =
|
|
61161
|
-
const [archivedPending, setArchivedPending] =
|
|
61162
|
-
const archivedRequestIdRef =
|
|
61258
|
+
const [archiveOpen, setArchiveOpen] = useState133(false);
|
|
61259
|
+
const [archivedDialogs, setArchivedDialogs] = useState133([]);
|
|
61260
|
+
const [archivedCursor, setArchivedCursor] = useState133(null);
|
|
61261
|
+
const [archivedLoading, setArchivedLoading] = useState133(false);
|
|
61262
|
+
const [archivedPending, setArchivedPending] = useState133(false);
|
|
61263
|
+
const archivedRequestIdRef = useRef87(0);
|
|
61163
61264
|
const loadArchivedPage = useCallback61(
|
|
61164
61265
|
async (cursor) => {
|
|
61165
61266
|
if (!fetchArchivedDialogs) return;
|
|
@@ -61200,10 +61301,10 @@ function useChatDialogManager({
|
|
|
61200
61301
|
void loadArchivedPage();
|
|
61201
61302
|
}, [loadArchivedPage]);
|
|
61202
61303
|
const closeArchive = useCallback61(() => setArchiveOpen(false), []);
|
|
61203
|
-
const [viewingArchivedId, setViewingArchivedId] =
|
|
61304
|
+
const [viewingArchivedId, setViewingArchivedId] = useState133(
|
|
61204
61305
|
null
|
|
61205
61306
|
);
|
|
61206
|
-
const [openingDialogId, setOpeningDialogId] =
|
|
61307
|
+
const [openingDialogId, setOpeningDialogId] = useState133(null);
|
|
61207
61308
|
const handleSelectDialog = useCallback61(
|
|
61208
61309
|
(id) => {
|
|
61209
61310
|
setViewingArchivedId(null);
|
|
@@ -61222,7 +61323,7 @@ function useChatDialogManager({
|
|
|
61222
61323
|
},
|
|
61223
61324
|
[selectDialog]
|
|
61224
61325
|
);
|
|
61225
|
-
const [restoreTarget, setRestoreTarget] =
|
|
61326
|
+
const [restoreTarget, setRestoreTarget] = useState133(null);
|
|
61226
61327
|
const handleConfirmRestore = useCallback61(async () => {
|
|
61227
61328
|
if (restoreTarget) {
|
|
61228
61329
|
try {
|
|
@@ -61315,9 +61416,9 @@ var SPLIT_MIN_WIDTH = HISTORY_RAIL_WIDTH + CHAT_BLOCK_MIN_WIDTH;
|
|
|
61315
61416
|
var RAIL_COLLAPSED_STORAGE_KEY = "mingo-chat-history-collapsed";
|
|
61316
61417
|
var RAIL_ANIM_MS = 320;
|
|
61317
61418
|
function useRailPresence(open) {
|
|
61318
|
-
const [mounted, setMounted] =
|
|
61319
|
-
const [active, setActive] =
|
|
61320
|
-
|
|
61419
|
+
const [mounted, setMounted] = useState134(open);
|
|
61420
|
+
const [active, setActive] = useState134(false);
|
|
61421
|
+
useEffect103(() => {
|
|
61321
61422
|
if (open) {
|
|
61322
61423
|
setMounted(true);
|
|
61323
61424
|
let raf2 = 0;
|
|
@@ -61535,7 +61636,7 @@ function SourceChips({
|
|
|
61535
61636
|
onClose,
|
|
61536
61637
|
onDiscuss
|
|
61537
61638
|
}) {
|
|
61538
|
-
const [expanded, setExpanded] =
|
|
61639
|
+
const [expanded, setExpanded] = useState134(false);
|
|
61539
61640
|
if (cited.length === 0) {
|
|
61540
61641
|
const fallback = uncited.slice(0, FALLBACK_TOP_RETRIEVED);
|
|
61541
61642
|
if (fallback.length === 0) return null;
|
|
@@ -61600,7 +61701,7 @@ function SourceChips({
|
|
|
61600
61701
|
)
|
|
61601
61702
|
] });
|
|
61602
61703
|
}
|
|
61603
|
-
var EmbeddableChat =
|
|
61704
|
+
var EmbeddableChat = React151.forwardRef(function EmbeddableChat2(props, ref) {
|
|
61604
61705
|
return /* @__PURE__ */ jsx401(EmbeddableChatInner, { ...props, handleRef: ref });
|
|
61605
61706
|
});
|
|
61606
61707
|
function EmbeddableChatInner({
|
|
@@ -61645,7 +61746,7 @@ function EmbeddableChatInner({
|
|
|
61645
61746
|
const commandsUrl = runtime.endpoints.commandsUrl;
|
|
61646
61747
|
const { attachmentsEnabled, user: identityUser } = useChatIdentity();
|
|
61647
61748
|
const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
|
|
61648
|
-
|
|
61749
|
+
useEffect103(() => {
|
|
61649
61750
|
if (process.env.NODE_ENV !== "production") {
|
|
61650
61751
|
const hasOpen = open !== void 0;
|
|
61651
61752
|
const hasHandler = onOpenChange !== void 0;
|
|
@@ -61661,13 +61762,13 @@ function EmbeddableChatInner({
|
|
|
61661
61762
|
defaultProp: defaultOpen ?? false,
|
|
61662
61763
|
onChange: onOpenChange
|
|
61663
61764
|
});
|
|
61664
|
-
const [autoFocusInput] =
|
|
61765
|
+
const [autoFocusInput] = useState134(() => {
|
|
61665
61766
|
if (typeof window === "undefined") return false;
|
|
61666
61767
|
return !window.matchMedia("(pointer: coarse)").matches;
|
|
61667
61768
|
});
|
|
61668
61769
|
usePreventScroll5({ isDisabled: !isOpen || shellLess });
|
|
61669
|
-
const navigatingAwayRef =
|
|
61670
|
-
|
|
61770
|
+
const navigatingAwayRef = useRef88(false);
|
|
61771
|
+
useEffect103(() => {
|
|
61671
61772
|
if (!isOpen) return;
|
|
61672
61773
|
if (shellLess) return;
|
|
61673
61774
|
if (typeof window === "undefined") return;
|
|
@@ -61693,8 +61794,8 @@ function EmbeddableChatInner({
|
|
|
61693
61794
|
window.scrollTo(0, scrollY);
|
|
61694
61795
|
};
|
|
61695
61796
|
}, [isOpen, shellLess]);
|
|
61696
|
-
const chatInputRef =
|
|
61697
|
-
const [quickActionPreview, setQuickActionPreview] =
|
|
61797
|
+
const chatInputRef = useRef88(null);
|
|
61798
|
+
const [quickActionPreview, setQuickActionPreview] = useState134(null);
|
|
61698
61799
|
const slashCommandsProp = useMemo58(
|
|
61699
61800
|
() => ({
|
|
61700
61801
|
fetchCommands: (prefix, signal) => fetchSlashCommands(prefix, signal, commandsUrl),
|
|
@@ -61739,7 +61840,7 @@ function EmbeddableChatInner({
|
|
|
61739
61840
|
}, [mingoState, mingoDialogCapabilities, effectiveModes]);
|
|
61740
61841
|
const hasMingoMode = !!effectiveModes.mingo || !!mingoState;
|
|
61741
61842
|
const initialActiveMode = controlledActiveMode ?? defaultActiveMode ?? (effectiveModes.guide ? "guide" : "mingo");
|
|
61742
|
-
const [uncontrolledActiveMode, setUncontrolledActiveMode] =
|
|
61843
|
+
const [uncontrolledActiveMode, setUncontrolledActiveMode] = useState134(initialActiveMode);
|
|
61743
61844
|
const activeMode = controlledActiveMode ?? uncontrolledActiveMode;
|
|
61744
61845
|
const handleActiveModeChange = useCallback62(
|
|
61745
61846
|
(next) => {
|
|
@@ -61801,8 +61902,8 @@ function EmbeddableChatInner({
|
|
|
61801
61902
|
hasMoreMessages,
|
|
61802
61903
|
loadMoreMessages
|
|
61803
61904
|
} = useUnifiedChat({ modes: effectiveModes, activeMode, mingoStateOverride: mingoState });
|
|
61804
|
-
const guidePromptSentRef =
|
|
61805
|
-
|
|
61905
|
+
const guidePromptSentRef = useRef88(false);
|
|
61906
|
+
useEffect103(() => {
|
|
61806
61907
|
if (!guidePendingPrompt) {
|
|
61807
61908
|
guidePromptSentRef.current = false;
|
|
61808
61909
|
return;
|
|
@@ -61823,15 +61924,15 @@ function EmbeddableChatInner({
|
|
|
61823
61924
|
const { panelRef: galleryPanelRef, modal: galleryModal } = useChatAttachmentImageGallery();
|
|
61824
61925
|
const contextMaxItems = contextPicker?.maxItems ?? 10;
|
|
61825
61926
|
const contextPickerForMode = activeMode === "mingo" ? contextPicker : void 0;
|
|
61826
|
-
const [contextItems, setContextItems] =
|
|
61827
|
-
const [contextPickerOpen, setContextPickerOpen] =
|
|
61828
|
-
const [mentionQuery, setMentionQuery] =
|
|
61829
|
-
const mentionActiveRef =
|
|
61830
|
-
|
|
61927
|
+
const [contextItems, setContextItems] = useState134([]);
|
|
61928
|
+
const [contextPickerOpen, setContextPickerOpen] = useState134(false);
|
|
61929
|
+
const [mentionQuery, setMentionQuery] = useState134(null);
|
|
61930
|
+
const mentionActiveRef = useRef88(false);
|
|
61931
|
+
useEffect103(() => {
|
|
61831
61932
|
mentionActiveRef.current = mentionQuery !== null;
|
|
61832
61933
|
}, [mentionQuery]);
|
|
61833
|
-
const mentionKeysRef =
|
|
61834
|
-
|
|
61934
|
+
const mentionKeysRef = useRef88(/* @__PURE__ */ new Set());
|
|
61935
|
+
useEffect103(() => {
|
|
61835
61936
|
setContextItems([]);
|
|
61836
61937
|
setMentionQuery(null);
|
|
61837
61938
|
mentionKeysRef.current.clear();
|
|
@@ -61927,7 +62028,7 @@ function EmbeddableChatInner({
|
|
|
61927
62028
|
() => effectiveAssistantIcon ? /* @__PURE__ */ jsx401(EntityIcon, { icon: effectiveAssistantIcon, size: 24 }) : /* @__PURE__ */ jsx401(MingoIcon, { className: "h-6 w-6", cornerColor: "var(--ods-flamingo-cyan-base)" }),
|
|
61928
62029
|
[effectiveAssistantIcon]
|
|
61929
62030
|
);
|
|
61930
|
-
const timestampCacheRef =
|
|
62031
|
+
const timestampCacheRef = useRef88(/* @__PURE__ */ new Map());
|
|
61931
62032
|
const guideUserName = activeMode === "guide" ? [identityUser?.firstName, identityUser?.lastName].filter(Boolean).join(" ").trim() || identityUser?.name?.trim() || void 0 : void 0;
|
|
61932
62033
|
const guideUserAvatar = activeMode === "guide" ? identityUser?.avatarUrl?.trim() || void 0 : void 0;
|
|
61933
62034
|
const messages = useMemo58(() => {
|
|
@@ -62065,7 +62166,7 @@ function EmbeddableChatInner({
|
|
|
62065
62166
|
});
|
|
62066
62167
|
const handleOpen = useCallback62(() => setIsOpen(true), [setIsOpen]);
|
|
62067
62168
|
useCloseOnNavigation(handleNavigationClose, null);
|
|
62068
|
-
|
|
62169
|
+
useEffect103(() => {
|
|
62069
62170
|
const handler = (e) => {
|
|
62070
62171
|
const detail = e.detail;
|
|
62071
62172
|
if (!detail || detail.source !== source) return;
|
|
@@ -62075,7 +62176,7 @@ function EmbeddableChatInner({
|
|
|
62075
62176
|
window.addEventListener("ask-ai:open-with-ref", handler);
|
|
62076
62177
|
return () => window.removeEventListener("ask-ai:open-with-ref", handler);
|
|
62077
62178
|
}, [source, discussRef, setIsOpen]);
|
|
62078
|
-
|
|
62179
|
+
useEffect103(() => {
|
|
62079
62180
|
const handler = (e) => {
|
|
62080
62181
|
const detail = e.detail;
|
|
62081
62182
|
if (!detail || detail.source !== source) return;
|
|
@@ -62092,7 +62193,7 @@ function EmbeddableChatInner({
|
|
|
62092
62193
|
const contentViewKey = hasConversation ? "conversation" : activeMode;
|
|
62093
62194
|
const isGuideEmpty = !hasConversation && activeMode === "guide";
|
|
62094
62195
|
const isQuickActionEmpty = !hasConversation && (activeMode === "guide" || activeMode === "mingo");
|
|
62095
|
-
|
|
62196
|
+
useEffect103(() => {
|
|
62096
62197
|
if (!isQuickActionEmpty) setQuickActionPreview(null);
|
|
62097
62198
|
}, [isQuickActionEmpty]);
|
|
62098
62199
|
const guideCanReturnToMingo = isGuideEmpty && hasMingoMode;
|
|
@@ -62134,11 +62235,11 @@ function EmbeddableChatInner({
|
|
|
62134
62235
|
const uncited = sources.filter((s) => !seenOrder.has(s.index));
|
|
62135
62236
|
return { cited, uncited };
|
|
62136
62237
|
}, [lastAssistantMsg, chatLoading]);
|
|
62137
|
-
const [portalHost, setPortalHost] =
|
|
62138
|
-
const [panelBoundary, setPanelBoundary] =
|
|
62139
|
-
const [panelWidth, setPanelWidth] =
|
|
62140
|
-
const panelMeasureRef =
|
|
62141
|
-
|
|
62238
|
+
const [portalHost, setPortalHost] = useState134(null);
|
|
62239
|
+
const [panelBoundary, setPanelBoundary] = useState134(null);
|
|
62240
|
+
const [panelWidth, setPanelWidth] = useState134(0);
|
|
62241
|
+
const panelMeasureRef = useRef88(null);
|
|
62242
|
+
useEffect103(() => {
|
|
62142
62243
|
const el = panelMeasureRef.current;
|
|
62143
62244
|
if (!el || typeof ResizeObserver === "undefined") return;
|
|
62144
62245
|
const ro = new ResizeObserver((entries) => {
|
|
@@ -62153,8 +62254,8 @@ function EmbeddableChatInner({
|
|
|
62153
62254
|
panelMeasureRef.current = node;
|
|
62154
62255
|
setPanelBoundary(node);
|
|
62155
62256
|
}, []);
|
|
62156
|
-
const [railCollapsed, setRailCollapsed] =
|
|
62157
|
-
|
|
62257
|
+
const [railCollapsed, setRailCollapsed] = useState134(false);
|
|
62258
|
+
useEffect103(() => {
|
|
62158
62259
|
try {
|
|
62159
62260
|
if (window.localStorage.getItem(RAIL_COLLAPSED_STORAGE_KEY) === "1")
|
|
62160
62261
|
setRailCollapsed(true);
|
|
@@ -62171,15 +62272,15 @@ function EmbeddableChatInner({
|
|
|
62171
62272
|
return next;
|
|
62172
62273
|
});
|
|
62173
62274
|
}, []);
|
|
62174
|
-
const [railSearchOpen, setRailSearchOpen] =
|
|
62275
|
+
const [railSearchOpen, setRailSearchOpen] = useState134(false);
|
|
62175
62276
|
const splitEligible = activeMode === "mingo";
|
|
62176
62277
|
const canSplit = panelWidth >= SPLIT_MIN_WIDTH;
|
|
62177
62278
|
const wideMingo = splitEligible && canSplit && !previewMode;
|
|
62178
62279
|
const splitActive = wideMingo && !railCollapsed;
|
|
62179
62280
|
const railPresence = useRailPresence(splitActive);
|
|
62180
62281
|
const showWideHeader = wideMingo || railPresence.mounted;
|
|
62181
|
-
const [composeOpen, setComposeOpen] =
|
|
62182
|
-
|
|
62282
|
+
const [composeOpen, setComposeOpen] = useState134(false);
|
|
62283
|
+
useEffect103(() => {
|
|
62183
62284
|
if (hasConversation) setComposeOpen(false);
|
|
62184
62285
|
}, [hasConversation]);
|
|
62185
62286
|
const isMingoMode = activeMode === "mingo";
|
|
@@ -63045,12 +63146,7 @@ export {
|
|
|
63045
63146
|
LinkedInEmbedClient,
|
|
63046
63147
|
OGLinkErrorBoundary,
|
|
63047
63148
|
OGLinkPreview,
|
|
63048
|
-
|
|
63049
|
-
toGoogleSheetsOriginalUrl,
|
|
63050
|
-
toFigmaEmbedUrl,
|
|
63051
|
-
isFigmaSlidesUrl,
|
|
63052
|
-
toFigmaOriginalUrl,
|
|
63053
|
-
toClaudeEmbedUrl,
|
|
63149
|
+
FullscreenSwitchController,
|
|
63054
63150
|
EmbedIframe,
|
|
63055
63151
|
EmbedViewerFrame,
|
|
63056
63152
|
FigmaEmbed,
|
|
@@ -63874,4 +63970,4 @@ export {
|
|
|
63874
63970
|
LogsList,
|
|
63875
63971
|
assets
|
|
63876
63972
|
};
|
|
63877
|
-
//# sourceMappingURL=chunk-
|
|
63973
|
+
//# sourceMappingURL=chunk-FE5QR7PT.js.map
|