@cesdk/node 1.9.0-preview.0 → 1.9.0-preview.2
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
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|

|
|
2
2
|
|
|
3
|
-
# Creative Engine
|
|
3
|
+
# IMG.LY Creative Engine
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This package contains the Node.js version of the IMG.LY *Creative Engine*, the core of CE.SDK.
|
|
6
|
+
The Creative Engine enables you to build any design editing UI, automation and creative workflow in any Node environment.
|
|
7
|
+
It offers performant and robust graphics processing capabilities combining the best of layout, typography and image processing with advanced workflows centered around templating and adaptation.
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
engine enables automated image processing as well as building creative editing experiences.
|
|
9
|
+
The Creative Engine seamlessly integrates into any Node.js app whether you are building a photo editor, template-based design tool or scalable automation of content creation for your application.
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
our SDK. It is suitable for integrating image processing and editing into
|
|
12
|
-
SwiftUI or UIKit applications.
|
|
13
|
-
|
|
14
|
-
Visit our [website](https://img.ly/docs/cesdk) for more tutorials on how to integrate and
|
|
11
|
+
Visit our [documentation](https://img.ly/docs/cesdk) for more tutorials on how to integrate and
|
|
15
12
|
customize the engine for your specific use case.
|
|
16
13
|
|
|
14
|
+
## License
|
|
15
|
+
The CreativeEditor SDK is a commercial product. To use it as such and get access to its white-label version - without the watermark in the export - you need to unlock the SDK with a license file. You can purchase a license at https://img.ly/pricing.
|
|
16
|
+
|
|
17
17
|
## Usage
|
|
18
18
|
|
|
19
19
|
## 1. Install the Creative Engine dependency to your project
|
|
Binary file
|
|
Binary file
|
package/index.d.ts
CHANGED
|
@@ -789,6 +789,18 @@ export declare class BlockAPI {
|
|
|
789
789
|
* @returns A list of the property names.
|
|
790
790
|
*/
|
|
791
791
|
findAllProperties(id: DesignBlockId): string[];
|
|
792
|
+
/**
|
|
793
|
+
* Check if a property with a given name is readable
|
|
794
|
+
* @param property - The name of the property whose type should be queried.
|
|
795
|
+
* @returns Whether the property is readable or not. Will return false for unknown properties
|
|
796
|
+
*/
|
|
797
|
+
isPropertyReadable(property: string): boolean;
|
|
798
|
+
/**
|
|
799
|
+
* Check if a property with a given name is writable
|
|
800
|
+
* @param property - The name of the property whose type should be queried.
|
|
801
|
+
* @returns Whether the property is writable or not. Will return false for unknown properties
|
|
802
|
+
*/
|
|
803
|
+
isPropertyWritable(property: string): boolean;
|
|
792
804
|
/**
|
|
793
805
|
* Get the type of a property given its name.
|
|
794
806
|
* @param property - The name of the property whose type should be queried.
|
|
@@ -1792,15 +1804,17 @@ export declare class BlockAPI {
|
|
|
1792
1804
|
/**
|
|
1793
1805
|
* Generate a thumbnail for the given video fill.
|
|
1794
1806
|
* @param id - The video fill.
|
|
1795
|
-
* @returns A thumbnail encoded as
|
|
1807
|
+
* @returns A thumbnail encoded as JPEG with a height of 128px.
|
|
1796
1808
|
*/
|
|
1797
1809
|
getVideoFillThumbnail(id: DesignBlockId): Promise<Blob>;
|
|
1798
1810
|
/**
|
|
1799
|
-
* Generate
|
|
1811
|
+
* Generate a thumbnail atlas for the given video fill.
|
|
1800
1812
|
* @param id - The video fill.
|
|
1801
|
-
* @
|
|
1813
|
+
* @param numberOfColumns - The number of columns to generate.
|
|
1814
|
+
* @param numberOfRows - The number of rows to generate.
|
|
1815
|
+
* @returns A thumbnail atlas of the video as JPEG.
|
|
1802
1816
|
*/
|
|
1803
|
-
getVideoFillThumbnailAtlas(id: DesignBlockId): Promise<Blob>;
|
|
1817
|
+
getVideoFillThumbnailAtlas(id: DesignBlockId, numberOfColumns: number, numberOfRows: number): Promise<Blob>;
|
|
1804
1818
|
}
|
|
1805
1819
|
|
|
1806
1820
|
/** @public */
|
|
@@ -1957,6 +1971,7 @@ export declare enum DesignBlockType {
|
|
|
1957
1971
|
Page = "//ly.img.ubq/page",
|
|
1958
1972
|
Image = "//ly.img.ubq/image",
|
|
1959
1973
|
Video = "//ly.img.ubq/video",
|
|
1974
|
+
Audio = "//ly.img.ubq/audio",
|
|
1960
1975
|
Text = "//ly.img.ubq/text",
|
|
1961
1976
|
Sticker = "//ly.img.ubq/sticker",
|
|
1962
1977
|
VectorPath = "//ly.img.ubq/vector_path",
|
|
@@ -2048,14 +2063,14 @@ export declare class EditorAPI {
|
|
|
2048
2063
|
onSettingsChanged(callback: () => void): () => void;
|
|
2049
2064
|
/**
|
|
2050
2065
|
* Set a boolean setting.
|
|
2051
|
-
* @param keypath - The settings keypath, e.g. `
|
|
2066
|
+
* @param keypath - The settings keypath, e.g. `doubleClickToCropEnabled`
|
|
2052
2067
|
* @param value - The value to set.
|
|
2053
2068
|
* @throws An error, if the keypath is invalid.
|
|
2054
2069
|
*/
|
|
2055
2070
|
setSettingBool(keypath: string, value: boolean): void;
|
|
2056
2071
|
/**
|
|
2057
2072
|
* Get a boolean setting.
|
|
2058
|
-
* @param keypath - The settings keypath, e.g. `
|
|
2073
|
+
* @param keypath - The settings keypath, e.g. `doubleClickToCropEnabled`
|
|
2059
2074
|
* @throws An error, if the keypath is invalid.
|
|
2060
2075
|
*/
|
|
2061
2076
|
getSettingBool(keypath: string): boolean;
|
|
@@ -2074,33 +2089,33 @@ export declare class EditorAPI {
|
|
|
2074
2089
|
getSettingInt(keypath: string): number;
|
|
2075
2090
|
/**
|
|
2076
2091
|
* Set a float setting.
|
|
2077
|
-
* @param keypath - The settings keypath, e.g. `
|
|
2092
|
+
* @param keypath - The settings keypath, e.g. `positionSnappingThreshold`
|
|
2078
2093
|
* @param value - The value to set.
|
|
2079
2094
|
* @throws An error, if the keypath is invalid.
|
|
2080
2095
|
*/
|
|
2081
2096
|
setSettingFloat(keypath: string, value: number): void;
|
|
2082
2097
|
/**
|
|
2083
2098
|
* Get a float setting.
|
|
2084
|
-
* @param keypath - The settings keypath, e.g. `
|
|
2099
|
+
* @param keypath - The settings keypath, e.g. `positionSnappingThreshold`
|
|
2085
2100
|
* @throws An error, if the keypath is invalid.
|
|
2086
2101
|
*/
|
|
2087
2102
|
getSettingFloat(keypath: string): number;
|
|
2088
2103
|
/**
|
|
2089
2104
|
* Set a string setting.
|
|
2090
|
-
* @param keypath - The settings keypath, e.g. `
|
|
2105
|
+
* @param keypath - The settings keypath, e.g. `license`
|
|
2091
2106
|
* @param value - The value to set.
|
|
2092
2107
|
* @throws An error, if the keypath is invalid.
|
|
2093
2108
|
*/
|
|
2094
2109
|
setSettingString(keypath: string, value: string): void;
|
|
2095
2110
|
/**
|
|
2096
2111
|
* Get a string setting.
|
|
2097
|
-
* @param keypath - The settings keypath, e.g. `
|
|
2112
|
+
* @param keypath - The settings keypath, e.g. `license`
|
|
2098
2113
|
* @throws An error, if the keypath is invalid.
|
|
2099
2114
|
*/
|
|
2100
2115
|
getSettingString(keypath: string): string;
|
|
2101
2116
|
/**
|
|
2102
2117
|
* Set a color setting.
|
|
2103
|
-
* @param keypath - The settings keypath, e.g. `
|
|
2118
|
+
* @param keypath - The settings keypath, e.g. `highlightColor`.
|
|
2104
2119
|
* @param r - The red color component in the range of 0 to 1.
|
|
2105
2120
|
* @param g - The green color component in the range of 0 to 1.
|
|
2106
2121
|
* @param b - The blue color component in the range of 0 to 1.
|
|
@@ -2109,19 +2124,19 @@ export declare class EditorAPI {
|
|
|
2109
2124
|
setSettingColorRGBA(keypath: string, r: number, g: number, b: number, a?: number): void;
|
|
2110
2125
|
/**
|
|
2111
2126
|
* Get a color setting.
|
|
2112
|
-
* @param keypath - The settings keypath, e.g. `
|
|
2127
|
+
* @param keypath - The settings keypath, e.g. `highlightColor`.
|
|
2113
2128
|
* @returns A tuple of channels red, green, blue and alpha in the range of 0 to 1.
|
|
2114
2129
|
*/
|
|
2115
2130
|
getSettingColorRGBA(keypath: string): RGBA;
|
|
2116
2131
|
/**
|
|
2117
2132
|
* Set an enum setting.
|
|
2118
|
-
* @param keypath - The settings keypath, e.g. `
|
|
2133
|
+
* @param keypath - The settings keypath, e.g. `role`.
|
|
2119
2134
|
* @param value - The enum value as string.
|
|
2120
2135
|
*/
|
|
2121
2136
|
setSettingEnum(keypath: string, value: string): void;
|
|
2122
2137
|
/**
|
|
2123
2138
|
* Get an enum setting.
|
|
2124
|
-
* @param keypath - The settings keypath, e.g. `
|
|
2139
|
+
* @param keypath - The settings keypath, e.g. `role`.
|
|
2125
2140
|
* @returns The value as string.
|
|
2126
2141
|
*/
|
|
2127
2142
|
getSettingEnum(keypath: string): string;
|
|
@@ -2135,7 +2150,7 @@ export declare class EditorAPI {
|
|
|
2135
2150
|
setURIResolver(resolver: (URI: string) => string): void;
|
|
2136
2151
|
/**
|
|
2137
2152
|
* This is the default implementation for the URI resolver.
|
|
2138
|
-
* It resolves the given path relative to the `
|
|
2153
|
+
* It resolves the given path relative to the `basePath` setting.
|
|
2139
2154
|
* @param relativePath - The relative path that should be resolved.
|
|
2140
2155
|
* @returns The resolved absolute URI.
|
|
2141
2156
|
*/
|
|
@@ -2143,7 +2158,7 @@ export declare class EditorAPI {
|
|
|
2143
2158
|
/**
|
|
2144
2159
|
* Resolves the given path.
|
|
2145
2160
|
* If a custom resolver has been set with `setURIResolver`, it invokes it with the given path.
|
|
2146
|
-
* Else, it resolves it as relative to the `
|
|
2161
|
+
* Else, it resolves it as relative to the `basePath` setting.
|
|
2147
2162
|
* This performs NO validation of whether a file exists at the specified location.
|
|
2148
2163
|
* @param relativePath - A relative path string
|
|
2149
2164
|
* @returns The resolved absolute uri or an error if an invalid path was given.
|
|
@@ -2592,6 +2607,13 @@ export declare class SceneAPI {
|
|
|
2592
2607
|
* @returns A promise that resolves once the zoom was set or rejects with an error otherwise.
|
|
2593
2608
|
*/
|
|
2594
2609
|
zoomToBlock(id: DesignBlockId, paddingLeft?: number, paddingTop?: number, paddingRight?: number, paddingBottom?: number): Promise<void>;
|
|
2610
|
+
/**
|
|
2611
|
+
* Subscribe to changes to the zoom level.
|
|
2612
|
+
* @param callback - This function is called at the end of the engine update, if the zoom level has changed.
|
|
2613
|
+
* @returns A method to unsubscribe.
|
|
2614
|
+
* @privateRemarks This will currently fire on _all_ changes to camera properties
|
|
2615
|
+
*/
|
|
2616
|
+
onZoomLevelChanged(callback: (zoomLevel: number) => void): () => void;
|
|
2595
2617
|
/**
|
|
2596
2618
|
* Converts all values of the current scene into the given design unit.
|
|
2597
2619
|
* @param designUnit - The new design unit of the scene
|