|
1 |
| -import {Color, SceneNode} from "./scenegraph"; |
| 1 | +import {Color, SceneNode} from "scenegraph"; |
2 | 2 |
|
3 | 3 | /**
|
4 | 4 | * All rendition settings fields are required (for a given rendition type) unless otherwise specified.
|
@@ -49,34 +49,26 @@ type RenditionResult = {
|
49 | 49 | }
|
50 | 50 |
|
51 | 51 | /**
|
52 |
| - * The application module exposes useful information about XD's state, along with APIs for exporting content. |
| 52 | + * Generate renditions of nodes in the document in a batch. Overwrites any existing files without warning. |
| 53 | + * |
| 54 | + * A single createRenditions() call can generate any number of renditions, including multiple renditions of the same node (with different output settings) or renditions of multiple different nodes. Only one createRenditions() call can be executing at any given time, so wait for the Promise it returns before calling it again. |
| 55 | + * |
| 56 | + * @param renditions List of renditions to generate |
| 57 | + * @return Promise<Array<RenditionResult>, string> - Promise which is fulfilled with an array of RenditionResults (pointing to the same outputFiles that were originally passed in, or rejected with an error string if one or more renditions failed for any reason. |
53 | 58 | */
|
54 |
| -declare class application { |
| 59 | +export function createRenditions(renditions: RenditionSettings[]): Promise<RenditionResult[] | string>; |
55 | 60 |
|
56 |
| - /** |
57 |
| - * Generate renditions of nodes in the document in a batch. Overwrites any existing files without warning. |
58 |
| - * |
59 |
| - * A single createRenditions() call can generate any number of renditions, including multiple renditions of the same node (with different output settings) or renditions of multiple different nodes. Only one createRenditions() call can be executing at any given time, so wait for the Promise it returns before calling it again. |
60 |
| - * |
61 |
| - * @param renditions List of renditions to generate |
62 |
| - * @return Promise<Array<RenditionResult>, string> - Promise which is fulfilled with an array of RenditionResults (pointing to the same outputFiles that were originally passed in, or rejected with an error string if one or more renditions failed for any reason. |
63 |
| - */ |
64 |
| - static createRenditions(renditions: RenditionSettings[]): Promise<RenditionResult[] | string>; |
65 |
| - |
66 |
| - /** |
67 |
| - * Adobe XD version number in the form "major.minor.patch.build" |
68 |
| - */ |
69 |
| - static readonly version: string; |
70 |
| - |
71 |
| - /** |
72 |
| - * Current language the application UI is using. This may not equal the user's OS locale setting: it is the closest locale supported by XD - use this when you want your plugin's UI to be consistent with XD's UI. Specifies language only, with no region info (e.g. "fr", not "fr_FR"). |
73 |
| - */ |
74 |
| - static readonly appLanguage: string; |
| 61 | +/** |
| 62 | + * Adobe XD version number in the form "major.minor.patch.build" |
| 63 | + */ |
| 64 | +export const version: string; |
75 | 65 |
|
76 |
| - /** |
77 |
| - * User's OS-wide locale setting. May not match the XD UI, since XD does not support all world languages. Includes both language and region (e.g. "fr_CA" or "en_US"). |
78 |
| - */ |
79 |
| - static readonly systemLocale: string; |
80 |
| -} |
| 66 | +/** |
| 67 | + * Current language the application UI is using. This may not equal the user's OS locale setting: it is the closest locale supported by XD - use this when you want your plugin's UI to be consistent with XD's UI. Specifies language only, with no region info (e.g. "fr", not "fr_FR"). |
| 68 | + */ |
| 69 | +export const appLanguage: string; |
81 | 70 |
|
82 |
| -export = application; |
| 71 | +/** |
| 72 | + * User's OS-wide locale setting. May not match the XD UI, since XD does not support all world languages. Includes both language and region (e.g. "fr_CA" or "en_US"). |
| 73 | + */ |
| 74 | +export const systemLocale: string; |
0 commit comments