presenter 0.6.1 → 0.6.2
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/export.js +1 -1
- package/dist/extras/IFrame.d.ts +17 -0
- package/dist/extras/ScreenCapture.d.ts +13 -0
- package/dist/index.d.ts +3 -0
- package/dist/presenter.js +1 -1
- package/dist/renderer/browser-canvas/types/BrowserCanvasRendererState.d.ts +2 -0
- package/dist/renderer/browser-canvas/utils/extras/createExtrasElement.d.ts +6 -0
- package/dist/renderer/browser-canvas/utils/extras/mountWebExtra.d.ts +2 -0
- package/dist/types/Color.d.ts +1 -3
- package/dist/types/Slide.d.ts +2 -0
- package/dist/types/SlideWebExtra.d.ts +23 -0
- package/package.json +1 -1
|
@@ -2,6 +2,8 @@ import { ShortcutState } from "../../../types/ShortcutState";
|
|
|
2
2
|
import { UnifiedImage } from "./UnifiedImage";
|
|
3
3
|
export interface BrowserCanvasRendererState {
|
|
4
4
|
canvas: HTMLCanvasElement | null;
|
|
5
|
+
extrasContainer: SVGSVGElement | null;
|
|
6
|
+
mountedExtrasCleanups: (() => void)[];
|
|
5
7
|
/** The index of the currently displayed slide. */
|
|
6
8
|
slideIndex: number;
|
|
7
9
|
/** The index of the current build within the current slide.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Size } from "../../../../types/Size";
|
|
2
|
+
/**
|
|
3
|
+
* Extra elements are treated as foreignObjects in an SVG container element.
|
|
4
|
+
* This function creates the extras container SVG element to host the slide extras.
|
|
5
|
+
*/
|
|
6
|
+
export declare function createExtrasElement(size: Size): SVGSVGElement;
|
package/dist/types/Color.d.ts
CHANGED
|
@@ -8,8 +8,7 @@ export interface Color {
|
|
|
8
8
|
/** Alpha channel, in [0, 1] */
|
|
9
9
|
alpha: number;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
export declare function Color(color: Partial<Color> | HexColor): Color;
|
|
11
|
+
export declare function Color(color: Partial<Color> | string): Color;
|
|
13
12
|
export declare function Color(red: number, green: number, blue: number, alpha?: number): Color;
|
|
14
13
|
export declare namespace Color {
|
|
15
14
|
var BLACK: Color;
|
|
@@ -20,4 +19,3 @@ export declare namespace Color {
|
|
|
20
19
|
var WHITE: Color;
|
|
21
20
|
}
|
|
22
21
|
export declare const DEFAULT_COLOR: Color;
|
|
23
|
-
export {};
|
package/dist/types/Slide.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { SlideAnimation } from "./SlideAnimation";
|
|
2
2
|
import { SlideObject } from "./SlideObject";
|
|
3
|
+
import { SlideWebExtra } from "./SlideWebExtra";
|
|
3
4
|
export interface Slide {
|
|
4
5
|
readonly objects: SlideObject[];
|
|
5
6
|
readonly animations: SlideAnimation[];
|
|
7
|
+
readonly extras: SlideWebExtra[];
|
|
6
8
|
readonly isAllKey: boolean;
|
|
7
9
|
readonly isEndKey: boolean;
|
|
8
10
|
readonly isStartKey: boolean;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Anchor } from "./Anchor";
|
|
2
|
+
/**
|
|
3
|
+
* A "Web Extra" is additional HTML/JavaScript content added to a slide. This
|
|
4
|
+
* allows embedded arbitrary web content on a slide. This content is not part of
|
|
5
|
+
* the core slide content, and will not be produced by non-web renderers like
|
|
6
|
+
* PDF/image renderers, but can be used to enhance web-based presentations.
|
|
7
|
+
*/
|
|
8
|
+
export interface SlideWebExtra {
|
|
9
|
+
/** HTML element that will be added to the presentation. */
|
|
10
|
+
readonly content: HTMLElement | null;
|
|
11
|
+
/**
|
|
12
|
+
* Setup function that will be called when the extra is mounted.
|
|
13
|
+
* It can optionally return a cleanup function that will be called
|
|
14
|
+
* when the extra is unmounted.
|
|
15
|
+
*/
|
|
16
|
+
readonly setup: ((foreignObject: SVGForeignObjectElement) => void | (() => void)) | null;
|
|
17
|
+
readonly anchor: Anchor;
|
|
18
|
+
readonly height: number;
|
|
19
|
+
readonly width: number;
|
|
20
|
+
readonly x: number;
|
|
21
|
+
readonly y: number;
|
|
22
|
+
}
|
|
23
|
+
export declare function SlideWebExtra(props?: Partial<SlideWebExtra> | null): SlideWebExtra;
|