@cesdk/node 1.14.0 → 1.15.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.
- package/ThirdPartyLicenses.md +537 -438
- package/assets/core/{cesdk-v1.14.0-575eaf196b44d3af0882.wasm → cesdk-v1.15.0-rc.0-12a22939130d886486a7.wasm} +0 -0
- package/assets/core/{cesdk-v1.14.0-9a6bc3ff1760df174440.data → cesdk-v1.15.0-rc.0-7a4b44a70a18a86d7978.data} +0 -0
- package/index.d.ts +62 -97
- package/index.js +1 -1
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
package/index.d.ts
CHANGED
|
@@ -19,6 +19,9 @@ export declare interface Asset {
|
|
|
19
19
|
mimeType?: string;
|
|
20
20
|
/** The type id of the design block that should be created from this asset. */
|
|
21
21
|
blockType?: string;
|
|
22
|
+
fillType?: string;
|
|
23
|
+
shapeType?: string;
|
|
24
|
+
kind?: string;
|
|
22
25
|
uri?: string;
|
|
23
26
|
thumbUri?: string;
|
|
24
27
|
previewUri?: string;
|
|
@@ -417,6 +420,19 @@ export declare class BlockAPI {
|
|
|
417
420
|
* @returns The blocks type.
|
|
418
421
|
*/
|
|
419
422
|
getType(id: DesignBlockId): DesignBlockType;
|
|
423
|
+
/**
|
|
424
|
+
* Get the kind of the given block, fails if the block is invalid.
|
|
425
|
+
* @param id - The block to query.
|
|
426
|
+
* @returns The block's kind.
|
|
427
|
+
*/
|
|
428
|
+
getKind(id: DesignBlockId): string;
|
|
429
|
+
/**
|
|
430
|
+
* Set the kind of the given block, fails if the block is invalid.
|
|
431
|
+
* @param id - The block whose kind should be changed.
|
|
432
|
+
* @param kind - The new kind.
|
|
433
|
+
* @returns The block's kind.
|
|
434
|
+
*/
|
|
435
|
+
setKind(id: DesignBlockId, kind: string): void;
|
|
420
436
|
/**
|
|
421
437
|
* Selects the given block and deselects all other blocks.
|
|
422
438
|
* @param id - The block to be selected.
|
|
@@ -445,16 +461,16 @@ export declare class BlockAPI {
|
|
|
445
461
|
* @param callback - This function is called at the end of the engine update if the selection has changed.
|
|
446
462
|
* @returns A method to unsubscribe.
|
|
447
463
|
*/
|
|
448
|
-
onSelectionChanged(callback: () => void)
|
|
464
|
+
onSelectionChanged: (callback: () => void) => (() => void);
|
|
449
465
|
/**
|
|
450
466
|
* Subscribe to block click events.
|
|
451
467
|
* @param callback - This function is called at the end of the engine update if a block has been clicked.
|
|
452
468
|
* @returns A method to unsubscribe.
|
|
453
469
|
*/
|
|
454
|
-
onClicked(callback: (id: DesignBlockId) => void)
|
|
470
|
+
onClicked: (callback: (id: DesignBlockId) => void) => (() => void);
|
|
455
471
|
/**
|
|
456
472
|
* Confirms that a given set of blocks can be grouped together.
|
|
457
|
-
* @param ids -
|
|
473
|
+
* @param ids - An array of block ids.
|
|
458
474
|
* @returns Whether the blocks can be grouped together.
|
|
459
475
|
*/
|
|
460
476
|
isGroupable(ids: DesignBlockId[]): boolean;
|
|
@@ -509,6 +525,12 @@ export declare class BlockAPI {
|
|
|
509
525
|
* @returns A list of block ids.
|
|
510
526
|
*/
|
|
511
527
|
findByType(type: DesignBlockType): DesignBlockId[];
|
|
528
|
+
/**
|
|
529
|
+
* Finds all blocks with the given kind.
|
|
530
|
+
* @param type - The kind to search for.
|
|
531
|
+
* @returns A list of block ids.
|
|
532
|
+
*/
|
|
533
|
+
findByKind(kind: DesignBlockType): DesignBlockId[];
|
|
512
534
|
/**
|
|
513
535
|
* Return all blocks currently known to the engine.
|
|
514
536
|
* @returns A list of block ids.
|
|
@@ -888,7 +910,7 @@ export declare class BlockAPI {
|
|
|
888
910
|
alignVertically(ids: DesignBlockId[], verticalBlockAlignment: VerticalBlockAlignment): void;
|
|
889
911
|
/**
|
|
890
912
|
* Confirms that a given set of blocks can be aligned.
|
|
891
|
-
* @param ids -
|
|
913
|
+
* @param ids - An array of block ids.
|
|
892
914
|
* @returns Whether the blocks can be aligned.
|
|
893
915
|
*/
|
|
894
916
|
isAlignable(ids: DesignBlockId[]): boolean;
|
|
@@ -905,7 +927,7 @@ export declare class BlockAPI {
|
|
|
905
927
|
distributeVertically(ids: DesignBlockId[]): void;
|
|
906
928
|
/**
|
|
907
929
|
* Confirms that a given set of blocks can be distributed.
|
|
908
|
-
* @param ids -
|
|
930
|
+
* @param ids - An array of block ids.
|
|
909
931
|
* @returns Whether the blocks can be distributed.
|
|
910
932
|
*/
|
|
911
933
|
isDistributable(ids: DesignBlockId[]): boolean;
|
|
@@ -1484,60 +1506,6 @@ export declare class BlockAPI {
|
|
|
1484
1506
|
* @returns The stroke join geometry.
|
|
1485
1507
|
*/
|
|
1486
1508
|
getStrokeCornerGeometry(id: DesignBlockId): StrokeCornerGeometry;
|
|
1487
|
-
/**
|
|
1488
|
-
* Query if the given block has outline properties.
|
|
1489
|
-
* @param id - The block to query.
|
|
1490
|
-
* @returns true, if the block has outline properties.
|
|
1491
|
-
* @deprecated Use `hasStroke`.
|
|
1492
|
-
*/
|
|
1493
|
-
hasOutline(id: DesignBlockId): boolean;
|
|
1494
|
-
/**
|
|
1495
|
-
* Set the outline color of the given design block.
|
|
1496
|
-
* @param id - The block whose outline color should be set.
|
|
1497
|
-
* @param color - The outline color to be set, a tuple of
|
|
1498
|
-
* @param r - The red color component in the range of 0 to 1.
|
|
1499
|
-
* @param g - The green color component in the range of 0 to 1.
|
|
1500
|
-
* @param b - The blue color component in the range of 0 to 1.
|
|
1501
|
-
* @param a - The alpha color component in the range of 0 to 1.
|
|
1502
|
-
* @deprecated Use `setStrokeColorRGBA`.
|
|
1503
|
-
*/
|
|
1504
|
-
setOutlineColorRGBA(id: DesignBlockId, r: number, g: number, b: number, a?: number): void;
|
|
1505
|
-
/**
|
|
1506
|
-
* Get the outline color of the given design block.
|
|
1507
|
-
* @param id - The block whose outline color should be queried.
|
|
1508
|
-
* @returns The outline color.
|
|
1509
|
-
* @deprecated Use `getStrokeColorRGBA`.
|
|
1510
|
-
*/
|
|
1511
|
-
getOutlineColorRGBA(id: DesignBlockId): RGBA;
|
|
1512
|
-
/**
|
|
1513
|
-
* Enable or disable the outline of the given design block.
|
|
1514
|
-
* @param id - The block whose outline should be enabled or disabled.
|
|
1515
|
-
* @param enabled - If true, the outline will be enabled.
|
|
1516
|
-
* @deprecated Use `setStrokeEnabled`.
|
|
1517
|
-
*/
|
|
1518
|
-
setOutlineEnabled(id: DesignBlockId, enabled: boolean): void;
|
|
1519
|
-
/**
|
|
1520
|
-
* Query if the outline of the given design block is enabled.
|
|
1521
|
-
* @param id - The block whose outline state should be queried.
|
|
1522
|
-
* @returns True, if outline is enabled.
|
|
1523
|
-
* @deprecated Use `isStrokeEnabled`.
|
|
1524
|
-
*/
|
|
1525
|
-
isOutlineEnabled(id: DesignBlockId): boolean;
|
|
1526
|
-
/**
|
|
1527
|
-
* Set the outline width of the given design block.
|
|
1528
|
-
* @param id - The block whose outline width should be set.
|
|
1529
|
-
* @param width - The outline width to be set.
|
|
1530
|
-
* @deprecated Use `setStrokeWidth`.
|
|
1531
|
-
*/
|
|
1532
|
-
setOutlineWidth(id: DesignBlockId, width: number): void;
|
|
1533
|
-
/**
|
|
1534
|
-
* Get the outline width of the given design block.
|
|
1535
|
-
* @param id - The block whose outline width should be queried.
|
|
1536
|
-
* @returns The outline width.
|
|
1537
|
-
* @deprecated Use the Stroke function
|
|
1538
|
-
* @deprecated Use `getStrokeWidth`.
|
|
1539
|
-
*/
|
|
1540
|
-
getOutlineWidth(id: DesignBlockId): number;
|
|
1541
1509
|
/**
|
|
1542
1510
|
* Query if the given block has a drop shadow property.
|
|
1543
1511
|
* @param id - The block to query.
|
|
@@ -1632,41 +1600,25 @@ export declare class BlockAPI {
|
|
|
1632
1600
|
*/
|
|
1633
1601
|
getDropShadowClip(id: DesignBlockId): boolean;
|
|
1634
1602
|
/**
|
|
1635
|
-
*
|
|
1603
|
+
* Creates a cutout whose path will be the contour of the given blocks.
|
|
1604
|
+
* The cutout path for each element is derived from one two ways:
|
|
1605
|
+
* - Blocks that have already have a vector path (shapes, SVG-based text or stickers).
|
|
1606
|
+
* - Blocks that don't have a vector path are vectorized and then, optionally, simplified to eliminate jaggedness
|
|
1607
|
+
* (images).
|
|
1636
1608
|
* @param blocks - The blocks whose shape will serve as the basis for the cutout's path.
|
|
1637
|
-
* @
|
|
1609
|
+
* @param vectorizeDistanceThreshold - The maximum number of pixels by which the cutout's path can deviate from the
|
|
1610
|
+
* original contour.
|
|
1611
|
+
* @param simplifyDistanceThreshold - The maximum number of pixels by which the simplified cutout path can deviate from
|
|
1612
|
+
* the cutout contour. If 0, no simplification step is performed.
|
|
1613
|
+
* @returns The newly created block or an error.
|
|
1638
1614
|
*/
|
|
1639
|
-
createCutoutFromBlocks(ids: DesignBlockId[]): DesignBlockId;
|
|
1615
|
+
createCutoutFromBlocks(ids: DesignBlockId[], vectorizeDistanceThreshold?: number, simplifyDistanceThreshold?: number): DesignBlockId;
|
|
1640
1616
|
/**
|
|
1641
1617
|
* Create a Cutout block.
|
|
1642
1618
|
* @param path - An SVG string describing a path.
|
|
1643
|
-
* @returns The
|
|
1619
|
+
* @returns The newly created block or an error.
|
|
1644
1620
|
*/
|
|
1645
1621
|
createCutoutFromPath(path: string): DesignBlockId;
|
|
1646
|
-
/**
|
|
1647
|
-
* Set the cutout's offset from the underlying path.
|
|
1648
|
-
* @param block - The block whose offset should be set.
|
|
1649
|
-
* @param offset - The offset to be set.
|
|
1650
|
-
*/
|
|
1651
|
-
setCutoutOffset(id: DesignBlockId, offset: number): void;
|
|
1652
|
-
/**
|
|
1653
|
-
* Get the cutout's offset from the underlying path.
|
|
1654
|
-
* @param block - The block whose offset should be queried.
|
|
1655
|
-
* @returns The cutout's offset.
|
|
1656
|
-
*/
|
|
1657
|
-
getCutoutOffset(id: DesignBlockId): number;
|
|
1658
|
-
/**
|
|
1659
|
-
* Set the cutout's type.
|
|
1660
|
-
* @param block - The block whose type should be set.
|
|
1661
|
-
* @param type - The type to be set.
|
|
1662
|
-
*/
|
|
1663
|
-
setCutoutType(id: DesignBlockId, type: CutoutType): void;
|
|
1664
|
-
/**
|
|
1665
|
-
* Get the cutout's type.
|
|
1666
|
-
* @param block - The block whose type should be queried.
|
|
1667
|
-
* @returns The cutout's type.
|
|
1668
|
-
*/
|
|
1669
|
-
getCutoutType(id: DesignBlockId): CutoutType;
|
|
1670
1622
|
/** Perform a boolean operation on the given Cutout blocks.
|
|
1671
1623
|
* The cutout offset of the new block is 0.
|
|
1672
1624
|
* The cutout type of the new block is that of the first block.
|
|
@@ -1957,13 +1909,6 @@ export declare class BlockAPI {
|
|
|
1957
1909
|
* @returns the enabled state of the placeholder behavior.
|
|
1958
1910
|
*/
|
|
1959
1911
|
isPlaceholderBehaviorEnabled(id: DesignBlockId): boolean;
|
|
1960
|
-
/**
|
|
1961
|
-
* Query if the given block shows placeholder content.
|
|
1962
|
-
* @param id - The block to query.
|
|
1963
|
-
* @returns true, if the block shows placeholder content.
|
|
1964
|
-
* @deprecated Use placeholder controls functions.
|
|
1965
|
-
*/
|
|
1966
|
-
showsPlaceholderContent(id: DesignBlockId): boolean;
|
|
1967
1912
|
/**
|
|
1968
1913
|
* Checks whether the block supports placeholder controls.
|
|
1969
1914
|
* @param block - The block to query.
|
|
@@ -2934,6 +2879,23 @@ export declare class EditorAPI {
|
|
|
2934
2879
|
* @returns The value as string.
|
|
2935
2880
|
*/
|
|
2936
2881
|
getSettingEnum<T extends keyof SettingsEnum>(keypath: T): SettingsEnum[T];
|
|
2882
|
+
/**
|
|
2883
|
+
* Get the possible enum options for a given enum setting.
|
|
2884
|
+
* @param keypath - The settings keypath, e.g. `role`.
|
|
2885
|
+
* @returns The possible enum options as strings.
|
|
2886
|
+
*/
|
|
2887
|
+
getSettingEnumOptions<T extends keyof SettingsEnum>(keypath: T): string[];
|
|
2888
|
+
/**
|
|
2889
|
+
* Returns a list of all the settings available.
|
|
2890
|
+
* @returns A list of settings keypaths.
|
|
2891
|
+
*/
|
|
2892
|
+
findAllSettings(): string[];
|
|
2893
|
+
/**
|
|
2894
|
+
* Returns the type of a setting.
|
|
2895
|
+
* @param keypath - The settings keypath, e.g. `role`.
|
|
2896
|
+
* @returns The setting type.
|
|
2897
|
+
*/
|
|
2898
|
+
getSettingType(keypath: string): SettingType;
|
|
2937
2899
|
/**
|
|
2938
2900
|
* Get the currently available memory in bytes.
|
|
2939
2901
|
* @returns The currently available memory in bytes.
|
|
@@ -3486,7 +3448,7 @@ export declare type SceneLayout = 'Free' | 'VerticalStack' | 'HorizontalStack' |
|
|
|
3486
3448
|
export declare type SceneMode = 'Design' | 'Video';
|
|
3487
3449
|
|
|
3488
3450
|
/** @public */
|
|
3489
|
-
export declare type SettingsBool = 'doubleClickToCropEnabled' | 'features/
|
|
3451
|
+
export declare type SettingsBool = 'doubleClickToCropEnabled' | 'features/effectsEnabled' | 'features/hspSelectiveAdjustmentsEnabled' | 'features/layerListEnabled' | 'features/singlePageModeEnabled' | 'features/templatingEnabled' | 'page/dimOutOfPageAreas' | 'page/title/show' | 'placeholderControls/showButton' | 'placeholderControls/showOverlay' | 'showBuildVersion' | 'touch/dragStartCanSelect' | 'touch/singlePointPanning' | 'trackActivePage' | ArbitraryString;
|
|
3490
3452
|
|
|
3491
3453
|
/** @public */
|
|
3492
3454
|
export declare type SettingsColorRGBA = 'clearColor' | 'errorStateColor' | 'highlightColor' | 'page/title/color' | 'placeholderHighlightColor' | 'progressColor' | ArbitraryString;
|
|
@@ -3499,10 +3461,13 @@ export declare type SettingsEnum = {
|
|
|
3499
3461
|
};
|
|
3500
3462
|
|
|
3501
3463
|
/** @public */
|
|
3502
|
-
export declare type SettingsFloat = 'positionSnappingThreshold';
|
|
3464
|
+
export declare type SettingsFloat = 'positionSnappingThreshold' | ArbitraryString;
|
|
3465
|
+
|
|
3466
|
+
/** @public */
|
|
3467
|
+
export declare type SettingsString = 'basePath' | 'license' | 'page/title/fontFileUri' | ArbitraryString;
|
|
3503
3468
|
|
|
3504
3469
|
/** @public */
|
|
3505
|
-
export declare type
|
|
3470
|
+
export declare type SettingType = 'Bool' | 'Int' | 'Float' | 'String' | 'Color' | 'Enum';
|
|
3506
3471
|
|
|
3507
3472
|
/** @public */
|
|
3508
3473
|
export declare interface Size2 {
|