@flamingo-stack/openframe-frontend-core 0.0.449 → 0.0.450
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-DJP5HYFG.cjs → chunk-26JSJMMZ.cjs} +7 -7
- package/dist/{chunk-DJP5HYFG.cjs.map → chunk-26JSJMMZ.cjs.map} +1 -1
- package/dist/{chunk-NPBTNWRA.js → chunk-3ITY2LBM.js} +4 -4
- package/dist/{chunk-MWRFPLNB.js → chunk-4SZDO3TE.js} +3 -3
- package/dist/{chunk-LWT6G75Q.js → chunk-4VSTLJDO.js} +2 -2
- package/dist/{chunk-DRKQNXSZ.cjs → chunk-5HW5HMNF.cjs} +5 -5
- package/dist/{chunk-DRKQNXSZ.cjs.map → chunk-5HW5HMNF.cjs.map} +1 -1
- package/dist/{chunk-KKJRBMG3.cjs → chunk-5OY7HYII.cjs} +73 -73
- package/dist/{chunk-KKJRBMG3.cjs.map → chunk-5OY7HYII.cjs.map} +1 -1
- package/dist/{chunk-WYPROXL4.cjs → chunk-6GJKSYM2.cjs} +73 -73
- package/dist/{chunk-WYPROXL4.cjs.map → chunk-6GJKSYM2.cjs.map} +1 -1
- package/dist/{chunk-6TS4AIDX.cjs → chunk-6RA4NRBA.cjs} +15 -15
- package/dist/{chunk-6TS4AIDX.cjs.map → chunk-6RA4NRBA.cjs.map} +1 -1
- package/dist/{chunk-X754WDWO.cjs → chunk-76EN3GEH.cjs} +40 -40
- package/dist/{chunk-X754WDWO.cjs.map → chunk-76EN3GEH.cjs.map} +1 -1
- package/dist/{chunk-YSNMV53O.js → chunk-CM5XKHHS.js} +6 -6
- package/dist/{chunk-47AMTR2S.cjs → chunk-DQ5U6DCR.cjs} +18 -18
- package/dist/{chunk-47AMTR2S.cjs.map → chunk-DQ5U6DCR.cjs.map} +1 -1
- package/dist/{chunk-YHNBJ3F3.js → chunk-EQWE64RJ.js} +2 -2
- package/dist/{chunk-5SJGFLL2.js → chunk-HXCQHMS5.js} +6386 -6032
- package/dist/chunk-HXCQHMS5.js.map +1 -0
- package/dist/{chunk-VSWFYFIG.js → chunk-HYIHXXF3.js} +5 -5
- package/dist/{chunk-AZKVNRZP.cjs → chunk-J5BYYZVM.cjs} +32 -32
- package/dist/{chunk-AZKVNRZP.cjs.map → chunk-J5BYYZVM.cjs.map} +1 -1
- package/dist/{chunk-JAASDJOF.js → chunk-K3GXIGN6.js} +5 -5
- package/dist/{chunk-UNQVTGVG.js → chunk-M3AKWFAO.js} +2 -2
- package/dist/{chunk-TKGCTDQY.js → chunk-MLFFBQ5B.js} +180 -87
- package/dist/chunk-MLFFBQ5B.js.map +1 -0
- package/dist/{chunk-XLFAFH2B.js → chunk-N53FC732.js} +2 -2
- package/dist/{chunk-H56AEHFC.cjs → chunk-N5M72LJX.cjs} +1620 -1266
- package/dist/chunk-N5M72LJX.cjs.map +1 -0
- package/dist/{chunk-4IMXFDRI.js → chunk-PCW2TRZ4.js} +3 -3
- package/dist/{chunk-AN7MCJTV.cjs → chunk-QF3NQW7C.cjs} +122 -29
- package/dist/chunk-QF3NQW7C.cjs.map +1 -0
- package/dist/{chunk-EOFENGSZ.cjs → chunk-ROBGJH52.cjs} +12 -12
- package/dist/{chunk-EOFENGSZ.cjs.map → chunk-ROBGJH52.cjs.map} +1 -1
- package/dist/{chunk-HQ7S6JG5.js → chunk-RQHHACP2.js} +3 -3
- package/dist/{chunk-ROCJMSJI.cjs → chunk-UPRY4I63.cjs} +3 -3
- package/dist/{chunk-ROCJMSJI.cjs.map → chunk-UPRY4I63.cjs.map} +1 -1
- package/dist/{chunk-LQTX7EJS.cjs → chunk-VLDZ4363.cjs} +29 -29
- package/dist/{chunk-LQTX7EJS.cjs.map → chunk-VLDZ4363.cjs.map} +1 -1
- package/dist/{chunk-BSBWBQ7M.js → chunk-VUDZOCPW.js} +6 -6
- package/dist/{chunk-4S4RR7XC.cjs → chunk-XITG5ICQ.cjs} +40 -40
- package/dist/{chunk-4S4RR7XC.cjs.map → chunk-XITG5ICQ.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +9 -9
- package/dist/components/case-studies/index.js +3 -3
- package/dist/components/chat/chat-quick-action-row.d.ts +26 -1
- package/dist/components/chat/chat-quick-action-row.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +15 -3
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.d.ts +1 -0
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +14 -2
- package/dist/components/chat/quick-action-chip.d.ts +45 -4
- package/dist/components/chat/quick-action-chip.d.ts.map +1 -1
- package/dist/components/chat/quick-action-marquee.d.ts +24 -9
- package/dist/components/chat/quick-action-marquee.d.ts.map +1 -1
- package/dist/components/chat/quick-action-wall.d.ts +96 -0
- package/dist/components/chat/quick-action-wall.d.ts.map +1 -0
- package/dist/components/contact/index.cjs +4 -4
- package/dist/components/contact/index.js +3 -3
- package/dist/components/content-loading-container.d.ts +1 -1
- package/dist/components/docs/index.cjs +6 -6
- package/dist/components/docs/index.js +5 -5
- package/dist/components/embeds/index.cjs +4 -4
- package/dist/components/embeds/index.js +3 -3
- package/dist/components/faq/index.cjs +5 -5
- package/dist/components/faq/index.js +4 -4
- package/dist/components/features/cards-strip.d.ts.map +1 -1
- package/dist/components/features/index.cjs +3 -3
- package/dist/components/features/index.js +2 -2
- package/dist/components/form.d.ts +1 -1
- package/dist/components/form.d.ts.map +1 -1
- package/dist/components/help-center-pages/index.cjs +22 -22
- package/dist/components/help-center-pages/index.js +13 -13
- package/dist/components/index.cjs +159 -135
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +35 -11
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/index.cjs +3 -3
- package/dist/components/navigation/index.js +2 -2
- package/dist/components/onboarding-guides/index.cjs +7 -7
- package/dist/components/onboarding-guides/index.js +6 -6
- package/dist/components/related-content/index.cjs +5 -5
- package/dist/components/related-content/index.js +4 -4
- package/dist/components/tickets/index.cjs +6 -6
- package/dist/components/tickets/index.js +5 -5
- package/dist/components/ui/index.cjs +27 -3
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +26 -2
- package/dist/components/ui/marquee-wall.d.ts +159 -0
- package/dist/components/ui/marquee-wall.d.ts.map +1 -0
- package/dist/hooks/index.cjs +6 -2
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.js +5 -1
- package/dist/hooks/ui/index.d.ts +2 -0
- package/dist/hooks/ui/index.d.ts.map +1 -1
- package/dist/hooks/ui/use-marquee-engine.d.ts +73 -0
- package/dist/hooks/ui/use-marquee-engine.d.ts.map +1 -0
- package/dist/hooks/ui/use-suppress-clone-focus.d.ts +24 -0
- package/dist/hooks/ui/use-suppress-clone-focus.d.ts.map +1 -0
- package/dist/index.cjs +31 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +30 -2
- package/dist/tailwind.config.cjs +1 -8
- package/dist/tailwind.config.cjs.map +1 -1
- package/dist/tailwind.config.js +1 -8
- package/dist/tailwind.config.js.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/chat-quick-action-row.tsx +47 -3
- package/src/components/chat/index.ts +1 -0
- package/src/components/chat/quick-action-chip.tsx +81 -13
- package/src/components/chat/quick-action-marquee.tsx +54 -47
- package/src/components/chat/quick-action-wall.tsx +247 -0
- package/src/components/features/cards-strip.tsx +88 -158
- package/src/components/ui/index.ts +1 -0
- package/src/components/ui/marquee-wall.tsx +522 -0
- package/src/hooks/ui/index.ts +2 -0
- package/src/hooks/ui/use-marquee-engine.ts +158 -0
- package/src/hooks/ui/use-suppress-clone-focus.ts +61 -0
- package/src/stories/MarqueeWall.stories.tsx +132 -0
- package/src/stories/QuickActionMarquee.stories.tsx +8 -7
- package/src/stories/QuickActionWall.stories.tsx +116 -0
- package/tailwind.config.ts +0 -7
- package/dist/chunk-5SJGFLL2.js.map +0 -1
- package/dist/chunk-AN7MCJTV.cjs.map +0 -1
- package/dist/chunk-H56AEHFC.cjs.map +0 -1
- package/dist/chunk-TKGCTDQY.js.map +0 -1
- /package/dist/{chunk-NPBTNWRA.js.map → chunk-3ITY2LBM.js.map} +0 -0
- /package/dist/{chunk-MWRFPLNB.js.map → chunk-4SZDO3TE.js.map} +0 -0
- /package/dist/{chunk-LWT6G75Q.js.map → chunk-4VSTLJDO.js.map} +0 -0
- /package/dist/{chunk-YSNMV53O.js.map → chunk-CM5XKHHS.js.map} +0 -0
- /package/dist/{chunk-YHNBJ3F3.js.map → chunk-EQWE64RJ.js.map} +0 -0
- /package/dist/{chunk-VSWFYFIG.js.map → chunk-HYIHXXF3.js.map} +0 -0
- /package/dist/{chunk-JAASDJOF.js.map → chunk-K3GXIGN6.js.map} +0 -0
- /package/dist/{chunk-UNQVTGVG.js.map → chunk-M3AKWFAO.js.map} +0 -0
- /package/dist/{chunk-XLFAFH2B.js.map → chunk-N53FC732.js.map} +0 -0
- /package/dist/{chunk-4IMXFDRI.js.map → chunk-PCW2TRZ4.js.map} +0 -0
- /package/dist/{chunk-HQ7S6JG5.js.map → chunk-RQHHACP2.js.map} +0 -0
- /package/dist/{chunk-BSBWBQ7M.js.map → chunk-VUDZOCPW.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
useSelfFetch
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EQWE64RJ.js";
|
|
5
5
|
import {
|
|
6
6
|
BlogCard,
|
|
7
7
|
BlogCardSkeleton,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
getContentRefLabelOrTitleCase,
|
|
34
34
|
init_pagination,
|
|
35
35
|
orderContentRefTypes
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-HXCQHMS5.js";
|
|
37
37
|
|
|
38
38
|
// src/components/related-content/related-content-section.tsx
|
|
39
39
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
@@ -359,4 +359,4 @@ export {
|
|
|
359
359
|
GROUP_PAGE_SIZE,
|
|
360
360
|
RelatedContentSection
|
|
361
361
|
};
|
|
362
|
-
//# sourceMappingURL=chunk-
|
|
362
|
+
//# sourceMappingURL=chunk-PCW2TRZ4.js.map
|
|
@@ -598,6 +598,71 @@ function useLocalStorage(key, initialValue) {
|
|
|
598
598
|
return [storedValue, setValue];
|
|
599
599
|
}
|
|
600
600
|
|
|
601
|
+
// src/hooks/ui/use-marquee-engine.ts
|
|
602
|
+
|
|
603
|
+
var RESYNC_EPSILON = 1.5;
|
|
604
|
+
function useMarqueeEngine(options) {
|
|
605
|
+
const posRef = _react.useRef.call(void 0, 0);
|
|
606
|
+
const glideRemainingRef = _react.useRef.call(void 0, 0);
|
|
607
|
+
const speedEnvRef = _react.useRef.call(void 0, 0);
|
|
608
|
+
const optsRef = _react.useRef.call(void 0, options);
|
|
609
|
+
optsRef.current = options;
|
|
610
|
+
const wrap = _react.useCallback.call(void 0, (pos) => {
|
|
611
|
+
const half = optsRef.current.getWrapSize();
|
|
612
|
+
if (half <= 0) return pos;
|
|
613
|
+
const min = _nullishCoalesce(_optionalChain([optsRef, 'access', _8 => _8.current, 'access', _9 => _9.getWrapMin, 'optionalCall', _10 => _10()]), () => ( 0));
|
|
614
|
+
while (pos >= min + half) pos -= half;
|
|
615
|
+
while (pos < min) pos += half;
|
|
616
|
+
return pos;
|
|
617
|
+
}, []);
|
|
618
|
+
const glideBy = _react.useCallback.call(void 0, (px) => {
|
|
619
|
+
glideRemainingRef.current += px;
|
|
620
|
+
}, []);
|
|
621
|
+
const active = options.active;
|
|
622
|
+
_react.useEffect.call(void 0, () => {
|
|
623
|
+
if (!active) return;
|
|
624
|
+
let raf = 0;
|
|
625
|
+
let last = performance.now();
|
|
626
|
+
const readBack = optsRef.current.readBack;
|
|
627
|
+
if (readBack) posRef.current = readBack();
|
|
628
|
+
const tick = (now) => {
|
|
629
|
+
const opts = optsRef.current;
|
|
630
|
+
const dt = Math.min(now - last, 100) / 1e3;
|
|
631
|
+
last = now;
|
|
632
|
+
const paused = opts.isPaused(now);
|
|
633
|
+
const targetSpeed = paused ? 0 : opts.speed;
|
|
634
|
+
speedEnvRef.current += (targetSpeed - speedEnvRef.current) * Math.min(1, dt / 0.25);
|
|
635
|
+
if (targetSpeed === 0 && speedEnvRef.current < 0.5) speedEnvRef.current = 0;
|
|
636
|
+
const external = opts.readBack ? opts.readBack() : null;
|
|
637
|
+
const resync = () => {
|
|
638
|
+
if (external !== null && Math.abs(external - posRef.current) > RESYNC_EPSILON) {
|
|
639
|
+
posRef.current = external;
|
|
640
|
+
}
|
|
641
|
+
};
|
|
642
|
+
const glide = glideRemainingRef.current;
|
|
643
|
+
if (glide !== 0) {
|
|
644
|
+
resync();
|
|
645
|
+
const speed = Math.max(Math.abs(glide) * 6, 240);
|
|
646
|
+
const step = Math.sign(glide) * Math.min(Math.abs(glide), speed * dt);
|
|
647
|
+
glideRemainingRef.current = Math.abs(glide - step) < 0.5 ? 0 : glide - step;
|
|
648
|
+
posRef.current = wrap(posRef.current + step);
|
|
649
|
+
opts.apply(posRef.current);
|
|
650
|
+
} else if (speedEnvRef.current > 0) {
|
|
651
|
+
resync();
|
|
652
|
+
posRef.current = wrap(posRef.current + speedEnvRef.current * dt);
|
|
653
|
+
opts.apply(posRef.current);
|
|
654
|
+
} else if (external !== null) {
|
|
655
|
+
posRef.current = external;
|
|
656
|
+
}
|
|
657
|
+
_optionalChain([opts, 'access', _11 => _11.onAfterFrame, 'optionalCall', _12 => _12()]);
|
|
658
|
+
raf = requestAnimationFrame(tick);
|
|
659
|
+
};
|
|
660
|
+
raf = requestAnimationFrame(tick);
|
|
661
|
+
return () => cancelAnimationFrame(raf);
|
|
662
|
+
}, [active, wrap]);
|
|
663
|
+
return { posRef, glideBy, wrap };
|
|
664
|
+
}
|
|
665
|
+
|
|
601
666
|
// src/hooks/ui/use-media-query.ts
|
|
602
667
|
|
|
603
668
|
function useMediaQuery(query) {
|
|
@@ -658,16 +723,16 @@ function useNotificationPermission() {
|
|
|
658
723
|
sync();
|
|
659
724
|
let cancelled = false;
|
|
660
725
|
let status;
|
|
661
|
-
_optionalChain([navigator, 'access',
|
|
726
|
+
_optionalChain([navigator, 'access', _13 => _13.permissions, 'optionalAccess', _14 => _14.query, 'call', _15 => _15({ name: "notifications" }), 'access', _16 => _16.then, 'call', _17 => _17((s) => {
|
|
662
727
|
if (cancelled) return;
|
|
663
728
|
status = s;
|
|
664
729
|
s.addEventListener("change", sync);
|
|
665
|
-
}), 'access',
|
|
730
|
+
}), 'access', _18 => _18.catch, 'call', _19 => _19(() => void 0)]);
|
|
666
731
|
document.addEventListener("visibilitychange", sync);
|
|
667
732
|
window.addEventListener("focus", sync);
|
|
668
733
|
return () => {
|
|
669
734
|
cancelled = true;
|
|
670
|
-
_optionalChain([status, 'optionalAccess',
|
|
735
|
+
_optionalChain([status, 'optionalAccess', _20 => _20.removeEventListener, 'call', _21 => _21("change", sync)]);
|
|
671
736
|
document.removeEventListener("visibilitychange", sync);
|
|
672
737
|
window.removeEventListener("focus", sync);
|
|
673
738
|
};
|
|
@@ -872,6 +937,32 @@ function useSearch(config) {
|
|
|
872
937
|
return { query, setQuery, results, isLoading, error, clearResults };
|
|
873
938
|
}
|
|
874
939
|
|
|
940
|
+
// src/hooks/ui/use-suppress-clone-focus.ts
|
|
941
|
+
|
|
942
|
+
var CLONE_FOCUSABLE_SELECTOR = 'a[href],button,input,select,textarea,iframe,summary,audio[controls],video[controls],[tabindex],[contenteditable]:not([contenteditable="false"])';
|
|
943
|
+
function useSuppressCloneFocus(active) {
|
|
944
|
+
const ref = _react.useRef.call(void 0, null);
|
|
945
|
+
_react.useEffect.call(void 0, () => {
|
|
946
|
+
const root = ref.current;
|
|
947
|
+
if (!root || !active) return;
|
|
948
|
+
const suppress = () => {
|
|
949
|
+
root.querySelectorAll(CLONE_FOCUSABLE_SELECTOR).forEach((el) => {
|
|
950
|
+
if (el.getAttribute("tabindex") !== "-1") el.setAttribute("tabindex", "-1");
|
|
951
|
+
});
|
|
952
|
+
};
|
|
953
|
+
suppress();
|
|
954
|
+
const mo = new MutationObserver(suppress);
|
|
955
|
+
mo.observe(root, {
|
|
956
|
+
childList: true,
|
|
957
|
+
subtree: true,
|
|
958
|
+
attributes: true,
|
|
959
|
+
attributeFilter: ["href", "tabindex", "contenteditable", "controls"]
|
|
960
|
+
});
|
|
961
|
+
return () => mo.disconnect();
|
|
962
|
+
}, [active]);
|
|
963
|
+
return ref;
|
|
964
|
+
}
|
|
965
|
+
|
|
875
966
|
// src/hooks/ui/use-table-pagination.ts
|
|
876
967
|
|
|
877
968
|
function useTablePagination(config) {
|
|
@@ -1261,7 +1352,7 @@ var toolIconMap = {
|
|
|
1261
1352
|
[ToolTypeValues.OSQUERY]: (size, className) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBGD345ZVcjs.OsqueryLogoGreyIcon, { size, className }),
|
|
1262
1353
|
[ToolTypeValues.SYSTEM]: () => null
|
|
1263
1354
|
};
|
|
1264
|
-
var ToolIcon = ({ toolType, size = 16, className }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: _nullishCoalesce(_optionalChain([toolIconMap, 'access',
|
|
1355
|
+
var ToolIcon = ({ toolType, size = 16, className }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: _nullishCoalesce(_optionalChain([toolIconMap, 'access', _22 => _22[toolType], 'optionalCall', _23 => _23(size, className)]), () => ( null)) });
|
|
1265
1356
|
ToolIcon.displayName = "ToolIcon";
|
|
1266
1357
|
|
|
1267
1358
|
// src/components/ui/toaster.tsx
|
|
@@ -1380,11 +1471,11 @@ function CommandApprovalToast({
|
|
|
1380
1471
|
}) {
|
|
1381
1472
|
const [expanded, setExpanded] = React2.useState(defaultExpanded);
|
|
1382
1473
|
const handleApprove = () => {
|
|
1383
|
-
_optionalChain([onApprove, 'optionalCall',
|
|
1474
|
+
_optionalChain([onApprove, 'optionalCall', _24 => _24()]);
|
|
1384
1475
|
_sonner.toast.dismiss(id);
|
|
1385
1476
|
};
|
|
1386
1477
|
const handleReject = () => {
|
|
1387
|
-
_optionalChain([onReject, 'optionalCall',
|
|
1478
|
+
_optionalChain([onReject, 'optionalCall', _25 => _25()]);
|
|
1388
1479
|
_sonner.toast.dismiss(id);
|
|
1389
1480
|
};
|
|
1390
1481
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -1607,7 +1698,7 @@ function createLocalStorageAdapter(options) {
|
|
|
1607
1698
|
const tag = _nullishCoalesce(options.logTag, () => ( "[local-storage]"));
|
|
1608
1699
|
const backend = _nullishCoalesce(options.backend, () => ( "local"));
|
|
1609
1700
|
const resolveKey = () => {
|
|
1610
|
-
const ns = _optionalChain([options, 'access',
|
|
1701
|
+
const ns = _optionalChain([options, 'access', _26 => _26.namespace, 'optionalCall', _27 => _27()]);
|
|
1611
1702
|
return ns ? `${ns}.${options.key}` : options.key;
|
|
1612
1703
|
};
|
|
1613
1704
|
return {
|
|
@@ -1698,7 +1789,7 @@ function getEmbedProxyAuth() {
|
|
|
1698
1789
|
}
|
|
1699
1790
|
function getPersistedProxyEmail() {
|
|
1700
1791
|
const persisted = adapter.load();
|
|
1701
|
-
return _nullishCoalesce(_optionalChain([persisted, 'optionalAccess',
|
|
1792
|
+
return _nullishCoalesce(_optionalChain([persisted, 'optionalAccess', _28 => _28.email, 'access', _29 => _29.trim, 'call', _30 => _30(), 'access', _31 => _31.toLowerCase, 'call', _32 => _32()]), () => ( null));
|
|
1702
1793
|
}
|
|
1703
1794
|
function setEmbedProxyAuth(value) {
|
|
1704
1795
|
adapter.save({
|
|
@@ -1715,15 +1806,15 @@ function clearEmbedProxyAuth() {
|
|
|
1715
1806
|
function applyProxyAuth(url, baseHeaders = { "Content-Type": "application/json" }) {
|
|
1716
1807
|
const auth = getEmbedProxyAuth();
|
|
1717
1808
|
const headers = { ...baseHeaders };
|
|
1718
|
-
if (_optionalChain([auth, 'optionalAccess',
|
|
1809
|
+
if (_optionalChain([auth, 'optionalAccess', _33 => _33.secret])) {
|
|
1719
1810
|
headers.Authorization = `Bearer ${auth.secret}`;
|
|
1720
1811
|
}
|
|
1721
|
-
if (_optionalChain([auth, 'optionalAccess',
|
|
1812
|
+
if (_optionalChain([auth, 'optionalAccess', _34 => _34.email])) {
|
|
1722
1813
|
headers["X-Chat-Act-As"] = auth.email;
|
|
1723
1814
|
}
|
|
1724
|
-
if (_optionalChain([auth, 'optionalAccess',
|
|
1725
|
-
if (_optionalChain([auth, 'optionalAccess',
|
|
1726
|
-
if (_optionalChain([auth, 'optionalAccess',
|
|
1815
|
+
if (_optionalChain([auth, 'optionalAccess', _35 => _35.firstName])) headers["X-Chat-First-Name"] = auth.firstName;
|
|
1816
|
+
if (_optionalChain([auth, 'optionalAccess', _36 => _36.lastName])) headers["X-Chat-Last-Name"] = auth.lastName;
|
|
1817
|
+
if (_optionalChain([auth, 'optionalAccess', _37 => _37.avatarUrl])) headers["X-Chat-Avatar-Url"] = auth.avatarUrl;
|
|
1727
1818
|
return { url, headers };
|
|
1728
1819
|
}
|
|
1729
1820
|
|
|
@@ -1778,7 +1869,7 @@ function setInFlightRefresh(refresh) {
|
|
|
1778
1869
|
}
|
|
1779
1870
|
function dedupedRefresh() {
|
|
1780
1871
|
const adapter2 = getRegisteredAuthAdapter();
|
|
1781
|
-
if (!_optionalChain([adapter2, 'optionalAccess',
|
|
1872
|
+
if (!_optionalChain([adapter2, 'optionalAccess', _38 => _38.refresh])) return Promise.resolve(false);
|
|
1782
1873
|
let inFlightRefresh = getInFlightRefresh();
|
|
1783
1874
|
if (!inFlightRefresh) {
|
|
1784
1875
|
inFlightRefresh = Promise.resolve().then(() => adapter2.refresh()).catch(() => false).finally(() => {
|
|
@@ -1791,12 +1882,12 @@ function dedupedRefresh() {
|
|
|
1791
1882
|
async function fetchWithRefresh(url, init, baseHeaders, isRetry) {
|
|
1792
1883
|
const { url: authedUrl, headers } = applyProxyAuth(url, { ...baseHeaders });
|
|
1793
1884
|
const adapter2 = getRegisteredAuthAdapter();
|
|
1794
|
-
if (_optionalChain([adapter2, 'optionalAccess',
|
|
1885
|
+
if (_optionalChain([adapter2, 'optionalAccess', _39 => _39.getHeaders])) {
|
|
1795
1886
|
for (const [k, v] of Object.entries(adapter2.getHeaders())) {
|
|
1796
1887
|
if (v !== void 0) headers[k] = v;
|
|
1797
1888
|
}
|
|
1798
1889
|
}
|
|
1799
|
-
const credentials = _nullishCoalesce(_nullishCoalesce(_optionalChain([adapter2, 'optionalAccess',
|
|
1890
|
+
const credentials = _nullishCoalesce(_nullishCoalesce(_optionalChain([adapter2, 'optionalAccess', _40 => _40.credentials]), () => ( init.credentials)), () => ( "same-origin"));
|
|
1800
1891
|
const response = await fetch(authedUrl, {
|
|
1801
1892
|
...init,
|
|
1802
1893
|
headers,
|
|
@@ -1807,7 +1898,7 @@ async function fetchWithRefresh(url, init, baseHeaders, isRetry) {
|
|
|
1807
1898
|
// `SameSite=None` must be configured server-side for that to work).
|
|
1808
1899
|
credentials
|
|
1809
1900
|
});
|
|
1810
|
-
if (response.status === 401 && !isRetry && _optionalChain([adapter2, 'optionalAccess',
|
|
1901
|
+
if (response.status === 401 && !isRetry && _optionalChain([adapter2, 'optionalAccess', _41 => _41.refresh])) {
|
|
1811
1902
|
const refreshed = await dedupedRefresh();
|
|
1812
1903
|
if (refreshed) {
|
|
1813
1904
|
return fetchWithRefresh(url, init, baseHeaders, true);
|
|
@@ -1831,7 +1922,7 @@ function assertSameOrigin(url) {
|
|
|
1831
1922
|
);
|
|
1832
1923
|
}
|
|
1833
1924
|
if (target.origin !== pageOrigin) {
|
|
1834
|
-
if (_optionalChain([getRegisteredAuthAdapter, 'call',
|
|
1925
|
+
if (_optionalChain([getRegisteredAuthAdapter, 'call', _42 => _42(), 'optionalAccess', _43 => _43.allowedOrigins, 'optionalAccess', _44 => _44.includes, 'call', _45 => _45(target.origin)])) {
|
|
1835
1926
|
return;
|
|
1836
1927
|
}
|
|
1837
1928
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -2499,7 +2590,7 @@ function setNestedValue(obj, path, value) {
|
|
|
2499
2590
|
}
|
|
2500
2591
|
function getNestedValue(obj, path) {
|
|
2501
2592
|
return path.split(".").reduce((current, key) => {
|
|
2502
|
-
return _optionalChain([current, 'optionalAccess',
|
|
2593
|
+
return _optionalChain([current, 'optionalAccess', _46 => _46[key]]);
|
|
2503
2594
|
}, obj);
|
|
2504
2595
|
}
|
|
2505
2596
|
function mergeVariables(currentVariables, updates, schema) {
|
|
@@ -3267,7 +3358,7 @@ function useNearViewport(rootMargin = NEAR_VIEWPORT_ROOT_MARGIN) {
|
|
|
3267
3358
|
const stillOurs = subscribers.get(prev);
|
|
3268
3359
|
if (stillOurs) {
|
|
3269
3360
|
subscribers.delete(prev);
|
|
3270
|
-
_optionalChain([observers, 'access',
|
|
3361
|
+
_optionalChain([observers, 'access', _47 => _47.get, 'call', _48 => _48(rootMargin), 'optionalAccess', _49 => _49.unobserve, 'call', _50 => _50(prev)]);
|
|
3271
3362
|
}
|
|
3272
3363
|
}
|
|
3273
3364
|
elRef.current = node;
|
|
@@ -3284,7 +3375,7 @@ function useNearViewport(rootMargin = NEAR_VIEWPORT_ROOT_MARGIN) {
|
|
|
3284
3375
|
if (!el) return;
|
|
3285
3376
|
if (subscribers.get(el)) {
|
|
3286
3377
|
subscribers.delete(el);
|
|
3287
|
-
_optionalChain([observers, 'access',
|
|
3378
|
+
_optionalChain([observers, 'access', _51 => _51.get, 'call', _52 => _52(rootMargin), 'optionalAccess', _53 => _53.unobserve, 'call', _54 => _54(el)]);
|
|
3288
3379
|
}
|
|
3289
3380
|
};
|
|
3290
3381
|
}, [rootMargin]);
|
|
@@ -3399,8 +3490,8 @@ function useAccessCodeIntegration() {
|
|
|
3399
3490
|
// src/utils/og-placeholder.ts
|
|
3400
3491
|
var DEFAULT_OG_PLACEHOLDER_PATH = "/api/og-placeholder";
|
|
3401
3492
|
function resolveOgPlaceholderBase(endpoints) {
|
|
3402
|
-
if (_optionalChain([endpoints, 'optionalAccess',
|
|
3403
|
-
const imageProxy = _optionalChain([endpoints, 'optionalAccess',
|
|
3493
|
+
if (_optionalChain([endpoints, 'optionalAccess', _55 => _55.ogPlaceholderUrl])) return endpoints.ogPlaceholderUrl;
|
|
3494
|
+
const imageProxy = _optionalChain([endpoints, 'optionalAccess', _56 => _56.imageProxyUrlPrefix]);
|
|
3404
3495
|
if (imageProxy) {
|
|
3405
3496
|
const derived = imageProxy.replace(/\/image-proxy(?=$|[?/])/, "/og-placeholder");
|
|
3406
3497
|
if (derived !== imageProxy) return derived;
|
|
@@ -3428,7 +3519,7 @@ function useOgPlaceholderUrl({
|
|
|
3428
3519
|
aspect = "wide",
|
|
3429
3520
|
enabled = true
|
|
3430
3521
|
}) {
|
|
3431
|
-
const endpoints = _optionalChain([_chunk2B6773QMcjs.useChatRuntime.call(void 0, ), 'optionalAccess',
|
|
3522
|
+
const endpoints = _optionalChain([_chunk2B6773QMcjs.useChatRuntime.call(void 0, ), 'optionalAccess', _57 => _57.endpoints]);
|
|
3432
3523
|
return _react.useMemo.call(void 0, () => {
|
|
3433
3524
|
if (!enabled || !title) return null;
|
|
3434
3525
|
return buildOgPlaceholderUrl(endpoints, title, { site: siteName || void 0, aspect });
|
|
@@ -3573,7 +3664,7 @@ function navigateSamePageHash(target, options = {}) {
|
|
|
3573
3664
|
// src/hooks/use-scroll-to-hash.ts
|
|
3574
3665
|
var MAX_POLL_FRAMES = 60;
|
|
3575
3666
|
function useScrollToHash(readyDep = true, options) {
|
|
3576
|
-
const headerOffset = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3667
|
+
const headerOffset = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _58 => _58.headerOffset]), () => ( 0));
|
|
3577
3668
|
_react.useEffect.call(void 0, () => {
|
|
3578
3669
|
if (typeof window === "undefined") return;
|
|
3579
3670
|
if (readyDep === null || readyDep === false) return;
|
|
@@ -3634,7 +3725,7 @@ function evaluateHumanitySignals(body, opts) {
|
|
|
3634
3725
|
if (elapsedMs !== null && elapsedMs < opts.minFillMs) return { ok: false, reason: "too_fast" };
|
|
3635
3726
|
return { ok: true };
|
|
3636
3727
|
}
|
|
3637
|
-
var splitCsvEnv = (s) => _nullishCoalesce(_optionalChain([s, 'optionalAccess',
|
|
3728
|
+
var splitCsvEnv = (s) => _nullishCoalesce(_optionalChain([s, 'optionalAccess', _59 => _59.split, 'call', _60 => _60(","), 'access', _61 => _61.map, 'call', _62 => _62((t) => t.trim()), 'access', _63 => _63.filter, 'call', _64 => _64(Boolean)]), () => ( []));
|
|
3638
3729
|
|
|
3639
3730
|
// src/hooks/use-humanity-signals.ts
|
|
3640
3731
|
function useHumanitySignals() {
|
|
@@ -3642,7 +3733,7 @@ function useHumanitySignals() {
|
|
|
3642
3733
|
const mountedAt = _react.useRef.call(void 0, typeof performance !== "undefined" ? performance.now() : 0);
|
|
3643
3734
|
const getSignals = _react.useCallback.call(void 0,
|
|
3644
3735
|
() => ({
|
|
3645
|
-
[HONEYPOT_FIELD]: _nullishCoalesce(_optionalChain([ref, 'access',
|
|
3736
|
+
[HONEYPOT_FIELD]: _nullishCoalesce(_optionalChain([ref, 'access', _65 => _65.current, 'optionalAccess', _66 => _66.value]), () => ( "")),
|
|
3646
3737
|
[ELAPSED_MS_FIELD]: typeof performance !== "undefined" ? Math.round(performance.now() - mountedAt.current) : 0
|
|
3647
3738
|
}),
|
|
3648
3739
|
[]
|
|
@@ -3770,5 +3861,7 @@ function useHumanitySignals() {
|
|
|
3770
3861
|
|
|
3771
3862
|
|
|
3772
3863
|
|
|
3773
|
-
|
|
3774
|
-
|
|
3864
|
+
|
|
3865
|
+
|
|
3866
|
+
exports.useAutoLimitTags = useAutoLimitTags; exports.useDebounce = useDebounce; exports.useDeferredError = useDeferredError; exports.useFocusTrap = useFocusTrap; exports.useHeaderHeight = useHeaderHeight; exports.useHorizontalScrollbar = useHorizontalScrollbar; exports.useImageEdgeColor = useImageEdgeColor; exports.useLocalStorage = useLocalStorage; exports.useMarqueeEngine = useMarqueeEngine; exports.useMediaQuery = useMediaQuery; exports.breakpoints = breakpoints; exports.useSmUp = useSmUp; exports.useMdUp = useMdUp; exports.useLgUp = useLgUp; exports.useMemoizedCallback = useMemoizedCallback; exports.useNotificationPermission = useNotificationPermission; exports.useOnboardingState = useOnboardingState; exports.useSearch = useSearch; exports.useSuppressCloneFocus = useSuppressCloneFocus; exports.useTablePagination = useTablePagination; exports.useThrottle = useThrottle; exports.useWindowSize = useWindowSize; exports.usePreventScroll = _overlays.usePreventScroll; exports.platformIcons = platformIcons; exports.platformColors = platformColors; exports.platformDisplayNames = platformDisplayNames; exports.platformDescriptions = platformDescriptions; exports.platformSlogans = platformSlogans; exports.platformHexColors = platformHexColors; exports.platformIconNames = platformIconNames; exports.getDefaultColorForPlatform = getDefaultColorForPlatform; exports.getDefaultIconForPlatform = getDefaultIconForPlatform; exports.transformPlatformConfigsToOptions = transformPlatformConfigsToOptions; exports.getPlatformIcon = getPlatformIcon; exports.getPlatformColor = getPlatformColor; exports.getPlatformDisplayName = getPlatformDisplayName; exports.getPlatformDescription = getPlatformDescription; exports.getPlatformSlogan = getPlatformSlogan; exports.getSmallPlatformIcon = getSmallPlatformIcon; exports.getPlatformIconComponent = getPlatformIconComponent; exports.usePlatformConfig = usePlatformConfig; exports.usePlatformByValue = usePlatformByValue; exports.useValidatePlatform = useValidatePlatform; exports.ToolTypeValues = ToolTypeValues; exports.toolLabels = toolLabels; exports.ToolIcon = ToolIcon; exports.dotColorByVariant = dotColorByVariant; exports.progressColorByVariant = progressColorByVariant; exports.ToastCard = ToastCard; exports.CommandApprovalToast = CommandApprovalToast; exports.Toaster = Toaster; exports.showToast = showToast; exports.showCommandApprovalToast = showCommandApprovalToast; exports.toast = toast; exports.useToast = useToast; exports.getAppType = getAppType; exports.getEmbedProxyAuth = getEmbedProxyAuth; exports.getPersistedProxyEmail = getPersistedProxyEmail; exports.setEmbedProxyAuth = setEmbedProxyAuth; exports.clearEmbedProxyAuth = clearEmbedProxyAuth; exports.applyProxyAuth = applyProxyAuth; exports.setEmbedAuthAdapter = setEmbedAuthAdapter; exports.embedAuthedFetch = embedAuthedFetch; exports.contentFetch = contentFetch; exports.useContactSubmission = useContactSubmission; exports.useQuickActionHint = useQuickActionHint; exports.useCopyToClipboard = useCopyToClipboard; exports.configureBatchImageFetch = configureBatchImageFetch; exports.batchFetchAuthenticatedImages = batchFetchAuthenticatedImages; exports.useBatchImages = useBatchImages; exports.configureAuthenticatedImage = configureAuthenticatedImage; exports.useAuthenticatedImage = useAuthenticatedImage; exports.extractVariablesFromQuery = extractVariablesFromQuery; exports.isScalarType = isScalarType; exports.isInputObjectType = isInputObjectType; exports.flattenQueryVariables = flattenQueryVariables; exports.mergeDefaults = mergeDefaults; exports.validateSchema = validateSchema; exports.getArrayParams = getArrayParams; exports.getRequiredParams = getRequiredParams; exports.shouldIncludeInUrl = shouldIncludeInUrl; exports.urlParamsToVariables = urlParamsToVariables; exports.variablesToUrlParams = variablesToUrlParams; exports.coerceValue = coerceValue; exports.setNestedValue = setNestedValue; exports.getNestedValue = getNestedValue; exports.mergeVariables = mergeVariables; exports.clearParams = clearParams; exports.validateVariables = validateVariables; exports.GraphQLIntrospector = GraphQLIntrospector; exports.introspector = introspector; exports.useQueryParams = useQueryParams; exports.useApiParams = useApiParams; exports.createSearchParams = createSearchParams; exports.useCursorPaginationState = useCursorPaginationState; exports.useNatsClient = useNatsClient; exports.NEAR_VIEWPORT_ROOT_MARGIN = NEAR_VIEWPORT_ROOT_MARGIN; exports.useNearViewport = useNearViewport; exports.validateAccessCode = validateAccessCode; exports.consumeAccessCode = consumeAccessCode; exports.validateAndConsumeAccessCode = validateAndConsumeAccessCode; exports.useAccessCodeIntegration = useAccessCodeIntegration; exports.buildOgPlaceholderUrl = buildOgPlaceholderUrl; exports.useOgPlaceholderUrl = useOgPlaceholderUrl; exports.scrollElementIntoView = scrollElementIntoView; exports.STICKY_HEADER_OFFSET_PX = STICKY_HEADER_OFFSET_PX; exports.HUB_HEADER_OFFSET_PX = HUB_HEADER_OFFSET_PX; exports.normalizeHashFragment = normalizeHashFragment; exports.navigateSamePageHash = navigateSamePageHash; exports.useScrollToHash = useScrollToHash; exports.HONEYPOT_FIELD = HONEYPOT_FIELD; exports.ELAPSED_MS_FIELD = ELAPSED_MS_FIELD; exports.DEFAULT_MIN_FILL_MS = DEFAULT_MIN_FILL_MS; exports.extractHumanitySignals = extractHumanitySignals; exports.evaluateHumanitySignals = evaluateHumanitySignals; exports.splitCsvEnv = splitCsvEnv; exports.useHumanitySignals = useHumanitySignals;
|
|
3867
|
+
//# sourceMappingURL=chunk-QF3NQW7C.cjs.map
|