@bendyline/squisq-react 2.5.0 → 2.6.0

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,7 +1,10 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { Doc, ViewportConfig, Theme, SurfaceScheme, ThemePageStyle } from '@bendyline/squisq/schemas';
3
3
  import { PageTransformHints, PageSectionMaterialization, PageSection, MaterializeBlockLayersOptions } from '@bendyline/squisq/doc';
4
+ import { C as CodeBlockCopyHandler } from '../MarkdownRenderer-CerBKw-c.js';
5
+ export { a as CodeBlockCopyContext } from '../MarkdownRenderer-CerBKw-c.js';
4
6
  import * as react from 'react';
7
+ import '@bendyline/squisq/markdown';
5
8
 
6
9
  interface LinearDocViewProps {
7
10
  /**
@@ -63,6 +66,10 @@ interface LinearDocViewProps {
63
66
  * emphasis-curve adjustments defined by `TransformStyleConfig.page`.
64
67
  */
65
68
  transformPage?: PageTransformHints;
69
+ /** Show a Copy button on ordinary fenced code blocks (default: false). */
70
+ showCodeCopyButton?: boolean;
71
+ /** Optional host clipboard adapter; otherwise the browser Clipboard API is used. */
72
+ onCopyCode?: CodeBlockCopyHandler;
66
73
  }
67
74
  type ImageDisplayMode = 'inline' | 'thumbnail';
68
75
  /**
@@ -73,7 +80,7 @@ type ImageDisplayMode = 'inline' | 'thumbnail';
73
80
  * <LinearDocView doc={doc} basePath="/media/" />
74
81
  * ```
75
82
  */
76
- declare function LinearDocView({ doc, markdown, basePath, viewport, className, theme, surface, animationsEnabled, thinMargins, imageDisplayMode, globalKeyboardShortcuts, showCover, transformPage, }: LinearDocViewProps): react_jsx_runtime.JSX.Element;
83
+ declare function LinearDocView({ doc, markdown, basePath, viewport, className, theme, surface, animationsEnabled, thinMargins, imageDisplayMode, globalKeyboardShortcuts, showCover, transformPage, showCodeCopyButton, onCopyCode, }: LinearDocViewProps): react_jsx_runtime.JSX.Element;
77
84
 
78
85
  interface PageSectionViewProps {
79
86
  entry: PageSectionMaterialization;
@@ -98,8 +105,10 @@ interface PageViewContextValue {
98
105
  renderContext: MaterializeBlockLayersOptions;
99
106
  animationsEnabled: boolean;
100
107
  imageDisplayMode: ImageDisplayMode;
108
+ showCodeCopyButton: boolean;
109
+ onCopyCode?: CodeBlockCopyHandler;
101
110
  }
102
111
  declare const PageViewContext: react.Context<PageViewContextValue>;
103
112
  declare function usePageView(): PageViewContextValue;
104
113
 
105
- export { CanvasSection, type CanvasSectionProps, type ImageDisplayMode, LinearDocView, type LinearDocViewProps, PageSectionView, type PageSectionViewProps, PageViewContext, type PageViewContextValue, usePageView };
114
+ export { CanvasSection, type CanvasSectionProps, CodeBlockCopyHandler, type ImageDisplayMode, LinearDocView, type LinearDocViewProps, PageSectionView, type PageSectionViewProps, PageViewContext, type PageViewContextValue, usePageView };
@@ -4,10 +4,10 @@ import {
4
4
  PageSectionView,
5
5
  PageViewContext,
6
6
  usePageView
7
- } from "../chunk-THDXCSPC.js";
7
+ } from "../chunk-U6P7HBUY.js";
8
8
  import "../chunk-UJEHDVQO.js";
9
9
  import "../chunk-TT6ENR6T.js";
10
- import "../chunk-VMPQEUJH.js";
10
+ import "../chunk-TMCLQNLM.js";
11
11
  import "../chunk-WLUZTUNZ.js";
12
12
  import "../chunk-LR3AIGDD.js";
13
13
  export {
@@ -2,7 +2,10 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { Block, VideoPresentation as VideoPresentation$1, VideoPipSize, VideoPipShape, VideoPipPosition, Doc, Theme, SurfaceScheme, Transition, CaptionTrack, ViewportConfig as ViewportConfig$1, ScheduledClip } from '@bendyline/squisq/schemas';
3
3
  import { ViewportConfig, CoverSlideTemplate, CoverSlidePlayback } from '@bendyline/squisq/doc';
4
4
  import { a as AudioController } from '../AudioController-DwMsPe38.js';
5
+ import { C as CodeBlockCopyHandler } from '../MarkdownRenderer-CerBKw-c.js';
6
+ export { a as CodeBlockCopyContext } from '../MarkdownRenderer-CerBKw-c.js';
5
7
  import { CSSProperties } from 'react';
8
+ import '@bendyline/squisq/markdown';
6
9
 
7
10
  /**
8
11
  * Doc Player Control Types
@@ -243,6 +246,10 @@ interface DocPlayerProps {
243
246
  pipPosition?: PipPosition;
244
247
  enableSwipe?: boolean;
245
248
  globalKeyboardShortcuts?: boolean;
249
+ /** Show a Copy button on fenced code blocks in linear mode (default: false). */
250
+ showCodeCopyButton?: boolean;
251
+ /** Optional host clipboard adapter; otherwise the browser Clipboard API is used. */
252
+ onCopyCode?: CodeBlockCopyHandler;
246
253
  }
247
254
 
248
255
  /**
@@ -461,4 +468,4 @@ interface MediaClipLayerProps {
461
468
  }
462
469
  declare function MediaClipLayer({ schedule, currentTime, isPlaying, basePath, renderMode, muted, presentation, pipSize, pipShape, pipPosition, pipOrientation, pipFrameStyle, honorClipPresentation, }: MediaClipLayerProps): react_jsx_runtime.JSX.Element | null;
463
470
 
464
- export { type BlockMarker, BlockRenderer, type CaptionMode, CaptionOverlay, type CaptionStyle, type ControlsLayout, type DisplayMode, DocControlsBottom, DocControlsOverlay, DocControlsSidebar, DocControlsSlideshow, DocPlayer, type DocPlayerProps, DocPlayerWithSidebar, DocProgressBar, InlineAudioPlayer, type InlineAudioPlayerProps, InlineVideoPlayer, type InlineVideoPlayerProps, MediaClipLayer, type MediaClipLayerProps, type PipPosition, type PipShape, type PipSize, type PlaybackActions, type PlaybackState, type RenderAudioSegmentInfo, type RenderBlockInfo, type RenderCaptionInfo, type RenderChapterInfo, type SlideNavActions, SocialCaptionOverlay, type SquisqRenderAPI, type VideoPresentation, formatTime };
471
+ export { type BlockMarker, BlockRenderer, type CaptionMode, CaptionOverlay, type CaptionStyle, CodeBlockCopyHandler, type ControlsLayout, type DisplayMode, DocControlsBottom, DocControlsOverlay, DocControlsSidebar, DocControlsSlideshow, DocPlayer, type DocPlayerProps, DocPlayerWithSidebar, DocProgressBar, InlineAudioPlayer, type InlineAudioPlayerProps, InlineVideoPlayer, type InlineVideoPlayerProps, MediaClipLayer, type MediaClipLayerProps, type PipPosition, type PipShape, type PipSize, type PlaybackActions, type PlaybackState, type RenderAudioSegmentInfo, type RenderBlockInfo, type RenderCaptionInfo, type RenderChapterInfo, type SlideNavActions, SocialCaptionOverlay, type SquisqRenderAPI, type VideoPresentation, formatTime };
@@ -10,17 +10,17 @@ import {
10
10
  MediaClipLayer,
11
11
  SocialCaptionOverlay,
12
12
  formatTime
13
- } from "../chunk-ZKNX3EJI.js";
13
+ } from "../chunk-GWD62KLD.js";
14
14
  import {
15
15
  BlockRenderer
16
- } from "../chunk-THDXCSPC.js";
16
+ } from "../chunk-U6P7HBUY.js";
17
17
  import "../chunk-UJEHDVQO.js";
18
- import "../chunk-BOZJ655L.js";
18
+ import "../chunk-MVJQL2W2.js";
19
19
  import "../chunk-TT6ENR6T.js";
20
20
  import {
21
21
  InlineAudioPlayer,
22
22
  InlineVideoPlayer
23
- } from "../chunk-VMPQEUJH.js";
23
+ } from "../chunk-TMCLQNLM.js";
24
24
  import "../chunk-WLUZTUNZ.js";
25
25
  import "../chunk-LR3AIGDD.js";
26
26
  export {