presenter 0.9.1 → 0.9.3

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,6 +1,7 @@
1
1
  import { ShortcutState } from '../../../types/ShortcutState';
2
2
  import { UnifiedImage } from './UnifiedImage';
3
3
  export interface BrowserCanvasRendererState {
4
+ accessibleDescriptionElement: HTMLDivElement | null;
4
5
  canvas: HTMLCanvasElement | null;
5
6
  extrasContainer: SVGSVGElement | null;
6
7
  mountedExtrasCleanups: (() => void)[];
@@ -0,0 +1,5 @@
1
+ import { Slide } from '../../../../types/Slide';
2
+ import { SlideObject } from '../../../../types/SlideObject';
3
+ export declare function createAccessibleDescriptionElement(presentationTitle: string): HTMLDivElement;
4
+ export declare function getAccessibleDescription(slide: Slide, objectState: Map<SlideObject, SlideObject>): string;
5
+ export declare function updateAccessibleDescription(element: HTMLElement, description: string): void;
@@ -3,5 +3,6 @@ export interface BaseUnitSlideAnimation {
3
3
  readonly type: AnimationType;
4
4
  /** Indicates whether this animation is a key animation to be included in exports. */
5
5
  readonly isKey: boolean;
6
+ readonly notes: string | null;
6
7
  readonly shortcut: string | string[] | null;
7
8
  }
@@ -4,4 +4,5 @@ export interface Pause extends BaseUnitSlideAnimation {
4
4
  readonly type: typeof AnimationType.PAUSE;
5
5
  readonly duration: number;
6
6
  }
7
- export declare function Pause(duration?: number): Pause;
7
+ export type PauseParams = Partial<Omit<Pause, "duration" | "type">>;
8
+ export declare function Pause(duration?: number, pauseParams?: PauseParams): Pause;
@@ -5,9 +5,12 @@ export interface Slide {
5
5
  readonly objects: SlideObject[];
6
6
  readonly animations: SlideAnimation[];
7
7
  readonly extras: SlideWebExtra[];
8
+ /** A screen-reader description of the slide. */
9
+ readonly description: string | null;
8
10
  readonly isAllKey: boolean;
9
11
  readonly isEndKey: boolean;
10
12
  readonly isStartKey: boolean;
13
+ readonly notes: string | null;
11
14
  readonly shortcut: string | string[] | null;
12
15
  readonly title: string;
13
16
  }
@@ -1,4 +1,6 @@
1
1
  export interface SlideObject {
2
+ /** A screen-reader description included while the object is visible. */
3
+ readonly description: string | null;
2
4
  readonly objectType: string;
3
5
  readonly opacity: number;
4
6
  }
@@ -0,0 +1,16 @@
1
+ import { Slide } from '../../types/Slide';
2
+ /**
3
+ * Returns the speaker notes for a slide at a given build index, carrying forward notes from earlier
4
+ * builds if necessary.
5
+ */
6
+ export declare function getSpeakerNotes(slide: Slide, buildIndex: number): string | null;
7
+ /**
8
+ * Returns only the notes attached directly to a build, without carrying notes forward from an
9
+ * earlier build.
10
+ */
11
+ export declare function getSpeakerNotesForBuild(slide: Slide, buildIndex: number): string | null;
12
+ /**
13
+ * Returns all notes attached to the inclusive range of builds without carrying notes forward from
14
+ * before the range.
15
+ */
16
+ export declare function getSpeakerNotesForBuildRange(slide: Slide, startBuildIndex: number, endBuildIndex: number): string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "presenter",
3
- "version": "0.9.1",
3
+ "version": "0.9.3",
4
4
  "description": "A JavaScript presentation library",
5
5
  "main": "dist/presenter.js",
6
6
  "types": "dist/index.d.ts",