@flamingo-stack/openframe-frontend-core 0.0.568 → 0.0.569-snapshot.20260827034838
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-2LKVYI7H.js → chunk-3H6NH2AD.js} +6 -6
- package/dist/{chunk-KZ3PIUCH.cjs → chunk-3YO2ZIZL.cjs} +14 -14
- package/dist/{chunk-KZ3PIUCH.cjs.map → chunk-3YO2ZIZL.cjs.map} +1 -1
- package/dist/{chunk-L22CSZZU.cjs → chunk-4BJ4FQPG.cjs} +18 -18
- package/dist/{chunk-L22CSZZU.cjs.map → chunk-4BJ4FQPG.cjs.map} +1 -1
- package/dist/{chunk-EYXZF46V.js → chunk-5NVVVIHJ.js} +1038 -922
- package/dist/chunk-5NVVVIHJ.js.map +1 -0
- package/dist/{chunk-P7QGTNEW.cjs → chunk-6WXL6CIL.cjs} +101 -101
- package/dist/{chunk-P7QGTNEW.cjs.map → chunk-6WXL6CIL.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-NK3M6F5A.cjs → chunk-AQ6MIFNX.cjs} +148 -13
- package/dist/chunk-AQ6MIFNX.cjs.map +1 -0
- package/dist/{chunk-6PWUUWCO.cjs → chunk-CSCAOET4.cjs} +42 -42
- package/dist/{chunk-6PWUUWCO.cjs.map → chunk-CSCAOET4.cjs.map} +1 -1
- package/dist/{chunk-6I76UK2Z.cjs → chunk-CYY2PEYQ.cjs} +3 -3
- package/dist/{chunk-6I76UK2Z.cjs.map → chunk-CYY2PEYQ.cjs.map} +1 -1
- package/dist/{chunk-Y2BYHTEN.cjs → chunk-D463PBIY.cjs} +23 -23
- package/dist/{chunk-Y2BYHTEN.cjs.map → chunk-D463PBIY.cjs.map} +1 -1
- package/dist/{chunk-NKEOD2AD.cjs → chunk-DP2L7US5.cjs} +3 -3
- package/dist/{chunk-NKEOD2AD.cjs.map → chunk-DP2L7US5.cjs.map} +1 -1
- package/dist/{chunk-KZS2DFC2.cjs → chunk-GDPPFPLD.cjs} +42 -42
- package/dist/{chunk-KZS2DFC2.cjs.map → chunk-GDPPFPLD.cjs.map} +1 -1
- package/dist/{chunk-LNUXUOPN.cjs → chunk-HJCXSI7R.cjs} +4 -4
- package/dist/{chunk-LNUXUOPN.cjs.map → chunk-HJCXSI7R.cjs.map} +1 -1
- package/dist/{chunk-RBYMJF2V.cjs → chunk-I7CFA5DO.cjs} +35 -35
- package/dist/{chunk-RBYMJF2V.cjs.map → chunk-I7CFA5DO.cjs.map} +1 -1
- package/dist/{chunk-LXWQLUBR.cjs → chunk-IJA26YDA.cjs} +9 -7
- package/dist/chunk-IJA26YDA.cjs.map +1 -0
- package/dist/{chunk-O3JCKEVG.js → chunk-KYDVOX5J.js} +2 -2
- package/dist/{chunk-UWY722RH.js → chunk-MR6RRXSD.js} +1 -1
- package/dist/chunk-MR6RRXSD.js.map +1 -0
- package/dist/{chunk-HB3IG2MC.js → chunk-MT7IDGCM.js} +3 -3
- package/dist/{chunk-G2PAUMV6.js → chunk-MTORQ4LY.js} +4 -4
- package/dist/{chunk-HKG7BZON.cjs → chunk-PS2TV7WG.cjs} +14 -14
- package/dist/{chunk-HKG7BZON.cjs.map → chunk-PS2TV7WG.cjs.map} +1 -1
- package/dist/{chunk-QVQLNKFS.js → chunk-PTDRJCPW.js} +2 -2
- package/dist/{chunk-DZ2Z7HRF.js → chunk-QIU5B2ZD.js} +3 -3
- package/dist/{chunk-6RSKK4E7.cjs → chunk-RVCCJB6M.cjs} +1278 -1162
- package/dist/chunk-RVCCJB6M.cjs.map +1 -0
- package/dist/{chunk-T7AE7CKV.cjs → chunk-T4MB5TX6.cjs} +7 -7
- package/dist/{chunk-T7AE7CKV.cjs.map → chunk-T4MB5TX6.cjs.map} +1 -1
- package/dist/{chunk-ZARYIFCI.js → chunk-TQER4FVN.js} +5 -3
- package/dist/{chunk-ZARYIFCI.js.map → chunk-TQER4FVN.js.map} +1 -1
- package/dist/{chunk-BZ7B255K.js → chunk-U6NPZMNT.js} +9 -9
- package/dist/{chunk-MQQM4NCN.js → chunk-VZQKENQU.js} +3 -3
- package/dist/{chunk-VEXTUGUA.js → chunk-XWMEHLDK.js} +7 -7
- package/dist/{chunk-ZNEVGXMU.js → chunk-YFLKONLB.js} +139 -4
- package/dist/chunk-YFLKONLB.js.map +1 -0
- package/dist/{chunk-ZXASQL3E.js → chunk-YYESWAAQ.js} +4 -4
- package/dist/{chunk-6TDWCBQM.js → chunk-Z3MSD6ZE.js} +7 -7
- package/dist/{chunk-DHTT77AG.cjs → chunk-Z7DXVKVT.cjs} +78 -78
- package/dist/{chunk-DHTT77AG.cjs.map → chunk-Z7DXVKVT.cjs.map} +1 -1
- package/dist/{chunk-KL6ZDLDF.js → chunk-ZAYZ7JHF.js} +2 -2
- package/dist/{chunk-ZIZJDXUI.js → chunk-ZTGWMXJK.js} +2 -2
- 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 +17 -2
- 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 +38 -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 +50 -14
- package/src/components/embeds/embed-viewer-frame.tsx +103 -5
- 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 +103 -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-2LKVYI7H.js.map → chunk-3H6NH2AD.js.map} +0 -0
- /package/dist/{chunk-O3JCKEVG.js.map → chunk-KYDVOX5J.js.map} +0 -0
- /package/dist/{chunk-HB3IG2MC.js.map → chunk-MT7IDGCM.js.map} +0 -0
- /package/dist/{chunk-G2PAUMV6.js.map → chunk-MTORQ4LY.js.map} +0 -0
- /package/dist/{chunk-QVQLNKFS.js.map → chunk-PTDRJCPW.js.map} +0 -0
- /package/dist/{chunk-DZ2Z7HRF.js.map → chunk-QIU5B2ZD.js.map} +0 -0
- /package/dist/{chunk-BZ7B255K.js.map → chunk-U6NPZMNT.js.map} +0 -0
- /package/dist/{chunk-MQQM4NCN.js.map → chunk-VZQKENQU.js.map} +0 -0
- /package/dist/{chunk-VEXTUGUA.js.map → chunk-XWMEHLDK.js.map} +0 -0
- /package/dist/{chunk-ZXASQL3E.js.map → chunk-YYESWAAQ.js.map} +0 -0
- /package/dist/{chunk-6TDWCBQM.js.map → chunk-Z3MSD6ZE.js.map} +0 -0
- /package/dist/{chunk-KL6ZDLDF.js.map → chunk-ZAYZ7JHF.js.map} +0 -0
- /package/dist/{chunk-ZIZJDXUI.js.map → chunk-ZTGWMXJK.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-YFLKONLB.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 { Loader2 as Loader22, 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";
|
|
@@ -24964,54 +25014,116 @@ function EmbedViewerFrame({
|
|
|
24964
25014
|
titleVariant = "h3",
|
|
24965
25015
|
actions,
|
|
24966
25016
|
src,
|
|
25017
|
+
isLoading,
|
|
24967
25018
|
emptyIcon,
|
|
24968
25019
|
emptyMessage = "Content not available",
|
|
25020
|
+
loadingMessage = "Loading\u2026",
|
|
24969
25021
|
height,
|
|
24970
25022
|
allow,
|
|
24971
25023
|
allowFullScreen,
|
|
24972
25024
|
loading,
|
|
24973
25025
|
sandbox,
|
|
24974
|
-
className
|
|
25026
|
+
className,
|
|
25027
|
+
fullscreenControl
|
|
24975
25028
|
}) {
|
|
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
|
-
|
|
25029
|
+
const frameRef = useRef36(null);
|
|
25030
|
+
const [isFullscreen, setIsFullscreen] = useState55(false);
|
|
25031
|
+
const controllerRef = useRef36(null);
|
|
25032
|
+
useEffect46(() => {
|
|
25033
|
+
if (!fullscreenControl) return;
|
|
25034
|
+
const controller = new FullscreenSwitchController({
|
|
25035
|
+
target: () => frameRef.current,
|
|
25036
|
+
onFullscreenChange: setIsFullscreen
|
|
25037
|
+
});
|
|
25038
|
+
controllerRef.current = controller;
|
|
25039
|
+
controller.attach();
|
|
25040
|
+
return () => {
|
|
25041
|
+
controllerRef.current = null;
|
|
25042
|
+
controller.detach();
|
|
25043
|
+
};
|
|
25044
|
+
}, [fullscreenControl]);
|
|
25045
|
+
const toggleFullscreen = () => controllerRef.current?.toggle();
|
|
25046
|
+
return /* @__PURE__ */ jsxs130(
|
|
25047
|
+
"div",
|
|
25048
|
+
{
|
|
25049
|
+
ref: frameRef,
|
|
25050
|
+
className: cn(
|
|
25051
|
+
"space-y-[var(--spacing-system-mf)]",
|
|
25052
|
+
className,
|
|
25053
|
+
// Fullscreen paints its own ground (the fullscreened element
|
|
25054
|
+
// otherwise sits on the UA's black backdrop) and scrolls itself.
|
|
25055
|
+
isFullscreen && "overflow-auto bg-ods-bg p-[var(--spacing-system-mf)]"
|
|
25056
|
+
),
|
|
25057
|
+
children: [
|
|
25058
|
+
/* @__PURE__ */ jsxs130("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between", children: [
|
|
25059
|
+
/* @__PURE__ */ jsxs130("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
25060
|
+
icon,
|
|
25061
|
+
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 })
|
|
25062
|
+
] }),
|
|
25063
|
+
fullscreenControl && src ? /* @__PURE__ */ jsxs130("div", { className: "flex flex-col gap-[var(--spacing-system-xsf)] sm:flex-row sm:items-center", children: [
|
|
25064
|
+
actions,
|
|
25065
|
+
/* @__PURE__ */ jsx170(
|
|
25066
|
+
Button,
|
|
25067
|
+
{
|
|
25068
|
+
variant: "outline",
|
|
25069
|
+
size: "small-legacy",
|
|
25070
|
+
onClick: toggleFullscreen,
|
|
25071
|
+
"aria-label": isFullscreen ? "Exit fullscreen" : "Enter fullscreen",
|
|
25072
|
+
leftIcon: isFullscreen ? /* @__PURE__ */ jsx170(Minimize2, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx170(Maximize2, { className: "w-4 h-4" }),
|
|
25073
|
+
className: "w-full sm:w-auto",
|
|
25074
|
+
children: isFullscreen ? "Exit fullscreen" : "Fullscreen"
|
|
25075
|
+
}
|
|
25076
|
+
)
|
|
25077
|
+
] }) : actions
|
|
25078
|
+
] }),
|
|
25079
|
+
src ? /* @__PURE__ */ jsx170(
|
|
25080
|
+
EmbedIframe,
|
|
25081
|
+
{
|
|
25082
|
+
src,
|
|
25083
|
+
title,
|
|
25084
|
+
height: isFullscreen ? "calc(100vh - 96px)" : height,
|
|
25085
|
+
allow,
|
|
25086
|
+
allowFullScreen,
|
|
25087
|
+
loading,
|
|
25088
|
+
sandbox
|
|
25089
|
+
}
|
|
25090
|
+
) : isLoading ? (
|
|
25091
|
+
// SAME box as the empty/iframe state (height + border), so a viewer
|
|
25092
|
+
// resolving its frame doesn't collapse then jump — it reads as
|
|
25093
|
+
// "loading" and settles into the iframe in place.
|
|
25094
|
+
/* @__PURE__ */ jsxs130(
|
|
25095
|
+
"div",
|
|
25096
|
+
{
|
|
25097
|
+
className: "flex flex-col items-center justify-center gap-3 rounded-lg border border-ods-border px-4 py-16 text-center",
|
|
25098
|
+
style: height ? { height } : void 0,
|
|
25099
|
+
children: [
|
|
25100
|
+
/* @__PURE__ */ jsx170(Loader22, { className: "h-8 w-8 animate-spin text-ods-accent" }),
|
|
25101
|
+
/* @__PURE__ */ jsx170("p", { className: "text-ods-text-secondary", children: loadingMessage })
|
|
25102
|
+
]
|
|
25103
|
+
}
|
|
25104
|
+
)
|
|
25105
|
+
) : (
|
|
25106
|
+
// The SAME box the iframe would have filled: same height, same rounded
|
|
25107
|
+
// border. A viewer whose content is missing must not collapse the page
|
|
25108
|
+
// around it — two embeds side by side (a figma frame and a claude link
|
|
25109
|
+
// that has no embeddable view) have to read as two equal blocks.
|
|
25110
|
+
// Without a `height` the caller never asked for a fixed box, so the
|
|
25111
|
+
// intrinsic `py-16` stands.
|
|
25112
|
+
/* @__PURE__ */ jsxs130(
|
|
25113
|
+
"div",
|
|
25114
|
+
{
|
|
25115
|
+
className: "flex flex-col items-center justify-center rounded-lg border border-ods-border px-4 py-16 text-center",
|
|
25116
|
+
style: height ? { height } : void 0,
|
|
25117
|
+
children: [
|
|
25118
|
+
emptyIcon,
|
|
25119
|
+
/* @__PURE__ */ jsx170("p", { className: "text-ods-text-secondary", children: emptyMessage })
|
|
25120
|
+
]
|
|
25121
|
+
}
|
|
25122
|
+
)
|
|
25123
|
+
)
|
|
25124
|
+
]
|
|
25125
|
+
}
|
|
25126
|
+
);
|
|
25015
25127
|
}
|
|
25016
25128
|
|
|
25017
25129
|
// src/components/embeds/figma-embed.tsx
|
|
@@ -25054,7 +25166,7 @@ function SlidesViewToggle({
|
|
|
25054
25166
|
);
|
|
25055
25167
|
}
|
|
25056
25168
|
function FigmaEmbed({ url, title, height, loading = "lazy" }) {
|
|
25057
|
-
const [view, setView] =
|
|
25169
|
+
const [view, setView] = useState56("present");
|
|
25058
25170
|
const isSlides = url ? isFigmaSlidesUrl(url) : false;
|
|
25059
25171
|
const embedSrc = url ? toFigmaEmbedUrl(url, { slidesView: view }) : null;
|
|
25060
25172
|
const originalUrl = (() => {
|
|
@@ -25113,7 +25225,9 @@ var KIND_HEADING = {
|
|
|
25113
25225
|
design: "Claude Design"
|
|
25114
25226
|
};
|
|
25115
25227
|
function ClaudeEmbed({ url, kind = "artifact", title, height, loading = "lazy" }) {
|
|
25116
|
-
const
|
|
25228
|
+
const { src: mirrorSrc, status } = useClaudeMirrorSrc(url);
|
|
25229
|
+
const isProbing = status === "probing";
|
|
25230
|
+
const embedUrl = isProbing ? null : mirrorSrc ?? toClaudeEmbedUrl(url);
|
|
25117
25231
|
return /* @__PURE__ */ jsx172(
|
|
25118
25232
|
EmbedViewerFrame,
|
|
25119
25233
|
{
|
|
@@ -25121,6 +25235,8 @@ function ClaudeEmbed({ url, kind = "artifact", title, height, loading = "lazy" }
|
|
|
25121
25235
|
icon: /* @__PURE__ */ jsx172(ClaudeIcon, { className: "w-5 h-5 shrink-0" }),
|
|
25122
25236
|
title: title?.trim() || KIND_HEADING[kind],
|
|
25123
25237
|
titleVariant: "h6",
|
|
25238
|
+
isLoading: isProbing,
|
|
25239
|
+
loadingMessage: "Loading artifact\u2026",
|
|
25124
25240
|
actions: /* @__PURE__ */ jsx172(
|
|
25125
25241
|
Button,
|
|
25126
25242
|
{
|
|
@@ -25135,10 +25251,11 @@ function ClaudeEmbed({ url, kind = "artifact", title, height, loading = "lazy" }
|
|
|
25135
25251
|
}
|
|
25136
25252
|
),
|
|
25137
25253
|
src: embedUrl,
|
|
25254
|
+
fullscreenControl: true,
|
|
25138
25255
|
loading,
|
|
25139
25256
|
height,
|
|
25140
25257
|
allow: "clipboard-write; clipboard-read; fullscreen",
|
|
25141
|
-
sandbox: "allow-scripts allow-same-origin allow-popups allow-forms",
|
|
25258
|
+
sandbox: mirrorSrc ? "allow-scripts allow-popups allow-forms" : "allow-scripts allow-same-origin allow-popups allow-forms",
|
|
25142
25259
|
allowFullScreen: true,
|
|
25143
25260
|
emptyIcon: /* @__PURE__ */ jsx172(ClaudeIcon, { className: "w-16 h-16 mb-4" }),
|
|
25144
25261
|
emptyMessage: "Open this one in Claude \xB7 it has no embeddable view"
|
|
@@ -25147,14 +25264,14 @@ function ClaudeEmbed({ url, kind = "artifact", title, height, loading = "lazy" }
|
|
|
25147
25264
|
}
|
|
25148
25265
|
|
|
25149
25266
|
// src/components/embeds/markdown-image.tsx
|
|
25150
|
-
import { useEffect as
|
|
25267
|
+
import { useEffect as useEffect47, useState as useState57 } from "react";
|
|
25151
25268
|
import { jsx as jsx173 } from "react/jsx-runtime";
|
|
25152
25269
|
var MAX_H_REM = 32;
|
|
25153
25270
|
var DISPLAY_W = 768;
|
|
25154
25271
|
function MarkdownImage({ src, alt }) {
|
|
25155
25272
|
const { transformImageSrc } = useRichMarkdownRuntime();
|
|
25156
|
-
const [ratio, setRatio] =
|
|
25157
|
-
|
|
25273
|
+
const [ratio, setRatio] = useState57(null);
|
|
25274
|
+
useEffect47(() => {
|
|
25158
25275
|
let cancelled = false;
|
|
25159
25276
|
setRatio(null);
|
|
25160
25277
|
const probeSrc = transformImageSrc(src, { width: 48, resize: "contain", quality: 20 }) ?? src;
|
|
@@ -25641,7 +25758,7 @@ function ReleaseChangelogSection({
|
|
|
25641
25758
|
icon,
|
|
25642
25759
|
MarkdownRenderer = RichMarkdownRenderer
|
|
25643
25760
|
}) {
|
|
25644
|
-
const [collapsed, setCollapsed] =
|
|
25761
|
+
const [collapsed, setCollapsed] = useState58(collapsible ? defaultCollapsed : false);
|
|
25645
25762
|
if (!entries || entries.length === 0) return null;
|
|
25646
25763
|
const inPreviewMode = previewFirst && !collapsible;
|
|
25647
25764
|
const showEntries = !collapsible || !collapsed;
|
|
@@ -25837,7 +25954,7 @@ function StatusIndicator({ status, label, href }) {
|
|
|
25837
25954
|
}
|
|
25838
25955
|
|
|
25839
25956
|
// src/components/ui/hover-dropdown.tsx
|
|
25840
|
-
import { useState as
|
|
25957
|
+
import { useState as useState59, useRef as useRef37, useCallback as useCallback24 } from "react";
|
|
25841
25958
|
import { Fragment as Fragment39, jsx as jsx180, jsxs as jsxs137 } from "react/jsx-runtime";
|
|
25842
25959
|
function DefaultAnchor({
|
|
25843
25960
|
href,
|
|
@@ -25854,9 +25971,9 @@ function HoverDropdown({
|
|
|
25854
25971
|
className,
|
|
25855
25972
|
renderAnchor
|
|
25856
25973
|
}) {
|
|
25857
|
-
const [open, setOpen] =
|
|
25858
|
-
const timeoutRef =
|
|
25859
|
-
const containerRef =
|
|
25974
|
+
const [open, setOpen] = useState59(false);
|
|
25975
|
+
const timeoutRef = useRef37(void 0);
|
|
25976
|
+
const containerRef = useRef37(null);
|
|
25860
25977
|
const show = useCallback24(() => {
|
|
25861
25978
|
clearTimeout(timeoutRef.current);
|
|
25862
25979
|
setOpen(true);
|
|
@@ -25989,11 +26106,11 @@ function BackButton({ label = "Back", className, type = "button", ...props }) {
|
|
|
25989
26106
|
|
|
25990
26107
|
// src/components/layout/list-page-layout.tsx
|
|
25991
26108
|
init_cn();
|
|
25992
|
-
import { useEffect as
|
|
26109
|
+
import { useEffect as useEffect49, useState as useState61 } from "react";
|
|
25993
26110
|
|
|
25994
26111
|
// src/components/ui/filter-modal.tsx
|
|
25995
26112
|
init_cn();
|
|
25996
|
-
import { useEffect as
|
|
26113
|
+
import { useEffect as useEffect48, useState as useState60 } from "react";
|
|
25997
26114
|
init_button2();
|
|
25998
26115
|
|
|
25999
26116
|
// src/components/ui/filter-checkbox-item.tsx
|
|
@@ -26190,15 +26307,15 @@ function FilterModal({
|
|
|
26190
26307
|
emptyStateTitle = "No filters available",
|
|
26191
26308
|
emptyStateDescription = "There are no filter options to display at the moment"
|
|
26192
26309
|
}) {
|
|
26193
|
-
const [selectedFilters, setSelectedFilters] =
|
|
26310
|
+
const [selectedFilters, setSelectedFilters] = useState60(() => {
|
|
26194
26311
|
return { ...currentFilters };
|
|
26195
26312
|
});
|
|
26196
|
-
const [pendingTags, setPendingTags] =
|
|
26313
|
+
const [pendingTags, setPendingTags] = useState60(selectedTags ?? []);
|
|
26197
26314
|
const dateDefaultSort = dateFilter?.defaultSort ?? "desc";
|
|
26198
|
-
const [draftDateSort, setDraftDateSort] =
|
|
26199
|
-
const [draftDateRange, setDraftDateRange] =
|
|
26315
|
+
const [draftDateSort, setDraftDateSort] = useState60(dateFilter?.sort ?? dateDefaultSort);
|
|
26316
|
+
const [draftDateRange, setDraftDateRange] = useState60(dateFilter?.range);
|
|
26200
26317
|
const { scrollRef, fadeTop, fadeBottom, update: updateFade } = useScrollFade();
|
|
26201
|
-
|
|
26318
|
+
useEffect48(() => {
|
|
26202
26319
|
if (isOpen) {
|
|
26203
26320
|
setSelectedFilters({ ...currentFilters });
|
|
26204
26321
|
setPendingTags(selectedTags ?? []);
|
|
@@ -26357,7 +26474,7 @@ init_cn();
|
|
|
26357
26474
|
|
|
26358
26475
|
// src/components/ui/page-actions.tsx
|
|
26359
26476
|
init_cn();
|
|
26360
|
-
import
|
|
26477
|
+
import React87 from "react";
|
|
26361
26478
|
init_button2();
|
|
26362
26479
|
import { Fragment as Fragment41, jsx as jsx186, jsxs as jsxs143 } from "react/jsx-runtime";
|
|
26363
26480
|
function actionKey(action, idx) {
|
|
@@ -26537,7 +26654,7 @@ function IconButtonsVariant({
|
|
|
26537
26654
|
/* @__PURE__ */ jsxs143("div", { className: cn("hidden md:flex items-center", ACTIONS_GAP, className), children: [
|
|
26538
26655
|
selector,
|
|
26539
26656
|
loading ? /* @__PURE__ */ jsx186(ActionSkeletons, { actions: desktopActions }) : /* @__PURE__ */ jsxs143(Fragment41, { children: [
|
|
26540
|
-
desktopActions.map((action, idx) => /* @__PURE__ */ jsx186(
|
|
26657
|
+
desktopActions.map((action, idx) => /* @__PURE__ */ jsx186(React87.Fragment, { children: renderActionButton(action) }, actionKey(action, idx))),
|
|
26541
26658
|
hasMenuActions && /* @__PURE__ */ jsx186(ActionsMenuDropdown, { groups: menuActions })
|
|
26542
26659
|
] })
|
|
26543
26660
|
] }),
|
|
@@ -26560,7 +26677,7 @@ function PrimaryButtonsVariant({
|
|
|
26560
26677
|
// No overflow trigger in this variant — an unknown action set settles
|
|
26561
26678
|
// into a labelled button, not a square one.
|
|
26562
26679
|
/* @__PURE__ */ jsx186(ActionSkeletons, { actions: desktopActions, emptyFallback: "label" })
|
|
26563
|
-
) : desktopActions.map((action, idx) => /* @__PURE__ */ jsx186(
|
|
26680
|
+
) : desktopActions.map((action, idx) => /* @__PURE__ */ jsx186(React87.Fragment, { children: renderActionButton(action) }, `desktop-${actionKey(action, idx)}`)) }),
|
|
26564
26681
|
/* @__PURE__ */ jsx186(MobileBottomActions, { actions: sortedActions, loading })
|
|
26565
26682
|
] });
|
|
26566
26683
|
}
|
|
@@ -26583,7 +26700,7 @@ function MenuPrimaryVariant({
|
|
|
26583
26700
|
selector,
|
|
26584
26701
|
loading ? /* @__PURE__ */ jsx186(ActionSkeletons, { actions: desktopActions }) : /* @__PURE__ */ jsxs143(Fragment41, { children: [
|
|
26585
26702
|
hasMenuActions && /* @__PURE__ */ jsx186(ActionsMenuDropdown, { groups: menuActions }),
|
|
26586
|
-
desktopActions.map((action, idx) => /* @__PURE__ */ jsx186(
|
|
26703
|
+
desktopActions.map((action, idx) => /* @__PURE__ */ jsx186(React87.Fragment, { children: renderActionButton({ ...action, variant: action.variant || "accent" }) }, `desktop-${actionKey(action, idx)}`))
|
|
26587
26704
|
] })
|
|
26588
26705
|
] }),
|
|
26589
26706
|
/* @__PURE__ */ jsx186("div", { className: cn("flex md:hidden", className), children: loading ? /* @__PURE__ */ jsx186(MobileTriggerSkeleton, {}) : hasMobileMenuItems ? /* @__PURE__ */ jsx186(ActionsMenuDropdown, { groups: mobileMenuGroups }) : null })
|
|
@@ -26598,7 +26715,7 @@ function MobileBottomActions({ actions, loading }) {
|
|
|
26598
26715
|
// fixed variant is what keeps the 24px the bar has always had.
|
|
26599
26716
|
"flex items-start p-[var(--spacing-system-lf)]",
|
|
26600
26717
|
ACTIONS_GAP
|
|
26601
|
-
), children: loading ? /* @__PURE__ */ jsx186(ActionSkeletons, { actions, fullWidth: true, emptyFallback: "label" }) : actions.map((action, idx) => /* @__PURE__ */ jsx186(
|
|
26718
|
+
), 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
26719
|
}
|
|
26603
26720
|
function usePageActionsBottomPadding(variant) {
|
|
26604
26721
|
return variant === "primary-buttons" || variant === "menu-primary" ? "pb-40 md:pb-0" : "";
|
|
@@ -26820,13 +26937,13 @@ function ListPageLayout({
|
|
|
26820
26937
|
mobileFilterTitle,
|
|
26821
26938
|
stickyHeader = false
|
|
26822
26939
|
}) {
|
|
26823
|
-
const [mobileFilterOpen, setMobileFilterOpen] =
|
|
26824
|
-
const [localSearchValue, setLocalSearchValue] =
|
|
26940
|
+
const [mobileFilterOpen, setMobileFilterOpen] = useState61(false);
|
|
26941
|
+
const [localSearchValue, setLocalSearchValue] = useState61(searchValue);
|
|
26825
26942
|
const debouncedSearchValue = useDebounce(localSearchValue, 500);
|
|
26826
|
-
|
|
26943
|
+
useEffect49(() => {
|
|
26827
26944
|
setLocalSearchValue(searchValue);
|
|
26828
26945
|
}, [searchValue]);
|
|
26829
|
-
|
|
26946
|
+
useEffect49(() => {
|
|
26830
26947
|
if (debouncedSearchValue !== searchValue) {
|
|
26831
26948
|
onSearch(debouncedSearchValue);
|
|
26832
26949
|
}
|
|
@@ -26899,13 +27016,13 @@ init_cn();
|
|
|
26899
27016
|
init_cn();
|
|
26900
27017
|
|
|
26901
27018
|
// src/components/ui/entity-image.tsx
|
|
26902
|
-
import
|
|
27019
|
+
import React89 from "react";
|
|
26903
27020
|
init_cn();
|
|
26904
27021
|
import { jsx as jsx189 } from "react/jsx-runtime";
|
|
26905
27022
|
function EntityImage({ src, alt, fallbackText, className }) {
|
|
26906
27023
|
const resolvedSrc = useAuthedImageSrc(src);
|
|
26907
|
-
const [imageFailed, setImageFailed] =
|
|
26908
|
-
|
|
27024
|
+
const [imageFailed, setImageFailed] = React89.useState(false);
|
|
27025
|
+
React89.useEffect(() => {
|
|
26909
27026
|
setImageFailed(false);
|
|
26910
27027
|
}, [resolvedSrc]);
|
|
26911
27028
|
const showFallback = imageFailed || !resolvedSrc;
|
|
@@ -27133,12 +27250,12 @@ function ArticleDetailLayout({ children, schemas, contentClassName }) {
|
|
|
27133
27250
|
|
|
27134
27251
|
// src/components/toggle-group.tsx
|
|
27135
27252
|
init_cn();
|
|
27136
|
-
import * as
|
|
27253
|
+
import * as React91 from "react";
|
|
27137
27254
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
27138
27255
|
|
|
27139
27256
|
// src/components/ui/toggle.tsx
|
|
27140
27257
|
init_cn();
|
|
27141
|
-
import * as
|
|
27258
|
+
import * as React90 from "react";
|
|
27142
27259
|
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
27143
27260
|
import { cva as cva9 } from "class-variance-authority";
|
|
27144
27261
|
import { jsx as jsx193 } from "react/jsx-runtime";
|
|
@@ -27162,7 +27279,7 @@ var toggleVariants = cva9(
|
|
|
27162
27279
|
}
|
|
27163
27280
|
}
|
|
27164
27281
|
);
|
|
27165
|
-
var Toggle =
|
|
27282
|
+
var Toggle = React90.forwardRef(({ className, variant, size: size2, ...props }, ref) => /* @__PURE__ */ jsx193(
|
|
27166
27283
|
TogglePrimitive.Root,
|
|
27167
27284
|
{
|
|
27168
27285
|
ref,
|
|
@@ -27174,11 +27291,11 @@ Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
|
27174
27291
|
|
|
27175
27292
|
// src/components/toggle-group.tsx
|
|
27176
27293
|
import { jsx as jsx194 } from "react/jsx-runtime";
|
|
27177
|
-
var ToggleGroupContext =
|
|
27294
|
+
var ToggleGroupContext = React91.createContext({
|
|
27178
27295
|
size: "default",
|
|
27179
27296
|
variant: "default"
|
|
27180
27297
|
});
|
|
27181
|
-
var ToggleGroup =
|
|
27298
|
+
var ToggleGroup = React91.forwardRef(({ className, variant, size: size2, children, ...props }, ref) => /* @__PURE__ */ jsx194(
|
|
27182
27299
|
ToggleGroupPrimitive.Root,
|
|
27183
27300
|
{
|
|
27184
27301
|
ref,
|
|
@@ -27188,8 +27305,8 @@ var ToggleGroup = React90.forwardRef(({ className, variant, size: size2, childre
|
|
|
27188
27305
|
}
|
|
27189
27306
|
));
|
|
27190
27307
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
27191
|
-
var ToggleGroupItem =
|
|
27192
|
-
const context =
|
|
27308
|
+
var ToggleGroupItem = React91.forwardRef(({ className, children, variant, size: size2, value, ...props }, ref) => {
|
|
27309
|
+
const context = React91.useContext(ToggleGroupContext);
|
|
27193
27310
|
return /* @__PURE__ */ jsx194(
|
|
27194
27311
|
ToggleGroupPrimitive.Item,
|
|
27195
27312
|
{
|
|
@@ -27210,7 +27327,7 @@ var ToggleGroupItem = React90.forwardRef(({ className, children, variant, size:
|
|
|
27210
27327
|
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
27211
27328
|
|
|
27212
27329
|
// src/components/ui/benefit-card.tsx
|
|
27213
|
-
import
|
|
27330
|
+
import React92 from "react";
|
|
27214
27331
|
|
|
27215
27332
|
// src/utils/index.ts
|
|
27216
27333
|
init_cn();
|
|
@@ -29322,7 +29439,7 @@ var BenefitCardGrid = ({
|
|
|
29322
29439
|
className = "",
|
|
29323
29440
|
columns = 2
|
|
29324
29441
|
}) => {
|
|
29325
|
-
const childrenArray =
|
|
29442
|
+
const childrenArray = React92.Children.toArray(children);
|
|
29326
29443
|
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
29444
|
return /* @__PURE__ */ jsx195("div", { className: cn(
|
|
29328
29445
|
"bg-ods-card rounded-lg shadow-ods-card border border-ods-border overflow-hidden",
|
|
@@ -29343,7 +29460,7 @@ var BenefitCardGrid = ({
|
|
|
29343
29460
|
} else {
|
|
29344
29461
|
borderClass = isLastItem ? "border-b-0" : "border-b md:border-b-0 md:border-r border-ods-border";
|
|
29345
29462
|
}
|
|
29346
|
-
return
|
|
29463
|
+
return React92.cloneElement(child, {
|
|
29347
29464
|
key: index,
|
|
29348
29465
|
className: borderClass
|
|
29349
29466
|
});
|
|
@@ -29352,7 +29469,7 @@ var BenefitCardGrid = ({
|
|
|
29352
29469
|
|
|
29353
29470
|
// src/components/ui/brand-association-card.tsx
|
|
29354
29471
|
init_button2();
|
|
29355
|
-
import
|
|
29472
|
+
import React93 from "react";
|
|
29356
29473
|
import { ExternalLink as ExternalLink5 } from "lucide-react";
|
|
29357
29474
|
import { jsx as jsx196, jsxs as jsxs150 } from "react/jsx-runtime";
|
|
29358
29475
|
function BrandAssociationCard({
|
|
@@ -29360,7 +29477,7 @@ function BrandAssociationCard({
|
|
|
29360
29477
|
className = ""
|
|
29361
29478
|
}) {
|
|
29362
29479
|
const renderIcon = () => {
|
|
29363
|
-
if (
|
|
29480
|
+
if (React93.isValidElement(item.icon)) {
|
|
29364
29481
|
return item.icon;
|
|
29365
29482
|
}
|
|
29366
29483
|
const IconComponent = item.icon;
|
|
@@ -29461,10 +29578,10 @@ function BulletList({
|
|
|
29461
29578
|
|
|
29462
29579
|
// src/components/ui/chevron-button.tsx
|
|
29463
29580
|
init_cn();
|
|
29464
|
-
import * as
|
|
29581
|
+
import * as React94 from "react";
|
|
29465
29582
|
import { ChevronUp as ChevronUp2, ChevronDown as ChevronDown6 } from "lucide-react";
|
|
29466
29583
|
import { jsx as jsx199 } from "react/jsx-runtime";
|
|
29467
|
-
var ChevronButton =
|
|
29584
|
+
var ChevronButton = React94.forwardRef(
|
|
29468
29585
|
({ className, direction = "down", size: size2 = "md", isExpanded, backgroundColor, borderColor, ...props }, ref) => {
|
|
29469
29586
|
const Icon2 = (isExpanded ? ChevronUp2 : ChevronDown6) || (direction === "up" ? ChevronUp2 : ChevronDown6);
|
|
29470
29587
|
const sizeClasses2 = {
|
|
@@ -30199,9 +30316,9 @@ function HighlightCardGrid({
|
|
|
30199
30316
|
|
|
30200
30317
|
// src/components/ui/icons-block.tsx
|
|
30201
30318
|
init_cn();
|
|
30202
|
-
import * as
|
|
30319
|
+
import * as React95 from "react";
|
|
30203
30320
|
import { jsx as jsx211 } from "react/jsx-runtime";
|
|
30204
|
-
var IconsBlock =
|
|
30321
|
+
var IconsBlock = React95.forwardRef(
|
|
30205
30322
|
({ className, icons = [], size: size2 = "md", ...props }, ref) => {
|
|
30206
30323
|
const sizeClasses2 = {
|
|
30207
30324
|
sm: "h-4 w-4",
|
|
@@ -30236,7 +30353,7 @@ IconsBlock.displayName = "IconsBlock";
|
|
|
30236
30353
|
|
|
30237
30354
|
// src/components/ui/dropdown-button.tsx
|
|
30238
30355
|
init_cn();
|
|
30239
|
-
import
|
|
30356
|
+
import React96 from "react";
|
|
30240
30357
|
init_button2();
|
|
30241
30358
|
import { jsx as jsx212 } from "react/jsx-runtime";
|
|
30242
30359
|
function DropdownButton({
|
|
@@ -30254,11 +30371,11 @@ function DropdownButton({
|
|
|
30254
30371
|
side = "bottom",
|
|
30255
30372
|
onCloseAutoFocus
|
|
30256
30373
|
}) {
|
|
30257
|
-
const [open, setOpen] =
|
|
30258
|
-
|
|
30374
|
+
const [open, setOpen] = React96.useState(false);
|
|
30375
|
+
React96.useEffect(() => {
|
|
30259
30376
|
if (disabled || loading) setOpen(false);
|
|
30260
30377
|
}, [disabled, loading]);
|
|
30261
|
-
const handleOpenChange =
|
|
30378
|
+
const handleOpenChange = React96.useCallback(
|
|
30262
30379
|
(next) => {
|
|
30263
30380
|
if (next && (disabled || loading)) return;
|
|
30264
30381
|
setOpen(next);
|
|
@@ -30500,14 +30617,14 @@ function OrganizationCard({
|
|
|
30500
30617
|
|
|
30501
30618
|
// src/components/ui/service-card.tsx
|
|
30502
30619
|
init_cn();
|
|
30503
|
-
import { useMemo as useMemo46, useState as
|
|
30620
|
+
import { useMemo as useMemo46, useState as useState104 } from "react";
|
|
30504
30621
|
import { ExternalLink as ExternalLink9 } from "lucide-react";
|
|
30505
30622
|
|
|
30506
30623
|
// src/components/providers/dynamic-theme-provider.tsx
|
|
30507
30624
|
import { createContext as createContext7, useContext as useContext7 } from "react";
|
|
30508
30625
|
|
|
30509
30626
|
// src/hooks/use-dynamic-theming.ts
|
|
30510
|
-
import { useState as
|
|
30627
|
+
import { useState as useState62, useEffect as useEffect50 } from "react";
|
|
30511
30628
|
var defaultTheme = {
|
|
30512
30629
|
primaryColor: "#FFC008",
|
|
30513
30630
|
secondaryColor: "#161616",
|
|
@@ -30516,9 +30633,9 @@ var defaultTheme = {
|
|
|
30516
30633
|
textColor: "#161616"
|
|
30517
30634
|
};
|
|
30518
30635
|
function useDynamicTheming() {
|
|
30519
|
-
const [theme, setTheme] =
|
|
30520
|
-
const [isDark, setIsDark] =
|
|
30521
|
-
|
|
30636
|
+
const [theme, setTheme] = useState62(defaultTheme);
|
|
30637
|
+
const [isDark, setIsDark] = useState62(false);
|
|
30638
|
+
useEffect50(() => {
|
|
30522
30639
|
const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
30523
30640
|
setIsDark(mediaQuery.matches);
|
|
30524
30641
|
const handleChange = (e) => {
|
|
@@ -30557,7 +30674,7 @@ function useDynamicTheme() {
|
|
|
30557
30674
|
}
|
|
30558
30675
|
|
|
30559
30676
|
// src/components/providers/theme-provider.tsx
|
|
30560
|
-
import * as
|
|
30677
|
+
import * as React97 from "react";
|
|
30561
30678
|
import {
|
|
30562
30679
|
ThemeProvider as NextThemesProvider,
|
|
30563
30680
|
useTheme as useNextTheme
|
|
@@ -30584,14 +30701,14 @@ function ThemeProvider({ children, ...overrides }) {
|
|
|
30584
30701
|
var useTheme = useNextTheme;
|
|
30585
30702
|
function useThemeToggle() {
|
|
30586
30703
|
const { resolvedTheme, theme, setTheme } = useTheme();
|
|
30587
|
-
const [mounted, setMounted] =
|
|
30588
|
-
|
|
30704
|
+
const [mounted, setMounted] = React97.useState(false);
|
|
30705
|
+
React97.useEffect(() => setMounted(true), []);
|
|
30589
30706
|
const active = mounted ? resolvedTheme === "light" || theme === "light" ? "light" : "dark" : DEFAULT_THEME;
|
|
30590
|
-
const setOdsTheme =
|
|
30707
|
+
const setOdsTheme = React97.useCallback(
|
|
30591
30708
|
(next) => setTheme(next),
|
|
30592
30709
|
[setTheme]
|
|
30593
30710
|
);
|
|
30594
|
-
const toggle =
|
|
30711
|
+
const toggle = React97.useCallback(
|
|
30595
30712
|
() => setTheme(active === "dark" ? "light" : "dark"),
|
|
30596
30713
|
[active, setTheme]
|
|
30597
30714
|
);
|
|
@@ -30606,8 +30723,8 @@ function useThemeToggle() {
|
|
|
30606
30723
|
}
|
|
30607
30724
|
|
|
30608
30725
|
// src/components/features/array-entry-manager.tsx
|
|
30609
|
-
import { useState as
|
|
30610
|
-
import { Trash2, Plus as Plus2, Save, Loader2 as
|
|
30726
|
+
import { useState as useState64, useEffect as useEffect52 } from "react";
|
|
30727
|
+
import { Trash2, Plus as Plus2, Save, Loader2 as Loader23 } from "lucide-react";
|
|
30611
30728
|
import { jsx as jsx217, jsxs as jsxs165 } from "react/jsx-runtime";
|
|
30612
30729
|
function ArrayEntryManager({
|
|
30613
30730
|
title,
|
|
@@ -30627,14 +30744,14 @@ function ArrayEntryManager({
|
|
|
30627
30744
|
titlePlaceholder,
|
|
30628
30745
|
isSaving = false
|
|
30629
30746
|
}) {
|
|
30630
|
-
const [draftItems, setDraftItems] =
|
|
30631
|
-
const [isDirty, setIsDirty] =
|
|
30632
|
-
|
|
30747
|
+
const [draftItems, setDraftItems] = useState64(items);
|
|
30748
|
+
const [isDirty, setIsDirty] = useState64(false);
|
|
30749
|
+
useEffect52(() => {
|
|
30633
30750
|
if (!isDirty && !isSaving) {
|
|
30634
30751
|
setDraftItems(items);
|
|
30635
30752
|
}
|
|
30636
30753
|
}, [items, isDirty, isSaving]);
|
|
30637
|
-
|
|
30754
|
+
useEffect52(() => {
|
|
30638
30755
|
if (onDirtyChange) {
|
|
30639
30756
|
onDirtyChange(isDirty);
|
|
30640
30757
|
}
|
|
@@ -30691,7 +30808,7 @@ function ArrayEntryManager({
|
|
|
30691
30808
|
size: "small-legacy",
|
|
30692
30809
|
onClick: handleSave,
|
|
30693
30810
|
disabled: isSaving,
|
|
30694
|
-
leftIcon: isSaving ? /* @__PURE__ */ jsx217(
|
|
30811
|
+
leftIcon: isSaving ? /* @__PURE__ */ jsx217(Loader23, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx217(Save, { className: "h-4 w-4" }),
|
|
30695
30812
|
className: "text-h6 bg-ods-accent text-ods-text-on-accent hover:bg-ods-accent-hover",
|
|
30696
30813
|
children: isSaving ? "Saving..." : saveButtonText
|
|
30697
30814
|
}
|
|
@@ -30884,10 +31001,10 @@ init_button2();
|
|
|
30884
31001
|
|
|
30885
31002
|
// src/components/ui/password-input.tsx
|
|
30886
31003
|
init_cn();
|
|
30887
|
-
import * as
|
|
31004
|
+
import * as React98 from "react";
|
|
30888
31005
|
import { jsx as jsx222 } from "react/jsx-runtime";
|
|
30889
|
-
var PasswordInput =
|
|
30890
|
-
const [visible, setVisible] =
|
|
31006
|
+
var PasswordInput = React98.forwardRef(({ disabled, className, ...props }, ref) => {
|
|
31007
|
+
const [visible, setVisible] = React98.useState(false);
|
|
30891
31008
|
const Icon2 = visible ? EyeOffIcon : EyeIcon2;
|
|
30892
31009
|
return /* @__PURE__ */ jsx222(
|
|
30893
31010
|
Input,
|
|
@@ -31769,7 +31886,7 @@ function SsoAuthShell({ children, className }) {
|
|
|
31769
31886
|
|
|
31770
31887
|
// src/components/features/provider-button.tsx
|
|
31771
31888
|
init_button2();
|
|
31772
|
-
import { useState as
|
|
31889
|
+
import { useState as useState66 } from "react";
|
|
31773
31890
|
import { jsx as jsx233 } from "react/jsx-runtime";
|
|
31774
31891
|
var PROVIDER_CONFIG = {
|
|
31775
31892
|
microsoft: {
|
|
@@ -31794,7 +31911,7 @@ var PROVIDER_CONFIG = {
|
|
|
31794
31911
|
}
|
|
31795
31912
|
};
|
|
31796
31913
|
function ProviderButton({ provider, onClick, disabled = false, loading = false }) {
|
|
31797
|
-
const [internalLoading, setInternalLoading] =
|
|
31914
|
+
const [internalLoading, setInternalLoading] = useState66(false);
|
|
31798
31915
|
const config = PROVIDER_CONFIG[provider];
|
|
31799
31916
|
const IconComponent = config.icon;
|
|
31800
31917
|
const isLoading = loading || internalLoading;
|
|
@@ -31878,7 +31995,7 @@ function AuthProvidersList({
|
|
|
31878
31995
|
|
|
31879
31996
|
// src/components/features/changelog-manager.tsx
|
|
31880
31997
|
import { Trash2 as Trash22, Plus as Plus3, ChevronDown as ChevronDown7, ChevronUp as ChevronUp3, Eye as Eye3, EyeOff } from "lucide-react";
|
|
31881
|
-
import { useState as
|
|
31998
|
+
import { useState as useState67, useEffect as useEffect53 } from "react";
|
|
31882
31999
|
import { jsx as jsx235, jsxs as jsxs179 } from "react/jsx-runtime";
|
|
31883
32000
|
function ChangelogManager({
|
|
31884
32001
|
title,
|
|
@@ -31888,8 +32005,8 @@ function ChangelogManager({
|
|
|
31888
32005
|
expandAll = false,
|
|
31889
32006
|
showVisibilityToggle = false
|
|
31890
32007
|
}) {
|
|
31891
|
-
const [expandedIndices, setExpandedIndices] =
|
|
31892
|
-
|
|
32008
|
+
const [expandedIndices, setExpandedIndices] = useState67(/* @__PURE__ */ new Set());
|
|
32009
|
+
useEffect53(() => {
|
|
31893
32010
|
if (expandAll && entries.length > 0) {
|
|
31894
32011
|
setExpandedIndices(new Set(entries.map((_, i) => i)));
|
|
31895
32012
|
}
|
|
@@ -32250,7 +32367,7 @@ var ErrorBoundary = class extends Component3 {
|
|
|
32250
32367
|
|
|
32251
32368
|
// src/components/features/figma-prototype-viewer.tsx
|
|
32252
32369
|
init_cn();
|
|
32253
|
-
import { useState as
|
|
32370
|
+
import { useState as useState68, useRef as useRef38, useEffect as useEffect54, useCallback as useCallback26, useMemo as useMemo34 } from "react";
|
|
32254
32371
|
|
|
32255
32372
|
// src/components/features/section-selector.tsx
|
|
32256
32373
|
init_cn();
|
|
@@ -32619,27 +32736,27 @@ var FigmaPrototypeViewer = ({
|
|
|
32619
32736
|
}) => {
|
|
32620
32737
|
const clientId = process.env.NEXT_PUBLIC_FIGMA_CLIENT_ID || "UTQPwZHR9OZp68TTGPFFi5";
|
|
32621
32738
|
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] =
|
|
32739
|
+
const iframeRef = useRef38(null);
|
|
32740
|
+
const containerRef = useRef38(null);
|
|
32741
|
+
const navTimerRef = useRef38(null);
|
|
32742
|
+
const touchTimerRef = useRef38(null);
|
|
32743
|
+
const [screenWidth, setScreenWidth] = useState68(
|
|
32627
32744
|
typeof window !== "undefined" ? window.innerWidth : DESKTOP_BREAKPOINT
|
|
32628
32745
|
);
|
|
32629
|
-
const [isTouchDevice, setIsTouchDevice] =
|
|
32746
|
+
const [isTouchDevice, setIsTouchDevice] = useState68(() => {
|
|
32630
32747
|
if (typeof window === "undefined") return false;
|
|
32631
32748
|
return "ontouchstart" in window;
|
|
32632
32749
|
});
|
|
32633
|
-
const [iframeState, setIframeState] =
|
|
32634
|
-
const [iframeKey, setIframeKey] =
|
|
32635
|
-
const [isInitialized, setIsInitialized] =
|
|
32636
|
-
const [currentNodeId, setCurrentNodeId] =
|
|
32637
|
-
const [internalActiveSection, setInternalActiveSection] =
|
|
32750
|
+
const [iframeState, setIframeState] = useState68("INITIAL");
|
|
32751
|
+
const [iframeKey, setIframeKey] = useState68(0);
|
|
32752
|
+
const [isInitialized, setIsInitialized] = useState68(false);
|
|
32753
|
+
const [currentNodeId, setCurrentNodeId] = useState68(null);
|
|
32754
|
+
const [internalActiveSection, setInternalActiveSection] = useState68(
|
|
32638
32755
|
config.defaultSectionId || config.sections[0]?.id || ""
|
|
32639
32756
|
);
|
|
32640
32757
|
const activeSection = externalActiveSection || internalActiveSection;
|
|
32641
|
-
const [isNavigating, setIsNavigating] =
|
|
32642
|
-
const [containerDimensions, setContainerDimensions] =
|
|
32758
|
+
const [isNavigating, setIsNavigating] = useState68(false);
|
|
32759
|
+
const [containerDimensions, setContainerDimensions] = useState68({ width: 1200, height: 800 });
|
|
32643
32760
|
const viewMode = useMemo34(
|
|
32644
32761
|
() => getViewMode(screenWidth, isTouchDevice),
|
|
32645
32762
|
[screenWidth, isTouchDevice]
|
|
@@ -32688,7 +32805,7 @@ var FigmaPrototypeViewer = ({
|
|
|
32688
32805
|
embedUrl,
|
|
32689
32806
|
iframeKey
|
|
32690
32807
|
]);
|
|
32691
|
-
|
|
32808
|
+
useEffect54(() => {
|
|
32692
32809
|
const handleResize = () => {
|
|
32693
32810
|
const newWidth = window.innerWidth;
|
|
32694
32811
|
setScreenWidth(newWidth);
|
|
@@ -32701,8 +32818,8 @@ var FigmaPrototypeViewer = ({
|
|
|
32701
32818
|
window.addEventListener("resize", handleResize);
|
|
32702
32819
|
return () => window.removeEventListener("resize", handleResize);
|
|
32703
32820
|
}, []);
|
|
32704
|
-
const [lastViewMode, setLastViewMode] =
|
|
32705
|
-
|
|
32821
|
+
const [lastViewMode, setLastViewMode] = useState68(viewMode);
|
|
32822
|
+
useEffect54(() => {
|
|
32706
32823
|
if (lastViewMode !== viewMode && iframeState === "READY") {
|
|
32707
32824
|
console.log("[ViewMode Change]", lastViewMode, "\u2192", viewMode);
|
|
32708
32825
|
setIframeState("RELOADING");
|
|
@@ -32710,7 +32827,7 @@ var FigmaPrototypeViewer = ({
|
|
|
32710
32827
|
}
|
|
32711
32828
|
setLastViewMode(viewMode);
|
|
32712
32829
|
}, [viewMode, lastViewMode, iframeState]);
|
|
32713
|
-
|
|
32830
|
+
useEffect54(() => {
|
|
32714
32831
|
const handleVisibilityChange = () => {
|
|
32715
32832
|
if (document.visibilityState === "visible" && iframeState === "READY") {
|
|
32716
32833
|
console.log("[Sleep Recovery] Reloading iframe after sleep");
|
|
@@ -32721,7 +32838,7 @@ var FigmaPrototypeViewer = ({
|
|
|
32721
32838
|
document.addEventListener("visibilitychange", handleVisibilityChange);
|
|
32722
32839
|
return () => document.removeEventListener("visibilitychange", handleVisibilityChange);
|
|
32723
32840
|
}, [iframeState]);
|
|
32724
|
-
|
|
32841
|
+
useEffect54(() => {
|
|
32725
32842
|
const handleMessage = (event) => {
|
|
32726
32843
|
if (event.origin !== "https://www.figma.com") return;
|
|
32727
32844
|
const validEvents = ["INITIAL_LOAD", "NEW_STATE", "PRESENTED_NODE_CHANGED"];
|
|
@@ -32805,12 +32922,12 @@ var FigmaPrototypeViewer = ({
|
|
|
32805
32922
|
}
|
|
32806
32923
|
}, 500);
|
|
32807
32924
|
}, []);
|
|
32808
|
-
|
|
32925
|
+
useEffect54(() => {
|
|
32809
32926
|
if (externalActiveSection && externalActiveSection !== activeSection && isInitialized) {
|
|
32810
32927
|
navigateToSection(externalActiveSection);
|
|
32811
32928
|
}
|
|
32812
32929
|
}, [externalActiveSection, activeSection, isInitialized, navigateToSection]);
|
|
32813
|
-
|
|
32930
|
+
useEffect54(() => {
|
|
32814
32931
|
return () => {
|
|
32815
32932
|
if (navTimerRef.current) clearTimeout(navTimerRef.current);
|
|
32816
32933
|
if (touchTimerRef.current) clearTimeout(touchTimerRef.current);
|
|
@@ -32913,7 +33030,7 @@ var FigmaPrototypeViewer = ({
|
|
|
32913
33030
|
|
|
32914
33031
|
// src/components/features/filters-dropdown.tsx
|
|
32915
33032
|
init_cn();
|
|
32916
|
-
import { useEffect as
|
|
33033
|
+
import { useEffect as useEffect55, useRef as useRef39, useState as useState69 } from "react";
|
|
32917
33034
|
import { jsx as jsx242, jsxs as jsxs185 } from "react/jsx-runtime";
|
|
32918
33035
|
var FilterCheckbox = ({ checked, disabled = false, className }) => {
|
|
32919
33036
|
return /* @__PURE__ */ jsx242(
|
|
@@ -32945,15 +33062,15 @@ var FiltersDropdown = ({
|
|
|
32945
33062
|
placement = "bottom-start",
|
|
32946
33063
|
responsive = true
|
|
32947
33064
|
}) => {
|
|
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
|
-
|
|
33065
|
+
const [isOpen, setIsOpen] = useState69(false);
|
|
33066
|
+
const [shouldRender, setShouldRender] = useState69(false);
|
|
33067
|
+
const [isVisible, setIsVisible] = useState69(false);
|
|
33068
|
+
const [isMobile, setIsMobile] = useState69(false);
|
|
33069
|
+
const [actualPlacement, setActualPlacement] = useState69(placement);
|
|
33070
|
+
const dropdownRef = useRef39(null);
|
|
33071
|
+
const triggerRef = useRef39(null);
|
|
33072
|
+
const containerRef = useRef39(null);
|
|
33073
|
+
useEffect55(() => {
|
|
32957
33074
|
if (isOpen) {
|
|
32958
33075
|
setShouldRender(true);
|
|
32959
33076
|
let id2 = 0;
|
|
@@ -32969,7 +33086,7 @@ var FiltersDropdown = ({
|
|
|
32969
33086
|
const t = setTimeout(() => setShouldRender(false), ANIMATION_MS);
|
|
32970
33087
|
return () => clearTimeout(t);
|
|
32971
33088
|
}, [isOpen]);
|
|
32972
|
-
|
|
33089
|
+
useEffect55(() => {
|
|
32973
33090
|
if (!responsive) {
|
|
32974
33091
|
setIsMobile(false);
|
|
32975
33092
|
return;
|
|
@@ -32981,7 +33098,7 @@ var FiltersDropdown = ({
|
|
|
32981
33098
|
window.addEventListener("resize", checkMobile);
|
|
32982
33099
|
return () => window.removeEventListener("resize", checkMobile);
|
|
32983
33100
|
}, [responsive]);
|
|
32984
|
-
|
|
33101
|
+
useEffect55(() => {
|
|
32985
33102
|
if (!isOpen || isMobile || !triggerRef.current) return;
|
|
32986
33103
|
const calculateOptimalPlacement = () => {
|
|
32987
33104
|
const trigger = triggerRef.current;
|
|
@@ -33007,7 +33124,7 @@ var FiltersDropdown = ({
|
|
|
33007
33124
|
window.addEventListener("resize", calculateOptimalPlacement);
|
|
33008
33125
|
return () => window.removeEventListener("resize", calculateOptimalPlacement);
|
|
33009
33126
|
}, [isOpen, isMobile, placement]);
|
|
33010
|
-
const [selectedFilters, setSelectedFilters] =
|
|
33127
|
+
const [selectedFilters, setSelectedFilters] = useState69(() => {
|
|
33011
33128
|
if (currentFilters) {
|
|
33012
33129
|
return { ...currentFilters };
|
|
33013
33130
|
}
|
|
@@ -33018,12 +33135,12 @@ var FiltersDropdown = ({
|
|
|
33018
33135
|
return initial;
|
|
33019
33136
|
});
|
|
33020
33137
|
const currentFiltersStr = currentFilters ? JSON.stringify(currentFilters) : "";
|
|
33021
|
-
|
|
33138
|
+
useEffect55(() => {
|
|
33022
33139
|
if (currentFilters) {
|
|
33023
33140
|
setSelectedFilters({ ...currentFilters });
|
|
33024
33141
|
}
|
|
33025
33142
|
}, [currentFiltersStr]);
|
|
33026
|
-
|
|
33143
|
+
useEffect55(() => {
|
|
33027
33144
|
const handleClickOutside = (event) => {
|
|
33028
33145
|
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
33029
33146
|
setIsOpen(false);
|
|
@@ -33039,7 +33156,7 @@ var FiltersDropdown = ({
|
|
|
33039
33156
|
};
|
|
33040
33157
|
}
|
|
33041
33158
|
}, [isOpen]);
|
|
33042
|
-
|
|
33159
|
+
useEffect55(() => {
|
|
33043
33160
|
const handleEscape = (e) => {
|
|
33044
33161
|
if (e.key === "Escape" && isOpen) {
|
|
33045
33162
|
setIsOpen(false);
|
|
@@ -33224,7 +33341,7 @@ var FiltersDropdown = ({
|
|
|
33224
33341
|
] });
|
|
33225
33342
|
};
|
|
33226
33343
|
var useFiltersDropdown = (initialSections) => {
|
|
33227
|
-
const [appliedFilters, setAppliedFilters] =
|
|
33344
|
+
const [appliedFilters, setAppliedFilters] = useState69(() => {
|
|
33228
33345
|
const initial = {};
|
|
33229
33346
|
initialSections.forEach((section) => {
|
|
33230
33347
|
if (section.defaultSelected) {
|
|
@@ -33303,13 +33420,13 @@ function KnowledgeBaseLinksManager({
|
|
|
33303
33420
|
}
|
|
33304
33421
|
|
|
33305
33422
|
// src/components/features/loading-provider.tsx
|
|
33306
|
-
import { createContext as createContext8, useContext as useContext8, useState as
|
|
33423
|
+
import { createContext as createContext8, useContext as useContext8, useState as useState70, useEffect as useEffect56 } from "react";
|
|
33307
33424
|
import { jsx as jsx245, jsxs as jsxs186 } from "react/jsx-runtime";
|
|
33308
33425
|
var LoadingContext = createContext8(void 0);
|
|
33309
33426
|
function LoadingProvider({ children }) {
|
|
33310
|
-
const [isLoading, setIsLoading] =
|
|
33311
|
-
const [progress, setProgress] =
|
|
33312
|
-
|
|
33427
|
+
const [isLoading, setIsLoading] = useState70(false);
|
|
33428
|
+
const [progress, setProgress] = useState70(0);
|
|
33429
|
+
useEffect56(() => {
|
|
33313
33430
|
let interval;
|
|
33314
33431
|
if (isLoading) {
|
|
33315
33432
|
setProgress(10);
|
|
@@ -33354,13 +33471,13 @@ function useLoading() {
|
|
|
33354
33471
|
}
|
|
33355
33472
|
|
|
33356
33473
|
// src/components/features/media-gallery-manager.tsx
|
|
33357
|
-
import { useState as
|
|
33474
|
+
import { useState as useState71, useRef as useRef40, useCallback as useCallback27 } from "react";
|
|
33358
33475
|
import {
|
|
33359
33476
|
Upload,
|
|
33360
33477
|
Image as ImageIcon2,
|
|
33361
33478
|
Video as VideoIcon,
|
|
33362
33479
|
Trash2 as Trash23,
|
|
33363
|
-
Loader2 as
|
|
33480
|
+
Loader2 as Loader24,
|
|
33364
33481
|
GripVertical,
|
|
33365
33482
|
Plus as Plus4
|
|
33366
33483
|
} from "lucide-react";
|
|
@@ -33374,9 +33491,9 @@ function MediaGalleryManager({
|
|
|
33374
33491
|
modalTitle = "Media Gallery",
|
|
33375
33492
|
className = ""
|
|
33376
33493
|
}) {
|
|
33377
|
-
const fileInputRef =
|
|
33378
|
-
const [deletingIndex, setDeletingIndex] =
|
|
33379
|
-
const [draggedIndex, setDraggedIndex] =
|
|
33494
|
+
const fileInputRef = useRef40(null);
|
|
33495
|
+
const [deletingIndex, setDeletingIndex] = useState71(null);
|
|
33496
|
+
const [draggedIndex, setDraggedIndex] = useState71(null);
|
|
33380
33497
|
const handleFileSelect = useCallback27(async (event) => {
|
|
33381
33498
|
const file = event.target.files?.[0];
|
|
33382
33499
|
if (!file) return;
|
|
@@ -33447,7 +33564,7 @@ function MediaGalleryManager({
|
|
|
33447
33564
|
onClick: () => handleDeleteMedia(index),
|
|
33448
33565
|
disabled: isDeleting,
|
|
33449
33566
|
className: "h-8 w-8 p-0 bg-ods-error hover:bg-ods-error-hover border-ods-error",
|
|
33450
|
-
children: isDeleting ? /* @__PURE__ */ jsx246(
|
|
33567
|
+
children: isDeleting ? /* @__PURE__ */ jsx246(Loader24, { className: "h-4 w-4 animate-spin text-ods-text-on-dark" }) : /* @__PURE__ */ jsx246(Trash23, { className: "h-4 w-4 text-ods-text-on-dark" })
|
|
33451
33568
|
}
|
|
33452
33569
|
) }),
|
|
33453
33570
|
/* @__PURE__ */ jsx246("div", { className: "aspect-video relative bg-ods-bg rounded-lg overflow-hidden", children: mediaItem.media_type === "video" || mediaItem.media_type === "demo" ? (
|
|
@@ -33478,7 +33595,7 @@ function MediaGalleryManager({
|
|
|
33478
33595
|
}, [deletingIndex, handleDragStart, handleDragOver, handleDrop, handleDeleteMedia]);
|
|
33479
33596
|
const content = /* @__PURE__ */ jsxs187("div", { className: `space-y-6 ${className}`, children: [
|
|
33480
33597
|
/* @__PURE__ */ jsx246("div", { className: "border-2 border-dashed border-ods-border rounded-lg p-6 text-center hover:border-ods-accent/50 transition-colors", children: /* @__PURE__ */ jsxs187("div", { className: "flex flex-col items-center gap-4", children: [
|
|
33481
|
-
/* @__PURE__ */ jsx246("div", { className: "w-12 h-12 rounded-full bg-ods-card flex items-center justify-center", children: isUploading ? /* @__PURE__ */ jsx246(
|
|
33598
|
+
/* @__PURE__ */ jsx246("div", { className: "w-12 h-12 rounded-full bg-ods-card flex items-center justify-center", children: isUploading ? /* @__PURE__ */ jsx246(Loader24, { className: "h-6 w-6 animate-spin text-ods-accent" }) : /* @__PURE__ */ jsx246(Upload, { className: "h-6 w-6 text-ods-accent" }) }),
|
|
33482
33599
|
/* @__PURE__ */ jsxs187("div", { children: [
|
|
33483
33600
|
/* @__PURE__ */ jsx246("h3", { className: "text-h3 text-ods-text-primary mb-1", children: isUploading ? "Uploading..." : "Upload Media" }),
|
|
33484
33601
|
/* @__PURE__ */ jsx246("p", { className: "text-h6 text-ods-text-secondary", children: "Drag and drop or click to select images and videos" }),
|
|
@@ -33582,7 +33699,7 @@ function OSTypeBadgeGroup({
|
|
|
33582
33699
|
}
|
|
33583
33700
|
|
|
33584
33701
|
// src/components/features/parallax-image-showcase.tsx
|
|
33585
|
-
import { useEffect as
|
|
33702
|
+
import { useEffect as useEffect57, useState as useState72, useRef as useRef41 } from "react";
|
|
33586
33703
|
import { motion, useScroll, useTransform, useMotionValue, useSpring } from "framer-motion";
|
|
33587
33704
|
import { jsx as jsx249, jsxs as jsxs189 } from "react/jsx-runtime";
|
|
33588
33705
|
var ParallaxImageShowcase = ({
|
|
@@ -33600,9 +33717,9 @@ var ParallaxImageShowcase = ({
|
|
|
33600
33717
|
const springConfig = { stiffness: 100, damping: 30 };
|
|
33601
33718
|
const mouseXSpring = useSpring(mouseX, springConfig);
|
|
33602
33719
|
const mouseYSpring = useSpring(mouseY, springConfig);
|
|
33603
|
-
const [componentRect, setComponentRect] =
|
|
33604
|
-
const componentRef =
|
|
33605
|
-
|
|
33720
|
+
const [componentRect, setComponentRect] = useState72(null);
|
|
33721
|
+
const componentRef = useRef41(null);
|
|
33722
|
+
useEffect57(() => {
|
|
33606
33723
|
const updateRect = () => {
|
|
33607
33724
|
if (componentRef.current) {
|
|
33608
33725
|
setComponentRect(componentRef.current.getBoundingClientRect());
|
|
@@ -33616,7 +33733,7 @@ var ParallaxImageShowcase = ({
|
|
|
33616
33733
|
window.removeEventListener("scroll", updateRect);
|
|
33617
33734
|
};
|
|
33618
33735
|
}, []);
|
|
33619
|
-
|
|
33736
|
+
useEffect57(() => {
|
|
33620
33737
|
const handleGlobalMouseMove = (e) => {
|
|
33621
33738
|
if (!componentRect) return;
|
|
33622
33739
|
const centerX = componentRect.left + componentRect.width / 2;
|
|
@@ -34141,8 +34258,8 @@ function PushButtonSelector({
|
|
|
34141
34258
|
}
|
|
34142
34259
|
|
|
34143
34260
|
// src/components/features/release-media-manager.tsx
|
|
34144
|
-
import { useState as
|
|
34145
|
-
import { Trash2 as Trash24, Plus as Plus5, Image as ImageIcon3, Video as VideoIcon2, Upload as Upload2, Loader2 as
|
|
34261
|
+
import { useState as useState73, useRef as useRef42 } from "react";
|
|
34262
|
+
import { Trash2 as Trash24, Plus as Plus5, Image as ImageIcon3, Video as VideoIcon2, Upload as Upload2, Loader2 as Loader25, GripVertical as GripVertical2 } from "lucide-react";
|
|
34146
34263
|
import { jsx as jsx253, jsxs as jsxs193 } from "react/jsx-runtime";
|
|
34147
34264
|
function ReleaseMediaManager({
|
|
34148
34265
|
media,
|
|
@@ -34150,8 +34267,8 @@ function ReleaseMediaManager({
|
|
|
34150
34267
|
onUpload,
|
|
34151
34268
|
className = ""
|
|
34152
34269
|
}) {
|
|
34153
|
-
const fileInputRef =
|
|
34154
|
-
const [uploadingIndex, setUploadingIndex] =
|
|
34270
|
+
const fileInputRef = useRef42(null);
|
|
34271
|
+
const [uploadingIndex, setUploadingIndex] = useState73(null);
|
|
34155
34272
|
const handleFileSelect = async (event) => {
|
|
34156
34273
|
const file = event.target.files?.[0];
|
|
34157
34274
|
if (!file) return;
|
|
@@ -34222,7 +34339,7 @@ function ReleaseMediaManager({
|
|
|
34222
34339
|
};
|
|
34223
34340
|
return /* @__PURE__ */ jsxs193("div", { className: `space-y-4 ${className}`, children: [
|
|
34224
34341
|
/* @__PURE__ */ jsx253("div", { className: "border-2 border-dashed border-ods-border rounded-lg p-6 text-center hover:border-ods-accent/50 transition-colors", children: /* @__PURE__ */ jsxs193("div", { className: "flex flex-col items-center gap-4", children: [
|
|
34225
|
-
/* @__PURE__ */ jsx253("div", { className: "w-12 h-12 rounded-full bg-ods-card flex items-center justify-center", children: uploadingIndex !== null ? /* @__PURE__ */ jsx253(
|
|
34342
|
+
/* @__PURE__ */ jsx253("div", { className: "w-12 h-12 rounded-full bg-ods-card flex items-center justify-center", children: uploadingIndex !== null ? /* @__PURE__ */ jsx253(Loader25, { className: "h-6 w-6 animate-spin text-ods-accent" }) : /* @__PURE__ */ jsx253(Upload2, { className: "h-6 w-6 text-ods-accent" }) }),
|
|
34226
34343
|
/* @__PURE__ */ jsxs193("div", { children: [
|
|
34227
34344
|
/* @__PURE__ */ jsx253("h3", { className: "text-h3 text-ods-text-primary mb-1", children: uploadingIndex !== null ? "Uploading..." : "Upload Media" }),
|
|
34228
34345
|
/* @__PURE__ */ jsx253("p", { className: "text-h6 text-ods-text-secondary", children: "Drag and drop or click to select images and videos" }),
|
|
@@ -34298,7 +34415,7 @@ function ReleaseMediaManager({
|
|
|
34298
34415
|
}
|
|
34299
34416
|
) }),
|
|
34300
34417
|
item._uploading && /* @__PURE__ */ jsx253("div", { className: "aspect-video bg-ods-bg flex items-center justify-center", children: /* @__PURE__ */ jsxs193("div", { className: "flex flex-col items-center gap-2", children: [
|
|
34301
|
-
/* @__PURE__ */ jsx253(
|
|
34418
|
+
/* @__PURE__ */ jsx253(Loader25, { className: "h-8 w-8 animate-spin text-ods-accent" }),
|
|
34302
34419
|
/* @__PURE__ */ jsx253("span", { className: "text-h6 text-ods-text-secondary", children: "Uploading..." })
|
|
34303
34420
|
] }) }),
|
|
34304
34421
|
/* @__PURE__ */ jsxs193("div", { className: "p-3 space-y-2", children: [
|
|
@@ -34349,9 +34466,9 @@ function ReleaseMediaManager({
|
|
|
34349
34466
|
|
|
34350
34467
|
// src/components/features/select-button.tsx
|
|
34351
34468
|
init_cn();
|
|
34352
|
-
import
|
|
34469
|
+
import React102 from "react";
|
|
34353
34470
|
import { jsx as jsx254, jsxs as jsxs194 } from "react/jsx-runtime";
|
|
34354
|
-
var SelectButton =
|
|
34471
|
+
var SelectButton = React102.forwardRef(
|
|
34355
34472
|
({ title, description, selected = false, disabled = false, icon, image, tag, tagVariant = "outline", onClick, className }, ref) => {
|
|
34356
34473
|
return /* @__PURE__ */ jsxs194(
|
|
34357
34474
|
"button",
|
|
@@ -34412,8 +34529,8 @@ var SelectButton = React101.forwardRef(
|
|
|
34412
34529
|
SelectButton.displayName = "SelectButton";
|
|
34413
34530
|
|
|
34414
34531
|
// src/components/features/seo-editor-preview.tsx
|
|
34415
|
-
import { useState as
|
|
34416
|
-
import { Globe as Globe3, ExternalLink as ExternalLink8, Upload as Upload3, X as X6, Loader2 as
|
|
34532
|
+
import { useState as useState74 } from "react";
|
|
34533
|
+
import { Globe as Globe3, ExternalLink as ExternalLink8, Upload as Upload3, X as X6, Loader2 as Loader26 } from "lucide-react";
|
|
34417
34534
|
import { Fragment as Fragment47, jsx as jsx255, jsxs as jsxs195 } from "react/jsx-runtime";
|
|
34418
34535
|
var SEO_MEDIA_BOX_HEIGHT = "h-[280px]";
|
|
34419
34536
|
function SEOEditorPreview({
|
|
@@ -34436,9 +34553,9 @@ function SEOEditorPreview({
|
|
|
34436
34553
|
disabled = false,
|
|
34437
34554
|
className = ""
|
|
34438
34555
|
}) {
|
|
34439
|
-
const [imageError, setImageError] =
|
|
34440
|
-
const [isUploading, setIsUploading] =
|
|
34441
|
-
const [fileInputRef, setFileInputRef] =
|
|
34556
|
+
const [imageError, setImageError] = useState74(false);
|
|
34557
|
+
const [isUploading, setIsUploading] = useState74(false);
|
|
34558
|
+
const [fileInputRef, setFileInputRef] = useState74(null);
|
|
34442
34559
|
const seoTitleLength = (seoTitle || "").length;
|
|
34443
34560
|
const seoTitleTooLong = seoTitleLength > SEO_TITLE_MAX_LENGTH;
|
|
34444
34561
|
const seoDescriptionLength = (seoDescription || "").length;
|
|
@@ -34597,7 +34714,7 @@ function SEOEditorPreview({
|
|
|
34597
34714
|
{
|
|
34598
34715
|
className: cn(SEO_MEDIA_BOX_HEIGHT, "border-2 border-dashed border-ods-border rounded-lg flex flex-col items-center justify-center cursor-pointer hover:border-ods-accent transition-colors bg-ods-bg-hover"),
|
|
34599
34716
|
onClick: () => onOgImageUpload && fileInputRef?.click(),
|
|
34600
|
-
children: isUploading ? /* @__PURE__ */ jsx255(
|
|
34717
|
+
children: isUploading ? /* @__PURE__ */ jsx255(Loader26, { className: "h-8 w-8 animate-spin text-ods-accent" }) : /* @__PURE__ */ jsxs195(Fragment47, { children: [
|
|
34601
34718
|
/* @__PURE__ */ jsx255(Upload3, { className: "h-8 w-8 text-ods-text-secondary mb-2" }),
|
|
34602
34719
|
/* @__PURE__ */ jsx255("span", { className: "text-h6 text-ods-text-secondary", children: onOgImageUpload ? "Click to upload OG image" : "No image" })
|
|
34603
34720
|
] })
|
|
@@ -34776,9 +34893,9 @@ function SocialLinksManager({
|
|
|
34776
34893
|
|
|
34777
34894
|
// src/components/features/start-with-openframe-button.tsx
|
|
34778
34895
|
init_button2();
|
|
34779
|
-
import * as
|
|
34896
|
+
import * as React103 from "react";
|
|
34780
34897
|
import { jsx as jsx257 } from "react/jsx-runtime";
|
|
34781
|
-
var StartWithOpenFrameButton =
|
|
34898
|
+
var StartWithOpenFrameButton = React103.forwardRef(({ children = "Start Free Trial", mode = "outline", className, buttonSize, loading = false, buttonBackgroundColor, buttonTextColor, ...props }, ref) => {
|
|
34782
34899
|
const isYellow = mode === "yellow";
|
|
34783
34900
|
const isPink = mode === "pink" || mode === "purple";
|
|
34784
34901
|
const isCyan = mode === "cyan";
|
|
@@ -34899,8 +35016,8 @@ function StatusFilterComponent({
|
|
|
34899
35016
|
}
|
|
34900
35017
|
|
|
34901
35018
|
// src/components/features/tags-selector.tsx
|
|
34902
|
-
import { useState as
|
|
34903
|
-
import { Search as Search2, X as X7, Plus as Plus6, Loader2 as
|
|
35019
|
+
import { useState as useState75 } from "react";
|
|
35020
|
+
import { Search as Search2, X as X7, Plus as Plus6, Loader2 as Loader27 } from "lucide-react";
|
|
34904
35021
|
import { jsx as jsx259, jsxs as jsxs198 } from "react/jsx-runtime";
|
|
34905
35022
|
function TagsSelector({
|
|
34906
35023
|
availableTags,
|
|
@@ -34913,9 +35030,9 @@ function TagsSelector({
|
|
|
34913
35030
|
disabled = false,
|
|
34914
35031
|
allowCreate = true
|
|
34915
35032
|
}) {
|
|
34916
|
-
const [searchQuery, setSearchQuery] =
|
|
34917
|
-
const [showDropdown, setShowDropdown] =
|
|
34918
|
-
const [isCreating, setIsCreating] =
|
|
35033
|
+
const [searchQuery, setSearchQuery] = useState75("");
|
|
35034
|
+
const [showDropdown, setShowDropdown] = useState75(false);
|
|
35035
|
+
const [isCreating, setIsCreating] = useState75(false);
|
|
34919
35036
|
const handleTagAdd = (tagId) => {
|
|
34920
35037
|
if (!selectedTagIds.includes(tagId) && selectedTagIds.length < maxTags) {
|
|
34921
35038
|
onTagsChange([...selectedTagIds, tagId]);
|
|
@@ -35041,7 +35158,7 @@ function TagsSelector({
|
|
|
35041
35158
|
type: "button",
|
|
35042
35159
|
onClick: handleCreateTag,
|
|
35043
35160
|
disabled: isCreating,
|
|
35044
|
-
leftIcon: isCreating ? /* @__PURE__ */ jsx259(
|
|
35161
|
+
leftIcon: isCreating ? /* @__PURE__ */ jsx259(Loader27, { className: "w-3 h-3 animate-spin" }) : /* @__PURE__ */ jsx259(Plus6, { className: "w-3 h-3" }),
|
|
35045
35162
|
className: "w-full flex flex-row items-center gap-1.5 px-2 py-1 mb-2 h-auto rounded border-dashed border-ods-accent bg-ods-bg hover:bg-ods-card text-ods-accent !text-h6",
|
|
35046
35163
|
children: [
|
|
35047
35164
|
"Create tag: ",
|
|
@@ -35124,7 +35241,7 @@ function VideoBitesDisplay({
|
|
|
35124
35241
|
// src/components/features/walkthrough-video.tsx
|
|
35125
35242
|
init_cn();
|
|
35126
35243
|
init_button2();
|
|
35127
|
-
import { useCallback as useCallback28, useEffect as
|
|
35244
|
+
import { useCallback as useCallback28, useEffect as useEffect58, useMemo as useMemo35, useRef as useRef43, useState as useState76 } from "react";
|
|
35128
35245
|
import * as DialogPrimitive3 from "@radix-ui/react-dialog";
|
|
35129
35246
|
import { Fragment as Fragment48, jsx as jsx262, jsxs as jsxs200 } from "react/jsx-runtime";
|
|
35130
35247
|
var isAtEnd = (duration, time) => duration > 0 && duration - time < 1;
|
|
@@ -35151,9 +35268,9 @@ function WalkthroughVideo({
|
|
|
35151
35268
|
const dismissEnabled = dismissal !== false;
|
|
35152
35269
|
const storageKey = dismissEnabled && dismissal.storageKey || WALKTHROUGH_VIDEO_DISMISS_KEY;
|
|
35153
35270
|
const dismissalId = video?.id != null ? String(video.id) : "dismissed";
|
|
35154
|
-
const [mounted, setMounted] =
|
|
35155
|
-
const [dismissed, setDismissed] =
|
|
35156
|
-
|
|
35271
|
+
const [mounted, setMounted] = useState76(false);
|
|
35272
|
+
const [dismissed, setDismissed] = useState76(false);
|
|
35273
|
+
useEffect58(() => {
|
|
35157
35274
|
let idleHandle = null;
|
|
35158
35275
|
if (!video) return;
|
|
35159
35276
|
const timer = setTimeout(() => {
|
|
@@ -35175,8 +35292,8 @@ function WalkthroughVideo({
|
|
|
35175
35292
|
if (idleHandle !== null && typeof cic === "function") cic(idleHandle);
|
|
35176
35293
|
};
|
|
35177
35294
|
}, [appearDelayMs, dismissEnabled, storageKey, dismissalId, video?.id]);
|
|
35178
|
-
const [previewSuppressed, setPreviewSuppressed] =
|
|
35179
|
-
|
|
35295
|
+
const [previewSuppressed, setPreviewSuppressed] = useState76(false);
|
|
35296
|
+
useEffect58(() => {
|
|
35180
35297
|
try {
|
|
35181
35298
|
const reducedMotion = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? false;
|
|
35182
35299
|
const conn = navigator.connection;
|
|
@@ -35185,7 +35302,7 @@ function WalkthroughVideo({
|
|
|
35185
35302
|
} catch {
|
|
35186
35303
|
}
|
|
35187
35304
|
}, []);
|
|
35188
|
-
const [deepLinkHit] =
|
|
35305
|
+
const [deepLinkHit] = useState76(() => {
|
|
35189
35306
|
if (!deepLinkParam || typeof window === "undefined") return false;
|
|
35190
35307
|
try {
|
|
35191
35308
|
return new URLSearchParams(window.location.search).has(deepLinkParam);
|
|
@@ -35193,31 +35310,31 @@ function WalkthroughVideo({
|
|
|
35193
35310
|
return false;
|
|
35194
35311
|
}
|
|
35195
35312
|
});
|
|
35196
|
-
const [openState, setOpenState] =
|
|
35313
|
+
const [openState, setOpenState] = useState76(Boolean(defaultOpen) || deepLinkHit);
|
|
35197
35314
|
const open = openProp !== void 0 ? openProp : openState;
|
|
35198
|
-
const [pausedOpenSession, setPausedOpenSession] =
|
|
35315
|
+
const [pausedOpenSession, setPausedOpenSession] = useState76(
|
|
35199
35316
|
Boolean(defaultOpen && defaultOpenPaused) || deepLinkHit
|
|
35200
35317
|
);
|
|
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] =
|
|
35318
|
+
const previewHandleRef = useRef43(null);
|
|
35319
|
+
const theaterHandleRef = useRef43(null);
|
|
35320
|
+
const theaterForcedMuteRef = useRef43(false);
|
|
35321
|
+
const resumeHandleRef = useRef43(null);
|
|
35322
|
+
const closeButtonRef = useRef43(null);
|
|
35323
|
+
const userMutedRef = useRef43(false);
|
|
35324
|
+
const endedLatchRef = useRef43(false);
|
|
35325
|
+
const [hovered, setHovered] = useState76(false);
|
|
35326
|
+
const [handoff, setHandoff] = useState76(null);
|
|
35327
|
+
const [suspended, setSuspended] = useState76(false);
|
|
35328
|
+
const [theaterStart, setTheaterStart] = useState76({ time: 0, muted: false });
|
|
35329
|
+
const [footerHidden, setFooterHidden] = useState76(false);
|
|
35330
|
+
const [cardFallback, setCardFallback] = useState76({ muted: false, blocked: false });
|
|
35331
|
+
const [cardMuted, setCardMuted] = useState76(false);
|
|
35332
|
+
const [cardPaused, setCardPaused] = useState76(false);
|
|
35333
|
+
const [userMuted, setUserMuted] = useState76(false);
|
|
35217
35334
|
const isYouTube = Boolean(video?.youtubeUrl);
|
|
35218
35335
|
const resumeMode = !open && handoff !== null && !isYouTube;
|
|
35219
35336
|
const previewAllowed = !previewSuppressed && !isYouTube;
|
|
35220
|
-
|
|
35337
|
+
useEffect58(() => {
|
|
35221
35338
|
if (!mounted) return;
|
|
35222
35339
|
if (inline) {
|
|
35223
35340
|
setFooterHidden(false);
|
|
@@ -35235,7 +35352,7 @@ function WalkthroughVideo({
|
|
|
35235
35352
|
io.observe(el);
|
|
35236
35353
|
return () => io.disconnect();
|
|
35237
35354
|
}, [mounted, inline, hideNearSelector, pathname]);
|
|
35238
|
-
|
|
35355
|
+
useEffect58(() => {
|
|
35239
35356
|
if (!resumeMode) return;
|
|
35240
35357
|
const onVis = () => {
|
|
35241
35358
|
if (document.visibilityState === "hidden") {
|
|
@@ -35249,7 +35366,7 @@ function WalkthroughVideo({
|
|
|
35249
35366
|
document.addEventListener("visibilitychange", onVis);
|
|
35250
35367
|
return () => document.removeEventListener("visibilitychange", onVis);
|
|
35251
35368
|
}, [resumeMode]);
|
|
35252
|
-
|
|
35369
|
+
useEffect58(() => {
|
|
35253
35370
|
if (!footerHidden) return;
|
|
35254
35371
|
const h = resumeHandleRef.current ?? previewHandleRef.current;
|
|
35255
35372
|
try {
|
|
@@ -35259,10 +35376,10 @@ function WalkthroughVideo({
|
|
|
35259
35376
|
setCardPaused(true);
|
|
35260
35377
|
setHovered(false);
|
|
35261
35378
|
}, [footerHidden, resumeMode, hovered]);
|
|
35262
|
-
const cardModeRef =
|
|
35263
|
-
const selfDrivenForRef =
|
|
35264
|
-
const justClosedRef =
|
|
35265
|
-
const justClosedTimerRef =
|
|
35379
|
+
const cardModeRef = useRef43("poster");
|
|
35380
|
+
const selfDrivenForRef = useRef43(null);
|
|
35381
|
+
const justClosedRef = useRef43(false);
|
|
35382
|
+
const justClosedTimerRef = useRef43(null);
|
|
35266
35383
|
const commitOpen = useCallback28((next) => {
|
|
35267
35384
|
if (!next) {
|
|
35268
35385
|
justClosedRef.current = true;
|
|
@@ -35315,7 +35432,7 @@ function WalkthroughVideo({
|
|
|
35315
35432
|
selfDrivenForRef.current = true;
|
|
35316
35433
|
commitOpen(true);
|
|
35317
35434
|
}, [handoff, cardFallback.muted, commitOpen]);
|
|
35318
|
-
const [prevOpen, setPrevOpen] =
|
|
35435
|
+
const [prevOpen, setPrevOpen] = useState76(open);
|
|
35319
35436
|
if (open !== prevOpen) {
|
|
35320
35437
|
setPrevOpen(open);
|
|
35321
35438
|
if (open && pausedOpenSession) setPausedOpenSession(false);
|
|
@@ -35397,13 +35514,13 @@ function WalkthroughVideo({
|
|
|
35397
35514
|
setCardFallback(s);
|
|
35398
35515
|
setCardMuted(s.muted);
|
|
35399
35516
|
}, []);
|
|
35400
|
-
|
|
35517
|
+
useEffect58(() => {
|
|
35401
35518
|
if (resumeMode) {
|
|
35402
35519
|
setCardMuted(handoff?.muted ?? false);
|
|
35403
35520
|
setCardPaused(handoff?.playing === false);
|
|
35404
35521
|
}
|
|
35405
35522
|
}, [resumeMode]);
|
|
35406
|
-
|
|
35523
|
+
useEffect58(() => {
|
|
35407
35524
|
if (hovered) {
|
|
35408
35525
|
setCardPaused(false);
|
|
35409
35526
|
setCardMuted(userMutedRef.current);
|
|
@@ -35768,7 +35885,7 @@ function useWalkthroughVideo(opts) {
|
|
|
35768
35885
|
}
|
|
35769
35886
|
|
|
35770
35887
|
// src/components/features/video-source-selector.tsx
|
|
35771
|
-
import { useState as
|
|
35888
|
+
import { useState as useState77, useCallback as useCallback29 } from "react";
|
|
35772
35889
|
import { Upload as Upload4, X as X8, Video as VideoIcon3 } from "lucide-react";
|
|
35773
35890
|
init_button2();
|
|
35774
35891
|
import { jsx as jsx263, jsxs as jsxs201 } from "react/jsx-runtime";
|
|
@@ -35794,10 +35911,10 @@ function VideoSourceSelector({
|
|
|
35794
35911
|
showTitle = true,
|
|
35795
35912
|
className = ""
|
|
35796
35913
|
}) {
|
|
35797
|
-
const [isUploading, setIsUploading] =
|
|
35798
|
-
const [uploadProgress, setUploadProgress] =
|
|
35799
|
-
const [uploadMessage, setUploadMessage] =
|
|
35800
|
-
const [uploadError, setUploadError] =
|
|
35914
|
+
const [isUploading, setIsUploading] = useState77(false);
|
|
35915
|
+
const [uploadProgress, setUploadProgress] = useState77(0);
|
|
35916
|
+
const [uploadMessage, setUploadMessage] = useState77("");
|
|
35917
|
+
const [uploadError, setUploadError] = useState77(null);
|
|
35801
35918
|
const handleUploadClick = useCallback29(() => {
|
|
35802
35919
|
const input = document.createElement("input");
|
|
35803
35920
|
input.type = "file";
|
|
@@ -36169,7 +36286,7 @@ function TranscriptSummaryEditor({
|
|
|
36169
36286
|
}
|
|
36170
36287
|
|
|
36171
36288
|
// src/components/features/highlight-video-section.tsx
|
|
36172
|
-
import { useState as
|
|
36289
|
+
import { useState as useState78 } from "react";
|
|
36173
36290
|
import { Sparkles as Sparkles4, Upload as Upload5 } from "lucide-react";
|
|
36174
36291
|
init_button2();
|
|
36175
36292
|
|
|
@@ -36271,7 +36388,7 @@ var AIWarningsSection = ({
|
|
|
36271
36388
|
|
|
36272
36389
|
// src/components/features/ai-enrich/AIEnrichSection.tsx
|
|
36273
36390
|
init_button2();
|
|
36274
|
-
import { CheckCircle as CheckCircle2, AlertCircle, Loader2 as
|
|
36391
|
+
import { CheckCircle as CheckCircle2, AlertCircle, Loader2 as Loader28, X as X9 } from "lucide-react";
|
|
36275
36392
|
import { jsx as jsx269, jsxs as jsxs206 } from "react/jsx-runtime";
|
|
36276
36393
|
var AIEnrichSection = ({
|
|
36277
36394
|
onEnrich,
|
|
@@ -36385,7 +36502,7 @@ var AIEnrichSection = ({
|
|
|
36385
36502
|
size: "small-legacy",
|
|
36386
36503
|
onClick: onCancel,
|
|
36387
36504
|
disabled: isCancelling,
|
|
36388
|
-
leftIcon: isCancelling ? /* @__PURE__ */ jsx269(
|
|
36505
|
+
leftIcon: isCancelling ? /* @__PURE__ */ jsx269(Loader28, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx269(X9, { className: "h-4 w-4" }),
|
|
36389
36506
|
className: "!w-full",
|
|
36390
36507
|
children: isCancelling ? "Cancelling..." : "Cancel Processing"
|
|
36391
36508
|
}
|
|
@@ -36406,7 +36523,7 @@ var AIEnrichSection = ({
|
|
|
36406
36523
|
)) })
|
|
36407
36524
|
] }),
|
|
36408
36525
|
loading && statusMessage && /* @__PURE__ */ jsxs206("div", { className: "flex items-center gap-3 p-3 rounded-lg bg-ods-bg-surface", children: [
|
|
36409
|
-
/* @__PURE__ */ jsx269(
|
|
36526
|
+
/* @__PURE__ */ jsx269(Loader28, { className: "h-5 w-5 text-ods-accent animate-spin" }),
|
|
36410
36527
|
/* @__PURE__ */ jsx269("span", { className: "text-h6 text-ods-text-primary", children: statusMessage })
|
|
36411
36528
|
] }),
|
|
36412
36529
|
hasResults && /* @__PURE__ */ jsxs206("div", { className: "space-y-4", children: [
|
|
@@ -36469,7 +36586,7 @@ function HighlightVideoSection({
|
|
|
36469
36586
|
disabled = false,
|
|
36470
36587
|
className = ""
|
|
36471
36588
|
}) {
|
|
36472
|
-
const [uploadError, setUploadError] =
|
|
36589
|
+
const [uploadError, setUploadError] = useState78(null);
|
|
36473
36590
|
const handleUploadClick = () => {
|
|
36474
36591
|
const input = document.createElement("input");
|
|
36475
36592
|
input.type = "file";
|
|
@@ -37274,7 +37391,7 @@ function ViewToggle({
|
|
|
37274
37391
|
|
|
37275
37392
|
// src/components/features/policy-configuration-panel.tsx
|
|
37276
37393
|
init_cn();
|
|
37277
|
-
import { useEffect as
|
|
37394
|
+
import { useEffect as useEffect59, useState as useState79 } from "react";
|
|
37278
37395
|
import { ChevronDown as ChevronDown8, Shield as Shield2 } from "lucide-react";
|
|
37279
37396
|
init_button2();
|
|
37280
37397
|
import { Fragment as Fragment49, jsx as jsx282, jsxs as jsxs216 } from "react/jsx-runtime";
|
|
@@ -37450,9 +37567,9 @@ var PolicyConfigurationPanel = ({
|
|
|
37450
37567
|
onCategoryPermissionChange,
|
|
37451
37568
|
className
|
|
37452
37569
|
}) => {
|
|
37453
|
-
const [expandedIds, setExpandedIds] =
|
|
37454
|
-
const [bulkLevels, setBulkLevels] =
|
|
37455
|
-
|
|
37570
|
+
const [expandedIds, setExpandedIds] = useState79(/* @__PURE__ */ new Set());
|
|
37571
|
+
const [bulkLevels, setBulkLevels] = useState79({});
|
|
37572
|
+
useEffect59(() => {
|
|
37456
37573
|
setBulkLevels({});
|
|
37457
37574
|
}, [editMode]);
|
|
37458
37575
|
const handleToggle = (categoryId) => {
|
|
@@ -37492,7 +37609,7 @@ PolicyConfigurationPanel.displayName = "PolicyConfigurationPanel";
|
|
|
37492
37609
|
init_button2();
|
|
37493
37610
|
|
|
37494
37611
|
// src/components/ui/phone-input.tsx
|
|
37495
|
-
import { useCallback as useCallback30, useEffect as
|
|
37612
|
+
import { useCallback as useCallback30, useEffect as useEffect60, useMemo as useMemo36, useRef as useRef44, useState as useState80 } from "react";
|
|
37496
37613
|
import { jsx as jsx283, jsxs as jsxs217 } from "react/jsx-runtime";
|
|
37497
37614
|
function PhoneInput({
|
|
37498
37615
|
value,
|
|
@@ -37509,8 +37626,8 @@ function PhoneInput({
|
|
|
37509
37626
|
() => [...priority, ...others].find((c) => c.code === countryCode),
|
|
37510
37627
|
[countryCode, priority, others]
|
|
37511
37628
|
);
|
|
37512
|
-
const [isInvalid, setIsInvalid] =
|
|
37513
|
-
const debounceRef =
|
|
37629
|
+
const [isInvalid, setIsInvalid] = useState80(false);
|
|
37630
|
+
const debounceRef = useRef44(null);
|
|
37514
37631
|
const digitCount = useCallback30((val) => val.replace(/[^0-9]/g, "").length, []);
|
|
37515
37632
|
const runValidation = useCallback30((phone) => {
|
|
37516
37633
|
if (!phone || digitCount(phone) === 0) {
|
|
@@ -37526,7 +37643,7 @@ function PhoneInput({
|
|
|
37526
37643
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
37527
37644
|
debounceRef.current = setTimeout(() => runValidation(phone), 300);
|
|
37528
37645
|
}, [runValidation]);
|
|
37529
|
-
|
|
37646
|
+
useEffect60(() => {
|
|
37530
37647
|
return () => {
|
|
37531
37648
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
37532
37649
|
};
|
|
@@ -37593,7 +37710,7 @@ function CountryOption({ country }) {
|
|
|
37593
37710
|
// src/components/features/waitlist-form.tsx
|
|
37594
37711
|
init_cn();
|
|
37595
37712
|
import { getCountries as getCountries2 } from "libphonenumber-js";
|
|
37596
|
-
import { useEffect as
|
|
37713
|
+
import { useEffect as useEffect61, useState as useState81 } from "react";
|
|
37597
37714
|
import { Fragment as Fragment50, jsx as jsx284, jsxs as jsxs218 } from "react/jsx-runtime";
|
|
37598
37715
|
function WaitlistForm({
|
|
37599
37716
|
id = "waitlist-form",
|
|
@@ -37613,22 +37730,22 @@ function WaitlistForm({
|
|
|
37613
37730
|
privacyPolicyUrl,
|
|
37614
37731
|
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
37732
|
}) {
|
|
37616
|
-
const [email, setEmail] =
|
|
37617
|
-
const [phone, setPhone] =
|
|
37618
|
-
const [countryCode, setCountryCode] =
|
|
37733
|
+
const [email, setEmail] = useState81(defaultEmail);
|
|
37734
|
+
const [phone, setPhone] = useState81(defaultPhone);
|
|
37735
|
+
const [countryCode, setCountryCode] = useState81("US");
|
|
37619
37736
|
const { toast } = useToast();
|
|
37620
37737
|
const { honeypotInputProps, getSignals, resetSignals } = useHumanitySignals();
|
|
37621
|
-
const [smsConsent, setSmsConsent] =
|
|
37622
|
-
const [isClient, setIsClient] =
|
|
37623
|
-
const [isPhoneInvalid, setIsPhoneInvalid] =
|
|
37624
|
-
const [showConsentError, setShowConsentError] =
|
|
37738
|
+
const [smsConsent, setSmsConsent] = useState81(false);
|
|
37739
|
+
const [isClient, setIsClient] = useState81(false);
|
|
37740
|
+
const [isPhoneInvalid, setIsPhoneInvalid] = useState81(false);
|
|
37741
|
+
const [showConsentError, setShowConsentError] = useState81(false);
|
|
37625
37742
|
const isMailDomainGeneric = hasGenericEmailDomain(email);
|
|
37626
|
-
|
|
37743
|
+
useEffect61(() => {
|
|
37627
37744
|
if (defaultEmail) {
|
|
37628
37745
|
setEmail(defaultEmail);
|
|
37629
37746
|
}
|
|
37630
37747
|
}, [defaultEmail]);
|
|
37631
|
-
|
|
37748
|
+
useEffect61(() => {
|
|
37632
37749
|
setIsClient(true);
|
|
37633
37750
|
if (!geoApiUrl) return;
|
|
37634
37751
|
const supportedCountries = new Set(getCountries2());
|
|
@@ -37788,9 +37905,9 @@ function WaitlistForm({
|
|
|
37788
37905
|
}
|
|
37789
37906
|
|
|
37790
37907
|
// src/components/features/notifications/notifications-context.tsx
|
|
37791
|
-
import * as
|
|
37908
|
+
import * as React107 from "react";
|
|
37792
37909
|
import { jsx as jsx285 } from "react/jsx-runtime";
|
|
37793
|
-
var NotificationsContext =
|
|
37910
|
+
var NotificationsContext = React107.createContext(null);
|
|
37794
37911
|
function mergeNotification(base, incoming) {
|
|
37795
37912
|
const out = { ...base };
|
|
37796
37913
|
for (const key of Object.keys(incoming)) {
|
|
@@ -37869,16 +37986,16 @@ function NotificationsProvider({
|
|
|
37869
37986
|
onLoadMore,
|
|
37870
37987
|
renderTile
|
|
37871
37988
|
}) {
|
|
37872
|
-
const [notifications, dispatch] =
|
|
37873
|
-
const [isOpen, setIsOpen] =
|
|
37874
|
-
const [showPopups, setShowPopupsState] =
|
|
37875
|
-
const [showDesktopPopups, setShowDesktopPopupsState] =
|
|
37989
|
+
const [notifications, dispatch] = React107.useReducer(reducer, initialNotifications);
|
|
37990
|
+
const [isOpen, setIsOpen] = React107.useState(false);
|
|
37991
|
+
const [showPopups, setShowPopupsState] = React107.useState(defaultShowPopups);
|
|
37992
|
+
const [showDesktopPopups, setShowDesktopPopupsState] = React107.useState(defaultShowDesktopPopups);
|
|
37876
37993
|
const desktopPopupsConfigured = onShowDesktopPopupsChange !== void 0;
|
|
37877
|
-
const actionsRef =
|
|
37878
|
-
|
|
37994
|
+
const actionsRef = React107.useRef(actions);
|
|
37995
|
+
React107.useEffect(() => {
|
|
37879
37996
|
actionsRef.current = actions;
|
|
37880
37997
|
}, [actions]);
|
|
37881
|
-
const addNotification =
|
|
37998
|
+
const addNotification = React107.useCallback(
|
|
37882
37999
|
(input) => {
|
|
37883
38000
|
const id = input.id ?? generateId();
|
|
37884
38001
|
const notification = {
|
|
@@ -37892,7 +38009,7 @@ function NotificationsProvider({
|
|
|
37892
38009
|
},
|
|
37893
38010
|
[maxNotifications]
|
|
37894
38011
|
);
|
|
37895
|
-
const upsertNotification =
|
|
38012
|
+
const upsertNotification = React107.useCallback(
|
|
37896
38013
|
(input) => {
|
|
37897
38014
|
const notification = {
|
|
37898
38015
|
...input,
|
|
@@ -37905,48 +38022,48 @@ function NotificationsProvider({
|
|
|
37905
38022
|
},
|
|
37906
38023
|
[maxNotifications]
|
|
37907
38024
|
);
|
|
37908
|
-
const setNotifications =
|
|
38025
|
+
const setNotifications = React107.useCallback((list) => {
|
|
37909
38026
|
dispatch({ type: "set", notifications: list });
|
|
37910
38027
|
}, []);
|
|
37911
|
-
const markRead =
|
|
38028
|
+
const markRead = React107.useCallback((id) => {
|
|
37912
38029
|
dispatch({ type: "markRead", id });
|
|
37913
38030
|
void actionsRef.current?.onMarkRead?.(id);
|
|
37914
38031
|
}, []);
|
|
37915
|
-
const markAllRead =
|
|
38032
|
+
const markAllRead = React107.useCallback(() => {
|
|
37916
38033
|
dispatch({ type: "markAllRead" });
|
|
37917
38034
|
void actionsRef.current?.onMarkAllRead?.();
|
|
37918
38035
|
}, []);
|
|
37919
|
-
const markSettled =
|
|
38036
|
+
const markSettled = React107.useCallback((id) => {
|
|
37920
38037
|
dispatch({ type: "markSettled", id });
|
|
37921
38038
|
void actionsRef.current?.onMarkSettled?.(id);
|
|
37922
38039
|
}, []);
|
|
37923
|
-
const remove =
|
|
38040
|
+
const remove = React107.useCallback((id) => {
|
|
37924
38041
|
dispatch({ type: "remove", id });
|
|
37925
38042
|
void actionsRef.current?.onRemove?.(id);
|
|
37926
38043
|
}, []);
|
|
37927
|
-
const clear =
|
|
37928
|
-
const open =
|
|
37929
|
-
const close =
|
|
37930
|
-
const toggle =
|
|
37931
|
-
const setShowPopups =
|
|
38044
|
+
const clear = React107.useCallback(() => dispatch({ type: "clear" }), []);
|
|
38045
|
+
const open = React107.useCallback(() => setIsOpen(true), []);
|
|
38046
|
+
const close = React107.useCallback(() => setIsOpen(false), []);
|
|
38047
|
+
const toggle = React107.useCallback(() => setIsOpen((v) => !v), []);
|
|
38048
|
+
const setShowPopups = React107.useCallback(
|
|
37932
38049
|
(value2) => {
|
|
37933
38050
|
setShowPopupsState(value2);
|
|
37934
38051
|
onShowPopupsChange?.(value2);
|
|
37935
38052
|
},
|
|
37936
38053
|
[onShowPopupsChange]
|
|
37937
38054
|
);
|
|
37938
|
-
const setShowDesktopPopups =
|
|
38055
|
+
const setShowDesktopPopups = React107.useCallback(
|
|
37939
38056
|
(value2) => {
|
|
37940
38057
|
setShowDesktopPopupsState(value2);
|
|
37941
38058
|
onShowDesktopPopupsChange?.(value2);
|
|
37942
38059
|
},
|
|
37943
38060
|
[onShowDesktopPopupsChange]
|
|
37944
38061
|
);
|
|
37945
|
-
const unreadCount =
|
|
38062
|
+
const unreadCount = React107.useMemo(
|
|
37946
38063
|
() => notifications.reduce((acc, n) => n.read ? acc : acc + 1, 0),
|
|
37947
38064
|
[notifications]
|
|
37948
38065
|
);
|
|
37949
|
-
const value =
|
|
38066
|
+
const value = React107.useMemo(
|
|
37950
38067
|
() => ({
|
|
37951
38068
|
notifications,
|
|
37952
38069
|
unreadCount,
|
|
@@ -38005,18 +38122,18 @@ function NotificationsProvider({
|
|
|
38005
38122
|
return /* @__PURE__ */ jsx285(NotificationsContext.Provider, { value, children });
|
|
38006
38123
|
}
|
|
38007
38124
|
function useNotifications() {
|
|
38008
|
-
const ctx =
|
|
38125
|
+
const ctx = React107.useContext(NotificationsContext);
|
|
38009
38126
|
if (!ctx) {
|
|
38010
38127
|
throw new Error("useNotifications must be used inside <NotificationsProvider>");
|
|
38011
38128
|
}
|
|
38012
38129
|
return ctx;
|
|
38013
38130
|
}
|
|
38014
38131
|
function useOptionalNotifications() {
|
|
38015
|
-
return
|
|
38132
|
+
return React107.useContext(NotificationsContext);
|
|
38016
38133
|
}
|
|
38017
38134
|
|
|
38018
38135
|
// src/components/features/notifications/notification-drawer.tsx
|
|
38019
|
-
import { useEffect as
|
|
38136
|
+
import { useEffect as useEffect65, useRef as useRef47 } from "react";
|
|
38020
38137
|
|
|
38021
38138
|
// src/components/navigation/app-layout-context.ts
|
|
38022
38139
|
import { createContext as createContext10, useContext as useContext10 } from "react";
|
|
@@ -38031,11 +38148,11 @@ function useAppLayoutDrawerCoordination() {
|
|
|
38031
38148
|
|
|
38032
38149
|
// src/components/navigation/app-layout-drawer.tsx
|
|
38033
38150
|
init_cn();
|
|
38034
|
-
import * as
|
|
38151
|
+
import * as React108 from "react";
|
|
38035
38152
|
import * as DialogPrimitive4 from "@radix-ui/react-dialog";
|
|
38036
38153
|
import { cva as cva10 } from "class-variance-authority";
|
|
38037
38154
|
import { jsx as jsx286, jsxs as jsxs219 } from "react/jsx-runtime";
|
|
38038
|
-
var DrawerOpenContext =
|
|
38155
|
+
var DrawerOpenContext = React108.createContext(false);
|
|
38039
38156
|
var AppLayoutDrawerRoot = ({
|
|
38040
38157
|
open: openProp,
|
|
38041
38158
|
defaultOpen,
|
|
@@ -38044,10 +38161,10 @@ var AppLayoutDrawerRoot = ({
|
|
|
38044
38161
|
children,
|
|
38045
38162
|
...rest
|
|
38046
38163
|
}) => {
|
|
38047
|
-
const [internalOpen, setInternalOpen] =
|
|
38164
|
+
const [internalOpen, setInternalOpen] = React108.useState(defaultOpen ?? false);
|
|
38048
38165
|
const isControlled = openProp !== void 0;
|
|
38049
38166
|
const open = isControlled ? openProp : internalOpen;
|
|
38050
|
-
const handleOpenChange =
|
|
38167
|
+
const handleOpenChange = React108.useCallback(
|
|
38051
38168
|
(next) => {
|
|
38052
38169
|
if (!isControlled) setInternalOpen(next);
|
|
38053
38170
|
onOpenChange?.(next);
|
|
@@ -38055,11 +38172,11 @@ var AppLayoutDrawerRoot = ({
|
|
|
38055
38172
|
[isControlled, onOpenChange]
|
|
38056
38173
|
);
|
|
38057
38174
|
const coordination = useAppLayoutDrawerCoordination();
|
|
38058
|
-
const openRef =
|
|
38175
|
+
const openRef = React108.useRef(open);
|
|
38059
38176
|
openRef.current = open;
|
|
38060
|
-
const handleOpenChangeRef =
|
|
38177
|
+
const handleOpenChangeRef = React108.useRef(handleOpenChange);
|
|
38061
38178
|
handleOpenChangeRef.current = handleOpenChange;
|
|
38062
|
-
const selfHandleRef =
|
|
38179
|
+
const selfHandleRef = React108.useRef(null);
|
|
38063
38180
|
if (!selfHandleRef.current) {
|
|
38064
38181
|
selfHandleRef.current = {
|
|
38065
38182
|
close: () => {
|
|
@@ -38067,10 +38184,10 @@ var AppLayoutDrawerRoot = ({
|
|
|
38067
38184
|
}
|
|
38068
38185
|
};
|
|
38069
38186
|
}
|
|
38070
|
-
|
|
38187
|
+
React108.useEffect(() => {
|
|
38071
38188
|
if (open) coordination?.notifyDrawerDidOpen(selfHandleRef.current ?? void 0);
|
|
38072
38189
|
}, [open, coordination]);
|
|
38073
|
-
|
|
38190
|
+
React108.useEffect(() => {
|
|
38074
38191
|
if (!selfHandleRef.current) return;
|
|
38075
38192
|
return coordination?.registerDrawer(selfHandleRef.current);
|
|
38076
38193
|
}, [coordination]);
|
|
@@ -38161,8 +38278,8 @@ function useContainedResizableSize({
|
|
|
38161
38278
|
storageKey,
|
|
38162
38279
|
container
|
|
38163
38280
|
}) {
|
|
38164
|
-
const [available, setAvailable] =
|
|
38165
|
-
|
|
38281
|
+
const [available, setAvailable] = React108.useState(0);
|
|
38282
|
+
React108.useEffect(() => {
|
|
38166
38283
|
if (!enabled || !container) return;
|
|
38167
38284
|
const update = () => {
|
|
38168
38285
|
setAvailable(isHorizontal ? container.clientWidth : container.clientHeight);
|
|
@@ -38172,14 +38289,14 @@ function useContainedResizableSize({
|
|
|
38172
38289
|
ro.observe(container);
|
|
38173
38290
|
return () => ro.disconnect();
|
|
38174
38291
|
}, [enabled, container, isHorizontal]);
|
|
38175
|
-
const clampToContainer =
|
|
38292
|
+
const clampToContainer = React108.useCallback(
|
|
38176
38293
|
(value) => {
|
|
38177
38294
|
const effectiveMax = available > 0 ? Math.min(maxSize, available - 40) : maxSize;
|
|
38178
38295
|
return clamp3(value, minSize, Math.max(minSize, effectiveMax));
|
|
38179
38296
|
},
|
|
38180
38297
|
[available, minSize, maxSize]
|
|
38181
38298
|
);
|
|
38182
|
-
const readInitial =
|
|
38299
|
+
const readInitial = React108.useCallback(() => {
|
|
38183
38300
|
if (!enabled) return defaultSize;
|
|
38184
38301
|
if (typeof window === "undefined") return defaultSize;
|
|
38185
38302
|
if (!storageKey) return defaultSize;
|
|
@@ -38193,19 +38310,19 @@ function useContainedResizableSize({
|
|
|
38193
38310
|
return defaultSize;
|
|
38194
38311
|
}
|
|
38195
38312
|
}, [enabled, storageKey, defaultSize]);
|
|
38196
|
-
const [size2, setSizeRaw] =
|
|
38197
|
-
const setSize =
|
|
38313
|
+
const [size2, setSizeRaw] = React108.useState(readInitial);
|
|
38314
|
+
const setSize = React108.useCallback(
|
|
38198
38315
|
(next) => setSizeRaw(clampToContainer(next)),
|
|
38199
38316
|
[clampToContainer]
|
|
38200
38317
|
);
|
|
38201
|
-
|
|
38318
|
+
React108.useEffect(() => {
|
|
38202
38319
|
if (!enabled || !storageKey || typeof window === "undefined") return;
|
|
38203
38320
|
try {
|
|
38204
38321
|
window.localStorage.setItem(storageKey, String(Math.round(size2)));
|
|
38205
38322
|
} catch {
|
|
38206
38323
|
}
|
|
38207
38324
|
}, [enabled, size2, storageKey]);
|
|
38208
|
-
|
|
38325
|
+
React108.useEffect(() => {
|
|
38209
38326
|
if (!enabled) return;
|
|
38210
38327
|
setSizeRaw((prev) => clampToContainer(prev));
|
|
38211
38328
|
}, [enabled, clampToContainer]);
|
|
@@ -38220,7 +38337,7 @@ function AppLayoutDrawerResizeHandle({
|
|
|
38220
38337
|
ariaLabel
|
|
38221
38338
|
}) {
|
|
38222
38339
|
const isHorizontal = HORIZONTAL_SIDES2.has(side);
|
|
38223
|
-
const startRef =
|
|
38340
|
+
const startRef = React108.useRef(null);
|
|
38224
38341
|
const direction = side === "right" || side === "bottom" ? -1 : 1;
|
|
38225
38342
|
const handlePointerDown = (e) => {
|
|
38226
38343
|
if (e.button !== 0 && e.pointerType === "mouse") return;
|
|
@@ -38310,7 +38427,7 @@ function AppLayoutDrawerResizeHandle({
|
|
|
38310
38427
|
}
|
|
38311
38428
|
);
|
|
38312
38429
|
}
|
|
38313
|
-
var AppLayoutDrawerContent =
|
|
38430
|
+
var AppLayoutDrawerContent = React108.forwardRef(
|
|
38314
38431
|
({
|
|
38315
38432
|
side = "right",
|
|
38316
38433
|
flush = false,
|
|
@@ -38338,13 +38455,13 @@ var AppLayoutDrawerContent = React107.forwardRef(
|
|
|
38338
38455
|
}, ref) => {
|
|
38339
38456
|
const contextContainer = useAppLayoutDrawerContainer();
|
|
38340
38457
|
const portalContainer = container !== void 0 ? container : contextContainer;
|
|
38341
|
-
const open =
|
|
38342
|
-
const [hasOpened, setHasOpened] =
|
|
38343
|
-
|
|
38458
|
+
const open = React108.useContext(DrawerOpenContext);
|
|
38459
|
+
const [hasOpened, setHasOpened] = React108.useState(Boolean(open));
|
|
38460
|
+
React108.useEffect(() => {
|
|
38344
38461
|
if (open) setHasOpened(true);
|
|
38345
38462
|
}, [open]);
|
|
38346
38463
|
const persist = keepMounted && hasOpened;
|
|
38347
|
-
|
|
38464
|
+
React108.useEffect(() => {
|
|
38348
38465
|
if (!debugLayoutShift) return;
|
|
38349
38466
|
if (!open) return;
|
|
38350
38467
|
if (typeof window === "undefined") return;
|
|
@@ -38395,8 +38512,8 @@ var AppLayoutDrawerContent = React107.forwardRef(
|
|
|
38395
38512
|
const resolvedSide = side ?? "right";
|
|
38396
38513
|
const isHorizontal = HORIZONTAL_SIDES2.has(resolvedSide);
|
|
38397
38514
|
const initialSize = defaultSize ?? (isHorizontal ? 560 : 480);
|
|
38398
|
-
const [isMobile, setIsMobile] =
|
|
38399
|
-
|
|
38515
|
+
const [isMobile, setIsMobile] = React108.useState(false);
|
|
38516
|
+
React108.useEffect(() => {
|
|
38400
38517
|
if (typeof window === "undefined") return;
|
|
38401
38518
|
const mq = window.matchMedia(`(max-width: ${mobileBreakpoint - 1}px)`);
|
|
38402
38519
|
const update = () => setIsMobile(mq.matches);
|
|
@@ -38511,7 +38628,7 @@ init_button2();
|
|
|
38511
38628
|
init_cn();
|
|
38512
38629
|
|
|
38513
38630
|
// src/components/features/notifications/notification-tile.tsx
|
|
38514
|
-
import { useMemo as useMemo38, useEffect as
|
|
38631
|
+
import { useMemo as useMemo38, useEffect as useEffect64, useState as useState84 } from "react";
|
|
38515
38632
|
init_cn();
|
|
38516
38633
|
import { jsx as jsx287, jsxs as jsxs220 } from "react/jsx-runtime";
|
|
38517
38634
|
var variantBySeverity = {
|
|
@@ -38552,14 +38669,14 @@ function NotificationTile({
|
|
|
38552
38669
|
settled
|
|
38553
38670
|
} = notification;
|
|
38554
38671
|
const accentVariant = (severity ? variantBySeverity[severity] : void 0) ?? variant;
|
|
38555
|
-
const [failedImageUrl, setFailedImageUrl] =
|
|
38672
|
+
const [failedImageUrl, setFailedImageUrl] = useState84(null);
|
|
38556
38673
|
const image = imageUrl && imageUrl !== failedImageUrl ? imageUrl : void 0;
|
|
38557
38674
|
const createdAtDate = new Date(createdAt);
|
|
38558
38675
|
const createdAtIso = Number.isNaN(createdAtDate.getTime()) ? null : createdAtDate.toISOString();
|
|
38559
38676
|
const initialElapsed = useMemo38(() => Date.now() - createdAt, [createdAt]);
|
|
38560
38677
|
const isLive = !read && !settled && initialElapsed < liveDurationMs;
|
|
38561
38678
|
const counting = isLive && !paused;
|
|
38562
|
-
|
|
38679
|
+
useEffect64(() => {
|
|
38563
38680
|
if (!counting) return;
|
|
38564
38681
|
const remaining = Math.max(0, liveDurationMs - initialElapsed);
|
|
38565
38682
|
const timer = window.setTimeout(() => {
|
|
@@ -38784,11 +38901,11 @@ function DrawerScrollList({
|
|
|
38784
38901
|
loadMoreRootMargin,
|
|
38785
38902
|
renderTile
|
|
38786
38903
|
}) {
|
|
38787
|
-
const scrollRef =
|
|
38788
|
-
const sentinelRef =
|
|
38789
|
-
const loadMoreRef =
|
|
38904
|
+
const scrollRef = useRef47(null);
|
|
38905
|
+
const sentinelRef = useRef47(null);
|
|
38906
|
+
const loadMoreRef = useRef47(loadMore);
|
|
38790
38907
|
loadMoreRef.current = loadMore;
|
|
38791
|
-
|
|
38908
|
+
useEffect65(() => {
|
|
38792
38909
|
if (!loadMore || !hasMore || isLoadingMore) return;
|
|
38793
38910
|
const sentinel = sentinelRef.current;
|
|
38794
38911
|
const root = scrollRef.current;
|
|
@@ -39008,7 +39125,7 @@ function NotificationPopups({
|
|
|
39008
39125
|
|
|
39009
39126
|
// src/components/features/notifications/approval-request-notification-tile.tsx
|
|
39010
39127
|
init_button2();
|
|
39011
|
-
import { useMemo as useMemo39, useState as
|
|
39128
|
+
import { useMemo as useMemo39, useState as useState85 } from "react";
|
|
39012
39129
|
|
|
39013
39130
|
// src/components/chat/types/chat.types.ts
|
|
39014
39131
|
var CHAT_TYPE = {
|
|
@@ -39221,10 +39338,10 @@ function ApprovalRequestNotificationTile({
|
|
|
39221
39338
|
defaultExpanded = false,
|
|
39222
39339
|
className
|
|
39223
39340
|
}) {
|
|
39224
|
-
const [expanded, setExpanded] =
|
|
39225
|
-
const [pinned, setPinned] =
|
|
39226
|
-
const [processing, setProcessing] =
|
|
39227
|
-
const [localStatus, setLocalStatus] =
|
|
39341
|
+
const [expanded, setExpanded] = useState85(defaultExpanded);
|
|
39342
|
+
const [pinned, setPinned] = useState85(defaultExpanded);
|
|
39343
|
+
const [processing, setProcessing] = useState85(false);
|
|
39344
|
+
const [localStatus, setLocalStatus] = useState85(null);
|
|
39228
39345
|
const approval = getApprovalMeta(notification);
|
|
39229
39346
|
const resolvedStatus = resolutionToStatus(approval?.resolution);
|
|
39230
39347
|
const status = resolvedStatus !== "pending" ? resolvedStatus : localStatus ?? "pending";
|
|
@@ -39301,36 +39418,36 @@ function ApprovalRequestNotificationTile({
|
|
|
39301
39418
|
}
|
|
39302
39419
|
|
|
39303
39420
|
// src/components/features/time-tracker/time-tracker-context.tsx
|
|
39304
|
-
import * as
|
|
39421
|
+
import * as React109 from "react";
|
|
39305
39422
|
import { jsx as jsx291 } from "react/jsx-runtime";
|
|
39306
|
-
var TimeTrackerContext =
|
|
39423
|
+
var TimeTrackerContext = React109.createContext(null);
|
|
39307
39424
|
function TimeTrackerProvider({ children, defaultOpen = false, ...data }) {
|
|
39308
|
-
const [isOpen, setIsOpen] =
|
|
39309
|
-
const open =
|
|
39310
|
-
const close =
|
|
39311
|
-
const toggle =
|
|
39425
|
+
const [isOpen, setIsOpen] = React109.useState(defaultOpen);
|
|
39426
|
+
const open = React109.useCallback(() => setIsOpen(true), []);
|
|
39427
|
+
const close = React109.useCallback(() => setIsOpen(false), []);
|
|
39428
|
+
const toggle = React109.useCallback(() => setIsOpen((v) => !v), []);
|
|
39312
39429
|
const value = { ...data, isOpen, open, close, toggle };
|
|
39313
39430
|
return /* @__PURE__ */ jsx291(TimeTrackerContext.Provider, { value, children });
|
|
39314
39431
|
}
|
|
39315
39432
|
function useTimeTracker() {
|
|
39316
|
-
const ctx =
|
|
39433
|
+
const ctx = React109.useContext(TimeTrackerContext);
|
|
39317
39434
|
if (!ctx) {
|
|
39318
39435
|
throw new Error("useTimeTracker must be used inside <TimeTrackerProvider>");
|
|
39319
39436
|
}
|
|
39320
39437
|
return ctx;
|
|
39321
39438
|
}
|
|
39322
39439
|
function useOptionalTimeTracker() {
|
|
39323
|
-
return
|
|
39440
|
+
return React109.useContext(TimeTrackerContext);
|
|
39324
39441
|
}
|
|
39325
39442
|
|
|
39326
39443
|
// src/components/features/time-tracker/time-tracker-panel.tsx
|
|
39327
39444
|
init_cn();
|
|
39328
|
-
import { useEffect as
|
|
39445
|
+
import { useEffect as useEffect67, useState as useState88 } from "react";
|
|
39329
39446
|
init_button();
|
|
39330
39447
|
init_split_button();
|
|
39331
39448
|
|
|
39332
39449
|
// src/components/features/time-tracker/use-tracker-clock.ts
|
|
39333
|
-
import { useEffect as
|
|
39450
|
+
import { useEffect as useEffect66, useState as useState87 } from "react";
|
|
39334
39451
|
function formatElapsed(totalMs) {
|
|
39335
39452
|
const totalSeconds = Math.max(0, Math.floor(totalMs / 1e3));
|
|
39336
39453
|
const hours = Math.floor(totalSeconds / 3600);
|
|
@@ -39340,8 +39457,8 @@ function formatElapsed(totalMs) {
|
|
|
39340
39457
|
return `${pad(hours)}:${pad(minutes)}:${pad(seconds)}`;
|
|
39341
39458
|
}
|
|
39342
39459
|
function useTrackerClock({ status, runningSince, accumulatedMs = 0 }) {
|
|
39343
|
-
const [now, setNow] =
|
|
39344
|
-
|
|
39460
|
+
const [now, setNow] = useState87(() => Date.now());
|
|
39461
|
+
useEffect66(() => {
|
|
39345
39462
|
if (status !== "tracking") return;
|
|
39346
39463
|
setNow(Date.now());
|
|
39347
39464
|
const id = setInterval(() => setNow(Date.now()), 1e3);
|
|
@@ -39396,12 +39513,12 @@ function TimeTrackerPanel({
|
|
|
39396
39513
|
className
|
|
39397
39514
|
}) {
|
|
39398
39515
|
const elapsedLabel = useTrackerClock({ status, runningSince, accumulatedMs });
|
|
39399
|
-
const [showValidationError, setShowValidationError] =
|
|
39516
|
+
const [showValidationError, setShowValidationError] = useState88(false);
|
|
39400
39517
|
const isRunning = status === "tracking";
|
|
39401
39518
|
const isActive = status !== "ready";
|
|
39402
39519
|
const hasContent2 = selectedTicketId != null || notes.trim() !== "";
|
|
39403
39520
|
const showFieldError = isActive && showValidationError && !hasContent2;
|
|
39404
|
-
|
|
39521
|
+
useEffect67(() => {
|
|
39405
39522
|
if (status === "ready") setShowValidationError(false);
|
|
39406
39523
|
}, [status]);
|
|
39407
39524
|
const handleSubmit = () => {
|
|
@@ -39652,7 +39769,7 @@ function LastEntryRow({ entry, onClick }) {
|
|
|
39652
39769
|
// src/components/features/time-tracker/time-tracker-header-button.tsx
|
|
39653
39770
|
init_cn();
|
|
39654
39771
|
import * as PopoverPrimitive5 from "@radix-ui/react-popover";
|
|
39655
|
-
import { useEffect as
|
|
39772
|
+
import { useEffect as useEffect68, useRef as useRef48 } from "react";
|
|
39656
39773
|
|
|
39657
39774
|
// src/components/navigation/header-button.tsx
|
|
39658
39775
|
init_cn();
|
|
@@ -39735,11 +39852,11 @@ function TimeTrackerHeaderButton({ className, disabled }) {
|
|
|
39735
39852
|
const layoutContainer = useAppLayoutDrawerContainer();
|
|
39736
39853
|
const coordination = useAppLayoutDrawerCoordination();
|
|
39737
39854
|
const isOpen = ctx?.isOpen ?? false;
|
|
39738
|
-
const isOpenRef =
|
|
39855
|
+
const isOpenRef = useRef48(isOpen);
|
|
39739
39856
|
isOpenRef.current = isOpen;
|
|
39740
|
-
const closeRef =
|
|
39857
|
+
const closeRef = useRef48(ctx?.close);
|
|
39741
39858
|
closeRef.current = ctx?.close;
|
|
39742
|
-
const selfHandleRef =
|
|
39859
|
+
const selfHandleRef = useRef48(null);
|
|
39743
39860
|
if (!selfHandleRef.current) {
|
|
39744
39861
|
selfHandleRef.current = {
|
|
39745
39862
|
close: () => {
|
|
@@ -39747,10 +39864,10 @@ function TimeTrackerHeaderButton({ className, disabled }) {
|
|
|
39747
39864
|
}
|
|
39748
39865
|
};
|
|
39749
39866
|
}
|
|
39750
|
-
|
|
39867
|
+
useEffect68(() => {
|
|
39751
39868
|
if (isOpen) coordination?.notifyDrawerDidOpen(selfHandleRef.current ?? void 0);
|
|
39752
39869
|
}, [isOpen, coordination]);
|
|
39753
|
-
|
|
39870
|
+
useEffect68(() => {
|
|
39754
39871
|
if (!selfHandleRef.current) return;
|
|
39755
39872
|
return coordination?.registerDrawer(selfHandleRef.current);
|
|
39756
39873
|
}, [coordination]);
|
|
@@ -39831,7 +39948,7 @@ function TimeTrackerHeaderButton({ className, disabled }) {
|
|
|
39831
39948
|
import { combine as combine3 } from "@atlaskit/pragmatic-drag-and-drop/combine";
|
|
39832
39949
|
import { monitorForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
|
39833
39950
|
import { preventUnhandled } from "@atlaskit/pragmatic-drag-and-drop/utils/prevent-unhandled";
|
|
39834
|
-
import { Fragment as Fragment56, useCallback as useCallback37, useEffect as
|
|
39951
|
+
import { Fragment as Fragment56, useCallback as useCallback37, useEffect as useEffect71, useMemo as useMemo41, useRef as useRef54, useState as useState94 } from "react";
|
|
39835
39952
|
import { createPortal } from "react-dom";
|
|
39836
39953
|
|
|
39837
39954
|
// src/utils/auto-scroll-ancestors.ts
|
|
@@ -39891,7 +40008,7 @@ init_cn();
|
|
|
39891
40008
|
|
|
39892
40009
|
// src/components/features/board/board-column.tsx
|
|
39893
40010
|
import { dropTargetForElements as dropTargetForElements2 } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
|
39894
|
-
import { memo as memo8, useCallback as useCallback35, useEffect as
|
|
40011
|
+
import { memo as memo8, useCallback as useCallback35, useEffect as useEffect70, useRef as useRef52, useState as useState92 } from "react";
|
|
39895
40012
|
init_cn();
|
|
39896
40013
|
import { attachClosestEdge as attachClosestEdge2 } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge";
|
|
39897
40014
|
|
|
@@ -39899,13 +40016,13 @@ import { attachClosestEdge as attachClosestEdge2 } from "@atlaskit/pragmatic-dra
|
|
|
39899
40016
|
init_button();
|
|
39900
40017
|
|
|
39901
40018
|
// src/components/ui/touch-friendly-tooltip.tsx
|
|
39902
|
-
import * as
|
|
40019
|
+
import * as React110 from "react";
|
|
39903
40020
|
import { jsx as jsx296, jsxs as jsxs226 } from "react/jsx-runtime";
|
|
39904
40021
|
var dismissOpenTooltip = null;
|
|
39905
40022
|
function TouchFriendlyTooltip({ content, side = "left", children }) {
|
|
39906
|
-
const [open, setOpen] =
|
|
39907
|
-
const isTouchRef =
|
|
39908
|
-
const close =
|
|
40023
|
+
const [open, setOpen] = React110.useState(false);
|
|
40024
|
+
const isTouchRef = React110.useRef(false);
|
|
40025
|
+
const close = React110.useCallback(() => setOpen(false), []);
|
|
39909
40026
|
if (!content) return children;
|
|
39910
40027
|
const toggleFromTouch = () => {
|
|
39911
40028
|
setOpen((prev) => {
|
|
@@ -40050,7 +40167,7 @@ function isSameAim(a, b) {
|
|
|
40050
40167
|
}
|
|
40051
40168
|
|
|
40052
40169
|
// src/components/features/board/use-lane-scroll-anchor.ts
|
|
40053
|
-
import { useRef as
|
|
40170
|
+
import { useRef as useRef50 } from "react";
|
|
40054
40171
|
var TICKET_ID_ATTRIBUTE = "data-ticket-id";
|
|
40055
40172
|
function cardPositions(root) {
|
|
40056
40173
|
return Array.from(root.querySelectorAll(`[${TICKET_ID_ATTRIBUTE}]`)).map((element) => ({
|
|
@@ -40059,7 +40176,7 @@ function cardPositions(root) {
|
|
|
40059
40176
|
}));
|
|
40060
40177
|
}
|
|
40061
40178
|
function useLaneScrollAnchor(scrollRef, tickets) {
|
|
40062
|
-
const positionsRef =
|
|
40179
|
+
const positionsRef = useRef50([]);
|
|
40063
40180
|
useIsomorphicLayoutEffect(() => {
|
|
40064
40181
|
const root = scrollRef.current;
|
|
40065
40182
|
if (!root) return;
|
|
@@ -40122,10 +40239,10 @@ import { setCustomNativeDragPreview } from "@atlaskit/pragmatic-drag-and-drop/el
|
|
|
40122
40239
|
import { attachClosestEdge } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge";
|
|
40123
40240
|
import {
|
|
40124
40241
|
memo as memo7,
|
|
40125
|
-
useEffect as
|
|
40242
|
+
useEffect as useEffect69,
|
|
40126
40243
|
useMemo as useMemo40,
|
|
40127
|
-
useRef as
|
|
40128
|
-
useState as
|
|
40244
|
+
useRef as useRef51,
|
|
40245
|
+
useState as useState91
|
|
40129
40246
|
} from "react";
|
|
40130
40247
|
init_cn();
|
|
40131
40248
|
|
|
@@ -40140,10 +40257,10 @@ function holdMoveDragEffect(element) {
|
|
|
40140
40257
|
|
|
40141
40258
|
// src/components/features/board/board-ticket-approval.tsx
|
|
40142
40259
|
init_cn();
|
|
40143
|
-
import * as
|
|
40260
|
+
import * as React111 from "react";
|
|
40144
40261
|
import { jsx as jsx298, jsxs as jsxs228 } from "react/jsx-runtime";
|
|
40145
40262
|
function BoardTicketApproval({ pendingApproval, onApprove, onReject }) {
|
|
40146
|
-
const [expanded, setExpanded] =
|
|
40263
|
+
const [expanded, setExpanded] = React111.useState(false);
|
|
40147
40264
|
const { innerRef, containerStyle } = useCollapsible({ expanded });
|
|
40148
40265
|
const isAdmin = pendingApproval.approvalType === "ADMIN";
|
|
40149
40266
|
return /* @__PURE__ */ jsxs228("div", { className: "pointer-events-auto flex flex-col", children: [
|
|
@@ -40348,10 +40465,10 @@ var TicketCard = memo7(function TicketCard2({
|
|
|
40348
40465
|
onApprove,
|
|
40349
40466
|
onReject
|
|
40350
40467
|
}) {
|
|
40351
|
-
const ref =
|
|
40352
|
-
const ticketRef =
|
|
40468
|
+
const ref = useRef51(null);
|
|
40469
|
+
const ticketRef = useRef51(ticket);
|
|
40353
40470
|
ticketRef.current = ticket;
|
|
40354
|
-
const [isDragging, setIsDragging] =
|
|
40471
|
+
const [isDragging, setIsDragging] = useState91(false);
|
|
40355
40472
|
const isLanding = useIsLanding(ticket.id);
|
|
40356
40473
|
const aim = useDropAim();
|
|
40357
40474
|
const closestEdge = aim && aim.columnId === columnId && aim.ticketId === ticket.id ? aim.edge : null;
|
|
@@ -40362,7 +40479,7 @@ var TicketCard = memo7(function TicketCard2({
|
|
|
40362
40479
|
e.preventDefault();
|
|
40363
40480
|
lift(ticket.id);
|
|
40364
40481
|
};
|
|
40365
|
-
|
|
40482
|
+
useEffect69(() => {
|
|
40366
40483
|
const element = ref.current;
|
|
40367
40484
|
if (!element || dragDisabled) return;
|
|
40368
40485
|
const identity = { type: "ticket", ticketId: ticket.id, columnId };
|
|
@@ -40531,10 +40648,10 @@ function TicketTagRow({ tags }) {
|
|
|
40531
40648
|
}
|
|
40532
40649
|
|
|
40533
40650
|
// src/components/features/board/ticket-card-skeleton.tsx
|
|
40534
|
-
import * as
|
|
40651
|
+
import * as React112 from "react";
|
|
40535
40652
|
init_cn();
|
|
40536
40653
|
import { jsx as jsx300, jsxs as jsxs230 } from "react/jsx-runtime";
|
|
40537
|
-
var TicketCardSkeleton =
|
|
40654
|
+
var TicketCardSkeleton = React112.forwardRef(
|
|
40538
40655
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxs230(
|
|
40539
40656
|
"div",
|
|
40540
40657
|
{
|
|
@@ -40585,9 +40702,9 @@ var BoardColumn = memo8(function BoardColumn2({
|
|
|
40585
40702
|
joinLeft = false,
|
|
40586
40703
|
joinRight = false
|
|
40587
40704
|
}) {
|
|
40588
|
-
const laneRef =
|
|
40589
|
-
const [isOver, setIsOver] =
|
|
40590
|
-
|
|
40705
|
+
const laneRef = useRef52(null);
|
|
40706
|
+
const [isOver, setIsOver] = useState92(false);
|
|
40707
|
+
useEffect70(() => {
|
|
40591
40708
|
const element = laneRef.current;
|
|
40592
40709
|
if (!element || collapsed || column.dropDisabled) return;
|
|
40593
40710
|
return dropTargetForElements2({
|
|
@@ -40672,19 +40789,19 @@ function ColumnBody({
|
|
|
40672
40789
|
onLoadMore,
|
|
40673
40790
|
loadMoreRootMargin
|
|
40674
40791
|
}) {
|
|
40675
|
-
const scrollRef =
|
|
40676
|
-
const sentinelRef =
|
|
40792
|
+
const scrollRef = useRef52(null);
|
|
40793
|
+
const sentinelRef = useRef52(null);
|
|
40677
40794
|
useLaneScrollAnchor(scrollRef, column.tickets);
|
|
40678
|
-
|
|
40795
|
+
useEffect70(() => {
|
|
40679
40796
|
const element = scrollRef.current;
|
|
40680
40797
|
if (!element) return;
|
|
40681
40798
|
return autoScrollColumn(element);
|
|
40682
40799
|
}, []);
|
|
40683
|
-
const loadMoreRef =
|
|
40800
|
+
const loadMoreRef = useRef52(onLoadMore);
|
|
40684
40801
|
loadMoreRef.current = onLoadMore;
|
|
40685
|
-
const columnIdRef =
|
|
40802
|
+
const columnIdRef = useRef52(column.id);
|
|
40686
40803
|
columnIdRef.current = column.id;
|
|
40687
|
-
|
|
40804
|
+
useEffect70(() => {
|
|
40688
40805
|
if (!column.hasMore || column.isLoadingMore) return;
|
|
40689
40806
|
const sentinel = sentinelRef.current;
|
|
40690
40807
|
const root = scrollRef.current;
|
|
@@ -40815,16 +40932,16 @@ function resolveBoardDrop(columns, { source, target }) {
|
|
|
40815
40932
|
}
|
|
40816
40933
|
|
|
40817
40934
|
// src/components/features/board/use-board-collapse.ts
|
|
40818
|
-
import { useCallback as useCallback36, useRef as
|
|
40935
|
+
import { useCallback as useCallback36, useRef as useRef53, useState as useState93 } from "react";
|
|
40819
40936
|
function useBoardCollapse(storageKey) {
|
|
40820
40937
|
const [persisted, setPersisted] = useLocalStorage(
|
|
40821
40938
|
storageKey ?? "__board_collapse_unused__",
|
|
40822
40939
|
{}
|
|
40823
40940
|
);
|
|
40824
|
-
const [memory, setMemory] =
|
|
40941
|
+
const [memory, setMemory] = useState93({});
|
|
40825
40942
|
const collapsed = storageKey ? persisted : memory;
|
|
40826
40943
|
const setMap = storageKey ? setPersisted : setMemory;
|
|
40827
|
-
const setMapRef =
|
|
40944
|
+
const setMapRef = useRef53(setMap);
|
|
40828
40945
|
setMapRef.current = setMap;
|
|
40829
40946
|
const toggle = useCallback36((columnId) => {
|
|
40830
40947
|
setMapRef.current((prev) => ({ ...prev, [columnId]: !prev[columnId] }));
|
|
@@ -40869,11 +40986,11 @@ function Board({
|
|
|
40869
40986
|
onThumbPointerMove,
|
|
40870
40987
|
onThumbPointerUp
|
|
40871
40988
|
} = useHorizontalScrollbar();
|
|
40872
|
-
const columnsRef =
|
|
40873
|
-
const onChangeRef =
|
|
40989
|
+
const columnsRef = useRef54(columns);
|
|
40990
|
+
const onChangeRef = useRef54(onChange);
|
|
40874
40991
|
onChangeRef.current = onChange;
|
|
40875
|
-
const boardRef =
|
|
40876
|
-
const scrollerRef =
|
|
40992
|
+
const boardRef = useRef54(null);
|
|
40993
|
+
const scrollerRef = useRef54(null);
|
|
40877
40994
|
const setScroller = useCallback37(
|
|
40878
40995
|
(node) => {
|
|
40879
40996
|
scrollerRef.current = node;
|
|
@@ -40881,18 +40998,18 @@ function Board({
|
|
|
40881
40998
|
},
|
|
40882
40999
|
[scrollRef]
|
|
40883
41000
|
);
|
|
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] =
|
|
41001
|
+
const [aim, setAim] = useState94(null);
|
|
41002
|
+
const [lifted, setLifted] = useState94(null);
|
|
41003
|
+
const [announcement, setAnnouncement] = useState94("");
|
|
41004
|
+
const dragGeometry = useRef54(null);
|
|
41005
|
+
const [landingPreview, setLandingPreview] = useState94(null);
|
|
41006
|
+
const previewRef = useRef54(null);
|
|
41007
|
+
const [pendingMove, setPendingMove] = useState94(null);
|
|
40891
41008
|
const view = useMemo41(() => pendingMove ? applyPendingMove(columns, pendingMove) : columns, [columns, pendingMove]);
|
|
40892
41009
|
columnsRef.current = view;
|
|
40893
|
-
const [landing, setLanding] =
|
|
40894
|
-
const landingTimer =
|
|
40895
|
-
const pointRef =
|
|
41010
|
+
const [landing, setLanding] = useState94(null);
|
|
41011
|
+
const landingTimer = useRef54(null);
|
|
41012
|
+
const pointRef = useRef54({ x: 0, y: 0 });
|
|
40896
41013
|
const laneLabel = useCallback37(
|
|
40897
41014
|
(columnId) => view.find((c) => c.id === columnId)?.label ?? columnId,
|
|
40898
41015
|
[view]
|
|
@@ -40946,7 +41063,7 @@ function Board({
|
|
|
40946
41063
|
},
|
|
40947
41064
|
[lifted, view, acceptsLifted, laneLabel]
|
|
40948
41065
|
);
|
|
40949
|
-
|
|
41066
|
+
useEffect71(() => {
|
|
40950
41067
|
if (!lifted) return;
|
|
40951
41068
|
const onKeyDown = (event) => {
|
|
40952
41069
|
if (event.key === "Escape") {
|
|
@@ -40964,7 +41081,7 @@ function Board({
|
|
|
40964
41081
|
window.addEventListener("keydown", onKeyDown);
|
|
40965
41082
|
return () => window.removeEventListener("keydown", onKeyDown);
|
|
40966
41083
|
}, [lifted, drop, walk]);
|
|
40967
|
-
|
|
41084
|
+
useEffect71(() => {
|
|
40968
41085
|
if (!lifted) return;
|
|
40969
41086
|
boardRef.current?.querySelector(`[${DROP_LINE_ATTRIBUTE}]`)?.scrollIntoView({ block: "nearest", inline: "nearest" });
|
|
40970
41087
|
}, [lifted]);
|
|
@@ -40975,7 +41092,7 @@ function Board({
|
|
|
40975
41092
|
const anchor = aimToChange(view, lifted.ticketId, lifted.aim) ? aimAnchor(view, lifted.ticketId, lifted.aim) : { ticketId: null, edge: null };
|
|
40976
41093
|
return { columnId: lifted.aim.columnId, ...anchor, ticket };
|
|
40977
41094
|
}, [lifted, view]);
|
|
40978
|
-
|
|
41095
|
+
useEffect71(() => {
|
|
40979
41096
|
if (!pendingMove) return;
|
|
40980
41097
|
if (hasMoveSettled(columns, pendingMove)) {
|
|
40981
41098
|
setPendingMove(null);
|
|
@@ -40984,7 +41101,7 @@ function Board({
|
|
|
40984
41101
|
const timer = setTimeout(() => setPendingMove(null), PENDING_MOVE_TIMEOUT_MS);
|
|
40985
41102
|
return () => clearTimeout(timer);
|
|
40986
41103
|
}, [columns, pendingMove]);
|
|
40987
|
-
|
|
41104
|
+
useEffect71(() => {
|
|
40988
41105
|
const scroller = scrollerRef.current;
|
|
40989
41106
|
const readAim = (source, target) => {
|
|
40990
41107
|
const ticket = source.data.ticket;
|
|
@@ -41283,11 +41400,11 @@ import {
|
|
|
41283
41400
|
createContext as createContext15,
|
|
41284
41401
|
useCallback as useCallback38,
|
|
41285
41402
|
useContext as useContext15,
|
|
41286
|
-
useEffect as
|
|
41403
|
+
useEffect as useEffect72,
|
|
41287
41404
|
useId as useId6,
|
|
41288
41405
|
useMemo as useMemo42,
|
|
41289
|
-
useRef as
|
|
41290
|
-
useState as
|
|
41406
|
+
useRef as useRef55,
|
|
41407
|
+
useState as useState95
|
|
41291
41408
|
} from "react";
|
|
41292
41409
|
import { jsx as jsx303, jsxs as jsxs233 } from "react/jsx-runtime";
|
|
41293
41410
|
var SORTABLE_ITEM_ATTRIBUTE = "data-sortable-item";
|
|
@@ -41301,16 +41418,16 @@ function useSortableListContext() {
|
|
|
41301
41418
|
return context;
|
|
41302
41419
|
}
|
|
41303
41420
|
function SortableList({ onReorder, getItemLabel, disabled = false, className, children }) {
|
|
41304
|
-
const listRef =
|
|
41421
|
+
const listRef = useRef55(null);
|
|
41305
41422
|
const dragType = useId6();
|
|
41306
|
-
const [announcement, setAnnouncement] =
|
|
41307
|
-
const onReorderRef =
|
|
41423
|
+
const [announcement, setAnnouncement] = useState95("");
|
|
41424
|
+
const onReorderRef = useRef55(onReorder);
|
|
41308
41425
|
onReorderRef.current = onReorder;
|
|
41309
|
-
const getItemLabelRef =
|
|
41426
|
+
const getItemLabelRef = useRef55(getItemLabel);
|
|
41310
41427
|
getItemLabelRef.current = getItemLabel;
|
|
41311
|
-
const flipFrom =
|
|
41312
|
-
const [flipTick, setFlipTick] =
|
|
41313
|
-
const flipTimer =
|
|
41428
|
+
const flipFrom = useRef55(null);
|
|
41429
|
+
const [flipTick, setFlipTick] = useState95(0);
|
|
41430
|
+
const flipTimer = useRef55(null);
|
|
41314
41431
|
const readItems = useCallback38(
|
|
41315
41432
|
() => [...listRef.current?.querySelectorAll(`[${SORTABLE_ITEM_ATTRIBUTE}]`) ?? []],
|
|
41316
41433
|
[]
|
|
@@ -41324,7 +41441,7 @@ function SortableList({ onReorder, getItemLabel, disabled = false, className, ch
|
|
|
41324
41441
|
},
|
|
41325
41442
|
[readItems]
|
|
41326
41443
|
);
|
|
41327
|
-
|
|
41444
|
+
useEffect72(() => {
|
|
41328
41445
|
const list = listRef.current;
|
|
41329
41446
|
if (!list) return;
|
|
41330
41447
|
let drag = null;
|
|
@@ -41413,7 +41530,7 @@ function SortableList({ onReorder, getItemLabel, disabled = false, className, ch
|
|
|
41413
41530
|
for (const item of moving) item.style.transition = "";
|
|
41414
41531
|
}, DROP_MS2);
|
|
41415
41532
|
}, [flipTick]);
|
|
41416
|
-
|
|
41533
|
+
useEffect72(
|
|
41417
41534
|
() => () => {
|
|
41418
41535
|
if (flipTimer.current) clearTimeout(flipTimer.current);
|
|
41419
41536
|
},
|
|
@@ -41433,17 +41550,17 @@ function SortableList({ onReorder, getItemLabel, disabled = false, className, ch
|
|
|
41433
41550
|
import { combine as combine5 } from "@atlaskit/pragmatic-drag-and-drop/combine";
|
|
41434
41551
|
import { draggable as draggable2 } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
|
41435
41552
|
import { disableNativeDragPreview } from "@atlaskit/pragmatic-drag-and-drop/element/disable-native-drag-preview";
|
|
41436
|
-
import { useCallback as useCallback39, useEffect as
|
|
41553
|
+
import { useCallback as useCallback39, useEffect as useEffect73, useState as useState96 } from "react";
|
|
41437
41554
|
function useSortableItem() {
|
|
41438
41555
|
const { dragType, disabled, reorder, readItems } = useSortableListContext();
|
|
41439
|
-
const [item, setItem] =
|
|
41440
|
-
const [handle, setHandle] =
|
|
41441
|
-
const [isDragging, setIsDragging] =
|
|
41556
|
+
const [item, setItem] = useState96(null);
|
|
41557
|
+
const [handle, setHandle] = useState96(null);
|
|
41558
|
+
const [isDragging, setIsDragging] = useState96(false);
|
|
41442
41559
|
const itemRef = useCallback39((node) => {
|
|
41443
41560
|
node?.setAttribute(SORTABLE_ITEM_ATTRIBUTE, "");
|
|
41444
41561
|
setItem(node);
|
|
41445
41562
|
}, []);
|
|
41446
|
-
|
|
41563
|
+
useEffect73(() => {
|
|
41447
41564
|
if (!item || !handle || disabled) return;
|
|
41448
41565
|
return combine5(
|
|
41449
41566
|
// The drag has to start as a "move", or its first frame is drawn with the
|
|
@@ -41494,7 +41611,7 @@ import {
|
|
|
41494
41611
|
verticalListSortingStrategy
|
|
41495
41612
|
} from "@dnd-kit/sortable";
|
|
41496
41613
|
import { CSS } from "@dnd-kit/utilities";
|
|
41497
|
-
import * as
|
|
41614
|
+
import * as React113 from "react";
|
|
41498
41615
|
import { jsx as jsx304 } from "react/jsx-runtime";
|
|
41499
41616
|
function TicketStatusConfigList({
|
|
41500
41617
|
items,
|
|
@@ -41514,7 +41631,7 @@ function TicketStatusConfigList({
|
|
|
41514
41631
|
if (oldIndex === -1 || newIndex === -1) return;
|
|
41515
41632
|
onReorder(oldIndex, newIndex);
|
|
41516
41633
|
};
|
|
41517
|
-
const sortableIds =
|
|
41634
|
+
const sortableIds = React113.useMemo(() => items.map((i) => i.id), [items]);
|
|
41518
41635
|
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
41636
|
}
|
|
41520
41637
|
function SortableRow({
|
|
@@ -41539,7 +41656,7 @@ function SortableRow({
|
|
|
41539
41656
|
|
|
41540
41657
|
// src/components/navigation/header.tsx
|
|
41541
41658
|
init_next_link();
|
|
41542
|
-
import
|
|
41659
|
+
import React116, { useEffect as useEffect75, useRef as useRef57, useState as useState98 } from "react";
|
|
41543
41660
|
init_button2();
|
|
41544
41661
|
|
|
41545
41662
|
// src/components/navigation/mingo-ai-button.tsx
|
|
@@ -41593,14 +41710,14 @@ function MingoAiButton({ source, icon, label = "Mingo AI", className, onClick, .
|
|
|
41593
41710
|
}
|
|
41594
41711
|
|
|
41595
41712
|
// src/components/navigation/mobile-nav-panel.tsx
|
|
41596
|
-
import { useRef as
|
|
41713
|
+
import { useRef as useRef56 } from "react";
|
|
41597
41714
|
import { usePreventScroll as usePreventScroll2 } from "@react-aria/overlays";
|
|
41598
41715
|
init_button2();
|
|
41599
41716
|
import { X as X10 } from "lucide-react";
|
|
41600
41717
|
import { Fragment as Fragment57, jsx as jsx306, jsxs as jsxs235 } from "react/jsx-runtime";
|
|
41601
41718
|
var MOBILE_NAV_PANEL_ID = "mobile-nav-panel";
|
|
41602
41719
|
function MobileNavPanel({ isOpen, config }) {
|
|
41603
|
-
const panelRef =
|
|
41720
|
+
const panelRef = useRef56(null);
|
|
41604
41721
|
usePreventScroll2({ isDisabled: !isOpen });
|
|
41605
41722
|
useFocusTrap(panelRef, isOpen, { onEscape: config.onClose });
|
|
41606
41723
|
const headerHeight = useHeaderHeight(64, { enabled: isOpen });
|
|
@@ -41716,11 +41833,11 @@ function MobileNavPanel({ isOpen, config }) {
|
|
|
41716
41833
|
init_cn();
|
|
41717
41834
|
|
|
41718
41835
|
// src/components/tickets/ticket-live-provider.tsx
|
|
41719
|
-
import
|
|
41836
|
+
import React115 from "react";
|
|
41720
41837
|
import { useQueryClient } from "@tanstack/react-query";
|
|
41721
41838
|
|
|
41722
41839
|
// src/components/chat/hooks/use-chat-identity.ts
|
|
41723
|
-
import { createContext as createContext16, createElement as createElement2, useContext as useContext16, useEffect as
|
|
41840
|
+
import { createContext as createContext16, createElement as createElement2, useContext as useContext16, useEffect as useEffect74, useState as useState97 } from "react";
|
|
41724
41841
|
var ANON_DEFAULTS = {
|
|
41725
41842
|
authTier: "anon",
|
|
41726
41843
|
source: null,
|
|
@@ -41731,9 +41848,9 @@ function useResolveChatIdentity(enabled) {
|
|
|
41731
41848
|
const runtime = useRequiredChatRuntime();
|
|
41732
41849
|
const url = runtime.endpoints.identityUrl;
|
|
41733
41850
|
const proxyEmail = getEmbedProxyAuth()?.email ?? null;
|
|
41734
|
-
const [data, setData] =
|
|
41735
|
-
const [isLoading, setIsLoading] =
|
|
41736
|
-
|
|
41851
|
+
const [data, setData] = useState97(ANON_DEFAULTS);
|
|
41852
|
+
const [isLoading, setIsLoading] = useState97(enabled);
|
|
41853
|
+
useEffect74(() => {
|
|
41737
41854
|
if (!enabled) return;
|
|
41738
41855
|
let cancelled = false;
|
|
41739
41856
|
const ctrl = new AbortController();
|
|
@@ -41785,12 +41902,12 @@ var stampMs = (stamp) => {
|
|
|
41785
41902
|
return Number.isNaN(ms) ? 0 : ms;
|
|
41786
41903
|
};
|
|
41787
41904
|
var INVALIDATE_DEBOUNCE_MS = 1500;
|
|
41788
|
-
var TicketLiveContext =
|
|
41905
|
+
var TicketLiveContext = React115.createContext(null);
|
|
41789
41906
|
function useOptionalTicketLive() {
|
|
41790
|
-
return
|
|
41907
|
+
return React115.useContext(TicketLiveContext);
|
|
41791
41908
|
}
|
|
41792
41909
|
function useTicketLive() {
|
|
41793
|
-
const ctx =
|
|
41910
|
+
const ctx = React115.useContext(TicketLiveContext);
|
|
41794
41911
|
if (!ctx) {
|
|
41795
41912
|
throw new Error("useTicketLive must be used within <TicketLiveProvider>");
|
|
41796
41913
|
}
|
|
@@ -41809,13 +41926,13 @@ function TicketLiveProvider({ children }) {
|
|
|
41809
41926
|
const streamUrl = runtime?.endpoints.ticketStreamUrl ?? TICKET_STREAM_ENDPOINT;
|
|
41810
41927
|
const readUrl = runtime?.endpoints.ticketReadUrl ?? TICKET_READ_ENDPOINT;
|
|
41811
41928
|
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 =
|
|
41929
|
+
const [connected, setConnected] = React115.useState(false);
|
|
41930
|
+
const [summary, setSummary] = React115.useState(EMPTY_SUMMARY);
|
|
41931
|
+
const [openTicketIdState, setOpenTicketIdState] = React115.useState(null);
|
|
41932
|
+
const openTicketIdRef = React115.useRef(null);
|
|
41933
|
+
const pendingTicketIdsRef = React115.useRef(/* @__PURE__ */ new Set());
|
|
41934
|
+
const invalidateTimerRef = React115.useRef(null);
|
|
41935
|
+
const flushInvalidations = React115.useCallback(() => {
|
|
41819
41936
|
invalidateTimerRef.current = null;
|
|
41820
41937
|
const ids = Array.from(pendingTicketIdsRef.current);
|
|
41821
41938
|
pendingTicketIdsRef.current.clear();
|
|
@@ -41824,7 +41941,7 @@ function TicketLiveProvider({ children }) {
|
|
|
41824
41941
|
void queryClient.invalidateQueries({ queryKey: ["ticket-engagements", id] });
|
|
41825
41942
|
}
|
|
41826
41943
|
}, [queryClient]);
|
|
41827
|
-
const scheduleInvalidation =
|
|
41944
|
+
const scheduleInvalidation = React115.useCallback(
|
|
41828
41945
|
(ticketId) => {
|
|
41829
41946
|
if (ticketId) pendingTicketIdsRef.current.add(ticketId);
|
|
41830
41947
|
if (invalidateTimerRef.current) return;
|
|
@@ -41832,7 +41949,7 @@ function TicketLiveProvider({ children }) {
|
|
|
41832
41949
|
},
|
|
41833
41950
|
[flushInvalidations]
|
|
41834
41951
|
);
|
|
41835
|
-
const bumpUnread =
|
|
41952
|
+
const bumpUnread = React115.useCallback((ticketId, createdAt) => {
|
|
41836
41953
|
setSummary((prev) => {
|
|
41837
41954
|
const stamp = createdAt ?? (/* @__PURE__ */ new Date()).toISOString();
|
|
41838
41955
|
const existing = prev.latestUnreadAt[ticketId];
|
|
@@ -41846,7 +41963,7 @@ function TicketLiveProvider({ children }) {
|
|
|
41846
41963
|
};
|
|
41847
41964
|
});
|
|
41848
41965
|
}, []);
|
|
41849
|
-
const zeroUnread =
|
|
41966
|
+
const zeroUnread = React115.useCallback((ticketId) => {
|
|
41850
41967
|
setSummary((prev) => {
|
|
41851
41968
|
const current = prev.tickets[ticketId] ?? 0;
|
|
41852
41969
|
if (current === 0) return prev;
|
|
@@ -41857,9 +41974,9 @@ function TicketLiveProvider({ children }) {
|
|
|
41857
41974
|
return { totalUnread: Math.max(0, prev.totalUnread - current), tickets, latestUnreadAt };
|
|
41858
41975
|
});
|
|
41859
41976
|
}, []);
|
|
41860
|
-
const subscriptionRef =
|
|
41861
|
-
const noStreamRef =
|
|
41862
|
-
const handlersRef =
|
|
41977
|
+
const subscriptionRef = React115.useRef(null);
|
|
41978
|
+
const noStreamRef = React115.useRef(false);
|
|
41979
|
+
const handlersRef = React115.useRef({ onEvent: () => {
|
|
41863
41980
|
}, onStatus: () => {
|
|
41864
41981
|
}, onConnected: () => {
|
|
41865
41982
|
} });
|
|
@@ -41912,7 +42029,7 @@ function TicketLiveProvider({ children }) {
|
|
|
41912
42029
|
if (status === "no-stream") noStreamRef.current = true;
|
|
41913
42030
|
};
|
|
41914
42031
|
const streamEnabled = authed && !!streamUrl;
|
|
41915
|
-
|
|
42032
|
+
React115.useEffect(() => {
|
|
41916
42033
|
if (!streamEnabled) return;
|
|
41917
42034
|
if (typeof window === "undefined") return;
|
|
41918
42035
|
subscriptionRef.current = createSseSubscription({
|
|
@@ -41943,7 +42060,7 @@ function TicketLiveProvider({ children }) {
|
|
|
41943
42060
|
setSummary(EMPTY_SUMMARY);
|
|
41944
42061
|
};
|
|
41945
42062
|
}, [streamEnabled, streamUrl]);
|
|
41946
|
-
const markRead =
|
|
42063
|
+
const markRead = React115.useCallback(
|
|
41947
42064
|
async (ticketExternalId) => {
|
|
41948
42065
|
try {
|
|
41949
42066
|
const response = await embedAuthedFetch(readUrl, {
|
|
@@ -41965,15 +42082,15 @@ function TicketLiveProvider({ children }) {
|
|
|
41965
42082
|
},
|
|
41966
42083
|
[readUrl, zeroUnread]
|
|
41967
42084
|
);
|
|
41968
|
-
const setOpenTicketId =
|
|
42085
|
+
const setOpenTicketId = React115.useCallback((ticketExternalId) => {
|
|
41969
42086
|
openTicketIdRef.current = ticketExternalId;
|
|
41970
42087
|
setOpenTicketIdState(ticketExternalId);
|
|
41971
42088
|
}, []);
|
|
41972
|
-
const notifyTicketCreated =
|
|
42089
|
+
const notifyTicketCreated = React115.useCallback(() => {
|
|
41973
42090
|
noStreamRef.current = false;
|
|
41974
42091
|
subscriptionRef.current?.reconnectNow();
|
|
41975
42092
|
}, []);
|
|
41976
|
-
const value =
|
|
42093
|
+
const value = React115.useMemo(() => {
|
|
41977
42094
|
let unreadByTicket = summary.tickets;
|
|
41978
42095
|
let unreadTotal = summary.totalUnread;
|
|
41979
42096
|
if (openTicketIdState && unreadByTicket[openTicketIdState]) {
|
|
@@ -42143,12 +42260,12 @@ function TopNavigation({
|
|
|
42143
42260
|
import { Fragment as Fragment58, jsx as jsx310, jsxs as jsxs238 } from "react/jsx-runtime";
|
|
42144
42261
|
var NAV_ITEM_CLASSES = "text-h6 [&_svg]:h-6 [&_svg]:w-6";
|
|
42145
42262
|
function Header2({ config, platform }) {
|
|
42146
|
-
const [show, setShow] =
|
|
42147
|
-
const [lastScrollY, setLastScrollY] =
|
|
42148
|
-
const [openDropdowns, setOpenDropdowns] =
|
|
42149
|
-
const dropdownRefs =
|
|
42150
|
-
const triggerRefs =
|
|
42151
|
-
|
|
42263
|
+
const [show, setShow] = useState98(true);
|
|
42264
|
+
const [lastScrollY, setLastScrollY] = useState98(0);
|
|
42265
|
+
const [openDropdowns, setOpenDropdowns] = useState98({});
|
|
42266
|
+
const dropdownRefs = useRef57({});
|
|
42267
|
+
const triggerRefs = useRef57({});
|
|
42268
|
+
useEffect75(() => {
|
|
42152
42269
|
const handleClickOutside = (event) => {
|
|
42153
42270
|
const target = event.target;
|
|
42154
42271
|
if (!target) return;
|
|
@@ -42177,14 +42294,14 @@ function Header2({ config, platform }) {
|
|
|
42177
42294
|
document.removeEventListener("keydown", handleEscapeKey);
|
|
42178
42295
|
};
|
|
42179
42296
|
}, [openDropdowns]);
|
|
42180
|
-
|
|
42297
|
+
useEffect75(() => {
|
|
42181
42298
|
return () => {
|
|
42182
42299
|
setOpenDropdowns({});
|
|
42183
42300
|
dropdownRefs.current = {};
|
|
42184
42301
|
triggerRefs.current = {};
|
|
42185
42302
|
};
|
|
42186
42303
|
}, []);
|
|
42187
|
-
|
|
42304
|
+
useEffect75(() => {
|
|
42188
42305
|
if (!config.autoHide) {
|
|
42189
42306
|
setShow(true);
|
|
42190
42307
|
return;
|
|
@@ -42209,7 +42326,7 @@ function Header2({ config, platform }) {
|
|
|
42209
42326
|
}, [config.autoHide]);
|
|
42210
42327
|
const renderNavigationItem = (item) => {
|
|
42211
42328
|
if (item.element) {
|
|
42212
|
-
return /* @__PURE__ */ jsx310(
|
|
42329
|
+
return /* @__PURE__ */ jsx310(React116.Fragment, { children: item.element }, item.id);
|
|
42213
42330
|
}
|
|
42214
42331
|
if (item.children && item.children.length > 0) {
|
|
42215
42332
|
const isOpen = openDropdowns[item.id] || false;
|
|
@@ -42438,7 +42555,7 @@ function Header2({ config, platform }) {
|
|
|
42438
42555
|
}
|
|
42439
42556
|
|
|
42440
42557
|
// src/components/navigation/client-only-header.tsx
|
|
42441
|
-
import { useState as
|
|
42558
|
+
import { useState as useState99, useEffect as useEffect76 } from "react";
|
|
42442
42559
|
|
|
42443
42560
|
// src/components/navigation/header-skeleton.tsx
|
|
42444
42561
|
import { Fragment as Fragment59, jsx as jsx311, jsxs as jsxs239 } from "react/jsx-runtime";
|
|
@@ -42477,8 +42594,8 @@ function HeaderSkeleton({ config }) {
|
|
|
42477
42594
|
// src/components/navigation/client-only-header.tsx
|
|
42478
42595
|
import { jsx as jsx312 } from "react/jsx-runtime";
|
|
42479
42596
|
function ClientOnlyHeader({ config, skeleton }) {
|
|
42480
|
-
const [isClient, setIsClient] =
|
|
42481
|
-
|
|
42597
|
+
const [isClient, setIsClient] = useState99(false);
|
|
42598
|
+
useEffect76(() => {
|
|
42482
42599
|
setIsClient(true);
|
|
42483
42600
|
}, []);
|
|
42484
42601
|
if (!isClient) {
|
|
@@ -42488,20 +42605,20 @@ function ClientOnlyHeader({ config, skeleton }) {
|
|
|
42488
42605
|
}
|
|
42489
42606
|
|
|
42490
42607
|
// src/components/navigation/sliding-sidebar.tsx
|
|
42491
|
-
import { useState as
|
|
42608
|
+
import { useState as useState100, useEffect as useEffect77, useRef as useRef58 } from "react";
|
|
42492
42609
|
import { motion as motion2, AnimatePresence, useReducedMotion } from "framer-motion";
|
|
42493
42610
|
import { usePreventScroll as usePreventScroll3 } from "@react-aria/overlays";
|
|
42494
42611
|
init_button2();
|
|
42495
42612
|
import { Fragment as Fragment60, jsx as jsx313, jsxs as jsxs240 } from "react/jsx-runtime";
|
|
42496
42613
|
function SlidingSidebar({ config }) {
|
|
42497
|
-
const [expandedItems, setExpandedItems] =
|
|
42498
|
-
const [mounted, setMounted] =
|
|
42614
|
+
const [expandedItems, setExpandedItems] = useState100(/* @__PURE__ */ new Set());
|
|
42615
|
+
const [mounted, setMounted] = useState100(false);
|
|
42499
42616
|
const headerHeight = useHeaderHeight();
|
|
42500
|
-
const asideRef =
|
|
42617
|
+
const asideRef = useRef58(null);
|
|
42501
42618
|
const prefersReducedMotion2 = useReducedMotion();
|
|
42502
42619
|
usePreventScroll3({ isDisabled: !config.isOpen });
|
|
42503
42620
|
useFocusTrap(asideRef, config.isOpen, { onEscape: config.onClose, contain: false });
|
|
42504
|
-
|
|
42621
|
+
useEffect77(() => {
|
|
42505
42622
|
setMounted(true);
|
|
42506
42623
|
}, []);
|
|
42507
42624
|
const toggleExpanded = (itemId) => {
|
|
@@ -42669,7 +42786,7 @@ function SlidingSidebar({ config }) {
|
|
|
42669
42786
|
}
|
|
42670
42787
|
|
|
42671
42788
|
// src/components/navigation/sticky-section-nav.tsx
|
|
42672
|
-
import { useEffect as
|
|
42789
|
+
import { useEffect as useEffect78, useState as useState101, useCallback as useCallback40, useRef as useRef59 } from "react";
|
|
42673
42790
|
import { jsx as jsx314, jsxs as jsxs241 } from "react/jsx-runtime";
|
|
42674
42791
|
function StickySectionNav({
|
|
42675
42792
|
sections,
|
|
@@ -42730,8 +42847,8 @@ function StickySectionNav({
|
|
|
42730
42847
|
] });
|
|
42731
42848
|
}
|
|
42732
42849
|
function useSectionNavigation(sections, options) {
|
|
42733
|
-
const [activeSection, setActiveSection] =
|
|
42734
|
-
const isScrollingFromClick =
|
|
42850
|
+
const [activeSection, setActiveSection] = useState101(sections[0]?.id || "");
|
|
42851
|
+
const isScrollingFromClick = useRef59(false);
|
|
42735
42852
|
const { offset: offset2 = 100 } = options || {};
|
|
42736
42853
|
const handleSectionClick = useCallback40((sectionId) => {
|
|
42737
42854
|
const targetElement = document.getElementById(sectionId);
|
|
@@ -42743,14 +42860,14 @@ function useSectionNavigation(sections, options) {
|
|
|
42743
42860
|
isScrollingFromClick.current = false;
|
|
42744
42861
|
}, 500);
|
|
42745
42862
|
}, [offset2]);
|
|
42746
|
-
|
|
42863
|
+
useEffect78(() => {
|
|
42747
42864
|
sections.forEach((section) => {
|
|
42748
42865
|
if (section.ref.current && !section.ref.current.id) {
|
|
42749
42866
|
section.ref.current.id = section.id;
|
|
42750
42867
|
}
|
|
42751
42868
|
});
|
|
42752
42869
|
}, [sections]);
|
|
42753
|
-
|
|
42870
|
+
useEffect78(() => {
|
|
42754
42871
|
const handleScroll = () => {
|
|
42755
42872
|
if (isScrollingFromClick.current) return;
|
|
42756
42873
|
const scrollPosition = window.scrollY + offset2 + 50;
|
|
@@ -42783,7 +42900,7 @@ function useSectionNavigation(sections, options) {
|
|
|
42783
42900
|
}
|
|
42784
42901
|
|
|
42785
42902
|
// src/components/navigation/navigation-sidebar.tsx
|
|
42786
|
-
import { useCallback as useCallback41, useEffect as
|
|
42903
|
+
import { useCallback as useCallback41, useEffect as useEffect79, useMemo as useMemo44, useState as useState102 } from "react";
|
|
42787
42904
|
|
|
42788
42905
|
// src/components/navigation/navigation-sidebar-header.tsx
|
|
42789
42906
|
import { jsx as jsx315, jsxs as jsxs242 } from "react/jsx-runtime";
|
|
@@ -42954,14 +43071,14 @@ function NavigationSidebar({ config, disabled = false }) {
|
|
|
42954
43071
|
STORAGE_KEY,
|
|
42955
43072
|
config.minimized ?? false
|
|
42956
43073
|
);
|
|
42957
|
-
const [tabletMinimized, setTabletMinimized] =
|
|
42958
|
-
|
|
43074
|
+
const [tabletMinimized, setTabletMinimized] = useState102(true);
|
|
43075
|
+
useEffect79(() => {
|
|
42959
43076
|
if (isTablet) setTabletMinimized(true);
|
|
42960
43077
|
}, [isTablet]);
|
|
42961
|
-
const [hydrated, setHydrated] =
|
|
42962
|
-
|
|
43078
|
+
const [hydrated, setHydrated] = useState102(false);
|
|
43079
|
+
useEffect79(() => setHydrated(true), []);
|
|
42963
43080
|
const minimized = hydrated ? isTablet ? tabletMinimized : desktopMinimized : config.minimized ?? false;
|
|
42964
|
-
const [transitionsEnabled, setTransitionsEnabled] =
|
|
43081
|
+
const [transitionsEnabled, setTransitionsEnabled] = useState102(false);
|
|
42965
43082
|
const isOverlayOpen = isTablet && !minimized;
|
|
42966
43083
|
const showLabel = !minimized;
|
|
42967
43084
|
const handleToggle = useCallback41(() => {
|
|
@@ -42975,7 +43092,7 @@ function NavigationSidebar({ config, disabled = false }) {
|
|
|
42975
43092
|
const closeOverlay = useCallback41(() => {
|
|
42976
43093
|
setTabletMinimized(true);
|
|
42977
43094
|
}, []);
|
|
42978
|
-
|
|
43095
|
+
useEffect79(() => {
|
|
42979
43096
|
if (!isOverlayOpen) return;
|
|
42980
43097
|
const handleKeyDown = (e) => {
|
|
42981
43098
|
if (e.key === "Escape") closeOverlay();
|
|
@@ -42983,12 +43100,12 @@ function NavigationSidebar({ config, disabled = false }) {
|
|
|
42983
43100
|
document.addEventListener("keydown", handleKeyDown);
|
|
42984
43101
|
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
42985
43102
|
}, [isOverlayOpen, closeOverlay]);
|
|
42986
|
-
const [pendingItemId, setPendingItemId] =
|
|
43103
|
+
const [pendingItemId, setPendingItemId] = useState102(null);
|
|
42987
43104
|
const committedActiveId = useMemo44(
|
|
42988
43105
|
() => config.items.find((item) => item.isActive)?.id ?? null,
|
|
42989
43106
|
[config.items]
|
|
42990
43107
|
);
|
|
42991
|
-
|
|
43108
|
+
useEffect79(() => {
|
|
42992
43109
|
setPendingItemId(null);
|
|
42993
43110
|
}, [committedActiveId]);
|
|
42994
43111
|
const handleItemClick = useCallback41((item, event) => {
|
|
@@ -43112,12 +43229,12 @@ function NavigationSidebar({ config, disabled = false }) {
|
|
|
43112
43229
|
}
|
|
43113
43230
|
|
|
43114
43231
|
// src/components/navigation/app-header.tsx
|
|
43115
|
-
import
|
|
43232
|
+
import React120 from "react";
|
|
43116
43233
|
init_cn();
|
|
43117
43234
|
|
|
43118
43235
|
// src/components/navigation/header-global-search.tsx
|
|
43119
43236
|
init_cn();
|
|
43120
|
-
import
|
|
43237
|
+
import React119 from "react";
|
|
43121
43238
|
import { jsx as jsx319, jsxs as jsxs246 } from "react/jsx-runtime";
|
|
43122
43239
|
function HeaderGlobalSearch({
|
|
43123
43240
|
value = "",
|
|
@@ -43126,7 +43243,7 @@ function HeaderGlobalSearch({
|
|
|
43126
43243
|
placeholder = "Global Search",
|
|
43127
43244
|
className
|
|
43128
43245
|
}) {
|
|
43129
|
-
const [internalValue, setInternalValue] =
|
|
43246
|
+
const [internalValue, setInternalValue] = React119.useState(value);
|
|
43130
43247
|
const currentValue = onChange ? value : internalValue;
|
|
43131
43248
|
const handleChange = (e) => {
|
|
43132
43249
|
const newValue = e.target.value;
|
|
@@ -43287,7 +43404,7 @@ function HeaderOrganizationFilter({
|
|
|
43287
43404
|
|
|
43288
43405
|
// src/components/navigation/app-header.tsx
|
|
43289
43406
|
import { Fragment as Fragment63, jsx as jsx322, jsxs as jsxs249 } from "react/jsx-runtime";
|
|
43290
|
-
var AppHeader =
|
|
43407
|
+
var AppHeader = React120.memo(function AppHeader2({
|
|
43291
43408
|
showSearch,
|
|
43292
43409
|
onSearch,
|
|
43293
43410
|
showOrganizations,
|
|
@@ -43569,14 +43686,14 @@ function AppHeaderSkeleton({
|
|
|
43569
43686
|
}
|
|
43570
43687
|
|
|
43571
43688
|
// src/components/navigation/app-layout.tsx
|
|
43572
|
-
import { useCallback as useCallback43, useMemo as useMemo45, useRef as
|
|
43689
|
+
import { useCallback as useCallback43, useMemo as useMemo45, useRef as useRef61, useState as useState103 } from "react";
|
|
43573
43690
|
|
|
43574
43691
|
// src/components/navigation/mobile-burger-menu.tsx
|
|
43575
|
-
import
|
|
43692
|
+
import React121, { useCallback as useCallback42, useRef as useRef60 } from "react";
|
|
43576
43693
|
import { usePreventScroll as usePreventScroll4 } from "@react-aria/overlays";
|
|
43577
43694
|
import { Fragment as Fragment64, jsx as jsx323, jsxs as jsxs250 } from "react/jsx-runtime";
|
|
43578
43695
|
var HEADER_HEIGHT = 56;
|
|
43579
|
-
var MobileBurgerMenu =
|
|
43696
|
+
var MobileBurgerMenu = React121.memo(function MobileBurgerMenu2({
|
|
43580
43697
|
isOpen,
|
|
43581
43698
|
onClose,
|
|
43582
43699
|
config,
|
|
@@ -43586,7 +43703,7 @@ var MobileBurgerMenu = React120.memo(function MobileBurgerMenu2({
|
|
|
43586
43703
|
onLogout,
|
|
43587
43704
|
disabled = false
|
|
43588
43705
|
}) {
|
|
43589
|
-
const panelRef =
|
|
43706
|
+
const panelRef = useRef60(null);
|
|
43590
43707
|
usePreventScroll4({ isDisabled: !isOpen });
|
|
43591
43708
|
useFocusTrap(panelRef, isOpen, { onEscape: onClose });
|
|
43592
43709
|
const handleItemClick = useCallback42((item) => {
|
|
@@ -43620,7 +43737,7 @@ var MobileBurgerMenu = React120.memo(function MobileBurgerMenu2({
|
|
|
43620
43737
|
),
|
|
43621
43738
|
"aria-current": isActive ? "page" : void 0,
|
|
43622
43739
|
children: [
|
|
43623
|
-
item.icon && /* @__PURE__ */ jsx323("div", { className: "flex-shrink-0 size-4 flex items-center justify-center", children:
|
|
43740
|
+
item.icon && /* @__PURE__ */ jsx323("div", { className: "flex-shrink-0 size-4 flex items-center justify-center", children: React121.cloneElement(item.icon, {
|
|
43624
43741
|
size: 16,
|
|
43625
43742
|
color: isActive && !disabled ? "var(--color-accent-primary)" : "var(--color-text-secondary)"
|
|
43626
43743
|
}) }),
|
|
@@ -43633,7 +43750,7 @@ var MobileBurgerMenu = React120.memo(function MobileBurgerMenu2({
|
|
|
43633
43750
|
item.id
|
|
43634
43751
|
);
|
|
43635
43752
|
};
|
|
43636
|
-
const renderNavigationGrid = (items) => /* @__PURE__ */ jsx323("div", { className: "grid grid-cols-2 gap-3", children: items.map((item) => /* @__PURE__ */ jsx323(
|
|
43753
|
+
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
43754
|
return /* @__PURE__ */ jsxs250(Fragment64, { children: [
|
|
43638
43755
|
/* @__PURE__ */ jsx323(
|
|
43639
43756
|
"div",
|
|
@@ -43725,7 +43842,7 @@ var MobileBurgerMenu = React120.memo(function MobileBurgerMenu2({
|
|
|
43725
43842
|
),
|
|
43726
43843
|
config.topSlot?.({ minimized: false }),
|
|
43727
43844
|
/* @__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(
|
|
43845
|
+
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
43846
|
onLogout && /* @__PURE__ */ jsxs250(
|
|
43730
43847
|
"button",
|
|
43731
43848
|
{
|
|
@@ -43761,11 +43878,11 @@ function AppLayout({
|
|
|
43761
43878
|
drawer,
|
|
43762
43879
|
topBar
|
|
43763
43880
|
}) {
|
|
43764
|
-
const [mobileMenuOpen, setMobileMenuOpen] =
|
|
43765
|
-
const [drawerContainer, setDrawerContainer] =
|
|
43766
|
-
const mobileMenuOpenRef =
|
|
43881
|
+
const [mobileMenuOpen, setMobileMenuOpen] = useState103(false);
|
|
43882
|
+
const [drawerContainer, setDrawerContainer] = useState103(null);
|
|
43883
|
+
const mobileMenuOpenRef = useRef61(mobileMenuOpen);
|
|
43767
43884
|
mobileMenuOpenRef.current = mobileMenuOpen;
|
|
43768
|
-
const drawerHandlesRef =
|
|
43885
|
+
const drawerHandlesRef = useRef61(/* @__PURE__ */ new Set());
|
|
43769
43886
|
const handleToggleMobileMenu = useCallback43(() => {
|
|
43770
43887
|
const opening = !mobileMenuOpenRef.current;
|
|
43771
43888
|
if (opening) {
|
|
@@ -44392,10 +44509,10 @@ ScriptArguments.displayName = "ScriptArguments";
|
|
|
44392
44509
|
|
|
44393
44510
|
// src/components/shared/onboarding/onboarding-walkthrough.tsx
|
|
44394
44511
|
init_button2();
|
|
44395
|
-
import
|
|
44512
|
+
import React123, { useRef as useRef62, useCallback as useCallback44 } from "react";
|
|
44396
44513
|
|
|
44397
44514
|
// src/components/shared/onboarding/onboarding-step-card.tsx
|
|
44398
|
-
import
|
|
44515
|
+
import React122 from "react";
|
|
44399
44516
|
init_button2();
|
|
44400
44517
|
init_cn();
|
|
44401
44518
|
import { Fragment as Fragment65, jsx as jsx333, jsxs as jsxs260 } from "react/jsx-runtime";
|
|
@@ -44408,7 +44525,7 @@ function OnboardingStepCard({
|
|
|
44408
44525
|
onSkip,
|
|
44409
44526
|
className
|
|
44410
44527
|
}) {
|
|
44411
|
-
const [isProcessing, setIsProcessing] =
|
|
44528
|
+
const [isProcessing, setIsProcessing] = React122.useState(false);
|
|
44412
44529
|
const handleAction = async (e) => {
|
|
44413
44530
|
e.stopPropagation();
|
|
44414
44531
|
setIsProcessing(true);
|
|
@@ -44516,11 +44633,11 @@ function OnboardingWalkthrough({
|
|
|
44516
44633
|
allStepsComplete,
|
|
44517
44634
|
markMultipleComplete
|
|
44518
44635
|
} = useOnboardingState(storageKey);
|
|
44519
|
-
const hasAutoMarkedRef =
|
|
44520
|
-
const autoMarkingInProgressRef =
|
|
44521
|
-
const lastCompletionStatusRef =
|
|
44522
|
-
const actionInProgressRef =
|
|
44523
|
-
|
|
44636
|
+
const hasAutoMarkedRef = useRef62(false);
|
|
44637
|
+
const autoMarkingInProgressRef = useRef62(false);
|
|
44638
|
+
const lastCompletionStatusRef = useRef62(null);
|
|
44639
|
+
const actionInProgressRef = useRef62(/* @__PURE__ */ new Set());
|
|
44640
|
+
React123.useEffect(() => {
|
|
44524
44641
|
if (isLoadingCompletion) {
|
|
44525
44642
|
hasAutoMarkedRef.current = false;
|
|
44526
44643
|
return;
|
|
@@ -44627,11 +44744,11 @@ function OnboardingWalkthrough({
|
|
|
44627
44744
|
|
|
44628
44745
|
// src/components/logs-list.tsx
|
|
44629
44746
|
init_cn();
|
|
44630
|
-
import * as
|
|
44747
|
+
import * as React125 from "react";
|
|
44631
44748
|
|
|
44632
44749
|
// src/components/log-severity-dot.tsx
|
|
44633
44750
|
init_cn();
|
|
44634
|
-
import * as
|
|
44751
|
+
import * as React124 from "react";
|
|
44635
44752
|
|
|
44636
44753
|
// src/types/logs.types.ts
|
|
44637
44754
|
var LOG_SEVERITY_COLORS = {
|
|
@@ -44651,7 +44768,7 @@ var LOG_SEVERITY_LABELS = {
|
|
|
44651
44768
|
|
|
44652
44769
|
// src/components/log-severity-dot.tsx
|
|
44653
44770
|
import { jsx as jsx335 } from "react/jsx-runtime";
|
|
44654
|
-
var LogSeverityDot =
|
|
44771
|
+
var LogSeverityDot = React124.forwardRef(({ severity, size: size2 = "md", className }, ref) => {
|
|
44655
44772
|
const sizeClasses2 = {
|
|
44656
44773
|
sm: "w-4 h-4",
|
|
44657
44774
|
md: "w-6 h-6",
|
|
@@ -44741,7 +44858,7 @@ var LogCard = ({ log, isLast, showConnector, onClick }) => {
|
|
|
44741
44858
|
)
|
|
44742
44859
|
] });
|
|
44743
44860
|
};
|
|
44744
|
-
var LogsList =
|
|
44861
|
+
var LogsList = React125.forwardRef(({
|
|
44745
44862
|
logs,
|
|
44746
44863
|
maxHeight = "400px",
|
|
44747
44864
|
showConnector = true,
|
|
@@ -44750,7 +44867,7 @@ var LogsList = React124.forwardRef(({
|
|
|
44750
44867
|
emptyMessage = "No logs to display",
|
|
44751
44868
|
className
|
|
44752
44869
|
}, ref) => {
|
|
44753
|
-
const containerRef =
|
|
44870
|
+
const containerRef = React125.useRef(null);
|
|
44754
44871
|
const isFullHeight = maxHeight === "100%";
|
|
44755
44872
|
const getContainerStyles = () => {
|
|
44756
44873
|
if (isFullHeight) return void 0;
|
|
@@ -44858,7 +44975,7 @@ function ServiceCard({ title, subtitle, icon, tag, rows, className }) {
|
|
|
44858
44975
|
] });
|
|
44859
44976
|
}
|
|
44860
44977
|
function ServiceCardRowItem({ row }) {
|
|
44861
|
-
const [revealed, setRevealed] =
|
|
44978
|
+
const [revealed, setRevealed] = useState104(false);
|
|
44862
44979
|
const { copy, copied } = useCopyToClipboard();
|
|
44863
44980
|
const { ref: valueRef, isTruncated: valueTruncated } = useIsTruncated(row.value);
|
|
44864
44981
|
const actions = useMemo46(() => ({ copy: true, open: !!row.href, reveal: !!row.isSecret, ...row.actions }), [row]);
|
|
@@ -44920,9 +45037,9 @@ function ServiceCardRowItem({ row }) {
|
|
|
44920
45037
|
|
|
44921
45038
|
// src/components/ui/slider.tsx
|
|
44922
45039
|
init_cn();
|
|
44923
|
-
import * as
|
|
45040
|
+
import * as React127 from "react";
|
|
44924
45041
|
import { jsx as jsx338 } from "react/jsx-runtime";
|
|
44925
|
-
var Slider =
|
|
45042
|
+
var Slider = React127.forwardRef(
|
|
44926
45043
|
({ className, value = [0], onValueChange, min = 0, max = 100, step = 1, ...props }, ref) => {
|
|
44927
45044
|
const handleChange = (e) => {
|
|
44928
45045
|
const newValue = [Number(e.target.value)];
|
|
@@ -45171,7 +45288,7 @@ var ListLoader = (props) => /* @__PURE__ */ jsx341(ContentLoader, { ...props, va
|
|
|
45171
45288
|
|
|
45172
45289
|
// src/components/ui/table/table.tsx
|
|
45173
45290
|
init_cn();
|
|
45174
|
-
import { useEffect as
|
|
45291
|
+
import { useEffect as useEffect81, useRef as useRef64 } from "react";
|
|
45175
45292
|
init_pagination();
|
|
45176
45293
|
init_button2();
|
|
45177
45294
|
|
|
@@ -45790,10 +45907,10 @@ function TableRow({
|
|
|
45790
45907
|
}
|
|
45791
45908
|
|
|
45792
45909
|
// src/components/ui/table/use-table-motion.ts
|
|
45793
|
-
import { useEffect as
|
|
45910
|
+
import { useEffect as useEffect80, useState as useState105 } from "react";
|
|
45794
45911
|
function useTableMotion(enabled) {
|
|
45795
|
-
const [runtime, setRuntime] =
|
|
45796
|
-
|
|
45912
|
+
const [runtime, setRuntime] = useState105(null);
|
|
45913
|
+
useEffect80(() => {
|
|
45797
45914
|
if (!enabled || runtime) return;
|
|
45798
45915
|
let active = true;
|
|
45799
45916
|
import("framer-motion").then((m) => {
|
|
@@ -45809,14 +45926,17 @@ function useTableMotion(enabled) {
|
|
|
45809
45926
|
|
|
45810
45927
|
// src/components/ui/table/table.tsx
|
|
45811
45928
|
import { Fragment as Fragment68, jsx as jsx350, jsxs as jsxs273 } from "react/jsx-runtime";
|
|
45812
|
-
function injectSyntheticColumns(columns, rowActions, renderRowActions, rowHref) {
|
|
45929
|
+
function injectSyntheticColumns(columns, rowActions, renderRowActions, rowHref, actionsColumnWidth) {
|
|
45813
45930
|
const hasActions = Boolean(rowActions?.length) || Boolean(renderRowActions);
|
|
45814
45931
|
const result = [...columns];
|
|
45815
45932
|
if (hasActions) {
|
|
45816
45933
|
const actionsColumn = {
|
|
45817
45934
|
key: "__actions__",
|
|
45818
45935
|
label: "",
|
|
45819
|
-
|
|
45936
|
+
// A caller-fixed width keeps the header and every row on ONE grid
|
|
45937
|
+
// (see `actionsColumnWidth` in types.ts); the default stays
|
|
45938
|
+
// content-sized for back-compat.
|
|
45939
|
+
width: actionsColumnWidth ?? "min-w-[100px] w-auto shrink-0 flex-none",
|
|
45820
45940
|
align: "right",
|
|
45821
45941
|
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
45942
|
Button,
|
|
@@ -45893,10 +46013,11 @@ function Table({
|
|
|
45893
46013
|
infiniteScroll,
|
|
45894
46014
|
stickyHeader,
|
|
45895
46015
|
stickyHeaderOffset,
|
|
45896
|
-
animateRowReorder
|
|
46016
|
+
animateRowReorder,
|
|
46017
|
+
actionsColumnWidth
|
|
45897
46018
|
}) {
|
|
45898
46019
|
const tableMotion = useTableMotion(Boolean(animateRowReorder));
|
|
45899
|
-
const columnsWithActions = injectSyntheticColumns(columns, rowActions, renderRowActions, rowHref);
|
|
46020
|
+
const columnsWithActions = injectSyntheticColumns(columns, rowActions, renderRowActions, rowHref, actionsColumnWidth);
|
|
45900
46021
|
const getRowHref = (item) => {
|
|
45901
46022
|
if (onRowClick || !rowHref) return void 0;
|
|
45902
46023
|
return rowHref(item) ?? void 0;
|
|
@@ -45939,10 +46060,10 @@ function Table({
|
|
|
45939
46060
|
};
|
|
45940
46061
|
const allSelected = selectedRows.length > 0 && selectedRows.length === data.length;
|
|
45941
46062
|
const someSelected = selectedRows.length > 0 && selectedRows.length < data.length;
|
|
45942
|
-
const sentinelRef =
|
|
45943
|
-
const onLoadMoreRef =
|
|
46063
|
+
const sentinelRef = useRef64(null);
|
|
46064
|
+
const onLoadMoreRef = useRef64(infiniteScroll?.onLoadMore);
|
|
45944
46065
|
onLoadMoreRef.current = infiniteScroll?.onLoadMore;
|
|
45945
|
-
|
|
46066
|
+
useEffect81(() => {
|
|
45946
46067
|
if (!infiniteScroll?.hasNextPage || infiniteScroll.isFetchingNextPage) return;
|
|
45947
46068
|
const sentinel = sentinelRef.current;
|
|
45948
46069
|
if (!sentinel) return;
|
|
@@ -46161,7 +46282,7 @@ import { useMemo as useMemo47 } from "react";
|
|
|
46161
46282
|
|
|
46162
46283
|
// src/components/ui/query-report-table/query-report-table-header.tsx
|
|
46163
46284
|
init_cn();
|
|
46164
|
-
import { useRef as
|
|
46285
|
+
import { useRef as useRef65, useState as useState106, useCallback as useCallback45 } from "react";
|
|
46165
46286
|
import { jsx as jsx353, jsxs as jsxs275 } from "react/jsx-runtime";
|
|
46166
46287
|
function QueryReportTableHeader({
|
|
46167
46288
|
columns,
|
|
@@ -46190,8 +46311,8 @@ function QueryReportTableHeader({
|
|
|
46190
46311
|
);
|
|
46191
46312
|
}
|
|
46192
46313
|
function TruncatedHeaderCell({ value, width }) {
|
|
46193
|
-
const textRef =
|
|
46194
|
-
const [isTruncated, setIsTruncated] =
|
|
46314
|
+
const textRef = useRef65(null);
|
|
46315
|
+
const [isTruncated, setIsTruncated] = useState106(false);
|
|
46195
46316
|
const checkTruncation = useCallback45(() => {
|
|
46196
46317
|
const el = textRef.current;
|
|
46197
46318
|
if (el) {
|
|
@@ -46220,7 +46341,7 @@ function TruncatedHeaderCell({ value, width }) {
|
|
|
46220
46341
|
|
|
46221
46342
|
// src/components/ui/query-report-table/query-report-table-row.tsx
|
|
46222
46343
|
init_cn();
|
|
46223
|
-
import { useRef as
|
|
46344
|
+
import { useRef as useRef66, useState as useState107, useCallback as useCallback46 } from "react";
|
|
46224
46345
|
import { jsx as jsx354, jsxs as jsxs276 } from "react/jsx-runtime";
|
|
46225
46346
|
function QueryReportTableRow({
|
|
46226
46347
|
row,
|
|
@@ -46266,8 +46387,8 @@ function QueryReportTableRow({
|
|
|
46266
46387
|
);
|
|
46267
46388
|
}
|
|
46268
46389
|
function TruncatedCell({ value, className }) {
|
|
46269
|
-
const textRef =
|
|
46270
|
-
const [isTruncated, setIsTruncated] =
|
|
46390
|
+
const textRef = useRef66(null);
|
|
46391
|
+
const [isTruncated, setIsTruncated] = useState107(false);
|
|
46271
46392
|
const checkTruncation = useCallback46(() => {
|
|
46272
46393
|
const el = textRef.current;
|
|
46273
46394
|
if (el) {
|
|
@@ -46872,7 +46993,7 @@ function DataTableEmpty({ className, ...props }) {
|
|
|
46872
46993
|
// src/components/ui/data-table/data-table-row.tsx
|
|
46873
46994
|
init_next_link();
|
|
46874
46995
|
init_cn();
|
|
46875
|
-
import { memo as memo10, useCallback as useCallback48, useRef as
|
|
46996
|
+
import { memo as memo10, useCallback as useCallback48, useRef as useRef67 } from "react";
|
|
46876
46997
|
import { flexRender as flexRender2 } from "@tanstack/react-table";
|
|
46877
46998
|
|
|
46878
46999
|
// src/components/ui/data-table/data-table-skeleton.tsx
|
|
@@ -46966,7 +47087,7 @@ function DataTableRowImpl({
|
|
|
46966
47087
|
const hasSubRow = subRow != null && subRow !== false;
|
|
46967
47088
|
const isLinkMode = Boolean(href) && !onClick;
|
|
46968
47089
|
const isWholeCardLink = isLinkMode && !hasSubRow;
|
|
46969
|
-
const containerRef =
|
|
47090
|
+
const containerRef = useRef67(null);
|
|
46970
47091
|
const handleClick = useCallback48(
|
|
46971
47092
|
(e) => {
|
|
46972
47093
|
const target = e.target;
|
|
@@ -47137,7 +47258,7 @@ function DataTableBody({
|
|
|
47137
47258
|
}
|
|
47138
47259
|
|
|
47139
47260
|
// src/components/ui/data-table/data-table-infinite-footer.tsx
|
|
47140
|
-
import { useEffect as
|
|
47261
|
+
import { useEffect as useEffect82, useRef as useRef68 } from "react";
|
|
47141
47262
|
import { Fragment as Fragment72, jsx as jsx364, jsxs as jsxs284 } from "react/jsx-runtime";
|
|
47142
47263
|
function DataTableInfiniteFooter({
|
|
47143
47264
|
hasNextPage,
|
|
@@ -47146,10 +47267,10 @@ function DataTableInfiniteFooter({
|
|
|
47146
47267
|
skeletonRows = 3,
|
|
47147
47268
|
rootMargin = "200px"
|
|
47148
47269
|
}) {
|
|
47149
|
-
const sentinelRef =
|
|
47150
|
-
const onLoadMoreRef =
|
|
47270
|
+
const sentinelRef = useRef68(null);
|
|
47271
|
+
const onLoadMoreRef = useRef68(onLoadMore);
|
|
47151
47272
|
onLoadMoreRef.current = onLoadMore;
|
|
47152
|
-
|
|
47273
|
+
useEffect82(() => {
|
|
47153
47274
|
if (!hasNextPage || isFetchingNextPage) return;
|
|
47154
47275
|
const sentinel = sentinelRef.current;
|
|
47155
47276
|
if (!sentinel) return;
|
|
@@ -47277,7 +47398,7 @@ var DataTable = Object.assign(DataTableRoot, {
|
|
|
47277
47398
|
init_cn();
|
|
47278
47399
|
import * as PopoverPrimitive6 from "@radix-ui/react-popover";
|
|
47279
47400
|
import * as ScrollAreaPrimitive3 from "@radix-ui/react-scroll-area";
|
|
47280
|
-
import * as
|
|
47401
|
+
import * as React130 from "react";
|
|
47281
47402
|
import { jsx as jsx366, jsxs as jsxs286 } from "react/jsx-runtime";
|
|
47282
47403
|
var containerStyles = cn(
|
|
47283
47404
|
// Layout & spacing — matches lib Input component
|
|
@@ -47334,13 +47455,13 @@ function SearchInput({
|
|
|
47334
47455
|
limitTags = "auto",
|
|
47335
47456
|
getLimitTagsText = (more) => `+${more}`
|
|
47336
47457
|
}) {
|
|
47337
|
-
const [internalValue, setInternalValue] =
|
|
47458
|
+
const [internalValue, setInternalValue] = React130.useState(defaultValue);
|
|
47338
47459
|
const currentValue = onChange ? value ?? "" : internalValue;
|
|
47339
47460
|
const debouncedValue = useDebounce(currentValue, debounceMs);
|
|
47340
|
-
const [isOpen, setIsOpen] =
|
|
47341
|
-
const [highlightedIndex, setHighlightedIndex] =
|
|
47461
|
+
const [isOpen, setIsOpen] = React130.useState(false);
|
|
47462
|
+
const [highlightedIndex, setHighlightedIndex] = React130.useState(-1);
|
|
47342
47463
|
const keyboardPadding = useKeyboardCollisionPadding();
|
|
47343
|
-
const containerRef =
|
|
47464
|
+
const containerRef = React130.useRef(null);
|
|
47344
47465
|
const currentPlaceholder = filterChips.length > 0 ? "Add filter..." : placeholder;
|
|
47345
47466
|
const {
|
|
47346
47467
|
visibleCount: rawVisibleCount,
|
|
@@ -47357,10 +47478,10 @@ function SearchInput({
|
|
|
47357
47478
|
placeholder: filterChips.length > 0 ? "" : placeholder
|
|
47358
47479
|
});
|
|
47359
47480
|
const visibleCount = filterChips.length > 0 ? Math.max(1, rawVisibleCount) : rawVisibleCount;
|
|
47360
|
-
const hiddenTagsRef =
|
|
47361
|
-
const hiddenTagsPopupRef =
|
|
47362
|
-
const [showHiddenTags, setShowHiddenTags] =
|
|
47363
|
-
|
|
47481
|
+
const hiddenTagsRef = React130.useRef(null);
|
|
47482
|
+
const hiddenTagsPopupRef = React130.useRef(null);
|
|
47483
|
+
const [showHiddenTags, setShowHiddenTags] = React130.useState(false);
|
|
47484
|
+
React130.useEffect(() => {
|
|
47364
47485
|
if (!showHiddenTags) return;
|
|
47365
47486
|
const handleClick = (e) => {
|
|
47366
47487
|
const target = e.target;
|
|
@@ -47374,7 +47495,7 @@ function SearchInput({
|
|
|
47374
47495
|
const hiddenCount = filterChips.length - visibleCount;
|
|
47375
47496
|
const visibleChips = filterChips.slice(0, visibleCount);
|
|
47376
47497
|
const hiddenChips = filterChips.slice(visibleCount);
|
|
47377
|
-
const { flatResults, groups } =
|
|
47498
|
+
const { flatResults, groups } = React130.useMemo(() => {
|
|
47378
47499
|
if (!groupBy) return { flatResults: results, groups: null };
|
|
47379
47500
|
const grouped = /* @__PURE__ */ new Map();
|
|
47380
47501
|
for (const r of results) {
|
|
@@ -47391,7 +47512,7 @@ function SearchInput({
|
|
|
47391
47512
|
const meetsMinQuery = debouncedValue.length >= minQueryLength;
|
|
47392
47513
|
const autoShow = meetsMinQuery;
|
|
47393
47514
|
const dropdownVisible = showDropdownProp ?? (isOpen && autoShow);
|
|
47394
|
-
|
|
47515
|
+
React130.useEffect(() => {
|
|
47395
47516
|
setHighlightedIndex(-1);
|
|
47396
47517
|
}, [flatResults.length]);
|
|
47397
47518
|
const handleChange = (e) => {
|
|
@@ -47672,7 +47793,7 @@ function SearchInput({
|
|
|
47672
47793
|
|
|
47673
47794
|
// src/components/ui/filter-list.tsx
|
|
47674
47795
|
init_cn();
|
|
47675
|
-
import * as
|
|
47796
|
+
import * as React131 from "react";
|
|
47676
47797
|
import * as CheckboxPrimitive4 from "@radix-ui/react-checkbox";
|
|
47677
47798
|
import { jsx as jsx367, jsxs as jsxs287 } from "react/jsx-runtime";
|
|
47678
47799
|
function FilterListItem({
|
|
@@ -47721,7 +47842,7 @@ function FilterListItem({
|
|
|
47721
47842
|
"flex items-start gap-[var(--spacing-system-xxs)] text-h6",
|
|
47722
47843
|
selected ? "text-ods-accent" : "text-ods-text-secondary"
|
|
47723
47844
|
),
|
|
47724
|
-
children: meta.map((item, index) => /* @__PURE__ */ jsxs287(
|
|
47845
|
+
children: meta.map((item, index) => /* @__PURE__ */ jsxs287(React131.Fragment, { children: [
|
|
47725
47846
|
index > 0 && /* @__PURE__ */ jsx367("span", { "aria-hidden": "true", children: "\u2022" }),
|
|
47726
47847
|
/* @__PURE__ */ jsx367("span", { children: item })
|
|
47727
47848
|
] }, index))
|
|
@@ -47787,9 +47908,9 @@ function FilterList({
|
|
|
47787
47908
|
|
|
47788
47909
|
// src/components/ui/tag-search-input.tsx
|
|
47789
47910
|
import {
|
|
47790
|
-
useEffect as
|
|
47791
|
-
useRef as
|
|
47792
|
-
useState as
|
|
47911
|
+
useEffect as useEffect84,
|
|
47912
|
+
useRef as useRef70,
|
|
47913
|
+
useState as useState109
|
|
47793
47914
|
} from "react";
|
|
47794
47915
|
init_cn();
|
|
47795
47916
|
import { jsx as jsx368, jsxs as jsxs288 } from "react/jsx-runtime";
|
|
@@ -47823,11 +47944,11 @@ function TagSearchInput({
|
|
|
47823
47944
|
limitTags,
|
|
47824
47945
|
placeholder: currentPlaceholder
|
|
47825
47946
|
});
|
|
47826
|
-
const wrapperRef =
|
|
47827
|
-
const hiddenTagsRef =
|
|
47828
|
-
const hiddenTagsPopupRef =
|
|
47829
|
-
const [showHiddenTags, setShowHiddenTags] =
|
|
47830
|
-
|
|
47947
|
+
const wrapperRef = useRef70(null);
|
|
47948
|
+
const hiddenTagsRef = useRef70(null);
|
|
47949
|
+
const hiddenTagsPopupRef = useRef70(null);
|
|
47950
|
+
const [showHiddenTags, setShowHiddenTags] = useState109(false);
|
|
47951
|
+
useEffect84(() => {
|
|
47831
47952
|
if (!showHiddenTags) return;
|
|
47832
47953
|
const handleClick = (e) => {
|
|
47833
47954
|
const target = e.target;
|
|
@@ -47989,9 +48110,9 @@ function TagSearchInput({
|
|
|
47989
48110
|
}
|
|
47990
48111
|
|
|
47991
48112
|
// src/components/ui/markdown-editor.tsx
|
|
47992
|
-
import { useRef as
|
|
48113
|
+
import { useRef as useRef71, useCallback as useCallback49, useState as useState110, useEffect as useEffect85 } from "react";
|
|
47993
48114
|
init_cn();
|
|
47994
|
-
import { Loader2 as
|
|
48115
|
+
import { Loader2 as Loader29, Upload as Upload8 } from "lucide-react";
|
|
47995
48116
|
import { jsx as jsx369, jsxs as jsxs289 } from "react/jsx-runtime";
|
|
47996
48117
|
var MDEditor = dynamic(() => import("@uiw/react-md-editor"), { ssr: false });
|
|
47997
48118
|
var MARKDOWN_EDITOR_STYLE_ID = "ods-markdown-editor-styles";
|
|
@@ -48020,7 +48141,7 @@ body .w-md-editor .w-md-editor-bar::after { content: '' !important; display: blo
|
|
|
48020
48141
|
body .w-md-editor .w-md-editor-bar:hover::after { border-color: var(--color-text-secondary) !important; }
|
|
48021
48142
|
`;
|
|
48022
48143
|
function MarkdownEditorStyles() {
|
|
48023
|
-
|
|
48144
|
+
useEffect85(() => {
|
|
48024
48145
|
if (document.getElementById(MARKDOWN_EDITOR_STYLE_ID)) return;
|
|
48025
48146
|
const style = document.createElement("style");
|
|
48026
48147
|
style.id = MARKDOWN_EDITOR_STYLE_ID;
|
|
@@ -48044,11 +48165,11 @@ function MarkdownEditor({
|
|
|
48044
48165
|
onFileUploaded,
|
|
48045
48166
|
renderPreview
|
|
48046
48167
|
}) {
|
|
48047
|
-
const fileInputRef =
|
|
48048
|
-
const [isUploading, setIsUploading] =
|
|
48049
|
-
const [uploadProgress, setUploadProgress] =
|
|
48050
|
-
const [defaultExtraCommands, setDefaultExtraCommands] =
|
|
48051
|
-
|
|
48168
|
+
const fileInputRef = useRef71(null);
|
|
48169
|
+
const [isUploading, setIsUploading] = useState110(false);
|
|
48170
|
+
const [uploadProgress, setUploadProgress] = useState110("");
|
|
48171
|
+
const [defaultExtraCommands, setDefaultExtraCommands] = useState110([]);
|
|
48172
|
+
useEffect85(() => {
|
|
48052
48173
|
import("@uiw/react-md-editor").then((mod) => {
|
|
48053
48174
|
if (mod.commands?.getExtraCommands) {
|
|
48054
48175
|
setDefaultExtraCommands(mod.commands.getExtraCommands());
|
|
@@ -48131,17 +48252,17 @@ function MarkdownEditor({
|
|
|
48131
48252
|
name: "upload",
|
|
48132
48253
|
keyCommand: "upload",
|
|
48133
48254
|
buttonProps: { "aria-label": "Upload file", title: "Upload file" },
|
|
48134
|
-
icon: isUploading ? /* @__PURE__ */ jsx369(
|
|
48255
|
+
icon: isUploading ? /* @__PURE__ */ jsx369(Loader29, { className: "w-3 h-3 animate-spin" }) : /* @__PURE__ */ jsx369(Upload8, { className: "w-3 h-3" }),
|
|
48135
48256
|
execute: () => {
|
|
48136
48257
|
fileInputRef.current?.click();
|
|
48137
48258
|
}
|
|
48138
48259
|
} : null;
|
|
48139
48260
|
const extraCommands = uploadCommand ? [...defaultExtraCommands, uploadCommand] : defaultExtraCommands;
|
|
48140
|
-
const wrapperRef =
|
|
48141
|
-
const isDraggingRef =
|
|
48142
|
-
const mouseYRef =
|
|
48143
|
-
const rafRef =
|
|
48144
|
-
const scrollParentRef =
|
|
48261
|
+
const wrapperRef = useRef71(null);
|
|
48262
|
+
const isDraggingRef = useRef71(false);
|
|
48263
|
+
const mouseYRef = useRef71(0);
|
|
48264
|
+
const rafRef = useRef71(0);
|
|
48265
|
+
const scrollParentRef = useRef71(window);
|
|
48145
48266
|
const EDGE_ZONE = 60;
|
|
48146
48267
|
const MAX_SCROLL_SPEED = 15;
|
|
48147
48268
|
const findScrollParent = useCallback49((el) => {
|
|
@@ -48171,7 +48292,7 @@ function MarkdownEditor({
|
|
|
48171
48292
|
}
|
|
48172
48293
|
rafRef.current = requestAnimationFrame(scrollLoop);
|
|
48173
48294
|
}, []);
|
|
48174
|
-
|
|
48295
|
+
useEffect85(() => {
|
|
48175
48296
|
const wrapper = wrapperRef.current;
|
|
48176
48297
|
if (!wrapper) return;
|
|
48177
48298
|
const onMouseMove = (e) => {
|
|
@@ -48219,7 +48340,7 @@ function MarkdownEditor({
|
|
|
48219
48340
|
accept: "image/*,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.zip,.txt"
|
|
48220
48341
|
}
|
|
48221
48342
|
),
|
|
48222
|
-
!MDEditor && /* @__PURE__ */ jsx369("div", { className: "flex items-center justify-center h-64", children: /* @__PURE__ */ jsx369(
|
|
48343
|
+
!MDEditor && /* @__PURE__ */ jsx369("div", { className: "flex items-center justify-center h-64", children: /* @__PURE__ */ jsx369(Loader29, { className: "h-8 w-8 animate-spin" }) }),
|
|
48223
48344
|
MDEditor && /* @__PURE__ */ jsx369(
|
|
48224
48345
|
MDEditor,
|
|
48225
48346
|
{
|
|
@@ -48264,8 +48385,8 @@ function MarkdownEditor({
|
|
|
48264
48385
|
}
|
|
48265
48386
|
|
|
48266
48387
|
// src/components/ui/file-upload.tsx
|
|
48267
|
-
import * as
|
|
48268
|
-
import { Loader2 as
|
|
48388
|
+
import * as React133 from "react";
|
|
48389
|
+
import { Loader2 as Loader210 } from "lucide-react";
|
|
48269
48390
|
init_cn();
|
|
48270
48391
|
import { jsx as jsx370, jsxs as jsxs290 } from "react/jsx-runtime";
|
|
48271
48392
|
function formatFileSize2(bytes) {
|
|
@@ -48316,11 +48437,11 @@ function FileUpload({
|
|
|
48316
48437
|
acceptWindowDrops = false,
|
|
48317
48438
|
pickFiles
|
|
48318
48439
|
}) {
|
|
48319
|
-
const [dragActive, setDragActive] =
|
|
48320
|
-
const [validationError, setValidationError] =
|
|
48321
|
-
const fileInputRef =
|
|
48440
|
+
const [dragActive, setDragActive] = React133.useState(false);
|
|
48441
|
+
const [validationError, setValidationError] = React133.useState(null);
|
|
48442
|
+
const fileInputRef = React133.useRef(null);
|
|
48322
48443
|
const isManaged = managedFiles !== void 0;
|
|
48323
|
-
const files =
|
|
48444
|
+
const files = React133.useMemo(() => {
|
|
48324
48445
|
if (!value) return [];
|
|
48325
48446
|
return Array.isArray(value) ? value : [value];
|
|
48326
48447
|
}, [value]);
|
|
@@ -48368,7 +48489,7 @@ function FileUpload({
|
|
|
48368
48489
|
fileInputRef.current.value = "";
|
|
48369
48490
|
}
|
|
48370
48491
|
};
|
|
48371
|
-
const handleFilesRef =
|
|
48492
|
+
const handleFilesRef = React133.useRef(handleFiles);
|
|
48372
48493
|
handleFilesRef.current = handleFiles;
|
|
48373
48494
|
const handleDrag = (e) => {
|
|
48374
48495
|
e.preventDefault();
|
|
@@ -48389,7 +48510,7 @@ function FileUpload({
|
|
|
48389
48510
|
handleFiles(e.dataTransfer.files);
|
|
48390
48511
|
}
|
|
48391
48512
|
};
|
|
48392
|
-
|
|
48513
|
+
React133.useEffect(() => {
|
|
48393
48514
|
if (!acceptWindowDrops || disabled) return;
|
|
48394
48515
|
let dragCounter = 0;
|
|
48395
48516
|
const onWindowDragEnter = (e) => {
|
|
@@ -48503,7 +48624,7 @@ function FileUpload({
|
|
|
48503
48624
|
/* @__PURE__ */ jsxs290("div", { className: "flex items-center gap-[var(--spacing-system-xsf)]", children: [
|
|
48504
48625
|
/* @__PURE__ */ jsx370("span", { className: "text-h6 text-ods-text-secondary", children: formatFileSize2(entry.fileSize) }),
|
|
48505
48626
|
entry.status === "uploading" && /* @__PURE__ */ jsxs290("span", { className: "flex items-center gap-[var(--spacing-system-xxs)] text-h6 text-ods-text-secondary", children: [
|
|
48506
|
-
/* @__PURE__ */ jsx370(
|
|
48627
|
+
/* @__PURE__ */ jsx370(Loader210, { className: "size-3 animate-spin" }),
|
|
48507
48628
|
"Uploading..."
|
|
48508
48629
|
] }),
|
|
48509
48630
|
entry.status === "error" && /* @__PURE__ */ jsx370("span", { className: "text-h6 text-ods-error", children: entry.error || "Upload failed" })
|
|
@@ -48590,8 +48711,8 @@ function FileUpload({
|
|
|
48590
48711
|
}
|
|
48591
48712
|
|
|
48592
48713
|
// src/components/ui/image-uploader.tsx
|
|
48593
|
-
import * as
|
|
48594
|
-
import { Loader2 as
|
|
48714
|
+
import * as React134 from "react";
|
|
48715
|
+
import { Loader2 as Loader211 } from "lucide-react";
|
|
48595
48716
|
init_cn();
|
|
48596
48717
|
import { Fragment as Fragment74, jsx as jsx371, jsxs as jsxs291 } from "react/jsx-runtime";
|
|
48597
48718
|
var DEFAULT_MAX_SIZE = 25 * 1024 * 1024;
|
|
@@ -48632,10 +48753,10 @@ function ImageUploader({
|
|
|
48632
48753
|
className,
|
|
48633
48754
|
dropzoneClassName
|
|
48634
48755
|
}) {
|
|
48635
|
-
const inputRef =
|
|
48636
|
-
const [dragActive, setDragActive] =
|
|
48637
|
-
const [pressed, setPressed] =
|
|
48638
|
-
const [validationError, setValidationError] =
|
|
48756
|
+
const inputRef = React134.useRef(null);
|
|
48757
|
+
const [dragActive, setDragActive] = React134.useState(false);
|
|
48758
|
+
const [pressed, setPressed] = React134.useState(false);
|
|
48759
|
+
const [validationError, setValidationError] = React134.useState(null);
|
|
48639
48760
|
const interactive = !disabled && !loading;
|
|
48640
48761
|
const resolvedValue = useAuthedImageSrc(value);
|
|
48641
48762
|
const hasImage = Boolean(value);
|
|
@@ -48758,8 +48879,8 @@ function ImageUploader({
|
|
|
48758
48879
|
}
|
|
48759
48880
|
)
|
|
48760
48881
|
] }),
|
|
48761
|
-
loading && /* @__PURE__ */ jsx371("div", { className: "absolute inset-0 flex items-center justify-center rounded-md bg-ods-overlay", children: /* @__PURE__ */ jsx371(
|
|
48762
|
-
] }) : loading ? /* @__PURE__ */ jsx371(
|
|
48882
|
+
loading && /* @__PURE__ */ jsx371("div", { className: "absolute inset-0 flex items-center justify-center rounded-md bg-ods-overlay", children: /* @__PURE__ */ jsx371(Loader211, { className: "size-8 animate-spin text-ods-text-on-dark" }) })
|
|
48883
|
+
] }) : loading ? /* @__PURE__ */ jsx371(Loader211, { className: "size-8 animate-spin text-ods-accent" }) : /* @__PURE__ */ jsxs291(Fragment74, { children: [
|
|
48763
48884
|
/* @__PURE__ */ jsx371("div", { className: "flex shrink-0 items-center justify-center rounded-full border border-ods-border bg-ods-card p-[var(--spacing-system-s)]", children: /* @__PURE__ */ jsx371(ImagePlusIcon, { className: "size-6 text-ods-text-primary" }) }),
|
|
48764
48885
|
/* @__PURE__ */ jsxs291("div", { className: "flex w-full flex-col items-center text-center", children: [
|
|
48765
48886
|
/* @__PURE__ */ jsx371("p", { className: "text-h4 text-ods-text-primary", children: label }),
|
|
@@ -48801,17 +48922,17 @@ init_cn();
|
|
|
48801
48922
|
init_button2();
|
|
48802
48923
|
|
|
48803
48924
|
// src/components/ui/color-preset-select.tsx
|
|
48804
|
-
import * as
|
|
48925
|
+
import * as React136 from "react";
|
|
48805
48926
|
import { HexColorPicker } from "react-colorful";
|
|
48806
48927
|
|
|
48807
48928
|
// src/components/popover.tsx
|
|
48808
48929
|
init_cn();
|
|
48809
|
-
import * as
|
|
48930
|
+
import * as React135 from "react";
|
|
48810
48931
|
import * as PopoverPrimitive7 from "@radix-ui/react-popover";
|
|
48811
48932
|
import { jsx as jsx372 } from "react/jsx-runtime";
|
|
48812
48933
|
var Popover2 = PopoverPrimitive7.Root;
|
|
48813
48934
|
var PopoverTrigger = PopoverPrimitive7.Trigger;
|
|
48814
|
-
var PopoverContent =
|
|
48935
|
+
var PopoverContent = React135.forwardRef(({ className, align = "center", sideOffset = 4, collisionPadding, ...props }, ref) => {
|
|
48815
48936
|
const keyboardPadding = useKeyboardCollisionPadding();
|
|
48816
48937
|
return /* @__PURE__ */ jsx372(PopoverPrimitive7.Portal, { children: /* @__PURE__ */ jsx372(
|
|
48817
48938
|
PopoverPrimitive7.Content,
|
|
@@ -48912,8 +49033,8 @@ var FORMATS = ["HEX", "RGB", "HSL"];
|
|
|
48912
49033
|
var channelInputClass = "flex-1 min-w-0 [&_input]:text-center [&_input]:tabular-nums";
|
|
48913
49034
|
var hexInputClass = "flex-1 min-w-0 [&_input]:uppercase";
|
|
48914
49035
|
function HexInputs({ value, onChange }) {
|
|
48915
|
-
const [draft, setDraft] =
|
|
48916
|
-
|
|
49036
|
+
const [draft, setDraft] = React136.useState(value);
|
|
49037
|
+
React136.useEffect(() => setDraft(value), [value]);
|
|
48917
49038
|
const commit = () => {
|
|
48918
49039
|
const candidate = (draft.startsWith("#") ? draft : `#${draft}`).toLowerCase();
|
|
48919
49040
|
if (HEX_PATTERN.test(candidate)) onChange(candidate);
|
|
@@ -48945,8 +49066,8 @@ function ChannelInput({
|
|
|
48945
49066
|
ariaLabel,
|
|
48946
49067
|
onCommit
|
|
48947
49068
|
}) {
|
|
48948
|
-
const [draft, setDraft] =
|
|
48949
|
-
|
|
49069
|
+
const [draft, setDraft] = React136.useState(String(value));
|
|
49070
|
+
React136.useEffect(() => setDraft(String(value)), [value]);
|
|
48950
49071
|
const commit = () => {
|
|
48951
49072
|
const parsed = Number.parseInt(draft, 10);
|
|
48952
49073
|
if (!Number.isFinite(parsed)) {
|
|
@@ -49006,8 +49127,8 @@ function HslInputs({ value, onChange }) {
|
|
|
49006
49127
|
] });
|
|
49007
49128
|
}
|
|
49008
49129
|
function ColorPickerInput({ value, onChange, disabled, className }) {
|
|
49009
|
-
const [open, setOpen] =
|
|
49010
|
-
const [format3, setFormat] =
|
|
49130
|
+
const [open, setOpen] = React136.useState(false);
|
|
49131
|
+
const [format3, setFormat] = React136.useState("HEX");
|
|
49011
49132
|
const formatGroups = [
|
|
49012
49133
|
{
|
|
49013
49134
|
items: FORMATS.map((f) => ({
|
|
@@ -49166,7 +49287,7 @@ function TicketStatusConfigRow({
|
|
|
49166
49287
|
}
|
|
49167
49288
|
|
|
49168
49289
|
// src/components/ui/test-run.tsx
|
|
49169
|
-
import * as
|
|
49290
|
+
import * as React137 from "react";
|
|
49170
49291
|
init_cn();
|
|
49171
49292
|
import { jsx as jsx375, jsxs as jsxs294 } from "react/jsx-runtime";
|
|
49172
49293
|
function formatTestRunDuration(ms) {
|
|
@@ -49185,8 +49306,8 @@ function TestResultsSkeleton() {
|
|
|
49185
49306
|
] }) });
|
|
49186
49307
|
}
|
|
49187
49308
|
function TestResultsTable({ rows, loading }) {
|
|
49188
|
-
const columnKeys =
|
|
49189
|
-
const columns =
|
|
49309
|
+
const columnKeys = React137.useMemo(() => rows.length > 0 ? Object.keys(rows[0]) : [], [rows]);
|
|
49310
|
+
const columns = React137.useMemo(() => {
|
|
49190
49311
|
return columnKeys.map((key) => ({
|
|
49191
49312
|
id: key,
|
|
49192
49313
|
accessorFn: (row) => row[key],
|
|
@@ -49279,10 +49400,10 @@ function TestRunStatusStat({ status, className }) {
|
|
|
49279
49400
|
] });
|
|
49280
49401
|
}
|
|
49281
49402
|
function useTestRunState(campaign) {
|
|
49282
|
-
const [hasRun, setHasRun] =
|
|
49283
|
-
const [isStarting, setIsStarting] =
|
|
49284
|
-
const [durationMs, setDurationMs] =
|
|
49285
|
-
|
|
49403
|
+
const [hasRun, setHasRun] = React137.useState(false);
|
|
49404
|
+
const [isStarting, setIsStarting] = React137.useState(false);
|
|
49405
|
+
const [durationMs, setDurationMs] = React137.useState(0);
|
|
49406
|
+
React137.useEffect(() => {
|
|
49286
49407
|
if (!campaign.startedAt || !campaign.isRunning) {
|
|
49287
49408
|
if (campaign.startedAt && !campaign.isRunning) {
|
|
49288
49409
|
setDurationMs(Date.now() - campaign.startedAt.getTime());
|
|
@@ -49295,7 +49416,7 @@ function useTestRunState(campaign) {
|
|
|
49295
49416
|
}, 1e3);
|
|
49296
49417
|
return () => clearInterval(interval);
|
|
49297
49418
|
}, [campaign.startedAt, campaign.isRunning]);
|
|
49298
|
-
const run =
|
|
49419
|
+
const run = React137.useCallback(async (start) => {
|
|
49299
49420
|
setHasRun(true);
|
|
49300
49421
|
setDurationMs(0);
|
|
49301
49422
|
setIsStarting(true);
|
|
@@ -49305,11 +49426,11 @@ function useTestRunState(campaign) {
|
|
|
49305
49426
|
setIsStarting(false);
|
|
49306
49427
|
}
|
|
49307
49428
|
}, []);
|
|
49308
|
-
const stop =
|
|
49429
|
+
const stop = React137.useCallback(() => {
|
|
49309
49430
|
setIsStarting(false);
|
|
49310
49431
|
campaign.stopCampaign();
|
|
49311
49432
|
}, [campaign.stopCampaign]);
|
|
49312
|
-
const reset =
|
|
49433
|
+
const reset = React137.useCallback(() => {
|
|
49313
49434
|
setIsStarting(false);
|
|
49314
49435
|
campaign.stopCampaign();
|
|
49315
49436
|
setDurationMs(0);
|
|
@@ -49323,7 +49444,7 @@ function useTestRunState(campaign) {
|
|
|
49323
49444
|
const showTiming = hasRun && campaign.startedAt !== null && (campaign.isRunning || isFinished);
|
|
49324
49445
|
const startedLabel = showTiming && campaign.startedAt ? formatTime(campaign.startedAt) : "00:00 PM";
|
|
49325
49446
|
const durationLabel = showTiming ? formatTestRunDuration(durationMs) : "00:00:00";
|
|
49326
|
-
const displayRows =
|
|
49447
|
+
const displayRows = React137.useMemo(
|
|
49327
49448
|
() => campaign.results.map(
|
|
49328
49449
|
(row) => Object.fromEntries(Object.entries(row).map(([key, value]) => [key.replace(/_/g, " "), value]))
|
|
49329
49450
|
),
|
|
@@ -49429,16 +49550,16 @@ function TicketDetailSection({ label, children, className }) {
|
|
|
49429
49550
|
}
|
|
49430
49551
|
|
|
49431
49552
|
// src/components/ui/ticket-notes-section.tsx
|
|
49432
|
-
import * as
|
|
49553
|
+
import * as React139 from "react";
|
|
49433
49554
|
init_cn();
|
|
49434
49555
|
|
|
49435
49556
|
// src/components/ui/ticket-note-card.tsx
|
|
49436
|
-
import * as
|
|
49557
|
+
import * as React138 from "react";
|
|
49437
49558
|
init_cn();
|
|
49438
49559
|
import { Fragment as Fragment76, jsx as jsx378, jsxs as jsxs297 } from "react/jsx-runtime";
|
|
49439
49560
|
function TicketNoteCard({ note, onEdit, onDelete, className }) {
|
|
49440
|
-
const [isEditing, setIsEditing] =
|
|
49441
|
-
const [editText, setEditText] =
|
|
49561
|
+
const [isEditing, setIsEditing] = React138.useState(false);
|
|
49562
|
+
const [editText, setEditText] = React138.useState(note.text);
|
|
49442
49563
|
const handleSave = () => {
|
|
49443
49564
|
const trimmed = editText.trim();
|
|
49444
49565
|
if (!trimmed || !onEdit) return;
|
|
@@ -49561,7 +49682,7 @@ function TicketNotesSection({
|
|
|
49561
49682
|
isAddingNote,
|
|
49562
49683
|
className
|
|
49563
49684
|
}) {
|
|
49564
|
-
const [noteText, setNoteText] =
|
|
49685
|
+
const [noteText, setNoteText] = React139.useState("");
|
|
49565
49686
|
const handleSend = () => {
|
|
49566
49687
|
const trimmed = noteText.trim();
|
|
49567
49688
|
if (!trimmed || !onAddNote || isAddingNote) return;
|
|
@@ -49757,7 +49878,7 @@ function TicketInfoSection({
|
|
|
49757
49878
|
}
|
|
49758
49879
|
|
|
49759
49880
|
// src/components/ui/take-over-ticket-modal.tsx
|
|
49760
|
-
import * as
|
|
49881
|
+
import * as React140 from "react";
|
|
49761
49882
|
init_button2();
|
|
49762
49883
|
import { jsx as jsx381, jsxs as jsxs300 } from "react/jsx-runtime";
|
|
49763
49884
|
function renderTicketStatusOption(option, isSelected) {
|
|
@@ -49792,9 +49913,9 @@ function TakeOverTicketModal({
|
|
|
49792
49913
|
isPending = false,
|
|
49793
49914
|
onConfirm
|
|
49794
49915
|
}) {
|
|
49795
|
-
const [statusId, setStatusId] =
|
|
49796
|
-
const [assigneeId, setAssigneeId] =
|
|
49797
|
-
|
|
49916
|
+
const [statusId, setStatusId] = React140.useState(null);
|
|
49917
|
+
const [assigneeId, setAssigneeId] = React140.useState(null);
|
|
49918
|
+
React140.useEffect(() => {
|
|
49798
49919
|
if (!isOpen) return;
|
|
49799
49920
|
setStatusId(initialStatusId ?? null);
|
|
49800
49921
|
setAssigneeId(initialAssigneeId ?? null);
|
|
@@ -49870,7 +49991,7 @@ function TakeOverTicketModal({
|
|
|
49870
49991
|
}
|
|
49871
49992
|
|
|
49872
49993
|
// src/components/ui/reopen-ticket-modal.tsx
|
|
49873
|
-
import * as
|
|
49994
|
+
import * as React141 from "react";
|
|
49874
49995
|
init_button2();
|
|
49875
49996
|
import { jsx as jsx382, jsxs as jsxs301 } from "react/jsx-runtime";
|
|
49876
49997
|
var REASON_MAX_LENGTH = 1e3;
|
|
@@ -49886,10 +50007,10 @@ function ReopenTicketModal({
|
|
|
49886
50007
|
isPending = false,
|
|
49887
50008
|
onConfirm
|
|
49888
50009
|
}) {
|
|
49889
|
-
const [statusId, setStatusId] =
|
|
49890
|
-
const [assigneeId, setAssigneeId] =
|
|
49891
|
-
const [reason, setReason] =
|
|
49892
|
-
|
|
50010
|
+
const [statusId, setStatusId] = React141.useState(null);
|
|
50011
|
+
const [assigneeId, setAssigneeId] = React141.useState(null);
|
|
50012
|
+
const [reason, setReason] = React141.useState("");
|
|
50013
|
+
React141.useEffect(() => {
|
|
49893
50014
|
if (!isOpen) return;
|
|
49894
50015
|
setStatusId(initialStatusId ?? null);
|
|
49895
50016
|
setAssigneeId(initialAssigneeId ?? null);
|
|
@@ -49983,7 +50104,7 @@ function ReopenTicketModal({
|
|
|
49983
50104
|
|
|
49984
50105
|
// src/components/ui/reopen-ticket-request-modal.tsx
|
|
49985
50106
|
init_button2();
|
|
49986
|
-
import * as
|
|
50107
|
+
import * as React142 from "react";
|
|
49987
50108
|
import { jsx as jsx383, jsxs as jsxs302 } from "react/jsx-runtime";
|
|
49988
50109
|
var REASON_MAX_LENGTH2 = 1e3;
|
|
49989
50110
|
function ReopenTicketRequestModal({
|
|
@@ -49993,9 +50114,9 @@ function ReopenTicketRequestModal({
|
|
|
49993
50114
|
isPending = false,
|
|
49994
50115
|
onConfirm
|
|
49995
50116
|
}) {
|
|
49996
|
-
const [reason, setReason] =
|
|
49997
|
-
const [handoff, setHandoff] =
|
|
49998
|
-
|
|
50117
|
+
const [reason, setReason] = React142.useState("");
|
|
50118
|
+
const [handoff, setHandoff] = React142.useState(false);
|
|
50119
|
+
React142.useEffect(() => {
|
|
49999
50120
|
if (!isOpen) return;
|
|
50000
50121
|
setReason("");
|
|
50001
50122
|
setHandoff(false);
|
|
@@ -50083,8 +50204,8 @@ function ImageGalleryModal({
|
|
|
50083
50204
|
onClose,
|
|
50084
50205
|
initialIndex = 0
|
|
50085
50206
|
}) {
|
|
50086
|
-
const [selectedImageIndex, setSelectedImageIndex] =
|
|
50087
|
-
|
|
50207
|
+
const [selectedImageIndex, setSelectedImageIndex] = useState120(initialIndex);
|
|
50208
|
+
useEffect92(() => {
|
|
50088
50209
|
if (isOpen) {
|
|
50089
50210
|
setSelectedImageIndex(initialIndex);
|
|
50090
50211
|
}
|
|
@@ -50099,7 +50220,7 @@ function ImageGalleryModal({
|
|
|
50099
50220
|
setSelectedImageIndex(selectedImageIndex + 1);
|
|
50100
50221
|
}
|
|
50101
50222
|
};
|
|
50102
|
-
|
|
50223
|
+
useEffect92(() => {
|
|
50103
50224
|
const handleKeyPress = (event) => {
|
|
50104
50225
|
if (!isOpen) return;
|
|
50105
50226
|
switch (event.key) {
|
|
@@ -50313,7 +50434,7 @@ function RoadmapCard({
|
|
|
50313
50434
|
onVote,
|
|
50314
50435
|
isVoting = false
|
|
50315
50436
|
}) {
|
|
50316
|
-
const [showScreenshots, setShowScreenshots] =
|
|
50437
|
+
const [showScreenshots, setShowScreenshots] = useState121(false);
|
|
50317
50438
|
const logoUrl = item.icon && item.icon.startsWith("http") ? item.icon : null;
|
|
50318
50439
|
const iconSrc = logoUrl ? getProxiedImageUrl(logoUrl, { directHttps: true }) || logoUrl : null;
|
|
50319
50440
|
if (size2 === "sm") {
|
|
@@ -50515,7 +50636,7 @@ function RoadmapCard({
|
|
|
50515
50636
|
}
|
|
50516
50637
|
|
|
50517
50638
|
// src/components/chat/entity-cards/github-activity-card.tsx
|
|
50518
|
-
import
|
|
50639
|
+
import React144 from "react";
|
|
50519
50640
|
import { GitPullRequest, Eye as Eye4, ExternalLink as ExternalLink10 } from "lucide-react";
|
|
50520
50641
|
import { Fragment as Fragment80, jsx as jsx388, jsxs as jsxs306 } from "react/jsx-runtime";
|
|
50521
50642
|
function parseRepoFromUrl(url) {
|
|
@@ -50656,7 +50777,7 @@ function GitHubActivityCard({ item, variant = "compact", className, anchorProps
|
|
|
50656
50777
|
reviewState ? /* @__PURE__ */ jsx388(ReviewStateBadge, { state: reviewState }) : null,
|
|
50657
50778
|
/* @__PURE__ */ jsx388("span", { className: COMPACT_CARD_TITLE, children: primaryText })
|
|
50658
50779
|
] }),
|
|
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(
|
|
50780
|
+
/* @__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
50781
|
i > 0 ? /* @__PURE__ */ jsx388("span", { className: "text-ods-text-secondary/40 shrink-0", children: "\xB7" }) : null,
|
|
50661
50782
|
/* @__PURE__ */ jsx388("span", { className: "min-w-0 truncate", children: part })
|
|
50662
50783
|
] }, i)) }) }),
|
|
@@ -50702,7 +50823,7 @@ function GitHubActivityCardSkeleton({ variant = "compact", className }) {
|
|
|
50702
50823
|
}
|
|
50703
50824
|
|
|
50704
50825
|
// src/components/chat/entity-cards/slack-message-card.tsx
|
|
50705
|
-
import
|
|
50826
|
+
import React145 from "react";
|
|
50706
50827
|
import { ExternalLink as ExternalLink11, Hash } from "lucide-react";
|
|
50707
50828
|
import { Fragment as Fragment81, jsx as jsx389, jsxs as jsxs307 } from "react/jsx-runtime";
|
|
50708
50829
|
function parseChannelFromUrl(url) {
|
|
@@ -50748,7 +50869,7 @@ function SlackMessageCard({ item, variant = "compact", className, anchorProps })
|
|
|
50748
50869
|
/* @__PURE__ */ jsxs307("span", { className: COMPACT_CARD_TEXT_COL, children: [
|
|
50749
50870
|
/* @__PURE__ */ jsx389("span", { className: COMPACT_CARD_TITLE_ROW, children: /* @__PURE__ */ jsx389("span", { className: COMPACT_CARD_TITLE, children: item.title }) }),
|
|
50750
50871
|
/* @__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(
|
|
50872
|
+
/* @__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
50873
|
i > 0 ? /* @__PURE__ */ jsx389("span", { className: "text-ods-text-secondary/40 shrink-0", children: "\xB7" }) : null,
|
|
50753
50874
|
/* @__PURE__ */ jsx389("span", { className: "min-w-0 truncate", children: part })
|
|
50754
50875
|
] }, i)) : /* @__PURE__ */ jsx389("span", { className: COMPACT_CARD_SUMMARY, children: COMPACT_CARD_ROW_FILLER }) }) })
|
|
@@ -50791,7 +50912,7 @@ function SlackMessageCardSkeleton({ variant = "compact", className }) {
|
|
|
50791
50912
|
}
|
|
50792
50913
|
|
|
50793
50914
|
// src/components/chat/entity-cards/hubspot-ticket-card.tsx
|
|
50794
|
-
import
|
|
50915
|
+
import React146 from "react";
|
|
50795
50916
|
import { ExternalLink as ExternalLink12 } from "lucide-react";
|
|
50796
50917
|
import { Fragment as Fragment82, jsx as jsx390, jsxs as jsxs308 } from "react/jsx-runtime";
|
|
50797
50918
|
function formatToken(token) {
|
|
@@ -50860,7 +50981,7 @@ function HubspotTicketCard({ item, variant = "compact", className, anchorProps }
|
|
|
50860
50981
|
/* @__PURE__ */ jsx390("span", { className: "min-w-0 truncate", children: item.customerEmail })
|
|
50861
50982
|
] }) : null,
|
|
50862
50983
|
/* @__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(
|
|
50984
|
+
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
50985
|
i > 0 ? /* @__PURE__ */ jsx390("span", { className: "text-ods-text-secondary/40 shrink-0", children: "\xB7" }) : null,
|
|
50865
50986
|
/* @__PURE__ */ jsx390("span", { className: "min-w-0 truncate", children: part })
|
|
50866
50987
|
] }, i)) }) }) : null
|
|
@@ -50951,7 +51072,7 @@ function DataRoomDocCardSkeleton({ className }) {
|
|
|
50951
51072
|
}
|
|
50952
51073
|
|
|
50953
51074
|
// src/components/chat/entity-cards/program-card.tsx
|
|
50954
|
-
import { useState as
|
|
51075
|
+
import { useState as useState122 } from "react";
|
|
50955
51076
|
|
|
50956
51077
|
// node_modules/date-fns/toDate.mjs
|
|
50957
51078
|
function toDate2(argument) {
|
|
@@ -52588,8 +52709,8 @@ function getHosts(hosts) {
|
|
|
52588
52709
|
return [];
|
|
52589
52710
|
}
|
|
52590
52711
|
function MediaGallery({ images, title }) {
|
|
52591
|
-
const [selectedImageIndex, setSelectedImageIndex] =
|
|
52592
|
-
const [isModalOpen, setIsModalOpen] =
|
|
52712
|
+
const [selectedImageIndex, setSelectedImageIndex] = useState122(null);
|
|
52713
|
+
const [isModalOpen, setIsModalOpen] = useState122(false);
|
|
52593
52714
|
const openImageModal = (index, event) => {
|
|
52594
52715
|
if (event) event.stopPropagation();
|
|
52595
52716
|
setSelectedImageIndex(index);
|
|
@@ -52954,7 +53075,7 @@ function GenericEntityCardSkeleton({ className }) {
|
|
|
52954
53075
|
}
|
|
52955
53076
|
|
|
52956
53077
|
// src/components/chat/entity-cards/dispatch.tsx
|
|
52957
|
-
import
|
|
53078
|
+
import React148 from "react";
|
|
52958
53079
|
init_next_navigation();
|
|
52959
53080
|
|
|
52960
53081
|
// src/components/chat/hooks/use-chat-card-item.ts
|
|
@@ -54259,7 +54380,7 @@ function ChatCardLoader({
|
|
|
54259
54380
|
extras
|
|
54260
54381
|
}) {
|
|
54261
54382
|
const runtime = useRequiredChatRuntime();
|
|
54262
|
-
const resolvedChatRef =
|
|
54383
|
+
const resolvedChatRef = React148.useMemo(() => {
|
|
54263
54384
|
const cta = resolveSourceRowCTA(
|
|
54264
54385
|
{
|
|
54265
54386
|
sourceRepo: chatRef.sourceRepo,
|
|
@@ -54407,7 +54528,7 @@ function renderChatInlineEntityCard(chatRef, options = {}) {
|
|
|
54407
54528
|
}
|
|
54408
54529
|
|
|
54409
54530
|
// src/components/chat/hooks/use-chunk-catchup.ts
|
|
54410
|
-
import { useCallback as useCallback51, useRef as
|
|
54531
|
+
import { useCallback as useCallback51, useRef as useRef74 } from "react";
|
|
54411
54532
|
function makeSeqKey(messageType, chunkType, sequenceId) {
|
|
54412
54533
|
return `${messageType}:${chunkType}:${sequenceId}`;
|
|
54413
54534
|
}
|
|
@@ -54429,22 +54550,22 @@ function useChunkCatchup({
|
|
|
54429
54550
|
chatTypes = [CHAT_TYPE.CLIENT],
|
|
54430
54551
|
fetchChunks
|
|
54431
54552
|
}) {
|
|
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 =
|
|
54553
|
+
const processedSequenceKeys = useRef74(/* @__PURE__ */ new Set());
|
|
54554
|
+
const lastSequenceId = useRef74(null);
|
|
54555
|
+
const lastSequenceIdByType = useRef74(/* @__PURE__ */ new Map());
|
|
54556
|
+
const fetchingInProgress = useRef74(false);
|
|
54557
|
+
const lastFetchParams = useRef74(null);
|
|
54558
|
+
const pendingCatchupRef = useRef74(null);
|
|
54559
|
+
const chunkBuffer = useRef74([]);
|
|
54560
|
+
const bufferUntilInitialCatchupComplete = useRef74(false);
|
|
54561
|
+
const hasCompletedInitialCatchup = useRef74(false);
|
|
54562
|
+
const dialogIdRef = useRef74(dialogId);
|
|
54442
54563
|
dialogIdRef.current = dialogId;
|
|
54443
|
-
const chatTypesRef =
|
|
54564
|
+
const chatTypesRef = useRef74(chatTypes);
|
|
54444
54565
|
chatTypesRef.current = chatTypes;
|
|
54445
|
-
const fetchChunksRef =
|
|
54566
|
+
const fetchChunksRef = useRef74(fetchChunks);
|
|
54446
54567
|
fetchChunksRef.current = fetchChunks;
|
|
54447
|
-
const onChunkReceivedRef =
|
|
54568
|
+
const onChunkReceivedRef = useRef74(onChunkReceived);
|
|
54448
54569
|
onChunkReceivedRef.current = onChunkReceived;
|
|
54449
54570
|
const processChunk = useCallback51((chunk, messageType, forceProcess = false) => {
|
|
54450
54571
|
if (bufferUntilInitialCatchupComplete.current && !forceProcess) {
|
|
@@ -54642,7 +54763,7 @@ function useChunkCatchup({
|
|
|
54642
54763
|
}
|
|
54643
54764
|
}
|
|
54644
54765
|
}, [flushBufferedRealtimeChunks]);
|
|
54645
|
-
const catchUpChunksRef =
|
|
54766
|
+
const catchUpChunksRef = useRef74(null);
|
|
54646
54767
|
catchUpChunksRef.current = catchUpChunks;
|
|
54647
54768
|
const resetChunkTracking = useCallback51(() => {
|
|
54648
54769
|
processedSequenceKeys.current.clear();
|
|
@@ -54686,20 +54807,20 @@ function useChunkCatchup({
|
|
|
54686
54807
|
}
|
|
54687
54808
|
|
|
54688
54809
|
// src/components/chat/hooks/use-scripted-stream.ts
|
|
54689
|
-
import { useEffect as
|
|
54810
|
+
import { useEffect as useEffect93, useState as useState123 } from "react";
|
|
54690
54811
|
var EMPTY_FRAME = { messages: [], phase: "idle", typing: false, delayMs: 0 };
|
|
54691
54812
|
function prefersReducedMotion() {
|
|
54692
54813
|
return typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === true;
|
|
54693
54814
|
}
|
|
54694
54815
|
function useScriptedStream(frames, resetKey, enabled = true) {
|
|
54695
|
-
const [index, setIndex] =
|
|
54696
|
-
const [reducedMotion, setReducedMotion] =
|
|
54697
|
-
const [prevKey, setPrevKey] =
|
|
54816
|
+
const [index, setIndex] = useState123(0);
|
|
54817
|
+
const [reducedMotion, setReducedMotion] = useState123(false);
|
|
54818
|
+
const [prevKey, setPrevKey] = useState123(resetKey);
|
|
54698
54819
|
if (resetKey !== prevKey) {
|
|
54699
54820
|
setPrevKey(resetKey);
|
|
54700
54821
|
setIndex(0);
|
|
54701
54822
|
}
|
|
54702
|
-
|
|
54823
|
+
useEffect93(() => {
|
|
54703
54824
|
setReducedMotion(prefersReducedMotion());
|
|
54704
54825
|
const mq = window.matchMedia?.("(prefers-reduced-motion: reduce)");
|
|
54705
54826
|
if (!mq) return;
|
|
@@ -54709,7 +54830,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
|
|
|
54709
54830
|
}, []);
|
|
54710
54831
|
const playing = enabled && !reducedMotion && frames.length > 0;
|
|
54711
54832
|
const lastIndex = Math.max(0, frames.length - 1);
|
|
54712
|
-
|
|
54833
|
+
useEffect93(() => {
|
|
54713
54834
|
if (!playing || index >= lastIndex) return;
|
|
54714
54835
|
const current = frames[Math.min(index, lastIndex)] ?? EMPTY_FRAME;
|
|
54715
54836
|
const t = setTimeout(() => setIndex((i) => Math.min(i + 1, lastIndex)), current.delayMs);
|
|
@@ -54721,7 +54842,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
|
|
|
54721
54842
|
}
|
|
54722
54843
|
|
|
54723
54844
|
// src/components/chat/hooks/use-jetstream-dialog-subscription.ts
|
|
54724
|
-
import { useCallback as useCallback52, useEffect as
|
|
54845
|
+
import { useCallback as useCallback52, useEffect as useEffect94, useRef as useRef75, useState as useState124 } from "react";
|
|
54725
54846
|
var DEFAULT_STREAM_NAME = "CHAT_CHUNKS";
|
|
54726
54847
|
var RESYNC_AFTER_HIDDEN_MS = 1e4;
|
|
54727
54848
|
var RESYNC_COALESCE_MS = 1e3;
|
|
@@ -54743,61 +54864,61 @@ function useJetStreamDialogSubscription({
|
|
|
54743
54864
|
inactiveThresholdMs,
|
|
54744
54865
|
resyncSignal = 0
|
|
54745
54866
|
}) {
|
|
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
|
-
|
|
54867
|
+
const [isConnected, setIsConnected] = useState124(false);
|
|
54868
|
+
const [isSubscribed, setIsSubscribed] = useState124(false);
|
|
54869
|
+
const [reconnectionCount, setReconnectionCount] = useState124(0);
|
|
54870
|
+
const [recoveryCount, setRecoveryCount] = useState124(0);
|
|
54871
|
+
const [currentStreamSeq, setCurrentStreamSeq] = useState124(null);
|
|
54872
|
+
const lastRecoveryReportRef = useRef75(0);
|
|
54873
|
+
const resyncTimerRef = useRef75(null);
|
|
54874
|
+
const lastResyncSignalRef = useRef75(resyncSignal);
|
|
54875
|
+
const clientRef = useRef75(null);
|
|
54876
|
+
const subscriptionRef = useRef75(null);
|
|
54877
|
+
const highestStreamSeqRef = useRef75(null);
|
|
54878
|
+
const onEventRef = useRef75(onEvent);
|
|
54879
|
+
useEffect94(() => {
|
|
54759
54880
|
onEventRef.current = onEvent;
|
|
54760
54881
|
}, [onEvent]);
|
|
54761
|
-
const onConnectRef =
|
|
54762
|
-
|
|
54882
|
+
const onConnectRef = useRef75(onConnect);
|
|
54883
|
+
useEffect94(() => {
|
|
54763
54884
|
onConnectRef.current = onConnect;
|
|
54764
54885
|
}, [onConnect]);
|
|
54765
|
-
const onDisconnectRef =
|
|
54766
|
-
|
|
54886
|
+
const onDisconnectRef = useRef75(onDisconnect);
|
|
54887
|
+
useEffect94(() => {
|
|
54767
54888
|
onDisconnectRef.current = onDisconnect;
|
|
54768
54889
|
}, [onDisconnect]);
|
|
54769
|
-
const onSubscribedRef =
|
|
54770
|
-
|
|
54890
|
+
const onSubscribedRef = useRef75(onSubscribed);
|
|
54891
|
+
useEffect94(() => {
|
|
54771
54892
|
onSubscribedRef.current = onSubscribed;
|
|
54772
54893
|
}, [onSubscribed]);
|
|
54773
|
-
const onBeforeReconnectRef =
|
|
54774
|
-
|
|
54894
|
+
const onBeforeReconnectRef = useRef75(onBeforeReconnect);
|
|
54895
|
+
useEffect94(() => {
|
|
54775
54896
|
onBeforeReconnectRef.current = onBeforeReconnect;
|
|
54776
54897
|
}, [onBeforeReconnect]);
|
|
54777
|
-
const getNatsWsUrlRef =
|
|
54778
|
-
|
|
54898
|
+
const getNatsWsUrlRef = useRef75(getNatsWsUrl);
|
|
54899
|
+
useEffect94(() => {
|
|
54779
54900
|
getNatsWsUrlRef.current = getNatsWsUrl;
|
|
54780
54901
|
}, [getNatsWsUrl]);
|
|
54781
|
-
const reconnectionBackoffRef =
|
|
54782
|
-
|
|
54902
|
+
const reconnectionBackoffRef = useRef75(reconnectionBackoff);
|
|
54903
|
+
useEffect94(() => {
|
|
54783
54904
|
reconnectionBackoffRef.current = reconnectionBackoff;
|
|
54784
54905
|
}, [reconnectionBackoff]);
|
|
54785
|
-
const optStartSeqRef =
|
|
54786
|
-
|
|
54906
|
+
const optStartSeqRef = useRef75(optStartSeq);
|
|
54907
|
+
useEffect94(() => {
|
|
54787
54908
|
optStartSeqRef.current = optStartSeq;
|
|
54788
54909
|
}, [optStartSeq]);
|
|
54789
|
-
const inactiveThresholdRef =
|
|
54790
|
-
|
|
54910
|
+
const inactiveThresholdRef = useRef75(inactiveThresholdMs);
|
|
54911
|
+
useEffect94(() => {
|
|
54791
54912
|
inactiveThresholdRef.current = inactiveThresholdMs;
|
|
54792
54913
|
}, [inactiveThresholdMs]);
|
|
54793
|
-
const hadConnectionBeforeRef =
|
|
54794
|
-
const clientConfigRef =
|
|
54795
|
-
|
|
54914
|
+
const hadConnectionBeforeRef = useRef75(false);
|
|
54915
|
+
const clientConfigRef = useRef75(clientConfig);
|
|
54916
|
+
useEffect94(() => {
|
|
54796
54917
|
clientConfigRef.current = clientConfig;
|
|
54797
54918
|
}, [clientConfig]);
|
|
54798
|
-
const currentWsUrlRef =
|
|
54919
|
+
const currentWsUrlRef = useRef75("");
|
|
54799
54920
|
const wsUrl = getNatsWsUrl();
|
|
54800
|
-
|
|
54921
|
+
useEffect94(() => {
|
|
54801
54922
|
if (!enabled || !wsUrl) {
|
|
54802
54923
|
if (currentWsUrlRef.current && clientRef.current) {
|
|
54803
54924
|
releaseClient(currentWsUrlRef.current);
|
|
@@ -54878,7 +54999,7 @@ function useJetStreamDialogSubscription({
|
|
|
54878
54999
|
}
|
|
54879
55000
|
};
|
|
54880
55001
|
}, [enabled, wsUrl]);
|
|
54881
|
-
|
|
55002
|
+
useEffect94(() => {
|
|
54882
55003
|
highestStreamSeqRef.current = null;
|
|
54883
55004
|
lastResyncSignalRef.current = resyncSignal;
|
|
54884
55005
|
setCurrentStreamSeq(null);
|
|
@@ -54896,7 +55017,7 @@ function useJetStreamDialogSubscription({
|
|
|
54896
55017
|
setReconnectionCount((c) => c + 1);
|
|
54897
55018
|
}, RESYNC_COALESCE_MS);
|
|
54898
55019
|
}, []);
|
|
54899
|
-
|
|
55020
|
+
useEffect94(() => {
|
|
54900
55021
|
if (!enabled) return;
|
|
54901
55022
|
let hiddenSince = document.visibilityState === "hidden" ? Date.now() : 0;
|
|
54902
55023
|
const onVisibilityChange = () => {
|
|
@@ -54913,13 +55034,13 @@ function useJetStreamDialogSubscription({
|
|
|
54913
55034
|
document.addEventListener("visibilitychange", onVisibilityChange);
|
|
54914
55035
|
return () => document.removeEventListener("visibilitychange", onVisibilityChange);
|
|
54915
55036
|
}, [enabled, requestResync]);
|
|
54916
|
-
|
|
55037
|
+
useEffect94(() => {
|
|
54917
55038
|
if (!enabled) return;
|
|
54918
55039
|
if (resyncSignal <= lastResyncSignalRef.current) return;
|
|
54919
55040
|
lastResyncSignalRef.current = resyncSignal;
|
|
54920
55041
|
requestResync();
|
|
54921
55042
|
}, [enabled, resyncSignal, requestResync]);
|
|
54922
|
-
|
|
55043
|
+
useEffect94(() => {
|
|
54923
55044
|
if (!enabled || !dialogId || !isConnected) {
|
|
54924
55045
|
if (subscriptionRef.current) {
|
|
54925
55046
|
try {
|
|
@@ -55020,7 +55141,7 @@ function useJetStreamDialogSubscription({
|
|
|
55020
55141
|
}
|
|
55021
55142
|
|
|
55022
55143
|
// src/components/chat/hooks/use-nats-dialog-subscription.ts
|
|
55023
|
-
import { useEffect as
|
|
55144
|
+
import { useEffect as useEffect95, useRef as useRef76, useState as useState125 } from "react";
|
|
55024
55145
|
function useNatsDialogSubscription({
|
|
55025
55146
|
enabled,
|
|
55026
55147
|
dialogId,
|
|
@@ -55034,47 +55155,47 @@ function useNatsDialogSubscription({
|
|
|
55034
55155
|
clientConfig = {},
|
|
55035
55156
|
reconnectionBackoff
|
|
55036
55157
|
}) {
|
|
55037
|
-
const [isConnected, setIsConnected] =
|
|
55038
|
-
const [isSubscribed, setIsSubscribed] =
|
|
55039
|
-
const [reconnectionCount, setReconnectionCount] =
|
|
55040
|
-
const clientRef =
|
|
55041
|
-
const subscriptionRefs =
|
|
55042
|
-
const onEventRef =
|
|
55043
|
-
|
|
55158
|
+
const [isConnected, setIsConnected] = useState125(false);
|
|
55159
|
+
const [isSubscribed, setIsSubscribed] = useState125(false);
|
|
55160
|
+
const [reconnectionCount, setReconnectionCount] = useState125(0);
|
|
55161
|
+
const clientRef = useRef76(null);
|
|
55162
|
+
const subscriptionRefs = useRef76(/* @__PURE__ */ new Map());
|
|
55163
|
+
const onEventRef = useRef76(onEvent);
|
|
55164
|
+
useEffect95(() => {
|
|
55044
55165
|
onEventRef.current = onEvent;
|
|
55045
55166
|
}, [onEvent]);
|
|
55046
|
-
const onConnectRef =
|
|
55047
|
-
|
|
55167
|
+
const onConnectRef = useRef76(onConnect);
|
|
55168
|
+
useEffect95(() => {
|
|
55048
55169
|
onConnectRef.current = onConnect;
|
|
55049
55170
|
}, [onConnect]);
|
|
55050
|
-
const onDisconnectRef =
|
|
55051
|
-
|
|
55171
|
+
const onDisconnectRef = useRef76(onDisconnect);
|
|
55172
|
+
useEffect95(() => {
|
|
55052
55173
|
onDisconnectRef.current = onDisconnect;
|
|
55053
55174
|
}, [onDisconnect]);
|
|
55054
|
-
const onSubscribedRef =
|
|
55055
|
-
|
|
55175
|
+
const onSubscribedRef = useRef76(onSubscribed);
|
|
55176
|
+
useEffect95(() => {
|
|
55056
55177
|
onSubscribedRef.current = onSubscribed;
|
|
55057
55178
|
}, [onSubscribed]);
|
|
55058
|
-
const onBeforeReconnectRef =
|
|
55059
|
-
|
|
55179
|
+
const onBeforeReconnectRef = useRef76(onBeforeReconnect);
|
|
55180
|
+
useEffect95(() => {
|
|
55060
55181
|
onBeforeReconnectRef.current = onBeforeReconnect;
|
|
55061
55182
|
}, [onBeforeReconnect]);
|
|
55062
|
-
const hadConnectionBeforeRef =
|
|
55063
|
-
const getNatsWsUrlRef =
|
|
55064
|
-
|
|
55183
|
+
const hadConnectionBeforeRef = useRef76(false);
|
|
55184
|
+
const getNatsWsUrlRef = useRef76(getNatsWsUrl);
|
|
55185
|
+
useEffect95(() => {
|
|
55065
55186
|
getNatsWsUrlRef.current = getNatsWsUrl;
|
|
55066
55187
|
}, [getNatsWsUrl]);
|
|
55067
|
-
const reconnectionBackoffRef =
|
|
55068
|
-
|
|
55188
|
+
const reconnectionBackoffRef = useRef76(reconnectionBackoff);
|
|
55189
|
+
useEffect95(() => {
|
|
55069
55190
|
reconnectionBackoffRef.current = reconnectionBackoff;
|
|
55070
55191
|
}, [reconnectionBackoff]);
|
|
55071
|
-
const clientConfigRef =
|
|
55072
|
-
|
|
55192
|
+
const clientConfigRef = useRef76(clientConfig);
|
|
55193
|
+
useEffect95(() => {
|
|
55073
55194
|
clientConfigRef.current = clientConfig;
|
|
55074
55195
|
}, [clientConfig]);
|
|
55075
|
-
const currentWsUrlRef =
|
|
55196
|
+
const currentWsUrlRef = useRef76("");
|
|
55076
55197
|
const wsUrl = getNatsWsUrl();
|
|
55077
|
-
|
|
55198
|
+
useEffect95(() => {
|
|
55078
55199
|
if (!enabled || !wsUrl) {
|
|
55079
55200
|
if (currentWsUrlRef.current && clientRef.current) {
|
|
55080
55201
|
releaseClient(currentWsUrlRef.current);
|
|
@@ -55156,16 +55277,16 @@ function useNatsDialogSubscription({
|
|
|
55156
55277
|
};
|
|
55157
55278
|
}, [enabled, wsUrl]);
|
|
55158
55279
|
const topicsKey = topics.join(",");
|
|
55159
|
-
const topicsRef =
|
|
55280
|
+
const topicsRef = useRef76(topics);
|
|
55160
55281
|
topicsRef.current = topics;
|
|
55161
|
-
const lastSubscribedDialogIdRef =
|
|
55162
|
-
const isConnectedRef =
|
|
55163
|
-
|
|
55282
|
+
const lastSubscribedDialogIdRef = useRef76(null);
|
|
55283
|
+
const isConnectedRef = useRef76(isConnected);
|
|
55284
|
+
useEffect95(() => {
|
|
55164
55285
|
isConnectedRef.current = isConnected;
|
|
55165
55286
|
}, [isConnected]);
|
|
55166
|
-
const currentDialogIdRef =
|
|
55167
|
-
const abortControllerRef =
|
|
55168
|
-
|
|
55287
|
+
const currentDialogIdRef = useRef76(null);
|
|
55288
|
+
const abortControllerRef = useRef76(null);
|
|
55289
|
+
useEffect95(() => {
|
|
55169
55290
|
currentDialogIdRef.current = dialogId;
|
|
55170
55291
|
if (!enabled || !dialogId) {
|
|
55171
55292
|
if (subscriptionRefs.current.size > 0) {
|
|
@@ -55246,7 +55367,7 @@ function useNatsDialogSubscription({
|
|
|
55246
55367
|
abortControllerRef.current = null;
|
|
55247
55368
|
};
|
|
55248
55369
|
}, [enabled, dialogId, topicsKey]);
|
|
55249
|
-
|
|
55370
|
+
useEffect95(() => {
|
|
55250
55371
|
if (!enabled || !currentDialogIdRef.current || !isConnected) {
|
|
55251
55372
|
return;
|
|
55252
55373
|
}
|
|
@@ -55296,7 +55417,7 @@ function buildNatsWsUrl(apiBaseUrl, options) {
|
|
|
55296
55417
|
}
|
|
55297
55418
|
|
|
55298
55419
|
// src/components/chat/hooks/use-slash-commands.ts
|
|
55299
|
-
import { useEffect as
|
|
55420
|
+
import { useEffect as useEffect96, useState as useState126 } from "react";
|
|
55300
55421
|
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
|
55301
55422
|
async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
55302
55423
|
try {
|
|
@@ -55313,9 +55434,9 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
|
55313
55434
|
}
|
|
55314
55435
|
}
|
|
55315
55436
|
function useSlashCommands(prefix, commandsUrl) {
|
|
55316
|
-
const [commands, setCommands] =
|
|
55317
|
-
const [loading, setLoading] =
|
|
55318
|
-
|
|
55437
|
+
const [commands, setCommands] = useState126([]);
|
|
55438
|
+
const [loading, setLoading] = useState126(false);
|
|
55439
|
+
useEffect96(() => {
|
|
55319
55440
|
if (prefix == null) {
|
|
55320
55441
|
setCommands([]);
|
|
55321
55442
|
return;
|
|
@@ -55421,7 +55542,7 @@ function useEmptyStateConfig(emptyStateUrl, options) {
|
|
|
55421
55542
|
}
|
|
55422
55543
|
|
|
55423
55544
|
// src/components/chat/hooks/use-chat-attachments.ts
|
|
55424
|
-
import { useCallback as useCallback53, useMemo as useMemo52, useRef as
|
|
55545
|
+
import { useCallback as useCallback53, useMemo as useMemo52, useRef as useRef77, useState as useState127 } from "react";
|
|
55425
55546
|
import { fileTypeFromBlob } from "file-type";
|
|
55426
55547
|
var CHAT_ATTACHMENTS_BUCKET = "chat-attachments";
|
|
55427
55548
|
var CHAT_ATTACHMENTS_FOLDER = "chat";
|
|
@@ -55497,8 +55618,8 @@ function uploadWithProgress(url, file, token, onProgress, signal) {
|
|
|
55497
55618
|
function useChatAttachments() {
|
|
55498
55619
|
const runtime = useRequiredChatRuntime();
|
|
55499
55620
|
const uploadUrlEndpoint = runtime.endpoints.attachmentUploadUrl;
|
|
55500
|
-
const [attachments, setAttachments] =
|
|
55501
|
-
const controllersRef =
|
|
55621
|
+
const [attachments, setAttachments] = useState127([]);
|
|
55622
|
+
const controllersRef = useRef77(/* @__PURE__ */ new Map());
|
|
55502
55623
|
const updateOne = useCallback53((id, patch) => {
|
|
55503
55624
|
setAttachments((prev) => prev.map((a) => a.id === id ? { ...a, ...patch } : a));
|
|
55504
55625
|
}, []);
|
|
@@ -55587,7 +55708,7 @@ function useChatAttachments() {
|
|
|
55587
55708
|
},
|
|
55588
55709
|
[uploadUrlEndpoint, updateOne]
|
|
55589
55710
|
);
|
|
55590
|
-
const attachmentsRef =
|
|
55711
|
+
const attachmentsRef = useRef77([]);
|
|
55591
55712
|
attachmentsRef.current = attachments;
|
|
55592
55713
|
const addFiles = useCallback53(
|
|
55593
55714
|
(files) => {
|
|
@@ -55664,16 +55785,16 @@ function useChatAttachments() {
|
|
|
55664
55785
|
}
|
|
55665
55786
|
|
|
55666
55787
|
// src/components/chat/hooks/use-chat-attachment-image-gallery.tsx
|
|
55667
|
-
import { useCallback as useCallback54, useEffect as
|
|
55788
|
+
import { useCallback as useCallback54, useEffect as useEffect97, useRef as useRef78, useState as useState128 } from "react";
|
|
55668
55789
|
import { jsx as jsx398 } from "react/jsx-runtime";
|
|
55669
55790
|
var CLOSED = { isOpen: false, images: [], initialIndex: 0 };
|
|
55670
55791
|
function useChatAttachmentImageGallery() {
|
|
55671
55792
|
const runtime = useRequiredChatRuntime();
|
|
55672
55793
|
const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
|
|
55673
|
-
const panelRef =
|
|
55674
|
-
const [state, setState] =
|
|
55794
|
+
const panelRef = useRef78(null);
|
|
55795
|
+
const [state, setState] = useState128(CLOSED);
|
|
55675
55796
|
const handleClose = useCallback54(() => setState(CLOSED), []);
|
|
55676
|
-
|
|
55797
|
+
useEffect97(() => {
|
|
55677
55798
|
const root = panelRef.current;
|
|
55678
55799
|
if (!root) return;
|
|
55679
55800
|
const onClick = (ev) => {
|
|
@@ -55719,11 +55840,11 @@ function absolutize(prefix) {
|
|
|
55719
55840
|
}
|
|
55720
55841
|
|
|
55721
55842
|
// src/components/chat/hooks/use-close-on-navigation.ts
|
|
55722
|
-
import { useEffect as
|
|
55843
|
+
import { useEffect as useEffect98, useRef as useRef79 } from "react";
|
|
55723
55844
|
function useCloseOnNavigation(close, pathname) {
|
|
55724
|
-
const prevPathnameRef =
|
|
55725
|
-
const initializedRef =
|
|
55726
|
-
|
|
55845
|
+
const prevPathnameRef = useRef79(null);
|
|
55846
|
+
const initializedRef = useRef79(false);
|
|
55847
|
+
useEffect98(() => {
|
|
55727
55848
|
if (!initializedRef.current) {
|
|
55728
55849
|
initializedRef.current = true;
|
|
55729
55850
|
prevPathnameRef.current = pathname;
|
|
@@ -55737,14 +55858,14 @@ function useCloseOnNavigation(close, pathname) {
|
|
|
55737
55858
|
}
|
|
55738
55859
|
|
|
55739
55860
|
// src/components/chat/hooks/use-chat.ts
|
|
55740
|
-
import { useState as
|
|
55861
|
+
import { useState as useState130, useCallback as useCallback56, useEffect as useEffect99, useRef as useRef81 } from "react";
|
|
55741
55862
|
|
|
55742
55863
|
// src/components/chat/hooks/use-sse.ts
|
|
55743
|
-
import { useState as
|
|
55864
|
+
import { useState as useState129, useCallback as useCallback55, useRef as useRef80 } from "react";
|
|
55744
55865
|
function useSSE({ useMock = true, debugMode = false, streamFn } = {}) {
|
|
55745
|
-
const [isStreaming, setIsStreaming] =
|
|
55746
|
-
const [error, setError] =
|
|
55747
|
-
const abortControllerRef =
|
|
55866
|
+
const [isStreaming, setIsStreaming] = useState129(false);
|
|
55867
|
+
const [error, setError] = useState129(null);
|
|
55868
|
+
const abortControllerRef = useRef80(null);
|
|
55748
55869
|
const fallbackStream = useCallback55(async function* () {
|
|
55749
55870
|
throw new Error(
|
|
55750
55871
|
"[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 +55931,12 @@ function useChat({
|
|
|
55810
55931
|
initialMessages,
|
|
55811
55932
|
onMessagesChange
|
|
55812
55933
|
} = {}) {
|
|
55813
|
-
const [messages, setMessages] =
|
|
55814
|
-
const [isTyping, setIsTyping] =
|
|
55815
|
-
const currentAssistantSegmentsRef =
|
|
55816
|
-
const onMessagesChangeRef =
|
|
55934
|
+
const [messages, setMessages] = useState130(() => initialMessages ?? []);
|
|
55935
|
+
const [isTyping, setIsTyping] = useState130(false);
|
|
55936
|
+
const currentAssistantSegmentsRef = useRef81([]);
|
|
55937
|
+
const onMessagesChangeRef = useRef81(onMessagesChange);
|
|
55817
55938
|
onMessagesChangeRef.current = onMessagesChange;
|
|
55818
|
-
|
|
55939
|
+
useEffect99(() => {
|
|
55819
55940
|
onMessagesChangeRef.current?.(messages);
|
|
55820
55941
|
}, [messages]);
|
|
55821
55942
|
const {
|
|
@@ -56085,7 +56206,7 @@ function useChat({
|
|
|
56085
56206
|
}
|
|
56086
56207
|
|
|
56087
56208
|
// src/components/chat/hooks/use-sse-chat-adapter.ts
|
|
56088
|
-
import { useCallback as useCallback58, useMemo as useMemo54, useRef as
|
|
56209
|
+
import { useCallback as useCallback58, useMemo as useMemo54, useRef as useRef84 } from "react";
|
|
56089
56210
|
|
|
56090
56211
|
// src/chat-protocol/confirm-tool.ts
|
|
56091
56212
|
function buildConfirmToolBody(request) {
|
|
@@ -56352,7 +56473,7 @@ function pruneStaleChatConversationStorage(source) {
|
|
|
56352
56473
|
}
|
|
56353
56474
|
|
|
56354
56475
|
// src/components/chat/hooks/use-chat-history-hydration.ts
|
|
56355
|
-
import { useEffect as
|
|
56476
|
+
import { useEffect as useEffect100, useRef as useRef82, useState as useState131 } from "react";
|
|
56356
56477
|
function useChatHistoryHydration({
|
|
56357
56478
|
active,
|
|
56358
56479
|
source,
|
|
@@ -56362,9 +56483,9 @@ function useChatHistoryHydration({
|
|
|
56362
56483
|
hydrateMessages,
|
|
56363
56484
|
bumpMetaTick
|
|
56364
56485
|
}) {
|
|
56365
|
-
const [isHydratingHistory, setIsHydratingHistory] =
|
|
56366
|
-
const hydratedKeyRef =
|
|
56367
|
-
|
|
56486
|
+
const [isHydratingHistory, setIsHydratingHistory] = useState131(false);
|
|
56487
|
+
const hydratedKeyRef = useRef82(null);
|
|
56488
|
+
useEffect100(() => {
|
|
56368
56489
|
if (!active) return;
|
|
56369
56490
|
const conversationId = conversationIdRef.current;
|
|
56370
56491
|
if (!conversationId) return;
|
|
@@ -58561,7 +58682,7 @@ function createChatDialogStore(options = {}) {
|
|
|
58561
58682
|
}
|
|
58562
58683
|
|
|
58563
58684
|
// src/components/chat/stream/use-chat-stream-reducer.ts
|
|
58564
|
-
import { useCallback as useCallback57, useEffect as
|
|
58685
|
+
import { useCallback as useCallback57, useEffect as useEffect101, useMemo as useMemo53, useRef as useRef83, useSyncExternalStore } from "react";
|
|
58565
58686
|
|
|
58566
58687
|
// src/components/chat/stream/delta-batcher.ts
|
|
58567
58688
|
var DELTA_FLUSH_FALLBACK_MS = 50;
|
|
@@ -58650,21 +58771,21 @@ function useChatStreamReducer({
|
|
|
58650
58771
|
side = DEFAULT_DIALOG_SIDE,
|
|
58651
58772
|
createReducerOptions
|
|
58652
58773
|
}) {
|
|
58653
|
-
const optionsRef =
|
|
58774
|
+
const optionsRef = useRef83(createReducerOptions);
|
|
58654
58775
|
optionsRef.current = createReducerOptions;
|
|
58655
58776
|
const reducer2 = store.getReducer(dialogId, side, () => optionsRef.current?.() ?? {});
|
|
58656
58777
|
const getSnapshot = useCallback57(() => store.getSnapshot(dialogId, side), [store, dialogId, side]);
|
|
58657
58778
|
const getServerSnapshot = useCallback57(() => store.getServerSnapshot(), [store]);
|
|
58658
58779
|
const subscribe = useCallback57((listener) => store.subscribe(listener), [store]);
|
|
58659
58780
|
const state = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
58660
|
-
|
|
58661
|
-
const keyRef =
|
|
58781
|
+
useEffect101(() => store.retain(dialogId, side), [store, dialogId, side]);
|
|
58782
|
+
const keyRef = useRef83({ dialogId, side });
|
|
58662
58783
|
if (keyRef.current.dialogId !== dialogId || keyRef.current.side !== side) {
|
|
58663
58784
|
keyRef.current = { dialogId, side };
|
|
58664
58785
|
}
|
|
58665
|
-
const storeRef =
|
|
58786
|
+
const storeRef = useRef83(store);
|
|
58666
58787
|
storeRef.current = store;
|
|
58667
|
-
const batcherRef =
|
|
58788
|
+
const batcherRef = useRef83(null);
|
|
58668
58789
|
if (batcherRef.current === null) {
|
|
58669
58790
|
batcherRef.current = createDeltaBatcher({
|
|
58670
58791
|
applyOne: (event, key) => {
|
|
@@ -58682,7 +58803,7 @@ function useChatStreamReducer({
|
|
|
58682
58803
|
},
|
|
58683
58804
|
[batcher, store, dialogId, side]
|
|
58684
58805
|
);
|
|
58685
|
-
|
|
58806
|
+
useEffect101(() => () => batcher.dispose(), [batcher]);
|
|
58686
58807
|
const mutate = useCallback57(
|
|
58687
58808
|
(fn) => store.mutate(dialogId, side, fn),
|
|
58688
58809
|
[store, dialogId, side]
|
|
@@ -58713,7 +58834,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
58713
58834
|
const runtime = useRequiredChatRuntime();
|
|
58714
58835
|
const source = runtime.source || DEFAULT_CHAT_SOURCE;
|
|
58715
58836
|
const tableIdForDocumentType = options?.tableIdForDocumentType ?? defaultTableIdForDocumentType;
|
|
58716
|
-
const sendMessageRef =
|
|
58837
|
+
const sendMessageRef = useRef84(async () => true);
|
|
58717
58838
|
const cardResolve = useCallback58(
|
|
58718
58839
|
(action) => (reqId) => {
|
|
58719
58840
|
if (!reqId) return;
|
|
@@ -58733,17 +58854,17 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
58733
58854
|
}),
|
|
58734
58855
|
[cardApprove, cardReject]
|
|
58735
58856
|
);
|
|
58736
|
-
const storeRef =
|
|
58857
|
+
const storeRef = useRef84(null);
|
|
58737
58858
|
if (storeRef.current === null) storeRef.current = createChatDialogStore();
|
|
58738
58859
|
const { state, applyEvent, flushDeltas, mutate, reducer: reducer2 } = useChatStreamReducer({
|
|
58739
58860
|
store: storeRef.current,
|
|
58740
58861
|
dialogId: source,
|
|
58741
58862
|
createReducerOptions
|
|
58742
58863
|
});
|
|
58743
|
-
const abortControllerRef =
|
|
58864
|
+
const abortControllerRef = useRef84(null);
|
|
58744
58865
|
const conversationStorage = useMemo54(() => createChatConversationStorage(source), [source]);
|
|
58745
|
-
const conversationIdRef =
|
|
58746
|
-
const restoredConversationRef =
|
|
58866
|
+
const conversationIdRef = useRef84(null);
|
|
58867
|
+
const restoredConversationRef = useRef84(false);
|
|
58747
58868
|
if (!restoredConversationRef.current) {
|
|
58748
58869
|
restoredConversationRef.current = true;
|
|
58749
58870
|
pruneStaleChatConversationStorage(source);
|
|
@@ -58774,7 +58895,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
58774
58895
|
return map;
|
|
58775
58896
|
}, [slashCommands]);
|
|
58776
58897
|
const historyUrl = runtime.endpoints.chatHistoryUrl ?? `${runtime.endpoints.chatStreamUrl.replace(/\/+$/, "")}/history`;
|
|
58777
|
-
const hydrationSendCountRef =
|
|
58898
|
+
const hydrationSendCountRef = useRef84(0);
|
|
58778
58899
|
const hydrateMessages = useCallback58(
|
|
58779
58900
|
(history, sourcesSeed) => {
|
|
58780
58901
|
mutate((r) => {
|
|
@@ -58807,7 +58928,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
58807
58928
|
// `hydrateMessages` above) already invalidates the snapshot.
|
|
58808
58929
|
bumpMetaTick: noopBumpMetaTick
|
|
58809
58930
|
});
|
|
58810
|
-
const endpointsRef =
|
|
58931
|
+
const endpointsRef = useRef84(runtime.endpoints);
|
|
58811
58932
|
endpointsRef.current = runtime.endpoints;
|
|
58812
58933
|
const captureConversationId = useCallback58(
|
|
58813
58934
|
(event) => {
|
|
@@ -59063,7 +59184,7 @@ var noopBumpMetaTick = () => {
|
|
|
59063
59184
|
};
|
|
59064
59185
|
|
|
59065
59186
|
// src/components/chat/hooks/use-nats-chat-adapter.ts
|
|
59066
|
-
import { useCallback as useCallback59, useEffect as
|
|
59187
|
+
import { useCallback as useCallback59, useEffect as useEffect102, useMemo as useMemo55, useRef as useRef85, useState as useState132 } from "react";
|
|
59067
59188
|
|
|
59068
59189
|
// src/chat-protocol/nats-decoder.ts
|
|
59069
59190
|
function normalizeToolCalls(raw) {
|
|
@@ -60093,13 +60214,13 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
60093
60214
|
modelLabel = null
|
|
60094
60215
|
} = config;
|
|
60095
60216
|
const isManagedMode = fetchDialogs !== void 0;
|
|
60096
|
-
const [internalDialogId, setInternalDialogId] =
|
|
60217
|
+
const [internalDialogId, setInternalDialogId] = useState132(null);
|
|
60097
60218
|
const dialogId = isManagedMode ? internalDialogId : controlledDialogId !== void 0 ? controlledDialogId : null;
|
|
60098
|
-
const currentDialogIdRef =
|
|
60219
|
+
const currentDialogIdRef = useRef85(dialogId);
|
|
60099
60220
|
currentDialogIdRef.current = dialogId;
|
|
60100
|
-
const handleApproveRef =
|
|
60221
|
+
const handleApproveRef = useRef85(async () => {
|
|
60101
60222
|
});
|
|
60102
|
-
const handleRejectRef =
|
|
60223
|
+
const handleRejectRef = useRef85(
|
|
60103
60224
|
async () => {
|
|
60104
60225
|
}
|
|
60105
60226
|
);
|
|
@@ -60111,8 +60232,8 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
60111
60232
|
if (!requestId) return;
|
|
60112
60233
|
return handleRejectRef.current(requestId);
|
|
60113
60234
|
}, []);
|
|
60114
|
-
const storeRef =
|
|
60115
|
-
const globalApprovalStatusesRef =
|
|
60235
|
+
const storeRef = useRef85(createChatDialogStore());
|
|
60236
|
+
const globalApprovalStatusesRef = useRef85({});
|
|
60116
60237
|
const dialogKey = dialogId ?? DRAFT_DIALOG_KEY;
|
|
60117
60238
|
const { state, applyEvent, mutate } = useChatStreamReducer({
|
|
60118
60239
|
store: storeRef.current,
|
|
@@ -60168,15 +60289,15 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
60168
60289
|
},
|
|
60169
60290
|
[applyEvent]
|
|
60170
60291
|
);
|
|
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 =
|
|
60292
|
+
const [dialogs, setDialogs] = useState132([]);
|
|
60293
|
+
const [dialogsNextCursor, setDialogsNextCursor] = useState132(null);
|
|
60294
|
+
const [isDialogsLoading, setIsDialogsLoading] = useState132(false);
|
|
60295
|
+
const [dialogsError, setDialogsError] = useState132(false);
|
|
60296
|
+
const [isCreatingDialog, setIsCreatingDialog] = useState132(false);
|
|
60297
|
+
const [messagesNextCursor, setMessagesNextCursor] = useState132(null);
|
|
60298
|
+
const [isMessagesLoading, setIsMessagesLoading] = useState132(false);
|
|
60299
|
+
const [connectionState, setConnectionState] = useState132("connecting");
|
|
60300
|
+
const hasConnectedOnceRef = useRef85(false);
|
|
60180
60301
|
const {
|
|
60181
60302
|
processChunk: catchupProcessChunk,
|
|
60182
60303
|
catchUpChunks,
|
|
@@ -60189,7 +60310,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
60189
60310
|
onChunkReceived: (chunk) => processChunk(chunk),
|
|
60190
60311
|
fetchChunks
|
|
60191
60312
|
});
|
|
60192
|
-
const historyLoadSeqRef =
|
|
60313
|
+
const historyLoadSeqRef = useRef85(0);
|
|
60193
60314
|
const loadDialogHistory = useCallback59(
|
|
60194
60315
|
async (id, cursor) => {
|
|
60195
60316
|
if (!fetchDialogMessages) return;
|
|
@@ -60252,8 +60373,8 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
60252
60373
|
isBufferingActive
|
|
60253
60374
|
]
|
|
60254
60375
|
);
|
|
60255
|
-
const prevDialogIdRef =
|
|
60256
|
-
|
|
60376
|
+
const prevDialogIdRef = useRef85(void 0);
|
|
60377
|
+
useEffect102(() => {
|
|
60257
60378
|
if (prevDialogIdRef.current === dialogId) return;
|
|
60258
60379
|
prevDialogIdRef.current = dialogId;
|
|
60259
60380
|
historyLoadSeqRef.current += 1;
|
|
@@ -60266,7 +60387,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
60266
60387
|
if (!active || !dialogId) return;
|
|
60267
60388
|
void loadDialogHistory(dialogId);
|
|
60268
60389
|
}, [active, dialogId, dialogKey, loadDialogHistory]);
|
|
60269
|
-
|
|
60390
|
+
useEffect102(() => {
|
|
60270
60391
|
if (!active || !dialogId) return;
|
|
60271
60392
|
const store = storeRef.current;
|
|
60272
60393
|
store.mutate(dialogId, DEFAULT_DIALOG_SIDE, (r) => r.adjustAgentBusySuppression(1));
|
|
@@ -60329,14 +60450,14 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
60329
60450
|
})();
|
|
60330
60451
|
}
|
|
60331
60452
|
});
|
|
60332
|
-
|
|
60453
|
+
useEffect102(() => {
|
|
60333
60454
|
if (!active || !dialogId) {
|
|
60334
60455
|
setConnectionState("connected");
|
|
60335
60456
|
return;
|
|
60336
60457
|
}
|
|
60337
60458
|
setConnectionState("connecting");
|
|
60338
60459
|
}, [active, dialogId]);
|
|
60339
|
-
const initialDialogsLoadedRef =
|
|
60460
|
+
const initialDialogsLoadedRef = useRef85(false);
|
|
60340
60461
|
const loadDialogsPage = useCallback59(
|
|
60341
60462
|
async (cursor) => {
|
|
60342
60463
|
if (!fetchDialogs) return;
|
|
@@ -60368,7 +60489,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
60368
60489
|
const reloadDialogs = useCallback59(() => {
|
|
60369
60490
|
void loadDialogsPage();
|
|
60370
60491
|
}, [loadDialogsPage]);
|
|
60371
|
-
|
|
60492
|
+
useEffect102(() => {
|
|
60372
60493
|
if (!fetchDialogs) return;
|
|
60373
60494
|
if (!active) return;
|
|
60374
60495
|
if (initialDialogsLoadedRef.current) return;
|
|
@@ -60601,7 +60722,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
60601
60722
|
}
|
|
60602
60723
|
|
|
60603
60724
|
// src/components/chat/hooks/use-unified-chat.ts
|
|
60604
|
-
import { useCallback as useCallback60, useMemo as useMemo56, useRef as
|
|
60725
|
+
import { useCallback as useCallback60, useMemo as useMemo56, useRef as useRef86 } from "react";
|
|
60605
60726
|
var EMPTY_SSE_OPTIONS = {};
|
|
60606
60727
|
function createDisabledNatsConfig() {
|
|
60607
60728
|
return {
|
|
@@ -60616,7 +60737,7 @@ function createDisabledNatsConfig() {
|
|
|
60616
60737
|
}
|
|
60617
60738
|
function useUnifiedChat(options) {
|
|
60618
60739
|
const { modes, activeMode, mingoStateOverride } = options;
|
|
60619
|
-
const disabledNatsRef =
|
|
60740
|
+
const disabledNatsRef = useRef86(null);
|
|
60620
60741
|
if (disabledNatsRef.current === null) {
|
|
60621
60742
|
disabledNatsRef.current = createDisabledNatsConfig();
|
|
60622
60743
|
}
|
|
@@ -60630,7 +60751,7 @@ function useUnifiedChat(options) {
|
|
|
60630
60751
|
{ active: natsActive }
|
|
60631
60752
|
);
|
|
60632
60753
|
const activeState = activeMode === "guide" ? sseState : mingoStateOverride ?? natsState;
|
|
60633
|
-
const activeStateRef =
|
|
60754
|
+
const activeStateRef = useRef86(activeState);
|
|
60634
60755
|
activeStateRef.current = activeState;
|
|
60635
60756
|
const stopMessage = useCallback60(() => activeStateRef.current.stopMessage(), []);
|
|
60636
60757
|
const clearMessages = useCallback60(
|
|
@@ -61032,16 +61153,16 @@ function buildStreamFrames(messages) {
|
|
|
61032
61153
|
|
|
61033
61154
|
// src/components/chat/embeddable-chat.tsx
|
|
61034
61155
|
init_cn();
|
|
61035
|
-
import
|
|
61156
|
+
import React151, { useCallback as useCallback62, useEffect as useEffect103, useImperativeHandle as useImperativeHandle5, useMemo as useMemo58, useRef as useRef88, useState as useState134 } from "react";
|
|
61036
61157
|
import * as DialogPrimitive5 from "@radix-ui/react-dialog";
|
|
61037
61158
|
import { usePreventScroll as usePreventScroll5 } from "@react-aria/overlays";
|
|
61038
61159
|
import { isIOS } from "@react-aria/utils";
|
|
61039
61160
|
|
|
61040
61161
|
// node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
61041
|
-
import * as
|
|
61162
|
+
import * as React150 from "react";
|
|
61042
61163
|
|
|
61043
61164
|
// node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
61044
|
-
import * as
|
|
61165
|
+
import * as React149 from "react";
|
|
61045
61166
|
import * as ReactDOM2 from "react-dom";
|
|
61046
61167
|
import { createSlot } from "@radix-ui/react-slot";
|
|
61047
61168
|
import { jsx as jsx399 } from "react/jsx-runtime";
|
|
@@ -61068,7 +61189,7 @@ var NODES = [
|
|
|
61068
61189
|
];
|
|
61069
61190
|
var Primitive = NODES.reduce((primitive, node) => {
|
|
61070
61191
|
const Slot2 = createSlot(`Primitive.${node}`);
|
|
61071
|
-
const Node2 =
|
|
61192
|
+
const Node2 = React149.forwardRef((props, forwardedRef) => {
|
|
61072
61193
|
const { asChild, ...primitiveProps } = props;
|
|
61073
61194
|
const Comp = asChild ? Slot2 : node;
|
|
61074
61195
|
if (typeof window !== "undefined") {
|
|
@@ -61101,7 +61222,7 @@ var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
|
61101
61222
|
whiteSpace: "nowrap",
|
|
61102
61223
|
wordWrap: "normal"
|
|
61103
61224
|
});
|
|
61104
|
-
var VisuallyHidden = /* @__PURE__ */
|
|
61225
|
+
var VisuallyHidden = /* @__PURE__ */ React150.forwardRef(
|
|
61105
61226
|
/* @__PURE__ */ __name4(function VisuallyHidden2(props, forwardedRef) {
|
|
61106
61227
|
return /* @__PURE__ */ jsx400(
|
|
61107
61228
|
Primitive.span,
|
|
@@ -61119,7 +61240,7 @@ init_button2();
|
|
|
61119
61240
|
import { FileText as FileText8, MessageSquare as MessageSquare3 } from "lucide-react";
|
|
61120
61241
|
|
|
61121
61242
|
// src/components/chat/hooks/use-chat-dialog-manager.ts
|
|
61122
|
-
import { useCallback as useCallback61, useMemo as useMemo57, useRef as
|
|
61243
|
+
import { useCallback as useCallback61, useMemo as useMemo57, useRef as useRef87, useState as useState133 } from "react";
|
|
61123
61244
|
function useChatDialogManager({
|
|
61124
61245
|
dialogs,
|
|
61125
61246
|
activeDialogId,
|
|
@@ -61130,8 +61251,8 @@ function useChatDialogManager({
|
|
|
61130
61251
|
fetchArchivedDialogs,
|
|
61131
61252
|
unarchiveDialog
|
|
61132
61253
|
}) {
|
|
61133
|
-
const [renameTarget, setRenameTarget] =
|
|
61134
|
-
const [archiveTarget, setArchiveTarget] =
|
|
61254
|
+
const [renameTarget, setRenameTarget] = useState133(null);
|
|
61255
|
+
const [archiveTarget, setArchiveTarget] = useState133(null);
|
|
61135
61256
|
const handleConfirmRename = useCallback61(
|
|
61136
61257
|
(name) => {
|
|
61137
61258
|
if (renameTarget) void renameDialog(renameTarget.id, name);
|
|
@@ -61154,12 +61275,12 @@ function useChatDialogManager({
|
|
|
61154
61275
|
}
|
|
61155
61276
|
setArchiveTarget(null);
|
|
61156
61277
|
}, [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 =
|
|
61278
|
+
const [archiveOpen, setArchiveOpen] = useState133(false);
|
|
61279
|
+
const [archivedDialogs, setArchivedDialogs] = useState133([]);
|
|
61280
|
+
const [archivedCursor, setArchivedCursor] = useState133(null);
|
|
61281
|
+
const [archivedLoading, setArchivedLoading] = useState133(false);
|
|
61282
|
+
const [archivedPending, setArchivedPending] = useState133(false);
|
|
61283
|
+
const archivedRequestIdRef = useRef87(0);
|
|
61163
61284
|
const loadArchivedPage = useCallback61(
|
|
61164
61285
|
async (cursor) => {
|
|
61165
61286
|
if (!fetchArchivedDialogs) return;
|
|
@@ -61200,10 +61321,10 @@ function useChatDialogManager({
|
|
|
61200
61321
|
void loadArchivedPage();
|
|
61201
61322
|
}, [loadArchivedPage]);
|
|
61202
61323
|
const closeArchive = useCallback61(() => setArchiveOpen(false), []);
|
|
61203
|
-
const [viewingArchivedId, setViewingArchivedId] =
|
|
61324
|
+
const [viewingArchivedId, setViewingArchivedId] = useState133(
|
|
61204
61325
|
null
|
|
61205
61326
|
);
|
|
61206
|
-
const [openingDialogId, setOpeningDialogId] =
|
|
61327
|
+
const [openingDialogId, setOpeningDialogId] = useState133(null);
|
|
61207
61328
|
const handleSelectDialog = useCallback61(
|
|
61208
61329
|
(id) => {
|
|
61209
61330
|
setViewingArchivedId(null);
|
|
@@ -61222,7 +61343,7 @@ function useChatDialogManager({
|
|
|
61222
61343
|
},
|
|
61223
61344
|
[selectDialog]
|
|
61224
61345
|
);
|
|
61225
|
-
const [restoreTarget, setRestoreTarget] =
|
|
61346
|
+
const [restoreTarget, setRestoreTarget] = useState133(null);
|
|
61226
61347
|
const handleConfirmRestore = useCallback61(async () => {
|
|
61227
61348
|
if (restoreTarget) {
|
|
61228
61349
|
try {
|
|
@@ -61315,9 +61436,9 @@ var SPLIT_MIN_WIDTH = HISTORY_RAIL_WIDTH + CHAT_BLOCK_MIN_WIDTH;
|
|
|
61315
61436
|
var RAIL_COLLAPSED_STORAGE_KEY = "mingo-chat-history-collapsed";
|
|
61316
61437
|
var RAIL_ANIM_MS = 320;
|
|
61317
61438
|
function useRailPresence(open) {
|
|
61318
|
-
const [mounted, setMounted] =
|
|
61319
|
-
const [active, setActive] =
|
|
61320
|
-
|
|
61439
|
+
const [mounted, setMounted] = useState134(open);
|
|
61440
|
+
const [active, setActive] = useState134(false);
|
|
61441
|
+
useEffect103(() => {
|
|
61321
61442
|
if (open) {
|
|
61322
61443
|
setMounted(true);
|
|
61323
61444
|
let raf2 = 0;
|
|
@@ -61535,7 +61656,7 @@ function SourceChips({
|
|
|
61535
61656
|
onClose,
|
|
61536
61657
|
onDiscuss
|
|
61537
61658
|
}) {
|
|
61538
|
-
const [expanded, setExpanded] =
|
|
61659
|
+
const [expanded, setExpanded] = useState134(false);
|
|
61539
61660
|
if (cited.length === 0) {
|
|
61540
61661
|
const fallback = uncited.slice(0, FALLBACK_TOP_RETRIEVED);
|
|
61541
61662
|
if (fallback.length === 0) return null;
|
|
@@ -61600,7 +61721,7 @@ function SourceChips({
|
|
|
61600
61721
|
)
|
|
61601
61722
|
] });
|
|
61602
61723
|
}
|
|
61603
|
-
var EmbeddableChat =
|
|
61724
|
+
var EmbeddableChat = React151.forwardRef(function EmbeddableChat2(props, ref) {
|
|
61604
61725
|
return /* @__PURE__ */ jsx401(EmbeddableChatInner, { ...props, handleRef: ref });
|
|
61605
61726
|
});
|
|
61606
61727
|
function EmbeddableChatInner({
|
|
@@ -61645,7 +61766,7 @@ function EmbeddableChatInner({
|
|
|
61645
61766
|
const commandsUrl = runtime.endpoints.commandsUrl;
|
|
61646
61767
|
const { attachmentsEnabled, user: identityUser } = useChatIdentity();
|
|
61647
61768
|
const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
|
|
61648
|
-
|
|
61769
|
+
useEffect103(() => {
|
|
61649
61770
|
if (process.env.NODE_ENV !== "production") {
|
|
61650
61771
|
const hasOpen = open !== void 0;
|
|
61651
61772
|
const hasHandler = onOpenChange !== void 0;
|
|
@@ -61661,13 +61782,13 @@ function EmbeddableChatInner({
|
|
|
61661
61782
|
defaultProp: defaultOpen ?? false,
|
|
61662
61783
|
onChange: onOpenChange
|
|
61663
61784
|
});
|
|
61664
|
-
const [autoFocusInput] =
|
|
61785
|
+
const [autoFocusInput] = useState134(() => {
|
|
61665
61786
|
if (typeof window === "undefined") return false;
|
|
61666
61787
|
return !window.matchMedia("(pointer: coarse)").matches;
|
|
61667
61788
|
});
|
|
61668
61789
|
usePreventScroll5({ isDisabled: !isOpen || shellLess });
|
|
61669
|
-
const navigatingAwayRef =
|
|
61670
|
-
|
|
61790
|
+
const navigatingAwayRef = useRef88(false);
|
|
61791
|
+
useEffect103(() => {
|
|
61671
61792
|
if (!isOpen) return;
|
|
61672
61793
|
if (shellLess) return;
|
|
61673
61794
|
if (typeof window === "undefined") return;
|
|
@@ -61693,8 +61814,8 @@ function EmbeddableChatInner({
|
|
|
61693
61814
|
window.scrollTo(0, scrollY);
|
|
61694
61815
|
};
|
|
61695
61816
|
}, [isOpen, shellLess]);
|
|
61696
|
-
const chatInputRef =
|
|
61697
|
-
const [quickActionPreview, setQuickActionPreview] =
|
|
61817
|
+
const chatInputRef = useRef88(null);
|
|
61818
|
+
const [quickActionPreview, setQuickActionPreview] = useState134(null);
|
|
61698
61819
|
const slashCommandsProp = useMemo58(
|
|
61699
61820
|
() => ({
|
|
61700
61821
|
fetchCommands: (prefix, signal) => fetchSlashCommands(prefix, signal, commandsUrl),
|
|
@@ -61739,7 +61860,7 @@ function EmbeddableChatInner({
|
|
|
61739
61860
|
}, [mingoState, mingoDialogCapabilities, effectiveModes]);
|
|
61740
61861
|
const hasMingoMode = !!effectiveModes.mingo || !!mingoState;
|
|
61741
61862
|
const initialActiveMode = controlledActiveMode ?? defaultActiveMode ?? (effectiveModes.guide ? "guide" : "mingo");
|
|
61742
|
-
const [uncontrolledActiveMode, setUncontrolledActiveMode] =
|
|
61863
|
+
const [uncontrolledActiveMode, setUncontrolledActiveMode] = useState134(initialActiveMode);
|
|
61743
61864
|
const activeMode = controlledActiveMode ?? uncontrolledActiveMode;
|
|
61744
61865
|
const handleActiveModeChange = useCallback62(
|
|
61745
61866
|
(next) => {
|
|
@@ -61801,8 +61922,8 @@ function EmbeddableChatInner({
|
|
|
61801
61922
|
hasMoreMessages,
|
|
61802
61923
|
loadMoreMessages
|
|
61803
61924
|
} = useUnifiedChat({ modes: effectiveModes, activeMode, mingoStateOverride: mingoState });
|
|
61804
|
-
const guidePromptSentRef =
|
|
61805
|
-
|
|
61925
|
+
const guidePromptSentRef = useRef88(false);
|
|
61926
|
+
useEffect103(() => {
|
|
61806
61927
|
if (!guidePendingPrompt) {
|
|
61807
61928
|
guidePromptSentRef.current = false;
|
|
61808
61929
|
return;
|
|
@@ -61823,15 +61944,15 @@ function EmbeddableChatInner({
|
|
|
61823
61944
|
const { panelRef: galleryPanelRef, modal: galleryModal } = useChatAttachmentImageGallery();
|
|
61824
61945
|
const contextMaxItems = contextPicker?.maxItems ?? 10;
|
|
61825
61946
|
const contextPickerForMode = activeMode === "mingo" ? contextPicker : void 0;
|
|
61826
|
-
const [contextItems, setContextItems] =
|
|
61827
|
-
const [contextPickerOpen, setContextPickerOpen] =
|
|
61828
|
-
const [mentionQuery, setMentionQuery] =
|
|
61829
|
-
const mentionActiveRef =
|
|
61830
|
-
|
|
61947
|
+
const [contextItems, setContextItems] = useState134([]);
|
|
61948
|
+
const [contextPickerOpen, setContextPickerOpen] = useState134(false);
|
|
61949
|
+
const [mentionQuery, setMentionQuery] = useState134(null);
|
|
61950
|
+
const mentionActiveRef = useRef88(false);
|
|
61951
|
+
useEffect103(() => {
|
|
61831
61952
|
mentionActiveRef.current = mentionQuery !== null;
|
|
61832
61953
|
}, [mentionQuery]);
|
|
61833
|
-
const mentionKeysRef =
|
|
61834
|
-
|
|
61954
|
+
const mentionKeysRef = useRef88(/* @__PURE__ */ new Set());
|
|
61955
|
+
useEffect103(() => {
|
|
61835
61956
|
setContextItems([]);
|
|
61836
61957
|
setMentionQuery(null);
|
|
61837
61958
|
mentionKeysRef.current.clear();
|
|
@@ -61927,7 +62048,7 @@ function EmbeddableChatInner({
|
|
|
61927
62048
|
() => effectiveAssistantIcon ? /* @__PURE__ */ jsx401(EntityIcon, { icon: effectiveAssistantIcon, size: 24 }) : /* @__PURE__ */ jsx401(MingoIcon, { className: "h-6 w-6", cornerColor: "var(--ods-flamingo-cyan-base)" }),
|
|
61928
62049
|
[effectiveAssistantIcon]
|
|
61929
62050
|
);
|
|
61930
|
-
const timestampCacheRef =
|
|
62051
|
+
const timestampCacheRef = useRef88(/* @__PURE__ */ new Map());
|
|
61931
62052
|
const guideUserName = activeMode === "guide" ? [identityUser?.firstName, identityUser?.lastName].filter(Boolean).join(" ").trim() || identityUser?.name?.trim() || void 0 : void 0;
|
|
61932
62053
|
const guideUserAvatar = activeMode === "guide" ? identityUser?.avatarUrl?.trim() || void 0 : void 0;
|
|
61933
62054
|
const messages = useMemo58(() => {
|
|
@@ -62065,7 +62186,7 @@ function EmbeddableChatInner({
|
|
|
62065
62186
|
});
|
|
62066
62187
|
const handleOpen = useCallback62(() => setIsOpen(true), [setIsOpen]);
|
|
62067
62188
|
useCloseOnNavigation(handleNavigationClose, null);
|
|
62068
|
-
|
|
62189
|
+
useEffect103(() => {
|
|
62069
62190
|
const handler = (e) => {
|
|
62070
62191
|
const detail = e.detail;
|
|
62071
62192
|
if (!detail || detail.source !== source) return;
|
|
@@ -62075,7 +62196,7 @@ function EmbeddableChatInner({
|
|
|
62075
62196
|
window.addEventListener("ask-ai:open-with-ref", handler);
|
|
62076
62197
|
return () => window.removeEventListener("ask-ai:open-with-ref", handler);
|
|
62077
62198
|
}, [source, discussRef, setIsOpen]);
|
|
62078
|
-
|
|
62199
|
+
useEffect103(() => {
|
|
62079
62200
|
const handler = (e) => {
|
|
62080
62201
|
const detail = e.detail;
|
|
62081
62202
|
if (!detail || detail.source !== source) return;
|
|
@@ -62092,7 +62213,7 @@ function EmbeddableChatInner({
|
|
|
62092
62213
|
const contentViewKey = hasConversation ? "conversation" : activeMode;
|
|
62093
62214
|
const isGuideEmpty = !hasConversation && activeMode === "guide";
|
|
62094
62215
|
const isQuickActionEmpty = !hasConversation && (activeMode === "guide" || activeMode === "mingo");
|
|
62095
|
-
|
|
62216
|
+
useEffect103(() => {
|
|
62096
62217
|
if (!isQuickActionEmpty) setQuickActionPreview(null);
|
|
62097
62218
|
}, [isQuickActionEmpty]);
|
|
62098
62219
|
const guideCanReturnToMingo = isGuideEmpty && hasMingoMode;
|
|
@@ -62134,11 +62255,11 @@ function EmbeddableChatInner({
|
|
|
62134
62255
|
const uncited = sources.filter((s) => !seenOrder.has(s.index));
|
|
62135
62256
|
return { cited, uncited };
|
|
62136
62257
|
}, [lastAssistantMsg, chatLoading]);
|
|
62137
|
-
const [portalHost, setPortalHost] =
|
|
62138
|
-
const [panelBoundary, setPanelBoundary] =
|
|
62139
|
-
const [panelWidth, setPanelWidth] =
|
|
62140
|
-
const panelMeasureRef =
|
|
62141
|
-
|
|
62258
|
+
const [portalHost, setPortalHost] = useState134(null);
|
|
62259
|
+
const [panelBoundary, setPanelBoundary] = useState134(null);
|
|
62260
|
+
const [panelWidth, setPanelWidth] = useState134(0);
|
|
62261
|
+
const panelMeasureRef = useRef88(null);
|
|
62262
|
+
useEffect103(() => {
|
|
62142
62263
|
const el = panelMeasureRef.current;
|
|
62143
62264
|
if (!el || typeof ResizeObserver === "undefined") return;
|
|
62144
62265
|
const ro = new ResizeObserver((entries) => {
|
|
@@ -62153,8 +62274,8 @@ function EmbeddableChatInner({
|
|
|
62153
62274
|
panelMeasureRef.current = node;
|
|
62154
62275
|
setPanelBoundary(node);
|
|
62155
62276
|
}, []);
|
|
62156
|
-
const [railCollapsed, setRailCollapsed] =
|
|
62157
|
-
|
|
62277
|
+
const [railCollapsed, setRailCollapsed] = useState134(false);
|
|
62278
|
+
useEffect103(() => {
|
|
62158
62279
|
try {
|
|
62159
62280
|
if (window.localStorage.getItem(RAIL_COLLAPSED_STORAGE_KEY) === "1")
|
|
62160
62281
|
setRailCollapsed(true);
|
|
@@ -62171,15 +62292,15 @@ function EmbeddableChatInner({
|
|
|
62171
62292
|
return next;
|
|
62172
62293
|
});
|
|
62173
62294
|
}, []);
|
|
62174
|
-
const [railSearchOpen, setRailSearchOpen] =
|
|
62295
|
+
const [railSearchOpen, setRailSearchOpen] = useState134(false);
|
|
62175
62296
|
const splitEligible = activeMode === "mingo";
|
|
62176
62297
|
const canSplit = panelWidth >= SPLIT_MIN_WIDTH;
|
|
62177
62298
|
const wideMingo = splitEligible && canSplit && !previewMode;
|
|
62178
62299
|
const splitActive = wideMingo && !railCollapsed;
|
|
62179
62300
|
const railPresence = useRailPresence(splitActive);
|
|
62180
62301
|
const showWideHeader = wideMingo || railPresence.mounted;
|
|
62181
|
-
const [composeOpen, setComposeOpen] =
|
|
62182
|
-
|
|
62302
|
+
const [composeOpen, setComposeOpen] = useState134(false);
|
|
62303
|
+
useEffect103(() => {
|
|
62183
62304
|
if (hasConversation) setComposeOpen(false);
|
|
62184
62305
|
}, [hasConversation]);
|
|
62185
62306
|
const isMingoMode = activeMode === "mingo";
|
|
@@ -63045,12 +63166,7 @@ export {
|
|
|
63045
63166
|
LinkedInEmbedClient,
|
|
63046
63167
|
OGLinkErrorBoundary,
|
|
63047
63168
|
OGLinkPreview,
|
|
63048
|
-
|
|
63049
|
-
toGoogleSheetsOriginalUrl,
|
|
63050
|
-
toFigmaEmbedUrl,
|
|
63051
|
-
isFigmaSlidesUrl,
|
|
63052
|
-
toFigmaOriginalUrl,
|
|
63053
|
-
toClaudeEmbedUrl,
|
|
63169
|
+
FullscreenSwitchController,
|
|
63054
63170
|
EmbedIframe,
|
|
63055
63171
|
EmbedViewerFrame,
|
|
63056
63172
|
FigmaEmbed,
|
|
@@ -63874,4 +63990,4 @@ export {
|
|
|
63874
63990
|
LogsList,
|
|
63875
63991
|
assets
|
|
63876
63992
|
};
|
|
63877
|
-
//# sourceMappingURL=chunk-
|
|
63993
|
+
//# sourceMappingURL=chunk-5NVVVIHJ.js.map
|