@cesdk/node 1.8.0 → 1.9.0-preview.1

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,21 +1,18 @@
1
1
  ![Hero image showing the configuration abilities of CE.SDK](https://img.ly/static/cesdk_release_header.png)
2
2
 
3
- # Creative Engine
3
+ # IMG.LY Creative Engine
4
4
 
5
- The CreativeEditor SDK (**CE.SDK**) for Web is a fully customizable,
6
- simple-to-use design editor.
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.
7
8
 
8
- Seamlessly integrate it into any Web app with just a few lines of code. The
9
- editor combines the best of layout, typography and photo editing. **CE.SDK**
10
- also facilitates both template creation and adaption workflows, also featuring
11
- constraints and text placeholders for database automations.
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.
12
10
 
13
- This package contains the Node.JS version of the Creative Engine, the core of
14
- our SDK. This version is suitable for automating image processing in a server
15
- environment or for rendering scenes generated with our web SDK.
11
+ Visit our [documentation](https://img.ly/docs/cesdk) for more tutorials on how to integrate and
12
+ customize the engine for your specific use case.
16
13
 
17
- Visit our [website](https://img.ly) for more tutorials on how to integrate and
18
- customize the engine for your specific use-case.
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.
19
16
 
20
17
  ## Usage
21
18
 
@@ -1419,19 +1419,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1419
1419
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1420
1420
  THE SOFTWARE.
1421
1421
 
1422
- -------------------------------------------------------------------------------
1423
- ## popmotion (https://popmotion.io)
1424
-
1425
- The MIT License (MIT)
1426
-
1427
- Copyright © 2019 Framer BV
1428
-
1429
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1430
-
1431
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
1432
-
1433
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1434
-
1435
1422
  -------------------------------------------------------------------------------
1436
1423
  ## react (https://reactjs.org/)
1437
1424
 
package/index.d.ts CHANGED
@@ -1792,9 +1792,17 @@ export declare class BlockAPI {
1792
1792
  /**
1793
1793
  * Generate a thumbnail for the given video fill.
1794
1794
  * @param id - The video fill.
1795
- * @returns A thumbnail encoded as PNG with a height of 128px.
1795
+ * @returns A thumbnail encoded as JPEG with a height of 128px.
1796
1796
  */
1797
1797
  getVideoFillThumbnail(id: DesignBlockId): Promise<Blob>;
1798
+ /**
1799
+ * Generate a thumbnail atlas for the given video fill.
1800
+ * @param id - The video fill.
1801
+ * @param numberOfColumns - The number of columns to generate.
1802
+ * @param numberOfRows - The number of rows to generate.
1803
+ * @returns A thumbnail atlas of the video as JPEG.
1804
+ */
1805
+ getVideoFillThumbnailAtlas(id: DesignBlockId, numberOfColumns: number, numberOfRows: number): Promise<Blob>;
1798
1806
  }
1799
1807
 
1800
1808
  /** @public */
@@ -1951,6 +1959,7 @@ export declare enum DesignBlockType {
1951
1959
  Page = "//ly.img.ubq/page",
1952
1960
  Image = "//ly.img.ubq/image",
1953
1961
  Video = "//ly.img.ubq/video",
1962
+ Audio = "//ly.img.ubq/audio",
1954
1963
  Text = "//ly.img.ubq/text",
1955
1964
  Sticker = "//ly.img.ubq/sticker",
1956
1965
  VectorPath = "//ly.img.ubq/vector_path",
@@ -2042,14 +2051,14 @@ export declare class EditorAPI {
2042
2051
  onSettingsChanged(callback: () => void): () => void;
2043
2052
  /**
2044
2053
  * Set a boolean setting.
2045
- * @param keypath - The settings keypath, e.g. `ubq://doubleClickToCropEnabled`
2054
+ * @param keypath - The settings keypath, e.g. `doubleClickToCropEnabled`
2046
2055
  * @param value - The value to set.
2047
2056
  * @throws An error, if the keypath is invalid.
2048
2057
  */
2049
2058
  setSettingBool(keypath: string, value: boolean): void;
2050
2059
  /**
2051
2060
  * Get a boolean setting.
2052
- * @param keypath - The settings keypath, e.g. `ubq://doubleClickToCropEnabled`
2061
+ * @param keypath - The settings keypath, e.g. `doubleClickToCropEnabled`
2053
2062
  * @throws An error, if the keypath is invalid.
2054
2063
  */
2055
2064
  getSettingBool(keypath: string): boolean;
@@ -2068,33 +2077,33 @@ export declare class EditorAPI {
2068
2077
  getSettingInt(keypath: string): number;
2069
2078
  /**
2070
2079
  * Set a float setting.
2071
- * @param keypath - The settings keypath, e.g. `ubq://positionSnappingThreshold`
2080
+ * @param keypath - The settings keypath, e.g. `positionSnappingThreshold`
2072
2081
  * @param value - The value to set.
2073
2082
  * @throws An error, if the keypath is invalid.
2074
2083
  */
2075
2084
  setSettingFloat(keypath: string, value: number): void;
2076
2085
  /**
2077
2086
  * Get a float setting.
2078
- * @param keypath - The settings keypath, e.g. `ubq://positionSnappingThreshold`
2087
+ * @param keypath - The settings keypath, e.g. `positionSnappingThreshold`
2079
2088
  * @throws An error, if the keypath is invalid.
2080
2089
  */
2081
2090
  getSettingFloat(keypath: string): number;
2082
2091
  /**
2083
2092
  * Set a string setting.
2084
- * @param keypath - The settings keypath, e.g. `ubq://license`
2093
+ * @param keypath - The settings keypath, e.g. `license`
2085
2094
  * @param value - The value to set.
2086
2095
  * @throws An error, if the keypath is invalid.
2087
2096
  */
2088
2097
  setSettingString(keypath: string, value: string): void;
2089
2098
  /**
2090
2099
  * Get a string setting.
2091
- * @param keypath - The settings keypath, e.g. `ubq://license`
2100
+ * @param keypath - The settings keypath, e.g. `license`
2092
2101
  * @throws An error, if the keypath is invalid.
2093
2102
  */
2094
2103
  getSettingString(keypath: string): string;
2095
2104
  /**
2096
2105
  * Set a color setting.
2097
- * @param keypath - The settings keypath, e.g. `ubq://highlightColor`.
2106
+ * @param keypath - The settings keypath, e.g. `highlightColor`.
2098
2107
  * @param r - The red color component in the range of 0 to 1.
2099
2108
  * @param g - The green color component in the range of 0 to 1.
2100
2109
  * @param b - The blue color component in the range of 0 to 1.
@@ -2103,19 +2112,19 @@ export declare class EditorAPI {
2103
2112
  setSettingColorRGBA(keypath: string, r: number, g: number, b: number, a?: number): void;
2104
2113
  /**
2105
2114
  * Get a color setting.
2106
- * @param keypath - The settings keypath, e.g. `ubq://highlightColor`.
2115
+ * @param keypath - The settings keypath, e.g. `highlightColor`.
2107
2116
  * @returns A tuple of channels red, green, blue and alpha in the range of 0 to 1.
2108
2117
  */
2109
2118
  getSettingColorRGBA(keypath: string): RGBA;
2110
2119
  /**
2111
2120
  * Set an enum setting.
2112
- * @param keypath - The settings keypath, e.g. `ubq://role`.
2121
+ * @param keypath - The settings keypath, e.g. `role`.
2113
2122
  * @param value - The enum value as string.
2114
2123
  */
2115
2124
  setSettingEnum(keypath: string, value: string): void;
2116
2125
  /**
2117
2126
  * Get an enum setting.
2118
- * @param keypath - The settings keypath, e.g. `ubq://role`.
2127
+ * @param keypath - The settings keypath, e.g. `role`.
2119
2128
  * @returns The value as string.
2120
2129
  */
2121
2130
  getSettingEnum(keypath: string): string;
@@ -2129,7 +2138,7 @@ export declare class EditorAPI {
2129
2138
  setURIResolver(resolver: (URI: string) => string): void;
2130
2139
  /**
2131
2140
  * This is the default implementation for the URI resolver.
2132
- * It resolves the given path relative to the `ubq://basePath` setting.
2141
+ * It resolves the given path relative to the `basePath` setting.
2133
2142
  * @param relativePath - The relative path that should be resolved.
2134
2143
  * @returns The resolved absolute URI.
2135
2144
  */
@@ -2137,7 +2146,7 @@ export declare class EditorAPI {
2137
2146
  /**
2138
2147
  * Resolves the given path.
2139
2148
  * If a custom resolver has been set with `setURIResolver`, it invokes it with the given path.
2140
- * Else, it resolves it as relative to the `ubq://basePath` setting.
2149
+ * Else, it resolves it as relative to the `basePath` setting.
2141
2150
  * This performs NO validation of whether a file exists at the specified location.
2142
2151
  * @param relativePath - A relative path string
2143
2152
  * @returns The resolved absolute uri or an error if an invalid path was given.
@@ -2519,10 +2528,15 @@ export declare class SceneAPI {
2519
2528
  */
2520
2529
  saveToArchive(): Promise<Blob>;
2521
2530
  /**
2522
- * Create a new scene, along with its own camera.
2523
- * @returns The scenes handle.
2531
+ * Create a new design scene, along with its own camera.
2532
+ * @returns The scene's handle.
2524
2533
  */
2525
2534
  create(): DesignBlockId;
2535
+ /**
2536
+ * Create a new scene in video mode, along with its own camera and page stack.
2537
+ * @returns The scene's handle.
2538
+ */
2539
+ createVideo(): DesignBlockId;
2526
2540
  /**
2527
2541
  * Loads the given image and creates a scene with a single page showing the image.
2528
2542
  * Fetching the image may take an arbitrary amount of time, so the scene isn't immediately