@html-css-to-image/client 0.3.0 → 0.4.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.
|
@@ -114,7 +114,7 @@ export class HtmlCssToImageClient {
|
|
|
114
114
|
.filter(([key, _]) => key !== 'url' && key != 'pdf_options' && key !== '__type')
|
|
115
115
|
.sort((a, b) => a[0].localeCompare(b[0]))
|
|
116
116
|
.forEach(([key, value]) => {
|
|
117
|
-
if (value !== undefined && value !== null && value !== false) {
|
|
117
|
+
if (value !== undefined && value !== null && (value !== false || key === 'transparent_background')) {
|
|
118
118
|
params.append(key, value.toString());
|
|
119
119
|
}
|
|
120
120
|
});
|
package/dist/types/request.d.ts
CHANGED
|
@@ -118,6 +118,10 @@ export declare abstract class BaseCreateImageRequest {
|
|
|
118
118
|
* Set the maximum height in jumbo mode. jumbo_max_width must also be defined.
|
|
119
119
|
*/
|
|
120
120
|
jumbo_max_height?: number;
|
|
121
|
+
/**
|
|
122
|
+
* Render the image with a transparent background.
|
|
123
|
+
*/
|
|
124
|
+
transparent_background?: boolean;
|
|
121
125
|
/**
|
|
122
126
|
* Options for generating a PDF from the HTML/CSS or Url.
|
|
123
127
|
*/
|
package/dist/types/request.js
CHANGED
|
@@ -99,6 +99,10 @@ export class BaseCreateImageRequest {
|
|
|
99
99
|
* Set the maximum height in jumbo mode. jumbo_max_width must also be defined.
|
|
100
100
|
*/
|
|
101
101
|
jumbo_max_height;
|
|
102
|
+
/**
|
|
103
|
+
* Render the image with a transparent background.
|
|
104
|
+
*/
|
|
105
|
+
transparent_background;
|
|
102
106
|
/**
|
|
103
107
|
* Options for generating a PDF from the HTML/CSS or Url.
|
|
104
108
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@html-css-to-image/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Lightweight TypeScript client for the HTML/CSS to Image API. Generate images from HTML/CSS, URLs, or templates in your TypeScript or JavaScript projects.",
|
|
6
6
|
"main": "dist/index.js",
|