@flamingo-stack/openframe-frontend-core 0.0.409 → 0.0.410-snapshot.20260711165901
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-STGWQFYT.cjs → chunk-3SNDISEN.cjs} +92 -30
- package/dist/chunk-3SNDISEN.cjs.map +1 -0
- package/dist/{chunk-RL344I7V.cjs → chunk-3U4IZF7H.cjs} +7 -7
- package/dist/{chunk-RL344I7V.cjs.map → chunk-3U4IZF7H.cjs.map} +1 -1
- package/dist/{chunk-7Q52HP45.js → chunk-4FNDOTW2.js} +139 -77
- package/dist/chunk-4FNDOTW2.js.map +1 -0
- package/dist/{chunk-O5W26SCL.js → chunk-6AB36PRE.js} +2 -2
- package/dist/{chunk-IK5AR6QG.js → chunk-B2BERJ4M.js} +6 -6
- package/dist/{chunk-SOALFYU6.cjs → chunk-BKYV2ALJ.cjs} +582 -591
- package/dist/chunk-BKYV2ALJ.cjs.map +1 -0
- package/dist/{chunk-KPGKNUJF.cjs → chunk-BRHCGXOH.cjs} +40 -40
- package/dist/{chunk-KPGKNUJF.cjs.map → chunk-BRHCGXOH.cjs.map} +1 -1
- package/dist/{chunk-NO2KT42M.js → chunk-DGIF3YDV.js} +2 -2
- package/dist/{chunk-LQWYXIKB.js → chunk-FXZO4EKN.js} +5 -5
- package/dist/{chunk-CUN4CJUN.cjs → chunk-G2G7HLEM.cjs} +3 -3
- package/dist/{chunk-CUN4CJUN.cjs.map → chunk-G2G7HLEM.cjs.map} +1 -1
- package/dist/{chunk-NEMUCNCG.cjs → chunk-H4ISMWHG.cjs} +73 -73
- package/dist/{chunk-NEMUCNCG.cjs.map → chunk-H4ISMWHG.cjs.map} +1 -1
- package/dist/{chunk-L6OPVKVR.js → chunk-HXRULNWA.js} +5 -5
- package/dist/{chunk-RPGFIUN3.cjs → chunk-MF5CVIAC.cjs} +32 -32
- package/dist/{chunk-RPGFIUN3.cjs.map → chunk-MF5CVIAC.cjs.map} +1 -1
- package/dist/{chunk-J6M2G6TD.js → chunk-MHNBDSWH.js} +6 -6
- package/dist/{chunk-E4J5KKHH.js → chunk-NJSBYUJZ.js} +3 -3
- package/dist/{chunk-YRKPMYI3.cjs → chunk-RALT6D4H.cjs} +15 -15
- package/dist/{chunk-YRKPMYI3.cjs.map → chunk-RALT6D4H.cjs.map} +1 -1
- package/dist/{chunk-ZMFQWMM7.js → chunk-SAJM3PDE.js} +2 -2
- package/dist/{chunk-V3EZQWHQ.cjs → chunk-SMLAYAIW.cjs} +5 -5
- package/dist/{chunk-V3EZQWHQ.cjs.map → chunk-SMLAYAIW.cjs.map} +1 -1
- package/dist/{chunk-5HOII3WB.js → chunk-SOLI7V4I.js} +4 -4
- package/dist/{chunk-WGOATV3P.cjs → chunk-SZ27SV6T.cjs} +73 -73
- package/dist/{chunk-WGOATV3P.cjs.map → chunk-SZ27SV6T.cjs.map} +1 -1
- package/dist/{chunk-ZF5O3KUQ.js → chunk-TYCWPT33.js} +3 -3
- package/dist/{chunk-F4KE5AZO.cjs → chunk-VTTPNZX3.cjs} +40 -40
- package/dist/{chunk-F4KE5AZO.cjs.map → chunk-VTTPNZX3.cjs.map} +1 -1
- package/dist/{chunk-T6ZUBXPA.cjs → chunk-VXM2GCKS.cjs} +12 -12
- package/dist/{chunk-T6ZUBXPA.cjs.map → chunk-VXM2GCKS.cjs.map} +1 -1
- package/dist/{chunk-KZPVN7AZ.js → chunk-XBC5AES6.js} +2 -2
- package/dist/{chunk-KRLBVBYU.cjs → chunk-XVPWVG6N.cjs} +18 -18
- package/dist/{chunk-KRLBVBYU.cjs.map → chunk-XVPWVG6N.cjs.map} +1 -1
- package/dist/{chunk-IVM47EGI.js → chunk-YVJ2XBFU.js} +389 -398
- package/dist/chunk-YVJ2XBFU.js.map +1 -0
- package/dist/{chunk-VUW4G6SU.js → chunk-Z4RKJOFH.js} +3 -3
- package/dist/{chunk-A3RW7M6B.cjs → chunk-ZZWFS7CD.cjs} +29 -29
- package/dist/{chunk-A3RW7M6B.cjs.map → chunk-ZZWFS7CD.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 +22 -22
- package/dist/components/help-center-pages/index.js +13 -13
- package/dist/components/index.cjs +137 -135
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +14 -12
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/header.d.ts.map +1 -1
- package/dist/components/navigation/index.cjs +5 -3
- package/dist/components/navigation/index.cjs.map +1 -1
- package/dist/components/navigation/index.d.ts +1 -1
- package/dist/components/navigation/index.d.ts.map +1 -1
- package/dist/components/navigation/index.js +4 -2
- package/dist/components/navigation/mobile-burger-menu.d.ts.map +1 -1
- package/dist/components/navigation/mobile-nav-panel.d.ts +2 -0
- package/dist/components/navigation/mobile-nav-panel.d.ts.map +1 -1
- package/dist/components/navigation/sliding-sidebar.d.ts.map +1 -1
- 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 +3 -3
- package/dist/components/ui/index.js +2 -2
- package/dist/components/ui/modal-v2.d.ts.map +1 -1
- package/dist/components/ui/modal.d.ts.map +1 -1
- 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-focus-trap.d.ts +32 -0
- package/dist/hooks/ui/use-focus-trap.d.ts.map +1 -0
- package/dist/hooks/ui/use-header-height.d.ts +10 -1
- package/dist/hooks/ui/use-header-height.d.ts.map +1 -1
- package/dist/index.cjs +9 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -2
- package/package.json +1 -1
- package/src/components/announcement-bar.tsx +1 -1
- package/src/components/navigation/header.tsx +5 -0
- package/src/components/navigation/index.ts +1 -1
- package/src/components/navigation/mobile-burger-menu.tsx +16 -29
- package/src/components/navigation/mobile-nav-panel.tsx +32 -35
- package/src/components/navigation/sliding-sidebar.tsx +29 -9
- package/src/components/ui/modal-v2.tsx +7 -6
- package/src/components/ui/modal.tsx +7 -9
- package/src/hooks/ui/index.ts +6 -0
- package/src/hooks/ui/use-focus-trap.ts +110 -0
- package/src/hooks/ui/use-header-height.ts +17 -2
- package/src/stories/MobileNavPanel.stories.tsx +150 -0
- package/dist/chunk-7Q52HP45.js.map +0 -1
- package/dist/chunk-IVM47EGI.js.map +0 -1
- package/dist/chunk-SOALFYU6.cjs.map +0 -1
- package/dist/chunk-STGWQFYT.cjs.map +0 -1
- /package/dist/{chunk-O5W26SCL.js.map → chunk-6AB36PRE.js.map} +0 -0
- /package/dist/{chunk-IK5AR6QG.js.map → chunk-B2BERJ4M.js.map} +0 -0
- /package/dist/{chunk-NO2KT42M.js.map → chunk-DGIF3YDV.js.map} +0 -0
- /package/dist/{chunk-LQWYXIKB.js.map → chunk-FXZO4EKN.js.map} +0 -0
- /package/dist/{chunk-L6OPVKVR.js.map → chunk-HXRULNWA.js.map} +0 -0
- /package/dist/{chunk-J6M2G6TD.js.map → chunk-MHNBDSWH.js.map} +0 -0
- /package/dist/{chunk-E4J5KKHH.js.map → chunk-NJSBYUJZ.js.map} +0 -0
- /package/dist/{chunk-ZMFQWMM7.js.map → chunk-SAJM3PDE.js.map} +0 -0
- /package/dist/{chunk-5HOII3WB.js.map → chunk-SOLI7V4I.js.map} +0 -0
- /package/dist/{chunk-ZF5O3KUQ.js.map → chunk-TYCWPT33.js.map} +0 -0
- /package/dist/{chunk-KZPVN7AZ.js.map → chunk-XBC5AES6.js.map} +0 -0
- /package/dist/{chunk-VUW4G6SU.js.map → chunk-Z4RKJOFH.js.map} +0 -0
|
@@ -141,11 +141,68 @@ function useDeferredError(error, value, delay = 1500) {
|
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
+
// src/hooks/ui/use-focus-trap.ts
|
|
145
|
+
|
|
146
|
+
var FOCUSABLE_SELECTOR = [
|
|
147
|
+
"a[href]",
|
|
148
|
+
"button:not([disabled])",
|
|
149
|
+
"input:not([disabled])",
|
|
150
|
+
"select:not([disabled])",
|
|
151
|
+
"textarea:not([disabled])",
|
|
152
|
+
'[tabindex]:not([tabindex="-1"])'
|
|
153
|
+
].join(", ");
|
|
154
|
+
function useFocusTrap(containerRef, active, { onEscape, contain = true } = {}) {
|
|
155
|
+
const onEscapeRef = _react.useRef.call(void 0, onEscape);
|
|
156
|
+
onEscapeRef.current = onEscape;
|
|
157
|
+
_react.useEffect.call(void 0, () => {
|
|
158
|
+
if (!active) return;
|
|
159
|
+
const container = containerRef.current;
|
|
160
|
+
if (!container) return;
|
|
161
|
+
const previouslyFocused = document.activeElement;
|
|
162
|
+
const focusables = () => Array.from(container.querySelectorAll(FOCUSABLE_SELECTOR)).filter((el) => el.getClientRects().length > 0);
|
|
163
|
+
const first = focusables()[0];
|
|
164
|
+
(_nullishCoalesce(first, () => ( container))).focus({ preventScroll: true });
|
|
165
|
+
const handleKeyDown = (e) => {
|
|
166
|
+
if (e.key === "Escape") {
|
|
167
|
+
_optionalChain([onEscapeRef, 'access', _6 => _6.current, 'optionalCall', _7 => _7()]);
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
if (e.key !== "Tab" || !contain) return;
|
|
171
|
+
const items = focusables();
|
|
172
|
+
if (items.length === 0) {
|
|
173
|
+
e.preventDefault();
|
|
174
|
+
container.focus({ preventScroll: true });
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
const firstEl = items[0];
|
|
178
|
+
const lastEl = items[items.length - 1];
|
|
179
|
+
const current = document.activeElement;
|
|
180
|
+
if (e.shiftKey && (current === firstEl || current === container)) {
|
|
181
|
+
e.preventDefault();
|
|
182
|
+
lastEl.focus({ preventScroll: true });
|
|
183
|
+
} else if (!e.shiftKey && current === lastEl) {
|
|
184
|
+
e.preventDefault();
|
|
185
|
+
firstEl.focus({ preventScroll: true });
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
container.addEventListener("keydown", handleKeyDown);
|
|
189
|
+
return () => {
|
|
190
|
+
container.removeEventListener("keydown", handleKeyDown);
|
|
191
|
+
const current = document.activeElement;
|
|
192
|
+
if (previouslyFocused && previouslyFocused.isConnected && (current === null || current === document.body || container.contains(current))) {
|
|
193
|
+
previouslyFocused.focus({ preventScroll: true });
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
}, [containerRef, active, contain]);
|
|
197
|
+
}
|
|
198
|
+
|
|
144
199
|
// src/hooks/ui/use-header-height.ts
|
|
145
200
|
|
|
146
|
-
function useHeaderHeight(defaultHeight = 64) {
|
|
201
|
+
function useHeaderHeight(defaultHeight = 64, options = {}) {
|
|
202
|
+
const { enabled = true } = options;
|
|
147
203
|
const [height, setHeight] = _react.useState.call(void 0, defaultHeight);
|
|
148
204
|
_react.useEffect.call(void 0, () => {
|
|
205
|
+
if (!enabled) return;
|
|
149
206
|
const measure = () => {
|
|
150
207
|
let total = 0;
|
|
151
208
|
const header2 = document.querySelector("header");
|
|
@@ -179,7 +236,7 @@ function useHeaderHeight(defaultHeight = 64) {
|
|
|
179
236
|
resizeObserver.disconnect();
|
|
180
237
|
mutationObserver.disconnect();
|
|
181
238
|
};
|
|
182
|
-
}, [defaultHeight]);
|
|
239
|
+
}, [defaultHeight, enabled]);
|
|
183
240
|
return height;
|
|
184
241
|
}
|
|
185
242
|
|
|
@@ -601,16 +658,16 @@ function useNotificationPermission() {
|
|
|
601
658
|
sync();
|
|
602
659
|
let cancelled = false;
|
|
603
660
|
let status;
|
|
604
|
-
_optionalChain([navigator, 'access',
|
|
661
|
+
_optionalChain([navigator, 'access', _8 => _8.permissions, 'optionalAccess', _9 => _9.query, 'call', _10 => _10({ name: "notifications" }), 'access', _11 => _11.then, 'call', _12 => _12((s) => {
|
|
605
662
|
if (cancelled) return;
|
|
606
663
|
status = s;
|
|
607
664
|
s.addEventListener("change", sync);
|
|
608
|
-
}), 'access',
|
|
665
|
+
}), 'access', _13 => _13.catch, 'call', _14 => _14(() => void 0)]);
|
|
609
666
|
document.addEventListener("visibilitychange", sync);
|
|
610
667
|
window.addEventListener("focus", sync);
|
|
611
668
|
return () => {
|
|
612
669
|
cancelled = true;
|
|
613
|
-
_optionalChain([status, 'optionalAccess',
|
|
670
|
+
_optionalChain([status, 'optionalAccess', _15 => _15.removeEventListener, 'call', _16 => _16("change", sync)]);
|
|
614
671
|
document.removeEventListener("visibilitychange", sync);
|
|
615
672
|
window.removeEventListener("focus", sync);
|
|
616
673
|
};
|
|
@@ -900,6 +957,9 @@ function useWindowSize() {
|
|
|
900
957
|
return windowSize;
|
|
901
958
|
}
|
|
902
959
|
|
|
960
|
+
// src/hooks/ui/index.ts
|
|
961
|
+
var _overlays = require('@react-aria/overlays');
|
|
962
|
+
|
|
903
963
|
// src/hooks/platform/use-platform-config.ts
|
|
904
964
|
|
|
905
965
|
|
|
@@ -1201,7 +1261,7 @@ var toolIconMap = {
|
|
|
1201
1261
|
[ToolTypeValues.OSQUERY]: (size, className) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBGD345ZVcjs.OsqueryLogoGreyIcon, { size, className }),
|
|
1202
1262
|
[ToolTypeValues.SYSTEM]: () => null
|
|
1203
1263
|
};
|
|
1204
|
-
var ToolIcon = ({ toolType, size = 16, className }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: _nullishCoalesce(_optionalChain([toolIconMap, 'access',
|
|
1264
|
+
var ToolIcon = ({ toolType, size = 16, className }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: _nullishCoalesce(_optionalChain([toolIconMap, 'access', _17 => _17[toolType], 'optionalCall', _18 => _18(size, className)]), () => ( null)) });
|
|
1205
1265
|
ToolIcon.displayName = "ToolIcon";
|
|
1206
1266
|
|
|
1207
1267
|
// src/components/ui/toaster.tsx
|
|
@@ -1320,11 +1380,11 @@ function CommandApprovalToast({
|
|
|
1320
1380
|
}) {
|
|
1321
1381
|
const [expanded, setExpanded] = React2.useState(defaultExpanded);
|
|
1322
1382
|
const handleApprove = () => {
|
|
1323
|
-
_optionalChain([onApprove, 'optionalCall',
|
|
1383
|
+
_optionalChain([onApprove, 'optionalCall', _19 => _19()]);
|
|
1324
1384
|
_sonner.toast.dismiss(id);
|
|
1325
1385
|
};
|
|
1326
1386
|
const handleReject = () => {
|
|
1327
|
-
_optionalChain([onReject, 'optionalCall',
|
|
1387
|
+
_optionalChain([onReject, 'optionalCall', _20 => _20()]);
|
|
1328
1388
|
_sonner.toast.dismiss(id);
|
|
1329
1389
|
};
|
|
1330
1390
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -1547,7 +1607,7 @@ function createLocalStorageAdapter(options) {
|
|
|
1547
1607
|
const tag = _nullishCoalesce(options.logTag, () => ( "[local-storage]"));
|
|
1548
1608
|
const backend = _nullishCoalesce(options.backend, () => ( "local"));
|
|
1549
1609
|
const resolveKey = () => {
|
|
1550
|
-
const ns = _optionalChain([options, 'access',
|
|
1610
|
+
const ns = _optionalChain([options, 'access', _21 => _21.namespace, 'optionalCall', _22 => _22()]);
|
|
1551
1611
|
return ns ? `${ns}.${options.key}` : options.key;
|
|
1552
1612
|
};
|
|
1553
1613
|
return {
|
|
@@ -1638,7 +1698,7 @@ function getEmbedProxyAuth() {
|
|
|
1638
1698
|
}
|
|
1639
1699
|
function getPersistedProxyEmail() {
|
|
1640
1700
|
const persisted = adapter.load();
|
|
1641
|
-
return _nullishCoalesce(_optionalChain([persisted, 'optionalAccess',
|
|
1701
|
+
return _nullishCoalesce(_optionalChain([persisted, 'optionalAccess', _23 => _23.email, 'access', _24 => _24.trim, 'call', _25 => _25(), 'access', _26 => _26.toLowerCase, 'call', _27 => _27()]), () => ( null));
|
|
1642
1702
|
}
|
|
1643
1703
|
function setEmbedProxyAuth(value) {
|
|
1644
1704
|
adapter.save({
|
|
@@ -1655,15 +1715,15 @@ function clearEmbedProxyAuth() {
|
|
|
1655
1715
|
function applyProxyAuth(url, baseHeaders = { "Content-Type": "application/json" }) {
|
|
1656
1716
|
const auth = getEmbedProxyAuth();
|
|
1657
1717
|
const headers = { ...baseHeaders };
|
|
1658
|
-
if (_optionalChain([auth, 'optionalAccess',
|
|
1718
|
+
if (_optionalChain([auth, 'optionalAccess', _28 => _28.secret])) {
|
|
1659
1719
|
headers.Authorization = `Bearer ${auth.secret}`;
|
|
1660
1720
|
}
|
|
1661
|
-
if (_optionalChain([auth, 'optionalAccess',
|
|
1721
|
+
if (_optionalChain([auth, 'optionalAccess', _29 => _29.email])) {
|
|
1662
1722
|
headers["X-Chat-Act-As"] = auth.email;
|
|
1663
1723
|
}
|
|
1664
|
-
if (_optionalChain([auth, 'optionalAccess',
|
|
1665
|
-
if (_optionalChain([auth, 'optionalAccess',
|
|
1666
|
-
if (_optionalChain([auth, 'optionalAccess',
|
|
1724
|
+
if (_optionalChain([auth, 'optionalAccess', _30 => _30.firstName])) headers["X-Chat-First-Name"] = auth.firstName;
|
|
1725
|
+
if (_optionalChain([auth, 'optionalAccess', _31 => _31.lastName])) headers["X-Chat-Last-Name"] = auth.lastName;
|
|
1726
|
+
if (_optionalChain([auth, 'optionalAccess', _32 => _32.avatarUrl])) headers["X-Chat-Avatar-Url"] = auth.avatarUrl;
|
|
1667
1727
|
return { url, headers };
|
|
1668
1728
|
}
|
|
1669
1729
|
|
|
@@ -1718,7 +1778,7 @@ function setInFlightRefresh(refresh) {
|
|
|
1718
1778
|
}
|
|
1719
1779
|
function dedupedRefresh() {
|
|
1720
1780
|
const adapter2 = getRegisteredAuthAdapter();
|
|
1721
|
-
if (!_optionalChain([adapter2, 'optionalAccess',
|
|
1781
|
+
if (!_optionalChain([adapter2, 'optionalAccess', _33 => _33.refresh])) return Promise.resolve(false);
|
|
1722
1782
|
let inFlightRefresh = getInFlightRefresh();
|
|
1723
1783
|
if (!inFlightRefresh) {
|
|
1724
1784
|
inFlightRefresh = Promise.resolve().then(() => adapter2.refresh()).catch(() => false).finally(() => {
|
|
@@ -1731,12 +1791,12 @@ function dedupedRefresh() {
|
|
|
1731
1791
|
async function fetchWithRefresh(url, init, baseHeaders, isRetry) {
|
|
1732
1792
|
const { url: authedUrl, headers } = applyProxyAuth(url, { ...baseHeaders });
|
|
1733
1793
|
const adapter2 = getRegisteredAuthAdapter();
|
|
1734
|
-
if (_optionalChain([adapter2, 'optionalAccess',
|
|
1794
|
+
if (_optionalChain([adapter2, 'optionalAccess', _34 => _34.getHeaders])) {
|
|
1735
1795
|
for (const [k, v] of Object.entries(adapter2.getHeaders())) {
|
|
1736
1796
|
if (v !== void 0) headers[k] = v;
|
|
1737
1797
|
}
|
|
1738
1798
|
}
|
|
1739
|
-
const credentials = _nullishCoalesce(_nullishCoalesce(_optionalChain([adapter2, 'optionalAccess',
|
|
1799
|
+
const credentials = _nullishCoalesce(_nullishCoalesce(_optionalChain([adapter2, 'optionalAccess', _35 => _35.credentials]), () => ( init.credentials)), () => ( "same-origin"));
|
|
1740
1800
|
const response = await fetch(authedUrl, {
|
|
1741
1801
|
...init,
|
|
1742
1802
|
headers,
|
|
@@ -1747,7 +1807,7 @@ async function fetchWithRefresh(url, init, baseHeaders, isRetry) {
|
|
|
1747
1807
|
// `SameSite=None` must be configured server-side for that to work).
|
|
1748
1808
|
credentials
|
|
1749
1809
|
});
|
|
1750
|
-
if (response.status === 401 && !isRetry && _optionalChain([adapter2, 'optionalAccess',
|
|
1810
|
+
if (response.status === 401 && !isRetry && _optionalChain([adapter2, 'optionalAccess', _36 => _36.refresh])) {
|
|
1751
1811
|
const refreshed = await dedupedRefresh();
|
|
1752
1812
|
if (refreshed) {
|
|
1753
1813
|
return fetchWithRefresh(url, init, baseHeaders, true);
|
|
@@ -2436,7 +2496,7 @@ function setNestedValue(obj, path, value) {
|
|
|
2436
2496
|
}
|
|
2437
2497
|
function getNestedValue(obj, path) {
|
|
2438
2498
|
return path.split(".").reduce((current, key) => {
|
|
2439
|
-
return _optionalChain([current, 'optionalAccess',
|
|
2499
|
+
return _optionalChain([current, 'optionalAccess', _37 => _37[key]]);
|
|
2440
2500
|
}, obj);
|
|
2441
2501
|
}
|
|
2442
2502
|
function mergeVariables(currentVariables, updates, schema) {
|
|
@@ -3203,7 +3263,7 @@ function useNearViewport(rootMargin = "500px") {
|
|
|
3203
3263
|
const stillOurs = subscribers.get(prev);
|
|
3204
3264
|
if (stillOurs) {
|
|
3205
3265
|
subscribers.delete(prev);
|
|
3206
|
-
_optionalChain([observers, 'access',
|
|
3266
|
+
_optionalChain([observers, 'access', _38 => _38.get, 'call', _39 => _39(rootMargin), 'optionalAccess', _40 => _40.unobserve, 'call', _41 => _41(prev)]);
|
|
3207
3267
|
}
|
|
3208
3268
|
}
|
|
3209
3269
|
elRef.current = node;
|
|
@@ -3220,7 +3280,7 @@ function useNearViewport(rootMargin = "500px") {
|
|
|
3220
3280
|
if (!el) return;
|
|
3221
3281
|
if (subscribers.get(el)) {
|
|
3222
3282
|
subscribers.delete(el);
|
|
3223
|
-
_optionalChain([observers, 'access',
|
|
3283
|
+
_optionalChain([observers, 'access', _42 => _42.get, 'call', _43 => _43(rootMargin), 'optionalAccess', _44 => _44.unobserve, 'call', _45 => _45(el)]);
|
|
3224
3284
|
}
|
|
3225
3285
|
};
|
|
3226
3286
|
}, [rootMargin]);
|
|
@@ -3335,8 +3395,8 @@ function useAccessCodeIntegration() {
|
|
|
3335
3395
|
// src/utils/og-placeholder.ts
|
|
3336
3396
|
var DEFAULT_OG_PLACEHOLDER_PATH = "/api/og-placeholder";
|
|
3337
3397
|
function resolveOgPlaceholderBase(endpoints) {
|
|
3338
|
-
if (_optionalChain([endpoints, 'optionalAccess',
|
|
3339
|
-
const imageProxy = _optionalChain([endpoints, 'optionalAccess',
|
|
3398
|
+
if (_optionalChain([endpoints, 'optionalAccess', _46 => _46.ogPlaceholderUrl])) return endpoints.ogPlaceholderUrl;
|
|
3399
|
+
const imageProxy = _optionalChain([endpoints, 'optionalAccess', _47 => _47.imageProxyUrlPrefix]);
|
|
3340
3400
|
if (imageProxy) {
|
|
3341
3401
|
const derived = imageProxy.replace(/\/image-proxy(?=$|[?/])/, "/og-placeholder");
|
|
3342
3402
|
if (derived !== imageProxy) return derived;
|
|
@@ -3364,7 +3424,7 @@ function useOgPlaceholderUrl({
|
|
|
3364
3424
|
aspect = "wide",
|
|
3365
3425
|
enabled = true
|
|
3366
3426
|
}) {
|
|
3367
|
-
const endpoints = _optionalChain([_chunk2B6773QMcjs.useChatRuntime.call(void 0, ), 'optionalAccess',
|
|
3427
|
+
const endpoints = _optionalChain([_chunk2B6773QMcjs.useChatRuntime.call(void 0, ), 'optionalAccess', _48 => _48.endpoints]);
|
|
3368
3428
|
return _react.useMemo.call(void 0, () => {
|
|
3369
3429
|
if (!enabled || !title) return null;
|
|
3370
3430
|
return buildOgPlaceholderUrl(endpoints, title, { site: siteName || void 0, aspect });
|
|
@@ -3509,7 +3569,7 @@ function navigateSamePageHash(target, options = {}) {
|
|
|
3509
3569
|
// src/hooks/use-scroll-to-hash.ts
|
|
3510
3570
|
var MAX_POLL_FRAMES = 60;
|
|
3511
3571
|
function useScrollToHash(readyDep = true, options) {
|
|
3512
|
-
const headerOffset = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3572
|
+
const headerOffset = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _49 => _49.headerOffset]), () => ( 0));
|
|
3513
3573
|
_react.useEffect.call(void 0, () => {
|
|
3514
3574
|
if (typeof window === "undefined") return;
|
|
3515
3575
|
if (readyDep === null || readyDep === false) return;
|
|
@@ -3570,7 +3630,7 @@ function evaluateHumanitySignals(body, opts) {
|
|
|
3570
3630
|
if (elapsedMs !== null && elapsedMs < opts.minFillMs) return { ok: false, reason: "too_fast" };
|
|
3571
3631
|
return { ok: true };
|
|
3572
3632
|
}
|
|
3573
|
-
var splitCsvEnv = (s) => _nullishCoalesce(_optionalChain([s, 'optionalAccess',
|
|
3633
|
+
var splitCsvEnv = (s) => _nullishCoalesce(_optionalChain([s, 'optionalAccess', _50 => _50.split, 'call', _51 => _51(","), 'access', _52 => _52.map, 'call', _53 => _53((t) => t.trim()), 'access', _54 => _54.filter, 'call', _55 => _55(Boolean)]), () => ( []));
|
|
3574
3634
|
|
|
3575
3635
|
// src/hooks/use-humanity-signals.ts
|
|
3576
3636
|
function useHumanitySignals() {
|
|
@@ -3578,7 +3638,7 @@ function useHumanitySignals() {
|
|
|
3578
3638
|
const mountedAt = _react.useRef.call(void 0, typeof performance !== "undefined" ? performance.now() : 0);
|
|
3579
3639
|
const getSignals = _react.useCallback.call(void 0,
|
|
3580
3640
|
() => ({
|
|
3581
|
-
[HONEYPOT_FIELD]: _nullishCoalesce(_optionalChain([ref, 'access',
|
|
3641
|
+
[HONEYPOT_FIELD]: _nullishCoalesce(_optionalChain([ref, 'access', _56 => _56.current, 'optionalAccess', _57 => _57.value]), () => ( "")),
|
|
3582
3642
|
[ELAPSED_MS_FIELD]: typeof performance !== "undefined" ? Math.round(performance.now() - mountedAt.current) : 0
|
|
3583
3643
|
}),
|
|
3584
3644
|
[]
|
|
@@ -3703,5 +3763,7 @@ function useHumanitySignals() {
|
|
|
3703
3763
|
|
|
3704
3764
|
|
|
3705
3765
|
|
|
3706
|
-
|
|
3707
|
-
|
|
3766
|
+
|
|
3767
|
+
|
|
3768
|
+
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.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.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.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;
|
|
3769
|
+
//# sourceMappingURL=chunk-3SNDISEN.cjs.map
|