@flamingo-stack/openframe-frontend-core 0.0.777 → 0.0.780
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/{case-study-card-FMH622O5.cjs → case-study-card-WXMWYGSW.cjs} +2 -2
- package/dist/{chunk-JMFF3L3T.cjs → chunk-2JO5HNEF.cjs} +23 -23
- package/dist/{chunk-SDZG7VV7.cjs → chunk-2W3VDE4D.cjs} +2 -2
- package/dist/{chunk-4JZDJ34E.cjs → chunk-4BBOHZM3.cjs} +4 -4
- package/dist/{chunk-QIATO42V.cjs → chunk-4NRVV3KO.cjs} +3 -3
- package/dist/{chunk-BDDOC425.cjs → chunk-AQXEM7GI.cjs} +3 -3
- package/dist/{chunk-ALA4KHTE.cjs → chunk-DQALLDTZ.cjs} +4 -4
- package/dist/{chunk-LU2DGST4.cjs → chunk-F3BASIMT.cjs} +78 -78
- package/dist/{chunk-Y6MQBLTZ.cjs → chunk-HUPDPANN.cjs} +4 -4
- package/dist/{chunk-3PCSEZNZ.cjs → chunk-I4IC3BRC.cjs} +39 -39
- package/dist/{chunk-7LJSGOWS.cjs → chunk-IE3QCYBT.cjs} +13 -13
- package/dist/{chunk-VY3NGJRH.cjs → chunk-ILRQXZBA.cjs} +52 -52
- package/dist/{chunk-T47VAUYR.cjs → chunk-KA3VQ6X2.cjs} +69 -69
- package/dist/{chunk-WCSWWVPF.cjs → chunk-MLX6Z7TU.cjs} +2 -2
- package/dist/{chunk-MQPTOJMF.cjs → chunk-OH5LAH3X.cjs} +3 -51
- package/dist/{chunk-G2N7INFT.cjs → chunk-OMHQZXCD.cjs} +11 -11
- package/dist/{chunk-TZP7PSPG.cjs → chunk-OWQVDWTK.cjs} +109 -103
- package/dist/{chunk-XVAVQ4BK.cjs → chunk-PQBGSVZE.cjs} +38 -38
- package/dist/{chunk-LGNJTSKB.cjs → chunk-QEFDGI3Z.cjs} +29 -29
- package/dist/{chunk-WMZIBRTR.cjs → chunk-QIQYD75I.cjs} +2 -2
- package/dist/{chunk-T7NDPPLF.cjs → chunk-TVDQMG7I.cjs} +18 -18
- package/dist/{chunk-HXLOCZMG.cjs → chunk-UPAE4IV5.cjs} +167 -167
- package/dist/{chunk-DOM5CUEY.cjs → chunk-WR7KJML6.cjs} +30 -30
- package/dist/{chunk-CGQ7CL62.cjs → chunk-YG72MEHY.cjs} +98 -98
- package/dist/{chunk-U5VQFKRZ.cjs → chunk-YNECNYQF.cjs} +4 -4
- package/dist/{chunk-S3YDUX2I.cjs → chunk-YWQ3VXPL.cjs} +75 -75
- package/dist/{chunk-UW6AOF42.cjs → chunk-ZGWS3NJR.cjs} +13 -13
- package/dist/{cloud-tenants-EUH42CCL.cjs → cloud-tenants-2ZLGCSGK.cjs} +8 -8
- package/dist/components/case-studies/index.cjs +24 -24
- package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
- package/dist/components/chat/chat-message-enhanced.js +8 -4
- package/dist/components/chat/chat-message-list.d.ts.map +1 -1
- package/dist/components/chat/chat-message-list.js +2 -0
- package/dist/components/chat/index.cjs +6 -6
- package/dist/components/chat/types/component.types.d.ts +9 -0
- package/dist/components/chat/types/component.types.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +9 -9
- package/dist/components/docs/index.cjs +12 -12
- package/dist/components/embeds/index.cjs +9 -9
- package/dist/components/faq/index.cjs +10 -10
- package/dist/components/features/index.cjs +8 -8
- package/dist/components/features/video-hover-preview.d.ts.map +1 -1
- package/dist/components/features/video-hover-preview.js +2 -5
- package/dist/components/features/video.d.ts.map +1 -1
- package/dist/components/features/video.js +1 -44
- package/dist/components/help-center-pages/index.cjs +84 -84
- package/dist/components/index.cjs +56 -56
- package/dist/components/meeting-scheduler/index.cjs +38 -38
- package/dist/components/navigation/index.cjs +11 -11
- package/dist/components/onboarding-guides/index.cjs +11 -11
- package/dist/components/product-demo/index.cjs +17 -17
- package/dist/components/related-content/index.cjs +6 -6
- package/dist/components/tickets/index.cjs +14 -14
- package/dist/components/ui/index.cjs +8 -8
- package/dist/{devices-WL3I23EE.cjs → devices-UOBQFPV3.cjs} +9 -9
- package/dist/{embeddable-chat-KEWUGQIF.cjs → embeddable-chat-SFQWRUIV.cjs} +74 -74
- package/dist/index.cjs +12 -12
- package/dist/{knowledge-O3PXUX73.cjs → knowledge-5K3LTHGB.cjs} +9 -9
- package/dist/{logs-XODCXWYI.cjs → logs-WU3N6ESS.cjs} +16 -16
- package/dist/{policies-CQACBIKK.cjs → policies-2IYASCQO.cjs} +12 -12
- package/dist/{scripts-QMM6SEB5.cjs → scripts-IQBKOQEY.cjs} +13 -13
- package/dist/{software-update-CCCKS4ZE.cjs → software-update-GJLDO5X5.cjs} +11 -11
- package/package.json +1 -1
- package/src/components/chat/chat-message-enhanced.tsx +13 -4
- package/src/components/chat/chat-message-list.tsx +2 -0
- package/src/components/chat/types/component.types.ts +9 -0
- package/src/components/features/video-hover-preview.tsx +37 -46
- package/src/components/features/video.tsx +1 -61
|
@@ -46,7 +46,6 @@ import { useNearViewport } from '../../hooks/use-near-viewport';
|
|
|
46
46
|
import { cn } from '../../utils/cn';
|
|
47
47
|
import { fetchPriorityProp } from '../../utils/fetch-priority';
|
|
48
48
|
import { UnifiedSkeleton } from '../loading/unified-skeleton';
|
|
49
|
-
import { Button } from '../ui/button/button';
|
|
50
49
|
import { useLoadingScope } from '../ui/loading-scope';
|
|
51
50
|
import { VideoPlayBadge } from './video-center-badge';
|
|
52
51
|
import type { FilePlayerProps } from './video-file-player';
|
|
@@ -136,65 +135,7 @@ function FilePlayerFallback({
|
|
|
136
135
|
return <PosterBox poster={poster} className={className} priority={priority} fill />;
|
|
137
136
|
}
|
|
138
137
|
|
|
139
|
-
|
|
140
|
-
* A video nobody has asked to play yet starts as its poster and a play button, the way a YouTube video does
|
|
141
|
-
* (`YouTubeFacade`): the player and hls.js are the largest script a page can load, and on a page whose video waits for
|
|
142
|
-
* a click (a session, an episode, a release) loading them up front cost every visitor a long main-thread task before
|
|
143
|
-
* anyone pressed play (CU-17tkuw5xp4q). A pointer, focus or touch on the button starts the download, so the player is
|
|
144
|
-
* usually there by the click, and the click plays it with sound. A video that plays by itself (autoplay, hover
|
|
145
|
-
* playback, a resumed position, chrome-less) or whose host drives it through a handle mounts its player as before.
|
|
146
|
-
*/
|
|
147
|
-
function waitsForPlay(props: FilePlayerProps): boolean {
|
|
148
|
-
return (
|
|
149
|
-
!props.autoPlay &&
|
|
150
|
-
!props.autoPlayUnmuted &&
|
|
151
|
-
!props.playOnHover &&
|
|
152
|
-
props.playWhenHovered === undefined &&
|
|
153
|
-
props.startTime === undefined &&
|
|
154
|
-
!props.playerHandleRef &&
|
|
155
|
-
!props.chromeless
|
|
156
|
-
);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
function FilePlayer({
|
|
160
|
-
title,
|
|
161
|
-
priority,
|
|
162
|
-
...props
|
|
163
|
-
}: FilePlayerProps & { title?: string; priority?: boolean }): React.ReactElement {
|
|
164
|
-
// Decided once: a video that started as a facade stays the player once pressed, whatever its props do later.
|
|
165
|
-
const [facade] = useState(() => waitsForPlay(props));
|
|
166
|
-
const [pressed, setPressed] = useState(false);
|
|
167
|
-
if (facade && !pressed) {
|
|
168
|
-
return (
|
|
169
|
-
<div className={cn('relative', props.className)} style={{ width: '100%', height: '100%' }}>
|
|
170
|
-
<FilePlayerFallback poster={props.poster} className="absolute inset-0" priority={priority} />
|
|
171
|
-
<Button
|
|
172
|
-
type="button"
|
|
173
|
-
variant="glyph"
|
|
174
|
-
size="wrap"
|
|
175
|
-
aria-label={title ? `Play: ${title}` : 'Play video'}
|
|
176
|
-
onPointerEnter={loadFilePlayer}
|
|
177
|
-
onFocus={loadFilePlayer}
|
|
178
|
-
onTouchStart={loadFilePlayer}
|
|
179
|
-
onClick={() => {
|
|
180
|
-
loadFilePlayer();
|
|
181
|
-
setPressed(true);
|
|
182
|
-
}}
|
|
183
|
-
className="group absolute inset-0 rounded-none"
|
|
184
|
-
>
|
|
185
|
-
<VideoPlayBadge
|
|
186
|
-
size="lg"
|
|
187
|
-
className="transition-transform duration-200 group-hover:scale-110 group-hover:text-ods-accent"
|
|
188
|
-
/>
|
|
189
|
-
</Button>
|
|
190
|
-
</div>
|
|
191
|
-
);
|
|
192
|
-
}
|
|
193
|
-
// Pressed: the click is the visitor's gesture, so the player starts with sound (muted if the browser refuses).
|
|
194
|
-
return <LoadedFilePlayer {...props} priority={priority} {...(facade ? { autoPlayUnmuted: true } : {})} />;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
function LoadedFilePlayer({ priority, ...props }: FilePlayerProps & { priority?: boolean }): React.ReactElement {
|
|
138
|
+
function FilePlayer({ priority, ...props }: FilePlayerProps & { priority?: boolean }): React.ReactElement {
|
|
198
139
|
// The player's component when its module has arrived (a loaded module, drawn through `createElement`).
|
|
199
140
|
const arrived = useSyncExternalStore(subscribeToFilePlayer, loadedFilePlayer, noFilePlayer);
|
|
200
141
|
if (arrived) return createElement(arrived, props);
|
|
@@ -327,7 +268,6 @@ export function Video(props: VideoProps): React.ReactElement | null {
|
|
|
327
268
|
<FilePlayer
|
|
328
269
|
url={url}
|
|
329
270
|
poster={props.poster}
|
|
330
|
-
title={props.title}
|
|
331
271
|
priority={props.priority}
|
|
332
272
|
muted={props.muted}
|
|
333
273
|
{...pickFilePlayback(props)}
|