@flamingo-stack/openframe-frontend-core 0.0.473 → 0.0.474
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-4EU6WL5O.cjs → chunk-2R5NM3FC.cjs} +40 -40
- package/dist/{chunk-4EU6WL5O.cjs.map → chunk-2R5NM3FC.cjs.map} +1 -1
- package/dist/{chunk-B52SBOUY.js → chunk-3NNCBZEM.js} +6 -6
- package/dist/{chunk-KP37QDNS.cjs → chunk-464NJS2W.cjs} +73 -73
- package/dist/{chunk-KP37QDNS.cjs.map → chunk-464NJS2W.cjs.map} +1 -1
- package/dist/{chunk-CDBQQA7V.cjs → chunk-5TQQ3CPE.cjs} +29 -29
- package/dist/{chunk-CDBQQA7V.cjs.map → chunk-5TQQ3CPE.cjs.map} +1 -1
- package/dist/{chunk-B472QGDO.cjs → chunk-6KD6KVAI.cjs} +5 -5
- package/dist/{chunk-B472QGDO.cjs.map → chunk-6KD6KVAI.cjs.map} +1 -1
- package/dist/{chunk-CH7MDKPI.cjs → chunk-7VBGYCXG.cjs} +7 -7
- package/dist/{chunk-CH7MDKPI.cjs.map → chunk-7VBGYCXG.cjs.map} +1 -1
- package/dist/{chunk-FPOHUGEK.js → chunk-AGX565ZT.js} +2 -2
- package/dist/{chunk-ZQRGJHNH.cjs → chunk-BOPLMNSN.cjs} +117 -151
- package/dist/chunk-BOPLMNSN.cjs.map +1 -0
- package/dist/{chunk-SWNZZVYG.js → chunk-FBUIZTAI.js} +2 -2
- package/dist/{chunk-HQL5GJ35.cjs → chunk-FM5KWLKU.cjs} +3 -3
- package/dist/{chunk-HQL5GJ35.cjs.map → chunk-FM5KWLKU.cjs.map} +1 -1
- package/dist/{chunk-J5S5U76A.cjs → chunk-GELW7JOQ.cjs} +32 -32
- package/dist/{chunk-J5S5U76A.cjs.map → chunk-GELW7JOQ.cjs.map} +1 -1
- package/dist/{chunk-QESV36I2.js → chunk-IIOHHNMI.js} +36 -70
- package/dist/chunk-IIOHHNMI.js.map +1 -0
- package/dist/{chunk-4Y6LX6XR.js → chunk-K52S6LZ5.js} +3 -3
- package/dist/{chunk-6VEEQBVJ.cjs → chunk-KPVKZ5ML.cjs} +15 -15
- package/dist/{chunk-6VEEQBVJ.cjs.map → chunk-KPVKZ5ML.cjs.map} +1 -1
- package/dist/{chunk-4WHDDAVP.cjs → chunk-KXKTXAGN.cjs} +40 -40
- package/dist/{chunk-4WHDDAVP.cjs.map → chunk-KXKTXAGN.cjs.map} +1 -1
- package/dist/{chunk-5LTLYPIP.cjs → chunk-LFXUFFDZ.cjs} +73 -73
- package/dist/{chunk-5LTLYPIP.cjs.map → chunk-LFXUFFDZ.cjs.map} +1 -1
- package/dist/{chunk-4YH4WKLC.js → chunk-OKRUL7YV.js} +4 -4
- package/dist/{chunk-KXBXPOYM.cjs → chunk-PFD2VRZI.cjs} +18 -18
- package/dist/{chunk-KXBXPOYM.cjs.map → chunk-PFD2VRZI.cjs.map} +1 -1
- package/dist/{chunk-I5L3KUTE.js → chunk-PTFSF3UP.js} +6 -6
- package/dist/{chunk-H6FKYKEQ.js → chunk-R4OGP4OV.js} +3 -3
- package/dist/{chunk-2SPAHQYE.js → chunk-RIPWRVA3.js} +5 -5
- package/dist/{chunk-DBYUQOLS.js → chunk-S6IB3BZK.js} +2 -2
- package/dist/{chunk-6WPUUGW5.js → chunk-SAH4FR36.js} +5 -5
- package/dist/{chunk-TONMD7QX.cjs → chunk-VCOL4C2W.cjs} +86 -20
- package/dist/chunk-VCOL4C2W.cjs.map +1 -0
- package/dist/{chunk-LWIVRGDN.js → chunk-VNDAMVMI.js} +2 -2
- package/dist/{chunk-6OGOPPTI.cjs → chunk-YJWISFIK.cjs} +12 -12
- package/dist/{chunk-6OGOPPTI.cjs.map → chunk-YJWISFIK.cjs.map} +1 -1
- package/dist/{chunk-UCY6VITT.js → chunk-Z4LAZ4ZZ.js} +3 -3
- package/dist/{chunk-OTV4A6NA.js → chunk-ZPUZPJDV.js} +80 -14
- package/dist/chunk-ZPUZPJDV.js.map +1 -0
- 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 +136 -136
- package/dist/components/index.js +11 -11
- package/dist/components/navigation/index.cjs +3 -3
- package/dist/components/navigation/index.js +2 -2
- package/dist/components/navigation/mobile-burger-menu.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/entity-image.d.ts.map +1 -1
- package/dist/components/ui/image-uploader.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/simple-markdown-renderer.d.ts.map +1 -1
- package/dist/components/ui/square-avatar.d.ts.map +1 -1
- package/dist/hooks/index.cjs +6 -2
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +5 -1
- package/dist/hooks/use-authed-image-src.d.ts +10 -0
- package/dist/hooks/use-authed-image-src.d.ts.map +1 -0
- package/dist/index.cjs +7 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -2
- package/dist/utils/embed-authed-fetch.d.ts +15 -0
- package/dist/utils/embed-authed-fetch.d.ts.map +1 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/navigation/mobile-burger-menu.tsx +1 -0
- package/src/components/ui/entity-image.tsx +5 -3
- package/src/components/ui/image-uploader.tsx +21 -12
- package/src/components/ui/simple-markdown-renderer.tsx +57 -58
- package/src/components/ui/square-avatar.tsx +5 -3
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-authed-image-src.ts +93 -0
- package/src/utils/embed-authed-fetch.ts +30 -0
- package/dist/chunk-OTV4A6NA.js.map +0 -1
- package/dist/chunk-QESV36I2.js.map +0 -1
- package/dist/chunk-TONMD7QX.cjs.map +0 -1
- package/dist/chunk-ZQRGJHNH.cjs.map +0 -1
- /package/dist/{chunk-B52SBOUY.js.map → chunk-3NNCBZEM.js.map} +0 -0
- /package/dist/{chunk-FPOHUGEK.js.map → chunk-AGX565ZT.js.map} +0 -0
- /package/dist/{chunk-SWNZZVYG.js.map → chunk-FBUIZTAI.js.map} +0 -0
- /package/dist/{chunk-4Y6LX6XR.js.map → chunk-K52S6LZ5.js.map} +0 -0
- /package/dist/{chunk-4YH4WKLC.js.map → chunk-OKRUL7YV.js.map} +0 -0
- /package/dist/{chunk-I5L3KUTE.js.map → chunk-PTFSF3UP.js.map} +0 -0
- /package/dist/{chunk-H6FKYKEQ.js.map → chunk-R4OGP4OV.js.map} +0 -0
- /package/dist/{chunk-2SPAHQYE.js.map → chunk-RIPWRVA3.js.map} +0 -0
- /package/dist/{chunk-DBYUQOLS.js.map → chunk-S6IB3BZK.js.map} +0 -0
- /package/dist/{chunk-6WPUUGW5.js.map → chunk-SAH4FR36.js.map} +0 -0
- /package/dist/{chunk-LWIVRGDN.js.map → chunk-VNDAMVMI.js.map} +0 -0
- /package/dist/{chunk-UCY6VITT.js.map → chunk-Z4LAZ4ZZ.js.map} +0 -0
|
@@ -1855,6 +1855,21 @@ function setEmbedAuthAdapter(adapter2) {
|
|
|
1855
1855
|
function hasEmbedAuthAdapter() {
|
|
1856
1856
|
return getRegisteredAuthAdapter() !== null;
|
|
1857
1857
|
}
|
|
1858
|
+
function needsBearerAssetFetch(url) {
|
|
1859
|
+
if (typeof window === "undefined") return false;
|
|
1860
|
+
const adapter2 = getRegisteredAuthAdapter();
|
|
1861
|
+
if (!_optionalChain([adapter2, 'optionalAccess', _38 => _38.allowedOrigins, 'optionalAccess', _39 => _39.length]) || _optionalChain([adapter2, 'access', _40 => _40.getHeaders, 'optionalCall', _41 => _41(), 'access', _42 => _42.Authorization]) === void 0) {
|
|
1862
|
+
return false;
|
|
1863
|
+
}
|
|
1864
|
+
let target;
|
|
1865
|
+
try {
|
|
1866
|
+
target = new URL(url, window.location.href);
|
|
1867
|
+
} catch (e5) {
|
|
1868
|
+
return false;
|
|
1869
|
+
}
|
|
1870
|
+
if (target.protocol !== "http:" && target.protocol !== "https:") return false;
|
|
1871
|
+
return adapter2.allowedOrigins.includes(target.origin);
|
|
1872
|
+
}
|
|
1858
1873
|
function embedAuthedFetch(url, init = {}) {
|
|
1859
1874
|
assertSameOrigin(url);
|
|
1860
1875
|
let baseHeaders;
|
|
@@ -1885,7 +1900,7 @@ function setInFlightRefresh(refresh) {
|
|
|
1885
1900
|
}
|
|
1886
1901
|
function dedupedRefresh() {
|
|
1887
1902
|
const adapter2 = getRegisteredAuthAdapter();
|
|
1888
|
-
if (!_optionalChain([adapter2, 'optionalAccess',
|
|
1903
|
+
if (!_optionalChain([adapter2, 'optionalAccess', _43 => _43.refresh])) return Promise.resolve(false);
|
|
1889
1904
|
let inFlightRefresh = getInFlightRefresh();
|
|
1890
1905
|
if (!inFlightRefresh) {
|
|
1891
1906
|
inFlightRefresh = Promise.resolve().then(() => adapter2.refresh()).catch(() => false).finally(() => {
|
|
@@ -1898,12 +1913,12 @@ function dedupedRefresh() {
|
|
|
1898
1913
|
async function fetchWithRefresh(url, init, baseHeaders, isRetry) {
|
|
1899
1914
|
const { url: authedUrl, headers } = applyProxyAuth(url, { ...baseHeaders });
|
|
1900
1915
|
const adapter2 = getRegisteredAuthAdapter();
|
|
1901
|
-
if (_optionalChain([adapter2, 'optionalAccess',
|
|
1916
|
+
if (_optionalChain([adapter2, 'optionalAccess', _44 => _44.getHeaders])) {
|
|
1902
1917
|
for (const [k, v] of Object.entries(adapter2.getHeaders())) {
|
|
1903
1918
|
if (v !== void 0) headers[k] = v;
|
|
1904
1919
|
}
|
|
1905
1920
|
}
|
|
1906
|
-
const credentials = _nullishCoalesce(_nullishCoalesce(_optionalChain([adapter2, 'optionalAccess',
|
|
1921
|
+
const credentials = _nullishCoalesce(_nullishCoalesce(_optionalChain([adapter2, 'optionalAccess', _45 => _45.credentials]), () => ( init.credentials)), () => ( "same-origin"));
|
|
1907
1922
|
const response = await fetch(authedUrl, {
|
|
1908
1923
|
...init,
|
|
1909
1924
|
headers,
|
|
@@ -1914,7 +1929,7 @@ async function fetchWithRefresh(url, init, baseHeaders, isRetry) {
|
|
|
1914
1929
|
// `SameSite=None` must be configured server-side for that to work).
|
|
1915
1930
|
credentials
|
|
1916
1931
|
});
|
|
1917
|
-
if (response.status === 401 && !isRetry && _optionalChain([adapter2, 'optionalAccess',
|
|
1932
|
+
if (response.status === 401 && !isRetry && _optionalChain([adapter2, 'optionalAccess', _46 => _46.refresh])) {
|
|
1918
1933
|
const refreshed = await dedupedRefresh();
|
|
1919
1934
|
if (refreshed) {
|
|
1920
1935
|
return fetchWithRefresh(url, init, baseHeaders, true);
|
|
@@ -1929,7 +1944,7 @@ function assertSameOrigin(url) {
|
|
|
1929
1944
|
try {
|
|
1930
1945
|
target = new URL(url, window.location.href);
|
|
1931
1946
|
pageOrigin = new URL(window.location.href).origin;
|
|
1932
|
-
} catch (
|
|
1947
|
+
} catch (e6) {
|
|
1933
1948
|
throw new Error(`embedAuthedFetch: refusing to fetch malformed URL (${JSON.stringify(url)})`);
|
|
1934
1949
|
}
|
|
1935
1950
|
if (target.protocol !== "http:" && target.protocol !== "https:") {
|
|
@@ -1938,7 +1953,7 @@ function assertSameOrigin(url) {
|
|
|
1938
1953
|
);
|
|
1939
1954
|
}
|
|
1940
1955
|
if (target.origin !== pageOrigin) {
|
|
1941
|
-
if (_optionalChain([getRegisteredAuthAdapter, 'call',
|
|
1956
|
+
if (_optionalChain([getRegisteredAuthAdapter, 'call', _47 => _47(), 'optionalAccess', _48 => _48.allowedOrigins, 'optionalAccess', _49 => _49.includes, 'call', _50 => _50(target.origin)])) {
|
|
1942
1957
|
return;
|
|
1943
1958
|
}
|
|
1944
1959
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -2043,7 +2058,7 @@ function useCopyToClipboard({
|
|
|
2043
2058
|
setCopied(true);
|
|
2044
2059
|
toast2({ title: successTitle, description: successDescription, variant: "success" });
|
|
2045
2060
|
setTimeout(() => setCopied(false), resetDelay);
|
|
2046
|
-
} catch (
|
|
2061
|
+
} catch (e7) {
|
|
2047
2062
|
toast2({ title: errorTitle, description: errorDescription, variant: "destructive" });
|
|
2048
2063
|
}
|
|
2049
2064
|
},
|
|
@@ -2320,6 +2335,55 @@ function useAuthenticatedImage(imageUrl, refreshKey, config) {
|
|
|
2320
2335
|
return { imageUrl: fetchedImageUrl, isLoading, error };
|
|
2321
2336
|
}
|
|
2322
2337
|
|
|
2338
|
+
// src/hooks/use-authed-image-src.ts
|
|
2339
|
+
|
|
2340
|
+
var resolvedCache = /* @__PURE__ */ new Map();
|
|
2341
|
+
var inFlight = /* @__PURE__ */ new Map();
|
|
2342
|
+
var cacheGeneration = 0;
|
|
2343
|
+
function clearAuthedImageCache() {
|
|
2344
|
+
cacheGeneration++;
|
|
2345
|
+
for (const url of resolvedCache.values()) URL.revokeObjectURL(url);
|
|
2346
|
+
resolvedCache.clear();
|
|
2347
|
+
inFlight.clear();
|
|
2348
|
+
}
|
|
2349
|
+
function fetchAsBlobUrl(src) {
|
|
2350
|
+
let pending = inFlight.get(src);
|
|
2351
|
+
if (!pending) {
|
|
2352
|
+
const startedGeneration = cacheGeneration;
|
|
2353
|
+
pending = embedAuthedFetch(src, { headers: { Accept: "image/*" } }).then(async (response) => {
|
|
2354
|
+
if (!response.ok) throw new Error(`image fetch failed: ${response.status}`);
|
|
2355
|
+
const blobUrl = URL.createObjectURL(await response.blob());
|
|
2356
|
+
if (startedGeneration === cacheGeneration) {
|
|
2357
|
+
resolvedCache.set(src, blobUrl);
|
|
2358
|
+
} else {
|
|
2359
|
+
URL.revokeObjectURL(blobUrl);
|
|
2360
|
+
}
|
|
2361
|
+
}).finally(() => {
|
|
2362
|
+
if (inFlight.get(src) === pending) inFlight.delete(src);
|
|
2363
|
+
});
|
|
2364
|
+
inFlight.set(src, pending);
|
|
2365
|
+
}
|
|
2366
|
+
return pending;
|
|
2367
|
+
}
|
|
2368
|
+
function useAuthedImageSrc(src) {
|
|
2369
|
+
const bearerSrc = src && needsBearerAssetFetch(src) ? src : null;
|
|
2370
|
+
const [, rerender] = _react.useReducer.call(void 0, (c) => c + 1, 0);
|
|
2371
|
+
_react.useEffect.call(void 0, () => {
|
|
2372
|
+
if (!bearerSrc || resolvedCache.has(bearerSrc)) return;
|
|
2373
|
+
let cancelled = false;
|
|
2374
|
+
fetchAsBlobUrl(bearerSrc).catch(() => {
|
|
2375
|
+
}).finally(() => {
|
|
2376
|
+
if (!cancelled) rerender();
|
|
2377
|
+
});
|
|
2378
|
+
return () => {
|
|
2379
|
+
cancelled = true;
|
|
2380
|
+
};
|
|
2381
|
+
}, [bearerSrc]);
|
|
2382
|
+
if (!src) return void 0;
|
|
2383
|
+
if (!bearerSrc) return src;
|
|
2384
|
+
return resolvedCache.get(bearerSrc);
|
|
2385
|
+
}
|
|
2386
|
+
|
|
2323
2387
|
// src/hooks/state/use-query-params.ts
|
|
2324
2388
|
_chunkSSJNN5BScjs.init_next_navigation.call(void 0, );
|
|
2325
2389
|
|
|
@@ -2537,7 +2601,7 @@ function setNestedValue(obj, path, value) {
|
|
|
2537
2601
|
}
|
|
2538
2602
|
function getNestedValue(obj, path) {
|
|
2539
2603
|
return path.split(".").reduce((current, key) => {
|
|
2540
|
-
return _optionalChain([current, 'optionalAccess',
|
|
2604
|
+
return _optionalChain([current, 'optionalAccess', _51 => _51[key]]);
|
|
2541
2605
|
}, obj);
|
|
2542
2606
|
}
|
|
2543
2607
|
function mergeVariables(currentVariables, updates, schema) {
|
|
@@ -2706,7 +2770,7 @@ var GraphQLIntrospector = class {
|
|
|
2706
2770
|
try {
|
|
2707
2771
|
localStorage.removeItem(this.cacheKey);
|
|
2708
2772
|
this.schema = null;
|
|
2709
|
-
} catch (
|
|
2773
|
+
} catch (e8) {
|
|
2710
2774
|
}
|
|
2711
2775
|
}
|
|
2712
2776
|
/**
|
|
@@ -3312,7 +3376,7 @@ function useNearViewport(rootMargin = NEAR_VIEWPORT_ROOT_MARGIN, threshold = 0)
|
|
|
3312
3376
|
const stillOurs = subscribers.get(prev);
|
|
3313
3377
|
if (stillOurs) {
|
|
3314
3378
|
subscribers.delete(prev);
|
|
3315
|
-
_optionalChain([observers, 'access',
|
|
3379
|
+
_optionalChain([observers, 'access', _52 => _52.get, 'call', _53 => _53(key), 'optionalAccess', _54 => _54.unobserve, 'call', _55 => _55(prev)]);
|
|
3316
3380
|
}
|
|
3317
3381
|
}
|
|
3318
3382
|
elRef.current = node;
|
|
@@ -3329,7 +3393,7 @@ function useNearViewport(rootMargin = NEAR_VIEWPORT_ROOT_MARGIN, threshold = 0)
|
|
|
3329
3393
|
if (!el) return;
|
|
3330
3394
|
if (subscribers.get(el)) {
|
|
3331
3395
|
subscribers.delete(el);
|
|
3332
|
-
_optionalChain([observers, 'access',
|
|
3396
|
+
_optionalChain([observers, 'access', _56 => _56.get, 'call', _57 => _57(key), 'optionalAccess', _58 => _58.unobserve, 'call', _59 => _59(el)]);
|
|
3333
3397
|
}
|
|
3334
3398
|
};
|
|
3335
3399
|
}, [key]);
|
|
@@ -3444,8 +3508,8 @@ function useAccessCodeIntegration() {
|
|
|
3444
3508
|
// src/utils/og-placeholder.ts
|
|
3445
3509
|
var DEFAULT_OG_PLACEHOLDER_PATH = "/api/og-placeholder";
|
|
3446
3510
|
function resolveOgPlaceholderBase(endpoints) {
|
|
3447
|
-
if (_optionalChain([endpoints, 'optionalAccess',
|
|
3448
|
-
const imageProxy = _optionalChain([endpoints, 'optionalAccess',
|
|
3511
|
+
if (_optionalChain([endpoints, 'optionalAccess', _60 => _60.ogPlaceholderUrl])) return endpoints.ogPlaceholderUrl;
|
|
3512
|
+
const imageProxy = _optionalChain([endpoints, 'optionalAccess', _61 => _61.imageProxyUrlPrefix]);
|
|
3449
3513
|
if (imageProxy) {
|
|
3450
3514
|
const derived = imageProxy.replace(/\/image-proxy(?=$|[?/])/, "/og-placeholder");
|
|
3451
3515
|
if (derived !== imageProxy) return derived;
|
|
@@ -3473,7 +3537,7 @@ function useOgPlaceholderUrl({
|
|
|
3473
3537
|
aspect = "wide",
|
|
3474
3538
|
enabled = true
|
|
3475
3539
|
}) {
|
|
3476
|
-
const endpoints = _optionalChain([_chunk2B6773QMcjs.useChatRuntime.call(void 0, ), 'optionalAccess',
|
|
3540
|
+
const endpoints = _optionalChain([_chunk2B6773QMcjs.useChatRuntime.call(void 0, ), 'optionalAccess', _62 => _62.endpoints]);
|
|
3477
3541
|
return _react.useMemo.call(void 0, () => {
|
|
3478
3542
|
if (!enabled || !title) return null;
|
|
3479
3543
|
return buildOgPlaceholderUrl(endpoints, title, { site: siteName || void 0, aspect });
|
|
@@ -3574,7 +3638,7 @@ function navigateSamePageHash(target, options = {}) {
|
|
|
3574
3638
|
let url;
|
|
3575
3639
|
try {
|
|
3576
3640
|
url = new URL(normalizedTarget, window.location.href);
|
|
3577
|
-
} catch (
|
|
3641
|
+
} catch (e9) {
|
|
3578
3642
|
return false;
|
|
3579
3643
|
}
|
|
3580
3644
|
if (url.origin !== window.location.origin || url.pathname !== window.location.pathname || url.search !== window.location.search) {
|
|
@@ -3618,7 +3682,7 @@ function navigateSamePageHash(target, options = {}) {
|
|
|
3618
3682
|
// src/hooks/use-scroll-to-hash.ts
|
|
3619
3683
|
var MAX_POLL_FRAMES = 60;
|
|
3620
3684
|
function useScrollToHash(readyDep = true, options) {
|
|
3621
|
-
const headerOffset = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3685
|
+
const headerOffset = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _63 => _63.headerOffset]), () => ( 0));
|
|
3622
3686
|
_react.useEffect.call(void 0, () => {
|
|
3623
3687
|
if (typeof window === "undefined") return;
|
|
3624
3688
|
if (readyDep === null || readyDep === false) return;
|
|
@@ -3679,7 +3743,7 @@ function evaluateHumanitySignals(body, opts) {
|
|
|
3679
3743
|
if (elapsedMs !== null && elapsedMs < opts.minFillMs) return { ok: false, reason: "too_fast" };
|
|
3680
3744
|
return { ok: true };
|
|
3681
3745
|
}
|
|
3682
|
-
var splitCsvEnv = (s) => _nullishCoalesce(_optionalChain([s, 'optionalAccess',
|
|
3746
|
+
var splitCsvEnv = (s) => _nullishCoalesce(_optionalChain([s, 'optionalAccess', _64 => _64.split, 'call', _65 => _65(","), 'access', _66 => _66.map, 'call', _67 => _67((t) => t.trim()), 'access', _68 => _68.filter, 'call', _69 => _69(Boolean)]), () => ( []));
|
|
3683
3747
|
|
|
3684
3748
|
// src/hooks/use-humanity-signals.ts
|
|
3685
3749
|
function useHumanitySignals() {
|
|
@@ -3687,7 +3751,7 @@ function useHumanitySignals() {
|
|
|
3687
3751
|
const mountedAt = _react.useRef.call(void 0, typeof performance !== "undefined" ? performance.now() : 0);
|
|
3688
3752
|
const getSignals = _react.useCallback.call(void 0,
|
|
3689
3753
|
() => ({
|
|
3690
|
-
[HONEYPOT_FIELD]: _nullishCoalesce(_optionalChain([ref, 'access',
|
|
3754
|
+
[HONEYPOT_FIELD]: _nullishCoalesce(_optionalChain([ref, 'access', _70 => _70.current, 'optionalAccess', _71 => _71.value]), () => ( "")),
|
|
3691
3755
|
[ELAPSED_MS_FIELD]: typeof performance !== "undefined" ? Math.round(performance.now() - mountedAt.current) : 0
|
|
3692
3756
|
}),
|
|
3693
3757
|
[]
|
|
@@ -3817,5 +3881,7 @@ function useHumanitySignals() {
|
|
|
3817
3881
|
|
|
3818
3882
|
|
|
3819
3883
|
|
|
3820
|
-
|
|
3821
|
-
|
|
3884
|
+
|
|
3885
|
+
|
|
3886
|
+
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.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.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.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;
|
|
3887
|
+
//# sourceMappingURL=chunk-VCOL4C2W.cjs.map
|