@bendyline/squisq-react 2.11.17 → 2.11.19

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.
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  JsonView,
3
3
  createJsonFormFenceRenderer
4
- } from "../chunk-L4LIIOU2.js";
4
+ } from "../chunk-J4BHV6UO.js";
5
5
  import "../chunk-TT6ENR6T.js";
6
- import "../chunk-2FZUFQO3.js";
6
+ import "../chunk-YLFAOGJF.js";
7
7
  import "../chunk-QXZXQPL3.js";
8
8
  import "../chunk-63G5OJWY.js";
9
9
  export {
@@ -8,7 +8,7 @@ import {
8
8
  TextLayer,
9
9
  TreeLayer,
10
10
  VideoLayer
11
- } from "../chunk-PZCWGBRQ.js";
11
+ } from "../chunk-WG7ALU5G.js";
12
12
  import "../chunk-QXZXQPL3.js";
13
13
  import "../chunk-63G5OJWY.js";
14
14
  export {
@@ -1,10 +1,10 @@
1
1
  export { a as CodeBlockCopyContext, C as CodeBlockCopyHandler, M as MarkdownRenderer, b as MarkdownRendererProps } from '../MarkdownRenderer-CC9dOc6b.js';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import { Theme } from '@bendyline/squisq/schemas';
4
+ import { VideoEmbed } from '@bendyline/squisq/markdown';
4
5
  import * as react from 'react';
5
6
  import { FenceRendererMap } from '@bendyline/squisq/fence';
6
7
  export { FenceRenderContext, FenceRenderer, FenceRendererMap } from '@bendyline/squisq/fence';
7
- import '@bendyline/squisq/markdown';
8
8
 
9
9
  interface MermaidDiagramProps {
10
10
  source: string;
@@ -16,8 +16,28 @@ interface MermaidDiagramProps {
16
16
  /** Read-only Mermaid rendering for page bodies and slide layers. */
17
17
  declare function MermaidDiagram({ source, className, ariaLabel, theme, }: MermaidDiagramProps): react_jsx_runtime.JSX.Element;
18
18
 
19
+ interface VideoEmbedFrameProps {
20
+ /** The recognized video (`parseVideoEmbedUrl` / `findBlockVideoEmbed`). */
21
+ embed: VideoEmbed;
22
+ /**
23
+ * The author's label. Names the iframe for assistive tech and, when
24
+ * `showCaption` is on, renders beneath the player as a link to the page.
25
+ */
26
+ title?: string | null;
27
+ /** Render the title as a caption linking to the watch page (default true). */
28
+ showCaption?: boolean;
29
+ /**
30
+ * Phrasing-content root (`<span>`, no caption) for a player nested in
31
+ * authored HTML, where a `<figure>` could land inside a `<p>`.
32
+ */
33
+ inline?: boolean;
34
+ /** Extra className on the root element. */
35
+ className?: string;
36
+ }
37
+ declare function VideoEmbedFrame({ embed, title, showCaption, inline, className, }: VideoEmbedFrameProps): react_jsx_runtime.JSX.Element;
38
+
19
39
  declare const FenceRendererContext: react.Context<FenceRendererMap | null>;
20
40
  /** The ambient registry, or null when no provider wraps this subtree. */
21
41
  declare function useFenceRenderers(): FenceRendererMap | null;
22
42
 
23
- export { FenceRendererContext, MermaidDiagram, type MermaidDiagramProps, useFenceRenderers };
43
+ export { FenceRendererContext, MermaidDiagram, type MermaidDiagramProps, VideoEmbedFrame, type VideoEmbedFrameProps, useFenceRenderers };
@@ -1,8 +1,9 @@
1
1
  import {
2
2
  FenceRendererContext,
3
3
  MarkdownRenderer,
4
+ VideoEmbedFrame,
4
5
  useFenceRenderers
5
- } from "../chunk-2FZUFQO3.js";
6
+ } from "../chunk-YLFAOGJF.js";
6
7
  import {
7
8
  MermaidDiagram
8
9
  } from "../chunk-QXZXQPL3.js";
@@ -11,5 +12,6 @@ export {
11
12
  FenceRendererContext,
12
13
  MarkdownRenderer,
13
14
  MermaidDiagram,
15
+ VideoEmbedFrame,
14
16
  useFenceRenderers
15
17
  };
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  PaginatedDocView
3
- } from "../chunk-PSAO2CTF.js";
3
+ } from "../chunk-ZNW3DJAD.js";
4
4
  import {
5
5
  CanvasSection,
6
6
  LinearDocView,
7
7
  PageSectionView,
8
8
  PageViewContext,
9
9
  usePageView
10
- } from "../chunk-2VSD55NT.js";
10
+ } from "../chunk-BMQ3EGOP.js";
11
11
  import "../chunk-TT6ENR6T.js";
12
- import "../chunk-2FZUFQO3.js";
13
- import "../chunk-5FJZDX7H.js";
14
- import "../chunk-PZCWGBRQ.js";
12
+ import "../chunk-YLFAOGJF.js";
13
+ import "../chunk-KJZF2U3I.js";
14
+ import "../chunk-WG7ALU5G.js";
15
15
  import "../chunk-QXZXQPL3.js";
16
16
  import "../chunk-63G5OJWY.js";
17
17
  export {
@@ -1,4 +1,4 @@
1
- export { B as BlockMarker, c as BlockRenderer, C as CaptionMode, d as CaptionOverlay, f as CaptionStyle, g as ControlsLayout, D as DisplayMode, h as DocControlsBottom, i as DocControlsOverlay, j as DocControlsSidebar, k as DocControlsSlideshow, l as DocPlayer, m as DocPlayerProps, n as DocPlayerWithSidebar, o as DocProgressBar, F as FlashcardFaceView, p as FlashcardFaceViewProps, q as FlashcardView, r as FlashcardViewProps, I as InlineAudioPlayer, s as InlineAudioPlayerProps, t as InlineVideoPlayer, u as InlineVideoPlayerProps, M as MediaClipLayer, v as MediaClipLayerProps, b as PipPosition, a as PipShape, P as PipSize, w as PlaybackActions, x as PlaybackState, R as RenderAudioSegmentInfo, y as RenderBlockInfo, z as RenderCaptionInfo, A as RenderChapterInfo, G as SlideNavActions, H as SocialCaptionOverlay, S as SquisqRenderAPI, V as VideoPresentation, J as formatTime } from '../player-BCPc3Tv3.js';
1
+ export { B as BlockMarker, c as BlockRenderer, C as CaptionMode, d as CaptionOverlay, f as CaptionStyle, g as ControlsLayout, D as DisplayMode, h as DocControlsBottom, i as DocControlsOverlay, j as DocControlsSidebar, k as DocControlsSlideshow, l as DocPlayer, m as DocPlayerProps, n as DocPlayerWithSidebar, o as DocProgressBar, F as FlashcardFaceView, p as FlashcardFaceViewProps, q as FlashcardView, r as FlashcardViewProps, I as InlineAudioPlayer, s as InlineAudioPlayerProps, t as InlineVideoPlayer, u as InlineVideoPlayerProps, M as MediaClipLayer, v as MediaClipLayerProps, b as PipPosition, a as PipShape, P as PipSize, w as PlaybackActions, x as PlaybackState, R as RenderAudioSegmentInfo, y as RenderBlockInfo, z as RenderCaptionInfo, A as RenderChapterInfo, G as SlideNavActions, H as SocialCaptionOverlay, S as SquisqRenderAPI, V as VideoPresentation, J as formatTime } from '../player-xxe4LWQI.js';
2
2
  export { a as CodeBlockCopyContext, C as CodeBlockCopyHandler } from '../MarkdownRenderer-CC9dOc6b.js';
3
3
  import 'react/jsx-runtime';
4
4
  import '@bendyline/squisq/schemas';
@@ -12,18 +12,18 @@ import {
12
12
  MediaClipLayer,
13
13
  SocialCaptionOverlay,
14
14
  formatTime
15
- } from "../chunk-622IA3KB.js";
16
- import "../chunk-2VSD55NT.js";
15
+ } from "../chunk-LXOQCAU6.js";
16
+ import "../chunk-BMQ3EGOP.js";
17
17
  import "../chunk-SVVPYDV3.js";
18
18
  import "../chunk-TT6ENR6T.js";
19
19
  import {
20
20
  InlineAudioPlayer,
21
21
  InlineVideoPlayer
22
- } from "../chunk-2FZUFQO3.js";
22
+ } from "../chunk-YLFAOGJF.js";
23
23
  import {
24
24
  BlockRenderer
25
- } from "../chunk-5FJZDX7H.js";
26
- import "../chunk-PZCWGBRQ.js";
25
+ } from "../chunk-KJZF2U3I.js";
26
+ import "../chunk-WG7ALU5G.js";
27
27
  import "../chunk-QXZXQPL3.js";
28
28
  import "../chunk-63G5OJWY.js";
29
29
  export {
@@ -327,6 +327,8 @@ interface DocPlayerProps {
327
327
  */
328
328
  declare function DocPlayer(props: DocPlayerProps): react_jsx_runtime.JSX.Element;
329
329
 
330
+ type VideoEmbedMode = 'player' | 'poster' | 'placeholder';
331
+
330
332
  /** Viewport configuration type */
331
333
  interface ViewportDimensions {
332
334
  width: number;
@@ -363,8 +365,14 @@ interface BlockRendererProps {
363
365
  tableContentRenderer?: TableLayerContentRenderer;
364
366
  /** Grow all slide text by one shared factor without overflow or new overlap. */
365
367
  growTextToFit?: boolean;
368
+ /**
369
+ * How hosted-video layers (YouTube, Vimeo, …) draw: a live `player`, a
370
+ * `poster` (default — thumbnails and previews never load a player), or a
371
+ * `placeholder` poster with no remote thumbnail, for frame capture.
372
+ */
373
+ videoEmbeds?: VideoEmbedMode;
366
374
  }
367
- declare function BlockRenderer({ block, blockTime, basePath, isEntering, isExiting, transition, viewport, isPlaying, muted, animationsEnabled, theme, tableContentRenderer, growTextToFit, }: BlockRendererProps): react_jsx_runtime.JSX.Element;
375
+ declare function BlockRenderer({ block, blockTime, basePath, isEntering, isExiting, transition, viewport, isPlaying, muted, animationsEnabled, theme, tableContentRenderer, growTextToFit, videoEmbeds, }: BlockRendererProps): react_jsx_runtime.JSX.Element;
368
376
 
369
377
  interface CaptionOverlayProps {
370
378
  /** Caption track with timestamped phrases */
@@ -534,8 +542,10 @@ interface InlineVideoPlayerProps {
534
542
  preload?: 'none' | 'metadata' | 'auto';
535
543
  /** Extra className on the wrapper. */
536
544
  className?: string;
545
+ /** Accessible name — a markdown reference's alt text; `<video>` has no `alt`. */
546
+ label?: string;
537
547
  }
538
- declare function InlineVideoPlayer({ src, basePath, width, height, poster, controls, preload, className, }: InlineVideoPlayerProps): react_jsx_runtime.JSX.Element | null;
548
+ declare function InlineVideoPlayer({ src, basePath, width, height, poster, controls, preload, className, label, }: InlineVideoPlayerProps): react_jsx_runtime.JSX.Element | null;
539
549
 
540
550
  interface InlineAudioPlayerProps {
541
551
  /** Source path — resolved through MediaContext when relative. */
@@ -548,8 +558,10 @@ interface InlineAudioPlayerProps {
548
558
  preload?: 'none' | 'metadata' | 'auto';
549
559
  /** Extra className on the wrapper. */
550
560
  className?: string;
561
+ /** Accessible name — a markdown reference's alt text; `<audio>` has no `alt`. */
562
+ label?: string;
551
563
  }
552
- declare function InlineAudioPlayer({ src, basePath, controls, preload, className, }: InlineAudioPlayerProps): react_jsx_runtime.JSX.Element | null;
564
+ declare function InlineAudioPlayer({ src, basePath, controls, preload, className, label, }: InlineAudioPlayerProps): react_jsx_runtime.JSX.Element | null;
553
565
 
554
566
  interface MediaClipLayerProps {
555
567
  schedule: ScheduledClip[];