@cesdk/cesdk-js 1.71.0-rc.0 → 1.71.0-rc.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 +43 -5
- package/assets/core/{cesdk-v1.71.0-rc.0-UZEEXBQ6.wasm → cesdk-v1.71.0-rc.2-DZIMCDML.wasm} +0 -0
- package/assets/core/worker-host-v1.71.0-rc.2.js +1 -0
- package/cesdk.umd.js +1 -1
- package/index.d.ts +1 -1
- package/index.html +35 -5
- package/index.js +1 -1
- package/package.json +2 -2
- package/react/index.d.ts +40 -4
- package/vue/index.d.ts +40 -4
- package/assets/core/worker-host-v1.71.0-rc.0.js +0 -1
- /package/assets/core/{cesdk-v1.71.0-rc.0-MLEZSZ4D.data → cesdk-v1.71.0-rc.2-MLEZSZ4D.data} +0 -0
package/README.md
CHANGED
|
@@ -34,14 +34,52 @@ In this example, we set the inline style to create a `<div>` element that fills
|
|
|
34
34
|
The last step involves the configuration and instantiation of the SDK.
|
|
35
35
|
|
|
36
36
|
```JS
|
|
37
|
-
import CreativeEditorSDK from '@cesdk/cesdk-js'
|
|
37
|
+
import CreativeEditorSDK from '@cesdk/cesdk-js';
|
|
38
|
+
import {
|
|
39
|
+
BlurAssetSource,
|
|
40
|
+
ColorPaletteAssetSource,
|
|
41
|
+
CropPresetsAssetSource,
|
|
42
|
+
DemoAssetSources,
|
|
43
|
+
EffectsAssetSource,
|
|
44
|
+
FiltersAssetSource,
|
|
45
|
+
PagePresetsAssetSource,
|
|
46
|
+
StickerAssetSource,
|
|
47
|
+
TextAssetSource,
|
|
48
|
+
TextComponentAssetSource,
|
|
49
|
+
TypefaceAssetSource,
|
|
50
|
+
UploadAssetSources,
|
|
51
|
+
VectorShapeAssetSource
|
|
52
|
+
} from '@cesdk/cesdk-js/plugins';
|
|
38
53
|
|
|
39
54
|
CreativeEditorSDK
|
|
40
|
-
.create('#cesdk_container', {license: '<your-api-key>'})
|
|
55
|
+
.create('#cesdk_container', { license: '<your-api-key>' })
|
|
41
56
|
.then(async (cesdk) => {
|
|
42
|
-
|
|
43
|
-
await cesdk.
|
|
44
|
-
await cesdk.
|
|
57
|
+
// Add asset source plugins
|
|
58
|
+
await cesdk.addPlugin(new BlurAssetSource());
|
|
59
|
+
await cesdk.addPlugin(new ColorPaletteAssetSource());
|
|
60
|
+
await cesdk.addPlugin(new CropPresetsAssetSource());
|
|
61
|
+
await cesdk.addPlugin(new EffectsAssetSource());
|
|
62
|
+
await cesdk.addPlugin(new FiltersAssetSource());
|
|
63
|
+
await cesdk.addPlugin(new PagePresetsAssetSource());
|
|
64
|
+
await cesdk.addPlugin(new StickerAssetSource());
|
|
65
|
+
await cesdk.addPlugin(new TextAssetSource());
|
|
66
|
+
await cesdk.addPlugin(new TextComponentAssetSource());
|
|
67
|
+
await cesdk.addPlugin(new TypefaceAssetSource());
|
|
68
|
+
await cesdk.addPlugin(new VectorShapeAssetSource());
|
|
69
|
+
await cesdk.addPlugin(
|
|
70
|
+
new UploadAssetSources({ include: ['ly.img.image.upload'] })
|
|
71
|
+
);
|
|
72
|
+
await cesdk.addPlugin(
|
|
73
|
+
new DemoAssetSources({ include: ['ly.img.image.*'] })
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
// Create a design scene
|
|
77
|
+
await cesdk.actions.run('scene.create', {
|
|
78
|
+
page: {
|
|
79
|
+
sourceId: 'ly.img.page.presets',
|
|
80
|
+
assetId: 'ly.img.page.presets.print.iso.a6.landscape'
|
|
81
|
+
}
|
|
82
|
+
});
|
|
45
83
|
|
|
46
84
|
/** do something with the instance of CreativeEditor SDK **/
|
|
47
85
|
});
|