@cesdk/node-native 1.77.0-rc.4 → 1.77.1-rc.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/README.md +1 -1
- package/lib/index.d.ts +3195 -484
- package/lib/index.js +642 -232
- package/lib/index.js.map +3 -3
- package/package.json +4 -4
package/lib/index.d.ts
CHANGED
|
@@ -207,7 +207,7 @@ export type Device = "auto" | "cpu" | "gpu";
|
|
|
207
207
|
*/
|
|
208
208
|
export interface Configuration {
|
|
209
209
|
/** Base URL for loading engine assets. */
|
|
210
|
-
baseURL
|
|
210
|
+
baseURL: string;
|
|
211
211
|
/** License key for the engine. Empty string drops the engine into Evaluation mode. */
|
|
212
212
|
license?: string;
|
|
213
213
|
/** Optional user identifier passed through to engine tracking. */
|
|
@@ -217,25 +217,41 @@ export interface Configuration {
|
|
|
217
217
|
* / `cesdk.data` next to the loader. Native binding doesn't consume
|
|
218
218
|
* this; kept on the shape for cross-binding portability.
|
|
219
219
|
*/
|
|
220
|
-
core
|
|
220
|
+
core: {
|
|
221
221
|
baseURL: string;
|
|
222
222
|
};
|
|
223
223
|
/** Custom logger. Defaults to `console.log` / `console.warn` / `console.error` per level. */
|
|
224
|
-
logger
|
|
224
|
+
logger: Logger;
|
|
225
225
|
/** Feature flag bag. Mirrors `@cesdk/node`'s `featureFlags`. */
|
|
226
226
|
featureFlags?: {
|
|
227
227
|
[flag: string]: boolean | string;
|
|
228
228
|
};
|
|
229
|
-
/** @deprecated
|
|
230
|
-
presets
|
|
229
|
+
/** @deprecated This config key is not used anymore and will be removed. */
|
|
230
|
+
presets: {
|
|
231
|
+
/**
|
|
232
|
+
* @deprecated The configuration option `presets.typefaces` does not exist anymore.
|
|
233
|
+
* Custom typefaces should be defined as asset sources using
|
|
234
|
+
* the `cesdk.engine.asset.addSource` or `cesdk.engine.asset.addLocalSource` instead.
|
|
235
|
+
*/
|
|
231
236
|
typefaces?: {
|
|
232
|
-
[id: string]:
|
|
237
|
+
[id: string]: TypefaceDefinition;
|
|
233
238
|
};
|
|
234
239
|
};
|
|
240
|
+
/**
|
|
241
|
+
* Force a WebGL1 context instead of the default WebGL2 (with WebGL1
|
|
242
|
+
* fallback). Web/WASM-only; native ignores it.
|
|
243
|
+
*/
|
|
244
|
+
forceWebGL1?: boolean;
|
|
245
|
+
/**
|
|
246
|
+
* Whether the engine should automatically choose an audio output device or
|
|
247
|
+
* not output audio at all. Fallback is 'auto'. Web/WASM-only; native ignores it.
|
|
248
|
+
*/
|
|
249
|
+
audioOutput?: "auto" | "none";
|
|
250
|
+
/** Initial engine role. Defaults to 'Creator'. */
|
|
251
|
+
role?: RoleString;
|
|
235
252
|
/**
|
|
236
253
|
* Render-device selection. Defaults to `'auto'` (Metal/EGL → CPU fallback
|
|
237
|
-
* on native
|
|
238
|
-
* accept the value for shape parity but ignore non-`'auto'` strings.
|
|
254
|
+
* on native). Native-only knob; `@cesdk/node` has no such field.
|
|
239
255
|
*
|
|
240
256
|
* @example
|
|
241
257
|
* ```ts
|
|
@@ -286,6 +302,13 @@ export interface ExportOptions {
|
|
|
286
302
|
}
|
|
287
303
|
/** Options for exporting video */
|
|
288
304
|
export interface VideoExportOptions {
|
|
305
|
+
/** The MIME type of the exported video. Defaults to `video/mp4`. */
|
|
306
|
+
mimeType?: string;
|
|
307
|
+
/**
|
|
308
|
+
* Progress callback invoked during encoding with the number of rendered
|
|
309
|
+
* frames, encoded frames, and the total number of frames.
|
|
310
|
+
*/
|
|
311
|
+
onProgress?: (numberOfRenderedFrames: number, numberOfEncodedFrames: number, totalNumberOfFrames: number) => void;
|
|
289
312
|
/** Time offset in seconds relative to the target block */
|
|
290
313
|
timeOffset?: number;
|
|
291
314
|
/** Duration in seconds of the final video */
|
|
@@ -374,13 +397,74 @@ export interface Source {
|
|
|
374
397
|
width: number;
|
|
375
398
|
height: number;
|
|
376
399
|
}
|
|
377
|
-
/**
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
400
|
+
/**
|
|
401
|
+
* Rectangle as the C++-binding tuple `[x, y, w, h]`. Matches `@cesdk/node`'s
|
|
402
|
+
* `XYWH` so `getScreenSpaceBoundingBoxXYWH` returns the same shape everywhere.
|
|
403
|
+
*/
|
|
404
|
+
export type XYWH = [
|
|
405
|
+
x: number,
|
|
406
|
+
y: number,
|
|
407
|
+
w: number,
|
|
408
|
+
h: number
|
|
409
|
+
];
|
|
410
|
+
/**
|
|
411
|
+
* RGBA color as the C++-binding tuple `[r, g, b, a]`. Matches `@cesdk/node`'s
|
|
412
|
+
* `RGBA`; the object form is {@link RGBAColor}. The tuple is what the raw
|
|
413
|
+
* `get*ColorRGBA` / `getFillSolidColor` binding methods return.
|
|
414
|
+
*/
|
|
415
|
+
export type RGBA = [
|
|
416
|
+
r: number,
|
|
417
|
+
g: number,
|
|
418
|
+
b: number,
|
|
419
|
+
a: number
|
|
420
|
+
];
|
|
421
|
+
/** CMYK color as the C++-binding tuple `[c, m, y, k]`. Matches `@cesdk/node`'s `CMYK`. */
|
|
422
|
+
export type CMYK = [
|
|
423
|
+
c: number,
|
|
424
|
+
m: number,
|
|
425
|
+
y: number,
|
|
426
|
+
k: number
|
|
427
|
+
];
|
|
428
|
+
/** Gradient stop as the C++-binding tuple `[stop, r, g, b, a]`. Matches `@cesdk/node`'s `GradientstopRGBA`. */
|
|
429
|
+
export type GradientstopRGBA = [
|
|
430
|
+
stop: number,
|
|
431
|
+
r: number,
|
|
432
|
+
g: number,
|
|
433
|
+
b: number,
|
|
434
|
+
a: number
|
|
435
|
+
];
|
|
436
|
+
/** A block of engine-managed buffer data. Matches `@cesdk/node`'s `Buffer`. */
|
|
437
|
+
interface Buffer$1 {
|
|
438
|
+
handle: string;
|
|
439
|
+
buffer: Uint8Array;
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* A transient (in-engine) resource that would be lost during export —
|
|
443
|
+
* typically a `buffer://` URI from an importer. Field name is `URL` to
|
|
444
|
+
* match `@cesdk/node`.
|
|
445
|
+
*/
|
|
446
|
+
export interface TransientResource {
|
|
447
|
+
URL: string;
|
|
448
|
+
size: number;
|
|
449
|
+
}
|
|
450
|
+
/** Error state of a design block. The `error` field names the failure. */
|
|
451
|
+
export interface BlockStateError {
|
|
452
|
+
type: "Error";
|
|
453
|
+
error: "AudioDecoding" | "ImageDecoding" | "FileFetch" | "Unknown" | "VideoDecoding";
|
|
454
|
+
}
|
|
455
|
+
/** Pending state of a design block, with `progress` in `[0, 1]`. */
|
|
456
|
+
export interface BlockStatePending {
|
|
457
|
+
type: "Pending";
|
|
458
|
+
/** Expected range is [0, 1] */
|
|
459
|
+
progress: number;
|
|
383
460
|
}
|
|
461
|
+
/** Ready state of a design block. */
|
|
462
|
+
export interface BlockStateReady {
|
|
463
|
+
type: "Ready";
|
|
464
|
+
}
|
|
465
|
+
/** The state of a design block. Matches `@cesdk/node`'s `BlockState`. */
|
|
466
|
+
export type BlockState = BlockStateError | BlockStatePending | BlockStateReady;
|
|
467
|
+
type CutoutType = "Solid" | "Dashed";
|
|
384
468
|
/**
|
|
385
469
|
* Tight ink-paint bounding box of a single grapheme, in global scene
|
|
386
470
|
* coordinates. Returned by `block.getTextCharacterInkBoxes`. The baseline
|
|
@@ -446,7 +530,7 @@ export type Locale = string;
|
|
|
446
530
|
* (sections in a content library, topics, etc.). Tags in comparison are
|
|
447
531
|
* looser, used for extended search/filter.
|
|
448
532
|
*/
|
|
449
|
-
|
|
533
|
+
type Groups = string[];
|
|
450
534
|
/**
|
|
451
535
|
* Sort order applied by an asset source when supported.
|
|
452
536
|
* `None` keeps insertion order.
|
|
@@ -713,28 +797,22 @@ export type AudioMimeType = Extract<MimeType, "audio/wav" | "audio/mp4">;
|
|
|
713
797
|
export type VideoMimeType = Extract<MimeType, "video/mp4" | "video/quicktime">;
|
|
714
798
|
/** @public */
|
|
715
799
|
export type ApplicationMimeType = Extract<MimeType, "application/octet-stream" | "application/pdf" | "application/zip">;
|
|
716
|
-
|
|
717
|
-
export type SceneMode = "Design" | "Video";
|
|
800
|
+
type SceneMode = "Design" | "Video";
|
|
718
801
|
/** Design units */
|
|
719
802
|
export type DesignUnit = "Pixel" | "Millimeter" | "Inch";
|
|
720
803
|
/** Position modes */
|
|
721
804
|
export type PositionMode = "Absolute" | "Percent" | "Auto";
|
|
722
805
|
/** Size modes */
|
|
723
806
|
export type SizeMode = "Absolute" | "Percent" | "Auto";
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
export type StrokePosition = "Center" | "Inner" | "Outer";
|
|
730
|
-
/** Stroke corner geometry */
|
|
731
|
-
export type StrokeCornerGeometry = "Round" | "Miter" | "Bevel";
|
|
732
|
-
/** Stroke cap geometry for open paths (line shapes, dashes). */
|
|
733
|
-
export type StrokeCap = "Butt" | "Round" | "Square";
|
|
807
|
+
type BlendMode = "PassThrough" | "Normal" | "Darken" | "Multiply" | "ColorBurn" | "LinearBurn" | "DarkenColor" | "Lighten" | "Screen" | "ColorDodge" | "LinearDodge" | "LightenColor" | "Overlay" | "SoftLight" | "HardLight" | "VividLight" | "LinearLight" | "PinLight" | "HardMix" | "Difference" | "Exclusion" | "Subtract" | "Divide" | "Hue" | "Saturation" | "Color" | "Luminosity";
|
|
808
|
+
type StrokeStyle = "Solid" | "Dashed" | "DashedRound" | "LongDashed" | "LongDashedRound";
|
|
809
|
+
type StrokePosition = "Center" | "Inner" | "Outer";
|
|
810
|
+
type StrokeCornerGeometry = "Round" | "Miter" | "Bevel";
|
|
811
|
+
type StrokeCap = "Butt" | "Round" | "Square";
|
|
734
812
|
/** Text horizontal alignment */
|
|
735
|
-
|
|
813
|
+
type TextHorizontalAlignment = "Left" | "Center" | "Right";
|
|
736
814
|
/** Text vertical alignment */
|
|
737
|
-
|
|
815
|
+
type TextVerticalAlignment = "Top" | "Center" | "Bottom";
|
|
738
816
|
/** Property types */
|
|
739
817
|
export type PropertyType = "Bool" | "Int" | "Float" | "Double" | "String" | "Enum" | "Color" | "Struct" | "SourceSet";
|
|
740
818
|
/** Block event types */
|
|
@@ -752,8 +830,7 @@ export interface BlockEvent {
|
|
|
752
830
|
block: DesignBlockId;
|
|
753
831
|
type: BlockEventType;
|
|
754
832
|
}
|
|
755
|
-
|
|
756
|
-
export type SceneLayout = string;
|
|
833
|
+
type SceneLayout = string;
|
|
757
834
|
/** Asset property types for dynamic asset configuration */
|
|
758
835
|
export interface AssetStringProperty {
|
|
759
836
|
property: string;
|
|
@@ -952,13 +1029,7 @@ export type ZoomAutoFitAxis = "Horizontal" | "Vertical" | "Both";
|
|
|
952
1029
|
* @public
|
|
953
1030
|
*/
|
|
954
1031
|
export type EditMode = "Transform" | "Crop" | "Text" | "TextLink" | "Playback" | "AdjustmentsCutout" | "AdjustmentsVectorEdit" | string;
|
|
955
|
-
|
|
956
|
-
* Scene-level design unit. Alias of {@link DesignUnit} for cross-binding
|
|
957
|
-
* naming parity (`@cesdk/node` exposes both names).
|
|
958
|
-
*
|
|
959
|
-
* @public
|
|
960
|
-
*/
|
|
961
|
-
export type SceneDesignUnit = DesignUnit;
|
|
1032
|
+
type SceneDesignUnit = DesignUnit;
|
|
962
1033
|
/**
|
|
963
1034
|
* Font-size unit. Mirrors `@cesdk/node`'s
|
|
964
1035
|
* `bindings/wasm/js_web/src/utils/unitConversion.ts`. `'Point'` is
|
|
@@ -970,12 +1041,12 @@ export type SceneDesignUnit = DesignUnit;
|
|
|
970
1041
|
export type FontSizeUnit = SceneDesignUnit | "Point";
|
|
971
1042
|
/**
|
|
972
1043
|
* Engine role string. Mirrors `@cesdk/node`'s
|
|
973
|
-
* `
|
|
974
|
-
*
|
|
1044
|
+
* `role.ts` exactly — a closed union (no `| string` widening) so
|
|
1045
|
+
* `Configuration.role` stays assignable to the WASM binding.
|
|
975
1046
|
*
|
|
976
1047
|
* @public
|
|
977
1048
|
*/
|
|
978
|
-
export type RoleString = "Adopter" | "
|
|
1049
|
+
export type RoleString = "Creator" | "Adopter" | "Viewer" | "Presenter";
|
|
979
1050
|
/**
|
|
980
1051
|
* Engine scope string. Mirrors `@cesdk/node`'s
|
|
981
1052
|
* `bindings/wasm/js_web/src/types/scope.ts`.
|
|
@@ -1042,21 +1113,28 @@ export type VerticalBlockAlignment = TextVerticalAlignment;
|
|
|
1042
1113
|
* @public
|
|
1043
1114
|
*/
|
|
1044
1115
|
export interface DominantColor {
|
|
1045
|
-
/** sRGB
|
|
1046
|
-
|
|
1047
|
-
/**
|
|
1116
|
+
/** Red component in sRGB, normalized to [0, 1]. */
|
|
1117
|
+
r: number;
|
|
1118
|
+
/** Green component in sRGB, normalized to [0, 1]. */
|
|
1119
|
+
g: number;
|
|
1120
|
+
/** Blue component in sRGB, normalized to [0, 1]. */
|
|
1121
|
+
b: number;
|
|
1122
|
+
/**
|
|
1123
|
+
* Share of analyzed pixels represented by this color, in [0, 1]. The sum of
|
|
1124
|
+
* weights of all colors from a single `getDominantColors` call is `1.0`.
|
|
1125
|
+
*/
|
|
1048
1126
|
weight: number;
|
|
1049
1127
|
}
|
|
1050
1128
|
/**
|
|
1051
|
-
* Options for `block.getDominantColors`.
|
|
1129
|
+
* Options for `block.getDominantColors`. Mirrors `@cesdk/node`.
|
|
1052
1130
|
*
|
|
1053
1131
|
* @public
|
|
1054
1132
|
*/
|
|
1055
1133
|
export interface DominantColorsOptions {
|
|
1056
|
-
/** Number of
|
|
1057
|
-
|
|
1058
|
-
/**
|
|
1059
|
-
|
|
1134
|
+
/** Number of dominant colors to extract. Default: 5. */
|
|
1135
|
+
count?: number;
|
|
1136
|
+
/** Exclude near-white pixels from the analysis. Default: false. */
|
|
1137
|
+
ignoreWhite?: boolean;
|
|
1060
1138
|
}
|
|
1061
1139
|
/**
|
|
1062
1140
|
* Options for `block.split`. Mirrors `@cesdk/node`'s `SplitOptions`.
|
|
@@ -1169,7 +1247,16 @@ export interface AddVideoOptions extends AddImageOptions {
|
|
|
1169
1247
|
* @public
|
|
1170
1248
|
*/
|
|
1171
1249
|
export interface AudioFromVideoOptions {
|
|
1172
|
-
|
|
1250
|
+
/**
|
|
1251
|
+
* If true, the audio block keeps the source video's duration/trim; if false,
|
|
1252
|
+
* the full audio track is extracted without trim settings. Default: true.
|
|
1253
|
+
*/
|
|
1254
|
+
keepTrimSettings?: boolean;
|
|
1255
|
+
/**
|
|
1256
|
+
* If true, the source video's own audio is muted (so it isn't heard twice
|
|
1257
|
+
* alongside the extracted audio block). Default: true.
|
|
1258
|
+
*/
|
|
1259
|
+
muteOriginalVideo?: boolean;
|
|
1173
1260
|
}
|
|
1174
1261
|
/**
|
|
1175
1262
|
* Options for `block.applyAsset`. Mirrors `@cesdk/node`'s
|
|
@@ -1178,8 +1265,17 @@ export interface AudioFromVideoOptions {
|
|
|
1178
1265
|
* @public
|
|
1179
1266
|
*/
|
|
1180
1267
|
export interface ApplyAssetOptions {
|
|
1181
|
-
/**
|
|
1182
|
-
|
|
1268
|
+
/**
|
|
1269
|
+
* How the asset should be placed in the scene.
|
|
1270
|
+
* - 'clip': Background clip placed on background track
|
|
1271
|
+
* - 'overlay': Foreground overlay placed at playhead
|
|
1272
|
+
*/
|
|
1273
|
+
clipType?: "clip" | "overlay";
|
|
1274
|
+
/**
|
|
1275
|
+
* Additional custom context options.
|
|
1276
|
+
* Allows passing arbitrary data to middleware for custom placement logic.
|
|
1277
|
+
*/
|
|
1278
|
+
[key: string]: unknown;
|
|
1183
1279
|
}
|
|
1184
1280
|
/**
|
|
1185
1281
|
* Discriminator for `editor.{get,set}Setting` family. Mirrors the strings
|
|
@@ -1187,7 +1283,7 @@ export interface ApplyAssetOptions {
|
|
|
1187
1283
|
*
|
|
1188
1284
|
* @public
|
|
1189
1285
|
*/
|
|
1190
|
-
export type SettingType = "
|
|
1286
|
+
export type SettingType = "Bool" | "Int" | "Float" | "String" | "Color" | "Enum";
|
|
1191
1287
|
/** @public */
|
|
1192
1288
|
export type SettingsBool = string;
|
|
1193
1289
|
/** @public */
|
|
@@ -1235,24 +1331,8 @@ export type AsyncURIResolver = (uri: string, defaultResolver?: AsyncURIResolver)
|
|
|
1235
1331
|
* @public
|
|
1236
1332
|
*/
|
|
1237
1333
|
export type HistoryUpdate = "Updated" | "Activated";
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
* `ContentFillMode` is `Contain` or `Cover`. Mirrors engine
|
|
1241
|
-
* `ubq::types::HorizontalContentFillAlignment`
|
|
1242
|
-
* (`engine/src/ubq/types/ContentFillAlignment.hpp`).
|
|
1243
|
-
*
|
|
1244
|
-
* @public
|
|
1245
|
-
*/
|
|
1246
|
-
export type HorizontalContentFillAlignment = "Left" | "Center" | "Right";
|
|
1247
|
-
/**
|
|
1248
|
-
* Vertical alignment of the content fill inside a block. Applies when
|
|
1249
|
-
* `ContentFillMode` is `Contain` or `Cover`. Mirrors engine
|
|
1250
|
-
* `ubq::types::VerticalContentFillAlignment`
|
|
1251
|
-
* (`engine/src/ubq/types/ContentFillAlignment.hpp`).
|
|
1252
|
-
*
|
|
1253
|
-
* @public
|
|
1254
|
-
*/
|
|
1255
|
-
export type VerticalContentFillAlignment = "Top" | "Center" | "Bottom";
|
|
1334
|
+
type HorizontalContentFillAlignment = "Left" | "Center" | "Right";
|
|
1335
|
+
type VerticalContentFillAlignment = "Top" | "Center" | "Bottom";
|
|
1256
1336
|
/**
|
|
1257
1337
|
* Typeface migration entry shipped on the deprecated
|
|
1258
1338
|
* `Configuration.presets.typefaces` field. Mirrors `@cesdk/node`'s
|
|
@@ -1261,12 +1341,17 @@ export type VerticalContentFillAlignment = "Top" | "Center" | "Bottom";
|
|
|
1261
1341
|
* @public
|
|
1262
1342
|
*/
|
|
1263
1343
|
export interface TypefaceDefinition {
|
|
1264
|
-
|
|
1344
|
+
/** @deprecated The meta field is not used anymore */
|
|
1345
|
+
meta?: {
|
|
1346
|
+
default?: boolean;
|
|
1347
|
+
library?: string;
|
|
1348
|
+
categories?: string[];
|
|
1349
|
+
};
|
|
1350
|
+
family: string;
|
|
1265
1351
|
fonts: Array<{
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
style?: FontStyle;
|
|
1352
|
+
fontURL: string;
|
|
1353
|
+
weight: FontWeight;
|
|
1354
|
+
style: FontStyle;
|
|
1270
1355
|
}>;
|
|
1271
1356
|
}
|
|
1272
1357
|
/**
|
|
@@ -1296,11 +1381,7 @@ export declare function isCMYKColor(color: Color): color is CMYKColor;
|
|
|
1296
1381
|
* @public
|
|
1297
1382
|
*/
|
|
1298
1383
|
export function defaultLogger(message: string, level?: LogLevel): void;
|
|
1299
|
-
|
|
1300
|
-
* Interface for block operations
|
|
1301
|
-
* Provides methods for creating, manipulating, and querying design blocks
|
|
1302
|
-
*/
|
|
1303
|
-
export interface IBlockAPI {
|
|
1384
|
+
interface IBlockAPI {
|
|
1304
1385
|
create(type: string): DesignBlockId;
|
|
1305
1386
|
createFill(type: string): DesignBlockId;
|
|
1306
1387
|
createShape(type: string): DesignBlockId;
|
|
@@ -1502,11 +1583,7 @@ export interface IBlockAPI {
|
|
|
1502
1583
|
onSelectionChanged(callback: () => void): () => void;
|
|
1503
1584
|
onClicked(callback: (id: DesignBlockId) => void): () => void;
|
|
1504
1585
|
}
|
|
1505
|
-
|
|
1506
|
-
* Interface for scene operations
|
|
1507
|
-
* Provides methods for creating, loading, and saving scenes
|
|
1508
|
-
*/
|
|
1509
|
-
export interface ISceneAPI {
|
|
1586
|
+
interface ISceneAPI {
|
|
1510
1587
|
create(): DesignBlockId;
|
|
1511
1588
|
createVideo(): DesignBlockId;
|
|
1512
1589
|
createFromImage(uri: string, dpi?: number, pixelScaleFactor?: number): Promise<DesignBlockId>;
|
|
@@ -1536,11 +1613,7 @@ export interface ISceneAPI {
|
|
|
1536
1613
|
setFontSizeUnit(unit: string, scene?: DesignBlockId): void;
|
|
1537
1614
|
get(): DesignBlockId | null;
|
|
1538
1615
|
}
|
|
1539
|
-
|
|
1540
|
-
* Interface for editor operations
|
|
1541
|
-
* Provides methods for editor settings and state management
|
|
1542
|
-
*/
|
|
1543
|
-
export interface IEditorAPI {
|
|
1616
|
+
interface IEditorAPI {
|
|
1544
1617
|
/** Active license JWT, or '' in Evaluation mode. */
|
|
1545
1618
|
getActiveLicense(): string;
|
|
1546
1619
|
/**
|
|
@@ -1618,30 +1691,22 @@ export interface IEditorAPI {
|
|
|
1618
1691
|
setBufferLength(uri: string, length: number): void;
|
|
1619
1692
|
getBufferLength(uri: string): number;
|
|
1620
1693
|
/**
|
|
1621
|
-
* List all transient (in-engine) resources
|
|
1622
|
-
*
|
|
1623
|
-
*
|
|
1624
|
-
* `(r as any).URL ?? (r as any).uri`. See
|
|
1625
|
-
* `@imgly/psd-importer`'s transient-resource-relocation test for the
|
|
1626
|
-
* canonical pattern.
|
|
1694
|
+
* List all transient (in-engine) resources — typically `buffer://` URIs
|
|
1695
|
+
* created by importers before upload. Each entry is `{ URL, size }`; the
|
|
1696
|
+
* native `uri` key was aligned to WASM's `URL`.
|
|
1627
1697
|
*/
|
|
1628
|
-
findAllTransientResources():
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
}>;
|
|
1698
|
+
findAllTransientResources(): TransientResource[];
|
|
1699
|
+
/**
|
|
1700
|
+
* Stream the data of a resource at `uri` in chunks of `chunkSize` bytes.
|
|
1701
|
+
* `onData` is invoked once per chunk; return `false` to stop early.
|
|
1702
|
+
*/
|
|
1703
|
+
getResourceData(uri: string, chunkSize: number, onData: (result: Uint8Array) => boolean): void;
|
|
1635
1704
|
/** @deprecated Use {@link onHistoryUpdatedWithKind} instead. */
|
|
1636
1705
|
onHistoryUpdated(callback: () => void): () => void;
|
|
1637
1706
|
onHistoryUpdatedWithKind(callback: (kind: HistoryUpdate) => void): () => void;
|
|
1638
1707
|
onSettingsChanged(callback: () => void): () => void;
|
|
1639
1708
|
}
|
|
1640
|
-
|
|
1641
|
-
* Interface for asset operations
|
|
1642
|
-
* Provides methods for managing asset sources
|
|
1643
|
-
*/
|
|
1644
|
-
export interface IAssetAPI {
|
|
1709
|
+
interface IAssetAPI {
|
|
1645
1710
|
addSource(source: AssetSource): void;
|
|
1646
1711
|
addLocalSource(id: string, supportedMimeTypes?: string[]): void;
|
|
1647
1712
|
addLocalAssetSourceFromJSONString(contentJSON: string, basePath?: string): Promise<string>;
|
|
@@ -1657,31 +1722,16 @@ export interface IAssetAPI {
|
|
|
1657
1722
|
removeAssetFromSource(sourceId: string, assetId: string): void;
|
|
1658
1723
|
assetSourceContentsChanged(sourceId: string): void;
|
|
1659
1724
|
}
|
|
1660
|
-
|
|
1661
|
-
* Interface for event subscriptions
|
|
1662
|
-
*/
|
|
1663
|
-
export interface IEventAPI {
|
|
1725
|
+
interface IEventAPI {
|
|
1664
1726
|
subscribe(blocks: DesignBlockId[], callback: (events: BlockEvent[]) => void): () => void;
|
|
1665
1727
|
}
|
|
1666
|
-
|
|
1667
|
-
* Interface for variable management
|
|
1668
|
-
*/
|
|
1669
|
-
export interface IVariableAPI {
|
|
1728
|
+
interface IVariableAPI {
|
|
1670
1729
|
setString(key: string, value: string): void;
|
|
1671
1730
|
getString(key: string): string;
|
|
1672
1731
|
findAll(): string[];
|
|
1673
1732
|
remove(key: string): void;
|
|
1674
1733
|
}
|
|
1675
|
-
|
|
1676
|
-
* Main Creative Engine interface
|
|
1677
|
-
* This interface defines the contract that all binding implementations must fulfill.
|
|
1678
|
-
*
|
|
1679
|
-
* When adding a new `I<X>API` to this file, also add a phantom assertion in
|
|
1680
|
-
* `bindings/wasm/js_web/src/__type_checks__/shared-interface-parity.ts` so the
|
|
1681
|
-
* node wasm binding stays pinned. The node native binding pins itself via
|
|
1682
|
-
* its `class … implements I<X>API` declarations.
|
|
1683
|
-
*/
|
|
1684
|
-
export interface ICreativeEngine {
|
|
1734
|
+
interface ICreativeEngine {
|
|
1685
1735
|
/** Engine version string */
|
|
1686
1736
|
readonly version: string;
|
|
1687
1737
|
/** Block operations API */
|
|
@@ -1699,25 +1749,7 @@ export interface ICreativeEngine {
|
|
|
1699
1749
|
/** Dispose the engine and clean up all resources */
|
|
1700
1750
|
dispose(): void;
|
|
1701
1751
|
}
|
|
1702
|
-
|
|
1703
|
-
* Normalized contract that both the node wasm binding and the node native
|
|
1704
|
-
* binding can satisfy after a thin adapter layer.
|
|
1705
|
-
*
|
|
1706
|
-
* Each shared API class (`VariableAPI`, `EventAPI`, …) operates against this
|
|
1707
|
-
* interface so the high-level method bodies are written once. Bindings provide
|
|
1708
|
-
* adapters:
|
|
1709
|
-
*
|
|
1710
|
-
* • The node wasm adapter unwraps `UBQResult<T>`, flattens `Vector<T>` to
|
|
1711
|
-
* `T[]`, and converts the internal color shape to the user-facing `Color`.
|
|
1712
|
-
* • The node native adapter is mostly pass-through — it already speaks the
|
|
1713
|
-
* normalized shape.
|
|
1714
|
-
*
|
|
1715
|
-
* This file is the *minimum* contract needed by the migrated classes. As
|
|
1716
|
-
* additional API classes move into `@cesdk/shared`, methods get added here
|
|
1717
|
-
* (it's an intentionally incremental migration). The interface MUST stay
|
|
1718
|
-
* narrow — every method here is a runtime obligation for both adapters.
|
|
1719
|
-
*/
|
|
1720
|
-
export interface EngineBindingHandle {
|
|
1752
|
+
interface EngineBindingHandle {
|
|
1721
1753
|
findAllVariables(): string[];
|
|
1722
1754
|
setVariableString(key: string, value: string): void;
|
|
1723
1755
|
getVariableString(key: string): string;
|
|
@@ -1844,92 +1876,2570 @@ export type TextDecorationLine = "None" | "Underline" | "Strikethrough" | "Overl
|
|
|
1844
1876
|
*/
|
|
1845
1877
|
export type TextDecorationStyle = "Solid" | "Double" | "Dotted" | "Dashed" | "Wavy";
|
|
1846
1878
|
/**
|
|
1847
|
-
* Configuration for text decoration rendering.
|
|
1848
|
-
* @public
|
|
1879
|
+
* Configuration for text decoration rendering.
|
|
1880
|
+
* @public
|
|
1881
|
+
*/
|
|
1882
|
+
export interface TextDecorationConfig {
|
|
1883
|
+
lines: TextDecorationLine[];
|
|
1884
|
+
style?: TextDecorationStyle;
|
|
1885
|
+
/** Override color for underlines (only). */
|
|
1886
|
+
underlineColor?: Color;
|
|
1887
|
+
/** Multiplier on the font-derived underline thickness. Default 1.0. */
|
|
1888
|
+
underlineThickness?: number;
|
|
1889
|
+
/** Relative offset multiplier for the underline position. */
|
|
1890
|
+
underlineOffset?: number;
|
|
1891
|
+
/** When true, underlines skip glyph descenders. Default true. */
|
|
1892
|
+
skipInk?: boolean;
|
|
1893
|
+
}
|
|
1894
|
+
/**
|
|
1895
|
+
* A styled run of text within a text block, returned by `block.getTextRuns`.
|
|
1896
|
+
* Matches `@cesdk/node`'s `TextRunInfo`.
|
|
1897
|
+
* @public
|
|
1898
|
+
*/
|
|
1899
|
+
export interface TextRunInfo {
|
|
1900
|
+
/** Start grapheme index (inclusive). */
|
|
1901
|
+
from: number;
|
|
1902
|
+
/** End grapheme index (exclusive). */
|
|
1903
|
+
to: number;
|
|
1904
|
+
/** The text content of this run. */
|
|
1905
|
+
text: string;
|
|
1906
|
+
/** The text color. */
|
|
1907
|
+
color: Color;
|
|
1908
|
+
/** The font weight. */
|
|
1909
|
+
fontWeight: FontWeight;
|
|
1910
|
+
/** The font style. */
|
|
1911
|
+
fontStyle: FontStyle;
|
|
1912
|
+
/** The font size in points. */
|
|
1913
|
+
fontSize: number;
|
|
1914
|
+
/** The text case transformation. */
|
|
1915
|
+
textCase: TextCase;
|
|
1916
|
+
/** The typeface used by this run. */
|
|
1917
|
+
typeface: Typeface;
|
|
1918
|
+
/** The resolved font file URI. */
|
|
1919
|
+
resolvedFontFileUri: string;
|
|
1920
|
+
/** The text decoration configuration of this run. */
|
|
1921
|
+
textDecoration: TextDecorationConfig;
|
|
1922
|
+
/** Additional kerning offset in em units. */
|
|
1923
|
+
kerning: number;
|
|
1924
|
+
}
|
|
1925
|
+
/**
|
|
1926
|
+
* A raw RGBA video-thumbnail frame. Node has no `ImageData`, so this is the
|
|
1927
|
+
* equivalent returned by `block.generateVideoThumbnailSequence`.
|
|
1928
|
+
* @public
|
|
1929
|
+
*/
|
|
1930
|
+
export interface ThumbnailFrame {
|
|
1931
|
+
data: Uint8ClampedArray;
|
|
1932
|
+
width: number;
|
|
1933
|
+
height: number;
|
|
1934
|
+
}
|
|
1935
|
+
/**
|
|
1936
|
+
* A movement constraint rule. The scope is determined by which key is
|
|
1937
|
+
* present: neither (scene-wide default), `block` (per-block, includes
|
|
1938
|
+
* pages), or `blockType` (per-block-type).
|
|
1939
|
+
*
|
|
1940
|
+
* `overshoot` is a non-negative fraction of the moved block's own size.
|
|
1941
|
+
* @public
|
|
1942
|
+
*/
|
|
1943
|
+
export type MovementConstraintRule = {
|
|
1944
|
+
overshoot: number;
|
|
1945
|
+
} | {
|
|
1946
|
+
overshoot: number;
|
|
1947
|
+
block: number;
|
|
1948
|
+
} | {
|
|
1949
|
+
overshoot: number;
|
|
1950
|
+
blockType: string;
|
|
1951
|
+
};
|
|
1952
|
+
/**
|
|
1953
|
+
* Scope descriptor used to identify an existing movement constraint for
|
|
1954
|
+
* removal.
|
|
1955
|
+
* @public
|
|
1956
|
+
*/
|
|
1957
|
+
export type MovementConstraintScope = {
|
|
1958
|
+
block: number;
|
|
1959
|
+
} | {
|
|
1960
|
+
blockType: string;
|
|
1961
|
+
};
|
|
1962
|
+
/**
|
|
1963
|
+
* Effective movement constraint for a block, or `null` when no constraint
|
|
1964
|
+
* applies.
|
|
1965
|
+
* @public
|
|
1966
|
+
*/
|
|
1967
|
+
export type ResolvedMovementConstraint = {
|
|
1968
|
+
overshoot: number;
|
|
1969
|
+
} | null;
|
|
1970
|
+
type AnimationEasing = "Linear" | "EaseIn" | "EaseOut" | "EaseInOut" | "EaseInQuart" | "EaseOutQuart" | "EaseInOutQuart" | "EaseInQuint" | "EaseOutQuint" | "EaseInOutQuint" | "EaseInBack" | "EaseOutBack" | "EaseInOutBack" | "EaseInSpring" | "EaseOutSpring" | "EaseInOutSpring";
|
|
1971
|
+
/**
|
|
1972
|
+
* Options for zooming to a block with optional animation.
|
|
1973
|
+
* @public
|
|
1974
|
+
*/
|
|
1975
|
+
export type ZoomOptions = {
|
|
1976
|
+
/** Padding configuration around the block */
|
|
1977
|
+
padding?: number | {
|
|
1978
|
+
x?: number;
|
|
1979
|
+
y?: number;
|
|
1980
|
+
} | {
|
|
1981
|
+
top?: number;
|
|
1982
|
+
bottom?: number;
|
|
1983
|
+
left?: number;
|
|
1984
|
+
right?: number;
|
|
1985
|
+
};
|
|
1986
|
+
/** Animation configuration - boolean for default animation or object for custom settings */
|
|
1987
|
+
animate?: boolean | {
|
|
1988
|
+
/** Duration of the animation in seconds */
|
|
1989
|
+
duration?: number;
|
|
1990
|
+
/** Easing function for the animation */
|
|
1991
|
+
easing?: AnimationEasing;
|
|
1992
|
+
/** Whether the animation can be interrupted */
|
|
1993
|
+
interruptible?: boolean;
|
|
1994
|
+
};
|
|
1995
|
+
};
|
|
1996
|
+
/** @public */
|
|
1997
|
+
export type BoolPropertyName = "alwaysOnBottom" | "alwaysOnTop" | "clipped" | "flip/horizontal" | "flip/vertical" | "highlightEnabled" | "includedInExport" | "placeholder/enabled" | "playback/playing" | "playback/soloPlaybackEnabled" | "scene/aspectRatioLock" | "scene/extendedPanningArea" | "selected" | "selectionEnabled" | "transformLocked" | "visible" | "blur/enabled" | "dropShadow/clip" | "dropShadow/enabled" | "fill/enabled" | "fill/overprint" | "page/guides/gridEnabled" | "page/guides/gridSnapEnabled" | "page/marginEnabled" | "placeholderControls/showButton" | "placeholderControls/showOverlay" | "playback/looping" | "playback/muted" | "stroke/enabled" | "stroke/overprint" | "backgroundColor/enabled" | "placeholderBehavior/enabled" | "text/automaticFontSizeEnabled" | "text/clipLinesOutsideOfFrame" | "text/hasClippedLines" | "text/pathFlipped" | "text/useContextualLigatures" | "text/useDiscretionaryLigatures" | "text/useKerning" | "text/useLigatures" | "track/automaticallyManageBlockOffsets" | "caption/automaticFontSizeEnabled" | "caption/clipLinesOutsideOfFrame" | "caption/hasClippedLines" | "caption/pathFlipped" | "caption/useContextualLigatures" | "caption/useDiscretionaryLigatures" | "caption/useKerning" | "caption/useLigatures" | "captionTrack/automaticallyManageBlockOffsets" | "animation/slide/fade" | "animation/pan/fade" | "animation/blur/fade" | "animation/zoom/fade" | "animation/crop_zoom/fade" | "animation/spin/fade" | "animation/block_swipe_text/useTextColor" | "animation/spread_text/fade" | "animation/ken_burns/fade" | "effect/enabled" | (string & {});
|
|
1998
|
+
/** @public */
|
|
1999
|
+
export type EnumPropertyName = "blend/mode" | "contentFill/horizontalAlignment" | "contentFill/mode" | "contentFill/verticalAlignment" | "height/mode" | "position/x/mode" | "position/y/mode" | "scene/designUnit" | "scene/fontSizeUnit" | "scene/layout" | "scene/mode" | "width/mode" | "page/guides/source" | "stroke/cap" | "stroke/cornerGeometry" | "stroke/dashEndCap" | "stroke/dashStartCap" | "stroke/endCap" | "stroke/position" | "stroke/startCap" | "stroke/style" | "text/horizontalAlignment" | "text/verticalAlignment" | "cutout/type" | "caption/horizontalAlignment" | "caption/verticalAlignment" | "animationEasing" | "textAnimationWritingStyle" | "animation/grow/direction" | "animation/wipe/direction" | "animation/baseline/direction" | "animation/spin/direction" | "animation/spin_loop/direction" | "animation/jump_loop/direction" | "animation/typewriter_text/writingStyle" | "animation/block_swipe_text/direction" | "animation/merge_text/direction" | "animation/ken_burns/direction" | "fill/pixelStream/orientation" | "shape/vector_path/fillRule" | (string & {});
|
|
2000
|
+
/** @public */
|
|
2001
|
+
export type FloatPropertyName = "globalBoundingBox/height" | "globalBoundingBox/width" | "globalBoundingBox/x" | "globalBoundingBox/y" | "height" | "lastFrame/height" | "lastFrame/width" | "lastFrame/x" | "lastFrame/y" | "movement/constraint" | "position/x" | "position/y" | "rotation" | "scene/dpi" | "scene/pageDimensions/height" | "scene/pageDimensions/width" | "scene/pixelScaleFactor" | "width" | "camera/pixelRatio" | "camera/resolution/height" | "camera/resolution/width" | "camera/zoomLevel" | "dropShadow/blurRadius/x" | "dropShadow/blurRadius/y" | "dropShadow/offset/x" | "dropShadow/offset/y" | "page/guides/gridSpacingX" | "page/guides/gridSpacingY" | "page/margin/bottom" | "page/margin/left" | "page/margin/right" | "page/margin/top" | "page/marginScale" | "playback/speed" | "playback/volume" | "stroke/dashOffset" | "stroke/width" | "opacity" | "backgroundColor/cornerRadius" | "backgroundColor/paddingBottom" | "backgroundColor/paddingLeft" | "backgroundColor/paddingRight" | "backgroundColor/paddingTop" | "text/fontSize" | "text/letterSpacing" | "text/lineHeight" | "text/maxAutomaticFontSize" | "text/minAutomaticFontSize" | "text/paragraphSpacing" | "text/pathOffset" | "cutout/offset" | "cutout/smoothing" | "caption/fontSize" | "caption/letterSpacing" | "caption/lineHeight" | "caption/maxAutomaticFontSize" | "caption/minAutomaticFontSize" | "caption/paragraphSpacing" | "caption/pathOffset" | "animation/slide/direction" | "textAnimationOverlap" | "animation/pan/direction" | "animation/pan/distance" | "animation/blur/intensity" | "animation/grow/scaleFactor" | "animation/crop_zoom/scale" | "animation/spin/intensity" | "animation/blur_loop/intensity" | "animation/pulsating_loop/intensity" | "animation/breathing_loop/intensity" | "animation/jump_loop/intensity" | "animation/sway_loop/intensity" | "animation/spread_text/intensity" | "animation/merge_text/intensity" | "animation/ken_burns/travelDistanceRatio" | "animation/ken_burns/zoomIntensity" | "blur/uniform/intensity" | "blur/linear/blurRadius" | "blur/linear/x1" | "blur/linear/x2" | "blur/linear/y1" | "blur/linear/y2" | "blur/mirrored/blurRadius" | "blur/mirrored/gradientSize" | "blur/mirrored/size" | "blur/mirrored/x1" | "blur/mirrored/x2" | "blur/mirrored/y1" | "blur/mirrored/y2" | "blur/radial/blurRadius" | "blur/radial/gradientRadius" | "blur/radial/radius" | "blur/radial/x" | "blur/radial/y" | "effect/adjustments/blacks" | "effect/adjustments/brightness" | "effect/adjustments/clarity" | "effect/adjustments/contrast" | "effect/adjustments/exposure" | "effect/adjustments/gamma" | "effect/adjustments/highlights" | "effect/adjustments/saturation" | "effect/adjustments/shadows" | "effect/adjustments/sharpness" | "effect/adjustments/temperature" | "effect/adjustments/whites" | "effect/cross_cut/offset" | "effect/cross_cut/slices" | "effect/cross_cut/speedV" | "effect/cross_cut/time" | "effect/dot_pattern/blur" | "effect/dot_pattern/dots" | "effect/dot_pattern/size" | "effect/duotone_filter/intensity" | "effect/extrude_blur/amount" | "effect/glow/amount" | "effect/glow/darkness" | "effect/glow/size" | "effect/green_screen/colorMatch" | "effect/green_screen/smoothness" | "effect/green_screen/spill" | "effect/half_tone/angle" | "effect/half_tone/scale" | "effect/linocut/scale" | "effect/liquid/amount" | "effect/liquid/scale" | "effect/liquid/time" | "effect/lut_filter/intensity" | "effect/outliner/amount" | "effect/outliner/passthrough" | "effect/posterize/levels" | "effect/radial_pixel/radius" | "effect/radial_pixel/segments" | "effect/recolor/brightnessMatch" | "effect/recolor/colorMatch" | "effect/recolor/smoothness" | "effect/shifter/amount" | "effect/shifter/angle" | "effect/tilt_shift/amount" | "effect/tilt_shift/position" | "effect/tv_glitch/distortion" | "effect/tv_glitch/distortion2" | "effect/tv_glitch/rollSpeed" | "effect/tv_glitch/speed" | "effect/vignette/darkness" | "effect/vignette/offset" | "fill/gradient/linear/endPointX" | "fill/gradient/linear/endPointY" | "fill/gradient/linear/startPointX" | "fill/gradient/linear/startPointY" | "fill/gradient/radial/centerPointX" | "fill/gradient/radial/centerPointY" | "fill/gradient/radial/radius" | "fill/gradient/conical/centerPointX" | "fill/gradient/conical/centerPointY" | "shape/rect/cornerRadiusBL" | "shape/rect/cornerRadiusBR" | "shape/rect/cornerRadiusTL" | "shape/rect/cornerRadiusTR" | "shape/polygon/cornerRadius" | "shape/star/cornerRadius" | "shape/star/innerDiameter" | "shape/vector_path/cornerRadius" | "shape/vector_path/height" | "shape/vector_path/width" | (string & {});
|
|
2002
|
+
/** @public */
|
|
2003
|
+
export type StringPropertyName = "name" | "scene/pageFormatId" | "type" | "uuid" | "page/titleTemplate" | "audio/fileURI" | "text/externalReference" | "text/fontFileUri" | "text/pathExternalRef" | "text/text" | "text/typeface" | "cutout/path" | "caption/externalReference" | "caption/fontFileUri" | "caption/pathExternalRef" | "caption/text" | "caption/typeface" | "effect/lut_filter/filterId" | "effect/lut_filter/lutFileURI" | "fill/image/externalReference" | "fill/image/imageFileURI" | "fill/image/previewFileURI" | "fill/video/fileURI" | "shape/vector_path/path" | (string & {});
|
|
2004
|
+
/** @public */
|
|
2005
|
+
export type DoublePropertyName = "playback/time" | "playback/duration" | "playback/timeOffset" | "audio/totalDuration" | "playback/trimLength" | "playback/trimOffset" | "fill/video/totalDuration" | (string & {});
|
|
2006
|
+
/** @public */
|
|
2007
|
+
export type ColorPropertyName = "dropShadow/color" | "fill/solid/color" | "page/guides/gridColor" | "stroke/color" | "backgroundColor/color" | "animation/block_swipe_text/blockColor" | "effect/duotone_filter/darkColor" | "effect/duotone_filter/lightColor" | "effect/green_screen/fromColor" | "effect/recolor/fromColor" | "effect/recolor/toColor" | "fill/color/value" | (string & {});
|
|
2008
|
+
/** @public */
|
|
2009
|
+
export type IntPropertyName = "effect/lut_filter/horizontalTileCount" | "effect/lut_filter/verticalTileCount" | "effect/mirror/side" | "effect/pixelize/horizontalPixelSize" | "effect/pixelize/verticalPixelSize" | "shape/polygon/sides" | "shape/star/points" | (string & {});
|
|
2010
|
+
/** @public */
|
|
2011
|
+
export type SourceSetPropertyName = "fill/image/sourceSet" | (string & {});
|
|
2012
|
+
/** @public */
|
|
2013
|
+
export declare const BlendModeValues: readonly [
|
|
2014
|
+
"PassThrough",
|
|
2015
|
+
"Normal",
|
|
2016
|
+
"Darken",
|
|
2017
|
+
"Multiply",
|
|
2018
|
+
"ColorBurn",
|
|
2019
|
+
"LinearBurn",
|
|
2020
|
+
"DarkenColor",
|
|
2021
|
+
"Lighten",
|
|
2022
|
+
"Screen",
|
|
2023
|
+
"ColorDodge",
|
|
2024
|
+
"LinearDodge",
|
|
2025
|
+
"LightenColor",
|
|
2026
|
+
"Overlay",
|
|
2027
|
+
"SoftLight",
|
|
2028
|
+
"HardLight",
|
|
2029
|
+
"VividLight",
|
|
2030
|
+
"LinearLight",
|
|
2031
|
+
"PinLight",
|
|
2032
|
+
"HardMix",
|
|
2033
|
+
"Difference",
|
|
2034
|
+
"Exclusion",
|
|
2035
|
+
"Subtract",
|
|
2036
|
+
"Divide",
|
|
2037
|
+
"Hue",
|
|
2038
|
+
"Saturation",
|
|
2039
|
+
"Color",
|
|
2040
|
+
"Luminosity"
|
|
2041
|
+
];
|
|
2042
|
+
/** @public */
|
|
2043
|
+
type BlendMode$1 = (typeof BlendModeValues)[number];
|
|
2044
|
+
/** @public */
|
|
2045
|
+
export declare const HorizontalContentFillAlignmentValues: readonly [
|
|
2046
|
+
"Left",
|
|
2047
|
+
"Center",
|
|
2048
|
+
"Right"
|
|
2049
|
+
];
|
|
2050
|
+
/** @public */
|
|
2051
|
+
type HorizontalContentFillAlignment$1 = (typeof HorizontalContentFillAlignmentValues)[number];
|
|
2052
|
+
/** @public */
|
|
2053
|
+
export declare const ContentFillModeValues: readonly [
|
|
2054
|
+
"Crop",
|
|
2055
|
+
"Cover",
|
|
2056
|
+
"Contain"
|
|
2057
|
+
];
|
|
2058
|
+
/** @public */
|
|
2059
|
+
export type ContentFillMode = (typeof ContentFillModeValues)[number];
|
|
2060
|
+
/** @public */
|
|
2061
|
+
export declare const VerticalContentFillAlignmentValues: readonly [
|
|
2062
|
+
"Top",
|
|
2063
|
+
"Center",
|
|
2064
|
+
"Bottom"
|
|
2065
|
+
];
|
|
2066
|
+
/** @public */
|
|
2067
|
+
type VerticalContentFillAlignment$1 = (typeof VerticalContentFillAlignmentValues)[number];
|
|
2068
|
+
/** @public */
|
|
2069
|
+
export declare const HeightModeValues: readonly [
|
|
2070
|
+
"Absolute",
|
|
2071
|
+
"Percent",
|
|
2072
|
+
"Auto"
|
|
2073
|
+
];
|
|
2074
|
+
/** @public */
|
|
2075
|
+
export type HeightMode = (typeof HeightModeValues)[number];
|
|
2076
|
+
/** @public */
|
|
2077
|
+
export declare const PositionXModeValues: readonly [
|
|
2078
|
+
"Absolute",
|
|
2079
|
+
"Percent",
|
|
2080
|
+
"Auto"
|
|
2081
|
+
];
|
|
2082
|
+
/** @public */
|
|
2083
|
+
export type PositionXMode = (typeof PositionXModeValues)[number];
|
|
2084
|
+
/** @public */
|
|
2085
|
+
export declare const PositionYModeValues: readonly [
|
|
2086
|
+
"Absolute",
|
|
2087
|
+
"Percent",
|
|
2088
|
+
"Auto"
|
|
2089
|
+
];
|
|
2090
|
+
/** @public */
|
|
2091
|
+
export type PositionYMode = (typeof PositionYModeValues)[number];
|
|
2092
|
+
/** @public */
|
|
2093
|
+
export declare const SceneDesignUnitValues: readonly [
|
|
2094
|
+
"Pixel",
|
|
2095
|
+
"Millimeter",
|
|
2096
|
+
"Inch"
|
|
2097
|
+
];
|
|
2098
|
+
/** @public */
|
|
2099
|
+
type SceneDesignUnit$1 = (typeof SceneDesignUnitValues)[number];
|
|
2100
|
+
/** @public */
|
|
2101
|
+
export declare const SceneFontSizeUnitValues: readonly [
|
|
2102
|
+
"Pixel",
|
|
2103
|
+
"Point"
|
|
2104
|
+
];
|
|
2105
|
+
/** @public */
|
|
2106
|
+
export type SceneFontSizeUnit = (typeof SceneFontSizeUnitValues)[number];
|
|
2107
|
+
/** @public */
|
|
2108
|
+
export declare const SceneLayoutValues: readonly [
|
|
2109
|
+
"Free",
|
|
2110
|
+
"VerticalStack",
|
|
2111
|
+
"HorizontalStack",
|
|
2112
|
+
"DepthStack"
|
|
2113
|
+
];
|
|
2114
|
+
/** @public */
|
|
2115
|
+
type SceneLayout$1 = (typeof SceneLayoutValues)[number];
|
|
2116
|
+
/** @public */
|
|
2117
|
+
export declare const SceneModeValues: readonly [
|
|
2118
|
+
"Design",
|
|
2119
|
+
"Video"
|
|
2120
|
+
];
|
|
2121
|
+
/** @public */
|
|
2122
|
+
type SceneMode$1 = (typeof SceneModeValues)[number];
|
|
2123
|
+
/** @public */
|
|
2124
|
+
export declare const WidthModeValues: readonly [
|
|
2125
|
+
"Absolute",
|
|
2126
|
+
"Percent",
|
|
2127
|
+
"Auto"
|
|
2128
|
+
];
|
|
2129
|
+
/** @public */
|
|
2130
|
+
export type WidthMode = (typeof WidthModeValues)[number];
|
|
2131
|
+
/** @public */
|
|
2132
|
+
export declare const PageGuidesSourceValues: readonly [
|
|
2133
|
+
"Document",
|
|
2134
|
+
"Custom"
|
|
2135
|
+
];
|
|
2136
|
+
/** @public */
|
|
2137
|
+
export type PageGuidesSource = (typeof PageGuidesSourceValues)[number];
|
|
2138
|
+
/** @public */
|
|
2139
|
+
export declare const StrokeCapValues: readonly [
|
|
2140
|
+
"Butt",
|
|
2141
|
+
"Round",
|
|
2142
|
+
"Square"
|
|
2143
|
+
];
|
|
2144
|
+
/** @public */
|
|
2145
|
+
type StrokeCap$1 = (typeof StrokeCapValues)[number];
|
|
2146
|
+
/** @public */
|
|
2147
|
+
export declare const StrokeCornerGeometryValues: readonly [
|
|
2148
|
+
"Bevel",
|
|
2149
|
+
"Miter",
|
|
2150
|
+
"Round"
|
|
2151
|
+
];
|
|
2152
|
+
/** @public */
|
|
2153
|
+
type StrokeCornerGeometry$1 = (typeof StrokeCornerGeometryValues)[number];
|
|
2154
|
+
/** @public */
|
|
2155
|
+
export declare const StrokeDashEndCapValues: readonly [
|
|
2156
|
+
"Butt",
|
|
2157
|
+
"Round",
|
|
2158
|
+
"Square"
|
|
2159
|
+
];
|
|
2160
|
+
/** @public */
|
|
2161
|
+
export type StrokeDashEndCap = (typeof StrokeDashEndCapValues)[number];
|
|
2162
|
+
/** @public */
|
|
2163
|
+
export declare const StrokeDashStartCapValues: readonly [
|
|
2164
|
+
"Butt",
|
|
2165
|
+
"Round",
|
|
2166
|
+
"Square"
|
|
2167
|
+
];
|
|
2168
|
+
/** @public */
|
|
2169
|
+
export type StrokeDashStartCap = (typeof StrokeDashStartCapValues)[number];
|
|
2170
|
+
/** @public */
|
|
2171
|
+
export declare const StrokeEndCapValues: readonly [
|
|
2172
|
+
"Butt",
|
|
2173
|
+
"Round",
|
|
2174
|
+
"Square"
|
|
2175
|
+
];
|
|
2176
|
+
/** @public */
|
|
2177
|
+
export type StrokeEndCap = (typeof StrokeEndCapValues)[number];
|
|
2178
|
+
/** @public */
|
|
2179
|
+
export declare const StrokePositionValues: readonly [
|
|
2180
|
+
"Center",
|
|
2181
|
+
"Inner",
|
|
2182
|
+
"Outer"
|
|
2183
|
+
];
|
|
2184
|
+
/** @public */
|
|
2185
|
+
type StrokePosition$1 = (typeof StrokePositionValues)[number];
|
|
2186
|
+
/** @public */
|
|
2187
|
+
export declare const StrokeStartCapValues: readonly [
|
|
2188
|
+
"Butt",
|
|
2189
|
+
"Round",
|
|
2190
|
+
"Square"
|
|
2191
|
+
];
|
|
2192
|
+
/** @public */
|
|
2193
|
+
export type StrokeStartCap = (typeof StrokeStartCapValues)[number];
|
|
2194
|
+
/** @public */
|
|
2195
|
+
export declare const StrokeStyleValues: readonly [
|
|
2196
|
+
"Dashed",
|
|
2197
|
+
"DashedRound",
|
|
2198
|
+
"Dotted",
|
|
2199
|
+
"LongDashed",
|
|
2200
|
+
"LongDashedRound",
|
|
2201
|
+
"Solid"
|
|
2202
|
+
];
|
|
2203
|
+
/** @public */
|
|
2204
|
+
type StrokeStyle$1 = (typeof StrokeStyleValues)[number];
|
|
2205
|
+
/** @public */
|
|
2206
|
+
export declare const TextHorizontalAlignmentValues: readonly [
|
|
2207
|
+
"Left",
|
|
2208
|
+
"Right",
|
|
2209
|
+
"Center",
|
|
2210
|
+
"Auto"
|
|
2211
|
+
];
|
|
2212
|
+
/** @public */
|
|
2213
|
+
type TextHorizontalAlignment$1 = (typeof TextHorizontalAlignmentValues)[number];
|
|
2214
|
+
/** @public */
|
|
2215
|
+
export declare const TextVerticalAlignmentValues: readonly [
|
|
2216
|
+
"Top",
|
|
2217
|
+
"Bottom",
|
|
2218
|
+
"Center"
|
|
2219
|
+
];
|
|
2220
|
+
/** @public */
|
|
2221
|
+
type TextVerticalAlignment$1 = (typeof TextVerticalAlignmentValues)[number];
|
|
2222
|
+
/** @public */
|
|
2223
|
+
export declare const CutoutTypeValues: readonly [
|
|
2224
|
+
"Solid",
|
|
2225
|
+
"Dashed"
|
|
2226
|
+
];
|
|
2227
|
+
/** @public */
|
|
2228
|
+
type CutoutType$1 = (typeof CutoutTypeValues)[number];
|
|
2229
|
+
/** @public */
|
|
2230
|
+
export declare const CaptionHorizontalAlignmentValues: readonly [
|
|
2231
|
+
"Left",
|
|
2232
|
+
"Right",
|
|
2233
|
+
"Center",
|
|
2234
|
+
"Auto"
|
|
2235
|
+
];
|
|
2236
|
+
/** @public */
|
|
2237
|
+
export type CaptionHorizontalAlignment = (typeof CaptionHorizontalAlignmentValues)[number];
|
|
2238
|
+
/** @public */
|
|
2239
|
+
export declare const CaptionVerticalAlignmentValues: readonly [
|
|
2240
|
+
"Top",
|
|
2241
|
+
"Bottom",
|
|
2242
|
+
"Center"
|
|
2243
|
+
];
|
|
2244
|
+
/** @public */
|
|
2245
|
+
export type CaptionVerticalAlignment = (typeof CaptionVerticalAlignmentValues)[number];
|
|
2246
|
+
/** @public */
|
|
2247
|
+
export declare const AnimationEasingValues: readonly [
|
|
2248
|
+
"Linear",
|
|
2249
|
+
"EaseIn",
|
|
2250
|
+
"EaseOut",
|
|
2251
|
+
"EaseInOut",
|
|
2252
|
+
"EaseInQuart",
|
|
2253
|
+
"EaseOutQuart",
|
|
2254
|
+
"EaseInOutQuart",
|
|
2255
|
+
"EaseInQuint",
|
|
2256
|
+
"EaseOutQuint",
|
|
2257
|
+
"EaseInOutQuint",
|
|
2258
|
+
"EaseInBack",
|
|
2259
|
+
"EaseOutBack",
|
|
2260
|
+
"EaseInOutBack",
|
|
2261
|
+
"EaseInSpring",
|
|
2262
|
+
"EaseOutSpring",
|
|
2263
|
+
"EaseInOutSpring"
|
|
2264
|
+
];
|
|
2265
|
+
/** @public */
|
|
2266
|
+
type AnimationEasing$1 = (typeof AnimationEasingValues)[number];
|
|
2267
|
+
/** @public */
|
|
2268
|
+
export declare const TextAnimationWritingStyleValues: readonly [
|
|
2269
|
+
"Block",
|
|
2270
|
+
"Line",
|
|
2271
|
+
"Character",
|
|
2272
|
+
"Word"
|
|
2273
|
+
];
|
|
2274
|
+
/** @public */
|
|
2275
|
+
export type TextAnimationWritingStyle = (typeof TextAnimationWritingStyleValues)[number];
|
|
2276
|
+
/** @public */
|
|
2277
|
+
export declare const AnimationGrowDirectionValues: readonly [
|
|
2278
|
+
"Horizontal",
|
|
2279
|
+
"Vertical",
|
|
2280
|
+
"All",
|
|
2281
|
+
"TopLeft",
|
|
2282
|
+
"TopRight",
|
|
2283
|
+
"BottomLeft",
|
|
2284
|
+
"BottomRight"
|
|
2285
|
+
];
|
|
2286
|
+
/** @public */
|
|
2287
|
+
export type AnimationGrowDirection = (typeof AnimationGrowDirectionValues)[number];
|
|
2288
|
+
/** @public */
|
|
2289
|
+
export declare const AnimationWipeDirectionValues: readonly [
|
|
2290
|
+
"Up",
|
|
2291
|
+
"Right",
|
|
2292
|
+
"Down",
|
|
2293
|
+
"Left"
|
|
2294
|
+
];
|
|
2295
|
+
/** @public */
|
|
2296
|
+
export type AnimationWipeDirection = (typeof AnimationWipeDirectionValues)[number];
|
|
2297
|
+
/** @public */
|
|
2298
|
+
export declare const AnimationBaselineDirectionValues: readonly [
|
|
2299
|
+
"Up",
|
|
2300
|
+
"Right",
|
|
2301
|
+
"Down",
|
|
2302
|
+
"Left"
|
|
2303
|
+
];
|
|
2304
|
+
/** @public */
|
|
2305
|
+
export type AnimationBaselineDirection = (typeof AnimationBaselineDirectionValues)[number];
|
|
2306
|
+
/** @public */
|
|
2307
|
+
export declare const AnimationSpinDirectionValues: readonly [
|
|
2308
|
+
"Clockwise",
|
|
2309
|
+
"CounterClockwise"
|
|
2310
|
+
];
|
|
2311
|
+
/** @public */
|
|
2312
|
+
export type AnimationSpinDirection = (typeof AnimationSpinDirectionValues)[number];
|
|
2313
|
+
/** @public */
|
|
2314
|
+
export declare const AnimationSpinLoopDirectionValues: readonly [
|
|
2315
|
+
"Clockwise",
|
|
2316
|
+
"CounterClockwise"
|
|
2317
|
+
];
|
|
2318
|
+
/** @public */
|
|
2319
|
+
export type AnimationSpinLoopDirection = (typeof AnimationSpinLoopDirectionValues)[number];
|
|
2320
|
+
/** @public */
|
|
2321
|
+
export declare const AnimationJumpLoopDirectionValues: readonly [
|
|
2322
|
+
"Up",
|
|
2323
|
+
"Right",
|
|
2324
|
+
"Down",
|
|
2325
|
+
"Left"
|
|
2326
|
+
];
|
|
2327
|
+
/** @public */
|
|
2328
|
+
export type AnimationJumpLoopDirection = (typeof AnimationJumpLoopDirectionValues)[number];
|
|
2329
|
+
/** @public */
|
|
2330
|
+
export declare const AnimationTypewriterTextWritingStyleValues: readonly [
|
|
2331
|
+
"Character",
|
|
2332
|
+
"Word"
|
|
2333
|
+
];
|
|
2334
|
+
/** @public */
|
|
2335
|
+
export type AnimationTypewriterTextWritingStyle = (typeof AnimationTypewriterTextWritingStyleValues)[number];
|
|
2336
|
+
/** @public */
|
|
2337
|
+
export declare const AnimationBlockSwipeTextDirectionValues: readonly [
|
|
2338
|
+
"Up",
|
|
2339
|
+
"Right",
|
|
2340
|
+
"Down",
|
|
2341
|
+
"Left"
|
|
2342
|
+
];
|
|
2343
|
+
/** @public */
|
|
2344
|
+
export type AnimationBlockSwipeTextDirection = (typeof AnimationBlockSwipeTextDirectionValues)[number];
|
|
2345
|
+
/** @public */
|
|
2346
|
+
export declare const AnimationMergeTextDirectionValues: readonly [
|
|
2347
|
+
"Right",
|
|
2348
|
+
"Left"
|
|
2349
|
+
];
|
|
2350
|
+
/** @public */
|
|
2351
|
+
export type AnimationMergeTextDirection = (typeof AnimationMergeTextDirectionValues)[number];
|
|
2352
|
+
/** @public */
|
|
2353
|
+
export declare const AnimationKenBurnsDirectionValues: readonly [
|
|
2354
|
+
"Up",
|
|
2355
|
+
"Right",
|
|
2356
|
+
"Down",
|
|
2357
|
+
"Left"
|
|
2358
|
+
];
|
|
2359
|
+
/** @public */
|
|
2360
|
+
export type AnimationKenBurnsDirection = (typeof AnimationKenBurnsDirectionValues)[number];
|
|
2361
|
+
/** @public */
|
|
2362
|
+
export declare const FillPixelStreamOrientationValues: readonly [
|
|
2363
|
+
"Up",
|
|
2364
|
+
"Down",
|
|
2365
|
+
"Left",
|
|
2366
|
+
"Right",
|
|
2367
|
+
"UpMirrored",
|
|
2368
|
+
"DownMirrored",
|
|
2369
|
+
"LeftMirrored",
|
|
2370
|
+
"RightMirrored"
|
|
2371
|
+
];
|
|
2372
|
+
/** @public */
|
|
2373
|
+
export type FillPixelStreamOrientation = (typeof FillPixelStreamOrientationValues)[number];
|
|
2374
|
+
/** @public */
|
|
2375
|
+
export declare const ShapeVectorPathFillRuleValues: readonly [
|
|
2376
|
+
"EvenOdd",
|
|
2377
|
+
"NonZero"
|
|
2378
|
+
];
|
|
2379
|
+
/** @public */
|
|
2380
|
+
export type ShapeVectorPathFillRule = (typeof ShapeVectorPathFillRuleValues)[number];
|
|
2381
|
+
/** @public */
|
|
2382
|
+
export type EnumValues = BlendMode$1 | HorizontalContentFillAlignment$1 | ContentFillMode | VerticalContentFillAlignment$1 | HeightMode | PositionXMode | PositionYMode | SceneDesignUnit$1 | SceneFontSizeUnit | SceneLayout$1 | SceneMode$1 | WidthMode | PageGuidesSource | StrokeCap$1 | StrokeCornerGeometry$1 | StrokeDashEndCap | StrokeDashStartCap | StrokeEndCap | StrokePosition$1 | StrokeStartCap | StrokeStyle$1 | TextHorizontalAlignment$1 | TextVerticalAlignment$1 | CutoutType$1 | CaptionHorizontalAlignment | CaptionVerticalAlignment | AnimationEasing$1 | TextAnimationWritingStyle | AnimationGrowDirection | AnimationWipeDirection | AnimationBaselineDirection | AnimationSpinDirection | AnimationSpinLoopDirection | AnimationJumpLoopDirection | AnimationTypewriterTextWritingStyle | AnimationBlockSwipeTextDirection | AnimationMergeTextDirection | AnimationKenBurnsDirection | FillPixelStreamOrientation | ShapeVectorPathFillRule | (string & {});
|
|
2383
|
+
/** @public */
|
|
2384
|
+
export type BlockEnumType = {
|
|
2385
|
+
"blend/mode": BlendMode$1;
|
|
2386
|
+
"contentFill/horizontalAlignment": HorizontalContentFillAlignment$1;
|
|
2387
|
+
"contentFill/mode": ContentFillMode;
|
|
2388
|
+
"contentFill/verticalAlignment": VerticalContentFillAlignment$1;
|
|
2389
|
+
"height/mode": HeightMode;
|
|
2390
|
+
"position/x/mode": PositionXMode;
|
|
2391
|
+
"position/y/mode": PositionYMode;
|
|
2392
|
+
"scene/designUnit": SceneDesignUnit$1;
|
|
2393
|
+
"scene/fontSizeUnit": SceneFontSizeUnit;
|
|
2394
|
+
"scene/layout": SceneLayout$1;
|
|
2395
|
+
"scene/mode": SceneMode$1;
|
|
2396
|
+
"width/mode": WidthMode;
|
|
2397
|
+
"page/guides/source": PageGuidesSource;
|
|
2398
|
+
"stroke/cap": StrokeCap$1;
|
|
2399
|
+
"stroke/cornerGeometry": StrokeCornerGeometry$1;
|
|
2400
|
+
"stroke/dashEndCap": StrokeDashEndCap;
|
|
2401
|
+
"stroke/dashStartCap": StrokeDashStartCap;
|
|
2402
|
+
"stroke/endCap": StrokeEndCap;
|
|
2403
|
+
"stroke/position": StrokePosition$1;
|
|
2404
|
+
"stroke/startCap": StrokeStartCap;
|
|
2405
|
+
"stroke/style": StrokeStyle$1;
|
|
2406
|
+
"text/horizontalAlignment": TextHorizontalAlignment$1;
|
|
2407
|
+
"text/verticalAlignment": TextVerticalAlignment$1;
|
|
2408
|
+
"cutout/type": CutoutType$1;
|
|
2409
|
+
"caption/horizontalAlignment": CaptionHorizontalAlignment;
|
|
2410
|
+
"caption/verticalAlignment": CaptionVerticalAlignment;
|
|
2411
|
+
animationEasing: AnimationEasing$1;
|
|
2412
|
+
textAnimationWritingStyle: TextAnimationWritingStyle;
|
|
2413
|
+
"animation/grow/direction": AnimationGrowDirection;
|
|
2414
|
+
"animation/wipe/direction": AnimationWipeDirection;
|
|
2415
|
+
"animation/baseline/direction": AnimationBaselineDirection;
|
|
2416
|
+
"animation/spin/direction": AnimationSpinDirection;
|
|
2417
|
+
"animation/spin_loop/direction": AnimationSpinLoopDirection;
|
|
2418
|
+
"animation/jump_loop/direction": AnimationJumpLoopDirection;
|
|
2419
|
+
"animation/typewriter_text/writingStyle": AnimationTypewriterTextWritingStyle;
|
|
2420
|
+
"animation/block_swipe_text/direction": AnimationBlockSwipeTextDirection;
|
|
2421
|
+
"animation/merge_text/direction": AnimationMergeTextDirection;
|
|
2422
|
+
"animation/ken_burns/direction": AnimationKenBurnsDirection;
|
|
2423
|
+
"fill/pixelStream/orientation": FillPixelStreamOrientation;
|
|
2424
|
+
"shape/vector_path/fillRule": ShapeVectorPathFillRule;
|
|
2425
|
+
};
|
|
2426
|
+
/** @public */
|
|
2427
|
+
export type SettingStringPropertyName = "basePath" | "defaultEmojiFontFileUri" | "defaultFontFileUri" | "upload/supportedMimeTypes" | "license" | "web/fetchCredentials" | "page/title/separator" | "page/title/fontFileUri" | "fallbackFontUri" | (string & {});
|
|
2428
|
+
/** @public */
|
|
2429
|
+
export type SettingColorPropertyName = "clearColor" | "handleFillColor" | "highlightColor" | "pageHighlightColor" | "placeholderHighlightColor" | "snappingGuideColor" | "rotationSnappingGuideColor" | "cropOverlayColor" | "textVariableHighlightColor" | "borderOutlineColor" | "progressColor" | "errorStateColor" | "grid/color" | "page/title/color" | "page/marginFillColor" | "page/marginFrameColor" | "page/innerBorderColor" | "page/outerBorderColor" | "colorMaskingSettings/maskColor" | (string & {});
|
|
2430
|
+
/** @public */
|
|
2431
|
+
export type SettingFloatPropertyName = "positionSnappingThreshold" | "rotationSnappingThreshold" | "grid/spacingX" | "grid/spacingY" | "controlGizmo/blockScaleDownLimit" | "listIndentPerLevel" | (string & {});
|
|
2432
|
+
/** @public */
|
|
2433
|
+
export type SettingBoolPropertyName = "doubleClickToCropEnabled" | "showBuildVersion" | "placeholderControls/showButton" | "placeholderControls/showOverlay" | "blockAnimations/enabled" | "playback/showAllBlocks" | "grid/enabled" | "grid/snapEnabled" | "archival/bundleOnlyUsedFontVariants" | "touch/dragStartCanSelect" | "touch/singlePointPanning" | "mouse/enableZoom" | "mouse/enableScroll" | "controlGizmo/showCropHandles" | "controlGizmo/showMoveHandles" | "controlGizmo/dynamicMoveHandleVisibility" | "controlGizmo/showResizeHandles" | "controlGizmo/showScaleHandles" | "controlGizmo/showRotateHandles" | "controlGizmo/showCropScaleHandles" | "page/title/show" | "page/title/showPageTitleTemplate" | "page/title/appendPageName" | "page/title/showOnSinglePage" | "page/title/canEdit" | "page/dimOutOfPageAreas" | "page/allowCropInteraction" | "page/allowResizeInteraction" | "page/restrictResizeInteractionToFixedAspectRatio" | "page/allowRotateInteraction" | "page/allowMoveInteraction" | "page/marqueeSelectOnBodyDrag" | "page/restrictPageSelectionToBorderAndTitle" | "page/moveChildrenWhenCroppingFill" | "page/selectWhenNoBlocksSelected" | "page/highlightWhenCropping" | "page/allowShapeChange" | "page/highlightDropTarget" | "page/reparentBlocksToSceneWhenOutOfPage" | "page/flipDimensionsOn90DegreeCropRotation" | "clampThumbnailTextureSizes" | "useSystemFontFallback" | "forceSystemEmojis" | (string & {});
|
|
2434
|
+
/** @public */
|
|
2435
|
+
export type SettingEnumPropertyName = "touch/pinchAction" | "touch/rotateAction" | "camera/clamping/overshootMode" | "controlGizmo/moveHandleVisibility" | "controlGizmo/resizeHandlesVisibility" | "controlGizmo/scaleHandlesVisibility" | "controlGizmo/rotateHandlesVisibility" | "doubleClickSelectionMode" | "colorPicker/colorMode" | "timeline/trackVisibility" | (string & {});
|
|
2436
|
+
/** @public */
|
|
2437
|
+
export type SettingIntPropertyName = "maxImageSize" | "maxPreviewResolution" | (string & {});
|
|
2438
|
+
/** @public */
|
|
2439
|
+
export declare const TouchPinchActionValues: readonly [
|
|
2440
|
+
"None",
|
|
2441
|
+
"Zoom",
|
|
2442
|
+
"Scale",
|
|
2443
|
+
"Auto",
|
|
2444
|
+
"Dynamic"
|
|
2445
|
+
];
|
|
2446
|
+
/** @public */
|
|
2447
|
+
export type TouchPinchAction = (typeof TouchPinchActionValues)[number];
|
|
2448
|
+
/** @public */
|
|
2449
|
+
export declare const TouchRotateActionValues: readonly [
|
|
2450
|
+
"None",
|
|
2451
|
+
"Rotate"
|
|
2452
|
+
];
|
|
2453
|
+
/** @public */
|
|
2454
|
+
export type TouchRotateAction = (typeof TouchRotateActionValues)[number];
|
|
2455
|
+
/** @public */
|
|
2456
|
+
export declare const CameraClampingOvershootModeValues: readonly [
|
|
2457
|
+
"Center",
|
|
2458
|
+
"Reverse"
|
|
2459
|
+
];
|
|
2460
|
+
/** @public */
|
|
2461
|
+
export type CameraClampingOvershootMode = (typeof CameraClampingOvershootModeValues)[number];
|
|
2462
|
+
/** @public */
|
|
2463
|
+
export declare const ControlGizmoMoveHandleVisibilityValues: readonly [
|
|
2464
|
+
"auto",
|
|
2465
|
+
"always",
|
|
2466
|
+
"never"
|
|
2467
|
+
];
|
|
2468
|
+
/** @public */
|
|
2469
|
+
export type ControlGizmoMoveHandleVisibility = (typeof ControlGizmoMoveHandleVisibilityValues)[number];
|
|
2470
|
+
/** @public */
|
|
2471
|
+
export declare const ControlGizmoResizeHandlesVisibilityValues: readonly [
|
|
2472
|
+
"auto",
|
|
2473
|
+
"always",
|
|
2474
|
+
"never"
|
|
2475
|
+
];
|
|
2476
|
+
/** @public */
|
|
2477
|
+
export type ControlGizmoResizeHandlesVisibility = (typeof ControlGizmoResizeHandlesVisibilityValues)[number];
|
|
2478
|
+
/** @public */
|
|
2479
|
+
export declare const ControlGizmoScaleHandlesVisibilityValues: readonly [
|
|
2480
|
+
"auto",
|
|
2481
|
+
"always",
|
|
2482
|
+
"never"
|
|
2483
|
+
];
|
|
2484
|
+
/** @public */
|
|
2485
|
+
export type ControlGizmoScaleHandlesVisibility = (typeof ControlGizmoScaleHandlesVisibilityValues)[number];
|
|
2486
|
+
/** @public */
|
|
2487
|
+
export declare const ControlGizmoRotateHandlesVisibilityValues: readonly [
|
|
2488
|
+
"auto",
|
|
2489
|
+
"always",
|
|
2490
|
+
"never"
|
|
2491
|
+
];
|
|
2492
|
+
/** @public */
|
|
2493
|
+
export type ControlGizmoRotateHandlesVisibility = (typeof ControlGizmoRotateHandlesVisibilityValues)[number];
|
|
2494
|
+
/** @public */
|
|
2495
|
+
export declare const DoubleClickSelectionModeValues: readonly [
|
|
2496
|
+
"Direct",
|
|
2497
|
+
"Hierarchical"
|
|
2498
|
+
];
|
|
2499
|
+
/** @public */
|
|
2500
|
+
export type DoubleClickSelectionMode = (typeof DoubleClickSelectionModeValues)[number];
|
|
2501
|
+
/** @public */
|
|
2502
|
+
export declare const ColorPickerColorModeValues: readonly [
|
|
2503
|
+
"RGB",
|
|
2504
|
+
"CMYK",
|
|
2505
|
+
"Any"
|
|
2506
|
+
];
|
|
2507
|
+
/** @public */
|
|
2508
|
+
export type ColorPickerColorMode = (typeof ColorPickerColorModeValues)[number];
|
|
2509
|
+
/** @public */
|
|
2510
|
+
export declare const TimelineTrackVisibilityValues: readonly [
|
|
2511
|
+
"all",
|
|
2512
|
+
"active"
|
|
2513
|
+
];
|
|
2514
|
+
/** @public */
|
|
2515
|
+
export type TimelineTrackVisibility = (typeof TimelineTrackVisibilityValues)[number];
|
|
2516
|
+
/** @public */
|
|
2517
|
+
export type SettingEnumValues = TouchPinchAction | TouchRotateAction | CameraClampingOvershootMode | ControlGizmoMoveHandleVisibility | ControlGizmoResizeHandlesVisibility | ControlGizmoScaleHandlesVisibility | ControlGizmoRotateHandlesVisibility | DoubleClickSelectionMode | ColorPickerColorMode | TimelineTrackVisibility | (string & {});
|
|
2518
|
+
/** @public */
|
|
2519
|
+
export type SettingEnumType = {
|
|
2520
|
+
"touch/pinchAction": TouchPinchAction;
|
|
2521
|
+
"touch/rotateAction": TouchRotateAction;
|
|
2522
|
+
"camera/clamping/overshootMode": CameraClampingOvershootMode;
|
|
2523
|
+
"controlGizmo/moveHandleVisibility": ControlGizmoMoveHandleVisibility;
|
|
2524
|
+
"controlGizmo/resizeHandlesVisibility": ControlGizmoResizeHandlesVisibility;
|
|
2525
|
+
"controlGizmo/scaleHandlesVisibility": ControlGizmoScaleHandlesVisibility;
|
|
2526
|
+
"controlGizmo/rotateHandlesVisibility": ControlGizmoRotateHandlesVisibility;
|
|
2527
|
+
doubleClickSelectionMode: DoubleClickSelectionMode;
|
|
2528
|
+
"colorPicker/colorMode": ColorPickerColorMode;
|
|
2529
|
+
"timeline/trackVisibility": TimelineTrackVisibility;
|
|
2530
|
+
};
|
|
2531
|
+
type Color$1 = RGBAColor$1 | CMYKColor$1 | SpotColor$1;
|
|
2532
|
+
interface RGBColor$1 {
|
|
2533
|
+
/** Red */
|
|
2534
|
+
r: number;
|
|
2535
|
+
/** Green */
|
|
2536
|
+
g: number;
|
|
2537
|
+
/** Blue */
|
|
2538
|
+
b: number;
|
|
2539
|
+
}
|
|
2540
|
+
interface RGBAColor$1 {
|
|
2541
|
+
/** Red */
|
|
2542
|
+
r: number;
|
|
2543
|
+
/** Green */
|
|
2544
|
+
g: number;
|
|
2545
|
+
/** Blue */
|
|
2546
|
+
b: number;
|
|
2547
|
+
/** Alpha */
|
|
2548
|
+
a: number;
|
|
2549
|
+
}
|
|
2550
|
+
interface CMYKColor$1 {
|
|
2551
|
+
/** Cyan */
|
|
2552
|
+
c: number;
|
|
2553
|
+
/** Magenta */
|
|
2554
|
+
m: number;
|
|
2555
|
+
/** Yellow */
|
|
2556
|
+
y: number;
|
|
2557
|
+
/** Black */
|
|
2558
|
+
k: number;
|
|
2559
|
+
/** The tint factor */
|
|
2560
|
+
tint: number;
|
|
2561
|
+
}
|
|
2562
|
+
interface SpotColor$1 {
|
|
2563
|
+
name: string;
|
|
2564
|
+
tint: number;
|
|
2565
|
+
externalReference: string;
|
|
2566
|
+
}
|
|
2567
|
+
interface ColorInternal$1 {
|
|
2568
|
+
colorSpace: ColorInternal$1.ColorSpace;
|
|
2569
|
+
components: {
|
|
2570
|
+
x: number;
|
|
2571
|
+
y: number;
|
|
2572
|
+
z: number;
|
|
2573
|
+
w: number;
|
|
2574
|
+
};
|
|
2575
|
+
spotColorName: string;
|
|
2576
|
+
tint: number;
|
|
2577
|
+
/** The external reference of a spot color, e.g. the name of formula guide it comes from. */
|
|
2578
|
+
externalReference: string;
|
|
2579
|
+
}
|
|
2580
|
+
declare namespace ColorInternal$1 {
|
|
2581
|
+
enum ColorSpace {
|
|
2582
|
+
sRGB = 0,
|
|
2583
|
+
CMYK = 1,
|
|
2584
|
+
SpotColor = 2
|
|
2585
|
+
}
|
|
2586
|
+
function toColor(color: ColorInternal$1): Color$1;
|
|
2587
|
+
function fromColor(color: Color$1): ColorInternal$1;
|
|
2588
|
+
}
|
|
2589
|
+
/**
|
|
2590
|
+
* Map of all available settings with their types.
|
|
2591
|
+
* This provides type-safe access to all editor settings.
|
|
2592
|
+
*
|
|
2593
|
+
* The settings are organized by type:
|
|
2594
|
+
* - Boolean settings control various on/off features in the editor
|
|
2595
|
+
* - String settings configure paths and textual values
|
|
2596
|
+
* - Float settings define numerical thresholds and limits
|
|
2597
|
+
* - Integer settings specify whole number limits
|
|
2598
|
+
* - Color settings control the visual appearance
|
|
2599
|
+
* - Enum settings provide predefined choice options
|
|
2600
|
+
*
|
|
2601
|
+
* @public
|
|
2602
|
+
*/
|
|
2603
|
+
export interface Settings {
|
|
2604
|
+
/** Whether to show handles for adjusting the crop area during crop mode. */
|
|
2605
|
+
"controlGizmo/showCropHandles": boolean;
|
|
2606
|
+
/** Whether to display the outer handles that scale the full image during crop. */
|
|
2607
|
+
"controlGizmo/showCropScaleHandles": boolean;
|
|
2608
|
+
/** @deprecated Use `controlGizmo/moveHandleVisibility`. `false` hides the move handle. */
|
|
2609
|
+
"controlGizmo/showMoveHandles": boolean;
|
|
2610
|
+
/** @deprecated Use `controlGizmo/moveHandleVisibility`. `false` shows the move handle at any block size. */
|
|
2611
|
+
"controlGizmo/dynamicMoveHandleVisibility": boolean;
|
|
2612
|
+
/** @deprecated Use `controlGizmo/resizeHandlesVisibility`. `false` hides the edge (resize) handles. */
|
|
2613
|
+
"controlGizmo/showResizeHandles": boolean;
|
|
2614
|
+
/** @deprecated Use `controlGizmo/rotateHandlesVisibility`. `false` hides the rotation handle. */
|
|
2615
|
+
"controlGizmo/showRotateHandles": boolean;
|
|
2616
|
+
/** @deprecated Use `controlGizmo/scaleHandlesVisibility`. `false` hides the corner (scale) handles. */
|
|
2617
|
+
"controlGizmo/showScaleHandles": boolean;
|
|
2618
|
+
/** Enable double-click to enter crop mode. */
|
|
2619
|
+
doubleClickToCropEnabled: boolean;
|
|
2620
|
+
/** Enable single page mode where only one page is shown at a time. */
|
|
2621
|
+
"features/singlePageModeEnabled": boolean;
|
|
2622
|
+
/** Enable file system usage, that allows the engine to use the file system to store files for local uploads. */
|
|
2623
|
+
"features/fileSystemUsageEnabled": boolean;
|
|
2624
|
+
/** Enable the page carousel for navigating between pages. */
|
|
2625
|
+
"features/pageCarouselEnabled": boolean;
|
|
2626
|
+
/** Whether transform edits should retain the cover mode of the content. */
|
|
2627
|
+
"features/transformEditsRetainCoverMode": boolean;
|
|
2628
|
+
/** Whether auto-sized text blocks should be clamped to page boundaries during editing. */
|
|
2629
|
+
"features/clampTextBlockWidthToPageDimensionsDuringEditing": boolean;
|
|
2630
|
+
/** Whether the engine processes mouse scroll events. */
|
|
2631
|
+
"mouse/enableScroll": boolean;
|
|
2632
|
+
/** Whether the engine processes mouse zoom events. */
|
|
2633
|
+
"mouse/enableZoom": boolean;
|
|
2634
|
+
/** Whether crop interaction (by handles and gestures) should be possible. */
|
|
2635
|
+
"page/allowCropInteraction": boolean;
|
|
2636
|
+
/** Whether move interaction should be possible when page layout is not controlled by the scene. */
|
|
2637
|
+
"page/allowMoveInteraction": boolean;
|
|
2638
|
+
/** When enabled, a click+drag that starts on the page body performs a marquee selection of the blocks
|
|
2639
|
+
* inside the page instead of moving the page. The page can still be moved by dragging its title
|
|
2640
|
+
* (when visible in free layout) or by holding the command key (macOS) / control key (Windows/Linux)
|
|
2641
|
+
* while clicking and dragging on the page body. Has no effect when the page is not movable
|
|
2642
|
+
* (see `page/allowMoveInteraction` and scene layout constraints). */
|
|
2643
|
+
"page/marqueeSelectOnBodyDrag": boolean;
|
|
2644
|
+
/** When enabled, the page can only be selected by clicking on its title (when shown in free layout)
|
|
2645
|
+
* or near its border. Clicks inside the page body no longer select the page; the click falls
|
|
2646
|
+
* through to whatever block sits underneath. Independent of `page/marqueeSelectOnBodyDrag`. */
|
|
2647
|
+
"page/restrictPageSelectionToBorderAndTitle": boolean;
|
|
2648
|
+
/** Whether resize interaction (by handles and gestures) should be possible. */
|
|
2649
|
+
"page/allowResizeInteraction": boolean;
|
|
2650
|
+
/** Whether rotation interaction should be possible when page layout is not controlled by the scene. */
|
|
2651
|
+
"page/allowRotateInteraction": boolean;
|
|
2652
|
+
/** Whether pages support non-rectangular shapes. When false, supportsShape returns false for pages. */
|
|
2653
|
+
"page/allowShapeChange": boolean;
|
|
2654
|
+
/** Whether the opacity of the region outside of all pages should be reduced. */
|
|
2655
|
+
"page/dimOutOfPageAreas": boolean;
|
|
2656
|
+
/** Whether resize interaction should be restricted to fixed aspect ratio. */
|
|
2657
|
+
"page/restrictResizeInteractionToFixedAspectRatio": boolean;
|
|
2658
|
+
/** Whether children of the page should be transformed to match their old position when cropping. */
|
|
2659
|
+
"page/moveChildrenWhenCroppingFill": boolean;
|
|
2660
|
+
/** Whether to append the page name to the title even if not specified in the template. */
|
|
2661
|
+
"page/title/appendPageName": boolean;
|
|
2662
|
+
/** Whether double-clicking a page title enters text edit mode to rename the page. */
|
|
2663
|
+
"page/title/canEdit": boolean;
|
|
2664
|
+
/** Whether to show titles above each page. */
|
|
2665
|
+
"page/title/show": boolean;
|
|
2666
|
+
/** Whether to hide the page title when only a single page exists. */
|
|
2667
|
+
"page/title/showOnSinglePage": boolean;
|
|
2668
|
+
/** Whether to include the default page title from page.titleTemplate. */
|
|
2669
|
+
"page/title/showPageTitleTemplate": boolean;
|
|
2670
|
+
/** Whether to show the placeholder button. */
|
|
2671
|
+
"placeholderControls/showButton": boolean;
|
|
2672
|
+
/** Whether to show the overlay pattern for placeholders. */
|
|
2673
|
+
"placeholderControls/showOverlay": boolean;
|
|
2674
|
+
/** Whether animations should be enabled or not. */
|
|
2675
|
+
"blockAnimations/enabled": boolean;
|
|
2676
|
+
/**
|
|
2677
|
+
* When enabled, every block stays visible regardless of the current playback time, instead of being
|
|
2678
|
+
* culled outside its time offset/duration. No effect on export.
|
|
2679
|
+
*/
|
|
2680
|
+
"playback/showAllBlocks": boolean;
|
|
2681
|
+
/** Whether the background grid is shown on pages. */
|
|
2682
|
+
"grid/enabled": boolean;
|
|
2683
|
+
/** Whether elements should snap to grid lines when dragged. */
|
|
2684
|
+
"grid/snapEnabled": boolean;
|
|
2685
|
+
/** Whether to display the build version in the UI. */
|
|
2686
|
+
showBuildVersion: boolean;
|
|
2687
|
+
/** Whether drag start can select elements. */
|
|
2688
|
+
"touch/dragStartCanSelect": boolean;
|
|
2689
|
+
/** Whether single-point panning is enabled for touch interactions. */
|
|
2690
|
+
"touch/singlePointPanning": boolean;
|
|
2691
|
+
/** Whether to use system font as fallback for missing glyphs. */
|
|
2692
|
+
useSystemFontFallback: boolean;
|
|
2693
|
+
/** Whether to force the use of system emojis instead of custom emoji fonts. */
|
|
2694
|
+
forceSystemEmojis: boolean;
|
|
2695
|
+
/** Whether to select the page when a block is deselected and no other blocks are selected. */
|
|
2696
|
+
"page/selectWhenNoBlocksSelected": boolean;
|
|
2697
|
+
/** Whether highlighting should be automatically enabled on the current page when entering crop mode. */
|
|
2698
|
+
"page/highlightWhenCropping": boolean;
|
|
2699
|
+
/** Whether to highlight the page under a dragged element as a drop target. */
|
|
2700
|
+
"page/highlightDropTarget": boolean;
|
|
2701
|
+
/** Whether blocks should be reparented to the scene when dragged outside all pages,
|
|
2702
|
+
* and reparented back to a page when dragged over one. */
|
|
2703
|
+
"page/reparentBlocksToSceneWhenOutOfPage": boolean;
|
|
2704
|
+
/** Clamp thumbnail texture sizes to the platform's GPU texture limit. */
|
|
2705
|
+
clampThumbnailTextureSizes: boolean;
|
|
2706
|
+
/** Toggle the dock components visibility */
|
|
2707
|
+
"dock/hideLabels": boolean;
|
|
2708
|
+
/** The root directory for resolving relative paths and `bundle://` URIs.
|
|
2709
|
+
* Also used as the base URL for loading font fallback files and the default emoji font (when self-hosting assets).
|
|
2710
|
+
* If empty, defaults to `https://cdn.img.ly/assets/v4` for font/emoji assets. */
|
|
2711
|
+
basePath: string;
|
|
2712
|
+
/** The URI for the default emoji font file. */
|
|
2713
|
+
defaultEmojiFontFileUri: string;
|
|
2714
|
+
/** The URI for the default font file. */
|
|
2715
|
+
defaultFontFileUri: string;
|
|
2716
|
+
/** The license key for the SDK. */
|
|
2717
|
+
license: string;
|
|
2718
|
+
/** The font file URI for page titles. */
|
|
2719
|
+
"page/title/fontFileUri": string;
|
|
2720
|
+
/** The separator between page number and page name in titles. */
|
|
2721
|
+
"page/title/separator": string;
|
|
2722
|
+
/** The URI for the fallback font used when glyphs are missing. */
|
|
2723
|
+
fallbackFontUri: string;
|
|
2724
|
+
/** The supported MIME types for file uploads. */
|
|
2725
|
+
"upload/supportedMimeTypes": string;
|
|
2726
|
+
/**
|
|
2727
|
+
* Web-only: Credentials mode for cross-origin fetch requests.
|
|
2728
|
+
* - "omit": Never send cookies
|
|
2729
|
+
* - "same-origin": Send cookies only for same-origin requests (default)
|
|
2730
|
+
* - "include": Always send cookies, even for cross-origin requests
|
|
2731
|
+
* Note: Only affects web platform. Ignored on native platforms.
|
|
2732
|
+
*/
|
|
2733
|
+
"web/fetchCredentials": "omit" | "same-origin" | "include";
|
|
2734
|
+
/** Scale-down limit for blocks in screen pixels when scaling with gizmos or touch gestures. */
|
|
2735
|
+
"controlGizmo/blockScaleDownLimit": number;
|
|
2736
|
+
/** The width of each list indentation level, in EM units. */
|
|
2737
|
+
listIndentPerLevel: number;
|
|
2738
|
+
/** The threshold distance in pixels for position snapping. */
|
|
2739
|
+
positionSnappingThreshold: number;
|
|
2740
|
+
/** The threshold angle in degrees for rotation snapping. */
|
|
2741
|
+
rotationSnappingThreshold: number;
|
|
2742
|
+
/** Horizontal spacing between vertical grid lines in design units. */
|
|
2743
|
+
"grid/spacingX": number;
|
|
2744
|
+
/** Vertical spacing between horizontal grid lines in design units. */
|
|
2745
|
+
"grid/spacingY": number;
|
|
2746
|
+
/** The maximum size (width or height) in pixels for images. */
|
|
2747
|
+
maxImageSize: number;
|
|
2748
|
+
/** The maximum dimension (width or height) in physical pixels for preview rendering.
|
|
2749
|
+
* When greater than 0, the scene is rendered at reduced resolution and upscaled for improved performance.
|
|
2750
|
+
* Does not affect exports. Set to -1 to disable (default). */
|
|
2751
|
+
maxPreviewResolution: number;
|
|
2752
|
+
/** The color of the border outline for selected elements. */
|
|
2753
|
+
borderOutlineColor: Color$1;
|
|
2754
|
+
/** The background clear color. */
|
|
2755
|
+
clearColor: Color$1;
|
|
2756
|
+
/** The color used for color masking effects. */
|
|
2757
|
+
"colorMaskingSettings/maskColor": Color$1;
|
|
2758
|
+
/** The color of the crop overlay. */
|
|
2759
|
+
cropOverlayColor: Color$1;
|
|
2760
|
+
/** The color indicating an error state. */
|
|
2761
|
+
errorStateColor: Color$1;
|
|
2762
|
+
/** The highlight color for selected or active elements. */
|
|
2763
|
+
highlightColor: Color$1;
|
|
2764
|
+
/** The color of the inner frame around the page. */
|
|
2765
|
+
"page/innerBorderColor": Color$1;
|
|
2766
|
+
/** The color filled into the bleed margins of pages. */
|
|
2767
|
+
"page/marginFillColor": Color$1;
|
|
2768
|
+
/** The color of the frame around the bleed margin area. */
|
|
2769
|
+
"page/marginFrameColor": Color$1;
|
|
2770
|
+
/** The color of the outer frame around the page. */
|
|
2771
|
+
"page/outerBorderColor": Color$1;
|
|
2772
|
+
/** The color of page titles visible in preview mode. */
|
|
2773
|
+
"page/title/color": Color$1;
|
|
2774
|
+
/** Color of the outline of each page */
|
|
2775
|
+
pageHighlightColor: Color$1;
|
|
2776
|
+
/** The highlight color for placeholder elements. */
|
|
2777
|
+
placeholderHighlightColor: Color$1;
|
|
2778
|
+
/** The color indicating progress or loading states. */
|
|
2779
|
+
progressColor: Color$1;
|
|
2780
|
+
/** The color of rotation snapping guide lines. */
|
|
2781
|
+
rotationSnappingGuideColor: Color$1;
|
|
2782
|
+
/** The color of rule of thirds guide lines. */
|
|
2783
|
+
ruleOfThirdsLineColor: Color$1;
|
|
2784
|
+
/** The color of snapping guide lines. */
|
|
2785
|
+
snappingGuideColor: Color$1;
|
|
2786
|
+
/** The highlight color for text variables. */
|
|
2787
|
+
textVariableHighlightColor: Color$1;
|
|
2788
|
+
/** The fill color for handles. */
|
|
2789
|
+
handleFillColor: Color$1;
|
|
2790
|
+
/** Color of the grid lines. */
|
|
2791
|
+
"grid/color": Color$1;
|
|
2792
|
+
/**
|
|
2793
|
+
* When the move handle is shown: 'auto' (by block size), 'always' (even while editing text, not in crop
|
|
2794
|
+
* mode), or 'never'. Replaces deprecated `controlGizmo/showMoveHandles`/`dynamicMoveHandleVisibility`.
|
|
2795
|
+
*/
|
|
2796
|
+
"controlGizmo/moveHandleVisibility": "auto" | "always" | "never";
|
|
2797
|
+
/**
|
|
2798
|
+
* When the edge (resize) handles are shown: 'auto' (default), 'always' (even while editing text, not in
|
|
2799
|
+
* crop mode), or 'never'. Replaces the deprecated `controlGizmo/showResizeHandles`.
|
|
2800
|
+
*/
|
|
2801
|
+
"controlGizmo/resizeHandlesVisibility": "auto" | "always" | "never";
|
|
2802
|
+
/**
|
|
2803
|
+
* When the corner (scale) handles are shown: 'auto' (default), 'always' (even while editing text, not in
|
|
2804
|
+
* crop mode), or 'never'. Replaces the deprecated `controlGizmo/showScaleHandles`.
|
|
2805
|
+
*/
|
|
2806
|
+
"controlGizmo/scaleHandlesVisibility": "auto" | "always" | "never";
|
|
2807
|
+
/**
|
|
2808
|
+
* When the rotation handle is shown: 'auto' (default), 'always' (even while editing text, not in crop
|
|
2809
|
+
* mode), or 'never'. Replaces the deprecated `controlGizmo/showRotateHandles`.
|
|
2810
|
+
*/
|
|
2811
|
+
"controlGizmo/rotateHandlesVisibility": "auto" | "always" | "never";
|
|
2812
|
+
/** The selection mode for double-click: Direct selects the clicked element, Hierarchical traverses the hierarchy. */
|
|
2813
|
+
doubleClickSelectionMode: "Direct" | "Hierarchical";
|
|
2814
|
+
/** The action performed for pinch gestures: None, Zoom, Scale, Auto, or Dynamic. */
|
|
2815
|
+
"touch/pinchAction": "None" | "Zoom" | "Scale" | "Auto" | "Dynamic";
|
|
2816
|
+
/** The action performed for rotate gestures: None or Rotate. */
|
|
2817
|
+
"touch/rotateAction": "None" | "Rotate";
|
|
2818
|
+
/** Controls behavior when clamp area is smaller than viewport: Center or Reverse. */
|
|
2819
|
+
"camera/clamping/overshootMode": "Center" | "Reverse";
|
|
2820
|
+
/** Controls the icon size of the dock components */
|
|
2821
|
+
"dock/iconSize": "normal" | "large";
|
|
2822
|
+
/** Controls the color mode of the color picker. When set to 'RGB' or 'CMYK', only colors matching this mode are fully editable. Defaults to 'Any'. */
|
|
2823
|
+
"colorPicker/colorMode": "RGB" | "CMYK" | "Any";
|
|
2824
|
+
/** Controls which timeline tracks are visible. 'all' shows all tracks, 'active' shows only the track containing the active block. Defaults to 'all'. */
|
|
2825
|
+
"timeline/trackVisibility": "all" | "active";
|
|
2826
|
+
/** @internal Rendering mode: Preview for editing, Export for output, Thumbnail for previews. */
|
|
2827
|
+
renderMode: "Preview" | "Export" | "Thumbnail";
|
|
2828
|
+
/** @internal Whether placeholder elements should always be highlighted in the scene. */
|
|
2829
|
+
alwaysHighlightPlaceholders: boolean;
|
|
2830
|
+
/** @internal Whether to perform a second pass for color masking. */
|
|
2831
|
+
"colorMaskingSettings/secondPass": boolean;
|
|
2832
|
+
/** @internal Whether API calls should throw errors if the corresponding scope doesn't allow the edit. */
|
|
2833
|
+
"debug/enforceScopesInAPIs": boolean;
|
|
2834
|
+
/** @internal Display camera viewport padding debug visualizations (padding areas, boundaries, centers) */
|
|
2835
|
+
"debug/showCameraDebugVisualization": boolean;
|
|
2836
|
+
/** @internal Display the interaction area around the handles. */
|
|
2837
|
+
"debug/showHandlesInteractionArea": boolean;
|
|
2838
|
+
/** @internal Enable colored mipmaps to visualize which mipmap level is being used. */
|
|
2839
|
+
"debug/useDebugMipmaps": boolean;
|
|
2840
|
+
/** @internal Display a debug UI. */
|
|
2841
|
+
"debug/showDebugUI": boolean;
|
|
2842
|
+
/** @internal If this is set to false, ImGui input will not work. */
|
|
2843
|
+
"debug/hookInputSystem": boolean;
|
|
2844
|
+
/** @internal Whether effects are enabled. */
|
|
2845
|
+
"features/effectsEnabled": boolean;
|
|
2846
|
+
/** @internal Whether to use high quality mipmaps. */
|
|
2847
|
+
"features/highQualityMipmaps": boolean;
|
|
2848
|
+
/** @internal Whether implicit updates are enabled. */
|
|
2849
|
+
"features/implicitUpdatesEnabled": boolean;
|
|
2850
|
+
/** @internal Whether templating features are enabled. */
|
|
2851
|
+
"features/templatingEnabled": boolean;
|
|
2852
|
+
/** @internal Whether video support is enabled. */
|
|
2853
|
+
"features/videosEnabled": boolean;
|
|
2854
|
+
/** @internal Whether video captions are enabled. */
|
|
2855
|
+
"features/videoCaptionsEnabled": boolean;
|
|
2856
|
+
/** @internal Force the smallest video source to be used for video previews. */
|
|
2857
|
+
"features/forceLowQualityVideoPreview": boolean;
|
|
2858
|
+
/** @internal Match the thumbnail source to the current fill source. */
|
|
2859
|
+
"features/matchThumbnailSourceToFill": boolean;
|
|
2860
|
+
/** @internal Whether the editor should work in a 16-bit P3 color space. */
|
|
2861
|
+
"features/p3WorkingColorSpace": boolean;
|
|
2862
|
+
/** @internal Remove foreground tracks on scene load. */
|
|
2863
|
+
"features/removeForegroundTracksOnSceneLoad": boolean;
|
|
2864
|
+
/** @internal Enable engine video transcoding. */
|
|
2865
|
+
"features/videoTranscodingEnabled": boolean;
|
|
2866
|
+
/** @internal Enables resize and rotate handles in text edit mode while disabling move. */
|
|
2867
|
+
"features/textEditModeTransformHandlesEnabled": boolean;
|
|
2868
|
+
/** @internal Enable HTTP range-based video streaming for progressive video loading. */
|
|
2869
|
+
"features/videoStreamingEnabled": boolean;
|
|
2870
|
+
/** @internal When loading scenes older than v1.10.0, reorder audio blocks before video blocks for unified timeline. */
|
|
2871
|
+
"features/enforceAudioBeforeVideoBlocks": boolean;
|
|
2872
|
+
/** @internal Whether viewport culling is enabled to skip off-screen pages. */
|
|
2873
|
+
"features/viewportCullingEnabled": boolean;
|
|
2874
|
+
/** @internal Enables automatic list style detection when typing trigger sequences like "* ", "- ", or "1. ". */
|
|
2875
|
+
"features/enableAutomaticEnumerations": boolean;
|
|
2876
|
+
/** @internal Restore pre-1.73 line-gap rendering by disabling the font's line gap metric. */
|
|
2877
|
+
"features/fontLineGapEnabled": boolean;
|
|
2878
|
+
/** @internal Whether to render text cursor and selection in the engine. */
|
|
2879
|
+
renderTextCursorAndSelectionInEngine: boolean;
|
|
2880
|
+
}
|
|
2881
|
+
/**
|
|
2882
|
+
* Union type of all valid setting keys.
|
|
2883
|
+
* @public
|
|
2884
|
+
*/
|
|
2885
|
+
export type SettingKey = keyof Settings;
|
|
2886
|
+
/**
|
|
2887
|
+
* Gets the value type for a specific setting key.
|
|
2888
|
+
* @public
|
|
2889
|
+
*/
|
|
2890
|
+
export type SettingValueType<K extends SettingKey> = Settings[K];
|
|
2891
|
+
declare const DESIGN_BLOCK_TYPES$1: readonly [
|
|
2892
|
+
"scene",
|
|
2893
|
+
"stack",
|
|
2894
|
+
"camera",
|
|
2895
|
+
"page",
|
|
2896
|
+
"graphic",
|
|
2897
|
+
"audio",
|
|
2898
|
+
"text",
|
|
2899
|
+
"group",
|
|
2900
|
+
"cutout",
|
|
2901
|
+
"track",
|
|
2902
|
+
"caption",
|
|
2903
|
+
"captionTrack"
|
|
2904
|
+
];
|
|
2905
|
+
type DesignBlockTypeShorthand$1 = (typeof DESIGN_BLOCK_TYPES$1)[number];
|
|
2906
|
+
type DesignBlockTypeLonghand$1 = `//ly.img.ubq/${DesignBlockTypeShorthand$1}`;
|
|
2907
|
+
declare const SHAPE_TYPES$1: readonly [
|
|
2908
|
+
"rect",
|
|
2909
|
+
"line",
|
|
2910
|
+
"ellipse",
|
|
2911
|
+
"polygon",
|
|
2912
|
+
"star",
|
|
2913
|
+
"vector_path"
|
|
2914
|
+
];
|
|
2915
|
+
type ShapeTypeShorthand$1 = (typeof SHAPE_TYPES$1)[number];
|
|
2916
|
+
type ShapeTypeLonghand$1 = `//ly.img.ubq/shape/${ShapeTypeShorthand$1}`;
|
|
2917
|
+
declare const FILL_TYPES$1: readonly [
|
|
2918
|
+
"color",
|
|
2919
|
+
"gradient/linear",
|
|
2920
|
+
"gradient/radial",
|
|
2921
|
+
"gradient/conical",
|
|
2922
|
+
"image",
|
|
2923
|
+
"video",
|
|
2924
|
+
"pixelStream"
|
|
2925
|
+
];
|
|
2926
|
+
type FillTypeShorthand$1 = (typeof FILL_TYPES$1)[number];
|
|
2927
|
+
type FillTypeLonghand$1 = `//ly.img.ubq/fill/${FillTypeShorthand$1}`;
|
|
2928
|
+
declare const EFFECT_TYPES$1: readonly [
|
|
2929
|
+
"adjustments",
|
|
2930
|
+
"cross_cut",
|
|
2931
|
+
"dot_pattern",
|
|
2932
|
+
"duotone_filter",
|
|
2933
|
+
"extrude_blur",
|
|
2934
|
+
"glow",
|
|
2935
|
+
"green_screen",
|
|
2936
|
+
"half_tone",
|
|
2937
|
+
"linocut",
|
|
2938
|
+
"liquid",
|
|
2939
|
+
"lut_filter",
|
|
2940
|
+
"mirror",
|
|
2941
|
+
"outliner",
|
|
2942
|
+
"pixelize",
|
|
2943
|
+
"posterize",
|
|
2944
|
+
"radial_pixel",
|
|
2945
|
+
"recolor",
|
|
2946
|
+
"sharpie",
|
|
2947
|
+
"shifter",
|
|
2948
|
+
"tilt_shift",
|
|
2949
|
+
"tv_glitch",
|
|
2950
|
+
"vignette"
|
|
2951
|
+
];
|
|
2952
|
+
type EffectTypeShorthand$1 = (typeof EFFECT_TYPES$1)[number];
|
|
2953
|
+
type EffectTypeLonghand$1 = `//ly.img.ubq/effect/${EffectTypeShorthand$1}`;
|
|
2954
|
+
declare const BLUR_TYPES$1: readonly [
|
|
2955
|
+
"uniform",
|
|
2956
|
+
"linear",
|
|
2957
|
+
"mirrored",
|
|
2958
|
+
"radial"
|
|
2959
|
+
];
|
|
2960
|
+
type BlurTypeShorthand$1 = (typeof BLUR_TYPES$1)[number];
|
|
2961
|
+
type BlurTypeLonghand$1 = `//ly.img.ubq/blur/${BlurTypeShorthand$1}`;
|
|
2962
|
+
declare const ANIMATION_TYPES$1: readonly [
|
|
2963
|
+
"slide",
|
|
2964
|
+
"pan",
|
|
2965
|
+
"fade",
|
|
2966
|
+
"blur",
|
|
2967
|
+
"grow",
|
|
2968
|
+
"zoom",
|
|
2969
|
+
"pop",
|
|
2970
|
+
"wipe",
|
|
2971
|
+
"baseline",
|
|
2972
|
+
"crop_zoom",
|
|
2973
|
+
"spin",
|
|
2974
|
+
"spin_loop",
|
|
2975
|
+
"fade_loop",
|
|
2976
|
+
"blur_loop",
|
|
2977
|
+
"pulsating_loop",
|
|
2978
|
+
"breathing_loop",
|
|
2979
|
+
"jump_loop",
|
|
2980
|
+
"squeeze_loop",
|
|
2981
|
+
"sway_loop",
|
|
2982
|
+
"scale_loop",
|
|
2983
|
+
"typewriter_text",
|
|
2984
|
+
"block_swipe_text",
|
|
2985
|
+
"spread_text",
|
|
2986
|
+
"merge_text",
|
|
2987
|
+
"ken_burns"
|
|
2988
|
+
];
|
|
2989
|
+
type AnimationTypeShorthand$1 = (typeof ANIMATION_TYPES$1)[number];
|
|
2990
|
+
type AnimationTypeLonghand$1 = `//ly.img.ubq/animation/${AnimationTypeShorthand$1}`;
|
|
2991
|
+
type ObjectTypeLonghand$1 = DesignBlockTypeLonghand$1 | ShapeTypeLonghand$1 | FillTypeLonghand$1 | EffectTypeLonghand$1 | BlurTypeLonghand$1 | AnimationTypeLonghand$1;
|
|
2992
|
+
interface Vector<T> extends EmscriptenClassHandle {
|
|
2993
|
+
size: () => number;
|
|
2994
|
+
get: (index: number) => T;
|
|
2995
|
+
}
|
|
2996
|
+
type DesignBlockId$1 = number;
|
|
2997
|
+
interface NumberRange {
|
|
2998
|
+
start: number;
|
|
2999
|
+
end: number;
|
|
3000
|
+
}
|
|
3001
|
+
interface Vec2$1 {
|
|
3002
|
+
x: number;
|
|
3003
|
+
y: number;
|
|
3004
|
+
}
|
|
3005
|
+
interface Range$1 {
|
|
3006
|
+
/** The starting value of the range */
|
|
3007
|
+
from: number;
|
|
3008
|
+
/** The non-inclusive ending value of the range */
|
|
3009
|
+
to: number;
|
|
3010
|
+
}
|
|
3011
|
+
interface EmscriptenClassHandle {
|
|
3012
|
+
isAliasOf(other: unknown): boolean;
|
|
3013
|
+
clone(): this;
|
|
3014
|
+
delete(): void;
|
|
3015
|
+
isDeleted(): boolean;
|
|
3016
|
+
}
|
|
3017
|
+
interface UBQError extends EmscriptenClassHandle {
|
|
3018
|
+
message(): string;
|
|
3019
|
+
publicMessage(): string;
|
|
3020
|
+
/** Stable catalog id (e.g. `"SCENE.NOT_VALID"`), or empty string for legacy errors. */
|
|
3021
|
+
id(): string;
|
|
3022
|
+
/** Category prefix (e.g. `"SCENE"`), or empty string when there is no id. */
|
|
3023
|
+
category(): string;
|
|
3024
|
+
/** English developer-facing "what to do next" string, or empty. */
|
|
3025
|
+
hint(): string;
|
|
3026
|
+
/** Docs path-with-hex string from the catalog, or empty. */
|
|
3027
|
+
docs(): string;
|
|
3028
|
+
/** Whether this error is marked silent (suppressed logging). */
|
|
3029
|
+
isSilent(): boolean;
|
|
3030
|
+
/** Typed args map; values are JS `boolean`, `number`, or `string`. */
|
|
3031
|
+
args(): Record<string, boolean | number | string>;
|
|
3032
|
+
}
|
|
3033
|
+
interface UBQResult<T> extends EmscriptenClassHandle {
|
|
3034
|
+
value(): T;
|
|
3035
|
+
error(): UBQError;
|
|
3036
|
+
isValid(): boolean;
|
|
3037
|
+
valueOr(t: T): T;
|
|
3038
|
+
}
|
|
3039
|
+
declare enum MouseWheelDeltaMode {
|
|
3040
|
+
Pixel = 0,
|
|
3041
|
+
Line = 1,
|
|
3042
|
+
Page = 2
|
|
3043
|
+
}
|
|
3044
|
+
interface MouseWheelEvent {
|
|
3045
|
+
position: Vec2$1;
|
|
3046
|
+
timestamp: number;
|
|
3047
|
+
deltaX: number;
|
|
3048
|
+
deltaY: number;
|
|
3049
|
+
deltaMode: MouseWheelDeltaMode;
|
|
3050
|
+
shiftIsHeld: boolean;
|
|
3051
|
+
/**
|
|
3052
|
+
* Ctrl is used for zooming.
|
|
3053
|
+
* Browsers will emit wheel events with ctrl held when using a two-finger
|
|
3054
|
+
* pinch, Meta (CMD) is also considered for pro users who zoom with CMD+Wheel
|
|
3055
|
+
*/
|
|
3056
|
+
ctrlOrMetaIsHeld: boolean;
|
|
3057
|
+
}
|
|
3058
|
+
declare enum NotificationType {
|
|
3059
|
+
Information = 0,
|
|
3060
|
+
Warning = 1,
|
|
3061
|
+
Error = 2
|
|
3062
|
+
}
|
|
3063
|
+
interface TrackingMetadata$1 {
|
|
3064
|
+
apiKey: string;
|
|
3065
|
+
userId: string;
|
|
3066
|
+
deviceId: string;
|
|
3067
|
+
sessionId: string;
|
|
3068
|
+
endpoint: string;
|
|
3069
|
+
}
|
|
3070
|
+
type Locale$1 = string;
|
|
3071
|
+
type Groups$1 = string[];
|
|
3072
|
+
type SortingOrder$1 = "None" | "Ascending" | "Descending";
|
|
3073
|
+
interface Source$1 {
|
|
3074
|
+
uri: string;
|
|
3075
|
+
width: number;
|
|
3076
|
+
height: number;
|
|
3077
|
+
}
|
|
3078
|
+
type AssetMetaData$1 = {
|
|
3079
|
+
/** The mime type of this asset or the data behind the asset's uri. */
|
|
3080
|
+
mimeType?: string;
|
|
3081
|
+
/** The type id of the design block that should be created from this asset. */
|
|
3082
|
+
blockType?: string;
|
|
3083
|
+
fillType?: string;
|
|
3084
|
+
shapeType?: string;
|
|
3085
|
+
kind?: string;
|
|
3086
|
+
uri?: string;
|
|
3087
|
+
thumbUri?: string;
|
|
3088
|
+
previewUri?: string;
|
|
3089
|
+
sourceSet?: Source$1[];
|
|
3090
|
+
filename?: string;
|
|
3091
|
+
vectorPath?: string;
|
|
3092
|
+
width?: number;
|
|
3093
|
+
height?: number;
|
|
3094
|
+
duration?: string;
|
|
3095
|
+
/**
|
|
3096
|
+
* Effect kind hint. Widened to `string` so this metadata stays
|
|
3097
|
+
* cross-binding (the narrow `EffectType` union remains the
|
|
3098
|
+
* source of truth for `BlockAPI.createEffect`).
|
|
3099
|
+
*/
|
|
3100
|
+
effectType?: string;
|
|
3101
|
+
/**
|
|
3102
|
+
* Blur kind hint. Widened to `string` for the same reason as
|
|
3103
|
+
* `effectType` — the narrow `BlurType` union still gates
|
|
3104
|
+
* `BlockAPI.createBlur`.
|
|
3105
|
+
*/
|
|
3106
|
+
blurType?: string;
|
|
3107
|
+
looping?: boolean;
|
|
3108
|
+
} & Record<string, unknown>;
|
|
3109
|
+
interface AssetRGBColor$1 {
|
|
3110
|
+
colorSpace: "sRGB";
|
|
3111
|
+
r: number;
|
|
3112
|
+
g: number;
|
|
3113
|
+
b: number;
|
|
3114
|
+
}
|
|
3115
|
+
interface AssetCMYKColor$1 {
|
|
3116
|
+
colorSpace: "CMYK";
|
|
3117
|
+
c: number;
|
|
3118
|
+
m: number;
|
|
3119
|
+
y: number;
|
|
3120
|
+
k: number;
|
|
3121
|
+
}
|
|
3122
|
+
interface AssetSpotColor$1 {
|
|
3123
|
+
colorSpace: "SpotColor";
|
|
3124
|
+
name: string;
|
|
3125
|
+
externalReference: string;
|
|
3126
|
+
representation: AssetRGBColor$1 | AssetCMYKColor$1;
|
|
3127
|
+
}
|
|
3128
|
+
type AssetColor$1 = AssetRGBColor$1 | AssetCMYKColor$1 | AssetSpotColor$1;
|
|
3129
|
+
interface AssetFixedAspectRatio$1 {
|
|
3130
|
+
type: "FixedAspectRatio";
|
|
3131
|
+
width: number;
|
|
3132
|
+
height: number;
|
|
3133
|
+
}
|
|
3134
|
+
interface AssetFreeAspectRatio$1 {
|
|
3135
|
+
type: "FreeAspectRatio";
|
|
3136
|
+
}
|
|
3137
|
+
interface AssetContentAspectRatio$1 {
|
|
3138
|
+
type: "ContentAspectRatio";
|
|
3139
|
+
}
|
|
3140
|
+
interface AssetFixedSize$1 {
|
|
3141
|
+
type: "FixedSize";
|
|
3142
|
+
width: number;
|
|
3143
|
+
height: number;
|
|
3144
|
+
designUnit: SceneDesignUnit$1;
|
|
3145
|
+
}
|
|
3146
|
+
type AssetTransformPreset$1 = AssetFixedAspectRatio$1 | AssetFreeAspectRatio$1 | AssetContentAspectRatio$1 | AssetFixedSize$1;
|
|
3147
|
+
interface AssetStringProperty$1 {
|
|
3148
|
+
property: string;
|
|
3149
|
+
type: "String";
|
|
3150
|
+
value: string;
|
|
3151
|
+
defaultValue: string;
|
|
3152
|
+
}
|
|
3153
|
+
interface AssetNumberProperty$1 {
|
|
3154
|
+
property: string;
|
|
3155
|
+
type: "Int" | "Float" | "Double";
|
|
3156
|
+
value: number;
|
|
3157
|
+
defaultValue: number;
|
|
3158
|
+
min: number;
|
|
3159
|
+
max: number;
|
|
3160
|
+
step: number;
|
|
3161
|
+
}
|
|
3162
|
+
interface AssetBooleanProperty$1 {
|
|
3163
|
+
property: string;
|
|
3164
|
+
type: "Boolean";
|
|
3165
|
+
value: boolean;
|
|
3166
|
+
defaultValue: boolean;
|
|
3167
|
+
}
|
|
3168
|
+
interface AssetEnumProperty$1 {
|
|
3169
|
+
property: string;
|
|
3170
|
+
type: "Enum";
|
|
3171
|
+
value: string;
|
|
3172
|
+
defaultValue: string;
|
|
3173
|
+
options: string[];
|
|
3174
|
+
}
|
|
3175
|
+
interface AssetColorProperty$1 {
|
|
3176
|
+
property: string;
|
|
3177
|
+
type: "Color";
|
|
3178
|
+
value: Color$1;
|
|
3179
|
+
defaultValue: Color$1;
|
|
3180
|
+
}
|
|
3181
|
+
type AssetProperty$1 = AssetBooleanProperty$1 | AssetColorProperty$1 | AssetEnumProperty$1 | AssetNumberProperty$1 | AssetStringProperty$1;
|
|
3182
|
+
/**
|
|
3183
|
+
* The parameters of an {@link AssetStylePresetAnimation}: a map of the animation's property paths to
|
|
3184
|
+
* values. The animation's `animation/*` properties (e.g. `animation/slide/fade`,
|
|
3185
|
+
* `animation/grow/scaleFactor`) are value-checked and autocomplete, as are the animation controls
|
|
3186
|
+
* (`playback/duration`, `animationEasing`, `textWritingStyle`, `textWritingOverlap`); any other
|
|
3187
|
+
* property path is still accepted. These are animation paths, distinct from the block-property paths
|
|
3188
|
+
* in {@link AssetStylePresetProperties}.
|
|
3189
|
+
* @public
|
|
3190
|
+
*/
|
|
3191
|
+
export type AssetStylePresetAnimationProperties = {
|
|
3192
|
+
[K in Extract<BoolPropertyName, `animation/${string}`>]?: boolean;
|
|
3193
|
+
} & {
|
|
3194
|
+
[K in Extract<EnumPropertyName, `animation/${string}`>]?: string;
|
|
3195
|
+
} & {
|
|
3196
|
+
[K in Extract<FloatPropertyName, `animation/${string}`>]?: number;
|
|
3197
|
+
} & {
|
|
3198
|
+
[K in Extract<ColorPropertyName, `animation/${string}`>]?: RGBColor$1 | RGBAColor$1;
|
|
3199
|
+
} & {
|
|
3200
|
+
/** Animation controls applied outside the `animation/*` properties. */
|
|
3201
|
+
"playback/duration"?: number;
|
|
3202
|
+
animationEasing?: string;
|
|
3203
|
+
textWritingStyle?: string;
|
|
3204
|
+
textWritingOverlap?: number;
|
|
3205
|
+
} & {
|
|
3206
|
+
[path: string]: AssetStylePresetPropertyValue;
|
|
3207
|
+
};
|
|
3208
|
+
/**
|
|
3209
|
+
* An animation slot of an {@link AssetStylePreset} (`inAnimation`, `outAnimation` or `loopAnimation`).
|
|
3210
|
+
* @public
|
|
3211
|
+
*/
|
|
3212
|
+
export interface AssetStylePresetAnimation {
|
|
3213
|
+
/** The animation block type to apply, e.g. `'//ly.img.ubq/animation/slide'`. */
|
|
3214
|
+
type: AnimationTypeLonghand$1;
|
|
3215
|
+
/** Configures the animation as a map of its property paths to values. */
|
|
3216
|
+
properties?: AssetStylePresetAnimationProperties;
|
|
3217
|
+
}
|
|
3218
|
+
/**
|
|
3219
|
+
* A value a style preset can set on a property: a boolean, number, string (including enum values) or
|
|
3220
|
+
* an RGB(A) color. Colors must be RGB(A) (`{ r, g, b, a? }`); CMYK and spot colors are not supported in
|
|
3221
|
+
* presets. Structs and source sets cannot be set from a preset. A `null` value is ignored for regular
|
|
3222
|
+
* properties; for the virtual `text/path` property it clears the baseline path.
|
|
3223
|
+
* @public
|
|
3224
|
+
*/
|
|
3225
|
+
export type AssetStylePresetPropertyValue = boolean | number | string | RGBColor$1 | RGBAColor$1 | null;
|
|
3226
|
+
/**
|
|
3227
|
+
* The look of an {@link AssetStylePreset}: a map of property paths to values. Known paths are
|
|
3228
|
+
* value-checked and autocomplete (e.g. `stroke/enabled` must be a boolean, `stroke/width` a number,
|
|
3229
|
+
* `fill/solid/color` a color); any other property path is still accepted with the broader
|
|
3230
|
+
* {@link AssetStylePresetPropertyValue}. Keys without a `/` are namespaced to the block (`text/` or
|
|
3231
|
+
* `caption/`); keys with a `/` are used verbatim.
|
|
3232
|
+
* @public
|
|
3233
|
+
*/
|
|
3234
|
+
export type AssetStylePresetProperties = {
|
|
3235
|
+
[K in BoolPropertyName as string extends K ? never : K]?: boolean;
|
|
3236
|
+
} & {
|
|
3237
|
+
[K in IntPropertyName as string extends K ? never : K]?: number;
|
|
3238
|
+
} & {
|
|
3239
|
+
[K in FloatPropertyName as string extends K ? never : K]?: number;
|
|
3240
|
+
} & {
|
|
3241
|
+
[K in DoublePropertyName as string extends K ? never : K]?: number;
|
|
3242
|
+
} & {
|
|
3243
|
+
[K in StringPropertyName as string extends K ? never : K]?: string;
|
|
3244
|
+
} & {
|
|
3245
|
+
[K in EnumPropertyName as string extends K ? never : K]?: string;
|
|
3246
|
+
} & {
|
|
3247
|
+
[K in ColorPropertyName as string extends K ? never : K]?: RGBColor$1 | RGBAColor$1;
|
|
3248
|
+
} & {
|
|
3249
|
+
/**
|
|
3250
|
+
* The text-on-path baseline (see `setTextOnPath`): a single-subpath SVG path string in the block's
|
|
3251
|
+
* local coordinate space wraps the block's text on the path and resizes the block to the path's
|
|
3252
|
+
* bounding box; an explicit `null` clears the path and restores normal layout. This is a virtual
|
|
3253
|
+
* preset property — the baseline path is not a reflected block property, so the engine routes it
|
|
3254
|
+
* through `setTextOnPath`, inheriting its validation. Pair it with `text/pathOffset` and
|
|
3255
|
+
* `text/pathFlipped` (plain reflected properties) to fully define the path state. Which curve is
|
|
3256
|
+
* applied is identified by the path value itself — compare `getTextOnPath` against an entry's
|
|
3257
|
+
* `text/path`.
|
|
3258
|
+
*/
|
|
3259
|
+
"text/path"?: string | null;
|
|
3260
|
+
} & {
|
|
3261
|
+
[path: string]: AssetStylePresetPropertyValue;
|
|
3262
|
+
};
|
|
3263
|
+
/**
|
|
3264
|
+
* A length property a style preset may scale with the block's font size (see
|
|
3265
|
+
* {@link AssetStylePreset.scaleWithFontSize}). Restricted to the decoration lengths for which scaling is
|
|
3266
|
+
* meaningful — stroke width, drop-shadow offset/blur and the caption background corner radius — not
|
|
3267
|
+
* arbitrary numeric properties like `rotation` or `opacity`.
|
|
3268
|
+
* @public
|
|
3269
|
+
*/
|
|
3270
|
+
export type AssetStylePresetScalableProperty = "stroke/width" | "dropShadow/offset/x" | "dropShadow/offset/y" | "dropShadow/blurRadius/x" | "dropShadow/blurRadius/y" | "backgroundColor/cornerRadius";
|
|
3271
|
+
/**
|
|
3272
|
+
* A declarative style preset the engine applies to text and caption blocks. The engine parses and
|
|
3273
|
+
* applies it identically on every platform. Lives in {@link AssetPayload.stylePreset}.
|
|
3274
|
+
*
|
|
3275
|
+
* Most of the look is in {@link AssetStylePreset.properties}; the other fields cover the font,
|
|
3276
|
+
* size-relative scaling and animations.
|
|
3277
|
+
* @public
|
|
3278
|
+
*/
|
|
3279
|
+
export interface AssetStylePreset {
|
|
3280
|
+
/**
|
|
3281
|
+
* The block type this preset is for. Used as the type to create when the preset is applied with no
|
|
3282
|
+
* target block, and as the apply filter (it only restyles a block of this type). Omitted applies to any
|
|
3283
|
+
* block. Style presets target text and caption blocks; the value is the longhand id, which the engine
|
|
3284
|
+
* matches against the block's `getType()`.
|
|
3285
|
+
*/
|
|
3286
|
+
blockType?: "//ly.img.ubq/text" | "//ly.img.ubq/caption";
|
|
3287
|
+
/**
|
|
3288
|
+
* How the preset combines with the block's current look. `'replace'` (the default) also clears the
|
|
3289
|
+
* decorations and animations the preset omits, so switching presets never stacks; `'merge'` layers
|
|
3290
|
+
* the preset on top, keeping everything it does not set. Either way the block's text content is never
|
|
3291
|
+
* touched, and its size only changes when the preset asks for it (`fontSize.resizeExistingOnApply`,
|
|
3292
|
+
* or a `text/path` baseline adopting its bounding box).
|
|
3293
|
+
*/
|
|
3294
|
+
mode?: "replace" | "merge";
|
|
3295
|
+
/**
|
|
3296
|
+
* Font to apply. The engine resolves `family` against the registered typefaces and matches
|
|
3297
|
+
* `weight`/`style`. Ignored when the family is empty or not registered.
|
|
3298
|
+
*/
|
|
3299
|
+
typeface?: {
|
|
3300
|
+
family: string;
|
|
3301
|
+
weight?: FontWeight;
|
|
3302
|
+
style?: FontStyle;
|
|
3303
|
+
};
|
|
3304
|
+
/**
|
|
3305
|
+
* Scene-relative font size. `scale` is a unitless multiplier on the scene's base font size (1 = the
|
|
3306
|
+
* base size), sizing a block created from the preset. With `resizeExistingOnApply: true` the same size
|
|
3307
|
+
* also resizes an existing block on apply. For an absolute size, set `properties['text/fontSize']`
|
|
3308
|
+
* instead (it takes precedence).
|
|
3309
|
+
*/
|
|
3310
|
+
fontSize?: {
|
|
3311
|
+
scale: number;
|
|
3312
|
+
resizeExistingOnApply?: boolean;
|
|
3313
|
+
};
|
|
3314
|
+
/**
|
|
3315
|
+
* Lengths that scale with the block's font size. Each entry sets its `property` to `ratio × fontSize`
|
|
3316
|
+
* — e.g. `{ property: 'stroke/width', ratio: 0.012 }` makes the stroke width `0.012 × fontSize`. Keeps
|
|
3317
|
+
* a preset's stroke width, drop-shadow offset/blur, … proportional at any size.
|
|
3318
|
+
*/
|
|
3319
|
+
scaleWithFontSize?: Array<{
|
|
3320
|
+
property: AssetStylePresetScalableProperty;
|
|
3321
|
+
ratio: number;
|
|
3322
|
+
}>;
|
|
3323
|
+
/**
|
|
3324
|
+
* The bulk of the look: typography plus the `fill/*`, `stroke/*`, `dropShadow/*` and
|
|
3325
|
+
* `backgroundColor/*` decorations with their `…/enabled` toggles. Known paths are value-checked and
|
|
3326
|
+
* autocomplete. See {@link AssetStylePresetProperties}.
|
|
3327
|
+
*/
|
|
3328
|
+
properties?: AssetStylePresetProperties;
|
|
3329
|
+
/** Entrance animation. */
|
|
3330
|
+
inAnimation?: AssetStylePresetAnimation;
|
|
3331
|
+
/** Exit animation. */
|
|
3332
|
+
outAnimation?: AssetStylePresetAnimation;
|
|
3333
|
+
/** Looping animation. */
|
|
3334
|
+
loopAnimation?: AssetStylePresetAnimation;
|
|
3335
|
+
}
|
|
3336
|
+
interface AssetPayload$1 {
|
|
3337
|
+
color?: AssetColor$1;
|
|
3338
|
+
sourceSet?: Source$1[];
|
|
3339
|
+
typeface?: Typeface;
|
|
3340
|
+
transformPreset?: AssetTransformPreset$1;
|
|
3341
|
+
properties?: AssetProperty$1[];
|
|
3342
|
+
/** A declarative style preset the engine applies to text/caption blocks. */
|
|
3343
|
+
stylePreset?: AssetStylePreset;
|
|
3344
|
+
}
|
|
3345
|
+
interface Asset$1 {
|
|
3346
|
+
/**
|
|
3347
|
+
* The unique id of this asset.
|
|
3348
|
+
*/
|
|
3349
|
+
id: string;
|
|
3350
|
+
/** Groups of the asset. */
|
|
3351
|
+
groups?: Groups$1;
|
|
3352
|
+
/** Asset-specific and custom meta information */
|
|
3353
|
+
meta?: AssetMetaData$1;
|
|
3354
|
+
/** Structured asset-specific data */
|
|
3355
|
+
payload?: AssetPayload$1;
|
|
3356
|
+
}
|
|
3357
|
+
interface AssetDefinition$1 extends Asset$1 {
|
|
3358
|
+
/**
|
|
3359
|
+
* Label used to display in aria-label and as a tooltip.
|
|
3360
|
+
* Will be also searched in a query and should be localized
|
|
3361
|
+
*/
|
|
3362
|
+
label?: Record<Locale$1, string>;
|
|
3363
|
+
/**
|
|
3364
|
+
* Tags for this asset. Can be used for filtering, but is also useful for
|
|
3365
|
+
* free-text search. Since the label is searched as well as used for tooltips
|
|
3366
|
+
* you do not want to overdo it, but still add things which are searched.
|
|
3367
|
+
* Thus, it should be localized similar to the `label`.
|
|
3368
|
+
*/
|
|
3369
|
+
tags?: Record<Locale$1, string[]>;
|
|
3370
|
+
}
|
|
3371
|
+
interface AssetResult$1 extends Asset$1 {
|
|
3372
|
+
/** The locale of the label and tags */
|
|
3373
|
+
locale?: Locale$1;
|
|
3374
|
+
/** The label of the result. Used for description and tooltips. */
|
|
3375
|
+
label?: string;
|
|
3376
|
+
/** The tags of this asset. Used for filtering and free-text searching. */
|
|
3377
|
+
tags?: string[];
|
|
3378
|
+
/** If the asset is marked as active, i.e., used in a currently selected element. */
|
|
3379
|
+
active?: boolean;
|
|
3380
|
+
/** Credits for the artist of the asset */
|
|
3381
|
+
credits?: {
|
|
3382
|
+
name: string;
|
|
3383
|
+
url?: string;
|
|
3384
|
+
};
|
|
3385
|
+
/** License for this asset. Overwrites the source license if present */
|
|
3386
|
+
license?: {
|
|
3387
|
+
name: string;
|
|
3388
|
+
url?: string;
|
|
3389
|
+
};
|
|
3390
|
+
/** UTM parameters for the links inside the credits */
|
|
3391
|
+
utm?: {
|
|
3392
|
+
source?: string;
|
|
3393
|
+
medium?: string;
|
|
3394
|
+
};
|
|
3395
|
+
}
|
|
3396
|
+
interface CompleteAssetResult$1 extends AssetResult$1 {
|
|
3397
|
+
/**
|
|
3398
|
+
* Context how an asset was added or shall be used in the future.
|
|
3399
|
+
* This is added to all assets coming from the engine.
|
|
3400
|
+
*/
|
|
3401
|
+
context: {
|
|
3402
|
+
sourceId: string;
|
|
3403
|
+
};
|
|
3404
|
+
/** This is optional in `AssetResult` but always present here */
|
|
3405
|
+
active: boolean;
|
|
3406
|
+
}
|
|
3407
|
+
interface AssetsQueryResult$1<T extends AssetResult$1 = AssetResult$1> {
|
|
3408
|
+
/** The assets in the requested page */
|
|
3409
|
+
assets: T[];
|
|
3410
|
+
/** The current, requested page */
|
|
3411
|
+
currentPage: number;
|
|
3412
|
+
/** The next page to query if it exists */
|
|
3413
|
+
nextPage?: number;
|
|
3414
|
+
/** How many assets are there in total for the current query regardless of the page */
|
|
3415
|
+
total: number;
|
|
3416
|
+
}
|
|
3417
|
+
interface AudioTrackInfo$1 {
|
|
3418
|
+
/** The codec string */
|
|
3419
|
+
audioCodec: string;
|
|
3420
|
+
/** The number of audio channels */
|
|
3421
|
+
channels: number;
|
|
3422
|
+
/** The audio sample rate */
|
|
3423
|
+
sampleRate: number;
|
|
3424
|
+
/** Duration of the audio track in seconds */
|
|
3425
|
+
audioDuration: number;
|
|
3426
|
+
/** The number of audio packets (matches the number of encoded chunks) */
|
|
3427
|
+
numAudioPackets: number;
|
|
3428
|
+
/** The number of audio frames */
|
|
3429
|
+
numAudioFrames: number;
|
|
3430
|
+
/** Optional track name/label if available in metadata */
|
|
3431
|
+
trackName: string;
|
|
3432
|
+
/** Track index in the container */
|
|
3433
|
+
trackIndex: number;
|
|
3434
|
+
/** Track language code (ISO 639-2T format: "und", "eng", "deu", etc.) */
|
|
3435
|
+
language: string;
|
|
3436
|
+
}
|
|
3437
|
+
interface FontMetrics$1 {
|
|
3438
|
+
/** The ascender value in font design units. */
|
|
3439
|
+
ascender: number;
|
|
3440
|
+
/** The descender value in font design units (typically negative). */
|
|
3441
|
+
descender: number;
|
|
3442
|
+
/** The number of units per em square (typically 1000 or 2048). */
|
|
3443
|
+
unitsPerEm: number;
|
|
3444
|
+
/** The OS/2 sTypoLineGap value in font design units. */
|
|
3445
|
+
lineGap: number;
|
|
3446
|
+
/** The OS/2 sCapHeight value in font design units. */
|
|
3447
|
+
capHeight: number;
|
|
3448
|
+
/** The OS/2 sxHeight value in font design units. */
|
|
3449
|
+
xHeight: number;
|
|
3450
|
+
/** The post.underlinePosition value in font design units (typically negative). */
|
|
3451
|
+
underlineOffset: number;
|
|
3452
|
+
/** The post.underlineThickness value in font design units. */
|
|
3453
|
+
underlineSize: number;
|
|
3454
|
+
/** The OS/2 yStrikeoutPosition value in font design units. */
|
|
3455
|
+
strikeoutOffset: number;
|
|
3456
|
+
/** The OS/2 yStrikeoutSize value in font design units. */
|
|
3457
|
+
strikeoutSize: number;
|
|
3458
|
+
}
|
|
3459
|
+
type RoleString$1 = "Creator" | "Adopter" | "Viewer" | "Presenter";
|
|
3460
|
+
type Scope$1 = "text/edit" | "text/character" | "fill/change" | "fill/changeType" | "stroke/change" | "shape/change" | "layer/move" | "layer/resize" | "layer/rotate" | "layer/flip" | "layer/crop" | "layer/opacity" | "layer/blendMode" | "layer/visibility" | "layer/clipping" | "appearance/adjustments" | "appearance/filter" | "appearance/effect" | "appearance/blur" | "appearance/shadow" | "appearance/animation" | "lifecycle/destroy" | "lifecycle/duplicate" | "editor/add" | "editor/select";
|
|
3461
|
+
interface Disposable$1 extends EmscriptenClassHandle {
|
|
3462
|
+
dispose(): void;
|
|
3463
|
+
}
|
|
3464
|
+
interface UbiqueEngine extends EmscriptenClassHandle {
|
|
3465
|
+
setErrorCallback(callback: (buffer: string) => void, abortOnError: boolean): void;
|
|
3466
|
+
addEventCallback(eventName: "NotificationEvent", callback: (notification: {
|
|
3467
|
+
type: NotificationType;
|
|
3468
|
+
i18n: string;
|
|
3469
|
+
}) => void): Disposable$1;
|
|
3470
|
+
addEventCallback(event: "DesignBlockAddedEvent" | "DesignBlockUpdatedEvent" | "DesignBlockRemovedEvent", callback: (event: {
|
|
3471
|
+
entity: DesignBlockId$1;
|
|
3472
|
+
typeName: string;
|
|
3473
|
+
}) => void): Disposable$1;
|
|
3474
|
+
addEventCallback(eventName: "HistoryUpdatedEvent", callback: () => void): Disposable$1;
|
|
3475
|
+
/**
|
|
3476
|
+
* Used inside inlineTextEditing for copy/cut handling
|
|
3477
|
+
* @deprecated Needs to be moved to the new API/made sync
|
|
3478
|
+
*/
|
|
3479
|
+
getSelectedText(): UBQResult<string>;
|
|
3480
|
+
/**
|
|
3481
|
+
* Used by
|
|
3482
|
+
* - InspectorTree to determine if there's Crop (show crop or not) (block.hasCrop)
|
|
3483
|
+
* Can be removed whenever. Is just there for illustrative purposes
|
|
3484
|
+
* Can be removed here, the safeguard case never applies
|
|
3485
|
+
* - In PageManager.updateClipContentFromEngine, used to propagate the clipcontent tag around
|
|
3486
|
+
* - replace with block.isClipped
|
|
3487
|
+
* - Facade.getDesignElementFrameOrigin, verify block has Frame before calling getValue. Might not be needed.
|
|
3488
|
+
* - Used in scrolltopage
|
|
3489
|
+
* - Replace with BlockAPI
|
|
3490
|
+
* - Facade.getDesignElementFrameDimensions, verify block has Frame before calling getValue. Might not be needed.
|
|
3491
|
+
* - Used in scrollToPage
|
|
3492
|
+
* - Replace with BlockAPI
|
|
3493
|
+
*
|
|
3494
|
+
* Many of the guards should not be necessary. If we run into them, that means we are masking ab bug due to rendering
|
|
3495
|
+
* the wrong component for the selected block.
|
|
3496
|
+
* @param id - The design block ID
|
|
3497
|
+
* @param componentName - The name of the component to check
|
|
3498
|
+
*/
|
|
3499
|
+
hasComponent(id: DesignBlockId$1, componentName: string): UBQResult<boolean>;
|
|
3500
|
+
getValue<T>(id: DesignBlockId$1, component: string, key: string): UBQResult<T>;
|
|
3501
|
+
setValue<T>(id: DesignBlockId$1, component: string, key: string, value: T): UBQResult<void>;
|
|
3502
|
+
ubqExecute<T>(command: string, args: unknown, callback: ((result: UBQResult<T>) => void) | null): UBQResult<void>;
|
|
3503
|
+
}
|
|
3504
|
+
type URIResolverError = {
|
|
3505
|
+
error: string;
|
|
3506
|
+
};
|
|
3507
|
+
interface TextRunInternal {
|
|
3508
|
+
from: number;
|
|
3509
|
+
to: number;
|
|
3510
|
+
text: string;
|
|
3511
|
+
color: ColorInternal$1;
|
|
3512
|
+
fontWeight: string;
|
|
3513
|
+
fontStyle: string;
|
|
3514
|
+
fontSize: number;
|
|
3515
|
+
textCase: string;
|
|
3516
|
+
typeface: Typeface;
|
|
3517
|
+
resolvedFontFileUri: string;
|
|
3518
|
+
textDecoration: {
|
|
3519
|
+
lines: string[];
|
|
3520
|
+
style?: string;
|
|
3521
|
+
underlineColor?: ColorInternal$1;
|
|
3522
|
+
underlineThickness?: number;
|
|
3523
|
+
underlineOffset?: number;
|
|
3524
|
+
skipInk?: boolean;
|
|
3525
|
+
};
|
|
3526
|
+
kerning: number;
|
|
3527
|
+
}
|
|
3528
|
+
interface UBQExportOptions {
|
|
3529
|
+
jpegQuality: number;
|
|
3530
|
+
webpQuality: number;
|
|
3531
|
+
pngCompressionLevel: number;
|
|
3532
|
+
useTargetSize: boolean;
|
|
3533
|
+
targetWidth: number;
|
|
3534
|
+
targetHeight: number;
|
|
3535
|
+
exportPdfWithHighCompatibility: boolean;
|
|
3536
|
+
exportPdfWithUnderlayer: boolean;
|
|
3537
|
+
underlayerSpotColorName: string;
|
|
3538
|
+
underlayerOffset: number;
|
|
3539
|
+
underlayerRenderRatio: number;
|
|
3540
|
+
underlayerMaxError: number;
|
|
3541
|
+
allowTextOverhang: boolean;
|
|
3542
|
+
exportPdfWithDeviceCMYK: boolean;
|
|
3543
|
+
}
|
|
3544
|
+
interface UBQExportVideoOptions {
|
|
3545
|
+
h264Profile: number;
|
|
3546
|
+
h264Level: number;
|
|
3547
|
+
framerate: number;
|
|
3548
|
+
videoBitrate: number;
|
|
3549
|
+
audioBitrate: number;
|
|
3550
|
+
useTargetSize: boolean;
|
|
3551
|
+
targetWidth: number;
|
|
3552
|
+
targetHeight: number;
|
|
3553
|
+
allowTextOverhang: boolean;
|
|
3554
|
+
}
|
|
3555
|
+
interface UBQExportAudioOptions {
|
|
3556
|
+
sampleRate: number;
|
|
3557
|
+
numberOfChannels: number;
|
|
3558
|
+
skipEncoding?: boolean;
|
|
3559
|
+
}
|
|
3560
|
+
interface UBQSplitOptions {
|
|
3561
|
+
attachToParent: boolean;
|
|
3562
|
+
createParentTrackIfNeeded: boolean;
|
|
3563
|
+
selectNewBlock: boolean;
|
|
3564
|
+
}
|
|
3565
|
+
interface UBQAudioFromVideoOptions {
|
|
3566
|
+
keepTrimSettings: boolean;
|
|
3567
|
+
muteOriginalVideo: boolean;
|
|
3568
|
+
}
|
|
3569
|
+
interface Flip {
|
|
3570
|
+
horizontal: boolean;
|
|
3571
|
+
vertical: boolean;
|
|
3572
|
+
}
|
|
3573
|
+
type RGBA$1 = [
|
|
3574
|
+
r: number,
|
|
3575
|
+
g: number,
|
|
3576
|
+
b: number,
|
|
3577
|
+
a: number
|
|
3578
|
+
];
|
|
3579
|
+
type CMYK$1 = [
|
|
3580
|
+
c: number,
|
|
3581
|
+
m: number,
|
|
3582
|
+
y: number,
|
|
3583
|
+
k: number
|
|
3584
|
+
];
|
|
3585
|
+
type XYWH$1 = [
|
|
3586
|
+
x: number,
|
|
3587
|
+
y: number,
|
|
3588
|
+
w: number,
|
|
3589
|
+
h: number
|
|
3590
|
+
];
|
|
3591
|
+
type EngineGradientColorStop = {
|
|
3592
|
+
color: ColorInternal$1;
|
|
3593
|
+
stop: number;
|
|
3594
|
+
};
|
|
3595
|
+
type Subscription = number;
|
|
3596
|
+
interface Buffer$1 {
|
|
3597
|
+
handle: string;
|
|
3598
|
+
buffer: Uint8Array;
|
|
3599
|
+
}
|
|
3600
|
+
interface TransientResource$1 {
|
|
3601
|
+
URL: string;
|
|
3602
|
+
size: number;
|
|
3603
|
+
}
|
|
3604
|
+
interface BlockEvent$1 {
|
|
3605
|
+
block: DesignBlockId$1;
|
|
3606
|
+
type: "Created" | "Updated" | "Destroyed";
|
|
3607
|
+
}
|
|
3608
|
+
interface BlockStateError$1 {
|
|
3609
|
+
type: "Error";
|
|
3610
|
+
error: "AudioDecoding" | "ImageDecoding" | "FileFetch" | "Unknown" | "VideoDecoding";
|
|
3611
|
+
}
|
|
3612
|
+
interface BlockStatePending$1 {
|
|
3613
|
+
type: "Pending";
|
|
3614
|
+
/** Expected range is [0, 1] */
|
|
3615
|
+
progress: number;
|
|
3616
|
+
}
|
|
3617
|
+
interface BlockStateReady$1 {
|
|
3618
|
+
type: "Ready";
|
|
3619
|
+
}
|
|
3620
|
+
type BlockState$1 = BlockStateError$1 | BlockStatePending$1 | BlockStateReady$1;
|
|
3621
|
+
interface AssetResultCredits {
|
|
3622
|
+
name: string;
|
|
3623
|
+
url: string;
|
|
3624
|
+
}
|
|
3625
|
+
interface AssetResultLicense {
|
|
3626
|
+
name: string;
|
|
3627
|
+
url: string;
|
|
3628
|
+
}
|
|
3629
|
+
interface FindAssetsQuery {
|
|
3630
|
+
perPage: number;
|
|
3631
|
+
page: number;
|
|
3632
|
+
query: string;
|
|
3633
|
+
tags: string[];
|
|
3634
|
+
groups: string[];
|
|
3635
|
+
excludeGroups: string[];
|
|
3636
|
+
locale: string;
|
|
3637
|
+
sortingOrder: SortingOrder$1;
|
|
3638
|
+
sortKey: string;
|
|
3639
|
+
sortActiveFirst: boolean;
|
|
3640
|
+
filter: AssetFilter[];
|
|
3641
|
+
}
|
|
3642
|
+
declare enum CompressionFormat$1 {
|
|
3643
|
+
None = 0,
|
|
3644
|
+
Zstd = 1
|
|
3645
|
+
}
|
|
3646
|
+
declare enum CompressionLevel$1 {
|
|
3647
|
+
Fastest = 0,
|
|
3648
|
+
Default = 1,
|
|
3649
|
+
Best = 2
|
|
3650
|
+
}
|
|
3651
|
+
interface SaveToStringOptions {
|
|
3652
|
+
/**
|
|
3653
|
+
* List of resource URL schemes that are allowed in the serialized scene.
|
|
3654
|
+
* Resources with other schemes will trigger the persistence callback.
|
|
3655
|
+
*/
|
|
3656
|
+
resourceSchemesAllowed?: string[];
|
|
3657
|
+
/**
|
|
3658
|
+
* Optional callback for persisting resources with disallowed schemes.
|
|
3659
|
+
*/
|
|
3660
|
+
persistenceCallback?: (url: string, dataHash: string, persistedCallback?: {
|
|
3661
|
+
invoke(url: string, persistedUrl: string): void;
|
|
3662
|
+
}) => void;
|
|
3663
|
+
/**
|
|
3664
|
+
* Compression options for the serialized scene.
|
|
3665
|
+
* When compression is enabled, base64 encoding is skipped and raw binary data is returned.
|
|
3666
|
+
*/
|
|
3667
|
+
compression?: {
|
|
3668
|
+
/** Compression format (None = no compression, Zstd = zstd compression) */
|
|
3669
|
+
format?: CompressionFormat$1;
|
|
3670
|
+
/** Compression level (Fastest, Default, Best) */
|
|
3671
|
+
level?: CompressionLevel$1;
|
|
3672
|
+
};
|
|
3673
|
+
}
|
|
3674
|
+
interface UBQ extends EmscriptenClassHandle {
|
|
3675
|
+
/** @deprecated The old API should not be used anymore */
|
|
3676
|
+
getInternalAPI(): UbiqueEngine;
|
|
3677
|
+
update(): boolean;
|
|
3678
|
+
setContext(target: string): UBQResult<void>;
|
|
3679
|
+
unlockWithLicense(license: string): UBQResult<void>;
|
|
3680
|
+
startTracking(license: string, userId: string, deviceId: string): void;
|
|
3681
|
+
getTrackingMetadata(): UBQResult<TrackingMetadata$1>;
|
|
3682
|
+
setTrackingMetadata(metadata: TrackingMetadata$1): void;
|
|
3683
|
+
getActiveLicense(): UBQResult<string>;
|
|
3684
|
+
loadSceneFromString(content: string, callback: (result: UBQResult<DesignBlockId$1>) => void, overrideEditorConfig?: boolean, waitForResources?: boolean): void;
|
|
3685
|
+
loadSceneFromURL(url: string, callback: (result: UBQResult<DesignBlockId$1>) => void, overrideEditorConfig?: boolean, waitForResources?: boolean): void;
|
|
3686
|
+
loadSceneFromArchiveURL(url: string, callback: (result: UBQResult<DesignBlockId$1>) => void, overrideEditorConfig?: boolean, waitForResources?: boolean): void;
|
|
3687
|
+
saveSceneToString(scene: DesignBlockId$1, callback: (result: UBQResult<string>) => void, options?: SaveToStringOptions): void;
|
|
3688
|
+
saveSceneToArchive(scene: DesignBlockId$1, callback: (result: Uint8Array | {
|
|
3689
|
+
error: string;
|
|
3690
|
+
}) => void): void;
|
|
3691
|
+
loadBlocksFromString(content: string, callback: (result: UBQResult<Vector<DesignBlockId$1>>) => void): void;
|
|
3692
|
+
loadBlocksFromArchiveURL(url: string, callback: (result: UBQResult<Vector<DesignBlockId$1>>) => void): void;
|
|
3693
|
+
loadBlocksFromURL(url: string, cb: (result: UBQResult<Vector<number>>) => void): void;
|
|
3694
|
+
saveBlocksToString(blocks: DesignBlockId$1[], callback: (result: UBQResult<string>) => void, allowedResourceSchemes: string[], onDisallowedResourceScheme?: (url: string, dataHash: string, onDisallowedResourceSchemeWrapper?: {
|
|
3695
|
+
invoke(url: string, persistedUrl: string): void;
|
|
3696
|
+
}) => void): void;
|
|
3697
|
+
saveBlocksToArchive(blocks: DesignBlockId$1[], callback: (result: Uint8Array | {
|
|
3698
|
+
error: string;
|
|
3699
|
+
}) => void): void;
|
|
3700
|
+
applyTemplateFromString(content: string, callback: (result: UBQResult<void>) => void): void;
|
|
3701
|
+
applyTemplateFromURL(url: string, callback: (result: UBQResult<void>) => void): void;
|
|
3702
|
+
createScene(layout: SceneLayout$1): UBQResult<DesignBlockId$1>;
|
|
3703
|
+
createSceneWithUnits(designUnit: string, fontSizeUnit: string | null | undefined, layout: SceneLayout$1): UBQResult<DesignBlockId$1>;
|
|
3704
|
+
createVideoScene(): UBQResult<DesignBlockId$1>;
|
|
3705
|
+
createSceneFromImage(uri: string, dpi: number, pixelScaleFactor: number, layout: SceneLayout$1, spacing: number, spacingInScreenspace: boolean, callback: (result: UBQResult<DesignBlockId$1>) => void): void;
|
|
3706
|
+
createSceneFromVideo(uri: string, callback: (result: UBQResult<DesignBlockId$1>) => void): void;
|
|
3707
|
+
createCaptionsFromURI(uri: string, callback: (result: UBQResult<Vector<DesignBlockId$1>>) => void): void;
|
|
3708
|
+
exportToBuffer(block: DesignBlockId$1, mimeType: string, callback: (result: Uint8Array | {
|
|
3709
|
+
error: string;
|
|
3710
|
+
}) => void, options: UBQExportOptions): void;
|
|
3711
|
+
getDominantColors(block: DesignBlockId$1, callback: (result: Array<{
|
|
3712
|
+
r: number;
|
|
3713
|
+
g: number;
|
|
3714
|
+
b: number;
|
|
3715
|
+
weight: number;
|
|
3716
|
+
}> | {
|
|
3717
|
+
error: string;
|
|
3718
|
+
}) => void, options: {
|
|
3719
|
+
count: number;
|
|
3720
|
+
ignoreWhite: boolean;
|
|
3721
|
+
}): void;
|
|
3722
|
+
exportWithColorMaskToBuffer(block: DesignBlockId$1, mimeType: string, maskColorR: number, maskColorG: number, maskColorB: number, resultCallback: (imageResult: Uint8Array | {
|
|
3723
|
+
error: string;
|
|
3724
|
+
}, maskResult: Uint8Array | {
|
|
3725
|
+
error: string;
|
|
3726
|
+
}) => void, options: UBQExportOptions): void;
|
|
3727
|
+
exportVideoToBuffer(block: DesignBlockId$1, timeOffset: number, duration: number, mimeType: string, progressCallback: (numberOfRenderedFrames: number, numberOfEncodedFrames: number, totalNumberOfFrames: number) => void, resultCallback: (result: Uint8Array | {
|
|
3728
|
+
error: string;
|
|
3729
|
+
}) => void, options: UBQExportVideoOptions): void;
|
|
3730
|
+
exportAudioToBuffer(block: DesignBlockId$1, timeOffset: number, duration: number, mimeType: string, progressCallback: (numberOfRenderedFrames: number, numberOfEncodedFrames: number, totalNumberOfFrames: number) => void, resultCallback: (result: Uint8Array | {
|
|
3731
|
+
error: string;
|
|
3732
|
+
}) => void, options: UBQExportAudioOptions): void;
|
|
3733
|
+
setZoomLevel(sceneOrCamera: DesignBlockId$1 | null, value: number): UBQResult<void>;
|
|
3734
|
+
getZoomLevel(sceneOrCamera: DesignBlockId$1 | null): UBQResult<number>;
|
|
3735
|
+
zoomToBlock(block: DesignBlockId$1, paddingLeft: number, paddingTop: number, paddingRight: number, paddingBottom: number, callback: (result: UBQResult<void>) => void): void;
|
|
3736
|
+
zoomToBlockWithAnimation(block: DesignBlockId$1, paddingLeft: number, paddingTop: number, paddingRight: number, paddingBottom: number, duration: number, easing: AnimationEasing$1, interruptible: boolean, callback: () => void): void;
|
|
3737
|
+
enableZoomAutoFit(block: DesignBlockId$1, axis: string, paddingLeft: number, paddingTop: number, paddingRight: number, paddingBottom: number): UBQResult<void>;
|
|
3738
|
+
disableZoomAutoFit(blockOrScene: DesignBlockId$1): UBQResult<void>;
|
|
3739
|
+
isZoomAutoFitEnabled(blockOrScene: DesignBlockId$1): UBQResult<boolean>;
|
|
3740
|
+
unstable_enableCameraPositionClamping(blocks: DesignBlockId$1[], paddingLeft: number, paddingTop: number, paddingRight: number, paddingBottom: number, scaledPaddingLeft: number, scaledPaddingTop: number, scaledPaddingRight: number, scaledPaddingBottom: number): UBQResult<void>;
|
|
3741
|
+
unstable_disableCameraPositionClamping(blockOrScene: DesignBlockId$1): UBQResult<void>;
|
|
3742
|
+
unstable_isCameraPositionClampingEnabled(blockOrScene: DesignBlockId$1): UBQResult<boolean>;
|
|
3743
|
+
unstable_enableCameraZoomClamping(blocks: DesignBlockId$1[], minZoomLimit: number, maxZoomLimit: number, paddingLeft: number, paddingTop: number, paddingRight: number, paddingBottom: number): UBQResult<void>;
|
|
3744
|
+
unstable_disableCameraZoomClamping(blockOrScene: DesignBlockId$1): UBQResult<void>;
|
|
3745
|
+
unstable_isCameraZoomClampingEnabled(blockOrScene: DesignBlockId$1): UBQResult<boolean>;
|
|
3746
|
+
subscribeToZoomLevel(callback: () => void): Subscription;
|
|
3747
|
+
subscribeToActiveSceneChange(callback: () => void): Subscription;
|
|
3748
|
+
findAllSpotColors(): Vector<string>;
|
|
3749
|
+
getSpotColorRGB(name: string): RGBA$1;
|
|
3750
|
+
getSpotColorCMYK(name: string): CMYK$1;
|
|
3751
|
+
setSpotColorRGB(name: string, r: number, g: number, b: number): void;
|
|
3752
|
+
setSpotColorCMYK(name: string, c: number, m: number, y: number, k: number): void;
|
|
3753
|
+
removeSpotColor(name: string): UBQResult<void>;
|
|
3754
|
+
getMimeType(uri: string, callback: (result: UBQResult<string>) => void): void;
|
|
3755
|
+
getFontMetrics(fontFileUri: string, callback: (result: UBQResult<FontMetrics$1>) => void): void;
|
|
3756
|
+
findAllTransientResources(): UBQResult<Vector<TransientResource$1>>;
|
|
3757
|
+
findAllMediaURIs(): UBQResult<Vector<string>>;
|
|
3758
|
+
getResourceData(uri: string, chunkSize: number, onData: (result: Uint8Array) => boolean): UBQResult<void>;
|
|
3759
|
+
relocateResource(currentUri: string, relocatedUri: string): UBQResult<void>;
|
|
3760
|
+
forceLoadResources(ids: DesignBlockId$1[], callback: (result: UBQResult<void>) => void): void;
|
|
3761
|
+
setSafeAreaInsets(left: number, top: number, right: number, bottom: number): UBQResult<void>;
|
|
3762
|
+
getSafeAreaInsets(): XYWH$1;
|
|
3763
|
+
create(type: string): UBQResult<DesignBlockId$1>;
|
|
3764
|
+
createFill(type: string): UBQResult<DesignBlockId$1>;
|
|
3765
|
+
getAudioTrackCountFromVideo(videoFillBlock: DesignBlockId$1): UBQResult<number>;
|
|
3766
|
+
getAudioInfoFromVideo(videoFillBlock: DesignBlockId$1): UBQResult<Vector<AudioTrackInfo$1>>;
|
|
3767
|
+
createAudiosFromVideo(videoFillBlock: DesignBlockId$1, options: UBQAudioFromVideoOptions): UBQResult<Vector<DesignBlockId$1>>;
|
|
3768
|
+
createAudioFromVideo(videoFillBlock: DesignBlockId$1, trackIndex: number, options: UBQAudioFromVideoOptions): UBQResult<DesignBlockId$1>;
|
|
3769
|
+
duplicate(block: DesignBlockId$1, attachToParent: boolean): UBQResult<DesignBlockId$1>;
|
|
3770
|
+
destroy(block: DesignBlockId$1): UBQResult<void>;
|
|
3771
|
+
isValid(block: DesignBlockId$1): boolean;
|
|
3772
|
+
findAll(): Vector<DesignBlockId$1>;
|
|
3773
|
+
findAllPlaceholders(): Vector<DesignBlockId$1>;
|
|
3774
|
+
findAllUnused(): Vector<DesignBlockId$1>;
|
|
3775
|
+
findByName(name: string): Vector<DesignBlockId$1>;
|
|
3776
|
+
findByType(type: string): UBQResult<Vector<DesignBlockId$1>>;
|
|
3777
|
+
findByKind(kind: string): UBQResult<Vector<DesignBlockId$1>>;
|
|
3778
|
+
findNearestToViewPortCenterByType(scene: DesignBlockId$1, type: string): UBQResult<Vector<DesignBlockId$1>>;
|
|
3779
|
+
findNearestToViewPortCenterByKind(scene: DesignBlockId$1, kind: string): UBQResult<Vector<DesignBlockId$1>>;
|
|
3780
|
+
getType(block: DesignBlockId$1): UBQResult<ObjectTypeLonghand$1>;
|
|
3781
|
+
getKind(block: DesignBlockId$1): UBQResult<string>;
|
|
3782
|
+
setKind(block: DesignBlockId$1, kind: string): UBQResult<void>;
|
|
3783
|
+
getPages(): UBQResult<Vector<DesignBlockId$1>>;
|
|
3784
|
+
getCurrentPage(scene: DesignBlockId$1): UBQResult<DesignBlockId$1>;
|
|
3785
|
+
subscribeToCarouselPageChange(callback: (page: DesignBlockId$1) => void): Subscription;
|
|
3786
|
+
insertChild(parent: DesignBlockId$1, child: DesignBlockId$1, index: number): UBQResult<void>;
|
|
3787
|
+
appendChild(parent: DesignBlockId$1, child: DesignBlockId$1): UBQResult<void>;
|
|
3788
|
+
hasParent(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3789
|
+
getParent(block: DesignBlockId$1): UBQResult<DesignBlockId$1>;
|
|
3790
|
+
getChildren(block: DesignBlockId$1): UBQResult<Vector<DesignBlockId$1>>;
|
|
3791
|
+
getSceneMode(scene: DesignBlockId$1 | null): UBQResult<SceneMode$1>;
|
|
3792
|
+
setSceneMode(scene: DesignBlockId$1, mode: SceneMode$1): UBQResult<void>;
|
|
3793
|
+
getSceneLayout(scene: DesignBlockId$1): UBQResult<SceneLayout$1>;
|
|
3794
|
+
setSceneLayout(scene: DesignBlockId$1, layout: SceneLayout$1): UBQResult<void>;
|
|
3795
|
+
setDesignUnit(scene: DesignBlockId$1 | null, unit: string): UBQResult<void>;
|
|
3796
|
+
getDesignUnit(scene: DesignBlockId$1 | null): UBQResult<string>;
|
|
3797
|
+
setFontSizeUnit(scene: DesignBlockId$1 | null, unit: string): UBQResult<void>;
|
|
3798
|
+
getFontSizeUnit(scene: DesignBlockId$1 | null): UBQResult<string>;
|
|
3799
|
+
setPositionX(block: DesignBlockId$1, value: number): UBQResult<void>;
|
|
3800
|
+
setPositionXMode(block: DesignBlockId$1, mode: string): UBQResult<void>;
|
|
3801
|
+
setPositionY(block: DesignBlockId$1, value: number): UBQResult<void>;
|
|
3802
|
+
setPositionYMode(block: DesignBlockId$1, mode: string): UBQResult<void>;
|
|
3803
|
+
getPositionX(block: DesignBlockId$1): UBQResult<number>;
|
|
3804
|
+
getPositionXMode(block: DesignBlockId$1): UBQResult<string>;
|
|
3805
|
+
getPositionY(block: DesignBlockId$1): UBQResult<number>;
|
|
3806
|
+
getPositionYMode(block: DesignBlockId$1): UBQResult<string>;
|
|
3807
|
+
setWidth(block: DesignBlockId$1, value: number, maintainCrop?: boolean): UBQResult<void>;
|
|
3808
|
+
setWidthMode(block: DesignBlockId$1, mode: string): UBQResult<void>;
|
|
3809
|
+
setHeight(block: DesignBlockId$1, value: number, maintainCrop?: boolean): UBQResult<void>;
|
|
3810
|
+
setHeightMode(block: DesignBlockId$1, mode: string): UBQResult<void>;
|
|
3811
|
+
getWidth(block: DesignBlockId$1): UBQResult<number>;
|
|
3812
|
+
getWidthMode(block: DesignBlockId$1): UBQResult<string>;
|
|
3813
|
+
getHeight(block: DesignBlockId$1): UBQResult<number>;
|
|
3814
|
+
getHeightMode(block: DesignBlockId$1): UBQResult<string>;
|
|
3815
|
+
bringToFront(block: DesignBlockId$1): UBQResult<void>;
|
|
3816
|
+
sendToBack(block: DesignBlockId$1): UBQResult<void>;
|
|
3817
|
+
bringForward(block: DesignBlockId$1): UBQResult<void>;
|
|
3818
|
+
sendBackward(block: DesignBlockId$1): UBQResult<void>;
|
|
3819
|
+
getLastFrameX(block: DesignBlockId$1): UBQResult<number>;
|
|
3820
|
+
getLastFrameY(block: DesignBlockId$1): UBQResult<number>;
|
|
3821
|
+
getLastFrameWidth(block: DesignBlockId$1): UBQResult<number>;
|
|
3822
|
+
getLastFrameHeight(block: DesignBlockId$1): UBQResult<number>;
|
|
3823
|
+
setRotation(block: DesignBlockId$1, degrees: number): UBQResult<void>;
|
|
3824
|
+
getRotation(block: DesignBlockId$1): UBQResult<number>;
|
|
3825
|
+
setFlipHorizontal(block: DesignBlockId$1, enabled: boolean): UBQResult<void>;
|
|
3826
|
+
setFlipVertical(block: DesignBlockId$1, enabled: boolean): UBQResult<void>;
|
|
3827
|
+
getFlip(block: DesignBlockId$1): UBQResult<Flip>;
|
|
3828
|
+
getGlobalBoundingBoxX(block: DesignBlockId$1): UBQResult<number>;
|
|
3829
|
+
getGlobalBoundingBoxY(block: DesignBlockId$1): UBQResult<number>;
|
|
3830
|
+
getGlobalBoundingBoxWidth(block: DesignBlockId$1): UBQResult<number>;
|
|
3831
|
+
getGlobalBoundingBoxHeight(block: DesignBlockId$1): UBQResult<number>;
|
|
3832
|
+
getScreenSpaceBoundingBoxXYWH(blocks: DesignBlockId$1[]): UBQResult<XYWH$1>;
|
|
3833
|
+
alignHorizontally(blocks: DesignBlockId$1[], horizontalAlignment: string): UBQResult<void>;
|
|
3834
|
+
alignVertically(blocks: DesignBlockId$1[], verticalAlignment: string): UBQResult<void>;
|
|
3835
|
+
isAlignable(blocks: DesignBlockId$1[]): UBQResult<boolean>;
|
|
3836
|
+
distributeHorizontally(blocks: DesignBlockId$1[]): UBQResult<void>;
|
|
3837
|
+
distributeVertically(blocks: DesignBlockId$1[]): UBQResult<void>;
|
|
3838
|
+
isDistributable(blocks: DesignBlockId$1[]): UBQResult<boolean>;
|
|
3839
|
+
setMovementConstraint(targets: (DesignBlockId$1 | string)[], value: number): UBQResult<void>;
|
|
3840
|
+
getMovementConstraint(block: DesignBlockId$1): UBQResult<number>;
|
|
3841
|
+
removeMovementConstraint(targets: (DesignBlockId$1 | string)[]): UBQResult<void>;
|
|
3842
|
+
fillParent(block: DesignBlockId$1): UBQResult<void>;
|
|
3843
|
+
resizeContentAware(blocks: DesignBlockId$1[], width: number, height: number): UBQResult<void>;
|
|
3844
|
+
scale(block: DesignBlockId$1, scale: number, anchorX: number, anchorY: number): UBQResult<void>;
|
|
3845
|
+
createShape(type: string): UBQResult<DesignBlockId$1>;
|
|
3846
|
+
hasShape(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3847
|
+
supportsShape(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3848
|
+
getShape(block: DesignBlockId$1): UBQResult<DesignBlockId$1>;
|
|
3849
|
+
setShape(block: DesignBlockId$1, fill: DesignBlockId$1): UBQResult<void>;
|
|
3850
|
+
setVisible(block: DesignBlockId$1, visible: boolean): UBQResult<void>;
|
|
3851
|
+
isVisible(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3852
|
+
setClipped(block: DesignBlockId$1, clipped: boolean): UBQResult<void>;
|
|
3853
|
+
isClipped(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3854
|
+
setTransformLocked(block: DesignBlockId$1, locked: boolean): UBQResult<void>;
|
|
3855
|
+
isTransformLocked(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3856
|
+
isLineOrigin(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3857
|
+
setHighlightingEnabled(block: DesignBlockId$1, enabled: boolean): UBQResult<void>;
|
|
3858
|
+
isHighlightingEnabled(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3859
|
+
setSelectionEnabled(block: DesignBlockId$1, enabled: boolean): UBQResult<void>;
|
|
3860
|
+
isSelectionEnabled(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3861
|
+
select(block: DesignBlockId$1): UBQResult<void>;
|
|
3862
|
+
setSelected(block: DesignBlockId$1, selected: boolean): UBQResult<void>;
|
|
3863
|
+
isSelected(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3864
|
+
findAllSelected(): Vector<DesignBlockId$1>;
|
|
3865
|
+
subscribeToSelectionChange(callback: () => void): Subscription;
|
|
3866
|
+
subscribeToBlockClicked(callback: (block: DesignBlockId$1) => void): Subscription;
|
|
3867
|
+
findAllProperties(block: DesignBlockId$1): UBQResult<Vector<string>>;
|
|
3868
|
+
getPropertyType(property: string): UBQResult<string>;
|
|
3869
|
+
isPropertyReadable(property: string): boolean;
|
|
3870
|
+
isPropertyWritable(property: string): boolean;
|
|
3871
|
+
getEnumValues(enumProperty: string): UBQResult<Vector<string>>;
|
|
3872
|
+
setBool(block: DesignBlockId$1, property: string, value: boolean): UBQResult<void>;
|
|
3873
|
+
getBool(block: DesignBlockId$1, property: string): UBQResult<boolean>;
|
|
3874
|
+
setInt(block: DesignBlockId$1, property: string, value: number): UBQResult<void>;
|
|
3875
|
+
getInt(block: DesignBlockId$1, property: string): UBQResult<number>;
|
|
3876
|
+
setFloat(block: DesignBlockId$1, property: string, value: number): UBQResult<void>;
|
|
3877
|
+
getFloat(block: DesignBlockId$1, property: string): UBQResult<number>;
|
|
3878
|
+
setDouble(block: DesignBlockId$1, property: string, value: number): UBQResult<void>;
|
|
3879
|
+
getDouble(block: DesignBlockId$1, property: string): UBQResult<number>;
|
|
3880
|
+
setString(block: DesignBlockId$1, property: string, value: string): UBQResult<void>;
|
|
3881
|
+
getString(block: DesignBlockId$1, property: string): UBQResult<string>;
|
|
3882
|
+
setColor(block: DesignBlockId$1, property: string, value: ColorInternal$1): UBQResult<void>;
|
|
3883
|
+
getColor(block: DesignBlockId$1, property: string): UBQResult<ColorInternal$1>;
|
|
3884
|
+
convertColorToColorSpace(color: ColorInternal$1, colorSpace: string): UBQResult<ColorInternal$1>;
|
|
3885
|
+
setColorRGBA(block: DesignBlockId$1, property: string, r: number, g: number, b: number, a: number): UBQResult<void>;
|
|
3886
|
+
getColorRGBA(block: DesignBlockId$1, property: string): UBQResult<RGBA$1>;
|
|
3887
|
+
setColorSpot(block: DesignBlockId$1, property: string, name: string, a: number): UBQResult<void>;
|
|
3888
|
+
getColorSpotName(block: DesignBlockId$1, property: string): UBQResult<string>;
|
|
3889
|
+
getColorSpotTint(block: DesignBlockId$1, property: string): UBQResult<number>;
|
|
3890
|
+
setGradientColorStops(block: DesignBlockId$1, property: string, colors: EngineGradientColorStop[]): UBQResult<void>;
|
|
3891
|
+
getGradientColorStops(block: DesignBlockId$1, property: string): UBQResult<Vector<EngineGradientColorStop>>;
|
|
3892
|
+
setSourceSet(block: DesignBlockId$1, property: string, sourceSet: Source$1[]): UBQResult<void>;
|
|
3893
|
+
getSourceSet(block: DesignBlockId$1, property: string): UBQResult<Vector<Source$1>>;
|
|
3894
|
+
addImageFileURIToSourceSet(block: DesignBlockId$1, property: string, uri: string, callback: (result: UBQResult<void>) => void): UBQResult<void>;
|
|
3895
|
+
addVideoFileURIToSourceSet(block: DesignBlockId$1, property: string, uri: string, callback: (result: UBQResult<void>) => void): UBQResult<void>;
|
|
3896
|
+
setEnum(block: DesignBlockId$1, property: string, value: string): UBQResult<void>;
|
|
3897
|
+
getEnum(block: DesignBlockId$1, property: string): UBQResult<string>;
|
|
3898
|
+
setAlwaysOnTop(block: DesignBlockId$1, enabled: boolean): UBQResult<void>;
|
|
3899
|
+
setAlwaysOnBottom(block: DesignBlockId$1, enabled: boolean): UBQResult<void>;
|
|
3900
|
+
isAlwaysOnTop(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3901
|
+
isAlwaysOnBottom(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3902
|
+
setName(block: DesignBlockId$1, name: string): UBQResult<void>;
|
|
3903
|
+
getName(block: DesignBlockId$1): UBQResult<string>;
|
|
3904
|
+
getUUID(block: DesignBlockId$1): UBQResult<string>;
|
|
3905
|
+
hasContentFillMode(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3906
|
+
supportsContentFillMode(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3907
|
+
setContentFillMode(block: DesignBlockId$1, contentFillMode: string): UBQResult<void>;
|
|
3908
|
+
getContentFillMode(block: DesignBlockId$1): UBQResult<string>;
|
|
3909
|
+
setContentFillHorizontalAlignment(block: DesignBlockId$1, alignment: string): UBQResult<void>;
|
|
3910
|
+
getContentFillHorizontalAlignment(block: DesignBlockId$1): UBQResult<string>;
|
|
3911
|
+
setContentFillVerticalAlignment(block: DesignBlockId$1, alignment: string): UBQResult<void>;
|
|
3912
|
+
getContentFillVerticalAlignment(block: DesignBlockId$1): UBQResult<string>;
|
|
3913
|
+
hasCrop(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3914
|
+
supportsCrop(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3915
|
+
setCropScaleX(block: DesignBlockId$1, scaleX: number): UBQResult<void>;
|
|
3916
|
+
setCropScaleY(block: DesignBlockId$1, scaleY: number): UBQResult<void>;
|
|
3917
|
+
setCropRotation(block: DesignBlockId$1, rotation: number): UBQResult<void>;
|
|
3918
|
+
setCropScaleRatio(block: DesignBlockId$1, scaleRatio: number): UBQResult<void>;
|
|
3919
|
+
setCropTranslationX(block: DesignBlockId$1, translateX: number): UBQResult<void>;
|
|
3920
|
+
setCropTranslationY(block: DesignBlockId$1, translateY: number): UBQResult<void>;
|
|
3921
|
+
resetCrop(block: DesignBlockId$1): UBQResult<void>;
|
|
3922
|
+
getCropScaleX(block: DesignBlockId$1): UBQResult<number>;
|
|
3923
|
+
getCropScaleY(block: DesignBlockId$1): UBQResult<number>;
|
|
3924
|
+
getCropRotation(block: DesignBlockId$1): UBQResult<number>;
|
|
3925
|
+
getCropScaleRatio(block: DesignBlockId$1): UBQResult<number>;
|
|
3926
|
+
getCropTranslationX(block: DesignBlockId$1): UBQResult<number>;
|
|
3927
|
+
getCropTranslationY(block: DesignBlockId$1): UBQResult<number>;
|
|
3928
|
+
flipCropHorizontal(block: DesignBlockId$1): UBQResult<void>;
|
|
3929
|
+
flipCropVertical(block: DesignBlockId$1): UBQResult<void>;
|
|
3930
|
+
isCropAspectRatioLocked(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3931
|
+
setCropAspectRatioLocked(block: DesignBlockId$1, locked: boolean): UBQResult<void>;
|
|
3932
|
+
canRevertToOriginalRatio(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3933
|
+
adjustCropToFillFrame(block: DesignBlockId$1, minScaleRatio: number): UBQResult<number>;
|
|
3934
|
+
hasOpacity(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3935
|
+
supportsOpacity(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3936
|
+
setOpacity(block: DesignBlockId$1, opacity: number): UBQResult<void>;
|
|
3937
|
+
getOpacity(block: DesignBlockId$1): UBQResult<number>;
|
|
3938
|
+
hasBlendMode(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3939
|
+
supportsBlendMode(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3940
|
+
setBlendMode(block: DesignBlockId$1, blendMode: string): UBQResult<void>;
|
|
3941
|
+
getBlendMode(block: DesignBlockId$1): UBQResult<string>;
|
|
3942
|
+
isIncludedInExport(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3943
|
+
setIncludedInExport(block: DesignBlockId$1, enabled: boolean): UBQResult<void>;
|
|
3944
|
+
hasFillColor(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3945
|
+
setFillColorRGBA(block: DesignBlockId$1, r: number, g: number, b: number, a: number): UBQResult<void>;
|
|
3946
|
+
getFillColorRGBA(block: DesignBlockId$1): UBQResult<RGBA$1>;
|
|
3947
|
+
setFillColorEnabled(block: DesignBlockId$1, enabled: boolean): UBQResult<void>;
|
|
3948
|
+
isFillColorEnabled(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3949
|
+
hasBackgroundColor(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3950
|
+
supportsBackgroundColor(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3951
|
+
setBackgroundColorRGBA(block: DesignBlockId$1, r: number, g: number, b: number, a: number): UBQResult<void>;
|
|
3952
|
+
getBackgroundColorRGBA(block: DesignBlockId$1): UBQResult<RGBA$1>;
|
|
3953
|
+
setBackgroundColorEnabled(block: DesignBlockId$1, enabled: boolean): UBQResult<void>;
|
|
3954
|
+
isBackgroundColorEnabled(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3955
|
+
hasStroke(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3956
|
+
supportsStroke(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3957
|
+
setStrokeEnabled(block: DesignBlockId$1, enabled: boolean): UBQResult<void>;
|
|
3958
|
+
isStrokeEnabled(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3959
|
+
setStrokeOverprint(block: DesignBlockId$1, overprint: boolean): UBQResult<void>;
|
|
3960
|
+
getStrokeOverprint(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3961
|
+
setStrokeColorRGBA(block: DesignBlockId$1, r: number, g: number, b: number, a: number): UBQResult<void>;
|
|
3962
|
+
setStrokeColor(block: DesignBlockId$1, color: ColorInternal$1): UBQResult<void>;
|
|
3963
|
+
getStrokeColorRGBA(block: DesignBlockId$1): UBQResult<RGBA$1>;
|
|
3964
|
+
getStrokeColor(block: DesignBlockId$1): UBQResult<ColorInternal$1>;
|
|
3965
|
+
setStrokeWidth(block: DesignBlockId$1, width: number): UBQResult<void>;
|
|
3966
|
+
getStrokeWidth(block: DesignBlockId$1): UBQResult<number>;
|
|
3967
|
+
setStrokeStyle(block: DesignBlockId$1, style: string): UBQResult<void>;
|
|
3968
|
+
getStrokeStyle(block: DesignBlockId$1): UBQResult<string>;
|
|
3969
|
+
setStrokePosition(block: DesignBlockId$1, position: string): UBQResult<void>;
|
|
3970
|
+
getStrokePosition(block: DesignBlockId$1): UBQResult<string>;
|
|
3971
|
+
setStrokeCornerGeometry(block: DesignBlockId$1, cornerGeometry: string): UBQResult<void>;
|
|
3972
|
+
getStrokeCornerGeometry(block: DesignBlockId$1): UBQResult<string>;
|
|
3973
|
+
setStrokeCap(block: DesignBlockId$1, cap: string): UBQResult<void>;
|
|
3974
|
+
getStrokeCap(block: DesignBlockId$1): UBQResult<string>;
|
|
3975
|
+
setStrokeStartCap(block: DesignBlockId$1, cap: string): UBQResult<void>;
|
|
3976
|
+
getStrokeStartCap(block: DesignBlockId$1): UBQResult<string>;
|
|
3977
|
+
setStrokeEndCap(block: DesignBlockId$1, cap: string): UBQResult<void>;
|
|
3978
|
+
getStrokeEndCap(block: DesignBlockId$1): UBQResult<string>;
|
|
3979
|
+
setStrokeDashStartCap(block: DesignBlockId$1, cap: string): UBQResult<void>;
|
|
3980
|
+
getStrokeDashStartCap(block: DesignBlockId$1): UBQResult<string>;
|
|
3981
|
+
setStrokeDashEndCap(block: DesignBlockId$1, cap: string): UBQResult<void>;
|
|
3982
|
+
getStrokeDashEndCap(block: DesignBlockId$1): UBQResult<string>;
|
|
3983
|
+
setStrokeDashArray(block: DesignBlockId$1, dashArray: number[]): UBQResult<void>;
|
|
3984
|
+
getStrokeDashArray(block: DesignBlockId$1): UBQResult<Vector<number>>;
|
|
3985
|
+
setStrokeDashOffset(block: DesignBlockId$1, dashOffset: number): UBQResult<void>;
|
|
3986
|
+
getStrokeDashOffset(block: DesignBlockId$1): UBQResult<number>;
|
|
3987
|
+
hasDropShadow(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3988
|
+
supportsDropShadow(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3989
|
+
setDropShadowEnabled(block: DesignBlockId$1, enabled: boolean): UBQResult<void>;
|
|
3990
|
+
isDropShadowEnabled(block: DesignBlockId$1): UBQResult<boolean>;
|
|
3991
|
+
setDropShadowColorRGBA(block: DesignBlockId$1, r: number, g: number, b: number, a: number): UBQResult<void>;
|
|
3992
|
+
setDropShadowColor(block: DesignBlockId$1, color: ColorInternal$1): UBQResult<void>;
|
|
3993
|
+
getDropShadowColorRGBA(block: DesignBlockId$1): UBQResult<RGBA$1>;
|
|
3994
|
+
getDropShadowColor(block: DesignBlockId$1): UBQResult<ColorInternal$1>;
|
|
3995
|
+
setDropShadowOffsetX(block: DesignBlockId$1, offsetX: number): UBQResult<void>;
|
|
3996
|
+
getDropShadowOffsetX(block: DesignBlockId$1): UBQResult<number>;
|
|
3997
|
+
setDropShadowOffsetY(block: DesignBlockId$1, offsetY: number): UBQResult<void>;
|
|
3998
|
+
getDropShadowOffsetY(block: DesignBlockId$1): UBQResult<number>;
|
|
3999
|
+
setDropShadowBlurRadiusX(block: DesignBlockId$1, blurRadiusX: number): UBQResult<void>;
|
|
4000
|
+
getDropShadowBlurRadiusX(block: DesignBlockId$1): UBQResult<number>;
|
|
4001
|
+
setDropShadowBlurRadiusY(block: DesignBlockId$1, blurRadiusY: number): UBQResult<void>;
|
|
4002
|
+
getDropShadowBlurRadiusY(block: DesignBlockId$1): UBQResult<number>;
|
|
4003
|
+
setDropShadowClip(block: DesignBlockId$1, clip: boolean): UBQResult<void>;
|
|
4004
|
+
getDropShadowClip(block: DesignBlockId$1): UBQResult<boolean>;
|
|
4005
|
+
createCutoutFromBlocks(blocks: DesignBlockId$1[], vectorizeDistanceThreshold: number, simplifyDistanceThreshold: number, useExistingShapeInformation: boolean): UBQResult<DesignBlockId$1>;
|
|
4006
|
+
createCutoutFromPath(path: string): UBQResult<DesignBlockId$1>;
|
|
4007
|
+
setSpotColorForCutoutType(type: string, color: string): UBQResult<void>;
|
|
4008
|
+
getSpotColorForCutoutType(type: string): UBQResult<string>;
|
|
4009
|
+
createCutoutFromOperation(blocks: DesignBlockId$1[], op: string): UBQResult<DesignBlockId$1>;
|
|
4010
|
+
replaceText(block: DesignBlockId$1, text: string, from: number, to: number): UBQResult<void>;
|
|
4011
|
+
removeText(block: DesignBlockId$1, from: number, to: number): UBQResult<void>;
|
|
4012
|
+
setTextColor(block: DesignBlockId$1, color: ColorInternal$1, from: number, to: number): UBQResult<void>;
|
|
4013
|
+
getTextColors(block: DesignBlockId$1, from: number, to: number): UBQResult<Vector<ColorInternal$1>>;
|
|
4014
|
+
setTextFontWeight(block: DesignBlockId$1, weight: FontWeight, from: number, to: number): UBQResult<void>;
|
|
4015
|
+
getTextFontWeights(block: DesignBlockId$1, from: number, to: number): UBQResult<Vector<FontWeight>>;
|
|
4016
|
+
setTextFontSize(block: DesignBlockId$1, fontSize: number, from: number, to: number): UBQResult<void>;
|
|
4017
|
+
setTextFontStyle(block: DesignBlockId$1, style: FontStyle, from: number, to: number): UBQResult<void>;
|
|
4018
|
+
getTextFontSizes(block: DesignBlockId$1, from: number, to: number): UBQResult<Vector<number>>;
|
|
4019
|
+
getTextFontStyles(block: DesignBlockId$1, from: number, to: number): UBQResult<Vector<FontStyle>>;
|
|
4020
|
+
getTextCases(block: DesignBlockId$1, from: number, to: number): UBQResult<Vector<string>>;
|
|
4021
|
+
setTextCase(block: DesignBlockId$1, textCase: string, from: number, to: number): UBQResult<void>;
|
|
4022
|
+
getTextDecorations(block: DesignBlockId$1, from: number, to: number): UBQResult<Vector<object>>;
|
|
4023
|
+
setTextDecoration(block: DesignBlockId$1, config: object, from: number, to: number): UBQResult<void>;
|
|
4024
|
+
setTextKerning(block: DesignBlockId$1, kerning: number, from: number, to: number): UBQResult<void>;
|
|
4025
|
+
getTextKernings(block: DesignBlockId$1, from: number, to: number): UBQResult<Vector<number>>;
|
|
4026
|
+
toggleTextDecorationUnderline(block: DesignBlockId$1, from: number, to: number): UBQResult<void>;
|
|
4027
|
+
toggleTextDecorationStrikethrough(block: DesignBlockId$1, from: number, to: number): UBQResult<void>;
|
|
4028
|
+
toggleTextDecorationOverline(block: DesignBlockId$1, from: number, to: number): UBQResult<void>;
|
|
4029
|
+
getTextHorizontalAlignment(block: DesignBlockId$1, paragraphIndex: number): UBQResult<string | undefined>;
|
|
4030
|
+
setTextHorizontalAlignment(block: DesignBlockId$1, alignment: string | undefined, paragraphIndex: number): UBQResult<void>;
|
|
4031
|
+
getTextListStyle(block: DesignBlockId$1, paragraphIndex: number): UBQResult<string>;
|
|
4032
|
+
setTextListStyle(block: DesignBlockId$1, listStyle: string, paragraphIndex: number, listLevel?: number): UBQResult<void>;
|
|
4033
|
+
getTextListLevel(block: DesignBlockId$1, paragraphIndex: number): UBQResult<number>;
|
|
4034
|
+
setTextListLevel(block: DesignBlockId$1, listLevel: number, paragraphIndex: number): UBQResult<void>;
|
|
4035
|
+
getTextParagraphIndices(block: DesignBlockId$1, from: number, to: number): UBQResult<Vector<number>>;
|
|
4036
|
+
setTextLineHeight(block: DesignBlockId$1, lineHeight: number | null | undefined, paragraphIndex: number): UBQResult<void>;
|
|
4037
|
+
getTextLineHeight(block: DesignBlockId$1, paragraphIndex: number): UBQResult<number>;
|
|
4038
|
+
canToggleBoldFont(block: DesignBlockId$1, from: number, to: number): UBQResult<boolean>;
|
|
4039
|
+
canToggleItalicFont(block: DesignBlockId$1, from: number, to: number): UBQResult<boolean>;
|
|
4040
|
+
toggleBoldFont(block: DesignBlockId$1, from: number, to: number): UBQResult<void>;
|
|
4041
|
+
toggleItalicFont(block: DesignBlockId$1, from: number, to: number): UBQResult<void>;
|
|
4042
|
+
setFont(block: DesignBlockId$1, fontFileUri: string, typeface: Typeface): UBQResult<void>;
|
|
4043
|
+
setTypeface(block: DesignBlockId$1, typeface: Typeface, from: number, to: number): UBQResult<void>;
|
|
4044
|
+
getTypeface(block: DesignBlockId$1): UBQResult<Typeface>;
|
|
4045
|
+
getTypefaces(block: DesignBlockId$1, from: number, to: number): UBQResult<Vector<Typeface>>;
|
|
4046
|
+
getTextRuns(block: DesignBlockId$1, from: number, to: number): UBQResult<Vector<TextRunInternal>>;
|
|
4047
|
+
getTextCursorRange(): UBQResult<Range$1>;
|
|
4048
|
+
setTextCursorRange(range: Range$1): UBQResult<void>;
|
|
4049
|
+
getTextVisibleLineCount(block: DesignBlockId$1): UBQResult<number>;
|
|
4050
|
+
getTextVisibleLineGlobalBoundingBoxXYWH(block: DesignBlockId$1, lineIndex: number): UBQResult<XYWH$1>;
|
|
4051
|
+
getTextVisibleLineContent(block: DesignBlockId$1, lineIndex: number): UBQResult<string>;
|
|
4052
|
+
getTextCharacterInkBoxes(block: DesignBlockId$1, from: number, to: number): UBQResult<Vector<CharacterInkBox>>;
|
|
4053
|
+
getTextEffectiveHorizontalAlignment(block: DesignBlockId$1): UBQResult<string>;
|
|
4054
|
+
setTextOnPath(block: DesignBlockId$1, svgPath: string | null | undefined): UBQResult<void>;
|
|
4055
|
+
getTextOnPath(block: DesignBlockId$1): UBQResult<string | null>;
|
|
4056
|
+
setTextOnPathOffset(block: DesignBlockId$1, offset: number): UBQResult<void>;
|
|
4057
|
+
getTextOnPathOffset(block: DesignBlockId$1): UBQResult<number>;
|
|
4058
|
+
setTextOnPathFlipped(block: DesignBlockId$1, flipped: boolean): UBQResult<void>;
|
|
4059
|
+
getTextOnPathFlipped(block: DesignBlockId$1): UBQResult<boolean>;
|
|
4060
|
+
setPlaceholderEnabled(block: DesignBlockId$1, enabled: boolean): UBQResult<void>;
|
|
4061
|
+
isPlaceholderEnabled(block: DesignBlockId$1): UBQResult<boolean>;
|
|
4062
|
+
hasPlaceholderBehavior(block: DesignBlockId$1): UBQResult<boolean>;
|
|
4063
|
+
supportsPlaceholderBehavior(block: DesignBlockId$1): UBQResult<boolean>;
|
|
4064
|
+
setPlaceholderBehaviorEnabled(block: DesignBlockId$1, enabled: boolean): UBQResult<void>;
|
|
4065
|
+
isPlaceholderBehaviorEnabled(block: DesignBlockId$1): UBQResult<boolean>;
|
|
4066
|
+
hasPlaceholderControls(block: DesignBlockId$1): UBQResult<boolean>;
|
|
4067
|
+
supportsPlaceholderControls(block: DesignBlockId$1): UBQResult<boolean>;
|
|
4068
|
+
setPlaceholderControlsOverlayEnabled(block: DesignBlockId$1, enabled: boolean): UBQResult<void>;
|
|
4069
|
+
isPlaceholderControlsOverlayEnabled(block: DesignBlockId$1): UBQResult<boolean>;
|
|
4070
|
+
setPlaceholderControlsButtonEnabled(block: DesignBlockId$1, enabled: boolean): UBQResult<void>;
|
|
4071
|
+
isPlaceholderControlsButtonEnabled(block: DesignBlockId$1): UBQResult<boolean>;
|
|
4072
|
+
group(blocks: DesignBlockId$1[]): UBQResult<DesignBlockId$1>;
|
|
4073
|
+
ungroup(block: DesignBlockId$1): UBQResult<void>;
|
|
4074
|
+
isGroupable(blocks: DesignBlockId$1[]): UBQResult<boolean>;
|
|
4075
|
+
enterGroup(block: DesignBlockId$1): UBQResult<void>;
|
|
4076
|
+
exitGroup(block: DesignBlockId$1): UBQResult<void>;
|
|
4077
|
+
isCombinable(blocks: DesignBlockId$1[]): UBQResult<boolean>;
|
|
4078
|
+
combine(blocks: DesignBlockId$1[], op: string): UBQResult<DesignBlockId$1>;
|
|
4079
|
+
hasFill(block: DesignBlockId$1): UBQResult<boolean>;
|
|
4080
|
+
supportsFill(block: DesignBlockId$1): UBQResult<boolean>;
|
|
4081
|
+
isFillEnabled(block: DesignBlockId$1): UBQResult<boolean>;
|
|
4082
|
+
setFillEnabled(block: DesignBlockId$1, enabled: boolean): UBQResult<void>;
|
|
4083
|
+
getFillOverprint(block: DesignBlockId$1): UBQResult<boolean>;
|
|
4084
|
+
setFillOverprint(block: DesignBlockId$1, overprint: boolean): UBQResult<void>;
|
|
4085
|
+
getFill(block: DesignBlockId$1): UBQResult<DesignBlockId$1>;
|
|
4086
|
+
setFill(block: DesignBlockId$1, fill: DesignBlockId$1): UBQResult<void>;
|
|
4087
|
+
setFillSolidColor(block: DesignBlockId$1, r: number, b: number, g: number, a: number): UBQResult<void>;
|
|
4088
|
+
getFillSolidColor(block: DesignBlockId$1): UBQResult<RGBA$1>;
|
|
4089
|
+
createEffect(type: string): UBQResult<DesignBlockId$1>;
|
|
4090
|
+
hasEffects(block: DesignBlockId$1): UBQResult<boolean>;
|
|
4091
|
+
supportsEffects(block: DesignBlockId$1): UBQResult<boolean>;
|
|
4092
|
+
getEffects(block: DesignBlockId$1): UBQResult<Vector<DesignBlockId$1>>;
|
|
4093
|
+
insertEffect(block: DesignBlockId$1, effect: DesignBlockId$1, index: number): UBQResult<void>;
|
|
4094
|
+
appendEffect(block: DesignBlockId$1, effect: DesignBlockId$1): UBQResult<void>;
|
|
4095
|
+
removeEffect(block: DesignBlockId$1, index: number): UBQResult<void>;
|
|
4096
|
+
hasEffectEnabled(effect: DesignBlockId$1): UBQResult<boolean>;
|
|
4097
|
+
setEffectEnabled(effect: DesignBlockId$1, enabled: boolean): UBQResult<void>;
|
|
4098
|
+
isEffectEnabled(effect: DesignBlockId$1): UBQResult<boolean>;
|
|
4099
|
+
createBlur(type: string): UBQResult<DesignBlockId$1>;
|
|
4100
|
+
hasBlur(block: DesignBlockId$1): UBQResult<boolean>;
|
|
4101
|
+
supportsBlur(block: DesignBlockId$1): UBQResult<boolean>;
|
|
4102
|
+
setBlur(block: DesignBlockId$1, blur: DesignBlockId$1): UBQResult<void>;
|
|
4103
|
+
getBlur(block: DesignBlockId$1): UBQResult<DesignBlockId$1>;
|
|
4104
|
+
setBlurEnabled(block: DesignBlockId$1, enabled: boolean): UBQResult<void>;
|
|
4105
|
+
isBlurEnabled(block: DesignBlockId$1): UBQResult<boolean>;
|
|
4106
|
+
setMetadata(block: DesignBlockId$1, key: string, value: string): UBQResult<void>;
|
|
4107
|
+
getMetadata(block: DesignBlockId$1, key: string): UBQResult<string>;
|
|
4108
|
+
hasMetadata(block: DesignBlockId$1, key: string): UBQResult<boolean>;
|
|
4109
|
+
removeMetadata(block: DesignBlockId$1, key: string): UBQResult<void>;
|
|
4110
|
+
findAllMetadata(block: DesignBlockId$1): UBQResult<Vector<string>>;
|
|
4111
|
+
setVariableString(name: string, value: string): UBQResult<void>;
|
|
4112
|
+
getVariableString(name: string): UBQResult<string>;
|
|
4113
|
+
findAllVariables(): Vector<string>;
|
|
4114
|
+
removeVariable(name: string): UBQResult<void>;
|
|
4115
|
+
referencesAnyVariables(block: DesignBlockId$1): UBQResult<boolean>;
|
|
4116
|
+
findAllScopes(): Vector<Scope$1>;
|
|
4117
|
+
setGlobalScope(key: Scope$1, value: "Allow" | "Deny" | "Defer"): UBQResult<void>;
|
|
4118
|
+
getGlobalScope(key: Scope$1): UBQResult<"Allow" | "Deny" | "Defer">;
|
|
4119
|
+
setScopeEnabled(block: DesignBlockId$1, key: Scope$1, enabled: boolean): UBQResult<void>;
|
|
4120
|
+
isScopeEnabled(block: DesignBlockId$1, key: Scope$1): UBQResult<boolean>;
|
|
4121
|
+
isAllowedByScope(block: DesignBlockId$1, key: Scope$1): UBQResult<boolean>;
|
|
4122
|
+
hasDuration(id: DesignBlockId$1): UBQResult<boolean>;
|
|
4123
|
+
supportsDuration(id: DesignBlockId$1): UBQResult<boolean>;
|
|
4124
|
+
setDuration(id: DesignBlockId$1, duration: number): UBQResult<void>;
|
|
4125
|
+
getDuration(id: DesignBlockId$1): UBQResult<number>;
|
|
4126
|
+
setPageDurationSource(page: DesignBlockId$1, id: DesignBlockId$1): UBQResult<void>;
|
|
4127
|
+
isPageDurationSource(id: DesignBlockId$1): UBQResult<boolean>;
|
|
4128
|
+
supportsPageDurationSource(page: DesignBlockId$1, id: DesignBlockId$1): UBQResult<boolean>;
|
|
4129
|
+
removePageDurationSource(id: DesignBlockId$1): UBQResult<void>;
|
|
4130
|
+
hasTimeOffset(id: DesignBlockId$1): UBQResult<boolean>;
|
|
4131
|
+
supportsTimeOffset(id: DesignBlockId$1): UBQResult<boolean>;
|
|
4132
|
+
setTimeOffset(id: DesignBlockId$1, offset: number): UBQResult<void>;
|
|
4133
|
+
getTimeOffset(id: DesignBlockId$1): UBQResult<number>;
|
|
4134
|
+
hasTrim(id: DesignBlockId$1): UBQResult<boolean>;
|
|
4135
|
+
supportsTrim(id: DesignBlockId$1): UBQResult<boolean>;
|
|
4136
|
+
setTrimOffset(id: DesignBlockId$1, offset: number): UBQResult<void>;
|
|
4137
|
+
getTrimOffset(id: DesignBlockId$1): UBQResult<number>;
|
|
4138
|
+
setTrimLength(id: DesignBlockId$1, length: number): UBQResult<void>;
|
|
4139
|
+
getTrimLength(id: DesignBlockId$1): UBQResult<number>;
|
|
4140
|
+
split(id: DesignBlockId$1, atTime: number, options: UBQSplitOptions): UBQResult<DesignBlockId$1>;
|
|
4141
|
+
getTotalSceneDuration(block: DesignBlockId$1): UBQResult<number>;
|
|
4142
|
+
setPlaying(id: DesignBlockId$1, enabled: boolean): UBQResult<void>;
|
|
4143
|
+
isPlaying(id: DesignBlockId$1): UBQResult<boolean>;
|
|
4144
|
+
hasPlaybackTime(id: DesignBlockId$1): UBQResult<boolean>;
|
|
4145
|
+
supportsPlaybackTime(id: DesignBlockId$1): UBQResult<boolean>;
|
|
4146
|
+
setPlaybackTime(id: DesignBlockId$1, time: number): UBQResult<void>;
|
|
4147
|
+
getPlaybackTime(id: DesignBlockId$1): UBQResult<number>;
|
|
4148
|
+
isVisibleAtCurrentPlaybackTime(id: DesignBlockId$1): UBQResult<boolean>;
|
|
4149
|
+
setSoloPlaybackEnabled(id: DesignBlockId$1, enabled: Boolean): UBQResult<void>;
|
|
4150
|
+
isSoloPlaybackEnabled(id: DesignBlockId$1): UBQResult<boolean>;
|
|
4151
|
+
hasPlaybackControl(id: DesignBlockId$1): UBQResult<boolean>;
|
|
4152
|
+
supportsPlaybackControl(id: DesignBlockId$1): UBQResult<boolean>;
|
|
4153
|
+
setPlaybackSpeed(id: DesignBlockId$1, speed: number): UBQResult<void>;
|
|
4154
|
+
getPlaybackSpeed(id: DesignBlockId$1): UBQResult<number>;
|
|
4155
|
+
setLooping(id: DesignBlockId$1, looping: boolean): UBQResult<void>;
|
|
4156
|
+
isLooping(id: DesignBlockId$1): UBQResult<boolean>;
|
|
4157
|
+
setMuted(id: DesignBlockId$1, muted: boolean): UBQResult<void>;
|
|
4158
|
+
isForceMuted(id: DesignBlockId$1): UBQResult<boolean>;
|
|
4159
|
+
isMuted(id: DesignBlockId$1): UBQResult<boolean>;
|
|
4160
|
+
setVolume(id: DesignBlockId$1, volume: number): UBQResult<void>;
|
|
4161
|
+
getVolume(id: DesignBlockId$1): UBQResult<number>;
|
|
4162
|
+
forceLoadAVResource(id: DesignBlockId$1, callback: (result: UBQResult<void>) => void): void;
|
|
4163
|
+
unstable_isAVResourceLoaded(id: DesignBlockId$1): UBQResult<boolean>;
|
|
4164
|
+
getAVResourceTotalDuration(id: DesignBlockId$1): UBQResult<number>;
|
|
4165
|
+
getVideoWidth(id: DesignBlockId$1): UBQResult<number>;
|
|
4166
|
+
getVideoHeight(id: DesignBlockId$1): UBQResult<number>;
|
|
4167
|
+
getVideoFillThumbnail(id: DesignBlockId$1, thumbnailHeight: number, callback: (result: Uint8Array | {
|
|
4168
|
+
error: string;
|
|
4169
|
+
}) => void): void;
|
|
4170
|
+
generateVideoThumbnailSequence(id: DesignBlockId$1, thumbnailHeight: number, timeBegin: number, timeEnd: number, numberOfFrames: number, onFrame: (result: {
|
|
4171
|
+
frameIndex: number;
|
|
4172
|
+
width: number;
|
|
4173
|
+
height: number;
|
|
4174
|
+
imageData: Uint8Array;
|
|
4175
|
+
} | {
|
|
4176
|
+
error: string;
|
|
4177
|
+
}) => void): number;
|
|
4178
|
+
cancelVideoThumbnailSequenceGeneration(id: DesignBlockId$1): void;
|
|
4179
|
+
generateAudioThumbnailSequence(id: DesignBlockId$1, samplesPerChunk: number, timeBegin: number, timeEnd: number, numberOfSamples: number, numberOfChannels: number, onChunk: (result: {
|
|
4180
|
+
chunkIndex: number;
|
|
4181
|
+
sampleData: Float32Array;
|
|
4182
|
+
} | {
|
|
4183
|
+
error: string;
|
|
4184
|
+
}) => void): number;
|
|
4185
|
+
cancelAudioThumbnailSequenceGeneration(id: DesignBlockId$1): void;
|
|
4186
|
+
getVideoFillThumbnailAtlas(id: DesignBlockId$1, numberOfColumns: number, numberOfRows: number, thumbnailHeight: number, callback: (result: Uint8Array | {
|
|
4187
|
+
error: string;
|
|
4188
|
+
}) => void): void;
|
|
4189
|
+
getPageThumbnailAtlas(id: DesignBlockId$1, numberOfColumns: number, numberOfRows: number, thumbnailHeight: number, callback: (result: Uint8Array | {
|
|
4190
|
+
error: string;
|
|
4191
|
+
}) => void): void;
|
|
4192
|
+
createAnimation(type: string): UBQResult<DesignBlockId$1>;
|
|
4193
|
+
supportsAnimation(id: DesignBlockId$1): UBQResult<boolean>;
|
|
4194
|
+
setInAnimation(id: DesignBlockId$1, animation: DesignBlockId$1): UBQResult<void>;
|
|
4195
|
+
setLoopAnimation(id: DesignBlockId$1, animation: DesignBlockId$1): UBQResult<void>;
|
|
4196
|
+
setOutAnimation(id: DesignBlockId$1, animation: DesignBlockId$1): UBQResult<void>;
|
|
4197
|
+
getInAnimation(id: DesignBlockId$1): UBQResult<DesignBlockId$1>;
|
|
4198
|
+
getLoopAnimation(id: DesignBlockId$1): UBQResult<DesignBlockId$1>;
|
|
4199
|
+
getOutAnimation(id: DesignBlockId$1): UBQResult<DesignBlockId$1>;
|
|
4200
|
+
setNativePixelBuffer(id: number, buffer: any): UBQResult<void>;
|
|
4201
|
+
createBuffer(): string;
|
|
4202
|
+
destroyBuffer(uri: string): UBQResult<void>;
|
|
4203
|
+
setBufferData(uri: string, offset: number, buffer: Uint8Array): UBQResult<void>;
|
|
4204
|
+
getBufferData(uri: string, offset: number, length: number): Uint8Array | {
|
|
4205
|
+
error: string;
|
|
4206
|
+
};
|
|
4207
|
+
setBufferLength(uri: string, length: number): UBQResult<void>;
|
|
4208
|
+
getBufferLength(uri: string): UBQResult<number>;
|
|
4209
|
+
cloneBuffers(): UBQResult<Vector<Buffer$1>>;
|
|
4210
|
+
restoreBuffers(buffers: Buffer$1[]): UBQResult<void>;
|
|
4211
|
+
createHistory(): DesignBlockId$1;
|
|
4212
|
+
destroyHistory(history: DesignBlockId$1): UBQResult<void>;
|
|
4213
|
+
setActiveHistory(history: DesignBlockId$1): UBQResult<void>;
|
|
4214
|
+
getActiveHistory(): DesignBlockId$1;
|
|
4215
|
+
subscribeToEditorState(callback: () => void): Subscription;
|
|
4216
|
+
getEditMode(): "Transform" | "Crop" | "Text" | string;
|
|
4217
|
+
setEditMode(mode: "Transform" | "Crop" | "Text" | string, baseMode?: string): void;
|
|
4218
|
+
getCursorType(): "Arrow" | "Move" | "MoveNotPermitted" | "Resize" | "Rotate" | "Text";
|
|
4219
|
+
getCursorRotation(): number;
|
|
4220
|
+
getTextCursorPositionInScreenSpaceX(): number;
|
|
4221
|
+
getTextCursorPositionInScreenSpaceY(): number;
|
|
4222
|
+
getAvailableMemory(): UBQResult<number>;
|
|
4223
|
+
getUsedMemory(): UBQResult<number>;
|
|
4224
|
+
getMaxExportSize(): UBQResult<number>;
|
|
4225
|
+
isPlaying(): boolean;
|
|
4226
|
+
setPlaying(playing: boolean): void;
|
|
4227
|
+
unstable_isInteractionHappening(): UBQResult<boolean>;
|
|
4228
|
+
hasSelectedVectorNode(): boolean;
|
|
4229
|
+
addVectorNode(): UBQResult<void>;
|
|
4230
|
+
deleteVectorNode(): UBQResult<void>;
|
|
4231
|
+
hasSelectedVectorControlPoint(): boolean;
|
|
4232
|
+
deleteSelectedVectorControlPoints(): UBQResult<void>;
|
|
4233
|
+
toggleSelectedVectorNodeSmooth(): UBQResult<void>;
|
|
4234
|
+
setVectorEditBendMode(active: boolean): UBQResult<void>;
|
|
4235
|
+
getVectorEditBendMode(): boolean;
|
|
4236
|
+
setVectorEditAddMode(active: boolean): UBQResult<void>;
|
|
4237
|
+
getVectorEditAddMode(): boolean;
|
|
4238
|
+
setVectorEditDeleteMode(active: boolean): UBQResult<void>;
|
|
4239
|
+
getVectorEditDeleteMode(): boolean;
|
|
4240
|
+
setSelectedVectorNodeMirrorMode(mode: number): UBQResult<void>;
|
|
4241
|
+
getSelectedVectorNodeMirrorMode(): UBQResult<number>;
|
|
4242
|
+
unstable_isTextCursorInCompositionRange(): boolean;
|
|
4243
|
+
unstable_getCursorPosition(): NumberRange;
|
|
4244
|
+
unstable_getCompositionRange(): NumberRange;
|
|
4245
|
+
addUndoStep(): UBQResult<void>;
|
|
4246
|
+
removeUndoStep(): UBQResult<void>;
|
|
4247
|
+
undo(): UBQResult<void>;
|
|
4248
|
+
redo(): UBQResult<void>;
|
|
4249
|
+
canUndo(): UBQResult<boolean>;
|
|
4250
|
+
canRedo(): UBQResult<boolean>;
|
|
4251
|
+
subscribeToHistoryWithKind(callback: (kind: number) => void): Subscription;
|
|
4252
|
+
/**
|
|
4253
|
+
* @returns true if the event was handled (canvas zoomed or scrolled), false
|
|
4254
|
+
* otherwise (handling disabled or clamped).
|
|
4255
|
+
*/
|
|
4256
|
+
mouseWheel: (wheelEvent: MouseWheelEvent) => boolean;
|
|
4257
|
+
subscribeToSettings(callback: () => void): Subscription;
|
|
4258
|
+
subscribeToRoleChange(callback: (role: RoleString$1) => void): Subscription;
|
|
4259
|
+
setSettingBool(keypath: string, value: boolean): UBQResult<void>;
|
|
4260
|
+
getSettingBool(keypath: string): UBQResult<boolean>;
|
|
4261
|
+
setSettingInt(keypath: string, value: number): UBQResult<void>;
|
|
4262
|
+
getSettingInt(keypath: string): UBQResult<number>;
|
|
4263
|
+
setSettingFloat(keypath: string, value: number): UBQResult<void>;
|
|
4264
|
+
getSettingFloat(keypath: string): UBQResult<number>;
|
|
4265
|
+
setSettingString(keypath: string, value: string): UBQResult<void>;
|
|
4266
|
+
getSettingString(keypath: string): UBQResult<string>;
|
|
4267
|
+
setSettingColor(keypath: string, value: ColorInternal$1): UBQResult<void>;
|
|
4268
|
+
getSettingColor(keypath: string): UBQResult<ColorInternal$1>;
|
|
4269
|
+
setSettingColorRGBA(keypath: string, r: number, g: number, b: number, a: number): UBQResult<void>;
|
|
4270
|
+
getSettingColorRGBA(keypath: string): UBQResult<RGBA$1>;
|
|
4271
|
+
setSettingEnum(keypath: string, value: string): UBQResult<void>;
|
|
4272
|
+
getSettingEnum(keypath: string): UBQResult<string>;
|
|
4273
|
+
getSettingEnumOptions(keypath: string): UBQResult<Vector<string>>;
|
|
4274
|
+
setRole(role: RoleString$1): UBQResult<void>;
|
|
4275
|
+
getRole(): UBQResult<RoleString$1>;
|
|
4276
|
+
findAllSettings(): Vector<SettingKey>;
|
|
4277
|
+
getSettingType(keypath: string): UBQResult<string>;
|
|
4278
|
+
addAssetSource(id: string, findAssets: (query: FindAssetsQuery, callback: {
|
|
4279
|
+
invoke(error: string): void;
|
|
4280
|
+
invoke(result: AssetsQueryResult$1<CompleteAssetResult$1>): void;
|
|
4281
|
+
}) => void, fetchAsset: ((id: string, locale: string, callback: {
|
|
4282
|
+
invoke(error: string): void;
|
|
4283
|
+
invoke(result: CompleteAssetResult$1 | null): void;
|
|
4284
|
+
}) => void) | null, getGroups: ((callback: {
|
|
4285
|
+
invoke(error: string): void;
|
|
4286
|
+
invoke(groups: string[]): void;
|
|
4287
|
+
}) => void) | null, getCredits: (() => AssetResultCredits) | null, getLicense: (() => AssetResultLicense) | null, getSupportedMimeTypes: (() => string[]) | null, applyAsset: ((result: CompleteAssetResult$1, callback: {
|
|
4288
|
+
invoke(error: string): void;
|
|
4289
|
+
invoke(block?: DesignBlockId$1): void;
|
|
4290
|
+
}) => void) | null, applyAssetToBlock: ((result: CompleteAssetResult$1, block: DesignBlockId$1, callback: {
|
|
4291
|
+
invoke(error: string): void;
|
|
4292
|
+
invoke(): void;
|
|
4293
|
+
}) => void) | null, applyProperty: ((result: CompleteAssetResult$1, property: AssetProperty$1, callback: {
|
|
4294
|
+
invoke(error: string): void;
|
|
4295
|
+
invoke(): void;
|
|
4296
|
+
}) => void) | null, addAsset: ((asset: AssetDefinition$1, callback: {
|
|
4297
|
+
invoke(error: string): void;
|
|
4298
|
+
invoke(): void;
|
|
4299
|
+
}) => void) | null, removeAsset: ((id: string, callback: {
|
|
4300
|
+
invoke(error: string): void;
|
|
4301
|
+
invoke(): void;
|
|
4302
|
+
}) => void) | null): UBQResult<void>;
|
|
4303
|
+
addLocalAssetSource(id: string, supportedMimeTypes: string[], applyAsset: ((result: CompleteAssetResult$1, callback: {
|
|
4304
|
+
invoke(error: string): void;
|
|
4305
|
+
invoke(block?: DesignBlockId$1): void;
|
|
4306
|
+
}) => void) | null, applyAssetToBlock: ((result: CompleteAssetResult$1, block: DesignBlockId$1, callback: {
|
|
4307
|
+
invoke(error: string): void;
|
|
4308
|
+
invoke(none: object): void;
|
|
4309
|
+
}) => void) | null): UBQResult<void>;
|
|
4310
|
+
addLocalAssetSourceFromJSONString(contentJSON: string, basePath?: string | null, matcher?: string[]): UBQResult<string>;
|
|
4311
|
+
addLocalAssetSourceFromJSONURI(contentURI: string, matcher: string[] | undefined, callback: (result: UBQResult<void>) => void): void;
|
|
4312
|
+
removeAssetSource(id: string): UBQResult<void>;
|
|
4313
|
+
findAllAssetSources(): Vector<string>;
|
|
4314
|
+
findAssetSourceAssets(sourceID: string, query: FindAssetsQuery, callback: (result: UBQResult<AssetsQueryResult$1<CompleteAssetResult$1>>) => void): void;
|
|
4315
|
+
fetchAssetSourceAsset(sourceID: string, assetID: string, params: Pick<FindAssetsQuery, "locale">, callback: (result: UBQResult<CompleteAssetResult$1 | null>) => void): void;
|
|
4316
|
+
getAssetSourceGroups(sourceID: string, callback: (result: UBQResult<Vector<string>>) => void): void;
|
|
4317
|
+
getAssetSourceSupportedMimeTypes(sourceID: string): UBQResult<Vector<string>>;
|
|
4318
|
+
getAssetSourceCredits(sourceID: string): UBQResult<AssetResultCredits>;
|
|
4319
|
+
getAssetSourceLicense(sourceID: string): UBQResult<AssetResultLicense>;
|
|
4320
|
+
addAssetToSource(sourceID: string, asset: AssetDefinition$1): UBQResult<void>;
|
|
4321
|
+
removeAssetFromSource(sourceID: string, assetID: string): UBQResult<void>;
|
|
4322
|
+
applyAssetSourceAsset(sourceID: string, result: CompleteAssetResult$1, callback: (result: UBQResult<DesignBlockId$1>) => void): void;
|
|
4323
|
+
applyAssetSourceAssetToBlock(sourceID: string, result: CompleteAssetResult$1, block: DesignBlockId$1, callback: (result: UBQResult<void>) => void): void;
|
|
4324
|
+
applyAssetSourceProperty(sourceID: string, result: CompleteAssetResult$1, property: AssetProperty$1, callback: (result: UBQResult<void>) => void): void;
|
|
4325
|
+
defaultApplyAsset(result: CompleteAssetResult$1, callback: (result: UBQResult<DesignBlockId$1>) => void): void;
|
|
4326
|
+
defaultApplyAssetToBlock(result: CompleteAssetResult$1, block: DesignBlockId$1, callback: (result: UBQResult<void>) => void): void;
|
|
4327
|
+
getAbsoluteURI(path: string, callback: (result: UBQResult<string>) => void): void;
|
|
4328
|
+
setURIResolver(resolver: (URI: string) => string): UBQResult<void>;
|
|
4329
|
+
setURIResolverAsync(resolver: ((URI: string) => string | URIResolverError | Promise<string | URIResolverError>) | null): UBQResult<void>;
|
|
4330
|
+
defaultURIResolver(path: string): string;
|
|
4331
|
+
actionsRegister(id: string, trampoline: (jsonArgs: string) => string | Promise<string>, rawFn: (...args: unknown[]) => unknown): void;
|
|
4332
|
+
actionsGetLocal(id: string): ((...args: unknown[]) => unknown) | undefined;
|
|
4333
|
+
actionsUnregister(id: string): boolean;
|
|
4334
|
+
actionsHas(id: string): boolean;
|
|
4335
|
+
actionsRun(id: string, jsonArgs: string, resolve: (jsonResult: string) => void, reject: (error: string) => void): void;
|
|
4336
|
+
actionsList(matcher: string | null): Array<{
|
|
4337
|
+
id: string;
|
|
4338
|
+
enabled: boolean;
|
|
4339
|
+
argSchema: string | null;
|
|
4340
|
+
}>;
|
|
4341
|
+
subscribeToAssetSourceAdded(callback: (sourceID: string) => void): Subscription;
|
|
4342
|
+
subscribeToAssetSourceRemoved(callback: (sourceID: string) => void): Subscription;
|
|
4343
|
+
subscribeToAssetSourceUpdated(callback: (sourceID: string) => void): Subscription;
|
|
4344
|
+
assetSourceContentsChanged(sourceID: string): UBQResult<void>;
|
|
4345
|
+
getState(block: DesignBlockId$1): UBQResult<BlockState$1>;
|
|
4346
|
+
setState(block: DesignBlockId$1, state: BlockState$1): UBQResult<void>;
|
|
4347
|
+
subscribeToBlockState(blocks: DesignBlockId$1[], callback: (blocks: Vector<DesignBlockId$1>) => void): Subscription;
|
|
4348
|
+
subscribe(blocks: DesignBlockId$1[], callback: (events: Vector<BlockEvent$1>) => void): Subscription;
|
|
4349
|
+
unsubscribe(subscription: Subscription): UBQResult<void>;
|
|
4350
|
+
}
|
|
4351
|
+
/** @public Info about a registered action, from {@link EngineActions.list}. */
|
|
4352
|
+
export interface EngineActionInfo {
|
|
4353
|
+
/** The action id, e.g. `nudge`. */
|
|
4354
|
+
id: string;
|
|
4355
|
+
/** Whether the action currently says it can run. */
|
|
4356
|
+
enabled: boolean;
|
|
4357
|
+
/** Optional JSON description of the arguments it accepts. */
|
|
4358
|
+
argSchema: string | null;
|
|
4359
|
+
}
|
|
4360
|
+
/**
|
|
4361
|
+
* @public Hook for hosts to add strongly-typed action ids. Augment via
|
|
4362
|
+
* `declare module '@cesdk/engine'` to get autocomplete on register/run while
|
|
4363
|
+
* still allowing custom string ids.
|
|
1849
4364
|
*/
|
|
1850
|
-
export interface
|
|
1851
|
-
lines: TextDecorationLine[];
|
|
1852
|
-
style?: TextDecorationStyle;
|
|
1853
|
-
/** Override color for underlines (only). */
|
|
1854
|
-
underlineColor?: Color;
|
|
1855
|
-
/** Multiplier on the font-derived underline thickness. Default 1.0. */
|
|
1856
|
-
underlineThickness?: number;
|
|
1857
|
-
/** Relative offset multiplier for the underline position. */
|
|
1858
|
-
underlineOffset?: number;
|
|
1859
|
-
/** When true, underlines skip glyph descenders. Default true. */
|
|
1860
|
-
skipInk?: boolean;
|
|
4365
|
+
export interface EngineActionsRegistry {
|
|
1861
4366
|
}
|
|
4367
|
+
/** @public Known action ids from {@link EngineActionsRegistry}. */
|
|
4368
|
+
export type EngineActionId = keyof EngineActionsRegistry & string;
|
|
4369
|
+
/** @public A generic, untyped action function for custom ids. */
|
|
4370
|
+
export type EngineCustomActionFunction = (...args: any[]) => unknown;
|
|
1862
4371
|
/**
|
|
1863
|
-
*
|
|
1864
|
-
*
|
|
1865
|
-
*
|
|
4372
|
+
* @public Named, overridable actions for one engine. Actions are either JS
|
|
4373
|
+
* closures you register or engine defaults (e.g. undo/redo), and
|
|
4374
|
+
* either kind can override the other by reusing the id.
|
|
1866
4375
|
*
|
|
1867
|
-
*
|
|
1868
|
-
* @
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
}
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
} | {
|
|
1876
|
-
overshoot: number;
|
|
1877
|
-
blockType: string;
|
|
1878
|
-
};
|
|
1879
|
-
/**
|
|
1880
|
-
* Scope descriptor used to identify an existing movement constraint for
|
|
1881
|
-
* removal.
|
|
1882
|
-
* @public
|
|
1883
|
-
*/
|
|
1884
|
-
export type MovementConstraintScope = {
|
|
1885
|
-
block: number;
|
|
1886
|
-
} | {
|
|
1887
|
-
blockType: string;
|
|
1888
|
-
};
|
|
1889
|
-
/**
|
|
1890
|
-
* Effective movement constraint for a block, or `null` when no constraint
|
|
1891
|
-
* applies.
|
|
1892
|
-
* @public
|
|
1893
|
-
*/
|
|
1894
|
-
export type ResolvedMovementConstraint = {
|
|
1895
|
-
overshoot: number;
|
|
1896
|
-
} | null;
|
|
1897
|
-
/**
|
|
1898
|
-
* Animation easing types for animated operations
|
|
1899
|
-
* @public
|
|
1900
|
-
*/
|
|
1901
|
-
export type AnimationEasing = "Linear" | "EaseIn" | "EaseOut" | "EaseInOut" | "EaseInQuart" | "EaseOutQuart" | "EaseInOutQuart" | "EaseInQuint" | "EaseOutQuint" | "EaseInOutQuint" | "EaseInBack" | "EaseOutBack" | "EaseInOutBack" | "EaseInSpring" | "EaseOutSpring" | "EaseInOutSpring";
|
|
1902
|
-
/**
|
|
1903
|
-
* Options for zooming to a block with optional animation.
|
|
1904
|
-
* @public
|
|
1905
|
-
*/
|
|
1906
|
-
export type ZoomOptions = {
|
|
1907
|
-
/** Padding configuration around the block */
|
|
1908
|
-
padding?: number | {
|
|
1909
|
-
x?: number;
|
|
1910
|
-
y?: number;
|
|
1911
|
-
} | {
|
|
1912
|
-
top?: number;
|
|
1913
|
-
bottom?: number;
|
|
1914
|
-
left?: number;
|
|
1915
|
-
right?: number;
|
|
1916
|
-
};
|
|
1917
|
-
/** Animation configuration - boolean for default animation or object for custom settings */
|
|
1918
|
-
animate?: boolean | {
|
|
1919
|
-
/** Duration of the animation in seconds */
|
|
1920
|
-
duration?: number;
|
|
1921
|
-
/** Easing function for the animation */
|
|
1922
|
-
easing?: AnimationEasing;
|
|
1923
|
-
/** Whether the animation can be interrupted */
|
|
1924
|
-
interruptible?: boolean;
|
|
1925
|
-
};
|
|
1926
|
-
};
|
|
1927
|
-
/**
|
|
1928
|
-
* Internal color representation used by the node native binding.
|
|
1929
|
-
* Converts between the internal format (colorSpace, components) and
|
|
1930
|
-
* the user-friendly format (r,g,b,a or c,m,y,k or spotColorName).
|
|
4376
|
+
* JS-registered actions run directly in JS, so on the web you get full fidelity:
|
|
4377
|
+
* {@link get} hands back the raw function and {@link run} passes args/results by
|
|
4378
|
+
* reference (non-serializable payloads like File/Blob work). The engine also keeps
|
|
4379
|
+
* a JSON trampoline per action so defaults run natively and host actions stay
|
|
4380
|
+
* reachable across the FFI — that path is JSON-only and async. Engine defaults you
|
|
4381
|
+
* have not overridden are reachable only via {@link run}; {@link get} returns undefined.
|
|
4382
|
+
*
|
|
4383
|
+
* @remarks Main-thread only. {@link get} is web-only; use run/has/list cross-platform.
|
|
1931
4384
|
*/
|
|
1932
|
-
export
|
|
4385
|
+
export declare class EngineActions {
|
|
4386
|
+
#private;
|
|
4387
|
+
/** @internal */
|
|
4388
|
+
constructor(ubq: UBQ);
|
|
4389
|
+
/**
|
|
4390
|
+
* Register an action, replacing any existing one with the same id.
|
|
4391
|
+
*
|
|
4392
|
+
* @param id - The action id (e.g. `undo`). Reusing an engine default's id overrides it.
|
|
4393
|
+
* @param fn - The action body (sync or async). On the web it runs directly with
|
|
4394
|
+
* any JS values. Across the FFI args/results are JSON, so only serializable
|
|
4395
|
+
* payloads work there.
|
|
4396
|
+
*/
|
|
4397
|
+
register<K extends EngineActionId>(id: K, fn: EngineActionsRegistry[K] extends (...args: any[]) => any ? EngineActionsRegistry[K] : EngineCustomActionFunction): void;
|
|
4398
|
+
register(id: string, fn: EngineCustomActionFunction): void;
|
|
4399
|
+
/**
|
|
4400
|
+
* Get the raw registered function for an id so you can call it synchronously.
|
|
4401
|
+
*
|
|
4402
|
+
* Returns the exact function you registered. Returns `undefined` for unknown ids
|
|
4403
|
+
* and engine-default native actions (which have no JS function) — use {@link run}
|
|
4404
|
+
* for those.
|
|
4405
|
+
*
|
|
4406
|
+
* @remarks Web-only.
|
|
4407
|
+
*/
|
|
4408
|
+
get<K extends EngineActionId>(id: K): EngineActionsRegistry[K] | undefined;
|
|
4409
|
+
get(id: string): EngineCustomActionFunction | undefined;
|
|
4410
|
+
/**
|
|
4411
|
+
* Run an action by id and return its result as a Promise.
|
|
4412
|
+
*
|
|
4413
|
+
* JS-registered actions are called directly (args/result by reference). Engine
|
|
4414
|
+
* defaults go across the FFI (JSON args/result).
|
|
4415
|
+
*
|
|
4416
|
+
* @param id - The action id.
|
|
4417
|
+
* @param args - Arguments forwarded to the action.
|
|
4418
|
+
* @returns The action's result, or a rejection if the id is unknown or it threw.
|
|
4419
|
+
*/
|
|
4420
|
+
run<K extends EngineActionId>(id: K, ...args: EngineActionsRegistry[K] extends (...args: infer A) => any ? A : unknown[]): Promise<EngineActionsRegistry[K] extends (...args: any[]) => infer R ? Awaited<R> : unknown>;
|
|
4421
|
+
run<R = unknown>(id: string, ...args: unknown[]): Promise<R>;
|
|
4422
|
+
/** Whether an action with this id is registered (host or engine default). */
|
|
4423
|
+
has(id: string): boolean;
|
|
4424
|
+
/**
|
|
4425
|
+
* Remove a host action, or revert an overridden engine default to its built-in.
|
|
4426
|
+
*
|
|
4427
|
+
* If you override an engine default (such as `select` or `undo`), unregistering the id restores
|
|
4428
|
+
* the default rather than leaving it unhandled. A custom id you registered yourself is removed
|
|
4429
|
+
* entirely. Returns `false` only when the id is unknown.
|
|
4430
|
+
*/
|
|
4431
|
+
unregister(id: string): boolean;
|
|
4432
|
+
/** List registered actions, optionally filtered by a `*` glob matcher on the id. */
|
|
4433
|
+
list(options?: {
|
|
4434
|
+
matcher?: string;
|
|
4435
|
+
}): EngineActionInfo[];
|
|
4436
|
+
/**
|
|
4437
|
+
* Reject all in-flight `run()` promises. Called by the engine's `dispose()`.
|
|
4438
|
+
* @internal
|
|
4439
|
+
*/
|
|
4440
|
+
dispose(): void;
|
|
4441
|
+
}
|
|
4442
|
+
interface NativeColorInternal {
|
|
1933
4443
|
colorSpace: number;
|
|
1934
4444
|
components: {
|
|
1935
4445
|
x: number;
|
|
@@ -1965,37 +4475,37 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
1965
4475
|
* @param type - The block type (e.g., 'graphic', 'text', 'page', 'audio').
|
|
1966
4476
|
* @returns The ID of the newly created block.
|
|
1967
4477
|
*/
|
|
1968
|
-
create(type:
|
|
4478
|
+
create(type: DesignBlockType): DesignBlockId;
|
|
1969
4479
|
/**
|
|
1970
4480
|
* Create a new fill block of the specified type.
|
|
1971
4481
|
* @param type - The fill type (e.g., 'color', 'gradient/linear', 'gradient/radial', 'image', 'video').
|
|
1972
4482
|
* @returns The ID of the newly created fill block.
|
|
1973
4483
|
*/
|
|
1974
|
-
createFill(type:
|
|
4484
|
+
createFill(type: FillType): DesignBlockId;
|
|
1975
4485
|
/**
|
|
1976
4486
|
* Create a new shape block of the specified type.
|
|
1977
4487
|
* @param type - The shape type (e.g., 'rect', 'ellipse', 'polygon', 'star', 'line').
|
|
1978
4488
|
* @returns The ID of the newly created shape block.
|
|
1979
4489
|
*/
|
|
1980
|
-
createShape(type:
|
|
4490
|
+
createShape(type: ShapeType): DesignBlockId;
|
|
1981
4491
|
/**
|
|
1982
4492
|
* Create a new effect block of the specified type.
|
|
1983
4493
|
* @param type - The effect type (e.g., 'adjustments', 'pixelize', 'glow', 'half_tone').
|
|
1984
4494
|
* @returns The ID of the newly created effect block.
|
|
1985
4495
|
*/
|
|
1986
|
-
createEffect(type:
|
|
4496
|
+
createEffect(type: EffectType): DesignBlockId;
|
|
1987
4497
|
/**
|
|
1988
4498
|
* Create a new blur block of the specified type.
|
|
1989
4499
|
* @param type - The blur type (e.g., 'uniform', 'linear', 'mirrored', 'radial').
|
|
1990
4500
|
* @returns The ID of the newly created blur block.
|
|
1991
4501
|
*/
|
|
1992
|
-
createBlur(type:
|
|
4502
|
+
createBlur(type: BlurType): DesignBlockId;
|
|
1993
4503
|
/**
|
|
1994
4504
|
* Create a new animation block of the specified type.
|
|
1995
4505
|
* @param type - The animation type.
|
|
1996
4506
|
* @returns The ID of the newly created animation block.
|
|
1997
4507
|
*/
|
|
1998
|
-
createAnimation(type:
|
|
4508
|
+
createAnimation(type: AnimationType): DesignBlockId;
|
|
1999
4509
|
/**
|
|
2000
4510
|
* Duplicate an existing block.
|
|
2001
4511
|
* @param block - The ID of the block to duplicate.
|
|
@@ -2042,7 +4552,7 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2042
4552
|
* @param type - The type to search for (e.g., '//ly.img.ubq/graphic').
|
|
2043
4553
|
* @returns Array of matching block IDs.
|
|
2044
4554
|
*/
|
|
2045
|
-
findByType(type:
|
|
4555
|
+
findByType(type: ObjectType): DesignBlockId[];
|
|
2046
4556
|
/**
|
|
2047
4557
|
* Find blocks by their kind.
|
|
2048
4558
|
* @param kind - The kind to search for (e.g., 'image', 'text', 'sticker').
|
|
@@ -2090,7 +4600,7 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2090
4600
|
* @param block - The ID of the block.
|
|
2091
4601
|
* @returns The block type string (e.g., '//ly.img.ubq/graphic').
|
|
2092
4602
|
*/
|
|
2093
|
-
getType(block: DesignBlockId):
|
|
4603
|
+
getType(block: DesignBlockId): ObjectTypeLonghand;
|
|
2094
4604
|
/**
|
|
2095
4605
|
* Get the kind of a block.
|
|
2096
4606
|
* @param block - The ID of the block.
|
|
@@ -2121,38 +4631,40 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2121
4631
|
* @returns The block's UUID string.
|
|
2122
4632
|
*/
|
|
2123
4633
|
getUUID(block: DesignBlockId): string;
|
|
2124
|
-
getBool(block: DesignBlockId, property:
|
|
2125
|
-
setBool(block: DesignBlockId, property:
|
|
2126
|
-
getInt(block: DesignBlockId, property:
|
|
2127
|
-
setInt(block: DesignBlockId, property:
|
|
2128
|
-
getFloat(block: DesignBlockId, property:
|
|
2129
|
-
setFloat(block: DesignBlockId, property:
|
|
2130
|
-
getDouble(block: DesignBlockId, property:
|
|
2131
|
-
setDouble(block: DesignBlockId, property:
|
|
2132
|
-
getString(block: DesignBlockId, property:
|
|
2133
|
-
setString(block: DesignBlockId, property:
|
|
2134
|
-
getColor(block: DesignBlockId, property:
|
|
2135
|
-
setColor(block: DesignBlockId, property:
|
|
2136
|
-
getColorRGBA(block: DesignBlockId, property: string):
|
|
2137
|
-
setColorRGBA(block: DesignBlockId, property: string, r: number, g: number, b: number, a
|
|
2138
|
-
getEnum(
|
|
2139
|
-
|
|
4634
|
+
getBool(block: DesignBlockId, property: BoolPropertyName): boolean;
|
|
4635
|
+
setBool(block: DesignBlockId, property: BoolPropertyName, value: boolean): void;
|
|
4636
|
+
getInt(block: DesignBlockId, property: IntPropertyName): number;
|
|
4637
|
+
setInt(block: DesignBlockId, property: IntPropertyName, value: number): void;
|
|
4638
|
+
getFloat(block: DesignBlockId, property: FloatPropertyName): number;
|
|
4639
|
+
setFloat(block: DesignBlockId, property: FloatPropertyName, value: number): void;
|
|
4640
|
+
getDouble(block: DesignBlockId, property: DoublePropertyName): number;
|
|
4641
|
+
setDouble(block: DesignBlockId, property: DoublePropertyName, value: number): void;
|
|
4642
|
+
getString(block: DesignBlockId, property: StringPropertyName): string;
|
|
4643
|
+
setString(block: DesignBlockId, property: StringPropertyName, value: string): void;
|
|
4644
|
+
getColor(block: DesignBlockId, property: ColorPropertyName): Color;
|
|
4645
|
+
setColor(block: DesignBlockId, property: ColorPropertyName, value: Color): void;
|
|
4646
|
+
getColorRGBA(block: DesignBlockId, property: string): RGBA;
|
|
4647
|
+
setColorRGBA(block: DesignBlockId, property: string, r: number, g: number, b: number, a?: number): void;
|
|
4648
|
+
getEnum<T extends keyof BlockEnumType>(id: DesignBlockId, property: T): BlockEnumType[T];
|
|
4649
|
+
getEnum(id: DesignBlockId, property: string): string;
|
|
4650
|
+
setEnum<T extends keyof BlockEnumType>(id: DesignBlockId, property: T, value: BlockEnumType[T]): void;
|
|
4651
|
+
setEnum(id: DesignBlockId, property: string, value: string): void;
|
|
2140
4652
|
getPositionX(block: DesignBlockId): number;
|
|
2141
4653
|
setPositionX(block: DesignBlockId, value: number): void;
|
|
2142
4654
|
getPositionY(block: DesignBlockId): number;
|
|
2143
4655
|
setPositionY(block: DesignBlockId, value: number): void;
|
|
2144
|
-
getPositionXMode(block: DesignBlockId):
|
|
2145
|
-
setPositionXMode(block: DesignBlockId, mode:
|
|
2146
|
-
getPositionYMode(block: DesignBlockId):
|
|
2147
|
-
setPositionYMode(block: DesignBlockId, mode:
|
|
4656
|
+
getPositionXMode(block: DesignBlockId): PositionXMode;
|
|
4657
|
+
setPositionXMode(block: DesignBlockId, mode: PositionXMode): void;
|
|
4658
|
+
getPositionYMode(block: DesignBlockId): PositionYMode;
|
|
4659
|
+
setPositionYMode(block: DesignBlockId, mode: PositionYMode): void;
|
|
2148
4660
|
getWidth(block: DesignBlockId): number;
|
|
2149
|
-
setWidth(block: DesignBlockId, value: number): void;
|
|
2150
|
-
getWidthMode(block: DesignBlockId):
|
|
2151
|
-
setWidthMode(block: DesignBlockId, mode:
|
|
4661
|
+
setWidth(block: DesignBlockId, value: number, maintainCrop?: boolean): void;
|
|
4662
|
+
getWidthMode(block: DesignBlockId): WidthMode;
|
|
4663
|
+
setWidthMode(block: DesignBlockId, mode: WidthMode): void;
|
|
2152
4664
|
getHeight(block: DesignBlockId): number;
|
|
2153
|
-
setHeight(block: DesignBlockId, value: number): void;
|
|
2154
|
-
getHeightMode(block: DesignBlockId):
|
|
2155
|
-
setHeightMode(block: DesignBlockId, mode:
|
|
4665
|
+
setHeight(block: DesignBlockId, value: number, maintainCrop?: boolean): void;
|
|
4666
|
+
getHeightMode(block: DesignBlockId): HeightMode;
|
|
4667
|
+
setHeightMode(block: DesignBlockId, mode: HeightMode): void;
|
|
2156
4668
|
getRotation(block: DesignBlockId): number;
|
|
2157
4669
|
setRotation(block: DesignBlockId, value: number): void;
|
|
2158
4670
|
getFlipHorizontal(block: DesignBlockId): boolean;
|
|
@@ -2160,15 +4672,15 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2160
4672
|
setFlipHorizontal(block: DesignBlockId, flip: boolean): void;
|
|
2161
4673
|
setFlipVertical(block: DesignBlockId, flip: boolean): void;
|
|
2162
4674
|
setPosition(block: DesignBlockId, x: number, y: number, options?: {
|
|
2163
|
-
positionMode?:
|
|
4675
|
+
positionMode?: PositionMode;
|
|
2164
4676
|
}): void;
|
|
2165
4677
|
setSize(block: DesignBlockId, width: number, height: number, options?: {
|
|
2166
4678
|
maintainCrop?: boolean;
|
|
2167
|
-
sizeMode?:
|
|
4679
|
+
sizeMode?: SizeMode;
|
|
2168
4680
|
}): void;
|
|
2169
4681
|
scale(block: DesignBlockId, scale: number, anchorX?: number, anchorY?: number): void;
|
|
2170
4682
|
fillParent(block: DesignBlockId): void;
|
|
2171
|
-
resizeContentAware(blocks: DesignBlockId[], width: number, height: number):
|
|
4683
|
+
resizeContentAware(blocks: DesignBlockId[], width: number, height: number): void;
|
|
2172
4684
|
getGlobalBoundingBoxX(block: DesignBlockId): number;
|
|
2173
4685
|
getGlobalBoundingBoxY(block: DesignBlockId): number;
|
|
2174
4686
|
getGlobalBoundingBoxWidth(block: DesignBlockId): number;
|
|
@@ -2179,34 +4691,30 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2179
4691
|
hasFillColor(block: DesignBlockId): boolean;
|
|
2180
4692
|
isFillColorEnabled(block: DesignBlockId): boolean;
|
|
2181
4693
|
setFillColorEnabled(block: DesignBlockId, enabled: boolean): void;
|
|
2182
|
-
getFillColorRGBA(block: DesignBlockId):
|
|
2183
|
-
setFillColorRGBA(block: DesignBlockId, r: number, g: number, b: number, a
|
|
4694
|
+
getFillColorRGBA(block: DesignBlockId): RGBA;
|
|
4695
|
+
setFillColorRGBA(block: DesignBlockId, r: number, g: number, b: number, a?: number): void;
|
|
2184
4696
|
getFill(block: DesignBlockId): DesignBlockId;
|
|
2185
4697
|
setFill(block: DesignBlockId, fill: DesignBlockId): void;
|
|
2186
|
-
getFillEnabled(block: DesignBlockId): boolean;
|
|
2187
4698
|
isFillEnabled(block: DesignBlockId): boolean;
|
|
2188
4699
|
setFillEnabled(block: DesignBlockId, enabled: boolean): void;
|
|
2189
|
-
getFillSolidColor(block: DesignBlockId):
|
|
4700
|
+
getFillSolidColor(block: DesignBlockId): RGBA;
|
|
2190
4701
|
setFillSolidColor(block: DesignBlockId, r: number, g: number, b: number, a?: number): void;
|
|
2191
4702
|
getGradientColorStops(block: DesignBlockId, property: string): GradientColorStop[];
|
|
2192
4703
|
setGradientColorStops(block: DesignBlockId, property: string, stops: GradientColorStop[]): void;
|
|
2193
4704
|
supportsStroke(block: DesignBlockId): boolean;
|
|
2194
4705
|
hasStroke(block: DesignBlockId): boolean;
|
|
2195
|
-
getStroke(block: DesignBlockId): DesignBlockId;
|
|
2196
|
-
setStroke(block: DesignBlockId, stroke: DesignBlockId): void;
|
|
2197
|
-
getStrokeEnabled(block: DesignBlockId): boolean;
|
|
2198
4706
|
isStrokeEnabled(block: DesignBlockId): boolean;
|
|
2199
4707
|
setStrokeEnabled(block: DesignBlockId, enabled: boolean): void;
|
|
2200
4708
|
getStrokeColor(block: DesignBlockId): Color;
|
|
2201
4709
|
setStrokeColor(block: DesignBlockId, color: Color): void;
|
|
2202
4710
|
getStrokeWidth(block: DesignBlockId): number;
|
|
2203
4711
|
setStrokeWidth(block: DesignBlockId, width: number): void;
|
|
2204
|
-
getStrokeStyle(block: DesignBlockId):
|
|
2205
|
-
setStrokeStyle(block: DesignBlockId, style:
|
|
2206
|
-
getStrokePosition(block: DesignBlockId):
|
|
2207
|
-
setStrokePosition(block: DesignBlockId, position:
|
|
2208
|
-
getStrokeCornerGeometry(block: DesignBlockId):
|
|
2209
|
-
setStrokeCornerGeometry(block: DesignBlockId, geometry:
|
|
4712
|
+
getStrokeStyle(block: DesignBlockId): StrokeStyle;
|
|
4713
|
+
setStrokeStyle(block: DesignBlockId, style: StrokeStyle): void;
|
|
4714
|
+
getStrokePosition(block: DesignBlockId): StrokePosition;
|
|
4715
|
+
setStrokePosition(block: DesignBlockId, position: StrokePosition): void;
|
|
4716
|
+
getStrokeCornerGeometry(block: DesignBlockId): StrokeCornerGeometry;
|
|
4717
|
+
setStrokeCornerGeometry(block: DesignBlockId, geometry: StrokeCornerGeometry): void;
|
|
2210
4718
|
getStrokeCap(block: DesignBlockId): StrokeCap;
|
|
2211
4719
|
setStrokeCap(block: DesignBlockId, cap: StrokeCap): void;
|
|
2212
4720
|
getStrokeStartCap(block: DesignBlockId): StrokeCap;
|
|
@@ -2222,8 +4730,8 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2222
4730
|
getStrokeDashOffset(block: DesignBlockId): number;
|
|
2223
4731
|
setStrokeDashOffset(block: DesignBlockId, dashOffset: number): void;
|
|
2224
4732
|
isLineOrigin(block: DesignBlockId): boolean;
|
|
2225
|
-
getStrokeColorRGBA(block: DesignBlockId):
|
|
2226
|
-
setStrokeColorRGBA(block: DesignBlockId, r: number, g: number, b: number, a
|
|
4733
|
+
getStrokeColorRGBA(block: DesignBlockId): RGBA;
|
|
4734
|
+
setStrokeColorRGBA(block: DesignBlockId, r: number, g: number, b: number, a?: number): void;
|
|
2227
4735
|
supportsEffects(block: DesignBlockId): boolean;
|
|
2228
4736
|
hasEffects(block: DesignBlockId): boolean;
|
|
2229
4737
|
getEffects(block: DesignBlockId): DesignBlockId[];
|
|
@@ -2237,7 +4745,6 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2237
4745
|
hasBlur(block: DesignBlockId): boolean;
|
|
2238
4746
|
getBlur(block: DesignBlockId): DesignBlockId;
|
|
2239
4747
|
setBlur(block: DesignBlockId, blur: DesignBlockId): void;
|
|
2240
|
-
getBlurEnabled(block: DesignBlockId): boolean;
|
|
2241
4748
|
isBlurEnabled(block: DesignBlockId): boolean;
|
|
2242
4749
|
setBlurEnabled(block: DesignBlockId, enabled: boolean): void;
|
|
2243
4750
|
supportsShape(block: DesignBlockId): boolean;
|
|
@@ -2253,8 +4760,8 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2253
4760
|
setLoopAnimation(block: DesignBlockId, animation: DesignBlockId): void;
|
|
2254
4761
|
supportsContentFillMode(block: DesignBlockId): boolean;
|
|
2255
4762
|
hasContentFillMode(block: DesignBlockId): boolean;
|
|
2256
|
-
getContentFillMode(block: DesignBlockId):
|
|
2257
|
-
setContentFillMode(block: DesignBlockId, mode:
|
|
4763
|
+
getContentFillMode(block: DesignBlockId): ContentFillMode;
|
|
4764
|
+
setContentFillMode(block: DesignBlockId, mode: ContentFillMode): void;
|
|
2258
4765
|
setContentFillHorizontalAlignment(block: DesignBlockId, alignment: HorizontalContentFillAlignment): void;
|
|
2259
4766
|
getContentFillHorizontalAlignment(block: DesignBlockId): HorizontalContentFillAlignment;
|
|
2260
4767
|
setContentFillVerticalAlignment(block: DesignBlockId, alignment: VerticalContentFillAlignment): void;
|
|
@@ -2262,7 +4769,7 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2262
4769
|
supportsCrop(block: DesignBlockId): boolean;
|
|
2263
4770
|
hasCrop(block: DesignBlockId): boolean;
|
|
2264
4771
|
resetCrop(block: DesignBlockId): void;
|
|
2265
|
-
adjustCropToFillFrame(block: DesignBlockId, minScaleRatio
|
|
4772
|
+
adjustCropToFillFrame(block: DesignBlockId, minScaleRatio: number): number;
|
|
2266
4773
|
getCropRotation(block: DesignBlockId): number;
|
|
2267
4774
|
setCropRotation(block: DesignBlockId, rotation: number): void;
|
|
2268
4775
|
getCropScaleX(block: DesignBlockId): number;
|
|
@@ -2285,8 +4792,8 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2285
4792
|
setDropShadowEnabled(block: DesignBlockId, enabled: boolean): void;
|
|
2286
4793
|
getDropShadowColor(block: DesignBlockId): Color;
|
|
2287
4794
|
setDropShadowColor(block: DesignBlockId, color: Color): void;
|
|
2288
|
-
getDropShadowColorRGBA(block: DesignBlockId):
|
|
2289
|
-
setDropShadowColorRGBA(block: DesignBlockId, r: number, g: number, b: number, a
|
|
4795
|
+
getDropShadowColorRGBA(block: DesignBlockId): RGBA;
|
|
4796
|
+
setDropShadowColorRGBA(block: DesignBlockId, r: number, g: number, b: number, a?: number): void;
|
|
2290
4797
|
getDropShadowOffsetX(block: DesignBlockId): number;
|
|
2291
4798
|
setDropShadowOffsetX(block: DesignBlockId, offset: number): void;
|
|
2292
4799
|
getDropShadowOffsetY(block: DesignBlockId): number;
|
|
@@ -2298,17 +4805,15 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2298
4805
|
getDropShadowClip(block: DesignBlockId): boolean;
|
|
2299
4806
|
setDropShadowClip(block: DesignBlockId, clip: boolean): void;
|
|
2300
4807
|
supportsBlendMode(block: DesignBlockId): boolean;
|
|
2301
|
-
getBlendMode(block: DesignBlockId):
|
|
2302
|
-
setBlendMode(block: DesignBlockId, mode:
|
|
4808
|
+
getBlendMode(block: DesignBlockId): BlendMode;
|
|
4809
|
+
setBlendMode(block: DesignBlockId, mode: BlendMode): void;
|
|
2303
4810
|
hasBlendMode(block: DesignBlockId): boolean;
|
|
2304
4811
|
supportsOpacity(block: DesignBlockId): boolean;
|
|
2305
4812
|
hasOpacity(block: DesignBlockId): boolean;
|
|
2306
4813
|
getOpacity(block: DesignBlockId): number;
|
|
2307
4814
|
setOpacity(block: DesignBlockId, opacity: number): void;
|
|
2308
|
-
getVisible(block: DesignBlockId): boolean;
|
|
2309
4815
|
isVisible(block: DesignBlockId): boolean;
|
|
2310
4816
|
setVisible(block: DesignBlockId, visible: boolean): void;
|
|
2311
|
-
getClipped(block: DesignBlockId): boolean;
|
|
2312
4817
|
isClipped(block: DesignBlockId): boolean;
|
|
2313
4818
|
setClipped(block: DesignBlockId, clipped: boolean): void;
|
|
2314
4819
|
setSelected(block: DesignBlockId, selected: boolean): void;
|
|
@@ -2322,8 +4827,8 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2322
4827
|
setAlwaysOnBottom(block: DesignBlockId, enabled: boolean): void;
|
|
2323
4828
|
isAlwaysOnTop(block: DesignBlockId): boolean;
|
|
2324
4829
|
isAlwaysOnBottom(block: DesignBlockId): boolean;
|
|
2325
|
-
alignHorizontally(blocks: DesignBlockId[], alignment:
|
|
2326
|
-
alignVertically(blocks: DesignBlockId[], alignment:
|
|
4830
|
+
alignHorizontally(blocks: DesignBlockId[], alignment: TextHorizontalAlignment): void;
|
|
4831
|
+
alignVertically(blocks: DesignBlockId[], alignment: TextVerticalAlignment): void;
|
|
2327
4832
|
isAlignable(blocks: DesignBlockId[]): boolean;
|
|
2328
4833
|
distributeHorizontally(blocks: DesignBlockId[]): void;
|
|
2329
4834
|
distributeVertically(blocks: DesignBlockId[]): void;
|
|
@@ -2333,7 +4838,7 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2333
4838
|
isGroupable(blocks: DesignBlockId[]): boolean;
|
|
2334
4839
|
enterGroup(group: DesignBlockId): void;
|
|
2335
4840
|
exitGroup(block: DesignBlockId): void;
|
|
2336
|
-
combine(blocks: DesignBlockId[], operation:
|
|
4841
|
+
combine(blocks: DesignBlockId[], operation: BooleanOperation): DesignBlockId;
|
|
2337
4842
|
isCombinable(blocks: DesignBlockId[]): boolean;
|
|
2338
4843
|
supportsDuration(block: DesignBlockId): boolean;
|
|
2339
4844
|
hasDuration(block: DesignBlockId): boolean;
|
|
@@ -2390,8 +4895,8 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2390
4895
|
hasBackgroundColor(block: DesignBlockId): boolean;
|
|
2391
4896
|
isBackgroundColorEnabled(block: DesignBlockId): boolean;
|
|
2392
4897
|
setBackgroundColorEnabled(block: DesignBlockId, enabled: boolean): void;
|
|
2393
|
-
getBackgroundColorRGBA(block: DesignBlockId):
|
|
2394
|
-
setBackgroundColorRGBA(block: DesignBlockId, r: number, g: number, b: number, a
|
|
4898
|
+
getBackgroundColorRGBA(block: DesignBlockId): RGBA;
|
|
4899
|
+
setBackgroundColorRGBA(block: DesignBlockId, r: number, g: number, b: number, a?: number): void;
|
|
2395
4900
|
hasMetadata(block: DesignBlockId, key: string): boolean;
|
|
2396
4901
|
getMetadata(block: DesignBlockId, key: string): string;
|
|
2397
4902
|
setMetadata(block: DesignBlockId, key: string, value: string): void;
|
|
@@ -2403,15 +4908,15 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2403
4908
|
/** @deprecated Use the options-object overload. */
|
|
2404
4909
|
getTextFontSizes(block: DesignBlockId, from?: number, to?: number): number[];
|
|
2405
4910
|
setTextFontSize(block: DesignBlockId, size: number, from?: number, to?: number): void;
|
|
2406
|
-
setTextFontSize(block: DesignBlockId, size: number, options
|
|
2407
|
-
getTextFontStyles(block: DesignBlockId, from?: number, to?: number):
|
|
2408
|
-
setTextFontStyle(block: DesignBlockId, style:
|
|
2409
|
-
getTextFontWeights(block: DesignBlockId, from?: number, to?: number):
|
|
2410
|
-
setTextFontWeight(block: DesignBlockId, weight:
|
|
4911
|
+
setTextFontSize(block: DesignBlockId, size: number, options?: TextFontSizeOptions): void;
|
|
4912
|
+
getTextFontStyles(block: DesignBlockId, from?: number, to?: number): FontStyle[];
|
|
4913
|
+
setTextFontStyle(block: DesignBlockId, style: FontStyle, from?: number, to?: number): void;
|
|
4914
|
+
getTextFontWeights(block: DesignBlockId, from?: number, to?: number): FontWeight[];
|
|
4915
|
+
setTextFontWeight(block: DesignBlockId, weight: FontWeight, from?: number, to?: number): void;
|
|
2411
4916
|
getTextColors(block: DesignBlockId, from?: number, to?: number): Color[];
|
|
2412
4917
|
setTextColor(block: DesignBlockId, color: Color, from?: number, to?: number): void;
|
|
2413
|
-
getTextCases(block: DesignBlockId, from?: number, to?: number):
|
|
2414
|
-
setTextCase(block: DesignBlockId, textCase:
|
|
4918
|
+
getTextCases(block: DesignBlockId, from?: number, to?: number): TextCase[];
|
|
4919
|
+
setTextCase(block: DesignBlockId, textCase: TextCase, from?: number, to?: number): void;
|
|
2415
4920
|
getTypefaces(block: DesignBlockId, from?: number, to?: number): Typeface[];
|
|
2416
4921
|
setTypeface(block: DesignBlockId, typeface: Typeface, from?: number, to?: number): void;
|
|
2417
4922
|
getTypeface(block: DesignBlockId): Typeface;
|
|
@@ -2428,10 +4933,10 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2428
4933
|
*/
|
|
2429
4934
|
getTextKernings(block: DesignBlockId, from?: number, to?: number): number[];
|
|
2430
4935
|
setFont(block: DesignBlockId, fontUri: string, typeface: Typeface): void;
|
|
2431
|
-
canToggleBoldFont(block: DesignBlockId): boolean;
|
|
2432
|
-
toggleBoldFont(block: DesignBlockId): void;
|
|
2433
|
-
canToggleItalicFont(block: DesignBlockId): boolean;
|
|
2434
|
-
toggleItalicFont(block: DesignBlockId): void;
|
|
4936
|
+
canToggleBoldFont(block: DesignBlockId, from?: number, to?: number): boolean;
|
|
4937
|
+
toggleBoldFont(block: DesignBlockId, from?: number, to?: number): void;
|
|
4938
|
+
canToggleItalicFont(block: DesignBlockId, from?: number, to?: number): boolean;
|
|
4939
|
+
toggleItalicFont(block: DesignBlockId, from?: number, to?: number): void;
|
|
2435
4940
|
/**
|
|
2436
4941
|
* Returns the current text cursor range as UTF-16 indices. When no block
|
|
2437
4942
|
* is currently being edited, returns `{ from: -1, to: -1 }`.
|
|
@@ -2443,8 +4948,6 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2443
4948
|
* the entire text).
|
|
2444
4949
|
*/
|
|
2445
4950
|
setTextCursorRange(range: Range): void;
|
|
2446
|
-
getTextCursorPositionInScreenSpaceX(block: DesignBlockId): number;
|
|
2447
|
-
getTextCursorPositionInScreenSpaceY(block: DesignBlockId): number;
|
|
2448
4951
|
getTextVisibleLineCount(block: DesignBlockId): number;
|
|
2449
4952
|
getTextVisibleLineContent(block: DesignBlockId, lineIndex: number): string;
|
|
2450
4953
|
getTextVisibleLineGlobalBoundingBoxXYWH(block: DesignBlockId, lineIndex: number): XYWH;
|
|
@@ -2459,7 +4962,7 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2459
4962
|
* @param to - End UTF-16 index (-1 = end of cursor selection or text length).
|
|
2460
4963
|
*/
|
|
2461
4964
|
getTextCharacterInkBoxes(block: DesignBlockId, from?: number, to?: number): CharacterInkBox[];
|
|
2462
|
-
getTextEffectiveHorizontalAlignment(block: DesignBlockId):
|
|
4965
|
+
getTextEffectiveHorizontalAlignment(block: DesignBlockId): "Left" | "Right" | "Center";
|
|
2463
4966
|
/**
|
|
2464
4967
|
* Returns the horizontal alignment override for a specific paragraph, or
|
|
2465
4968
|
* the block-level alignment for negative paragraph indices. Returns
|
|
@@ -2468,14 +4971,14 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2468
4971
|
* @param paragraphIndex - 0-based paragraph index. Negative values return
|
|
2469
4972
|
* the block-level `text/horizontalAlignment` setting.
|
|
2470
4973
|
*/
|
|
2471
|
-
getTextHorizontalAlignment(block: DesignBlockId, paragraphIndex?: number):
|
|
4974
|
+
getTextHorizontalAlignment(block: DesignBlockId, paragraphIndex?: number): TextHorizontalAlignment | undefined;
|
|
2472
4975
|
/**
|
|
2473
4976
|
* Sets the horizontal alignment override for a specific paragraph of a text
|
|
2474
4977
|
* block. Pass `undefined` for `alignment` to clear the paragraph-level
|
|
2475
4978
|
* override. Negative `paragraphIndex` clears all paragraph overrides and
|
|
2476
4979
|
* applies the alignment block-wide.
|
|
2477
4980
|
*/
|
|
2478
|
-
setTextHorizontalAlignment(block: DesignBlockId, alignment:
|
|
4981
|
+
setTextHorizontalAlignment(block: DesignBlockId, alignment: TextHorizontalAlignment | undefined, paragraphIndex?: number): void;
|
|
2479
4982
|
/**
|
|
2480
4983
|
* Returns the ordered list of unique text-decoration configurations within
|
|
2481
4984
|
* the given grapheme range. `from` / `to` are UTF-16 indices and are
|
|
@@ -2490,8 +4993,8 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2490
4993
|
toggleTextDecorationUnderline(block: DesignBlockId, from?: number, to?: number): void;
|
|
2491
4994
|
toggleTextDecorationStrikethrough(block: DesignBlockId, from?: number, to?: number): void;
|
|
2492
4995
|
toggleTextDecorationOverline(block: DesignBlockId, from?: number, to?: number): void;
|
|
2493
|
-
getTextListStyle(block: DesignBlockId, paragraphIndex: number):
|
|
2494
|
-
setTextListStyle(block: DesignBlockId, listStyle:
|
|
4996
|
+
getTextListStyle(block: DesignBlockId, paragraphIndex: number): ListStyle;
|
|
4997
|
+
setTextListStyle(block: DesignBlockId, listStyle: ListStyle, paragraphIndex?: number, listLevel?: number): void;
|
|
2495
4998
|
getTextListLevel(block: DesignBlockId, paragraphIndex: number): number;
|
|
2496
4999
|
setTextListLevel(block: DesignBlockId, listLevel: number, paragraphIndex?: number): void;
|
|
2497
5000
|
/**
|
|
@@ -2509,11 +5012,10 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2509
5012
|
getTextOnPathOffset(block: DesignBlockId): number;
|
|
2510
5013
|
setTextOnPathFlipped(block: DesignBlockId, flipped: boolean): void;
|
|
2511
5014
|
getTextOnPathFlipped(block: DesignBlockId): boolean;
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
addVideoFileURIToSourceSet(block: DesignBlockId, property: string, uri: string): Promise<void>;
|
|
5015
|
+
getSourceSet(block: DesignBlockId, property: SourceSetPropertyName): Source[];
|
|
5016
|
+
setSourceSet(block: DesignBlockId, property: SourceSetPropertyName, sources: Source[]): void;
|
|
5017
|
+
addImageFileURIToSourceSet(block: DesignBlockId, property: SourceSetPropertyName, uri: string): Promise<void>;
|
|
5018
|
+
addVideoFileURIToSourceSet(block: DesignBlockId, property: SourceSetPropertyName, uri: string): Promise<void>;
|
|
2517
5019
|
getVideoWidth(block: DesignBlockId): number;
|
|
2518
5020
|
getVideoHeight(block: DesignBlockId): number;
|
|
2519
5021
|
getAudioTrackCountFromVideo(block: DesignBlockId): number;
|
|
@@ -2544,17 +5046,17 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2544
5046
|
setPageDurationSource(page: DesignBlockId, block: DesignBlockId): void;
|
|
2545
5047
|
removePageDurationSource(page: DesignBlockId): void;
|
|
2546
5048
|
isPageDurationSource(block: DesignBlockId): boolean;
|
|
2547
|
-
isScopeEnabled(block: DesignBlockId, scope:
|
|
2548
|
-
setScopeEnabled(block: DesignBlockId, scope:
|
|
2549
|
-
isAllowedByScope(block: DesignBlockId, scope:
|
|
5049
|
+
isScopeEnabled(block: DesignBlockId, scope: Scope): boolean;
|
|
5050
|
+
setScopeEnabled(block: DesignBlockId, scope: Scope, enabled: boolean): void;
|
|
5051
|
+
isAllowedByScope(block: DesignBlockId, scope: Scope): boolean;
|
|
2550
5052
|
findAllProperties(block: DesignBlockId): string[];
|
|
2551
|
-
getPropertyType(
|
|
2552
|
-
isPropertyReadable(
|
|
2553
|
-
isPropertyWritable(
|
|
2554
|
-
getEnumValues
|
|
2555
|
-
getState(block: DesignBlockId):
|
|
5053
|
+
getPropertyType(property: string): PropertyType;
|
|
5054
|
+
isPropertyReadable(property: string): boolean;
|
|
5055
|
+
isPropertyWritable(property: string): boolean;
|
|
5056
|
+
getEnumValues<T = string>(enumProperty: string): T[];
|
|
5057
|
+
getState(block: DesignBlockId): BlockState;
|
|
2556
5058
|
export(block: DesignBlockId, options?: ExportOptions): Promise<Blob>;
|
|
2557
|
-
export(block: DesignBlockId, mimeType
|
|
5059
|
+
export(block: DesignBlockId, mimeType?: ExportOptions["mimeType"], options?: Omit<ExportOptions, "mimeType">): Promise<Blob>;
|
|
2558
5060
|
exportToBuffer(block: DesignBlockId, mimeType: string, options?: ExportOptions): Promise<Uint8Array>;
|
|
2559
5061
|
/**
|
|
2560
5062
|
* Exports a design block and a color mask to two separate buffers.
|
|
@@ -2570,26 +5072,16 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2570
5072
|
* @returns A promise that resolves with an array of two Uint8Arrays: [image, mask].
|
|
2571
5073
|
*/
|
|
2572
5074
|
exportWithColorMask(block: DesignBlockId, maskColorR: number, maskColorG: number, maskColorB: number, options?: ExportOptions): Promise<Blob[]>;
|
|
2573
|
-
exportWithColorMask(block: DesignBlockId, mimeType:
|
|
2574
|
-
exportVideo(block: DesignBlockId, options?: VideoExportOptions
|
|
2575
|
-
|
|
2576
|
-
onProgress?: (rendered: number, encoded: number, total: number) => void;
|
|
2577
|
-
}): Promise<Blob>;
|
|
2578
|
-
exportVideo(block: DesignBlockId, mimeType: string, progressCallback?: (rendered: number, encoded: number, total: number) => void, options?: VideoExportOptions): Promise<Blob>;
|
|
5075
|
+
exportWithColorMask(block: DesignBlockId, mimeType: ExportOptions["mimeType"] | undefined, maskColorR: number, maskColorG: number, maskColorB: number, options?: Omit<ExportOptions, "mimeType">): Promise<Blob[]>;
|
|
5076
|
+
exportVideo(block: DesignBlockId, options?: VideoExportOptions): Promise<Blob>;
|
|
5077
|
+
exportVideo(block: DesignBlockId, mimeType?: VideoExportOptions["mimeType"], progressCallback?: VideoExportOptions["onProgress"], options?: Omit<VideoExportOptions, "mimeType" | "onProgress">): Promise<Blob>;
|
|
2579
5078
|
exportVideoToBuffer(block: DesignBlockId, mimeType: string, options?: VideoExportOptions, progressCallback?: (rendered: number, encoded: number, total: number) => void): Promise<Uint8Array>;
|
|
2580
5079
|
/**
|
|
2581
|
-
* Export an audio block to a buffer
|
|
2582
|
-
*
|
|
2583
|
-
*
|
|
2584
|
-
* - WASM-style (preferred): `exportAudio(block, options?)` where `options.mimeType`
|
|
2585
|
-
* defaults to `'audio/wav'`.
|
|
2586
|
-
* - Native-only positional: `exportAudio(block, mimeType, options?)`.
|
|
2587
|
-
*
|
|
2588
|
-
* The two forms produce identical bytes; the WASM-style form keeps source
|
|
2589
|
-
* code portable between `@cesdk/node` (WASM) and `@cesdk/node-native`.
|
|
5080
|
+
* Export an audio block to a buffer, matching `@cesdk/node`:
|
|
5081
|
+
* `exportAudio(block, options?)` where `options.mimeType` defaults to
|
|
5082
|
+
* `'audio/wav'`.
|
|
2590
5083
|
*/
|
|
2591
5084
|
exportAudio(block: DesignBlockId, options?: AudioExportOptions): Promise<Blob>;
|
|
2592
|
-
exportAudio(block: DesignBlockId, mimeType: string, options?: AudioExportOptions): Promise<Blob>;
|
|
2593
5085
|
exportAudioToBuffer(block: DesignBlockId, mimeType: string, options?: AudioExportOptions): Promise<Uint8Array>;
|
|
2594
5086
|
loadFromString(content: string): Promise<DesignBlockId[]>;
|
|
2595
5087
|
loadFromURL(url: string): Promise<DesignBlockId[]>;
|
|
@@ -2600,7 +5092,7 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2600
5092
|
* @returns A promise that resolves with an array of block IDs.
|
|
2601
5093
|
*/
|
|
2602
5094
|
loadFromArchiveURL(url: string): Promise<DesignBlockId[]>;
|
|
2603
|
-
saveToString(blocks: DesignBlockId[]): Promise<string>;
|
|
5095
|
+
saveToString(blocks: DesignBlockId[], allowedResourceSchemes?: string[], onDisallowedResourceScheme?: (url: string, dataHash: string) => Promise<string>): Promise<string>;
|
|
2604
5096
|
saveToArchive(blocks: DesignBlockId[]): Promise<Blob>;
|
|
2605
5097
|
/**
|
|
2606
5098
|
* Force-load the audio/video resource for an audio block or video-fill block.
|
|
@@ -2642,7 +5134,7 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2642
5134
|
*
|
|
2643
5135
|
* @public
|
|
2644
5136
|
*/
|
|
2645
|
-
addImage(url: string, options?: AddImageOptions): DesignBlockId
|
|
5137
|
+
addImage(url: string, options?: AddImageOptions): Promise<DesignBlockId>;
|
|
2646
5138
|
/**
|
|
2647
5139
|
* Add a video to the current page as a graphic block with a video fill.
|
|
2648
5140
|
* Mirrors `@cesdk/node`'s `BlockAPI.addVideo` shape.
|
|
@@ -2651,7 +5143,7 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2651
5143
|
*
|
|
2652
5144
|
* @public
|
|
2653
5145
|
*/
|
|
2654
|
-
addVideo(url: string, options?: AddVideoOptions): DesignBlockId
|
|
5146
|
+
addVideo(url: string, width: number, height: number, options?: AddVideoOptions): Promise<DesignBlockId>;
|
|
2655
5147
|
/**
|
|
2656
5148
|
* Subscribe to state changes on a set of blocks. Matches WASM's
|
|
2657
5149
|
* `engine.block.onStateChanged(ids, callback)` contract — pass an empty
|
|
@@ -2684,6 +5176,48 @@ export declare class BlockAPI implements IBlockAPI {
|
|
|
2684
5176
|
* @returns A function to unsubscribe.
|
|
2685
5177
|
*/
|
|
2686
5178
|
onClicked(callback: (id: DesignBlockId) => void): () => void;
|
|
5179
|
+
getAudioInfoFromVideo(videoFillBlock: DesignBlockId): AudioTrackInfo[];
|
|
5180
|
+
createAudioFromVideo(videoFillBlock: DesignBlockId, trackIndex: number, options?: AudioFromVideoOptions): DesignBlockId;
|
|
5181
|
+
createAudiosFromVideo(videoFillBlock: DesignBlockId, options?: AudioFromVideoOptions): DesignBlockId[];
|
|
5182
|
+
createCaptionsFromURI(uri: string): Promise<DesignBlockId[]>;
|
|
5183
|
+
createCutoutFromBlocks(ids: DesignBlockId[], vectorizeDistanceThreshold?: number, simplifyDistanceThreshold?: number, useExistingShapeInformation?: boolean): DesignBlockId;
|
|
5184
|
+
createCutoutFromOperation(ids: DesignBlockId[], op: CutoutOperation): DesignBlockId;
|
|
5185
|
+
createCutoutFromPath(pathData: string): DesignBlockId;
|
|
5186
|
+
/** @deprecated Use `generateVideoThumbnailSequence` instead. */
|
|
5187
|
+
getVideoFillThumbnail(id: DesignBlockId, thumbnailHeight: number): Promise<Blob>;
|
|
5188
|
+
/** @deprecated Use `generateVideoThumbnailSequence` instead. */
|
|
5189
|
+
getVideoFillThumbnailAtlas(id: DesignBlockId, numberOfColumns: number, numberOfRows: number, thumbnailHeight: number): Promise<Blob>;
|
|
5190
|
+
/** @deprecated */
|
|
5191
|
+
getPageThumbnailAtlas(id: DesignBlockId, numberOfColumns: number, numberOfRows: number, thumbnailHeight: number): Promise<Blob>;
|
|
5192
|
+
unstable_isAVResourceLoaded(id: DesignBlockId): boolean;
|
|
5193
|
+
referencesAnyVariables(id: DesignBlockId): boolean;
|
|
5194
|
+
/** @deprecated Use `getColor`. */
|
|
5195
|
+
getColorSpotName(id: DesignBlockId, property: string): string;
|
|
5196
|
+
/** @deprecated Use `getColor`. */
|
|
5197
|
+
getColorSpotTint(id: DesignBlockId, property: string): number;
|
|
5198
|
+
/** @deprecated Use `setColor`. */
|
|
5199
|
+
setColorSpot(id: DesignBlockId, property: string, name: string, tint?: number): void;
|
|
5200
|
+
setState(id: DesignBlockId, state: BlockState): void;
|
|
5201
|
+
canRevertToOriginalRatio(id: DesignBlockId): boolean;
|
|
5202
|
+
getFillOverprint(id: DesignBlockId): boolean;
|
|
5203
|
+
setFillOverprint(id: DesignBlockId, overprint: boolean): void;
|
|
5204
|
+
getStrokeOverprint(id: DesignBlockId): boolean;
|
|
5205
|
+
setStrokeOverprint(id: DesignBlockId, overprint: boolean): void;
|
|
5206
|
+
getDominantColors(handle: DesignBlockId, options?: DominantColorsOptions): Promise<DominantColor[]>;
|
|
5207
|
+
getTextRuns(id: DesignBlockId, from?: number, to?: number): TextRunInfo[];
|
|
5208
|
+
getBackgroundTrack(): DesignBlockId | null;
|
|
5209
|
+
moveToBackgroundTrack(block: DesignBlockId): void;
|
|
5210
|
+
/**
|
|
5211
|
+
* Generates a sequence of video thumbnails; `onFrame` is called per frame.
|
|
5212
|
+
* Node has no `ImageData`, so each frame is a raw RGBA `{ data, width,
|
|
5213
|
+
* height }` (see `ThumbnailFrame`).
|
|
5214
|
+
*/
|
|
5215
|
+
generateVideoThumbnailSequence(id: DesignBlockId, thumbnailHeight: number, timeBegin: number, timeEnd: number, numberOfFrames: number, onFrame: (frameIndex: number, result: ThumbnailFrame | Error) => void): () => void;
|
|
5216
|
+
/**
|
|
5217
|
+
* Generates a sequence of audio waveform sample chunks. `onChunk` is called
|
|
5218
|
+
* per chunk with a `Float32Array` of samples (matching @cesdk/node).
|
|
5219
|
+
*/
|
|
5220
|
+
generateAudioThumbnailSequence(id: DesignBlockId, samplesPerChunk: number, timeBegin: number, timeEnd: number, numberOfSamples: number, numberOfChannels: number, onChunk: (chunkIndex: number, result: Float32Array | Error) => void): () => void;
|
|
2687
5221
|
}
|
|
2688
5222
|
/**
|
|
2689
5223
|
* SceneAPI provides methods for managing scenes and pages
|
|
@@ -2742,7 +5276,10 @@ export declare class SceneAPI implements ISceneAPI {
|
|
|
2742
5276
|
*
|
|
2743
5277
|
* @returns A promise that resolves with the serialized scene.
|
|
2744
5278
|
*/
|
|
5279
|
+
saveToString(allowedResourceSchemes: string[], onDisallowedResourceScheme?: (url: string, dataHash: string) => Promise<string>): Promise<string>;
|
|
2745
5280
|
saveToString(options?: {
|
|
5281
|
+
allowedResourceSchemes?: string[];
|
|
5282
|
+
onDisallowedResourceScheme?: (url: string, dataHash: string) => Promise<string>;
|
|
2746
5283
|
compression?: {
|
|
2747
5284
|
format?: CompressionFormat;
|
|
2748
5285
|
level?: CompressionLevel;
|
|
@@ -2796,34 +5333,34 @@ export declare class SceneAPI implements ISceneAPI {
|
|
|
2796
5333
|
* @deprecated Scene mode no longer affects engine behavior. All features work regardless of mode.
|
|
2797
5334
|
* @returns The current mode of the scene, or null if no mode has been set.
|
|
2798
5335
|
*/
|
|
2799
|
-
getMode():
|
|
5336
|
+
getMode(): SceneMode | null;
|
|
2800
5337
|
/**
|
|
2801
5338
|
* Set the mode of the current scene.
|
|
2802
5339
|
* @param mode - The new mode for the scene ('Design' or 'Video').
|
|
2803
5340
|
*/
|
|
2804
|
-
setMode(mode:
|
|
5341
|
+
setMode(mode: SceneMode): void;
|
|
2805
5342
|
/**
|
|
2806
5343
|
* Converts all values of the current scene into the given design unit.
|
|
2807
5344
|
* @param designUnit - The new design unit of the scene.
|
|
2808
5345
|
*/
|
|
2809
|
-
setDesignUnit(designUnit:
|
|
5346
|
+
setDesignUnit(designUnit: SceneDesignUnit$1): void;
|
|
2810
5347
|
/**
|
|
2811
5348
|
* Returns the design unit of the current scene.
|
|
2812
5349
|
* @returns The current design unit.
|
|
2813
5350
|
*/
|
|
2814
|
-
getDesignUnit():
|
|
5351
|
+
getDesignUnit(): SceneDesignUnit$1;
|
|
2815
5352
|
/**
|
|
2816
5353
|
* Sets the unit ('Pixel' | 'Point') in which the current scene's font sizes
|
|
2817
5354
|
* are interpreted at the API boundary (setTextFontSize / getTextFontSizes).
|
|
2818
5355
|
* The engine stores font sizes in points internally.
|
|
2819
5356
|
* @param unit - The new font-size unit.
|
|
2820
5357
|
*/
|
|
2821
|
-
setFontSizeUnit(unit:
|
|
5358
|
+
setFontSizeUnit(unit: SceneFontSizeUnit): void;
|
|
2822
5359
|
/**
|
|
2823
5360
|
* Returns the font-size unit of the current scene ('Pixel' | 'Point').
|
|
2824
5361
|
* @returns The current font-size unit.
|
|
2825
5362
|
*/
|
|
2826
|
-
getFontSizeUnit():
|
|
5363
|
+
getFontSizeUnit(): SceneFontSizeUnit;
|
|
2827
5364
|
/** Start or stop playback of the current page. */
|
|
2828
5365
|
setPlaying(play: boolean): void;
|
|
2829
5366
|
/**
|
|
@@ -2852,13 +5389,13 @@ export declare class SceneAPI implements ISceneAPI {
|
|
|
2852
5389
|
* @returns The current page in the scene or null when there is no scene
|
|
2853
5390
|
* available or no current page is set.
|
|
2854
5391
|
*/
|
|
2855
|
-
getCurrentPage(
|
|
5392
|
+
getCurrentPage(): DesignBlockId | null;
|
|
2856
5393
|
/**
|
|
2857
5394
|
* Find all blocks with the given type sorted by the distance to viewport center.
|
|
2858
5395
|
* @param type - The type to search for.
|
|
2859
5396
|
* @returns A list of block ids sorted by distance to viewport center.
|
|
2860
5397
|
*/
|
|
2861
|
-
findNearestToViewPortCenterByType(type:
|
|
5398
|
+
findNearestToViewPortCenterByType(type: DesignBlockType): DesignBlockId[];
|
|
2862
5399
|
/**
|
|
2863
5400
|
* Find all blocks with the given kind sorted by the distance to viewport center.
|
|
2864
5401
|
* @param kind - The kind to search for.
|
|
@@ -2909,7 +5446,8 @@ export declare class SceneAPI implements ISceneAPI {
|
|
|
2909
5446
|
* @param id - The block to follow.
|
|
2910
5447
|
* @param axis - 'Horizontal' | 'Vertical' | 'Both'.
|
|
2911
5448
|
*/
|
|
2912
|
-
enableZoomAutoFit(id: DesignBlockId, axis:
|
|
5449
|
+
enableZoomAutoFit(id: DesignBlockId, axis: "Horizontal" | "Vertical", paddingBefore?: number, paddingAfter?: number): void;
|
|
5450
|
+
enableZoomAutoFit(id: DesignBlockId, axis: "Both", paddingLeft?: number, paddingTop?: number, paddingRight?: number, paddingBottom?: number): void;
|
|
2913
5451
|
/**
|
|
2914
5452
|
* Disables any previously set zoom auto-fit.
|
|
2915
5453
|
* @param blockOrScene - The scene or a block in the scene.
|
|
@@ -2927,8 +5465,8 @@ export declare class SceneAPI implements ISceneAPI {
|
|
|
2927
5465
|
* @experimental
|
|
2928
5466
|
*/
|
|
2929
5467
|
unstable_enableCameraPositionClamping(blocks: DesignBlockId[], paddingLeft?: number, paddingTop?: number, paddingRight?: number, paddingBottom?: number, scaledPaddingLeft?: number, scaledPaddingTop?: number, scaledPaddingRight?: number, scaledPaddingBottom?: number): void;
|
|
2930
|
-
unstable_disableCameraPositionClamping(
|
|
2931
|
-
unstable_isCameraPositionClampingEnabled(
|
|
5468
|
+
unstable_disableCameraPositionClamping(blockOrScene?: number | null): void;
|
|
5469
|
+
unstable_isCameraPositionClampingEnabled(blockOrScene?: number | null): boolean;
|
|
2932
5470
|
/**
|
|
2933
5471
|
* Continually clamp the camera zoom level to the range
|
|
2934
5472
|
* `[minZoomLimit, maxZoomLimit]` while showing the given blocks (with
|
|
@@ -2936,8 +5474,8 @@ export declare class SceneAPI implements ISceneAPI {
|
|
|
2936
5474
|
* @experimental
|
|
2937
5475
|
*/
|
|
2938
5476
|
unstable_enableCameraZoomClamping(blocks: DesignBlockId[], minZoomLimit?: number, maxZoomLimit?: number, paddingLeft?: number, paddingTop?: number, paddingRight?: number, paddingBottom?: number): void;
|
|
2939
|
-
unstable_disableCameraZoomClamping(
|
|
2940
|
-
unstable_isCameraZoomClampingEnabled(
|
|
5477
|
+
unstable_disableCameraZoomClamping(blockOrScene?: number | null): void;
|
|
5478
|
+
unstable_isCameraZoomClampingEnabled(blockOrScene?: number | null): boolean;
|
|
2941
5479
|
/**
|
|
2942
5480
|
* Subscribe to zoom-level changes.
|
|
2943
5481
|
* @param callback - Called whenever the zoom level changes.
|
|
@@ -2957,8 +5495,8 @@ export declare class SceneAPI implements ISceneAPI {
|
|
|
2957
5495
|
export declare class EditorAPI implements IEditorAPI {
|
|
2958
5496
|
#private;
|
|
2959
5497
|
constructor(engine: NativeEngine);
|
|
2960
|
-
getEditMode():
|
|
2961
|
-
setEditMode(mode: string): void;
|
|
5498
|
+
getEditMode(): EditMode;
|
|
5499
|
+
setEditMode(mode: EditMode, baseMode?: string): void;
|
|
2962
5500
|
/**
|
|
2963
5501
|
* Returns the JWT string of the currently active license. An empty string
|
|
2964
5502
|
* indicates the engine is in Evaluation mode (the trial license created
|
|
@@ -2979,31 +5517,59 @@ export declare class EditorAPI implements IEditorAPI {
|
|
|
2979
5517
|
* at runtime (e.g. trial → paid upgrade in place).
|
|
2980
5518
|
*/
|
|
2981
5519
|
unlockWithLicense(license: string): void;
|
|
2982
|
-
getSettingBool(
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
5520
|
+
getSettingBool(keypath: SettingsBool): boolean;
|
|
5521
|
+
/** @deprecated Support for `ubq://` prefixed keypaths will be removed in a future release. */
|
|
5522
|
+
getSettingBool(keypath: `ubq://${SettingsBool}`): boolean;
|
|
5523
|
+
getSettingBool(keypath: SettingBoolPropertyName): boolean;
|
|
5524
|
+
setSettingBool(keypath: SettingsBool, value: boolean): void;
|
|
5525
|
+
/** @deprecated Support for `ubq://` prefixed keypaths will be removed in a future release. */
|
|
5526
|
+
setSettingBool(keypath: `ubq://${SettingsBool}`, value: boolean): void;
|
|
5527
|
+
getSettingInt(keypath: SettingsInt): number;
|
|
5528
|
+
getSettingInt(keypath: SettingIntPropertyName): number;
|
|
5529
|
+
setSettingInt(keypath: SettingsInt, value: number): void;
|
|
5530
|
+
setSettingInt(keypath: SettingIntPropertyName, value: number): void;
|
|
5531
|
+
getSettingFloat(keypath: SettingsFloat): number;
|
|
5532
|
+
/** @deprecated Support for `ubq://` prefixed keypaths will be removed in a future release. */
|
|
5533
|
+
getSettingFloat(keypath: `ubq://${SettingsFloat}`): number;
|
|
5534
|
+
getSettingFloat(keypath: SettingFloatPropertyName): number;
|
|
5535
|
+
setSettingFloat(keypath: SettingsFloat, value: number): void;
|
|
5536
|
+
/** @deprecated Support for `ubq://` prefixed keypaths will be removed in a future release. */
|
|
5537
|
+
setSettingFloat(keypath: `ubq://${SettingsFloat}`, value: number): void;
|
|
5538
|
+
setSettingFloat(keypath: SettingFloatPropertyName, value: number): void;
|
|
5539
|
+
getSettingString(keypath: SettingsString): string;
|
|
5540
|
+
/** @deprecated Support for `ubq://` prefixed keypaths will be removed in a future release. */
|
|
5541
|
+
getSettingString(keypath: `ubq://${SettingsString}`): string;
|
|
5542
|
+
getSettingString(keypath: SettingStringPropertyName): string;
|
|
5543
|
+
setSettingString(keypath: SettingsString, value: string): void;
|
|
5544
|
+
/** @deprecated Support for `ubq://` prefixed keypaths will be removed in a future release. */
|
|
5545
|
+
setSettingString(keypath: `ubq://${SettingsString}`, value: string): void;
|
|
5546
|
+
setSettingString(keypath: SettingStringPropertyName, value: string): void;
|
|
5547
|
+
getSettingColor(keypath: SettingsColor): Color;
|
|
5548
|
+
/** @deprecated Support for `ubq://` prefixed keypaths will be removed in a future release. */
|
|
5549
|
+
getSettingColor(keypath: `ubq://${SettingsColor}`): Color;
|
|
5550
|
+
getSettingColor(keypath: SettingColorPropertyName): Color;
|
|
5551
|
+
setSettingColor(keypath: SettingsColor, value: Color): void;
|
|
5552
|
+
/** @deprecated Support for `ubq://` prefixed keypaths will be removed in a future release. */
|
|
5553
|
+
setSettingColor(keypath: `ubq://${SettingsColor}`, value: Color): void;
|
|
5554
|
+
setSettingColor(keypath: SettingColorPropertyName, value: Color): void;
|
|
5555
|
+
getSettingEnum<T extends keyof SettingEnumType>(keypath: T): SettingEnumType[T];
|
|
5556
|
+
getSettingEnum(keypath: string): string;
|
|
5557
|
+
setSettingEnum<T extends keyof SettingEnumType>(keypath: T, value: SettingEnumType[T]): void;
|
|
5558
|
+
setSettingEnum(keypath: string, value: string): void;
|
|
2994
5559
|
findAllSettings(): string[];
|
|
2995
|
-
getSettingType(
|
|
2996
|
-
getSettingEnumOptions(
|
|
5560
|
+
getSettingType(keypath: string): SettingType;
|
|
5561
|
+
getSettingEnumOptions<T extends keyof SettingEnumType>(keypath: T): SettingEnumType[T][];
|
|
5562
|
+
getSettingEnumOptions(keypath: string): string[];
|
|
2997
5563
|
/**
|
|
2998
5564
|
* Generic setting getter that dispatches to the typed getter based on
|
|
2999
5565
|
* `getSettingType`.
|
|
3000
5566
|
*/
|
|
3001
|
-
getSetting<
|
|
5567
|
+
getSetting<K extends SettingKey>(keypath: OptionalPrefix<K>): SettingValueType<K>;
|
|
3002
5568
|
/**
|
|
3003
5569
|
* Generic setting setter — dispatches to the typed setter via
|
|
3004
5570
|
* `getSettingType`.
|
|
3005
5571
|
*/
|
|
3006
|
-
setSetting(
|
|
5572
|
+
setSetting<K extends SettingKey>(keypath: OptionalPrefix<K>, value: SettingValueType<K>): void;
|
|
3007
5573
|
/** Get the font metrics for a font URI. */
|
|
3008
5574
|
getFontMetrics(fontFileUri: string): Promise<FontMetrics>;
|
|
3009
5575
|
/**
|
|
@@ -3022,13 +5588,27 @@ export declare class EditorAPI implements IEditorAPI {
|
|
|
3022
5588
|
* `{ block }` / `{ blockType }` (or array) removes the matching scope(s).
|
|
3023
5589
|
*/
|
|
3024
5590
|
removeMovementConstraint(scopes?: MovementConstraintScope | MovementConstraintScope[]): void;
|
|
3025
|
-
getCursorType():
|
|
5591
|
+
getCursorType(): "Arrow" | "Move" | "MoveNotPermitted" | "Resize" | "Rotate" | "Text" | "Cell";
|
|
3026
5592
|
getCursorRotation(): number;
|
|
3027
|
-
setSafeAreaInsets(insets:
|
|
3028
|
-
|
|
5593
|
+
setSafeAreaInsets(insets: {
|
|
5594
|
+
left?: number;
|
|
5595
|
+
top?: number;
|
|
5596
|
+
right?: number;
|
|
5597
|
+
bottom?: number;
|
|
5598
|
+
}): void;
|
|
5599
|
+
getSafeAreaInsets(): {
|
|
5600
|
+
left: number;
|
|
5601
|
+
top: number;
|
|
5602
|
+
right: number;
|
|
5603
|
+
bottom: number;
|
|
5604
|
+
};
|
|
3029
5605
|
getUsedMemory(): number;
|
|
3030
5606
|
getAvailableMemory(): number;
|
|
3031
|
-
convertColorToColorSpace(color: Color, colorSpace:
|
|
5607
|
+
convertColorToColorSpace(color: Color, colorSpace: "sRGB"): RGBAColor;
|
|
5608
|
+
/** */
|
|
5609
|
+
convertColorToColorSpace(color: Color, colorSpace: "CMYK"): CMYKColor;
|
|
5610
|
+
/** */
|
|
5611
|
+
convertColorToColorSpace(color: Color, colorSpace: ColorSpace): never;
|
|
3032
5612
|
supportsP3(): boolean;
|
|
3033
5613
|
getAbsoluteURI(relativeUri: string): Promise<string>;
|
|
3034
5614
|
getMimeType(uri: string): Promise<string>;
|
|
@@ -3042,7 +5622,7 @@ export declare class EditorAPI implements IEditorAPI {
|
|
|
3042
5622
|
*
|
|
3043
5623
|
* @public
|
|
3044
5624
|
*/
|
|
3045
|
-
setURIResolver(resolver: SyncURIResolver
|
|
5625
|
+
setURIResolver(resolver: SyncURIResolver): void;
|
|
3046
5626
|
/**
|
|
3047
5627
|
* Register an asynchronous URI resolver. Matches `@cesdk/node`'s
|
|
3048
5628
|
* `(uri, defaultResolver) => Promise<string> | string` signature
|
|
@@ -3059,24 +5639,58 @@ export declare class EditorAPI implements IEditorAPI {
|
|
|
3059
5639
|
/**
|
|
3060
5640
|
* List all transient (in-engine) resources — typically `buffer://` URIs
|
|
3061
5641
|
* created by importers (psd, pdf, idml) before they're uploaded to a
|
|
3062
|
-
* permanent location. Each entry is `{
|
|
5642
|
+
* permanent location. Each entry is `{ URL, size }`, matching `@cesdk/node`.
|
|
3063
5643
|
*
|
|
3064
|
-
*
|
|
3065
|
-
*
|
|
3066
|
-
* `transient-resource-relocation.test.ts`).
|
|
5644
|
+
* @category Resource Management
|
|
5645
|
+
* @returns The URLs and sizes of transient resources.
|
|
3067
5646
|
*/
|
|
3068
|
-
findAllTransientResources():
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
5647
|
+
findAllTransientResources(): TransientResource[];
|
|
5648
|
+
/**
|
|
5649
|
+
* Reads a resource's bytes in chunks. `onData` is called per chunk with a
|
|
5650
|
+
* `Uint8Array`; return `false` to stop early. Returns once fully streamed.
|
|
5651
|
+
*
|
|
5652
|
+
* @category Resource Management
|
|
5653
|
+
* @param uri - The URL of the resource.
|
|
5654
|
+
* @param chunkSize - Size in bytes of each chunk passed to `onData`.
|
|
5655
|
+
* @param onData - Called with each chunk; return `false` to stop.
|
|
5656
|
+
*/
|
|
5657
|
+
getResourceData(uri: string, chunkSize: number, onData: (result: Uint8Array) => boolean): void;
|
|
5658
|
+
getMaxExportSize(): number;
|
|
5659
|
+
unstable_isInteractionHappening(): boolean;
|
|
5660
|
+
isHighlightingEnabled(id: DesignBlockId): boolean;
|
|
5661
|
+
setHighlightingEnabled(id: DesignBlockId, enabled: boolean): void;
|
|
5662
|
+
isSelectionEnabled(id: DesignBlockId): boolean;
|
|
5663
|
+
setSelectionEnabled(id: DesignBlockId, enabled: boolean): void;
|
|
5664
|
+
getTextCursorPositionInScreenSpaceX(): number;
|
|
5665
|
+
getTextCursorPositionInScreenSpaceY(): number;
|
|
5666
|
+
getSpotColorForCutoutType(type: CutoutType): string;
|
|
5667
|
+
setSpotColorForCutoutType(type: CutoutType, color: string): void;
|
|
5668
|
+
/** @deprecated Use `getSettingColor` instead. */
|
|
5669
|
+
getSettingColorRGBA(keypath: SettingsColorRGBA | `ubq://${SettingsColorRGBA}`): RGBA;
|
|
5670
|
+
/** @deprecated Use `setSettingColor` instead. */
|
|
5671
|
+
setSettingColorRGBA(keypath: SettingsColorRGBA | `ubq://${SettingsColorRGBA}`, r: number, g: number, b: number, a?: number): void;
|
|
5672
|
+
addVectorNode(): void;
|
|
5673
|
+
deleteVectorNode(): void;
|
|
5674
|
+
deleteSelectedVectorControlPoints(): void;
|
|
5675
|
+
getSelectedVectorNodeMirrorMode(): number;
|
|
5676
|
+
setSelectedVectorNodeMirrorMode(mode: number): void;
|
|
5677
|
+
getVectorEditAddMode(): boolean;
|
|
5678
|
+
setVectorEditAddMode(active: boolean): void;
|
|
5679
|
+
getVectorEditBendMode(): boolean;
|
|
5680
|
+
setVectorEditBendMode(active: boolean): void;
|
|
5681
|
+
getVectorEditDeleteMode(): boolean;
|
|
5682
|
+
setVectorEditDeleteMode(active: boolean): void;
|
|
5683
|
+
hasSelectedVectorNode(): boolean;
|
|
5684
|
+
hasSelectedVectorControlPoint(): boolean;
|
|
5685
|
+
toggleSelectedVectorNodeSmooth(): void;
|
|
3072
5686
|
findAllSpotColors(): string[];
|
|
3073
|
-
getSpotColorRGBA(name: string):
|
|
3074
|
-
getSpotColorCMYK(name: string):
|
|
5687
|
+
getSpotColorRGBA(name: string): RGBA;
|
|
5688
|
+
getSpotColorCMYK(name: string): CMYK;
|
|
3075
5689
|
setSpotColorRGB(name: string, r: number, g: number, b: number): void;
|
|
3076
5690
|
setSpotColorCMYK(name: string, c: number, m: number, y: number, k: number): void;
|
|
3077
5691
|
removeSpotColor(name: string): void;
|
|
3078
|
-
getRole():
|
|
3079
|
-
setRole(role:
|
|
5692
|
+
getRole(): RoleString;
|
|
5693
|
+
setRole(role: RoleString): void;
|
|
3080
5694
|
/**
|
|
3081
5695
|
* Start the engine's analytics tracking pipeline. Mirrors
|
|
3082
5696
|
* `@cesdk/node`'s `editor.startTracking(license, userId)`; invoked
|
|
@@ -3092,9 +5706,9 @@ export declare class EditorAPI implements IEditorAPI {
|
|
|
3092
5706
|
* @public
|
|
3093
5707
|
*/
|
|
3094
5708
|
startTracking(license: string, userId: string, deviceId?: string): void;
|
|
3095
|
-
findAllScopes():
|
|
3096
|
-
getGlobalScope(scope:
|
|
3097
|
-
setGlobalScope(scope:
|
|
5709
|
+
findAllScopes(): Scope[];
|
|
5710
|
+
getGlobalScope(scope: Scope): "Allow" | "Deny" | "Defer";
|
|
5711
|
+
setGlobalScope(scope: Scope, value: "Allow" | "Deny" | "Defer"): void;
|
|
3098
5712
|
createHistory(): HistoryId;
|
|
3099
5713
|
destroyHistory(history: HistoryId): void;
|
|
3100
5714
|
getActiveHistory(): HistoryId;
|
|
@@ -3152,7 +5766,7 @@ export declare class EditorAPI implements IEditorAPI {
|
|
|
3152
5766
|
* @param callback - Called with the new role when it changes.
|
|
3153
5767
|
* @returns A function that unsubscribes when called.
|
|
3154
5768
|
*/
|
|
3155
|
-
onRoleChanged(callback: (role:
|
|
5769
|
+
onRoleChanged(callback: (role: RoleString) => void): () => void;
|
|
3156
5770
|
/**
|
|
3157
5771
|
* Create a new buffer and return its URI.
|
|
3158
5772
|
* @returns A URI to identify the created buffer (buffer://N format).
|
|
@@ -3275,14 +5889,12 @@ export declare class AssetAPI implements IAssetAPI {
|
|
|
3275
5889
|
* @param query - Query options to filter and sort the search results.
|
|
3276
5890
|
* @returns Promise resolving to paginated search results.
|
|
3277
5891
|
*/
|
|
3278
|
-
findAssets(sourceId: string, query:
|
|
5892
|
+
findAssets(sourceId: string, query: AssetQueryData): Promise<AssetsQueryResult<CompleteAssetResult>>;
|
|
3279
5893
|
/**
|
|
3280
5894
|
* Fetch a specific asset by id from an asset source.
|
|
3281
5895
|
* Returns `null` when the asset is not found.
|
|
3282
5896
|
*/
|
|
3283
|
-
fetchAsset(sourceId: string, assetId: string, params?:
|
|
3284
|
-
locale?: string;
|
|
3285
|
-
}): Promise<CompleteAssetResult | null>;
|
|
5897
|
+
fetchAsset(sourceId: string, assetId: string, params?: Pick<AssetQueryData, "locale">): Promise<CompleteAssetResult | null>;
|
|
3286
5898
|
/**
|
|
3287
5899
|
* Get available asset groups from a source.
|
|
3288
5900
|
* @param id - The ID of the asset source.
|
|
@@ -3318,7 +5930,7 @@ export declare class AssetAPI implements IAssetAPI {
|
|
|
3318
5930
|
* @param sourceId - The local asset source ID.
|
|
3319
5931
|
* @param asset - The asset definition to add.
|
|
3320
5932
|
*/
|
|
3321
|
-
addAssetToSource(sourceId: string, asset:
|
|
5933
|
+
addAssetToSource(sourceId: string, asset: AssetDefinition): void;
|
|
3322
5934
|
/**
|
|
3323
5935
|
* Remove an asset from a local asset source.
|
|
3324
5936
|
* @param sourceId - The ID of the local asset source.
|
|
@@ -3335,19 +5947,19 @@ export declare class AssetAPI implements IAssetAPI {
|
|
|
3335
5947
|
* @param callback - Called with the source ID whenever a new asset source is registered.
|
|
3336
5948
|
* @returns A function that unsubscribes when called.
|
|
3337
5949
|
*/
|
|
3338
|
-
onAssetSourceAdded(callback: (
|
|
5950
|
+
onAssetSourceAdded(callback: (sourceID: string) => void): () => void;
|
|
3339
5951
|
/**
|
|
3340
5952
|
* Subscribe to "asset source removed" events.
|
|
3341
5953
|
* @param callback - Called with the source ID whenever an asset source is removed.
|
|
3342
5954
|
* @returns A function that unsubscribes when called.
|
|
3343
5955
|
*/
|
|
3344
|
-
onAssetSourceRemoved(callback: (
|
|
5956
|
+
onAssetSourceRemoved(callback: (sourceID: string) => void): () => void;
|
|
3345
5957
|
/**
|
|
3346
5958
|
* Subscribe to "asset source updated" events.
|
|
3347
5959
|
* @param callback - Called with the source ID whenever an asset source's contents change.
|
|
3348
5960
|
* @returns A function that unsubscribes when called.
|
|
3349
5961
|
*/
|
|
3350
|
-
onAssetSourceUpdated(callback: (
|
|
5962
|
+
onAssetSourceUpdated(callback: (sourceID: string) => void): () => void;
|
|
3351
5963
|
/**
|
|
3352
5964
|
* Apply an asset to the current scene. Honors any middleware registered
|
|
3353
5965
|
* via {@link registerApplyMiddleware} and falls back to
|
|
@@ -3355,7 +5967,7 @@ export declare class AssetAPI implements IAssetAPI {
|
|
|
3355
5967
|
*
|
|
3356
5968
|
* @public
|
|
3357
5969
|
*/
|
|
3358
|
-
apply(sourceId: string,
|
|
5970
|
+
apply(sourceId: string, assetResult: AssetResult, options?: ApplyAssetOptions): Promise<DesignBlockId | undefined>;
|
|
3359
5971
|
/**
|
|
3360
5972
|
* Apply an asset to a specific block. Honors any middleware registered
|
|
3361
5973
|
* via {@link registerApplyToBlockMiddleware} and falls back to
|
|
@@ -3363,13 +5975,13 @@ export declare class AssetAPI implements IAssetAPI {
|
|
|
3363
5975
|
*
|
|
3364
5976
|
* @public
|
|
3365
5977
|
*/
|
|
3366
|
-
applyToBlock(sourceId: string,
|
|
5978
|
+
applyToBlock(sourceId: string, assetResult: AssetResult, block: DesignBlockId): Promise<void>;
|
|
3367
5979
|
/**
|
|
3368
5980
|
* Apply a property change from an asset payload.
|
|
3369
5981
|
*
|
|
3370
5982
|
* @public
|
|
3371
5983
|
*/
|
|
3372
|
-
applyProperty(sourceId: string, asset:
|
|
5984
|
+
applyProperty(sourceId: string, asset: AssetResult, property: AssetProperty): Promise<void>;
|
|
3373
5985
|
/**
|
|
3374
5986
|
* Default apply-asset implementation (no middleware). Calls the engine's
|
|
3375
5987
|
* built-in apply logic; used as the tail of the middleware chain in
|
|
@@ -3377,30 +5989,30 @@ export declare class AssetAPI implements IAssetAPI {
|
|
|
3377
5989
|
*
|
|
3378
5990
|
* @public
|
|
3379
5991
|
*/
|
|
3380
|
-
defaultApplyAsset(asset:
|
|
5992
|
+
defaultApplyAsset(asset: AssetResult): Promise<DesignBlockId | undefined>;
|
|
3381
5993
|
/**
|
|
3382
5994
|
* Default apply-to-block implementation (no middleware). Used as the
|
|
3383
5995
|
* tail of the middleware chain in {@link applyToBlock}.
|
|
3384
5996
|
*
|
|
3385
5997
|
* @public
|
|
3386
5998
|
*/
|
|
3387
|
-
defaultApplyAssetToBlock(asset:
|
|
5999
|
+
defaultApplyAssetToBlock(asset: AssetResult, block: DesignBlockId): Promise<void>;
|
|
3388
6000
|
/**
|
|
3389
|
-
* Register a middleware in the apply-asset chain
|
|
6001
|
+
* Register a middleware in the global apply-asset chain, matching
|
|
6002
|
+
* `@cesdk/node`'s `registerApplyMiddleware`. Returns a function that
|
|
6003
|
+
* unregisters it.
|
|
3390
6004
|
*
|
|
3391
|
-
* @param sourceId - The source to install the middleware on.
|
|
3392
|
-
* @param middleware - Callable that may consume the asset, defer to
|
|
3393
|
-
* the next middleware, or short-circuit. Returns the created block id
|
|
3394
|
-
* (or undefined to fall through).
|
|
3395
6005
|
* @public
|
|
3396
6006
|
*/
|
|
3397
|
-
registerApplyMiddleware(sourceId: string,
|
|
6007
|
+
registerApplyMiddleware(middleware: (sourceId: string, assetResult: AssetResult, apply: AssetAPI["apply"], context: ApplyAssetOptions) => Promise<DesignBlockId | undefined>): () => void;
|
|
3398
6008
|
/**
|
|
3399
|
-
* Register a middleware in the apply-asset-to-block chain
|
|
6009
|
+
* Register a middleware in the global apply-asset-to-block chain. Mirrors
|
|
6010
|
+
* `@cesdk/node`'s `registerApplyToBlockMiddleware`. Returns a function that
|
|
6011
|
+
* unregisters it.
|
|
3400
6012
|
*
|
|
3401
6013
|
* @public
|
|
3402
6014
|
*/
|
|
3403
|
-
registerApplyToBlockMiddleware(sourceId: string,
|
|
6015
|
+
registerApplyToBlockMiddleware(middleware: (sourceId: string, assetResult: AssetResult, block: DesignBlockId, applyToBlock: AssetAPI["applyToBlock"]) => Promise<void>): () => void;
|
|
3404
6016
|
/**
|
|
3405
6017
|
* Whether the named source supports `addAssetToSource` /
|
|
3406
6018
|
* `removeAssetFromSource`. Local sources return `true` by default; custom
|
|
@@ -3411,7 +6023,7 @@ export declare class AssetAPI implements IAssetAPI {
|
|
|
3411
6023
|
*/
|
|
3412
6024
|
canManageAssets(sourceId: string): boolean;
|
|
3413
6025
|
}
|
|
3414
|
-
|
|
6026
|
+
interface NativeEngine {
|
|
3415
6027
|
update(): boolean;
|
|
3416
6028
|
dispose(): void;
|
|
3417
6029
|
unlockWithLicense(license: string): void;
|
|
@@ -3424,6 +6036,8 @@ export interface NativeEngine {
|
|
|
3424
6036
|
loadSceneFromURL(url: string, overrideEditorConfig?: boolean, waitForResources?: boolean): Promise<DesignBlockId>;
|
|
3425
6037
|
loadSceneFromArchiveURL(url: string, overrideEditorConfig?: boolean, waitForResources?: boolean): Promise<DesignBlockId>;
|
|
3426
6038
|
saveSceneToString(scene: DesignBlockId, options?: {
|
|
6039
|
+
resourceSchemesAllowed?: string[];
|
|
6040
|
+
persistenceCallback?: (url: string, dataHash: string, invoke: (url: string, persistedUrl: string) => void) => void | Promise<void>;
|
|
3427
6041
|
compression?: {
|
|
3428
6042
|
format?: number;
|
|
3429
6043
|
level?: number;
|
|
@@ -3442,12 +6056,12 @@ export interface NativeEngine {
|
|
|
3442
6056
|
setDesignUnit(scene: DesignBlockId, unit: string): void;
|
|
3443
6057
|
getFontSizeUnit(scene: DesignBlockId): string;
|
|
3444
6058
|
setFontSizeUnit(scene: DesignBlockId, unit: string): void;
|
|
3445
|
-
create(type:
|
|
3446
|
-
createFill(type:
|
|
3447
|
-
createShape(type:
|
|
3448
|
-
createEffect(type:
|
|
3449
|
-
createBlur(type:
|
|
3450
|
-
createAnimation(type:
|
|
6059
|
+
create(type: DesignBlockType): DesignBlockId;
|
|
6060
|
+
createFill(type: FillType): DesignBlockId;
|
|
6061
|
+
createShape(type: ShapeType): DesignBlockId;
|
|
6062
|
+
createEffect(type: EffectType): DesignBlockId;
|
|
6063
|
+
createBlur(type: BlurType): DesignBlockId;
|
|
6064
|
+
createAnimation(type: AnimationType): DesignBlockId;
|
|
3451
6065
|
duplicate(block: DesignBlockId, attachToParent?: boolean): DesignBlockId;
|
|
3452
6066
|
destroy(block: DesignBlockId): void;
|
|
3453
6067
|
isValid(block: DesignBlockId): boolean;
|
|
@@ -3455,7 +6069,7 @@ export interface NativeEngine {
|
|
|
3455
6069
|
findAllPlaceholders(): DesignBlockId[];
|
|
3456
6070
|
findAllUnused(): DesignBlockId[];
|
|
3457
6071
|
findByName(name: string): DesignBlockId[];
|
|
3458
|
-
findByType(type:
|
|
6072
|
+
findByType(type: ObjectType): DesignBlockId[];
|
|
3459
6073
|
findByKind(kind: string): DesignBlockId[];
|
|
3460
6074
|
findAllSelected(): DesignBlockId[];
|
|
3461
6075
|
getParent(block: DesignBlockId): DesignBlockId;
|
|
@@ -3463,22 +6077,22 @@ export interface NativeEngine {
|
|
|
3463
6077
|
getChildren(block: DesignBlockId): DesignBlockId[];
|
|
3464
6078
|
insertChild(parent: DesignBlockId, child: DesignBlockId, index: number): void;
|
|
3465
6079
|
appendChild(parent: DesignBlockId, child: DesignBlockId): void;
|
|
3466
|
-
getType(block: DesignBlockId):
|
|
6080
|
+
getType(block: DesignBlockId): ObjectTypeLonghand;
|
|
3467
6081
|
getKind(block: DesignBlockId): string;
|
|
3468
6082
|
setKind(block: DesignBlockId, kind: string): void;
|
|
3469
6083
|
getName(block: DesignBlockId): string;
|
|
3470
6084
|
setName(block: DesignBlockId, name: string): void;
|
|
3471
6085
|
getUUID(block: DesignBlockId): string;
|
|
3472
|
-
getBool(block: DesignBlockId, property:
|
|
3473
|
-
setBool(block: DesignBlockId, property:
|
|
3474
|
-
getInt(block: DesignBlockId, property:
|
|
3475
|
-
setInt(block: DesignBlockId, property:
|
|
3476
|
-
getFloat(block: DesignBlockId, property:
|
|
3477
|
-
setFloat(block: DesignBlockId, property:
|
|
3478
|
-
getDouble(block: DesignBlockId, property:
|
|
3479
|
-
setDouble(block: DesignBlockId, property:
|
|
3480
|
-
getString(block: DesignBlockId, property:
|
|
3481
|
-
setString(block: DesignBlockId, property:
|
|
6086
|
+
getBool(block: DesignBlockId, property: BoolPropertyName): boolean;
|
|
6087
|
+
setBool(block: DesignBlockId, property: BoolPropertyName, value: boolean): void;
|
|
6088
|
+
getInt(block: DesignBlockId, property: IntPropertyName): number;
|
|
6089
|
+
setInt(block: DesignBlockId, property: IntPropertyName, value: number): void;
|
|
6090
|
+
getFloat(block: DesignBlockId, property: FloatPropertyName): number;
|
|
6091
|
+
setFloat(block: DesignBlockId, property: FloatPropertyName, value: number): void;
|
|
6092
|
+
getDouble(block: DesignBlockId, property: DoublePropertyName): number;
|
|
6093
|
+
setDouble(block: DesignBlockId, property: DoublePropertyName, value: number): void;
|
|
6094
|
+
getString(block: DesignBlockId, property: StringPropertyName): string;
|
|
6095
|
+
setString(block: DesignBlockId, property: StringPropertyName, value: string): void;
|
|
3482
6096
|
getColor(block: DesignBlockId, property: string): NativeColorInternal;
|
|
3483
6097
|
setColor(block: DesignBlockId, property: string, value: NativeColorInternal): void;
|
|
3484
6098
|
getEnum(block: DesignBlockId, property: string): string;
|
|
@@ -3487,18 +6101,18 @@ export interface NativeEngine {
|
|
|
3487
6101
|
setPositionX(block: DesignBlockId, value: number): void;
|
|
3488
6102
|
getPositionY(block: DesignBlockId): number;
|
|
3489
6103
|
setPositionY(block: DesignBlockId, value: number): void;
|
|
3490
|
-
getPositionXMode(block: DesignBlockId):
|
|
3491
|
-
setPositionXMode(block: DesignBlockId, mode:
|
|
3492
|
-
getPositionYMode(block: DesignBlockId):
|
|
3493
|
-
setPositionYMode(block: DesignBlockId, mode:
|
|
6104
|
+
getPositionXMode(block: DesignBlockId): PositionXMode;
|
|
6105
|
+
setPositionXMode(block: DesignBlockId, mode: PositionXMode): void;
|
|
6106
|
+
getPositionYMode(block: DesignBlockId): PositionYMode;
|
|
6107
|
+
setPositionYMode(block: DesignBlockId, mode: PositionYMode): void;
|
|
3494
6108
|
getWidth(block: DesignBlockId): number;
|
|
3495
|
-
setWidth(block: DesignBlockId, value: number): void;
|
|
3496
|
-
getWidthMode(block: DesignBlockId):
|
|
3497
|
-
setWidthMode(block: DesignBlockId, mode:
|
|
6109
|
+
setWidth(block: DesignBlockId, value: number, maintainCrop?: boolean): void;
|
|
6110
|
+
getWidthMode(block: DesignBlockId): WidthMode;
|
|
6111
|
+
setWidthMode(block: DesignBlockId, mode: WidthMode): void;
|
|
3498
6112
|
getHeight(block: DesignBlockId): number;
|
|
3499
|
-
setHeight(block: DesignBlockId, value: number): void;
|
|
3500
|
-
getHeightMode(block: DesignBlockId):
|
|
3501
|
-
setHeightMode(block: DesignBlockId, mode:
|
|
6113
|
+
setHeight(block: DesignBlockId, value: number, maintainCrop?: boolean): void;
|
|
6114
|
+
getHeightMode(block: DesignBlockId): HeightMode;
|
|
6115
|
+
setHeightMode(block: DesignBlockId, mode: HeightMode): void;
|
|
3502
6116
|
getRotation(block: DesignBlockId): number;
|
|
3503
6117
|
setRotation(block: DesignBlockId, value: number): void;
|
|
3504
6118
|
getScaleX(block: DesignBlockId): number;
|
|
@@ -3513,7 +6127,7 @@ export interface NativeEngine {
|
|
|
3513
6127
|
setFlipVertical(block: DesignBlockId, flip: boolean): void;
|
|
3514
6128
|
scale(block: DesignBlockId, scale: number, anchorX?: number, anchorY?: number): void;
|
|
3515
6129
|
fillParent(block: DesignBlockId): void;
|
|
3516
|
-
resizeContentAware(blocks: DesignBlockId[], width: number, height: number):
|
|
6130
|
+
resizeContentAware(blocks: DesignBlockId[], width: number, height: number): void;
|
|
3517
6131
|
getGlobalBoundingBoxX(block: DesignBlockId): number;
|
|
3518
6132
|
getGlobalBoundingBoxY(block: DesignBlockId): number;
|
|
3519
6133
|
getGlobalBoundingBoxWidth(block: DesignBlockId): number;
|
|
@@ -3552,12 +6166,12 @@ export interface NativeEngine {
|
|
|
3552
6166
|
setStrokeColorRGBA(block: DesignBlockId, r: number, g: number, b: number, a: number): void;
|
|
3553
6167
|
getStrokeWidth(block: DesignBlockId): number;
|
|
3554
6168
|
setStrokeWidth(block: DesignBlockId, width: number): void;
|
|
3555
|
-
getStrokeStyle(block: DesignBlockId):
|
|
3556
|
-
setStrokeStyle(block: DesignBlockId, style:
|
|
3557
|
-
getStrokePosition(block: DesignBlockId):
|
|
3558
|
-
setStrokePosition(block: DesignBlockId, position:
|
|
3559
|
-
getStrokeCornerGeometry(block: DesignBlockId):
|
|
3560
|
-
setStrokeCornerGeometry(block: DesignBlockId, geometry:
|
|
6169
|
+
getStrokeStyle(block: DesignBlockId): StrokeStyle;
|
|
6170
|
+
setStrokeStyle(block: DesignBlockId, style: StrokeStyle): void;
|
|
6171
|
+
getStrokePosition(block: DesignBlockId): StrokePosition;
|
|
6172
|
+
setStrokePosition(block: DesignBlockId, position: StrokePosition): void;
|
|
6173
|
+
getStrokeCornerGeometry(block: DesignBlockId): StrokeCornerGeometry;
|
|
6174
|
+
setStrokeCornerGeometry(block: DesignBlockId, geometry: StrokeCornerGeometry): void;
|
|
3561
6175
|
getStrokeCap(block: DesignBlockId): string;
|
|
3562
6176
|
setStrokeCap(block: DesignBlockId, cap: string): void;
|
|
3563
6177
|
getStrokeStartCap(block: DesignBlockId): string;
|
|
@@ -3598,11 +6212,11 @@ export interface NativeEngine {
|
|
|
3598
6212
|
getLoopAnimation(block: DesignBlockId): DesignBlockId;
|
|
3599
6213
|
setLoopAnimation(block: DesignBlockId, animation: DesignBlockId): void;
|
|
3600
6214
|
supportsContentFillMode(block: DesignBlockId): boolean;
|
|
3601
|
-
getContentFillMode(block: DesignBlockId):
|
|
3602
|
-
setContentFillMode(block: DesignBlockId, mode:
|
|
6215
|
+
getContentFillMode(block: DesignBlockId): ContentFillMode;
|
|
6216
|
+
setContentFillMode(block: DesignBlockId, mode: ContentFillMode): void;
|
|
3603
6217
|
supportsCrop(block: DesignBlockId): boolean;
|
|
3604
6218
|
resetCrop(block: DesignBlockId): void;
|
|
3605
|
-
adjustCropToFillFrame(block: DesignBlockId, minScaleRatio
|
|
6219
|
+
adjustCropToFillFrame(block: DesignBlockId, minScaleRatio: number): void;
|
|
3606
6220
|
getCropRotation(block: DesignBlockId): number;
|
|
3607
6221
|
setCropRotation(block: DesignBlockId, rotation: number): void;
|
|
3608
6222
|
getCropScaleX(block: DesignBlockId): number;
|
|
@@ -3637,8 +6251,8 @@ export interface NativeEngine {
|
|
|
3637
6251
|
getDropShadowClip(block: DesignBlockId): boolean;
|
|
3638
6252
|
setDropShadowClip(block: DesignBlockId, clip: boolean): void;
|
|
3639
6253
|
supportsBlendMode(block: DesignBlockId): boolean;
|
|
3640
|
-
getBlendMode(block: DesignBlockId):
|
|
3641
|
-
setBlendMode(block: DesignBlockId, mode:
|
|
6254
|
+
getBlendMode(block: DesignBlockId): BlendMode;
|
|
6255
|
+
setBlendMode(block: DesignBlockId, mode: BlendMode): void;
|
|
3642
6256
|
supportsOpacity(block: DesignBlockId): boolean;
|
|
3643
6257
|
getOpacity(block: DesignBlockId): number;
|
|
3644
6258
|
setOpacity(block: DesignBlockId, opacity: number): void;
|
|
@@ -3657,8 +6271,8 @@ export interface NativeEngine {
|
|
|
3657
6271
|
setAlwaysOnBottom(block: DesignBlockId, enabled: boolean): void;
|
|
3658
6272
|
isAlwaysOnTop(block: DesignBlockId): boolean;
|
|
3659
6273
|
isAlwaysOnBottom(block: DesignBlockId): boolean;
|
|
3660
|
-
alignHorizontally(blocks: DesignBlockId[], alignment:
|
|
3661
|
-
alignVertically(blocks: DesignBlockId[], alignment:
|
|
6274
|
+
alignHorizontally(blocks: DesignBlockId[], alignment: TextHorizontalAlignment): void;
|
|
6275
|
+
alignVertically(blocks: DesignBlockId[], alignment: TextVerticalAlignment): void;
|
|
3662
6276
|
isAlignable(blocks: DesignBlockId[]): boolean;
|
|
3663
6277
|
distributeHorizontally(blocks: DesignBlockId[]): void;
|
|
3664
6278
|
distributeVertically(blocks: DesignBlockId[]): void;
|
|
@@ -3668,7 +6282,7 @@ export interface NativeEngine {
|
|
|
3668
6282
|
isGroupable(blocks: DesignBlockId[]): boolean;
|
|
3669
6283
|
enterGroup(group: DesignBlockId): void;
|
|
3670
6284
|
exitGroup(block: DesignBlockId): void;
|
|
3671
|
-
combine(blocks: DesignBlockId[], operation:
|
|
6285
|
+
combine(blocks: DesignBlockId[], operation: BooleanOperation): DesignBlockId;
|
|
3672
6286
|
isCombinable(blocks: DesignBlockId[]): boolean;
|
|
3673
6287
|
supportsDuration(block: DesignBlockId): boolean;
|
|
3674
6288
|
getDuration(block: DesignBlockId): number;
|
|
@@ -3748,19 +6362,44 @@ export interface NativeEngine {
|
|
|
3748
6362
|
getContentFillHorizontalAlignment(block: DesignBlockId): string;
|
|
3749
6363
|
setContentFillVerticalAlignment(block: DesignBlockId, alignment: string): void;
|
|
3750
6364
|
getContentFillVerticalAlignment(block: DesignBlockId): string;
|
|
3751
|
-
canToggleBoldFont(block: DesignBlockId): boolean;
|
|
3752
|
-
toggleBoldFont(block: DesignBlockId): void;
|
|
3753
|
-
canToggleItalicFont(block: DesignBlockId): boolean;
|
|
3754
|
-
toggleItalicFont(block: DesignBlockId): void;
|
|
6365
|
+
canToggleBoldFont(block: DesignBlockId, from?: number, to?: number): boolean;
|
|
6366
|
+
toggleBoldFont(block: DesignBlockId, from?: number, to?: number): void;
|
|
6367
|
+
canToggleItalicFont(block: DesignBlockId, from?: number, to?: number): boolean;
|
|
6368
|
+
toggleItalicFont(block: DesignBlockId, from?: number, to?: number): void;
|
|
3755
6369
|
getTextCursorRange(): Range;
|
|
3756
6370
|
setTextCursorRange(from: number, to: number): void;
|
|
3757
|
-
getTextCursorPositionInScreenSpaceX(
|
|
3758
|
-
getTextCursorPositionInScreenSpaceY(
|
|
6371
|
+
getTextCursorPositionInScreenSpaceX(): number;
|
|
6372
|
+
getTextCursorPositionInScreenSpaceY(): number;
|
|
6373
|
+
getMaxExportSize(): number;
|
|
6374
|
+
unstable_isInteractionHappening(): boolean;
|
|
6375
|
+
getSpotColorForCutoutType(type: CutoutType): string;
|
|
6376
|
+
setSpotColorForCutoutType(type: CutoutType, color: string): void;
|
|
6377
|
+
getSettingColorRGBA(keypath: string): {
|
|
6378
|
+
r: number;
|
|
6379
|
+
g: number;
|
|
6380
|
+
b: number;
|
|
6381
|
+
a: number;
|
|
6382
|
+
};
|
|
6383
|
+
setSettingColorRGBA(keypath: string, r: number, g: number, b: number, a: number): void;
|
|
6384
|
+
addVectorNode(): void;
|
|
6385
|
+
deleteVectorNode(): void;
|
|
6386
|
+
deleteSelectedVectorControlPoints(): void;
|
|
6387
|
+
getSelectedVectorNodeMirrorMode(): number;
|
|
6388
|
+
setSelectedVectorNodeMirrorMode(mode: number): void;
|
|
6389
|
+
getVectorEditAddMode(): boolean;
|
|
6390
|
+
setVectorEditAddMode(active: boolean): void;
|
|
6391
|
+
getVectorEditBendMode(): boolean;
|
|
6392
|
+
setVectorEditBendMode(active: boolean): void;
|
|
6393
|
+
getVectorEditDeleteMode(): boolean;
|
|
6394
|
+
setVectorEditDeleteMode(active: boolean): void;
|
|
6395
|
+
hasSelectedVectorNode(): boolean;
|
|
6396
|
+
hasSelectedVectorControlPoint(): boolean;
|
|
6397
|
+
toggleSelectedVectorNodeSmooth(): void;
|
|
3759
6398
|
getTextVisibleLineCount(block: DesignBlockId): number;
|
|
3760
6399
|
getTextVisibleLineContent(block: DesignBlockId, lineIndex: number): string;
|
|
3761
6400
|
getTextVisibleLineGlobalBoundingBoxXYWH(block: DesignBlockId, lineIndex: number): XYWH;
|
|
3762
6401
|
getTextCharacterInkBoxes(block: DesignBlockId, from?: number, to?: number): CharacterInkBox[];
|
|
3763
|
-
getTextEffectiveHorizontalAlignment(block: DesignBlockId):
|
|
6402
|
+
getTextEffectiveHorizontalAlignment(block: DesignBlockId): "Left" | "Right" | "Center";
|
|
3764
6403
|
getTextHorizontalAlignment(block: DesignBlockId, paragraphIndex?: number): string | undefined;
|
|
3765
6404
|
setTextHorizontalAlignment(block: DesignBlockId, alignment: string | undefined, paragraphIndex?: number): void;
|
|
3766
6405
|
getTextDecorations(block: DesignBlockId, from?: number, to?: number): unknown[];
|
|
@@ -3785,7 +6424,7 @@ export interface NativeEngine {
|
|
|
3785
6424
|
setMovementConstraint(targets: (DesignBlockId | string)[], overshoot: number): void;
|
|
3786
6425
|
getMovementConstraint(block: DesignBlockId): number;
|
|
3787
6426
|
removeMovementConstraint(targets: (DesignBlockId | string)[]): void;
|
|
3788
|
-
getSourceSet(block: DesignBlockId, property:
|
|
6427
|
+
getSourceSet(block: DesignBlockId, property: SourceSetPropertyName): Source[];
|
|
3789
6428
|
setSourceSet(block: DesignBlockId, property: string, sources: Source[]): void;
|
|
3790
6429
|
addImageFileURIToSourceSet(block: DesignBlockId, property: string, uri: string): Promise<void>;
|
|
3791
6430
|
addVideoFileURIToSourceSet(block: DesignBlockId, property: string, uri: string): Promise<void>;
|
|
@@ -3810,21 +6449,21 @@ export interface NativeEngine {
|
|
|
3810
6449
|
setPageDurationSource(page: DesignBlockId, block: DesignBlockId): void;
|
|
3811
6450
|
removePageDurationSource(page: DesignBlockId): void;
|
|
3812
6451
|
isPageDurationSource(block: DesignBlockId): boolean;
|
|
3813
|
-
findAllScopes():
|
|
6452
|
+
findAllScopes(): Scope[];
|
|
3814
6453
|
getGlobalScope(key: string): string;
|
|
3815
6454
|
setGlobalScope(key: string, value: string): void;
|
|
3816
|
-
isScopeEnabled(block: DesignBlockId, scope:
|
|
3817
|
-
setScopeEnabled(block: DesignBlockId, scope:
|
|
3818
|
-
isAllowedByScope(block: DesignBlockId, scope:
|
|
6455
|
+
isScopeEnabled(block: DesignBlockId, scope: Scope): boolean;
|
|
6456
|
+
setScopeEnabled(block: DesignBlockId, scope: Scope, enabled: boolean): void;
|
|
6457
|
+
isAllowedByScope(block: DesignBlockId, scope: Scope): boolean;
|
|
3819
6458
|
findAllProperties(block: DesignBlockId): string[];
|
|
3820
6459
|
getPropertyType(property: string): string;
|
|
3821
6460
|
isPropertyReadable(property: string): boolean;
|
|
3822
6461
|
isPropertyWritable(property: string): boolean;
|
|
3823
6462
|
getEnumValues(property: string): string[];
|
|
3824
|
-
getRole():
|
|
3825
|
-
setRole(role:
|
|
6463
|
+
getRole(): RoleString;
|
|
6464
|
+
setRole(role: RoleString): void;
|
|
3826
6465
|
startTracking(license: string, userId: string, deviceId: string): void;
|
|
3827
|
-
getState(block: DesignBlockId):
|
|
6466
|
+
getState(block: DesignBlockId): BlockState;
|
|
3828
6467
|
setZoomLevel(sceneOrCamera: DesignBlockId, level: number): void;
|
|
3829
6468
|
getZoomLevel(sceneOrCamera: DesignBlockId): number;
|
|
3830
6469
|
zoomToBlock(block: DesignBlockId, paddingLeft?: number, paddingTop?: number, paddingRight?: number, paddingBottom?: number): Promise<void>;
|
|
@@ -3876,7 +6515,7 @@ export interface NativeEngine {
|
|
|
3876
6515
|
loadBlocksFromString(content: string): Promise<DesignBlockId[]>;
|
|
3877
6516
|
loadBlocksFromURL(url: string): Promise<DesignBlockId[]>;
|
|
3878
6517
|
loadBlocksFromArchiveURL(url: string): Promise<DesignBlockId[]>;
|
|
3879
|
-
saveBlocksToString(blocks: DesignBlockId[]): Promise<string>;
|
|
6518
|
+
saveBlocksToString(blocks: DesignBlockId[], allowedResourceSchemes?: string[], persistenceCallback?: (url: string, dataHash: string, invoke: (url: string, persistedUrl: string) => void) => void | Promise<void>): Promise<string>;
|
|
3880
6519
|
saveBlocksToArchive(blocks: DesignBlockId[]): Promise<Uint8Array>;
|
|
3881
6520
|
forceLoadAVResource(block: DesignBlockId): Promise<void>;
|
|
3882
6521
|
forceLoadResources(blocks: DesignBlockId[]): Promise<void>;
|
|
@@ -3954,8 +6593,42 @@ export interface NativeEngine {
|
|
|
3954
6593
|
getVariableString(key: string): string;
|
|
3955
6594
|
setVariableString(key: string, value: string): void;
|
|
3956
6595
|
referencesAnyVariables(block: DesignBlockId): boolean;
|
|
3957
|
-
|
|
3958
|
-
|
|
6596
|
+
getAudioInfoFromVideo(videoFillBlock: DesignBlockId): AudioTrackInfo[];
|
|
6597
|
+
createAudioFromVideo(videoFillBlock: DesignBlockId, trackIndex: number, options: AudioFromVideoOptions): DesignBlockId;
|
|
6598
|
+
createAudiosFromVideo(videoFillBlock: DesignBlockId, options: AudioFromVideoOptions): DesignBlockId[];
|
|
6599
|
+
createCaptionsFromURI(uri: string): Promise<DesignBlockId[]>;
|
|
6600
|
+
createCutoutFromBlocks(ids: DesignBlockId[], vectorizeDistanceThreshold: number, simplifyDistanceThreshold: number, useExistingShapeInformation: boolean): DesignBlockId;
|
|
6601
|
+
createCutoutFromOperation(ids: DesignBlockId[], op: CutoutOperation): DesignBlockId;
|
|
6602
|
+
createCutoutFromPath(path: string): DesignBlockId;
|
|
6603
|
+
getVideoFillThumbnail(id: DesignBlockId, thumbnailHeight: number): Promise<Uint8Array>;
|
|
6604
|
+
getVideoFillThumbnailAtlas(id: DesignBlockId, numberOfColumns: number, numberOfRows: number, thumbnailHeight: number): Promise<Uint8Array>;
|
|
6605
|
+
getPageThumbnailAtlas(id: DesignBlockId, numberOfColumns: number, numberOfRows: number, thumbnailHeight: number): Promise<Uint8Array>;
|
|
6606
|
+
unstable_isAVResourceLoaded(id: DesignBlockId): boolean;
|
|
6607
|
+
getColorSpotName(id: DesignBlockId, property: string): string;
|
|
6608
|
+
getColorSpotTint(id: DesignBlockId, property: string): number;
|
|
6609
|
+
setColorSpot(id: DesignBlockId, property: string, name: string, tint: number): void;
|
|
6610
|
+
setState(id: DesignBlockId, state: BlockState): void;
|
|
6611
|
+
canRevertToOriginalRatio(id: DesignBlockId): boolean;
|
|
6612
|
+
getFillOverprint(id: DesignBlockId): boolean;
|
|
6613
|
+
setFillOverprint(id: DesignBlockId, overprint: boolean): void;
|
|
6614
|
+
getStrokeOverprint(id: DesignBlockId): boolean;
|
|
6615
|
+
setStrokeOverprint(id: DesignBlockId, overprint: boolean): void;
|
|
6616
|
+
getDominantColors(handle: DesignBlockId, options?: DominantColorsOptions): Promise<DominantColor[]>;
|
|
6617
|
+
getTextRuns(id: DesignBlockId, from: number, to: number): TextRunInfo[];
|
|
6618
|
+
generateVideoThumbnailSequence(id: DesignBlockId, thumbnailHeight: number, timeBegin: number, timeEnd: number, numberOfFrames: number, callback: (err: Error | null, frame: {
|
|
6619
|
+
frameIndex: number;
|
|
6620
|
+
width: number;
|
|
6621
|
+
height: number;
|
|
6622
|
+
data: Uint8Array;
|
|
6623
|
+
}) => void): number;
|
|
6624
|
+
cancelVideoThumbnailSequenceGeneration(handle: number): void;
|
|
6625
|
+
generateAudioThumbnailSequence(id: DesignBlockId, samplesPerChunk: number, timeBegin: number, timeEnd: number, numberOfSamples: number, numberOfChannels: number, callback: (err: Error | null, chunk: {
|
|
6626
|
+
chunkIndex: number;
|
|
6627
|
+
samples: number[];
|
|
6628
|
+
}) => void): number;
|
|
6629
|
+
cancelAudioThumbnailSequenceGeneration(handle: number): void;
|
|
6630
|
+
getEditMode(): EditMode;
|
|
6631
|
+
setEditMode(mode: string, baseMode?: string): void;
|
|
3959
6632
|
getSettingBool(key: string): boolean;
|
|
3960
6633
|
setSettingBool(key: string, value: boolean): void;
|
|
3961
6634
|
getSettingInt(key: string): number;
|
|
@@ -3986,9 +6659,17 @@ export interface NativeEngine {
|
|
|
3986
6659
|
getMimeType(uri: string): Promise<string>;
|
|
3987
6660
|
relocateResource(currentUri: string, newUri: string): void;
|
|
3988
6661
|
findAllMediaURIs(): string[];
|
|
3989
|
-
findAllTransientResources():
|
|
3990
|
-
|
|
3991
|
-
|
|
6662
|
+
findAllTransientResources(): TransientResource[];
|
|
6663
|
+
getResourceData(uri: string, chunkSize: number, onData: (chunk: Uint8Array) => boolean): void;
|
|
6664
|
+
actionsRegister(id: string, trampoline: (jsonArgs: string) => string | Promise<string>, rawFn: (...args: unknown[]) => unknown): void;
|
|
6665
|
+
actionsGetLocal(id: string): ((...args: unknown[]) => unknown) | undefined;
|
|
6666
|
+
actionsUnregister(id: string): boolean;
|
|
6667
|
+
actionsHas(id: string): boolean;
|
|
6668
|
+
actionsRun(id: string, jsonArgs: string, resolve: (jsonResult: string) => void, reject: (error: string) => void): void;
|
|
6669
|
+
actionsList(matcher: string | null): Array<{
|
|
6670
|
+
id: string;
|
|
6671
|
+
enabled: boolean;
|
|
6672
|
+
argSchema: string | null;
|
|
3992
6673
|
}>;
|
|
3993
6674
|
findAllSpotColors(): string[];
|
|
3994
6675
|
getSpotColorRGB(name: string): RGBAColor;
|
|
@@ -4012,6 +6693,7 @@ declare class CreativeEngine implements ICreativeEngine {
|
|
|
4012
6693
|
event: EventAPI;
|
|
4013
6694
|
scene: SceneAPI;
|
|
4014
6695
|
variable: VariableAPI;
|
|
6696
|
+
actions: EngineActions;
|
|
4015
6697
|
readonly version: string;
|
|
4016
6698
|
private constructor();
|
|
4017
6699
|
/**
|
|
@@ -4049,8 +6731,11 @@ declare class CreativeEngine implements ICreativeEngine {
|
|
|
4049
6731
|
* `${baseURL}/<source-id>/content.json` for each id in the default set
|
|
4050
6732
|
* and registers the contents as a local asset source. baseURL defaults
|
|
4051
6733
|
* to the engine's configured baseURL (`file://<addon>/assets/` if none
|
|
4052
|
-
* was passed to init)
|
|
6734
|
+
* was passed to init), which does not bundle these sources, so pass a
|
|
6735
|
+
* `baseURL` to load them.
|
|
4053
6736
|
*
|
|
6737
|
+
* @deprecated This method uses legacy v4 asset source IDs and will be removed in a future version.
|
|
6738
|
+
* Please migrate to v5 asset sources using engine.asset.addLocalAssetSourceFromJSONURI().
|
|
4054
6739
|
* @public
|
|
4055
6740
|
*/
|
|
4056
6741
|
addDefaultAssetSources({ baseURL, excludeAssetSourceIds }?: {
|
|
@@ -4064,6 +6749,8 @@ declare class CreativeEngine implements ICreativeEngine {
|
|
|
4064
6749
|
* — accepts `sceneMode`, `withUploadAssetSources`, and the full demo
|
|
4065
6750
|
* source-ID union (templates + textComponents + uploads + media).
|
|
4066
6751
|
*
|
|
6752
|
+
* @deprecated This method uses legacy v3 demo asset source IDs and will be removed in a future version.
|
|
6753
|
+
* Please migrate to v4 asset sources using engine.asset.addLocalAssetSourceFromJSONURI().
|
|
4067
6754
|
* @public
|
|
4068
6755
|
*/
|
|
4069
6756
|
addDemoAssetSources({ baseURL, excludeAssetSourceIds, sceneMode, withUploadAssetSources }?: {
|
|
@@ -4073,12 +6760,36 @@ declare class CreativeEngine implements ICreativeEngine {
|
|
|
4073
6760
|
withUploadAssetSources?: boolean;
|
|
4074
6761
|
}): Promise<void>;
|
|
4075
6762
|
}
|
|
6763
|
+
export interface EnginePluginContext {
|
|
6764
|
+
engine: CreativeEngine;
|
|
6765
|
+
}
|
|
6766
|
+
export interface EnginePlugin {
|
|
6767
|
+
name: string;
|
|
6768
|
+
version: string;
|
|
6769
|
+
initialize: (context: EnginePluginContext) => void | Promise<void>;
|
|
6770
|
+
}
|
|
4076
6771
|
|
|
4077
6772
|
export {
|
|
6773
|
+
AnimationEasing$1 as AnimationEasing,
|
|
6774
|
+
BlendMode$1 as BlendMode,
|
|
6775
|
+
Buffer$1 as Buffer,
|
|
4078
6776
|
CreativeEngine as default,
|
|
6777
|
+
CutoutType$1 as CutoutType,
|
|
6778
|
+
Groups as AssetGroups,
|
|
6779
|
+
HorizontalContentFillAlignment$1 as HorizontalContentFillAlignment,
|
|
4079
6780
|
MimeType as MimeTypeString,
|
|
6781
|
+
SceneDesignUnit$1 as SceneDesignUnit,
|
|
6782
|
+
SceneLayout$1 as SceneLayout,
|
|
6783
|
+
SceneMode$1 as SceneMode,
|
|
6784
|
+
StrokeCap$1 as StrokeCap,
|
|
6785
|
+
StrokeCornerGeometry$1 as StrokeCornerGeometry,
|
|
6786
|
+
StrokePosition$1 as StrokePosition,
|
|
6787
|
+
StrokeStyle$1 as StrokeStyle,
|
|
4080
6788
|
TextHorizontalAlignment as HorizontalTextAlignment,
|
|
6789
|
+
TextHorizontalAlignment$1 as TextHorizontalAlignment,
|
|
4081
6790
|
TextVerticalAlignment as VerticalTextAlignment,
|
|
6791
|
+
TextVerticalAlignment$1 as TextVerticalAlignment,
|
|
6792
|
+
VerticalContentFillAlignment$1 as VerticalContentFillAlignment,
|
|
4082
6793
|
};
|
|
4083
6794
|
|
|
4084
6795
|
export {};
|