fika-editor 3.4.6 → 3.4.7
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.
|
@@ -30,6 +30,8 @@ export interface FikaRenderSlideOptions {
|
|
|
30
30
|
mediaResolver?: FikaExportMediaResolver | null;
|
|
31
31
|
/** Reject instead of encoding incomplete asynchronous resources. */
|
|
32
32
|
strictResources?: boolean;
|
|
33
|
+
/** Share (0..1) of this slide's asynchronous rasters that have landed, as they land. */
|
|
34
|
+
onResourceProgress?: (fraction: number) => void;
|
|
33
35
|
}
|
|
34
36
|
export interface FikaDeckAtlasOptions extends Omit<FikaRenderSlideOptions, 'width'> {
|
|
35
37
|
/** Width of one slide tile in CSS px. Default 640. */
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import type { PPTChartElement, PPTCodeElement, PPTLatexElement, PPTMermaidElement } from '../types/slides';
|
|
2
2
|
type Raster = ImageBitmap | HTMLCanvasElement;
|
|
3
|
+
type RasterProducer = () => Promise<Raster | null> | Raster | null;
|
|
4
|
+
export declare const requestRaster: (key: string, produce: RasterProducer, invalidate: () => void) => Raster | undefined;
|
|
5
|
+
/**
|
|
6
|
+
* Run a paint and return the raster jobs it is missing, keyed by resource.
|
|
7
|
+
* Offscreen renders wait for exactly these instead of every pending raster in
|
|
8
|
+
* the page, so slides rendered side by side no longer wait for each other.
|
|
9
|
+
*/
|
|
10
|
+
export declare const collectRasterJobs: (paint: () => void) => Map<string, Promise<Raster | null>>;
|
|
3
11
|
export declare const getChartRaster: (element: PPTChartElement, colors: string[], textColor: string, lineColor: string, invalidate: () => void) => Raster | undefined;
|
|
4
12
|
export declare const getMermaidRaster: (element: PPTMermaidElement, invalidate: () => void) => Raster | undefined;
|
|
5
13
|
export declare const getCodeRaster: (element: PPTCodeElement, invalidate: () => void) => Raster | undefined;
|