presenter 0.8.0 → 0.8.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.
@@ -9,4 +9,6 @@ export declare class BrowserCanvasRenderer {
9
9
  renderSlide(slideIndex: number, buildIndex?: number, buildTime?: number | null): void;
10
10
  next(skipIntermediateBuilds?: boolean): void;
11
11
  previous(skipIntermediateBuilds?: boolean): void;
12
+ hasNext(): boolean;
13
+ hasPrevious(): boolean;
12
14
  }
@@ -2,4 +2,9 @@ import { Size } from '../../../../types/Size';
2
2
  import { TextStyle } from '../../../../types/TextStyle';
3
3
  import { TextUnit } from '../../../../types/TextUnit';
4
4
  import { UnifiedCanvasContext } from '../../types/UnifiedCanvasContext';
5
- export declare function getTextUnitMeasurements(textUnits: TextUnit[][], style: TextStyle, ctx: UnifiedCanvasContext): Size[][];
5
+ export interface TextUnitMeasurement extends Size {
6
+ readonly baselineShift: number;
7
+ readonly bottom: number;
8
+ readonly top: number;
9
+ }
10
+ export declare function getTextUnitMeasurements(textUnits: TextUnit[][], style: TextStyle, ctx: UnifiedCanvasContext): TextUnitMeasurement[][];
@@ -8,5 +8,7 @@ export interface TextStyle {
8
8
  readonly fontStyle: FontStyle;
9
9
  readonly fontWeight: FontWeight | number;
10
10
  readonly ligatures: boolean;
11
+ readonly subscript: boolean;
12
+ readonly superscript: boolean;
11
13
  }
12
14
  export declare const DEFAULT_TEXT_STYLE: TextStyle;
@@ -0,0 +1,8 @@
1
+ import { TextStyle } from '../../../types/TextStyle';
2
+ export interface TextScriptVariant {
3
+ readonly baselineShift: number;
4
+ readonly fontSize: number;
5
+ readonly isSubscript: boolean;
6
+ readonly isSuperscript: boolean;
7
+ }
8
+ export declare function getTextScriptVariant(textStyle: TextStyle): TextScriptVariant;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "presenter",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "A JavaScript presentation library",
5
5
  "main": "dist/presenter.js",
6
6
  "types": "dist/index.d.ts",