@imgly/plugin-background-removal-web 0.1.1 → 0.2.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/LICENSE.md +652 -1
- package/README.md +103 -18
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +4 -4
- package/dist/plugin.d.ts +5 -2
- package/dist/processBackgroundRemoval.d.ts +27 -1
- package/dist/types.d.ts +4 -38
- package/package.json +8 -6
- package/dist/constants.d.ts +0 -4
- package/dist/enableFeatures.d.ts +0 -6
- package/dist/registerComponents.d.ts +0 -6
- package/dist/utils.d.ts +0 -46
package/dist/enableFeatures.d.ts
DELETED
package/dist/utils.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type CreativeEditorSDK from '@cesdk/cesdk-js';
|
|
2
|
-
import { BGRemovalMetadata } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Sets the metadata for the background removal state.
|
|
5
|
-
*/
|
|
6
|
-
export declare function setBGRemovalMetadata(cesdk: CreativeEditorSDK, id: number, metadata: BGRemovalMetadata): void;
|
|
7
|
-
/**
|
|
8
|
-
* Returns the current metadata for the background removal state. If no metadata
|
|
9
|
-
* is set on the given block, it will return an IDLE state.
|
|
10
|
-
*/
|
|
11
|
-
export declare function getBGRemovalMetadata(cesdk: CreativeEditorSDK, id: number): BGRemovalMetadata;
|
|
12
|
-
/**
|
|
13
|
-
* If BG Removal metadata is set, it will be cleared.
|
|
14
|
-
*/
|
|
15
|
-
export declare function clearBGRemovalMetadata(cesdk: CreativeEditorSDK, id: number): void;
|
|
16
|
-
/**
|
|
17
|
-
* Detect if the block has been duplicated with processed or processing
|
|
18
|
-
* background removal. In that case the background removal state is still
|
|
19
|
-
* valid, but blockId and fillId have changed.
|
|
20
|
-
*/
|
|
21
|
-
export declare function isDuplicate(cesdk: CreativeEditorSDK, blockId: number, metadata: BGRemovalMetadata): boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Fixes the metadata if the block has been duplicated, i.e. the blockId and
|
|
24
|
-
* fillId will be updated to the current block/fill.
|
|
25
|
-
*
|
|
26
|
-
* Please note: Call this method only on duplicates (see isDuplicate).
|
|
27
|
-
*/
|
|
28
|
-
export declare function fixDuplicateMetadata(cesdk: CreativeEditorSDK, blockId: number): void;
|
|
29
|
-
/**
|
|
30
|
-
* Check if the image has a consisten metadata state. A inconsistent state is
|
|
31
|
-
* caused by outside changes of the fill data.
|
|
32
|
-
*
|
|
33
|
-
* @returns true if the metadata is consistent, false otherwise
|
|
34
|
-
*/
|
|
35
|
-
export declare function isMetadataConsistent(cesdk: CreativeEditorSDK, blockId: number): boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Toggle between the background removed image and the original image if either
|
|
38
|
-
* in the state "PROCESSED_WITH_BG" or "PROCESSED_WITHOUT_BG". Otherwise do
|
|
39
|
-
* nothing.
|
|
40
|
-
*/
|
|
41
|
-
export declare function toggleBackgroundRemovalData(cesdk: CreativeEditorSDK, blockId: number): void;
|
|
42
|
-
/**
|
|
43
|
-
* Recover the initial values to avoid the loading spinner and have the same
|
|
44
|
-
* state as before the background removal was started.
|
|
45
|
-
*/
|
|
46
|
-
export declare function recoverInitialImageData(cesdk: CreativeEditorSDK, blockId: number): void;
|