@flamingo-stack/openframe-frontend-core 0.0.535-1762.4618.1 → 0.0.535
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-GF5A23J3.cjs → chunk-2P4J2YLI.cjs} +98 -98
- package/dist/{chunk-GF5A23J3.cjs.map → chunk-2P4J2YLI.cjs.map} +1 -1
- package/dist/{chunk-GS4HJA2G.js → chunk-4A736Z6S.js} +74 -20
- package/dist/chunk-4A736Z6S.js.map +1 -0
- package/dist/{chunk-GBWS62LR.js → chunk-4DTUUM5V.js} +45 -25
- package/dist/{chunk-GBWS62LR.js.map → chunk-4DTUUM5V.js.map} +1 -1
- package/dist/{chunk-JW4BTXVH.cjs → chunk-4HQFV4PK.cjs} +14 -14
- package/dist/{chunk-JW4BTXVH.cjs.map → chunk-4HQFV4PK.cjs.map} +1 -1
- package/dist/{chunk-GYONSC3U.cjs → chunk-4QYUNDS3.cjs} +3 -3
- package/dist/{chunk-GYONSC3U.cjs.map → chunk-4QYUNDS3.cjs.map} +1 -1
- package/dist/{chunk-T743Z3KN.cjs → chunk-5OLF6WXF.cjs} +40 -40
- package/dist/{chunk-T743Z3KN.cjs.map → chunk-5OLF6WXF.cjs.map} +1 -1
- package/dist/{chunk-SXLEPNY2.cjs → chunk-5RJUHUCI.cjs} +106 -52
- package/dist/chunk-5RJUHUCI.cjs.map +1 -0
- package/dist/{chunk-ZUVBTDLG.cjs → chunk-7MHYRBBQ.cjs} +5 -5
- package/dist/{chunk-ZUVBTDLG.cjs.map → chunk-7MHYRBBQ.cjs.map} +1 -1
- package/dist/{chunk-T4GNFVT3.cjs → chunk-E3YB55RR.cjs} +173 -153
- package/dist/chunk-E3YB55RR.cjs.map +1 -0
- package/dist/{chunk-JWWZFEFI.js → chunk-EHPQKXXW.js} +3 -3
- package/dist/{chunk-JZMQQBUC.cjs → chunk-GV4FDDFV.cjs} +18 -18
- package/dist/{chunk-JZMQQBUC.cjs.map → chunk-GV4FDDFV.cjs.map} +1 -1
- package/dist/{chunk-XPKCOZQE.js → chunk-JVO5CYMK.js} +8 -8
- package/dist/{chunk-6OZWDOP5.js → chunk-K6566PEB.js} +3 -3
- package/dist/{chunk-WXRQYGE5.js → chunk-KLFGP6PR.js} +2 -2
- package/dist/{chunk-7TQDW3PE.js → chunk-LIQJAC6Z.js} +2 -2
- package/dist/{chunk-GS4R5UQ7.js → chunk-LIX5OUHH.js} +2 -2
- package/dist/{chunk-RCBRCZUF.js → chunk-LQPHB2YF.js} +2 -2
- package/dist/{chunk-5OPVJBHQ.js → chunk-MZVFZMQ6.js} +6 -6
- package/dist/{chunk-URBYMQ4Z.js → chunk-N3AEJTCK.js} +5 -5
- package/dist/{chunk-DRJC7TTW.js → chunk-NB6BP6JB.js} +3 -3
- package/dist/{chunk-DK6IYFLD.cjs → chunk-P65EZEBW.cjs} +12 -12
- package/dist/{chunk-DK6IYFLD.cjs.map → chunk-P65EZEBW.cjs.map} +1 -1
- package/dist/{chunk-JWJQHURJ.js → chunk-PLGITXT7.js} +2 -2
- package/dist/{chunk-HSRHPF32.cjs → chunk-PSBL3S2B.cjs} +7 -7
- package/dist/{chunk-HSRHPF32.cjs.map → chunk-PSBL3S2B.cjs.map} +1 -1
- package/dist/{chunk-A5EA3YO7.js → chunk-QUVIT4JP.js} +6 -6
- package/dist/{chunk-GRGFMXNO.cjs → chunk-RO67OOKJ.cjs} +40 -40
- package/dist/{chunk-GRGFMXNO.cjs.map → chunk-RO67OOKJ.cjs.map} +1 -1
- package/dist/{chunk-2AMYXNQ2.cjs → chunk-TS2EHMEX.cjs} +29 -29
- package/dist/{chunk-2AMYXNQ2.cjs.map → chunk-TS2EHMEX.cjs.map} +1 -1
- package/dist/{chunk-WL3PP4D6.cjs → chunk-U2Q7GEX2.cjs} +32 -32
- package/dist/{chunk-WL3PP4D6.cjs.map → chunk-U2Q7GEX2.cjs.map} +1 -1
- package/dist/{chunk-QHOVACZK.js → chunk-VPDTDKO5.js} +2 -2
- package/dist/{chunk-ENOER2QA.cjs → chunk-Y55XQFJK.cjs} +75 -75
- package/dist/{chunk-ENOER2QA.cjs.map → chunk-Y55XQFJK.cjs.map} +1 -1
- package/dist/{chunk-HNZDQ4SH.js → chunk-Y72MXG5N.js} +4 -4
- package/dist/{chunk-CMIHA6TT.cjs → chunk-ZKKEKG73.cjs} +3 -3
- package/dist/{chunk-CMIHA6TT.cjs.map → chunk-ZKKEKG73.cjs.map} +1 -1
- package/dist/{chunk-TOWXHZF5.cjs → chunk-ZR5CJTNR.cjs} +4 -4
- package/dist/{chunk-TOWXHZF5.cjs.map → chunk-ZR5CJTNR.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/index.cjs +3 -3
- package/dist/components/chat/index.js +2 -2
- package/dist/components/contact/index.cjs +4 -4
- package/dist/components/contact/index.js +3 -3
- 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/index.cjs +3 -3
- package/dist/components/features/index.js +2 -2
- package/dist/components/help-center-pages/index.cjs +24 -24
- package/dist/components/help-center-pages/index.js +15 -15
- package/dist/components/index.cjs +138 -138
- package/dist/components/index.js +13 -13
- package/dist/components/meeting-scheduler/index.cjs +40 -40
- package/dist/components/meeting-scheduler/index.js +4 -4
- 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/popover.d.ts.map +1 -1
- package/dist/components/related-content/index.cjs +5 -5
- package/dist/components/related-content/index.js +4 -4
- package/dist/components/tickets/index.cjs +7 -7
- package/dist/components/tickets/index.js +6 -6
- package/dist/components/ui/autocomplete.d.ts.map +1 -1
- package/dist/components/ui/index.cjs +3 -3
- package/dist/components/ui/index.js +2 -2
- package/dist/components/ui/search-input.d.ts.map +1 -1
- package/dist/components/ui/searchable-select.d.ts.map +1 -1
- package/dist/components/ui/tag-select-dropdown.d.ts.map +1 -1
- package/dist/components/ui/tags-manager.d.ts.map +1 -1
- package/dist/hooks/index.cjs +4 -2
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.js +3 -1
- package/dist/hooks/ui/index.d.ts +1 -0
- package/dist/hooks/ui/index.d.ts.map +1 -1
- package/dist/hooks/ui/use-keyboard-collision-padding.d.ts +2 -0
- package/dist/hooks/ui/use-keyboard-collision-padding.d.ts.map +1 -0
- package/dist/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -2
- package/package.json +1 -1
- package/src/components/popover.tsx +22 -14
- package/src/components/ui/autocomplete.tsx +9 -2
- package/src/components/ui/search-input.tsx +9 -2
- package/src/components/ui/searchable-select.tsx +9 -2
- package/src/components/ui/tag-select-dropdown.tsx +8 -2
- package/src/components/ui/tags-manager.tsx +9 -2
- package/src/hooks/ui/index.ts +1 -0
- package/src/hooks/ui/use-keyboard-collision-padding.ts +101 -0
- package/dist/chunk-GS4HJA2G.js.map +0 -1
- package/dist/chunk-SXLEPNY2.cjs.map +0 -1
- package/dist/chunk-T4GNFVT3.cjs.map +0 -1
- /package/dist/{chunk-JWWZFEFI.js.map → chunk-EHPQKXXW.js.map} +0 -0
- /package/dist/{chunk-XPKCOZQE.js.map → chunk-JVO5CYMK.js.map} +0 -0
- /package/dist/{chunk-6OZWDOP5.js.map → chunk-K6566PEB.js.map} +0 -0
- /package/dist/{chunk-WXRQYGE5.js.map → chunk-KLFGP6PR.js.map} +0 -0
- /package/dist/{chunk-7TQDW3PE.js.map → chunk-LIQJAC6Z.js.map} +0 -0
- /package/dist/{chunk-GS4R5UQ7.js.map → chunk-LIX5OUHH.js.map} +0 -0
- /package/dist/{chunk-RCBRCZUF.js.map → chunk-LQPHB2YF.js.map} +0 -0
- /package/dist/{chunk-5OPVJBHQ.js.map → chunk-MZVFZMQ6.js.map} +0 -0
- /package/dist/{chunk-URBYMQ4Z.js.map → chunk-N3AEJTCK.js.map} +0 -0
- /package/dist/{chunk-DRJC7TTW.js.map → chunk-NB6BP6JB.js.map} +0 -0
- /package/dist/{chunk-JWJQHURJ.js.map → chunk-PLGITXT7.js.map} +0 -0
- /package/dist/{chunk-A5EA3YO7.js.map → chunk-QUVIT4JP.js.map} +0 -0
- /package/dist/{chunk-QHOVACZK.js.map → chunk-VPDTDKO5.js.map} +0 -0
- /package/dist/{chunk-HNZDQ4SH.js.map → chunk-Y72MXG5N.js.map} +0 -0
|
@@ -50,8 +50,8 @@ function useAutoLimitTags({
|
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
52
|
const middle = middleRef.current;
|
|
53
|
-
const
|
|
54
|
-
if (!middle || !
|
|
53
|
+
const measure2 = measureRef.current;
|
|
54
|
+
if (!middle || !measure2) {
|
|
55
55
|
setVisibleCount(count);
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
@@ -73,7 +73,7 @@ function useAutoLimitTags({
|
|
|
73
73
|
trailingGap = gap;
|
|
74
74
|
}
|
|
75
75
|
const available = middleW - padL - padR - inputReservedW - trailingGap;
|
|
76
|
-
const tagEls = Array.from(
|
|
76
|
+
const tagEls = Array.from(measure2.children);
|
|
77
77
|
const widths = tagEls.map((el) => el.offsetWidth);
|
|
78
78
|
let total = 0;
|
|
79
79
|
for (let i = 0; i < widths.length; i++) {
|
|
@@ -203,7 +203,7 @@ function useHeaderHeight(defaultHeight = 72, options = {}) {
|
|
|
203
203
|
const [height, setHeight] = _react.useState.call(void 0, defaultHeight);
|
|
204
204
|
_react.useEffect.call(void 0, () => {
|
|
205
205
|
if (!enabled) return;
|
|
206
|
-
const
|
|
206
|
+
const measure2 = () => {
|
|
207
207
|
let total = 0;
|
|
208
208
|
const header2 = document.querySelector("header");
|
|
209
209
|
if (header2) total += header2.offsetHeight;
|
|
@@ -211,8 +211,8 @@ function useHeaderHeight(defaultHeight = 72, options = {}) {
|
|
|
211
211
|
if (bar2 instanceof HTMLElement) total += bar2.offsetHeight;
|
|
212
212
|
setHeight(total > 0 ? total : defaultHeight);
|
|
213
213
|
};
|
|
214
|
-
|
|
215
|
-
const resizeObserver = new ResizeObserver(
|
|
214
|
+
measure2();
|
|
215
|
+
const resizeObserver = new ResizeObserver(measure2);
|
|
216
216
|
const header = document.querySelector("header");
|
|
217
217
|
if (header) resizeObserver.observe(header);
|
|
218
218
|
const bar = document.querySelector("[data-announcement-bar]");
|
|
@@ -220,7 +220,7 @@ function useHeaderHeight(defaultHeight = 72, options = {}) {
|
|
|
220
220
|
const mutationObserver = new MutationObserver((mutations) => {
|
|
221
221
|
for (const mutation of mutations) {
|
|
222
222
|
if (mutation.type === "childList" || mutation.type === "attributes") {
|
|
223
|
-
|
|
223
|
+
measure2();
|
|
224
224
|
const newBar = document.querySelector("[data-announcement-bar]");
|
|
225
225
|
if (newBar) resizeObserver.observe(newBar);
|
|
226
226
|
}
|
|
@@ -297,7 +297,7 @@ function useHorizontalScrollbar() {
|
|
|
297
297
|
setCanScrollRight(right);
|
|
298
298
|
}
|
|
299
299
|
}, []);
|
|
300
|
-
const
|
|
300
|
+
const measure2 = _react.useCallback.call(void 0, () => {
|
|
301
301
|
const el = scrollElRef.current;
|
|
302
302
|
if (!el) return;
|
|
303
303
|
const ratio = el.clientWidth / el.scrollWidth;
|
|
@@ -322,7 +322,7 @@ function useHorizontalScrollbar() {
|
|
|
322
322
|
if (node) {
|
|
323
323
|
const ratio = node.clientWidth / node.scrollWidth;
|
|
324
324
|
setThumbRatio(ratio >= 1 ? 0 : ratio);
|
|
325
|
-
const ro = new ResizeObserver(
|
|
325
|
+
const ro = new ResizeObserver(measure2);
|
|
326
326
|
roRef.current = ro;
|
|
327
327
|
const observeAll = () => {
|
|
328
328
|
ro.disconnect();
|
|
@@ -332,7 +332,7 @@ function useHorizontalScrollbar() {
|
|
|
332
332
|
observeAll();
|
|
333
333
|
moRef.current = new MutationObserver(() => {
|
|
334
334
|
observeAll();
|
|
335
|
-
|
|
335
|
+
measure2();
|
|
336
336
|
});
|
|
337
337
|
moRef.current.observe(node, { childList: true });
|
|
338
338
|
requestAnimationFrame(() => {
|
|
@@ -346,7 +346,7 @@ function useHorizontalScrollbar() {
|
|
|
346
346
|
setCanScrollLeft(false);
|
|
347
347
|
setCanScrollRight(false);
|
|
348
348
|
}
|
|
349
|
-
}, [
|
|
349
|
+
}, [measure2, syncThumbToDOM, syncEdgeFades]);
|
|
350
350
|
const onScroll = _react.useCallback.call(void 0, () => {
|
|
351
351
|
if (isDraggingRef.current) return;
|
|
352
352
|
if (rafIdRef.current) cancelAnimationFrame(rafIdRef.current);
|
|
@@ -547,6 +547,59 @@ function useIsTruncated(value, options) {
|
|
|
547
547
|
|
|
548
548
|
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? _react.useLayoutEffect : _react.useEffect;
|
|
549
549
|
|
|
550
|
+
// src/hooks/ui/use-keyboard-collision-padding.ts
|
|
551
|
+
|
|
552
|
+
var KEYBOARD_INSET_VAR = "--of-keyboard-inset";
|
|
553
|
+
function measure() {
|
|
554
|
+
if (typeof document === "undefined") return 0;
|
|
555
|
+
const inset = Number.parseFloat(
|
|
556
|
+
getComputedStyle(document.documentElement).getPropertyValue(KEYBOARD_INSET_VAR)
|
|
557
|
+
);
|
|
558
|
+
if (!(inset > 0)) return 0;
|
|
559
|
+
const layoutHeight = document.documentElement.clientHeight;
|
|
560
|
+
const viewport = window.visualViewport;
|
|
561
|
+
const viewportBottom = viewport ? viewport.offsetTop + viewport.height : layoutHeight;
|
|
562
|
+
return Math.max(0, Math.round(viewportBottom - (layoutHeight - inset)));
|
|
563
|
+
}
|
|
564
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
565
|
+
var padding = 0;
|
|
566
|
+
var teardown = null;
|
|
567
|
+
function sync() {
|
|
568
|
+
const next = measure();
|
|
569
|
+
if (next === padding) return;
|
|
570
|
+
padding = next;
|
|
571
|
+
for (const notify of listeners) notify();
|
|
572
|
+
}
|
|
573
|
+
function subscribe(onStoreChange) {
|
|
574
|
+
listeners.add(onStoreChange);
|
|
575
|
+
if (listeners.size === 1) {
|
|
576
|
+
padding = measure();
|
|
577
|
+
const observer = new MutationObserver(sync);
|
|
578
|
+
observer.observe(document.documentElement, { attributes: true, attributeFilter: ["style"] });
|
|
579
|
+
const viewport = window.visualViewport;
|
|
580
|
+
_optionalChain([viewport, 'optionalAccess', _9 => _9.addEventListener, 'call', _10 => _10("resize", sync)]);
|
|
581
|
+
_optionalChain([viewport, 'optionalAccess', _11 => _11.addEventListener, 'call', _12 => _12("scroll", sync)]);
|
|
582
|
+
teardown = () => {
|
|
583
|
+
observer.disconnect();
|
|
584
|
+
_optionalChain([viewport, 'optionalAccess', _13 => _13.removeEventListener, 'call', _14 => _14("resize", sync)]);
|
|
585
|
+
_optionalChain([viewport, 'optionalAccess', _15 => _15.removeEventListener, 'call', _16 => _16("scroll", sync)]);
|
|
586
|
+
};
|
|
587
|
+
}
|
|
588
|
+
return () => {
|
|
589
|
+
listeners.delete(onStoreChange);
|
|
590
|
+
if (listeners.size > 0) return;
|
|
591
|
+
_optionalChain([teardown, 'optionalCall', _17 => _17()]);
|
|
592
|
+
teardown = null;
|
|
593
|
+
};
|
|
594
|
+
}
|
|
595
|
+
function useKeyboardCollisionPadding() {
|
|
596
|
+
return _react.useSyncExternalStore.call(void 0,
|
|
597
|
+
subscribe,
|
|
598
|
+
() => padding,
|
|
599
|
+
() => 0
|
|
600
|
+
);
|
|
601
|
+
}
|
|
602
|
+
|
|
550
603
|
// src/hooks/ui/use-local-storage.ts
|
|
551
604
|
|
|
552
605
|
function useLocalStorage(key, initialValue) {
|
|
@@ -639,7 +692,7 @@ function useMarqueeEngine(options) {
|
|
|
639
692
|
const wrap = _react.useCallback.call(void 0, (pos) => {
|
|
640
693
|
const half = optsRef.current.getWrapSize();
|
|
641
694
|
if (half <= 0) return pos;
|
|
642
|
-
const min = _nullishCoalesce(_optionalChain([optsRef, 'access',
|
|
695
|
+
const min = _nullishCoalesce(_optionalChain([optsRef, 'access', _18 => _18.current, 'access', _19 => _19.getWrapMin, 'optionalCall', _20 => _20()]), () => ( 0));
|
|
643
696
|
while (pos >= min + half) pos -= half;
|
|
644
697
|
while (pos < min) pos += half;
|
|
645
698
|
return pos;
|
|
@@ -683,7 +736,7 @@ function useMarqueeEngine(options) {
|
|
|
683
736
|
} else if (external !== null) {
|
|
684
737
|
posRef.current = external;
|
|
685
738
|
}
|
|
686
|
-
_optionalChain([opts, 'access',
|
|
739
|
+
_optionalChain([opts, 'access', _21 => _21.onAfterFrame, 'optionalCall', _22 => _22()]);
|
|
687
740
|
raf = requestAnimationFrame(tick);
|
|
688
741
|
};
|
|
689
742
|
raf = requestAnimationFrame(tick);
|
|
@@ -748,22 +801,22 @@ function useNotificationPermission() {
|
|
|
748
801
|
_react.useEffect.call(void 0, () => {
|
|
749
802
|
if (typeof window === "undefined" || !("Notification" in window)) return;
|
|
750
803
|
setSupported(true);
|
|
751
|
-
const
|
|
752
|
-
|
|
804
|
+
const sync2 = () => setPermission(Notification.permission);
|
|
805
|
+
sync2();
|
|
753
806
|
let cancelled = false;
|
|
754
807
|
let status;
|
|
755
|
-
_optionalChain([navigator, 'access',
|
|
808
|
+
_optionalChain([navigator, 'access', _23 => _23.permissions, 'optionalAccess', _24 => _24.query, 'call', _25 => _25({ name: "notifications" }), 'access', _26 => _26.then, 'call', _27 => _27((s) => {
|
|
756
809
|
if (cancelled) return;
|
|
757
810
|
status = s;
|
|
758
|
-
s.addEventListener("change",
|
|
759
|
-
}), 'access',
|
|
760
|
-
document.addEventListener("visibilitychange",
|
|
761
|
-
window.addEventListener("focus",
|
|
811
|
+
s.addEventListener("change", sync2);
|
|
812
|
+
}), 'access', _28 => _28.catch, 'call', _29 => _29(() => void 0)]);
|
|
813
|
+
document.addEventListener("visibilitychange", sync2);
|
|
814
|
+
window.addEventListener("focus", sync2);
|
|
762
815
|
return () => {
|
|
763
816
|
cancelled = true;
|
|
764
|
-
_optionalChain([status, 'optionalAccess',
|
|
765
|
-
document.removeEventListener("visibilitychange",
|
|
766
|
-
window.removeEventListener("focus",
|
|
817
|
+
_optionalChain([status, 'optionalAccess', _30 => _30.removeEventListener, 'call', _31 => _31("change", sync2)]);
|
|
818
|
+
document.removeEventListener("visibilitychange", sync2);
|
|
819
|
+
window.removeEventListener("focus", sync2);
|
|
767
820
|
};
|
|
768
821
|
}, []);
|
|
769
822
|
const request = _react.useCallback.call(void 0, async () => {
|
|
@@ -1397,7 +1450,7 @@ var toolIconMap = {
|
|
|
1397
1450
|
[ToolTypeValues.OSQUERY]: (size, className) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUTVOBFXRcjs.OsqueryLogoGreyIcon, { size, className }),
|
|
1398
1451
|
[ToolTypeValues.SYSTEM]: () => null
|
|
1399
1452
|
};
|
|
1400
|
-
var ToolIcon = ({ toolType, size = 16, className }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: _nullishCoalesce(_optionalChain([toolIconMap, 'access',
|
|
1453
|
+
var ToolIcon = ({ toolType, size = 16, className }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: _nullishCoalesce(_optionalChain([toolIconMap, 'access', _32 => _32[toolType], 'optionalCall', _33 => _33(size, className)]), () => ( null)) });
|
|
1401
1454
|
ToolIcon.displayName = "ToolIcon";
|
|
1402
1455
|
|
|
1403
1456
|
// src/components/ui/toaster.tsx
|
|
@@ -1516,11 +1569,11 @@ function CommandApprovalToast({
|
|
|
1516
1569
|
}) {
|
|
1517
1570
|
const [expanded, setExpanded] = React2.useState(defaultExpanded);
|
|
1518
1571
|
const handleApprove = () => {
|
|
1519
|
-
_optionalChain([onApprove, 'optionalCall',
|
|
1572
|
+
_optionalChain([onApprove, 'optionalCall', _34 => _34()]);
|
|
1520
1573
|
_sonner.toast.dismiss(id);
|
|
1521
1574
|
};
|
|
1522
1575
|
const handleReject = () => {
|
|
1523
|
-
_optionalChain([onReject, 'optionalCall',
|
|
1576
|
+
_optionalChain([onReject, 'optionalCall', _35 => _35()]);
|
|
1524
1577
|
_sonner.toast.dismiss(id);
|
|
1525
1578
|
};
|
|
1526
1579
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -1743,7 +1796,7 @@ function createLocalStorageAdapter(options) {
|
|
|
1743
1796
|
const tag = _nullishCoalesce(options.logTag, () => ( "[local-storage]"));
|
|
1744
1797
|
const backend = _nullishCoalesce(options.backend, () => ( "local"));
|
|
1745
1798
|
const resolveKey = () => {
|
|
1746
|
-
const ns = _optionalChain([options, 'access',
|
|
1799
|
+
const ns = _optionalChain([options, 'access', _36 => _36.namespace, 'optionalCall', _37 => _37()]);
|
|
1747
1800
|
return ns ? `${ns}.${options.key}` : options.key;
|
|
1748
1801
|
};
|
|
1749
1802
|
return {
|
|
@@ -1834,7 +1887,7 @@ function getEmbedProxyAuth() {
|
|
|
1834
1887
|
}
|
|
1835
1888
|
function getPersistedProxyEmail() {
|
|
1836
1889
|
const persisted = adapter.load();
|
|
1837
|
-
return _nullishCoalesce(_optionalChain([persisted, 'optionalAccess',
|
|
1890
|
+
return _nullishCoalesce(_optionalChain([persisted, 'optionalAccess', _38 => _38.email, 'access', _39 => _39.trim, 'call', _40 => _40(), 'access', _41 => _41.toLowerCase, 'call', _42 => _42()]), () => ( null));
|
|
1838
1891
|
}
|
|
1839
1892
|
function setEmbedProxyAuth(value) {
|
|
1840
1893
|
adapter.save({
|
|
@@ -1851,15 +1904,15 @@ function clearEmbedProxyAuth() {
|
|
|
1851
1904
|
function applyProxyAuth(url, baseHeaders = { "Content-Type": "application/json" }) {
|
|
1852
1905
|
const auth = getEmbedProxyAuth();
|
|
1853
1906
|
const headers = { ...baseHeaders };
|
|
1854
|
-
if (_optionalChain([auth, 'optionalAccess',
|
|
1907
|
+
if (_optionalChain([auth, 'optionalAccess', _43 => _43.secret])) {
|
|
1855
1908
|
headers.Authorization = `Bearer ${auth.secret}`;
|
|
1856
1909
|
}
|
|
1857
|
-
if (_optionalChain([auth, 'optionalAccess',
|
|
1910
|
+
if (_optionalChain([auth, 'optionalAccess', _44 => _44.email])) {
|
|
1858
1911
|
headers["X-Chat-Act-As"] = auth.email;
|
|
1859
1912
|
}
|
|
1860
|
-
if (_optionalChain([auth, 'optionalAccess',
|
|
1861
|
-
if (_optionalChain([auth, 'optionalAccess',
|
|
1862
|
-
if (_optionalChain([auth, 'optionalAccess',
|
|
1913
|
+
if (_optionalChain([auth, 'optionalAccess', _45 => _45.firstName])) headers["X-Chat-First-Name"] = auth.firstName;
|
|
1914
|
+
if (_optionalChain([auth, 'optionalAccess', _46 => _46.lastName])) headers["X-Chat-Last-Name"] = auth.lastName;
|
|
1915
|
+
if (_optionalChain([auth, 'optionalAccess', _47 => _47.avatarUrl])) headers["X-Chat-Avatar-Url"] = auth.avatarUrl;
|
|
1863
1916
|
return { url, headers };
|
|
1864
1917
|
}
|
|
1865
1918
|
|
|
@@ -1887,7 +1940,7 @@ function hasEmbedAuthAdapter() {
|
|
|
1887
1940
|
function needsBearerAssetFetch(url) {
|
|
1888
1941
|
if (typeof window === "undefined") return false;
|
|
1889
1942
|
const adapter2 = getRegisteredAuthAdapter();
|
|
1890
|
-
if (!_optionalChain([adapter2, 'optionalAccess',
|
|
1943
|
+
if (!_optionalChain([adapter2, 'optionalAccess', _48 => _48.allowedOrigins, 'optionalAccess', _49 => _49.length]) || _optionalChain([adapter2, 'access', _50 => _50.getHeaders, 'optionalCall', _51 => _51(), 'access', _52 => _52.Authorization]) === void 0) {
|
|
1891
1944
|
return false;
|
|
1892
1945
|
}
|
|
1893
1946
|
let target;
|
|
@@ -1929,7 +1982,7 @@ function setInFlightRefresh(refresh) {
|
|
|
1929
1982
|
}
|
|
1930
1983
|
function dedupedRefresh() {
|
|
1931
1984
|
const adapter2 = getRegisteredAuthAdapter();
|
|
1932
|
-
if (!_optionalChain([adapter2, 'optionalAccess',
|
|
1985
|
+
if (!_optionalChain([adapter2, 'optionalAccess', _53 => _53.refresh])) return Promise.resolve(false);
|
|
1933
1986
|
let inFlightRefresh = getInFlightRefresh();
|
|
1934
1987
|
if (!inFlightRefresh) {
|
|
1935
1988
|
inFlightRefresh = Promise.resolve().then(() => adapter2.refresh()).catch(() => false).finally(() => {
|
|
@@ -1942,12 +1995,12 @@ function dedupedRefresh() {
|
|
|
1942
1995
|
async function fetchWithRefresh(url, init, baseHeaders, isRetry) {
|
|
1943
1996
|
const { url: authedUrl, headers } = applyProxyAuth(url, { ...baseHeaders });
|
|
1944
1997
|
const adapter2 = getRegisteredAuthAdapter();
|
|
1945
|
-
if (_optionalChain([adapter2, 'optionalAccess',
|
|
1998
|
+
if (_optionalChain([adapter2, 'optionalAccess', _54 => _54.getHeaders])) {
|
|
1946
1999
|
for (const [k, v] of Object.entries(adapter2.getHeaders())) {
|
|
1947
2000
|
if (v !== void 0) headers[k] = v;
|
|
1948
2001
|
}
|
|
1949
2002
|
}
|
|
1950
|
-
const credentials = _nullishCoalesce(_nullishCoalesce(_optionalChain([adapter2, 'optionalAccess',
|
|
2003
|
+
const credentials = _nullishCoalesce(_nullishCoalesce(_optionalChain([adapter2, 'optionalAccess', _55 => _55.credentials]), () => ( init.credentials)), () => ( "same-origin"));
|
|
1951
2004
|
const response = await fetch(authedUrl, {
|
|
1952
2005
|
...init,
|
|
1953
2006
|
headers,
|
|
@@ -1958,7 +2011,7 @@ async function fetchWithRefresh(url, init, baseHeaders, isRetry) {
|
|
|
1958
2011
|
// `SameSite=None` must be configured server-side for that to work).
|
|
1959
2012
|
credentials
|
|
1960
2013
|
});
|
|
1961
|
-
if (response.status === 401 && !isRetry && _optionalChain([adapter2, 'optionalAccess',
|
|
2014
|
+
if (response.status === 401 && !isRetry && _optionalChain([adapter2, 'optionalAccess', _56 => _56.refresh])) {
|
|
1962
2015
|
const refreshed = await dedupedRefresh();
|
|
1963
2016
|
if (refreshed) {
|
|
1964
2017
|
return fetchWithRefresh(url, init, baseHeaders, true);
|
|
@@ -1982,7 +2035,7 @@ function assertSameOrigin(url) {
|
|
|
1982
2035
|
);
|
|
1983
2036
|
}
|
|
1984
2037
|
if (target.origin !== pageOrigin) {
|
|
1985
|
-
if (_optionalChain([getRegisteredAuthAdapter, 'call',
|
|
2038
|
+
if (_optionalChain([getRegisteredAuthAdapter, 'call', _57 => _57(), 'optionalAccess', _58 => _58.allowedOrigins, 'optionalAccess', _59 => _59.includes, 'call', _60 => _60(target.origin)])) {
|
|
1986
2039
|
return;
|
|
1987
2040
|
}
|
|
1988
2041
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -2630,7 +2683,7 @@ function setNestedValue(obj, path, value) {
|
|
|
2630
2683
|
}
|
|
2631
2684
|
function getNestedValue(obj, path) {
|
|
2632
2685
|
return path.split(".").reduce((current, key) => {
|
|
2633
|
-
return _optionalChain([current, 'optionalAccess',
|
|
2686
|
+
return _optionalChain([current, 'optionalAccess', _61 => _61[key]]);
|
|
2634
2687
|
}, obj);
|
|
2635
2688
|
}
|
|
2636
2689
|
function mergeVariables(currentVariables, updates, schema) {
|
|
@@ -3405,7 +3458,7 @@ function useNearViewport(rootMargin = NEAR_VIEWPORT_ROOT_MARGIN, threshold = 0)
|
|
|
3405
3458
|
const stillOurs = subscribers.get(prev);
|
|
3406
3459
|
if (stillOurs) {
|
|
3407
3460
|
subscribers.delete(prev);
|
|
3408
|
-
_optionalChain([observers, 'access',
|
|
3461
|
+
_optionalChain([observers, 'access', _62 => _62.get, 'call', _63 => _63(key), 'optionalAccess', _64 => _64.unobserve, 'call', _65 => _65(prev)]);
|
|
3409
3462
|
}
|
|
3410
3463
|
}
|
|
3411
3464
|
elRef.current = node;
|
|
@@ -3422,7 +3475,7 @@ function useNearViewport(rootMargin = NEAR_VIEWPORT_ROOT_MARGIN, threshold = 0)
|
|
|
3422
3475
|
if (!el) return;
|
|
3423
3476
|
if (subscribers.get(el)) {
|
|
3424
3477
|
subscribers.delete(el);
|
|
3425
|
-
_optionalChain([observers, 'access',
|
|
3478
|
+
_optionalChain([observers, 'access', _66 => _66.get, 'call', _67 => _67(key), 'optionalAccess', _68 => _68.unobserve, 'call', _69 => _69(el)]);
|
|
3426
3479
|
}
|
|
3427
3480
|
};
|
|
3428
3481
|
}, [key]);
|
|
@@ -3537,8 +3590,8 @@ function useAccessCodeIntegration() {
|
|
|
3537
3590
|
// src/utils/og-placeholder.ts
|
|
3538
3591
|
var DEFAULT_OG_PLACEHOLDER_PATH = "/api/og-placeholder";
|
|
3539
3592
|
function resolveOgPlaceholderBase(endpoints) {
|
|
3540
|
-
if (_optionalChain([endpoints, 'optionalAccess',
|
|
3541
|
-
const imageProxy = _optionalChain([endpoints, 'optionalAccess',
|
|
3593
|
+
if (_optionalChain([endpoints, 'optionalAccess', _70 => _70.ogPlaceholderUrl])) return endpoints.ogPlaceholderUrl;
|
|
3594
|
+
const imageProxy = _optionalChain([endpoints, 'optionalAccess', _71 => _71.imageProxyUrlPrefix]);
|
|
3542
3595
|
if (imageProxy) {
|
|
3543
3596
|
const derived = imageProxy.replace(/\/image-proxy(?=$|[?/])/, "/og-placeholder");
|
|
3544
3597
|
if (derived !== imageProxy) return derived;
|
|
@@ -3566,7 +3619,7 @@ function useOgPlaceholderUrl({
|
|
|
3566
3619
|
aspect = "wide",
|
|
3567
3620
|
enabled = true
|
|
3568
3621
|
}) {
|
|
3569
|
-
const endpoints = _optionalChain([_chunk7OPWSWEJcjs.useChatRuntime.call(void 0, ), 'optionalAccess',
|
|
3622
|
+
const endpoints = _optionalChain([_chunk7OPWSWEJcjs.useChatRuntime.call(void 0, ), 'optionalAccess', _72 => _72.endpoints]);
|
|
3570
3623
|
return _react.useMemo.call(void 0, () => {
|
|
3571
3624
|
if (!enabled || !title) return null;
|
|
3572
3625
|
return buildOgPlaceholderUrl(endpoints, title, { site: siteName || void 0, aspect });
|
|
@@ -3713,7 +3766,7 @@ function scanHeadings(content, options = {}) {
|
|
|
3713
3766
|
const lines = content.split("\n");
|
|
3714
3767
|
const fences = skipFences ? createFenceTracker() : null;
|
|
3715
3768
|
let start = 0;
|
|
3716
|
-
if (skipFrontmatter && _optionalChain([lines, 'access',
|
|
3769
|
+
if (skipFrontmatter && _optionalChain([lines, 'access', _73 => _73[0], 'optionalAccess', _74 => _74.trim, 'call', _75 => _75()]) === "---") {
|
|
3717
3770
|
for (let i = 1; i < lines.length; i++) {
|
|
3718
3771
|
if (lines[i].trim() === "---" || lines[i].trim() === "...") {
|
|
3719
3772
|
start = i + 1;
|
|
@@ -3731,7 +3784,7 @@ function scanHeadings(content, options = {}) {
|
|
|
3731
3784
|
continue;
|
|
3732
3785
|
}
|
|
3733
3786
|
}
|
|
3734
|
-
const prefix = _nullishCoalesce(_optionalChain([CONTAINER_PREFIX_RE, 'access',
|
|
3787
|
+
const prefix = _nullishCoalesce(_optionalChain([CONTAINER_PREFIX_RE, 'access', _76 => _76.exec, 'call', _77 => _77(line), 'optionalAccess', _78 => _78[0]]), () => ( ""));
|
|
3735
3788
|
const body = prefix ? line.slice(prefix.length) : line;
|
|
3736
3789
|
const setext = SETEXT_UNDERLINE_RE.exec(body);
|
|
3737
3790
|
if (setext) {
|
|
@@ -3898,7 +3951,7 @@ function navigateSamePageHash(target, options = {}) {
|
|
|
3898
3951
|
// src/hooks/use-scroll-to-hash.ts
|
|
3899
3952
|
var MAX_POLL_FRAMES = 60;
|
|
3900
3953
|
function useScrollToHash(readyDep = true, options) {
|
|
3901
|
-
const headerOffset = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3954
|
+
const headerOffset = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _79 => _79.headerOffset]), () => ( 0));
|
|
3902
3955
|
_react.useEffect.call(void 0, () => {
|
|
3903
3956
|
if (typeof window === "undefined") return;
|
|
3904
3957
|
if (readyDep === null || readyDep === false) return;
|
|
@@ -3960,7 +4013,7 @@ function evaluateHumanitySignals(body, opts) {
|
|
|
3960
4013
|
if (elapsedMs !== null && elapsedMs < opts.minFillMs) return { ok: false, reason: "too_fast" };
|
|
3961
4014
|
return { ok: true };
|
|
3962
4015
|
}
|
|
3963
|
-
var splitCsvEnv = (s) => _nullishCoalesce(_optionalChain([s, 'optionalAccess',
|
|
4016
|
+
var splitCsvEnv = (s) => _nullishCoalesce(_optionalChain([s, 'optionalAccess', _80 => _80.split, 'call', _81 => _81(","), 'access', _82 => _82.map, 'call', _83 => _83((t) => t.trim()), 'access', _84 => _84.filter, 'call', _85 => _85(Boolean)]), () => ( []));
|
|
3964
4017
|
|
|
3965
4018
|
// src/hooks/use-humanity-signals.ts
|
|
3966
4019
|
function useHumanitySignals() {
|
|
@@ -3968,7 +4021,7 @@ function useHumanitySignals() {
|
|
|
3968
4021
|
const mountedAt = _react.useRef.call(void 0, typeof performance !== "undefined" ? performance.now() : 0);
|
|
3969
4022
|
const getSignals = _react.useCallback.call(void 0,
|
|
3970
4023
|
() => ({
|
|
3971
|
-
[HONEYPOT_FIELD]: _nullishCoalesce(_optionalChain([ref, 'access',
|
|
4024
|
+
[HONEYPOT_FIELD]: _nullishCoalesce(_optionalChain([ref, 'access', _86 => _86.current, 'optionalAccess', _87 => _87.value]), () => ( "")),
|
|
3972
4025
|
[ELAPSED_MS_FIELD]: typeof performance !== "undefined" ? Math.round(performance.now() - mountedAt.current) : 0
|
|
3973
4026
|
}),
|
|
3974
4027
|
[]
|
|
@@ -4115,5 +4168,6 @@ function useHumanitySignals() {
|
|
|
4115
4168
|
|
|
4116
4169
|
|
|
4117
4170
|
|
|
4118
|
-
|
|
4119
|
-
|
|
4171
|
+
|
|
4172
|
+
exports.useIsTruncated = useIsTruncated; exports.useAutoLimitTags = useAutoLimitTags; exports.useKeyboardCollisionPadding = useKeyboardCollisionPadding; exports.useDebounce = useDebounce; exports.useDeferredError = useDeferredError; exports.useFocusTrap = useFocusTrap; exports.useHeaderHeight = useHeaderHeight; exports.useHorizontalScrollbar = useHorizontalScrollbar; exports.useImageEdgeColor = useImageEdgeColor; exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect; 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.useResetOnPageHidden = useResetOnPageHidden; 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.createLocalStorageAdapter = createLocalStorageAdapter; 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.useCopyToClipboard = useCopyToClipboard; exports.configureBatchImageFetch = configureBatchImageFetch; exports.batchFetchAuthenticatedImages = batchFetchAuthenticatedImages; exports.useBatchImages = useBatchImages; exports.configureAuthenticatedImage = configureAuthenticatedImage; exports.useAuthenticatedImage = useAuthenticatedImage; exports.clearAuthedImageCache = clearAuthedImageCache; exports.useAuthedImageSrc = useAuthedImageSrc; 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.isBlankLine = isBlankLine; exports.createFenceTracker = createFenceTracker; exports.HEADING_EMOJI_RE = HEADING_EMOJI_RE; exports.stripHeadingEmojis = stripHeadingEmojis; exports.slugifyHeadingBase = slugifyHeadingBase; exports.slugifyHeadingText = slugifyHeadingText; exports.scanHeadings = scanHeadings; exports.createHeadingIdDeduper = createHeadingIdDeduper; exports.normalizeAnchorId = normalizeAnchorId; exports.findAnchorElementByNormalizedId = findAnchorElementByNormalizedId; exports.STICKY_HEADER_OFFSET_PX = STICKY_HEADER_OFFSET_PX; exports.HUB_HEADER_OFFSET_PX = HUB_HEADER_OFFSET_PX; exports.normalizeHashFragment = normalizeHashFragment; exports.getHashTargetElement = getHashTargetElement; 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.HUMANITY_SIGNAL_KEYS = HUMANITY_SIGNAL_KEYS; exports.extractHumanitySignals = extractHumanitySignals; exports.evaluateHumanitySignals = evaluateHumanitySignals; exports.splitCsvEnv = splitCsvEnv; exports.useHumanitySignals = useHumanitySignals;
|
|
4173
|
+
//# sourceMappingURL=chunk-5RJUHUCI.cjs.map
|