@squareys/webdecks-sdk - v0.0.0
    Preparing search index...

    Class Presentation

    A presentation deck. Reads are property getters straight off the engine model; navigation returns cached wrappers (=== identity); editing mutators chain and repaint any attached viewport. The PNG path is thumbnail-only — the live view presents through the WebGPU swapchain. PPTX/ODP export bytes come from the real in-module serializers.

    Hierarchy (View Summary)

    Index
    • get isValid(): boolean

      Whether this wrapper still refers to a live engine object.

      Returns boolean

    • set _index(value: number): void

      Parameters

      • value: number

      Returns void

    • get slideCount(): number

      Number of slides in the deck.

      Returns number

    • get nodeCount(): number

      Total scene-node count across every slide (all node types).

      Returns number

    • get currentSlideIndex(): number

      The currently-shown slide's 0-based index (0 in a headless host).

      Returns number

    • get designHeight(): number

      The slide design height in pixels (1080 for 16:9, 1440 for 4:3).

      Returns number

    • get slideAspect(): number

      The slide aspect ratio (width / height).

      Returns number

    • get canUndo(): boolean

      Whether an undo step is available (needs a live view's history).

      Returns boolean

    • get canRedo(): boolean

      Whether a redo step is available.

      Returns boolean

    • Reference equality is the identity test — prefer a === b. This is retained only for the rare cross-realm case where two wrappers describe the same handle by value. Reads the raw index so comparing a stale wrapper never throws.

      Parameters

      • other: Handle<unknown> | null

      Returns boolean

    • A readable identity for logs and diagnostics, never [object Object].

      Returns string

    • The index-th slide, or null if out of range.

      Parameters

      • index: number

      Returns Slide | null

    • Collect the slides into out (or a fresh array).

      Parameters

      Returns Slide[]

    • Navigate to the index-th slide (needs a live view); chainable.

      Parameters

      • index: number

      Returns this

    • Append a new blank slide and return its wrapper. atIndex is accepted for forward-compatibility but the slide is appended (positional insert is a later pass).

      Parameters

      • atIndex: number = -1

      Returns Slide

    • Undo one step; returns whether the history moved.

      Returns boolean

    • Redo one step; returns whether the history moved.

      Returns boolean

    • Begin a find session over the deck's text. flags OR together FindFlag options (only match-case is honoured here). Returns a FindSession that navigates the current slide to each match and drives replace.

      Parameters

      • query: string
      • flags: number = 0

      Returns FindSession

    • Set the editor chrome theme (true light, false dark); chainable.

      Parameters

      • light: boolean

      Returns this

    • Export the deck. "webdeck" is the lossless native round-trip; "pptx" and "odp" come from the real in-module serializers (no wd_io_engine hop). "pdf" serializes the deck to a webdeck blob and renders it in the host-supplied wd_io_engine (see PdfExportOptions); text uses the supplied fonts, not the live view's.

      Parameters

      Returns Promise<Uint8Array<ArrayBufferLike>>

    • Export the deck. "webdeck" is the lossless native round-trip; "pptx" and "odp" come from the real in-module serializers (no wd_io_engine hop). "pdf" serializes the deck to a webdeck blob and renders it in the host-supplied wd_io_engine (see PdfExportOptions); text uses the supplied fonts, not the live view's.

      Parameters

      • format: "pptx" | "odp" | "webdeck"

      Returns Promise<Uint8Array<ArrayBufferLike>>

    • Render one slide offscreen and return it as a PNG Blob. Uses the export/capture path (the browser encodes the PNG), never the live view. Needs the GPU renderer.

      Parameters

      • slide: number
      • width: number
      • height: number
      • scale: number = 1

      Returns Promise<Blob>

    • Close the deck handle and release its wrappers (resets the engine to a fresh deck).

      Returns void