@bendyline/squisq-react 2.5.0 → 2.7.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.
- package/README.md +19 -0
- package/dist/MarkdownRenderer-CC9dOc6b.d.ts +62 -0
- package/dist/{chunk-ZKNX3EJI.js → chunk-DYAFB3AH.js} +17 -5
- package/dist/{chunk-VMPQEUJH.js → chunk-ESI3P77P.js} +124 -6
- package/dist/{chunk-BOZJ655L.js → chunk-MVJQL2W2.js} +19 -12
- package/dist/{chunk-DJRYQQXB.js → chunk-NJRSGSFW.js} +68 -2
- package/dist/{chunk-THDXCSPC.js → chunk-U3HRSQ45.js} +84 -14
- package/dist/hooks/index.d.ts +5 -1
- package/dist/hooks/index.js +1 -1
- package/dist/index.d.ts +10 -3
- package/dist/index.js +13 -7
- package/dist/json-view/index.d.ts +58 -1
- package/dist/json-view/index.js +6 -4
- package/dist/markdown/index.d.ts +10 -31
- package/dist/markdown/index.js +7 -3
- package/dist/page/index.d.ts +30 -2
- package/dist/page/index.js +2 -2
- package/dist/player/index.d.ts +15 -1
- package/dist/player/index.js +4 -4
- package/dist/squisq-player.full.global.js +445 -418
- package/dist/squisq-player.global.js +87 -60
- package/dist/standalone-source.js +1 -1
- package/dist/styles/index.css +66 -0
- package/package.json +2 -2
package/dist/hooks/index.d.ts
CHANGED
|
@@ -18,10 +18,14 @@ import { ResourcePolicy } from '@bendyline/squisq/markdown';
|
|
|
18
18
|
* This is the HTML5 Audio implementation of the AudioController interface.
|
|
19
19
|
* Hosts that drive audio through an external player (e.g. a native shell)
|
|
20
20
|
* can supply their own AudioController to DocPlayer instead of this hook.
|
|
21
|
+
*
|
|
22
|
+
* In `synthetic` mode there is no audio element to follow, so a caller that
|
|
23
|
+
* has no segments passes `syntheticDuration` — the document's own timeline
|
|
24
|
+
* length — and the same segment machinery drives a timer instead.
|
|
21
25
|
*/
|
|
22
26
|
|
|
23
27
|
type AudioSyncMode = 'media' | 'synthetic';
|
|
24
|
-
declare function useAudioSync(audioRef: RefObject<HTMLAudioElement>,
|
|
28
|
+
declare function useAudioSync(audioRef: RefObject<HTMLAudioElement>, track: AudioTrack | undefined, basePath?: string, enabled?: boolean, mode?: AudioSyncMode, syntheticDuration?: number): AudioController;
|
|
25
29
|
|
|
26
30
|
interface ModalDialogOptions {
|
|
27
31
|
/** The backdrop/portal root. Siblings of this branch are made inert. */
|
package/dist/hooks/index.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { SquisqRenderAPI, VideoPresentation as VideoPresentation$1, PipSize, PipShape, PipPosition } from './player/index.js';
|
|
2
2
|
export { BlockMarker, BlockRenderer, CaptionMode, CaptionOverlay, CaptionStyle, ControlsLayout, DisplayMode, DocControlsBottom, DocControlsOverlay, DocControlsSidebar, DocControlsSlideshow, DocPlayer, DocPlayerProps, DocPlayerWithSidebar, DocProgressBar, InlineAudioPlayer, InlineAudioPlayerProps, InlineVideoPlayer, InlineVideoPlayerProps, MediaClipLayer, MediaClipLayerProps, PlaybackActions, PlaybackState, RenderAudioSegmentInfo, RenderBlockInfo, RenderCaptionInfo, RenderChapterInfo, SlideNavActions, SocialCaptionOverlay, formatTime } from './player/index.js';
|
|
3
3
|
import { Theme, VideoPresentation, VideoPipSize, VideoPipShape, VideoPipPosition, Doc, ScheduledClip, MediaProvider } from '@bendyline/squisq/schemas';
|
|
4
|
-
|
|
4
|
+
import { C as CodeBlockCopyHandler } from './MarkdownRenderer-CC9dOc6b.js';
|
|
5
|
+
export { a as CodeBlockCopyContext, M as MarkdownRenderer, b as MarkdownRendererProps } from './MarkdownRenderer-CC9dOc6b.js';
|
|
6
|
+
export { FenceRendererContext, MermaidDiagram, MermaidDiagramProps, useFenceRenderers } from './markdown/index.js';
|
|
5
7
|
export { CanvasSection, CanvasSectionProps, ImageDisplayMode, LinearDocView, LinearDocViewProps, PageSectionView, PageSectionViewProps, PageViewContext, PageViewContextValue, usePageView } from './page/index.js';
|
|
6
8
|
export { ImageLayer, MapLayer, MermaidLayer, PathLayer, ShapeLayer, TableLayer, TextLayer, TreeLayer, VideoLayer } from './layers/index.js';
|
|
7
9
|
import { CoverSlideTemplate, CoverSlidePlayback } from '@bendyline/squisq/doc';
|
|
8
10
|
export { getAnimationStyle, getTransitionClass } from '@bendyline/squisq/doc';
|
|
9
11
|
export { MediaContext, MediaScheduleController, ModalDialogOptions, ResourcePolicyContext, UseDocPlaybackOptions, useAudioSync, useAutoSurface, useDocPlayback, useMediaProvider, useMediaSchedule, useMediaUrl, useModalDialog, useResourcePolicy, useViewportOrientation } from './hooks/index.js';
|
|
12
|
+
export { FenceRenderContext, FenceRenderer, FenceRendererMap } from '@bendyline/squisq/fence';
|
|
10
13
|
export { A as AudioActions, a as AudioController, b as AudioState } from './AudioController-DwMsPe38.js';
|
|
11
|
-
export { JsonView, JsonViewProps } from './json-view/index.js';
|
|
14
|
+
export { JsonFormFenceAction, JsonFormFenceRendererOptions, JsonView, JsonViewProps, createJsonFormFenceRenderer } from './json-view/index.js';
|
|
12
15
|
import 'react/jsx-runtime';
|
|
13
16
|
import 'react';
|
|
14
17
|
import '@bendyline/squisq/markdown';
|
|
@@ -84,6 +87,10 @@ interface MountOptions {
|
|
|
84
87
|
animationsEnabled?: boolean;
|
|
85
88
|
/** Caption style: 'standard' or 'social'. Omit or set to undefined for no captions. */
|
|
86
89
|
captionStyle?: 'standard' | 'social';
|
|
90
|
+
/** Show a Copy button on fenced code blocks in static mode (default: false). */
|
|
91
|
+
showCodeCopyButton?: boolean;
|
|
92
|
+
/** Optional host clipboard adapter; otherwise the browser Clipboard API is used. */
|
|
93
|
+
onCopyCode?: CodeBlockCopyHandler;
|
|
87
94
|
}
|
|
88
95
|
/** Instance handle returned by {@link mount}. */
|
|
89
96
|
interface SquisqPlayerHandle {
|
|
@@ -147,4 +154,4 @@ declare function resolveDocPlayerAppearance(doc: Doc, overrides?: DocPlayerAppea
|
|
|
147
154
|
*/
|
|
148
155
|
declare function useMediaClipDurations(schedule: ScheduledClip[], basePath: string, mediaProviderOverride?: MediaProvider | null): Map<string, number>;
|
|
149
156
|
|
|
150
|
-
export { type DocPlayerAppearanceOverrides, type MountOptions, PipPosition, PipShape, PipSize, type ResolvedDocPlayerAppearance, type SquisqPlayerHandle, SquisqRenderAPI, VideoPresentation$1 as VideoPresentation, resolveDocPlayerAppearance, useMediaClipDurations };
|
|
157
|
+
export { CodeBlockCopyHandler, type DocPlayerAppearanceOverrides, type MountOptions, PipPosition, PipShape, PipSize, type ResolvedDocPlayerAppearance, type SquisqPlayerHandle, SquisqRenderAPI, VideoPresentation$1 as VideoPresentation, resolveDocPlayerAppearance, useMediaClipDurations };
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
formatTime,
|
|
13
13
|
resolveDocPlayerAppearance,
|
|
14
14
|
useMediaClipDurations
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-DYAFB3AH.js";
|
|
16
16
|
import {
|
|
17
17
|
BlockRenderer,
|
|
18
18
|
CanvasSection,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
PageSectionView,
|
|
21
21
|
PageViewContext,
|
|
22
22
|
usePageView
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-U3HRSQ45.js";
|
|
24
24
|
import {
|
|
25
25
|
ImageLayer,
|
|
26
26
|
MapLayer,
|
|
@@ -42,18 +42,21 @@ import {
|
|
|
42
42
|
useDocPlayback,
|
|
43
43
|
useMediaSchedule,
|
|
44
44
|
useViewportOrientation
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-MVJQL2W2.js";
|
|
46
46
|
import {
|
|
47
|
-
JsonView
|
|
48
|
-
|
|
47
|
+
JsonView,
|
|
48
|
+
createJsonFormFenceRenderer
|
|
49
|
+
} from "./chunk-NJRSGSFW.js";
|
|
49
50
|
import {
|
|
50
51
|
useAutoSurface
|
|
51
52
|
} from "./chunk-TT6ENR6T.js";
|
|
52
53
|
import {
|
|
54
|
+
FenceRendererContext,
|
|
53
55
|
InlineAudioPlayer,
|
|
54
56
|
InlineVideoPlayer,
|
|
55
|
-
MarkdownRenderer
|
|
56
|
-
|
|
57
|
+
MarkdownRenderer,
|
|
58
|
+
useFenceRenderers
|
|
59
|
+
} from "./chunk-ESI3P77P.js";
|
|
57
60
|
import {
|
|
58
61
|
MermaidDiagram
|
|
59
62
|
} from "./chunk-WLUZTUNZ.js";
|
|
@@ -75,6 +78,7 @@ export {
|
|
|
75
78
|
DocPlayer,
|
|
76
79
|
DocPlayerWithSidebar,
|
|
77
80
|
DocProgressBar,
|
|
81
|
+
FenceRendererContext,
|
|
78
82
|
ImageLayer,
|
|
79
83
|
InlineAudioPlayer,
|
|
80
84
|
InlineVideoPlayer,
|
|
@@ -96,6 +100,7 @@ export {
|
|
|
96
100
|
TextLayer,
|
|
97
101
|
TreeLayer,
|
|
98
102
|
VideoLayer,
|
|
103
|
+
createJsonFormFenceRenderer,
|
|
99
104
|
formatTime,
|
|
100
105
|
getAnimationStyle,
|
|
101
106
|
getTransitionClass,
|
|
@@ -103,6 +108,7 @@ export {
|
|
|
103
108
|
useAudioSync,
|
|
104
109
|
useAutoSurface,
|
|
105
110
|
useDocPlayback,
|
|
111
|
+
useFenceRenderers,
|
|
106
112
|
useMediaClipDurations,
|
|
107
113
|
useMediaProvider,
|
|
108
114
|
useMediaSchedule,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { SquisqAnnotatedSchema } from '@bendyline/squisq/jsonForm';
|
|
3
3
|
import { Theme, SurfaceScheme } from '@bendyline/squisq/schemas';
|
|
4
|
+
import { FenceRenderContext, FenceRenderer } from '@bendyline/squisq/fence';
|
|
4
5
|
|
|
5
6
|
interface JsonViewProps {
|
|
6
7
|
/** Schema describing the value's shape (with optional `squisq` UI hints). */
|
|
@@ -18,4 +19,60 @@ interface JsonViewProps {
|
|
|
18
19
|
}
|
|
19
20
|
declare function JsonView(props: JsonViewProps): react_jsx_runtime.JSX.Element;
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Built-in fence renderer: a fence's JSON / YAML-subset body rendered
|
|
24
|
+
* through the read-only JSON-form machinery (`<JsonView>`), with
|
|
25
|
+
* host-defined action buttons as chrome below the form.
|
|
26
|
+
*
|
|
27
|
+
* This is the form-driven flavor of the pluggable fence mechanism —
|
|
28
|
+
* register the result in a `FenceRendererMap` next to fully custom
|
|
29
|
+
* component renderers:
|
|
30
|
+
*
|
|
31
|
+
* ```tsx
|
|
32
|
+
* const fenceRenderers = {
|
|
33
|
+
* 'my-record': createJsonFormFenceRenderer({
|
|
34
|
+
* actions: [{ id: 'approve', label: 'Approve' }],
|
|
35
|
+
* onAction: (actionId, data) => host.handle(actionId, data),
|
|
36
|
+
* }),
|
|
37
|
+
* };
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* Parsing: strict JSON first, then the documented YAML subset
|
|
41
|
+
* (`parseYamlSubset` — flat maps, inline arrays, one nesting level).
|
|
42
|
+
* Unparseable bodies render as a plain code block with a quiet
|
|
43
|
+
* diagnostic line, so a malformed fence stays visible and debuggable.
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
/** One host action button rendered below the form. */
|
|
47
|
+
interface JsonFormFenceAction {
|
|
48
|
+
id: string;
|
|
49
|
+
label: string;
|
|
50
|
+
/** `primary` gets the filled treatment; default is quiet. */
|
|
51
|
+
variant?: 'primary' | 'default';
|
|
52
|
+
}
|
|
53
|
+
interface JsonFormFenceRendererOptions {
|
|
54
|
+
/**
|
|
55
|
+
* Schema for the fence body. Omitted → inferred from the parsed value
|
|
56
|
+
* (`inferSchema`), which renders sensible read-only fields for any
|
|
57
|
+
* well-formed object.
|
|
58
|
+
*/
|
|
59
|
+
schema?: SquisqAnnotatedSchema;
|
|
60
|
+
/** Action buttons rendered below the form. */
|
|
61
|
+
actions?: readonly JsonFormFenceAction[];
|
|
62
|
+
/**
|
|
63
|
+
* Invoked from the button's click handler (user-gesture context is
|
|
64
|
+
* preserved, mirroring the `onCopyCode` contract).
|
|
65
|
+
*/
|
|
66
|
+
onAction?: (actionId: string, data: Record<string, unknown>, ctx: FenceRenderContext) => void | Promise<void>;
|
|
67
|
+
/** Padding density passed to `<JsonView>` (default `'compact'`). */
|
|
68
|
+
density?: 'comfortable' | 'compact';
|
|
69
|
+
/** Extra CSS class on the wrapper. */
|
|
70
|
+
className?: string;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Build a `FenceRenderer` that renders the fence body through the
|
|
74
|
+
* read-only JSON form. See the module doc for usage.
|
|
75
|
+
*/
|
|
76
|
+
declare function createJsonFormFenceRenderer(options?: JsonFormFenceRendererOptions): FenceRenderer;
|
|
77
|
+
|
|
78
|
+
export { type JsonFormFenceAction, type JsonFormFenceRendererOptions, JsonView, type JsonViewProps, createJsonFormFenceRenderer };
|
package/dist/json-view/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
JsonView
|
|
3
|
-
|
|
2
|
+
JsonView,
|
|
3
|
+
createJsonFormFenceRenderer
|
|
4
|
+
} from "../chunk-NJRSGSFW.js";
|
|
4
5
|
import "../chunk-TT6ENR6T.js";
|
|
5
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-ESI3P77P.js";
|
|
6
7
|
import "../chunk-WLUZTUNZ.js";
|
|
7
8
|
import "../chunk-LR3AIGDD.js";
|
|
8
9
|
export {
|
|
9
|
-
JsonView
|
|
10
|
+
JsonView,
|
|
11
|
+
createJsonFormFenceRenderer
|
|
10
12
|
};
|
package/dist/markdown/index.d.ts
CHANGED
|
@@ -1,35 +1,10 @@
|
|
|
1
|
+
export { a as CodeBlockCopyContext, C as CodeBlockCopyHandler, M as MarkdownRenderer, b as MarkdownRendererProps } from '../MarkdownRenderer-CC9dOc6b.js';
|
|
1
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
3
|
import { Theme } from '@bendyline/squisq/schemas';
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
nodes: MarkdownBlockNode[];
|
|
8
|
-
/** Optional CSS class for the wrapper element */
|
|
9
|
-
className?: string;
|
|
10
|
-
/**
|
|
11
|
-
* Raw HTML policy. Defaults to `sanitize`, which removes unsafe tags,
|
|
12
|
-
* event handlers, and executable URL schemes before rendering.
|
|
13
|
-
*/
|
|
14
|
-
htmlPolicy?: HtmlPolicy;
|
|
15
|
-
/**
|
|
16
|
-
* Extra URL schemes to allow on links (e.g. a host app's internal
|
|
17
|
-
* navigation scheme it intercepts on click). Executable schemes are
|
|
18
|
-
* never allowed regardless. See {@link SanitizeUrlOptions}.
|
|
19
|
-
*/
|
|
20
|
-
linkSchemes?: readonly string[];
|
|
21
|
-
/** Resolved Squisq theme inherited by embedded Mermaid diagrams. */
|
|
22
|
-
theme?: Theme;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Renders MarkdownBlockNode[] AST as React HTML elements.
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```tsx
|
|
29
|
-
* <MarkdownRenderer nodes={block.contents} />
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
declare function MarkdownRenderer({ nodes, className, htmlPolicy, linkSchemes, theme, }: MarkdownRendererProps): react_jsx_runtime.JSX.Element | null;
|
|
4
|
+
import * as react from 'react';
|
|
5
|
+
import { FenceRendererMap } from '@bendyline/squisq/fence';
|
|
6
|
+
export { FenceRenderContext, FenceRenderer, FenceRendererMap } from '@bendyline/squisq/fence';
|
|
7
|
+
import '@bendyline/squisq/markdown';
|
|
33
8
|
|
|
34
9
|
interface MermaidDiagramProps {
|
|
35
10
|
source: string;
|
|
@@ -41,4 +16,8 @@ interface MermaidDiagramProps {
|
|
|
41
16
|
/** Read-only Mermaid rendering for page bodies and slide layers. */
|
|
42
17
|
declare function MermaidDiagram({ source, className, ariaLabel, theme, }: MermaidDiagramProps): react_jsx_runtime.JSX.Element;
|
|
43
18
|
|
|
44
|
-
|
|
19
|
+
declare const FenceRendererContext: react.Context<FenceRendererMap | null>;
|
|
20
|
+
/** The ambient registry, or null when no provider wraps this subtree. */
|
|
21
|
+
declare function useFenceRenderers(): FenceRendererMap | null;
|
|
22
|
+
|
|
23
|
+
export { FenceRendererContext, MermaidDiagram, type MermaidDiagramProps, useFenceRenderers };
|
package/dist/markdown/index.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
FenceRendererContext,
|
|
3
|
+
MarkdownRenderer,
|
|
4
|
+
useFenceRenderers
|
|
5
|
+
} from "../chunk-ESI3P77P.js";
|
|
4
6
|
import {
|
|
5
7
|
MermaidDiagram
|
|
6
8
|
} from "../chunk-WLUZTUNZ.js";
|
|
7
9
|
import "../chunk-LR3AIGDD.js";
|
|
8
10
|
export {
|
|
11
|
+
FenceRendererContext,
|
|
9
12
|
MarkdownRenderer,
|
|
10
|
-
MermaidDiagram
|
|
13
|
+
MermaidDiagram,
|
|
14
|
+
useFenceRenderers
|
|
11
15
|
};
|
package/dist/page/index.d.ts
CHANGED
|
@@ -1,6 +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 { HtmlPolicy } from '@bendyline/squisq/markdown';
|
|
5
|
+
import { FenceRendererMap } from '@bendyline/squisq/fence';
|
|
6
|
+
import { C as CodeBlockCopyHandler } from '../MarkdownRenderer-CC9dOc6b.js';
|
|
7
|
+
export { a as CodeBlockCopyContext } from '../MarkdownRenderer-CC9dOc6b.js';
|
|
4
8
|
import * as react from 'react';
|
|
5
9
|
|
|
6
10
|
interface LinearDocViewProps {
|
|
@@ -63,6 +67,22 @@ interface LinearDocViewProps {
|
|
|
63
67
|
* emphasis-curve adjustments defined by `TransformStyleConfig.page`.
|
|
64
68
|
*/
|
|
65
69
|
transformPage?: PageTransformHints;
|
|
70
|
+
/** Show a Copy button on ordinary fenced code blocks (default: false). */
|
|
71
|
+
showCodeCopyButton?: boolean;
|
|
72
|
+
/** Optional host clipboard adapter; otherwise the browser Clipboard API is used. */
|
|
73
|
+
onCopyCode?: CodeBlockCopyHandler;
|
|
74
|
+
/**
|
|
75
|
+
* Host fence-renderer registry (`@bendyline/squisq/fence`). Claimed
|
|
76
|
+
* fence languages render through the host's widgets in every markdown
|
|
77
|
+
* section — including rich content preserved inside typed template
|
|
78
|
+
* sections (the claimed languages are threaded into the page
|
|
79
|
+
* materializer so those fences survive slot extraction).
|
|
80
|
+
*/
|
|
81
|
+
fenceRenderers?: FenceRendererMap;
|
|
82
|
+
/** Raw-HTML policy for markdown sections (default: `sanitize`). */
|
|
83
|
+
htmlPolicy?: HtmlPolicy;
|
|
84
|
+
/** Extra link URL schemes allowed in markdown sections. */
|
|
85
|
+
linkSchemes?: readonly string[];
|
|
66
86
|
}
|
|
67
87
|
type ImageDisplayMode = 'inline' | 'thumbnail';
|
|
68
88
|
/**
|
|
@@ -73,7 +93,7 @@ type ImageDisplayMode = 'inline' | 'thumbnail';
|
|
|
73
93
|
* <LinearDocView doc={doc} basePath="/media/" />
|
|
74
94
|
* ```
|
|
75
95
|
*/
|
|
76
|
-
declare function LinearDocView({ doc, markdown, basePath, viewport, className, theme, surface, animationsEnabled, thinMargins, imageDisplayMode, globalKeyboardShortcuts, showCover, transformPage, }: LinearDocViewProps): react_jsx_runtime.JSX.Element;
|
|
96
|
+
declare function LinearDocView({ doc, markdown, basePath, viewport, className, theme, surface, animationsEnabled, thinMargins, imageDisplayMode, globalKeyboardShortcuts, showCover, transformPage, showCodeCopyButton, onCopyCode, fenceRenderers, htmlPolicy, linkSchemes, }: LinearDocViewProps): react_jsx_runtime.JSX.Element;
|
|
77
97
|
|
|
78
98
|
interface PageSectionViewProps {
|
|
79
99
|
entry: PageSectionMaterialization;
|
|
@@ -98,8 +118,16 @@ interface PageViewContextValue {
|
|
|
98
118
|
renderContext: MaterializeBlockLayersOptions;
|
|
99
119
|
animationsEnabled: boolean;
|
|
100
120
|
imageDisplayMode: ImageDisplayMode;
|
|
121
|
+
showCodeCopyButton: boolean;
|
|
122
|
+
onCopyCode?: CodeBlockCopyHandler;
|
|
123
|
+
/** Host fence-renderer registry — see `MarkdownRendererProps.fenceRenderers`. */
|
|
124
|
+
fenceRenderers?: FenceRendererMap;
|
|
125
|
+
/** Raw-HTML policy for section markdown; defaults to MarkdownRenderer's `sanitize`. */
|
|
126
|
+
htmlPolicy?: HtmlPolicy;
|
|
127
|
+
/** Extra link URL schemes for section markdown. */
|
|
128
|
+
linkSchemes?: readonly string[];
|
|
101
129
|
}
|
|
102
130
|
declare const PageViewContext: react.Context<PageViewContextValue>;
|
|
103
131
|
declare function usePageView(): PageViewContextValue;
|
|
104
132
|
|
|
105
|
-
export { CanvasSection, type CanvasSectionProps, type ImageDisplayMode, LinearDocView, type LinearDocViewProps, PageSectionView, type PageSectionViewProps, PageViewContext, type PageViewContextValue, usePageView };
|
|
133
|
+
export { CanvasSection, type CanvasSectionProps, CodeBlockCopyHandler, type ImageDisplayMode, LinearDocView, type LinearDocViewProps, PageSectionView, type PageSectionViewProps, PageViewContext, type PageViewContextValue, usePageView };
|
package/dist/page/index.js
CHANGED
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
PageSectionView,
|
|
5
5
|
PageViewContext,
|
|
6
6
|
usePageView
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-U3HRSQ45.js";
|
|
8
8
|
import "../chunk-UJEHDVQO.js";
|
|
9
9
|
import "../chunk-TT6ENR6T.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-ESI3P77P.js";
|
|
11
11
|
import "../chunk-WLUZTUNZ.js";
|
|
12
12
|
import "../chunk-LR3AIGDD.js";
|
|
13
13
|
export {
|
package/dist/player/index.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
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
|
+
import { FenceRendererMap } from '@bendyline/squisq/fence';
|
|
4
5
|
import { a as AudioController } from '../AudioController-DwMsPe38.js';
|
|
6
|
+
import { C as CodeBlockCopyHandler } from '../MarkdownRenderer-CC9dOc6b.js';
|
|
7
|
+
export { a as CodeBlockCopyContext } from '../MarkdownRenderer-CC9dOc6b.js';
|
|
5
8
|
import { CSSProperties } from 'react';
|
|
9
|
+
import '@bendyline/squisq/markdown';
|
|
6
10
|
|
|
7
11
|
/**
|
|
8
12
|
* Doc Player Control Types
|
|
@@ -243,6 +247,16 @@ interface DocPlayerProps {
|
|
|
243
247
|
pipPosition?: PipPosition;
|
|
244
248
|
enableSwipe?: boolean;
|
|
245
249
|
globalKeyboardShortcuts?: boolean;
|
|
250
|
+
/** Show a Copy button on fenced code blocks in linear mode (default: false). */
|
|
251
|
+
showCodeCopyButton?: boolean;
|
|
252
|
+
/** Optional host clipboard adapter; otherwise the browser Clipboard API is used. */
|
|
253
|
+
onCopyCode?: CodeBlockCopyHandler;
|
|
254
|
+
/**
|
|
255
|
+
* Host fence-renderer registry (`@bendyline/squisq/fence`), applied in
|
|
256
|
+
* linear mode's markdown sections. Video/slideshow modes render blocks
|
|
257
|
+
* as SVG layers and do not consult it.
|
|
258
|
+
*/
|
|
259
|
+
fenceRenderers?: FenceRendererMap;
|
|
246
260
|
}
|
|
247
261
|
|
|
248
262
|
/**
|
|
@@ -461,4 +475,4 @@ interface MediaClipLayerProps {
|
|
|
461
475
|
}
|
|
462
476
|
declare function MediaClipLayer({ schedule, currentTime, isPlaying, basePath, renderMode, muted, presentation, pipSize, pipShape, pipPosition, pipOrientation, pipFrameStyle, honorClipPresentation, }: MediaClipLayerProps): react_jsx_runtime.JSX.Element | null;
|
|
463
477
|
|
|
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 };
|
|
478
|
+
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 };
|
package/dist/player/index.js
CHANGED
|
@@ -10,17 +10,17 @@ import {
|
|
|
10
10
|
MediaClipLayer,
|
|
11
11
|
SocialCaptionOverlay,
|
|
12
12
|
formatTime
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-DYAFB3AH.js";
|
|
14
14
|
import {
|
|
15
15
|
BlockRenderer
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-U3HRSQ45.js";
|
|
17
17
|
import "../chunk-UJEHDVQO.js";
|
|
18
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-MVJQL2W2.js";
|
|
19
19
|
import "../chunk-TT6ENR6T.js";
|
|
20
20
|
import {
|
|
21
21
|
InlineAudioPlayer,
|
|
22
22
|
InlineVideoPlayer
|
|
23
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-ESI3P77P.js";
|
|
24
24
|
import "../chunk-WLUZTUNZ.js";
|
|
25
25
|
import "../chunk-LR3AIGDD.js";
|
|
26
26
|
export {
|