Interface: SessionOptions
Defined in: packages/core/src/session.ts:30
Properties
assets?
optionalassets?:AssetResolver
Defined in: packages/core/src/session.ts:53
Fonts and images referenced by the log. Defaults to the plugins' declarations with relative urls.
limits?
optionallimits?:object
Defined in: packages/core/src/session.ts:44
How much of the original stays in the browser. Default 16 megapixels and 50e6 bytes, enough for a camera JPEG of 60 megapixels. An image above maxClientMegapixels is not resident: the preview works on a working copy, and export fails with NOT_RESIDENT: the host renders the original elsewhere. An image above maxClientBytes does not load at all (TOO_LARGE). The megapixel limit reaches the renderer with every load, so a shared worker follows the session that loads into it.
maxClientBytes?
optionalmaxClientBytes?:number
maxClientMegapixels?
optionalmaxClientMegapixels?:number
plugins
plugins: readonly
AnyPlugin[]
Defined in: packages/core/src/session.ts:31
preview?
optionalpreview?:object
Defined in: packages/core/src/session.ts:45
debounceMs?
optionaldebounceMs?:number
enabled?
optionalenabled?:boolean
renderer?
optionalrenderer?:Renderer
Defined in: packages/core/src/session.ts:33
Defaults to an InlineRenderer built from plugins. Pass a WorkerRenderer in browsers.
saveFile?
optionalsaveFile?: (bytes,filename,mimeType) =>void|Promise<void>
Defined in: packages/core/src/session.ts:58
How download hands bytes to the user. Defaults to an <a download> click in browsers; required elsewhere.
Parameters
bytes
Uint8Array
filename
string
mimeType
string
Returns
void | Promise<void>
workingCopy?
optionalworkingCopy?:object
Defined in: packages/core/src/session.ts:51
The preview image. The session always decodes the original in WebAssembly and downscales it itself. maxSide is the longest side for the default renderer. Default 2048. A renderer passed in uses its own setting.
maxSide?
optionalmaxSide?:number