@flamingo-stack/openframe-frontend-core 0.0.738 → 0.0.739
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-FTTLBMHU.cjs → chunk-7ZFCR7UY.cjs} +2 -2
- package/dist/{chunk-EG545WGV.cjs → chunk-B3XBJCOD.cjs} +9 -9
- package/dist/{chunk-BRKTN6UR.cjs → chunk-BV5WZVOP.cjs} +199 -199
- package/dist/{chunk-GQZOUVXC.cjs → chunk-CUDTMCXK.cjs} +34 -34
- package/dist/{chunk-7LTG6CJ3.cjs → chunk-DSVNFRY5.cjs} +35 -35
- package/dist/{chunk-XGHZIYQN.cjs → chunk-DTLHY2ZF.cjs} +19 -19
- package/dist/{chunk-66R4NGGU.cjs → chunk-EGN4I5Q7.cjs} +76 -76
- package/dist/{chunk-2UZS3ZH7.cjs → chunk-ENCAIAMY.cjs} +5 -5
- package/dist/{chunk-5BKAUXLR.cjs → chunk-FL6UO7IR.cjs} +4 -4
- package/dist/{chunk-N2CISBJJ.cjs → chunk-GABDE3FM.cjs} +10 -10
- package/dist/{chunk-MYBTNOS6.cjs → chunk-GSWQZX23.cjs} +2 -2
- package/dist/{chunk-JZNESLJX.cjs → chunk-HF7Z2E4W.cjs} +2 -2
- package/dist/chunk-HOTM4UM6.cjs +84 -0
- package/dist/{chunk-EAY6ZUES.cjs → chunk-I5MSCD57.cjs} +2 -2
- package/dist/{chunk-3BBOAMWJ.cjs → chunk-KLI4OSRA.cjs} +2 -2
- package/dist/{chunk-N5NDPULP.cjs → chunk-NX6JQT25.cjs} +6 -6
- package/dist/{chunk-FG7HTGT3.cjs → chunk-O67V3HJR.cjs} +14 -14
- package/dist/{chunk-UMO55S55.cjs → chunk-PQ2M7P2U.cjs} +5 -5
- package/dist/{chunk-R36NZTUJ.cjs → chunk-Q7GG3WC5.cjs} +24 -24
- package/dist/{chunk-4YQNJJWM.cjs → chunk-RGFT3P3L.cjs} +90 -90
- package/dist/{chunk-4T6ETBL4.cjs → chunk-S2CA5WE4.cjs} +82 -82
- package/dist/{chunk-U5BRSRXA.cjs → chunk-SB4VWA5V.cjs} +644 -621
- package/dist/{chunk-MLKL2YVE.cjs → chunk-SFY4UYPY.cjs} +44 -44
- package/dist/{chunk-MTNNYSP3.cjs → chunk-TF7J6VXG.cjs} +20 -20
- package/dist/{chunk-KQ4IKALJ.cjs → chunk-UI3HROSI.cjs} +35 -35
- package/dist/{chunk-2SBHPHLS.cjs → chunk-UXFJXIUT.cjs} +4 -4
- package/dist/{chunk-XMNLPQ75.cjs → chunk-UYP3G6PB.cjs} +12 -12
- package/dist/{chunk-HNYLTEIS.cjs → chunk-V2ZFH42N.cjs} +13 -13
- package/dist/{chunk-GAF4L3JW.cjs → chunk-WBANGORJ.cjs} +3 -3
- package/dist/{chunk-7GETNFZ5.cjs → chunk-WMKNZI4G.cjs} +38 -38
- package/dist/{chunk-LY5VOKV7.cjs → chunk-YRE3O65E.cjs} +12 -12
- package/dist/{chunk-7F3V45AH.cjs → chunk-YXKB5WRE.cjs} +66 -75
- package/dist/{cloud-tenants-FTQGWXHS.cjs → cloud-tenants-QSFSO3PA.cjs} +15 -15
- package/dist/components/case-studies/index.cjs +27 -27
- package/dist/components/chat/index.cjs +11 -11
- package/dist/components/contact/index.cjs +16 -16
- package/dist/components/docs/index.cjs +19 -19
- package/dist/components/embeds/index.cjs +16 -16
- package/dist/components/faq/index.cjs +17 -17
- package/dist/components/features/index.cjs +15 -15
- package/dist/components/features/walkthrough-video.d.ts +3 -0
- package/dist/components/features/walkthrough-video.d.ts.map +1 -1
- package/dist/components/features/walkthrough-video.js +36 -13
- package/dist/components/help-center-pages/index.cjs +118 -118
- package/dist/components/index.cjs +80 -80
- package/dist/components/meeting-scheduler/index.cjs +57 -57
- package/dist/components/navigation/index.cjs +18 -18
- package/dist/components/onboarding-guides/index.cjs +18 -18
- package/dist/components/product-demo/index.cjs +8 -8
- package/dist/components/related-content/index.cjs +9 -9
- package/dist/components/tickets/index.cjs +21 -21
- package/dist/components/ui/index.cjs +15 -15
- package/dist/{devices-MPI5HUQS.cjs → devices-C7XLWJFC.cjs} +16 -16
- package/dist/embed-shims/index.cjs +2 -2
- package/dist/embed-shims/next-image.cjs +2 -2
- package/dist/embed-shims/next-image.d.ts.map +1 -1
- package/dist/embed-shims/next-image.js +6 -2
- package/dist/{embeddable-chat-7WLUDBGK.cjs → embeddable-chat-6JKKFQEB.cjs} +82 -82
- package/dist/hooks/index.cjs +3 -3
- package/dist/index.cjs +22 -21
- package/dist/{knowledge-BS663XXL.cjs → knowledge-3QKWTOE7.cjs} +16 -16
- package/dist/{logs-KS2A2VN5.cjs → logs-JXD75NR4.cjs} +23 -23
- package/dist/{policies-H3OK6H4Q.cjs → policies-ZPN53PFQ.cjs} +19 -19
- package/dist/{remote-session-EHKXU4HI.cjs → remote-session-DNFZ5OLY.cjs} +8 -8
- package/dist/{software-update-HMMMWIL3.cjs → software-update-CRSIBS3K.cjs} +19 -19
- package/dist/{tickets-board-3YJKOOZE.cjs → tickets-board-CKZRB6YV.cjs} +9 -9
- package/package.json +1 -1
- package/src/components/features/walkthrough-video.tsx +59 -18
- package/src/components/ui/dropdown-button.tsx +1 -1
- package/src/embed-shims/next-image.tsx +15 -4
- package/dist/chunk-UR4K2NSL.cjs +0 -69
|
@@ -106,6 +106,13 @@ export interface WalkthroughVideoData {
|
|
|
106
106
|
position?: 'left' | 'right' | null;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
/**
|
|
110
|
+
* What ends Largest Contentful Paint: the browser reports no new candidate after
|
|
111
|
+
* the visitor's first scroll, tap or key press. The floating card renders only
|
|
112
|
+
* after one of these.
|
|
113
|
+
*/
|
|
114
|
+
const FIRST_INTERACTION_EVENTS = ['scroll', 'pointerdown', 'keydown'] as const;
|
|
115
|
+
|
|
109
116
|
/** Everything the two placements share — the widget's actual contract. */
|
|
110
117
|
interface WalkthroughVideoBaseProps {
|
|
111
118
|
video: WalkthroughVideoData | null | undefined;
|
|
@@ -148,6 +155,9 @@ interface WalkthroughVideoBaseProps {
|
|
|
148
155
|
* not in the base.
|
|
149
156
|
*/
|
|
150
157
|
export interface FloatingWalkthroughVideoProps extends WalkthroughVideoBaseProps {
|
|
158
|
+
/** The card appears no sooner than this after load, and only once the visitor
|
|
159
|
+
* has scrolled, tapped or pressed a key (so it can never be the page's
|
|
160
|
+
* Largest Contentful Paint). Default 3000. */
|
|
151
161
|
appearDelayMs?: number;
|
|
152
162
|
/** Cookie-based dismissal (id-match, mirrors the announcement bar). `false`
|
|
153
163
|
* disables the X entirely. `storageKey` is the per-platform cookie name. */
|
|
@@ -208,9 +218,10 @@ function WalkthroughVideo({
|
|
|
208
218
|
autoPlayCard = false,
|
|
209
219
|
label = 'Play Demo Video',
|
|
210
220
|
placement,
|
|
211
|
-
//
|
|
212
|
-
//
|
|
213
|
-
//
|
|
221
|
+
// The FLOATING card never appears sooner than this (and never before the
|
|
222
|
+
// visitor's first interaction: see the mount gate). The inline preset passes
|
|
223
|
+
// 0: an in-page block is part of a page the visitor is already looking at,
|
|
224
|
+
// so staggering it in would only jump the layout.
|
|
214
225
|
appearDelayMs = 3000,
|
|
215
226
|
dismissal = {},
|
|
216
227
|
hideNearSelector = 'footer',
|
|
@@ -224,7 +235,16 @@ function WalkthroughVideo({
|
|
|
224
235
|
// (embedder) → a stable presence marker so dismissal still works.
|
|
225
236
|
const dismissalId = video?.id != null ? String(video.id) : 'dismissed';
|
|
226
237
|
|
|
227
|
-
// --- mount gate (
|
|
238
|
+
// --- mount gate (cookie read happens post-delay, no hydration mismatch) ---
|
|
239
|
+
// The FLOATING card waits for two things: the appear delay AND the visitor's
|
|
240
|
+
// first scroll, tap or key press. The delay alone never kept it out of Largest
|
|
241
|
+
// Contentful Paint: the metric takes candidates until the first interaction,
|
|
242
|
+
// so a late card that was the largest thing in a short window became the
|
|
243
|
+
// page's LCP (blog post, 1440x215: the heading at 3.2 s, then the card's
|
|
244
|
+
// poster at 7.1 s). No attribute opts an element out, and a timer does not
|
|
245
|
+
// either; rendering only after the first interaction is the documented way,
|
|
246
|
+
// because the metric is final by then. The inline block is part of the page's
|
|
247
|
+
// own content and waits for neither.
|
|
228
248
|
const [mounted, setMounted] = useState(false);
|
|
229
249
|
const [dismissed, setDismissed] = useState(false);
|
|
230
250
|
const hasVideo = video != null;
|
|
@@ -235,31 +255,52 @@ function WalkthroughVideo({
|
|
|
235
255
|
// dismissal id was 'dismissed' on the first pass and a dismissed card
|
|
236
256
|
// flashed for the length of a second appear-delay before hiding.
|
|
237
257
|
if (!hasVideo) return undefined; // wait for data — see the id-based dep below
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
258
|
+
let delayElapsed = false;
|
|
259
|
+
let interacted = inline;
|
|
260
|
+
const reveal = () => {
|
|
261
|
+
if (dismissEnabled && isWalkthroughDismissed(storageKey, dismissalId)) {
|
|
262
|
+
setDismissed(true);
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
// Cleared on the way through: a client-only embedder can swap to a NEW
|
|
266
|
+
// video id in-session (the cookie is id-matched, so the new one isn't
|
|
267
|
+
// dismissed), and a sticky `dismissed` kept the card hidden until a
|
|
268
|
+
// full reload — contradicting the id-match behaviour documented above.
|
|
269
|
+
setDismissed(false);
|
|
270
|
+
setMounted(true);
|
|
271
|
+
};
|
|
272
|
+
const revealWhenReady = () => {
|
|
273
|
+
if (!delayElapsed || !interacted) return;
|
|
251
274
|
const ric = (window as unknown as { requestIdleCallback?: (cb: () => void) => number }).requestIdleCallback;
|
|
252
275
|
if (typeof ric === 'function') idleHandle = ric(reveal);
|
|
253
276
|
else reveal();
|
|
277
|
+
};
|
|
278
|
+
const stopListening = () => {
|
|
279
|
+
for (const type of FIRST_INTERACTION_EVENTS) window.removeEventListener(type, onInteraction, true);
|
|
280
|
+
};
|
|
281
|
+
function onInteraction() {
|
|
282
|
+
interacted = true;
|
|
283
|
+
stopListening();
|
|
284
|
+
revealWhenReady();
|
|
285
|
+
}
|
|
286
|
+
if (!interacted) {
|
|
287
|
+
for (const type of FIRST_INTERACTION_EVENTS) {
|
|
288
|
+
window.addEventListener(type, onInteraction, { capture: true, passive: true });
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
const timer = setTimeout(() => {
|
|
292
|
+
delayElapsed = true;
|
|
293
|
+
revealWhenReady();
|
|
254
294
|
}, appearDelayMs);
|
|
255
295
|
return () => {
|
|
256
296
|
clearTimeout(timer);
|
|
297
|
+
stopListening();
|
|
257
298
|
const cic = (window as unknown as { cancelIdleCallback?: (h: number) => void }).cancelIdleCallback;
|
|
258
299
|
if (idleHandle !== null && typeof cic === 'function') cic(idleHandle);
|
|
259
300
|
};
|
|
260
301
|
// `videoId`, not the object: a new identity (embedder refetch, re-seeded
|
|
261
302
|
// RSC payload) would otherwise restart the appear delay.
|
|
262
|
-
}, [appearDelayMs, dismissEnabled, storageKey, dismissalId, hasVideo, videoId]);
|
|
303
|
+
}, [appearDelayMs, dismissEnabled, storageKey, dismissalId, hasVideo, videoId, inline]);
|
|
263
304
|
|
|
264
305
|
// --- environment preferences (read after hydration; no SSR access) ---
|
|
265
306
|
// Derived, not stored: both inputs are plain reads of the environment, and
|
|
@@ -144,7 +144,7 @@ export function DropdownButton({
|
|
|
144
144
|
href={action.href}
|
|
145
145
|
download={action.download}
|
|
146
146
|
openInNewTab={action.openInNewTab}
|
|
147
|
-
onClick={action.onClick
|
|
147
|
+
onClick={action.onClick}
|
|
148
148
|
disabled={disabled}
|
|
149
149
|
loading={loading}
|
|
150
150
|
leftIcon={icon}
|
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
'use client';
|
|
23
23
|
import { forwardRef, type ComponentType, type ImgHTMLAttributes, type Ref } from 'react';
|
|
24
24
|
|
|
25
|
+
import { fetchPriorityProp } from '../utils/fetch-priority';
|
|
26
|
+
|
|
25
27
|
type ImageProps = Omit<ImgHTMLAttributes<HTMLImageElement>, 'src' | 'placeholder'> & {
|
|
26
28
|
src?: string | { src: string };
|
|
27
29
|
alt?: string;
|
|
@@ -91,12 +93,18 @@ const Image = forwardRef<HTMLImageElement, ImageProps>(function NextImageShim({
|
|
|
91
93
|
optimizedWidth && resizer && typeof given.src === 'string'
|
|
92
94
|
? { ...given, src: resizer(given.src, optimizedWidth), unoptimized: true }
|
|
93
95
|
: given;
|
|
94
|
-
//
|
|
95
|
-
//
|
|
96
|
-
//
|
|
96
|
+
// `priority` means "this is the picture the page is waiting for", so its
|
|
97
|
+
// request is ranked high on EVERY host. Stated here, once: since Next 16
|
|
98
|
+
// `priority` only preloads and no longer ranks the request, and the plain
|
|
99
|
+
// <img> below dropped the prop altogether, so an embedder's hero went out at
|
|
100
|
+
// the default priority. A caller that names its own `fetchPriority` keeps it.
|
|
101
|
+
const fetchPriority = props.fetchPriority ?? (props.priority ? 'high' : undefined);
|
|
102
|
+
|
|
103
|
+
// Real impl path — registered by the host. Every Next-specific prop
|
|
104
|
+
// (priority, placeholder, sizes, loader…) reaches the real component intact.
|
|
97
105
|
if (impl) {
|
|
98
106
|
const Real = impl;
|
|
99
|
-
return <Real ref={ref} {...props} />;
|
|
107
|
+
return <Real ref={ref} {...props} fetchPriority={fetchPriority} />;
|
|
100
108
|
}
|
|
101
109
|
|
|
102
110
|
// Fallback path — plain <img>. Drops Next-only props and reduces
|
|
@@ -115,6 +123,7 @@ const Image = forwardRef<HTMLImageElement, ImageProps>(function NextImageShim({
|
|
|
115
123
|
unoptimized: _unoptimized,
|
|
116
124
|
onLoadingComplete,
|
|
117
125
|
loader: _loader,
|
|
126
|
+
fetchPriority: _fetchPriority,
|
|
118
127
|
style,
|
|
119
128
|
...rest
|
|
120
129
|
} = props;
|
|
@@ -147,6 +156,8 @@ const Image = forwardRef<HTMLImageElement, ImageProps>(function NextImageShim({
|
|
|
147
156
|
style={finalStyle}
|
|
148
157
|
onLoad={onLoadingComplete ? e => onLoadingComplete(e.currentTarget) : undefined}
|
|
149
158
|
{...rest}
|
|
159
|
+
// The attribute's spelling depends on the host's React major (`fetchPriorityProp`).
|
|
160
|
+
{...(fetchPriority ? fetchPriorityProp(fetchPriority) : {})}
|
|
150
161
|
/>
|
|
151
162
|
);
|
|
152
163
|
});
|
package/dist/chunk-UR4K2NSL.cjs
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
|
|
2
|
-
|
|
3
|
-
// src/embed-shims/next-image.tsx
|
|
4
|
-
var _react = require('react');
|
|
5
|
-
var _jsxruntime = require('react/jsx-runtime');
|
|
6
|
-
var impl = null;
|
|
7
|
-
function registerImage(component) {
|
|
8
|
-
impl = component;
|
|
9
|
-
}
|
|
10
|
-
var resizer = null;
|
|
11
|
-
function registerImageResizer(fn) {
|
|
12
|
-
resizer = fn;
|
|
13
|
-
}
|
|
14
|
-
function resizedImageUrl(src, widthPx) {
|
|
15
|
-
return resizer ? resizer(src, widthPx) : src;
|
|
16
|
-
}
|
|
17
|
-
var Image = _react.forwardRef.call(void 0, function NextImageShim({ optimizedWidth, ...given }, ref) {
|
|
18
|
-
const props = optimizedWidth && resizer && typeof given.src === "string" ? { ...given, src: resizer(given.src, optimizedWidth), unoptimized: true } : given;
|
|
19
|
-
if (impl) {
|
|
20
|
-
const Real = impl;
|
|
21
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Real, { ref, ...props });
|
|
22
|
-
}
|
|
23
|
-
const {
|
|
24
|
-
src,
|
|
25
|
-
alt,
|
|
26
|
-
width,
|
|
27
|
-
height,
|
|
28
|
-
fill,
|
|
29
|
-
sizes: _sizes,
|
|
30
|
-
quality: _quality,
|
|
31
|
-
priority: _priority,
|
|
32
|
-
placeholder: _placeholder,
|
|
33
|
-
blurDataURL: _blurDataURL,
|
|
34
|
-
unoptimized: _unoptimized,
|
|
35
|
-
onLoadingComplete,
|
|
36
|
-
loader: _loader,
|
|
37
|
-
style,
|
|
38
|
-
...rest
|
|
39
|
-
} = props;
|
|
40
|
-
const srcStr = typeof src === "string" ? src : _optionalChain([src, 'optionalAccess', _ => _.src]);
|
|
41
|
-
const finalStyle = fill ? {
|
|
42
|
-
position: "absolute",
|
|
43
|
-
inset: 0,
|
|
44
|
-
width: "100%",
|
|
45
|
-
height: "100%",
|
|
46
|
-
...style
|
|
47
|
-
} : style;
|
|
48
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
49
|
-
"img",
|
|
50
|
-
{
|
|
51
|
-
ref,
|
|
52
|
-
src: srcStr,
|
|
53
|
-
alt: _nullishCoalesce(alt, () => ( "")),
|
|
54
|
-
width: fill ? void 0 : width,
|
|
55
|
-
height: fill ? void 0 : height,
|
|
56
|
-
style: finalStyle,
|
|
57
|
-
onLoad: onLoadingComplete ? (e) => onLoadingComplete(e.currentTarget) : void 0,
|
|
58
|
-
...rest
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
});
|
|
62
|
-
var next_image_default = Image;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
exports.registerImage = registerImage; exports.registerImageResizer = registerImageResizer; exports.resizedImageUrl = resizedImageUrl; exports.next_image_default = next_image_default;
|