@cesdk/node 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
|
@@ -1619,6 +1619,51 @@ export declare class BlockAPI {
|
|
|
1619
1619
|
* @returns The drop shadow's clipping.
|
|
1620
1620
|
*/
|
|
1621
1621
|
getDropShadowClip(id: DesignBlockId): boolean;
|
|
1622
|
+
/**
|
|
1623
|
+
* Create a Cutout block.
|
|
1624
|
+
* @param blocks - The blocks whose shape will serve as the basis for the cutout's path.
|
|
1625
|
+
* @returns The handle of the created Cutout.
|
|
1626
|
+
*/
|
|
1627
|
+
createCutoutFromBlocks(ids: DesignBlockId[]): DesignBlockId;
|
|
1628
|
+
/**
|
|
1629
|
+
* Create a Cutout block.
|
|
1630
|
+
* @param path - An SVG string describing a path.
|
|
1631
|
+
* @returns The handle of the created Cutout.
|
|
1632
|
+
*/
|
|
1633
|
+
createCutoutFromPath(path: string): DesignBlockId;
|
|
1634
|
+
/**
|
|
1635
|
+
* Set the cutout's offset from the underlying path.
|
|
1636
|
+
* @param block - The block whose offset should be set.
|
|
1637
|
+
* @param offset - The offset to be set.
|
|
1638
|
+
*/
|
|
1639
|
+
setCutoutOffset(id: DesignBlockId, offset: number): void;
|
|
1640
|
+
/**
|
|
1641
|
+
* Get the cutout's offset from the underlying path.
|
|
1642
|
+
* @param block - The block whose offset should be queried.
|
|
1643
|
+
* @returns The cutout's offset.
|
|
1644
|
+
*/
|
|
1645
|
+
getCutoutOffset(id: DesignBlockId): number;
|
|
1646
|
+
/**
|
|
1647
|
+
* Set the cutout's type.
|
|
1648
|
+
* @param block - The block whose type should be set.
|
|
1649
|
+
* @param type - The type to be set.
|
|
1650
|
+
*/
|
|
1651
|
+
setCutoutType(id: DesignBlockId, type: CutoutType): void;
|
|
1652
|
+
/**
|
|
1653
|
+
* Get the cutout's type.
|
|
1654
|
+
* @param block - The block whose type should be queried.
|
|
1655
|
+
* @returns The cutout's type.
|
|
1656
|
+
*/
|
|
1657
|
+
getCutoutType(id: DesignBlockId): CutoutType;
|
|
1658
|
+
/** Perform a boolean operation on the given Cutout blocks.
|
|
1659
|
+
* The cutout offset of the new block is 0.
|
|
1660
|
+
* The cutout type of the new block is that of the first block.
|
|
1661
|
+
* When performing a `Difference` operation, the first block is the block subtracted from.
|
|
1662
|
+
* @param blocks - The blocks with which to perform to the operation.
|
|
1663
|
+
* @param op - The boolean operation to perform.
|
|
1664
|
+
* @returns The newly created block or an error.
|
|
1665
|
+
*/
|
|
1666
|
+
createCutoutFromOperation(ids: DesignBlockId[], op: CutoutOperation): DesignBlockId;
|
|
1622
1667
|
/**
|
|
1623
1668
|
* Inserts the given text into the selected range of the text block.
|
|
1624
1669
|
* @param block - The text block into which to insert the given text.
|
|
@@ -1655,9 +1700,11 @@ export declare class BlockAPI {
|
|
|
1655
1700
|
* Returns the ordered unique list of colors of the text in the selected range.
|
|
1656
1701
|
* @param block - The text block whose colors should be returned.
|
|
1657
1702
|
* @param from - The start index of the UTF-16 range whose colors should be returned.
|
|
1658
|
-
*
|
|
1703
|
+
* 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.
|
|
1704
|
+
* If the value is negative and the block is not being edited, this will fall back to the start of the entire text range.
|
|
1659
1705
|
* @param to - The UTF-16 index after the last grapheme whose colors should be returned.
|
|
1660
|
-
*
|
|
1706
|
+
* 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.
|
|
1707
|
+
* If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
|
|
1661
1708
|
*/
|
|
1662
1709
|
getTextColors(id: DesignBlockId, from?: number, to?: number): Array<RGBAColor | SpotColor>;
|
|
1663
1710
|
/**
|
|
@@ -1682,6 +1729,29 @@ export declare class BlockAPI {
|
|
|
1682
1729
|
* If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
|
|
1683
1730
|
*/
|
|
1684
1731
|
getTextFontStyles(id: DesignBlockId, from?: number, to?: number): FontStyle[];
|
|
1732
|
+
/**
|
|
1733
|
+
* Returns the ordered list of text cases of the text in the selected range.
|
|
1734
|
+
* @param block - The text block whose text cases should be returned.
|
|
1735
|
+
* @param from - The start index of the UTF-16 range whose text cases should be returned.
|
|
1736
|
+
* 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.
|
|
1737
|
+
* If the value is negative and the block is not being edited, this will fall back to the start of the entire text range.
|
|
1738
|
+
* @param to - The UTF-16 index after the last grapheme whose text cases should be returned.
|
|
1739
|
+
* 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.
|
|
1740
|
+
* If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
|
|
1741
|
+
*/
|
|
1742
|
+
getTextCases(id: DesignBlockId, from?: number, to?: number): TextCase[];
|
|
1743
|
+
/**
|
|
1744
|
+
* Sets the given text case for the selected range of text.
|
|
1745
|
+
* @param id - The text block whose text case should be changed.
|
|
1746
|
+
* @param textCase - The new text case value.
|
|
1747
|
+
* @param from - The start index of the UTF-16 range whose text cases should be returned.
|
|
1748
|
+
* 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.
|
|
1749
|
+
* If the value is negative and the block is not being edited, this will fall back to the start of the entire text range.
|
|
1750
|
+
* @param to - The UTF-16 index after the last grapheme whose text cases should be returned.
|
|
1751
|
+
* 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.
|
|
1752
|
+
* If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
|
|
1753
|
+
*/
|
|
1754
|
+
setTextCase(id: DesignBlockId, textCase: TextCase, from?: number, to?: number): void;
|
|
1685
1755
|
/**
|
|
1686
1756
|
* Query if the given block has fill color properties.
|
|
1687
1757
|
* @param id - The block to query.
|
|
@@ -2179,26 +2249,32 @@ export declare interface CMYKColor {
|
|
|
2179
2249
|
}
|
|
2180
2250
|
|
|
2181
2251
|
/**
|
|
2182
|
-
*
|
|
2183
|
-
*
|
|
2252
|
+
* @deprecated This type definition has been removed.
|
|
2253
|
+
* Instead of `ConfigTypes.Color`, this can be imported directly as `PaletteColor`.
|
|
2184
2254
|
* @public
|
|
2185
2255
|
*/
|
|
2186
|
-
declare type Color_2 =
|
|
2256
|
+
declare type Color_2 = PaletteColor;
|
|
2187
2257
|
|
|
2188
|
-
/**
|
|
2258
|
+
/**
|
|
2259
|
+
* @deprecated This type definition is not used anymore and will be removed.
|
|
2260
|
+
* @public
|
|
2261
|
+
*/
|
|
2189
2262
|
declare type ColorDefinition = Preset & {
|
|
2190
2263
|
value: Color_2;
|
|
2191
2264
|
};
|
|
2192
2265
|
|
|
2193
|
-
/**
|
|
2266
|
+
/**
|
|
2267
|
+
* @deprecated This type definition is not used anymore and will be removed.
|
|
2268
|
+
* @public
|
|
2269
|
+
*/
|
|
2194
2270
|
declare type ColorPaletteDefinition = Preset & {
|
|
2195
2271
|
entries: Color_2[];
|
|
2196
2272
|
};
|
|
2197
2273
|
|
|
2198
2274
|
declare namespace ConfigTypes {
|
|
2199
2275
|
export {
|
|
2200
|
-
HexColorString,
|
|
2201
2276
|
Color_2 as Color,
|
|
2277
|
+
HexColorString_2 as HexColorString,
|
|
2202
2278
|
AssetSources,
|
|
2203
2279
|
AssetSource_2 as AssetSource,
|
|
2204
2280
|
AssetResult_2 as AssetResult,
|
|
@@ -2350,6 +2426,16 @@ declare class CreativeEngine {
|
|
|
2350
2426
|
}
|
|
2351
2427
|
export default CreativeEngine;
|
|
2352
2428
|
|
|
2429
|
+
/**
|
|
2430
|
+
* @public
|
|
2431
|
+
*/
|
|
2432
|
+
export declare type CutoutOperation = 'Difference' | 'Intersection' | 'Union' | 'XOR';
|
|
2433
|
+
|
|
2434
|
+
/**
|
|
2435
|
+
* @public
|
|
2436
|
+
*/
|
|
2437
|
+
export declare type CutoutType = 'Solid' | 'Dashed';
|
|
2438
|
+
|
|
2353
2439
|
/**
|
|
2354
2440
|
* @public
|
|
2355
2441
|
*/
|
|
@@ -2377,6 +2463,7 @@ export declare enum DesignBlockType {
|
|
|
2377
2463
|
Image = "//ly.img.ubq/image",
|
|
2378
2464
|
Video = "//ly.img.ubq/video",
|
|
2379
2465
|
VideoFill = "//ly.img.ubq/fill/video",
|
|
2466
|
+
ImageFill = "//ly.img.ubq/fill/image",
|
|
2380
2467
|
Audio = "//ly.img.ubq/audio",
|
|
2381
2468
|
Text = "//ly.img.ubq/text",
|
|
2382
2469
|
Sticker = "//ly.img.ubq/sticker",
|
|
@@ -2386,7 +2473,8 @@ export declare enum DesignBlockType {
|
|
|
2386
2473
|
StarShape = "//ly.img.ubq/shapes/star",
|
|
2387
2474
|
PolygonShape = "//ly.img.ubq/shapes/polygon",
|
|
2388
2475
|
EllipseShape = "//ly.img.ubq/shapes/ellipse",
|
|
2389
|
-
Group = "//ly.img.ubq/group"
|
|
2476
|
+
Group = "//ly.img.ubq/group",
|
|
2477
|
+
Cutout = "//ly.img.ubq/cutout"
|
|
2390
2478
|
}
|
|
2391
2479
|
|
|
2392
2480
|
/**
|
|
@@ -2652,6 +2740,19 @@ export declare class EditorAPI {
|
|
|
2652
2740
|
* @returns An empty result on success, an error otherwise.
|
|
2653
2741
|
*/
|
|
2654
2742
|
removeSpotColor(name: string): void;
|
|
2743
|
+
/**
|
|
2744
|
+
* Set the spot color assign to a cutout type.
|
|
2745
|
+
* All cutout blocks of the given type will be immediately assigned that spot color.
|
|
2746
|
+
* @param type - The cutout type.
|
|
2747
|
+
* @param name - The spot color name to assign.
|
|
2748
|
+
*/
|
|
2749
|
+
setSpotColorForCutoutType(type: CutoutType, color: string): void;
|
|
2750
|
+
/**
|
|
2751
|
+
* Get the name of the spot color assigned to a cutout type.
|
|
2752
|
+
* @param type - The cutout type.
|
|
2753
|
+
* @returns The color spot name.
|
|
2754
|
+
*/
|
|
2755
|
+
getSpotColorForCutoutType(type: CutoutType): string;
|
|
2655
2756
|
}
|
|
2656
2757
|
|
|
2657
2758
|
/**
|
|
@@ -2802,7 +2903,14 @@ declare type Groups = string[];
|
|
|
2802
2903
|
* @example #6686FF or #6686FFFF
|
|
2803
2904
|
* @public
|
|
2804
2905
|
*/
|
|
2805
|
-
declare type HexColorString = string;
|
|
2906
|
+
export declare type HexColorString = string;
|
|
2907
|
+
|
|
2908
|
+
/**
|
|
2909
|
+
* @deprecated This type definition has been moved
|
|
2910
|
+
* It can instead be imported directly as `HexColorString`
|
|
2911
|
+
* @public
|
|
2912
|
+
*/
|
|
2913
|
+
declare type HexColorString_2 = HexColorString;
|
|
2806
2914
|
|
|
2807
2915
|
/**
|
|
2808
2916
|
* A numerical identifier for a history stack
|
|
@@ -2913,14 +3021,28 @@ export declare interface PageDuration {
|
|
|
2913
3021
|
end: number;
|
|
2914
3022
|
}
|
|
2915
3023
|
|
|
2916
|
-
/**
|
|
3024
|
+
/**
|
|
3025
|
+
* @deprecated This type definition is unused and will be removed
|
|
3026
|
+
* @public
|
|
3027
|
+
*/
|
|
2917
3028
|
declare type PageFormatDefinition = Preset & {
|
|
2918
3029
|
width: number;
|
|
2919
3030
|
height: number;
|
|
2920
|
-
|
|
3031
|
+
/** @deprecated This property is unused and will be removed */
|
|
3032
|
+
dpi?: number;
|
|
3033
|
+
/** @deprecated This property is unused and will be removed */
|
|
3034
|
+
bleedMargin?: number;
|
|
3035
|
+
unit: 'px' | 'mm' | 'in' | DesignUnit;
|
|
2921
3036
|
fixedOrientation?: boolean;
|
|
2922
3037
|
};
|
|
2923
3038
|
|
|
3039
|
+
/**
|
|
3040
|
+
* A color definition for the custom color palette.
|
|
3041
|
+
* The RGB and CMYK components must all be specified in the range [0-1].
|
|
3042
|
+
* @public
|
|
3043
|
+
*/
|
|
3044
|
+
export declare type PaletteColor = HexColorString | RGBColor | RGBAColor | SpotColor;
|
|
3045
|
+
|
|
2924
3046
|
/**
|
|
2925
3047
|
* - Absolute: Position in absolute design units.
|
|
2926
3048
|
* - Percent: Position in relation to the block's parent's size in percent, where 1.0 means 100%.
|
|
@@ -2930,7 +3052,10 @@ declare type PageFormatDefinition = Preset & {
|
|
|
2930
3052
|
*/
|
|
2931
3053
|
export declare type PositionMode = 'Absolute' | 'Percent' | 'Auto';
|
|
2932
3054
|
|
|
2933
|
-
/**
|
|
3055
|
+
/**
|
|
3056
|
+
* @deprecated This type definition is not used anymore and will be removed.
|
|
3057
|
+
* @public
|
|
3058
|
+
*/
|
|
2934
3059
|
declare type Preset = {
|
|
2935
3060
|
meta?: {
|
|
2936
3061
|
default?: boolean;
|
|
@@ -2939,20 +3064,28 @@ declare type Preset = {
|
|
|
2939
3064
|
};
|
|
2940
3065
|
};
|
|
2941
3066
|
|
|
2942
|
-
/**
|
|
3067
|
+
/**
|
|
3068
|
+
* @deprecated This type definition will be removed.
|
|
3069
|
+
* If you need to reference this type in your code,
|
|
3070
|
+
* use `Configuration['presets']` instead of `ConfigTypes.Presets`.
|
|
3071
|
+
* @public
|
|
3072
|
+
*/
|
|
2943
3073
|
declare type Presets = {
|
|
3074
|
+
/**
|
|
3075
|
+
* @deprecated The configuration option `presets.colors` does not exist anymore.
|
|
3076
|
+
*/
|
|
2944
3077
|
colors?: {
|
|
2945
|
-
[id: string]:
|
|
3078
|
+
[id: string]: Color_2;
|
|
2946
3079
|
};
|
|
2947
3080
|
typefaces?: {
|
|
2948
3081
|
[id: string]: TypefaceDefinition;
|
|
2949
3082
|
};
|
|
2950
|
-
pageFormats?: {
|
|
2951
|
-
[id: string]: PageFormatDefinition;
|
|
2952
|
-
};
|
|
2953
3083
|
colorPalettes?: {
|
|
2954
3084
|
[id: string]: ColorPaletteDefinition;
|
|
2955
3085
|
};
|
|
3086
|
+
pageFormats?: {
|
|
3087
|
+
[id: string]: PageFormatDefinition;
|
|
3088
|
+
};
|
|
2956
3089
|
templates?: {
|
|
2957
3090
|
[id: string]: TemplateDefinition;
|
|
2958
3091
|
};
|
|
@@ -3284,14 +3417,23 @@ export declare type StrokeStyle = 'Dashed' | 'DashedRound' | 'Dotted' | 'LongDas
|
|
|
3284
3417
|
declare type Subscription = number;
|
|
3285
3418
|
|
|
3286
3419
|
/** @public */
|
|
3287
|
-
declare type TemplateDefinition =
|
|
3420
|
+
declare type TemplateDefinition = {
|
|
3421
|
+
/** @deprecated The meta field is not used anymore */
|
|
3422
|
+
meta?: Preset['meta'];
|
|
3288
3423
|
label: string;
|
|
3289
3424
|
scene: string | URL | (() => Promise<string>);
|
|
3290
3425
|
thumbnailURL?: string | URL;
|
|
3291
3426
|
};
|
|
3292
3427
|
|
|
3428
|
+
/**
|
|
3429
|
+
* @public
|
|
3430
|
+
*/
|
|
3431
|
+
export declare type TextCase = 'Normal' | 'Uppercase' | 'Lowercase' | 'Titlecase';
|
|
3432
|
+
|
|
3293
3433
|
/** @public */
|
|
3294
|
-
declare type TypefaceDefinition =
|
|
3434
|
+
declare type TypefaceDefinition = {
|
|
3435
|
+
/** @deprecated The meta field is not used anymore */
|
|
3436
|
+
meta?: Preset['meta'];
|
|
3295
3437
|
family: string;
|
|
3296
3438
|
fonts: {
|
|
3297
3439
|
fontURL: string;
|