@bluepic/embed 0.4.0-next.150 → 0.4.0-next.153
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/dist/bluepic-embed.iife.js +106 -106
- package/dist/bluepic-embed.umd.js +106 -106
- package/dist/main.cjs +63 -63
- package/dist/main.mjs +6291 -6267
- package/dist/style.css +1 -1
- package/dist/util/backgroundRemoval.d.ts +18 -0
- package/package.json +2 -2
|
@@ -17,11 +17,29 @@ export declare const BACKGROUND_REMOVAL_TRANSFORM: {
|
|
|
17
17
|
* demonstrably has no forwarding, so assuming "yes" would produce broken URLs.
|
|
18
18
|
*/
|
|
19
19
|
export declare function hostSupportsImageAi(bridge: Pick<FieldsBridge, 'capabilities'> | null | undefined): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the host forces background removal through Bluepic's own rembg
|
|
22
|
+
* service instead of the Cloudflare transform.
|
|
23
|
+
*
|
|
24
|
+
* For a field this means one thing: DON'T touch the src. The host has already
|
|
25
|
+
* had the cutout baked into the stored image at upload time, so appending
|
|
26
|
+
* `segment=foreground` would be a second removal layered on an image that is
|
|
27
|
+
* already cut out.
|
|
28
|
+
*
|
|
29
|
+
* Absent reads as `false` — the Cloudflare path is the default, and a bridge
|
|
30
|
+
* that predates this switch is not running an experiment.
|
|
31
|
+
*/
|
|
32
|
+
export declare function hostEnforcesBxRembg(bridge: Pick<FieldsBridge, 'capabilities'> | null | undefined): boolean;
|
|
20
33
|
export type ResolveBackgroundRemovalOptions = {
|
|
21
34
|
/** The field's `removeBackground` prop. */
|
|
22
35
|
enabled: boolean;
|
|
23
36
|
/** Host capability — see `hostSupportsImageAi`. */
|
|
24
37
|
capable: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Host bakes the cutout at upload instead — see `hostEnforcesBxRembg`. When
|
|
40
|
+
* true the transform is never applied, only stripped.
|
|
41
|
+
*/
|
|
42
|
+
enforced?: boolean;
|
|
25
43
|
};
|
|
26
44
|
/**
|
|
27
45
|
* Decide the `src` an image field should store.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bluepic/embed",
|
|
3
|
-
"version": "0.4.0-next.
|
|
3
|
+
"version": "0.4.0-next.153",
|
|
4
4
|
"description": "Bluepic embed sdk",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@auth0/auth0-vue": "^2.4.0",
|
|
48
|
-
"@bluepic/types": "^0.6.
|
|
48
|
+
"@bluepic/types": "^0.6.501",
|
|
49
49
|
"@hono/zod-openapi": "^1.1.4",
|
|
50
50
|
"@types/css": "^0.0.38",
|
|
51
51
|
"@types/downloadjs": "^1.4.6",
|