diff --git a/package.json b/package.json index 0f0161f..13dcd99 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@html-css-to-image/client", - "version": "0.0.3", + "version": "0.0.4", "type": "module", "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.", "main": "dist/index.js", diff --git a/src/types/internals.ts b/src/types/internals.ts index bfaab96..716cf19 100644 --- a/src/types/internals.ts +++ b/src/types/internals.ts @@ -1,4 +1,4 @@ -import {ColorSchemeType} from "./request.js"; +import {ColorSchemeType, MediaType} from "./request.js"; export abstract class BaseCreateRequestWithoutVariableOptions { /** @@ -61,6 +61,26 @@ export abstract class BaseCreateRequestWithoutVariableOptions { */ timezone?: string; + /** + Sets a value indicating whether the viewport should be rendered as if it's being viewed from a mobile device. + */ + viewport_mobile?: boolean; + + /** + Sets a value indicating whether touch interactions are enabled within the viewport. + */ + viewport_touch?: boolean; + + /** + * sets a value indicating whether the viewport should be in landscape orientation. + */ + viewport_landscape?: boolean; + + /** + * Sets the media type to use for rendering, 'print' or 'screen'. + */ + media_type?: MediaType; + constructor(init?: Partial) { Object.assign(this, init); } diff --git a/src/types/request.ts b/src/types/request.ts index 1712a36..0843573 100644 --- a/src/types/request.ts +++ b/src/types/request.ts @@ -2,6 +2,7 @@ import {BaseCreateRequestWithoutVariableOptions, BasePDFOptions} from "./interna export type ColorSchemeType = 'light' | 'dark'; export type PdfUnit = 'px' | 'in' | 'cm' | 'mm'; +export type MediaType = 'print' | 'screen'; export interface PdfValueWithUnits { value: number;