unlayer-types 1.510.0 → 1.513.0
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.
- package/embed.d.ts +29 -0
- package/package.json +1 -1
package/embed.d.ts
CHANGED
|
@@ -4172,12 +4172,41 @@ declare module "packages/editor/src/embed/Editor" {
|
|
|
4172
4172
|
setTextDirection(textDirection: TextDirection | null): void;
|
|
4173
4173
|
setTranslations(translations: Translations): void;
|
|
4174
4174
|
loadBlank(bodyValues?: object): void;
|
|
4175
|
+
/**
|
|
4176
|
+
* Loads a design JSON into the editor, replacing the current design.
|
|
4177
|
+
*
|
|
4178
|
+
* Get design JSON from `saveDesign()` or `exportHtml()`, or generate it from React code with
|
|
4179
|
+
* `renderToJson()` from `@unlayer/react-elements` (templates written in code by developers,
|
|
4180
|
+
* coding agents, or an LLM at runtime stay editable here).
|
|
4181
|
+
*
|
|
4182
|
+
* @see https://docs.unlayer.com/builder/load-and-save-designs
|
|
4183
|
+
* @see https://docs.unlayer.com/elements
|
|
4184
|
+
*/
|
|
4175
4185
|
loadDesign<TDisplayMode extends DisplayMode | undefined = TClassDisplayMode>(design: JSONTemplate<TDisplayMode>): void;
|
|
4186
|
+
/**
|
|
4187
|
+
* Returns the current design JSON in the callback. Store it and pass it to `loadDesign()` to
|
|
4188
|
+
* reopen the design for editing later.
|
|
4189
|
+
*
|
|
4190
|
+
* @see https://docs.unlayer.com/builder/load-and-save-designs
|
|
4191
|
+
*/
|
|
4176
4192
|
saveDesign<TDisplayMode extends DisplayMode | undefined = TClassDisplayMode>(callback: (data: JSONTemplate<TDisplayMode>) => void, options?: SaveDesignOptions): void;
|
|
4193
|
+
/**
|
|
4194
|
+
* Exports the current design as HTML. The callback receives `{ html, design }`: send or render
|
|
4195
|
+
* the `html`, and store the `design` JSON to reopen it with `loadDesign()`.
|
|
4196
|
+
*
|
|
4197
|
+
* @see https://docs.unlayer.com/builder/export-html
|
|
4198
|
+
*/
|
|
4177
4199
|
exportHtml<TDisplayMode extends DisplayMode | undefined = TClassDisplayMode>(callback: (data: ExportHtmlResult<TDisplayMode>) => void, options?: ExportHtmlOptions): void;
|
|
4178
4200
|
exportLiveHtml<TDisplayMode extends DisplayMode | undefined = TClassDisplayMode>(callback: (data: ExportLiveHtmlResult<TDisplayMode>) => void, options?: ExportLiveHtmlOptions): void;
|
|
4179
4201
|
exportPlainText<TDisplayMode extends DisplayMode | undefined = TClassDisplayMode>(callback: (data: ExportPlainTextResult<TDisplayMode>) => void, options?: ExportPlainTextOptions): void;
|
|
4180
4202
|
exportImage<TDisplayMode extends DisplayMode | undefined = TClassDisplayMode>(callback: (data: ExportFromApiResult<TDisplayMode>) => void, options?: ExportImageFromApiOptions): void;
|
|
4203
|
+
/**
|
|
4204
|
+
* Exports the current design as a PDF. Unlike `exportHtml()`, the PDF is generated by Unlayer's
|
|
4205
|
+
* Cloud API, uploaded to your connected file storage, and the callback receives
|
|
4206
|
+
* `{ url, design }`.
|
|
4207
|
+
*
|
|
4208
|
+
* @see https://docs.unlayer.com/builder/export-pdf
|
|
4209
|
+
*/
|
|
4181
4210
|
exportPdf<TDisplayMode extends DisplayMode | undefined = TClassDisplayMode>(callback: (data: ExportFromApiResult<TDisplayMode>) => void, options?: ExportPdfFromApiOptions): void;
|
|
4182
4211
|
exportZip<TDisplayMode extends DisplayMode | undefined = TClassDisplayMode>(callback: (data: ExportFromApiResult<TDisplayMode>) => void, options?: ExportZipFromApiOptions): void;
|
|
4183
4212
|
setAppearance(appearance: DeepPartial<AppearanceConfig>): void;
|
package/package.json
CHANGED