@cesdk/engine 1.11.0-preview.2 → 1.11.0-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.
|
Binary file
|
|
Binary file
|
package/index.d.ts
CHANGED
|
@@ -1621,6 +1621,51 @@ export declare class BlockAPI {
|
|
|
1621
1621
|
* @returns The drop shadow's clipping.
|
|
1622
1622
|
*/
|
|
1623
1623
|
getDropShadowClip(id: DesignBlockId): boolean;
|
|
1624
|
+
/**
|
|
1625
|
+
* Create a Cutout block.
|
|
1626
|
+
* @param blocks - The blocks whose shape will serve as the basis for the cutout's path.
|
|
1627
|
+
* @returns The handle of the created Cutout.
|
|
1628
|
+
*/
|
|
1629
|
+
createCutoutFromBlocks(ids: DesignBlockId[]): DesignBlockId;
|
|
1630
|
+
/**
|
|
1631
|
+
* Create a Cutout block.
|
|
1632
|
+
* @param path - An SVG string describing a path.
|
|
1633
|
+
* @returns The handle of the created Cutout.
|
|
1634
|
+
*/
|
|
1635
|
+
createCutoutFromPath(path: string): DesignBlockId;
|
|
1636
|
+
/**
|
|
1637
|
+
* Set the cutout's offset from the underlying path.
|
|
1638
|
+
* @param block - The block whose offset should be set.
|
|
1639
|
+
* @param offset - The offset to be set.
|
|
1640
|
+
*/
|
|
1641
|
+
setCutoutOffset(id: DesignBlockId, offset: number): void;
|
|
1642
|
+
/**
|
|
1643
|
+
* Get the cutout's offset from the underlying path.
|
|
1644
|
+
* @param block - The block whose offset should be queried.
|
|
1645
|
+
* @returns The cutout's offset.
|
|
1646
|
+
*/
|
|
1647
|
+
getCutoutOffset(id: DesignBlockId): number;
|
|
1648
|
+
/**
|
|
1649
|
+
* Set the cutout's type.
|
|
1650
|
+
* @param block - The block whose type should be set.
|
|
1651
|
+
* @param type - The type to be set.
|
|
1652
|
+
*/
|
|
1653
|
+
setCutoutType(id: DesignBlockId, type: CutoutType): void;
|
|
1654
|
+
/**
|
|
1655
|
+
* Get the cutout's type.
|
|
1656
|
+
* @param block - The block whose type should be queried.
|
|
1657
|
+
* @returns The cutout's type.
|
|
1658
|
+
*/
|
|
1659
|
+
getCutoutType(id: DesignBlockId): CutoutType;
|
|
1660
|
+
/** Perform a boolean operation on the given Cutout blocks.
|
|
1661
|
+
* The cutout offset of the new block is 0.
|
|
1662
|
+
* The cutout type of the new block is that of the first block.
|
|
1663
|
+
* When performing a `Difference` operation, the first block is the block subtracted from.
|
|
1664
|
+
* @param blocks - The blocks with which to perform to the operation.
|
|
1665
|
+
* @param op - The boolean operation to perform.
|
|
1666
|
+
* @returns The newly created block or an error.
|
|
1667
|
+
*/
|
|
1668
|
+
createCutoutFromOperation(ids: DesignBlockId[], op: CutoutOperation): DesignBlockId;
|
|
1624
1669
|
/**
|
|
1625
1670
|
* Inserts the given text into the selected range of the text block.
|
|
1626
1671
|
* @param block - The text block into which to insert the given text.
|
|
@@ -1657,9 +1702,11 @@ export declare class BlockAPI {
|
|
|
1657
1702
|
* Returns the ordered unique list of colors of the text in the selected range.
|
|
1658
1703
|
* @param block - The text block whose colors should be returned.
|
|
1659
1704
|
* @param from - The start index of the UTF-16 range whose colors should be returned.
|
|
1660
|
-
*
|
|
1705
|
+
* If the value is negative and the block is currently being edited, this will fall back to the start of the current cursor index / selected grapheme range.
|
|
1706
|
+
* If the value is negative and the block is not being edited, this will fall back to the start of the entire text range.
|
|
1661
1707
|
* @param to - The UTF-16 index after the last grapheme whose colors should be returned.
|
|
1662
|
-
*
|
|
1708
|
+
* If the value is negative and the block is currently being edited, this will fall back to the end of the current cursor index / selected grapheme range.
|
|
1709
|
+
* If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
|
|
1663
1710
|
*/
|
|
1664
1711
|
getTextColors(id: DesignBlockId, from?: number, to?: number): Array<RGBAColor | SpotColor>;
|
|
1665
1712
|
/**
|
|
@@ -1684,6 +1731,29 @@ export declare class BlockAPI {
|
|
|
1684
1731
|
* If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
|
|
1685
1732
|
*/
|
|
1686
1733
|
getTextFontStyles(id: DesignBlockId, from?: number, to?: number): FontStyle[];
|
|
1734
|
+
/**
|
|
1735
|
+
* Returns the ordered list of text cases of the text in the selected range.
|
|
1736
|
+
* @param block - The text block whose text cases should be returned.
|
|
1737
|
+
* @param from - The start index of the UTF-16 range whose text cases should be returned.
|
|
1738
|
+
* If the value is negative and the block is currently being edited, this will fall back to the start of the current cursor index / selected grapheme range.
|
|
1739
|
+
* If the value is negative and the block is not being edited, this will fall back to the start of the entire text range.
|
|
1740
|
+
* @param to - The UTF-16 index after the last grapheme whose text cases should be returned.
|
|
1741
|
+
* If the value is negative and the block is currently being edited, this will fall back to the end of the current cursor index / selected grapheme range.
|
|
1742
|
+
* If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
|
|
1743
|
+
*/
|
|
1744
|
+
getTextCases(id: DesignBlockId, from?: number, to?: number): TextCase[];
|
|
1745
|
+
/**
|
|
1746
|
+
* Sets the given text case for the selected range of text.
|
|
1747
|
+
* @param id - The text block whose text case should be changed.
|
|
1748
|
+
* @param textCase - The new text case value.
|
|
1749
|
+
* @param from - The start index of the UTF-16 range whose text cases should be returned.
|
|
1750
|
+
* If the value is negative and the block is currently being edited, this will fall back to the start of the current cursor index / selected grapheme range.
|
|
1751
|
+
* If the value is negative and the block is not being edited, this will fall back to the start of the entire text range.
|
|
1752
|
+
* @param to - The UTF-16 index after the last grapheme whose text cases should be returned.
|
|
1753
|
+
* If the value is negative and the block is currently being edited, this will fall back to the end of the current cursor index / selected grapheme range.
|
|
1754
|
+
* If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
|
|
1755
|
+
*/
|
|
1756
|
+
setTextCase(id: DesignBlockId, textCase: TextCase, from?: number, to?: number): void;
|
|
1687
1757
|
/**
|
|
1688
1758
|
* Query if the given block has fill color properties.
|
|
1689
1759
|
* @param id - The block to query.
|
|
@@ -2229,26 +2299,32 @@ export declare interface CMYKColor {
|
|
|
2229
2299
|
}
|
|
2230
2300
|
|
|
2231
2301
|
/**
|
|
2232
|
-
*
|
|
2233
|
-
*
|
|
2302
|
+
* @deprecated This type definition has been removed.
|
|
2303
|
+
* Instead of `ConfigTypes.Color`, this can be imported directly as `PaletteColor`.
|
|
2234
2304
|
* @public
|
|
2235
2305
|
*/
|
|
2236
|
-
declare type Color_2 =
|
|
2306
|
+
declare type Color_2 = PaletteColor;
|
|
2237
2307
|
|
|
2238
|
-
/**
|
|
2308
|
+
/**
|
|
2309
|
+
* @deprecated This type definition is not used anymore and will be removed.
|
|
2310
|
+
* @public
|
|
2311
|
+
*/
|
|
2239
2312
|
declare type ColorDefinition = Preset & {
|
|
2240
2313
|
value: Color_2;
|
|
2241
2314
|
};
|
|
2242
2315
|
|
|
2243
|
-
/**
|
|
2316
|
+
/**
|
|
2317
|
+
* @deprecated This type definition is not used anymore and will be removed.
|
|
2318
|
+
* @public
|
|
2319
|
+
*/
|
|
2244
2320
|
declare type ColorPaletteDefinition = Preset & {
|
|
2245
2321
|
entries: Color_2[];
|
|
2246
2322
|
};
|
|
2247
2323
|
|
|
2248
2324
|
declare namespace ConfigTypes {
|
|
2249
2325
|
export {
|
|
2250
|
-
HexColorString,
|
|
2251
2326
|
Color_2 as Color,
|
|
2327
|
+
HexColorString_2 as HexColorString,
|
|
2252
2328
|
AssetSources,
|
|
2253
2329
|
AssetSource_2 as AssetSource,
|
|
2254
2330
|
AssetResult_2 as AssetResult,
|
|
@@ -2418,6 +2494,16 @@ export declare interface CursorEvent extends CustomEvent<string> {
|
|
|
2418
2494
|
preventDefault(): void;
|
|
2419
2495
|
}
|
|
2420
2496
|
|
|
2497
|
+
/**
|
|
2498
|
+
* @public
|
|
2499
|
+
*/
|
|
2500
|
+
export declare type CutoutOperation = 'Difference' | 'Intersection' | 'Union' | 'XOR';
|
|
2501
|
+
|
|
2502
|
+
/**
|
|
2503
|
+
* @public
|
|
2504
|
+
*/
|
|
2505
|
+
export declare type CutoutType = 'Solid' | 'Dashed';
|
|
2506
|
+
|
|
2421
2507
|
/**
|
|
2422
2508
|
* @public
|
|
2423
2509
|
*/
|
|
@@ -2445,6 +2531,7 @@ export declare enum DesignBlockType {
|
|
|
2445
2531
|
Image = "//ly.img.ubq/image",
|
|
2446
2532
|
Video = "//ly.img.ubq/video",
|
|
2447
2533
|
VideoFill = "//ly.img.ubq/fill/video",
|
|
2534
|
+
ImageFill = "//ly.img.ubq/fill/image",
|
|
2448
2535
|
Audio = "//ly.img.ubq/audio",
|
|
2449
2536
|
Text = "//ly.img.ubq/text",
|
|
2450
2537
|
Sticker = "//ly.img.ubq/sticker",
|
|
@@ -2454,7 +2541,8 @@ export declare enum DesignBlockType {
|
|
|
2454
2541
|
StarShape = "//ly.img.ubq/shapes/star",
|
|
2455
2542
|
PolygonShape = "//ly.img.ubq/shapes/polygon",
|
|
2456
2543
|
EllipseShape = "//ly.img.ubq/shapes/ellipse",
|
|
2457
|
-
Group = "//ly.img.ubq/group"
|
|
2544
|
+
Group = "//ly.img.ubq/group",
|
|
2545
|
+
Cutout = "//ly.img.ubq/cutout"
|
|
2458
2546
|
}
|
|
2459
2547
|
|
|
2460
2548
|
/**
|
|
@@ -2720,6 +2808,19 @@ export declare class EditorAPI {
|
|
|
2720
2808
|
* @returns An empty result on success, an error otherwise.
|
|
2721
2809
|
*/
|
|
2722
2810
|
removeSpotColor(name: string): void;
|
|
2811
|
+
/**
|
|
2812
|
+
* Set the spot color assign to a cutout type.
|
|
2813
|
+
* All cutout blocks of the given type will be immediately assigned that spot color.
|
|
2814
|
+
* @param type - The cutout type.
|
|
2815
|
+
* @param name - The spot color name to assign.
|
|
2816
|
+
*/
|
|
2817
|
+
setSpotColorForCutoutType(type: CutoutType, color: string): void;
|
|
2818
|
+
/**
|
|
2819
|
+
* Get the name of the spot color assigned to a cutout type.
|
|
2820
|
+
* @param type - The cutout type.
|
|
2821
|
+
* @returns The color spot name.
|
|
2822
|
+
*/
|
|
2823
|
+
getSpotColorForCutoutType(type: CutoutType): string;
|
|
2723
2824
|
}
|
|
2724
2825
|
|
|
2725
2826
|
/**
|
|
@@ -2876,7 +2977,14 @@ declare type Handler<T> = (v: T) => void;
|
|
|
2876
2977
|
* @example #6686FF or #6686FFFF
|
|
2877
2978
|
* @public
|
|
2878
2979
|
*/
|
|
2879
|
-
declare type HexColorString = string;
|
|
2980
|
+
export declare type HexColorString = string;
|
|
2981
|
+
|
|
2982
|
+
/**
|
|
2983
|
+
* @deprecated This type definition has been moved
|
|
2984
|
+
* It can instead be imported directly as `HexColorString`
|
|
2985
|
+
* @public
|
|
2986
|
+
*/
|
|
2987
|
+
declare type HexColorString_2 = HexColorString;
|
|
2880
2988
|
|
|
2881
2989
|
/**
|
|
2882
2990
|
* A numerical identifier for a history stack
|
|
@@ -3017,14 +3125,28 @@ export declare interface PageDuration {
|
|
|
3017
3125
|
end: number;
|
|
3018
3126
|
}
|
|
3019
3127
|
|
|
3020
|
-
/**
|
|
3128
|
+
/**
|
|
3129
|
+
* @deprecated This type definition is unused and will be removed
|
|
3130
|
+
* @public
|
|
3131
|
+
*/
|
|
3021
3132
|
declare type PageFormatDefinition = Preset & {
|
|
3022
3133
|
width: number;
|
|
3023
3134
|
height: number;
|
|
3024
|
-
|
|
3135
|
+
/** @deprecated This property is unused and will be removed */
|
|
3136
|
+
dpi?: number;
|
|
3137
|
+
/** @deprecated This property is unused and will be removed */
|
|
3138
|
+
bleedMargin?: number;
|
|
3139
|
+
unit: 'px' | 'mm' | 'in' | DesignUnit;
|
|
3025
3140
|
fixedOrientation?: boolean;
|
|
3026
3141
|
};
|
|
3027
3142
|
|
|
3143
|
+
/**
|
|
3144
|
+
* A color definition for the custom color palette.
|
|
3145
|
+
* The RGB and CMYK components must all be specified in the range [0-1].
|
|
3146
|
+
* @public
|
|
3147
|
+
*/
|
|
3148
|
+
export declare type PaletteColor = HexColorString | RGBColor | RGBAColor | SpotColor;
|
|
3149
|
+
|
|
3028
3150
|
/**
|
|
3029
3151
|
* - Absolute: Position in absolute design units.
|
|
3030
3152
|
* - Percent: Position in relation to the block's parent's size in percent, where 1.0 means 100%.
|
|
@@ -3034,7 +3156,10 @@ declare type PageFormatDefinition = Preset & {
|
|
|
3034
3156
|
*/
|
|
3035
3157
|
export declare type PositionMode = 'Absolute' | 'Percent' | 'Auto';
|
|
3036
3158
|
|
|
3037
|
-
/**
|
|
3159
|
+
/**
|
|
3160
|
+
* @deprecated This type definition is not used anymore and will be removed.
|
|
3161
|
+
* @public
|
|
3162
|
+
*/
|
|
3038
3163
|
declare type Preset = {
|
|
3039
3164
|
meta?: {
|
|
3040
3165
|
default?: boolean;
|
|
@@ -3043,20 +3168,28 @@ declare type Preset = {
|
|
|
3043
3168
|
};
|
|
3044
3169
|
};
|
|
3045
3170
|
|
|
3046
|
-
/**
|
|
3171
|
+
/**
|
|
3172
|
+
* @deprecated This type definition will be removed.
|
|
3173
|
+
* If you need to reference this type in your code,
|
|
3174
|
+
* use `Configuration['presets']` instead of `ConfigTypes.Presets`.
|
|
3175
|
+
* @public
|
|
3176
|
+
*/
|
|
3047
3177
|
declare type Presets = {
|
|
3178
|
+
/**
|
|
3179
|
+
* @deprecated The configuration option `presets.colors` does not exist anymore.
|
|
3180
|
+
*/
|
|
3048
3181
|
colors?: {
|
|
3049
|
-
[id: string]:
|
|
3182
|
+
[id: string]: Color_2;
|
|
3050
3183
|
};
|
|
3051
3184
|
typefaces?: {
|
|
3052
3185
|
[id: string]: TypefaceDefinition;
|
|
3053
3186
|
};
|
|
3054
|
-
pageFormats?: {
|
|
3055
|
-
[id: string]: PageFormatDefinition;
|
|
3056
|
-
};
|
|
3057
3187
|
colorPalettes?: {
|
|
3058
3188
|
[id: string]: ColorPaletteDefinition;
|
|
3059
3189
|
};
|
|
3190
|
+
pageFormats?: {
|
|
3191
|
+
[id: string]: PageFormatDefinition;
|
|
3192
|
+
};
|
|
3060
3193
|
templates?: {
|
|
3061
3194
|
[id: string]: TemplateDefinition;
|
|
3062
3195
|
};
|
|
@@ -3468,14 +3601,23 @@ export declare function supportsVideo(): boolean;
|
|
|
3468
3601
|
export declare function supportsWasm(): boolean;
|
|
3469
3602
|
|
|
3470
3603
|
/** @public */
|
|
3471
|
-
declare type TemplateDefinition =
|
|
3604
|
+
declare type TemplateDefinition = {
|
|
3605
|
+
/** @deprecated The meta field is not used anymore */
|
|
3606
|
+
meta?: Preset['meta'];
|
|
3472
3607
|
label: string;
|
|
3473
3608
|
scene: string | URL | (() => Promise<string>);
|
|
3474
3609
|
thumbnailURL?: string | URL;
|
|
3475
3610
|
};
|
|
3476
3611
|
|
|
3612
|
+
/**
|
|
3613
|
+
* @public
|
|
3614
|
+
*/
|
|
3615
|
+
export declare type TextCase = 'Normal' | 'Uppercase' | 'Lowercase' | 'Titlecase';
|
|
3616
|
+
|
|
3477
3617
|
/** @public */
|
|
3478
|
-
declare type TypefaceDefinition =
|
|
3618
|
+
declare type TypefaceDefinition = {
|
|
3619
|
+
/** @deprecated The meta field is not used anymore */
|
|
3620
|
+
meta?: Preset['meta'];
|
|
3479
3621
|
family: string;
|
|
3480
3622
|
fonts: {
|
|
3481
3623
|
fontURL: string;
|