@flamingo-stack/openframe-frontend-core 0.0.473 → 0.0.474-snapshot.20260724131235
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-KXBXPOYM.cjs → chunk-3W6A7LST.cjs} +18 -18
- package/dist/{chunk-KXBXPOYM.cjs.map → chunk-3W6A7LST.cjs.map} +1 -1
- package/dist/{chunk-6WPUUGW5.js → chunk-3WBREJMR.js} +5 -5
- package/dist/{chunk-5LTLYPIP.cjs → chunk-5ICXBR62.cjs} +73 -73
- package/dist/{chunk-5LTLYPIP.cjs.map → chunk-5ICXBR62.cjs.map} +1 -1
- package/dist/{chunk-H6FKYKEQ.js → chunk-5IQXLG4H.js} +3 -3
- package/dist/{chunk-4WHDDAVP.cjs → chunk-5U7MG3CZ.cjs} +40 -40
- package/dist/{chunk-4WHDDAVP.cjs.map → chunk-5U7MG3CZ.cjs.map} +1 -1
- package/dist/{chunk-CDBQQA7V.cjs → chunk-7CU7Y3ML.cjs} +29 -29
- package/dist/{chunk-CDBQQA7V.cjs.map → chunk-7CU7Y3ML.cjs.map} +1 -1
- package/dist/{chunk-LWIVRGDN.js → chunk-A6O75SLQ.js} +2 -2
- package/dist/{chunk-FPOHUGEK.js → chunk-AGX565ZT.js} +2 -2
- package/dist/{chunk-6VEEQBVJ.cjs → chunk-AIUIIKH2.cjs} +15 -15
- package/dist/{chunk-6VEEQBVJ.cjs.map → chunk-AIUIIKH2.cjs.map} +1 -1
- package/dist/{chunk-QESV36I2.js → chunk-BQPZQQPC.js} +39 -83
- package/dist/chunk-BQPZQQPC.js.map +1 -0
- package/dist/{chunk-ZQRGJHNH.cjs → chunk-DEHW3LYM.cjs} +120 -164
- package/dist/chunk-DEHW3LYM.cjs.map +1 -0
- package/dist/{chunk-KP37QDNS.cjs → chunk-DJAPOTAY.cjs} +73 -73
- package/dist/{chunk-KP37QDNS.cjs.map → chunk-DJAPOTAY.cjs.map} +1 -1
- package/dist/{chunk-4YH4WKLC.js → chunk-E42Y3ZAL.js} +4 -4
- package/dist/{chunk-CH7MDKPI.cjs → chunk-E4CNWKZ3.cjs} +7 -7
- package/dist/{chunk-CH7MDKPI.cjs.map → chunk-E4CNWKZ3.cjs.map} +1 -1
- 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-B472QGDO.cjs → chunk-HJV4VCEZ.cjs} +5 -5
- package/dist/{chunk-B472QGDO.cjs.map → chunk-HJV4VCEZ.cjs.map} +1 -1
- package/dist/{chunk-SWNZZVYG.js → chunk-LM57R7B4.js} +2 -2
- package/dist/{chunk-B52SBOUY.js → chunk-NJGLBKCR.js} +6 -6
- package/dist/{chunk-2SPAHQYE.js → chunk-PQT3NIDA.js} +5 -5
- package/dist/{chunk-6OGOPPTI.cjs → chunk-QM3DRG5I.cjs} +12 -12
- package/dist/{chunk-6OGOPPTI.cjs.map → chunk-QM3DRG5I.cjs.map} +1 -1
- package/dist/{chunk-UCY6VITT.js → chunk-R7JJ7PHN.js} +3 -3
- package/dist/{chunk-DBYUQOLS.js → chunk-S4VEPOX2.js} +2 -2
- package/dist/{chunk-4EU6WL5O.cjs → chunk-SZNK5Q4A.cjs} +40 -40
- package/dist/{chunk-4EU6WL5O.cjs.map → chunk-SZNK5Q4A.cjs.map} +1 -1
- package/dist/{chunk-TONMD7QX.cjs → chunk-VCOL4C2W.cjs} +86 -20
- package/dist/chunk-VCOL4C2W.cjs.map +1 -0
- package/dist/{chunk-J5S5U76A.cjs → chunk-W5UZSGJY.cjs} +32 -32
- package/dist/{chunk-J5S5U76A.cjs.map → chunk-W5UZSGJY.cjs.map} +1 -1
- package/dist/{chunk-I5L3KUTE.js → chunk-WEFPQFUO.js} +6 -6
- package/dist/{chunk-4Y6LX6XR.js → chunk-YRZZ7HHJ.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/auth/auth-shell.d.ts +7 -1
- package/dist/components/features/auth/auth-shell.d.ts.map +1 -1
- 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/features/auth/auth-shell.tsx +8 -7
- package/src/components/navigation/mobile-burger-menu.tsx +14 -24
- 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-6WPUUGW5.js.map → chunk-3WBREJMR.js.map} +0 -0
- /package/dist/{chunk-H6FKYKEQ.js.map → chunk-5IQXLG4H.js.map} +0 -0
- /package/dist/{chunk-LWIVRGDN.js.map → chunk-A6O75SLQ.js.map} +0 -0
- /package/dist/{chunk-FPOHUGEK.js.map → chunk-AGX565ZT.js.map} +0 -0
- /package/dist/{chunk-4YH4WKLC.js.map → chunk-E42Y3ZAL.js.map} +0 -0
- /package/dist/{chunk-SWNZZVYG.js.map → chunk-LM57R7B4.js.map} +0 -0
- /package/dist/{chunk-B52SBOUY.js.map → chunk-NJGLBKCR.js.map} +0 -0
- /package/dist/{chunk-2SPAHQYE.js.map → chunk-PQT3NIDA.js.map} +0 -0
- /package/dist/{chunk-UCY6VITT.js.map → chunk-R7JJ7PHN.js.map} +0 -0
- /package/dist/{chunk-DBYUQOLS.js.map → chunk-S4VEPOX2.js.map} +0 -0
- /package/dist/{chunk-I5L3KUTE.js.map → chunk-WEFPQFUO.js.map} +0 -0
- /package/dist/{chunk-4Y6LX6XR.js.map → chunk-YRZZ7HHJ.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 (!adapter2?.allowedOrigins?.length || adapter2.getHeaders?.().Authorization === void 0) {
|
|
1862
|
+
return false;
|
|
1863
|
+
}
|
|
1864
|
+
let target;
|
|
1865
|
+
try {
|
|
1866
|
+
target = new URL(url, window.location.href);
|
|
1867
|
+
} catch {
|
|
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;
|
|
@@ -2320,9 +2335,58 @@ 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
|
+
import { useEffect as useEffect19, useReducer } from "react";
|
|
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] = useReducer((c) => c + 1, 0);
|
|
2371
|
+
useEffect19(() => {
|
|
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
|
init_next_navigation();
|
|
2325
|
-
import { useEffect as
|
|
2389
|
+
import { useEffect as useEffect20, useState as useState20, useMemo as useMemo3, useCallback as useCallback11 } from "react";
|
|
2326
2390
|
|
|
2327
2391
|
// src/hooks/state/graphql-parser.ts
|
|
2328
2392
|
import {
|
|
@@ -2791,7 +2855,7 @@ function useQueryParams(query, options = {}) {
|
|
|
2791
2855
|
const defaultValues = options.defaultValues || {};
|
|
2792
2856
|
const skipIntrospection = options.skipIntrospection || false;
|
|
2793
2857
|
const debug = options.debug || false;
|
|
2794
|
-
|
|
2858
|
+
useEffect20(() => {
|
|
2795
2859
|
async function initialize() {
|
|
2796
2860
|
try {
|
|
2797
2861
|
if (debug) console.log("[useQueryParams] Initializing...");
|
|
@@ -3138,7 +3202,7 @@ function createSearchParams(params) {
|
|
|
3138
3202
|
}
|
|
3139
3203
|
|
|
3140
3204
|
// src/hooks/state/use-cursor-pagination-state.ts
|
|
3141
|
-
import { useCallback as useCallback13, useEffect as
|
|
3205
|
+
import { useCallback as useCallback13, useEffect as useEffect21, useRef as useRef12, useState as useState21 } from "react";
|
|
3142
3206
|
var urlSchema = {
|
|
3143
3207
|
search: { type: "string", default: "" },
|
|
3144
3208
|
cursor: { type: "string", default: "" }
|
|
@@ -3155,7 +3219,7 @@ function useCursorPaginationState(options) {
|
|
|
3155
3219
|
const lastSearchRef = useRef12(null);
|
|
3156
3220
|
const isSyncingFromUrl = useRef12(false);
|
|
3157
3221
|
const isInitialLoadInProgress = useRef12(true);
|
|
3158
|
-
|
|
3222
|
+
useEffect21(() => {
|
|
3159
3223
|
if (isInitialLoadInProgress.current) return;
|
|
3160
3224
|
const urlSearch = params.search || "";
|
|
3161
3225
|
if (urlSearch !== searchInput) {
|
|
@@ -3166,7 +3230,7 @@ function useCursorPaginationState(options) {
|
|
|
3166
3230
|
}, 0);
|
|
3167
3231
|
}
|
|
3168
3232
|
}, [params.search, initialLoadCount]);
|
|
3169
|
-
|
|
3233
|
+
useEffect21(() => {
|
|
3170
3234
|
if (isInitialLoadInProgress.current) return;
|
|
3171
3235
|
if (isSyncingFromUrl.current) return;
|
|
3172
3236
|
if (searchInput !== params.search) {
|
|
@@ -3177,7 +3241,7 @@ function useCursorPaginationState(options) {
|
|
|
3177
3241
|
});
|
|
3178
3242
|
}
|
|
3179
3243
|
}, [searchInput, params.search, setParams, initialLoadCount]);
|
|
3180
|
-
|
|
3244
|
+
useEffect21(() => {
|
|
3181
3245
|
if (initialLoadCount === 0) {
|
|
3182
3246
|
const cursor = params.cursor || null;
|
|
3183
3247
|
const search = params.search || "";
|
|
@@ -3191,7 +3255,7 @@ function useCursorPaginationState(options) {
|
|
|
3191
3255
|
});
|
|
3192
3256
|
}
|
|
3193
3257
|
}, []);
|
|
3194
|
-
|
|
3258
|
+
useEffect21(() => {
|
|
3195
3259
|
if (isInitialLoadInProgress.current) return;
|
|
3196
3260
|
if (initialLoadCount === 0) return;
|
|
3197
3261
|
const currentSearch = params.search || "";
|
|
@@ -3231,7 +3295,7 @@ function useCursorPaginationState(options) {
|
|
|
3231
3295
|
}
|
|
3232
3296
|
|
|
3233
3297
|
// src/hooks/nats/use-nats-client.ts
|
|
3234
|
-
import { useEffect as
|
|
3298
|
+
import { useEffect as useEffect22, useMemo as useMemo5, useState as useState22 } from "react";
|
|
3235
3299
|
function useNatsClient(clientOptions, options = {}) {
|
|
3236
3300
|
const { autoConnect = true } = options;
|
|
3237
3301
|
const client = useMemo5(() => {
|
|
@@ -3240,7 +3304,7 @@ function useNatsClient(clientOptions, options = {}) {
|
|
|
3240
3304
|
}, [clientOptions]);
|
|
3241
3305
|
const [status, setStatus] = useState22("disconnected");
|
|
3242
3306
|
const [lastError, setLastError] = useState22(null);
|
|
3243
|
-
|
|
3307
|
+
useEffect22(() => {
|
|
3244
3308
|
if (!client) {
|
|
3245
3309
|
setStatus("disconnected");
|
|
3246
3310
|
setLastError(null);
|
|
@@ -3271,7 +3335,7 @@ function useNatsClient(clientOptions, options = {}) {
|
|
|
3271
3335
|
}
|
|
3272
3336
|
|
|
3273
3337
|
// src/hooks/use-near-viewport.ts
|
|
3274
|
-
import { useEffect as
|
|
3338
|
+
import { useEffect as useEffect23, useRef as useRef13, useState as useState23, useCallback as useCallback14 } from "react";
|
|
3275
3339
|
var observers = /* @__PURE__ */ new Map();
|
|
3276
3340
|
var subscribers = /* @__PURE__ */ new WeakMap();
|
|
3277
3341
|
var THRESHOLD_EPSILON = 0.01;
|
|
@@ -3323,7 +3387,7 @@ function useNearViewport(rootMargin = NEAR_VIEWPORT_ROOT_MARGIN, threshold = 0)
|
|
|
3323
3387
|
},
|
|
3324
3388
|
[key, rootMargin, threshold]
|
|
3325
3389
|
);
|
|
3326
|
-
|
|
3390
|
+
useEffect23(() => {
|
|
3327
3391
|
return () => {
|
|
3328
3392
|
const el = elRef.current;
|
|
3329
3393
|
if (!el) return;
|
|
@@ -3481,7 +3545,7 @@ function useOgPlaceholderUrl({
|
|
|
3481
3545
|
}
|
|
3482
3546
|
|
|
3483
3547
|
// src/hooks/use-scroll-to-hash.ts
|
|
3484
|
-
import { useEffect as
|
|
3548
|
+
import { useEffect as useEffect24 } from "react";
|
|
3485
3549
|
|
|
3486
3550
|
// src/utils/scroll-into-view.ts
|
|
3487
3551
|
var activeRaf = 0;
|
|
@@ -3619,7 +3683,7 @@ function navigateSamePageHash(target, options = {}) {
|
|
|
3619
3683
|
var MAX_POLL_FRAMES = 60;
|
|
3620
3684
|
function useScrollToHash(readyDep = true, options) {
|
|
3621
3685
|
const headerOffset = options?.headerOffset ?? 0;
|
|
3622
|
-
|
|
3686
|
+
useEffect24(() => {
|
|
3623
3687
|
if (typeof window === "undefined") return;
|
|
3624
3688
|
if (readyDep === null || readyDep === false) return;
|
|
3625
3689
|
let rafId = null;
|
|
@@ -3772,6 +3836,8 @@ export {
|
|
|
3772
3836
|
useBatchImages,
|
|
3773
3837
|
configureAuthenticatedImage,
|
|
3774
3838
|
useAuthenticatedImage,
|
|
3839
|
+
clearAuthedImageCache,
|
|
3840
|
+
useAuthedImageSrc,
|
|
3775
3841
|
extractVariablesFromQuery,
|
|
3776
3842
|
isScalarType,
|
|
3777
3843
|
isInputObjectType,
|
|
@@ -3818,4 +3884,4 @@ export {
|
|
|
3818
3884
|
splitCsvEnv,
|
|
3819
3885
|
useHumanitySignals
|
|
3820
3886
|
};
|
|
3821
|
-
//# sourceMappingURL=chunk-
|
|
3887
|
+
//# sourceMappingURL=chunk-ZPUZPJDV.js.map
|