@sudobility/svgr_client 1.0.27 → 1.0.29
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/hooks/useConvert.d.ts +2 -0
- package/dist/hooks/useConvert.d.ts.map +1 -1
- package/dist/hooks/useConvert.js +1 -1
- package/dist/hooks/useConvert.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/network/SvgrClient.d.ts +2 -2
- package/dist/network/SvgrClient.d.ts.map +1 -1
- package/dist/network/SvgrClient.js +3 -2
- package/dist/network/SvgrClient.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ImageType } from "@sudobility/svgr_types";
|
|
1
2
|
import type { SvgrClient } from "../network/SvgrClient";
|
|
2
3
|
export interface ConvertMutationParams {
|
|
3
4
|
original: string;
|
|
@@ -7,6 +8,7 @@ export interface ConvertMutationParams {
|
|
|
7
8
|
ocr?: boolean;
|
|
8
9
|
mergePaths?: boolean;
|
|
9
10
|
smooth?: number;
|
|
11
|
+
imageType?: ImageType;
|
|
10
12
|
}
|
|
11
13
|
export declare function useConvert(client: SvgrClient): import("@tanstack/react-query").UseMutationResult<import("@sudobility/types").BaseResponse<import("@sudobility/svgr_types").ConvertResult>, Error, ConvertMutationParams, unknown>;
|
|
12
14
|
//# sourceMappingURL=useConvert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConvert.d.ts","sourceRoot":"","sources":["../../src/hooks/useConvert.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAWxD,MAAM,WAAW,qBAAqB;IAEpC,QAAQ,EAAE,MAAM,CAAC;IAEjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,GAAG,CAAC,EAAE,OAAO,CAAC;IAEd,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,MAAM,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"useConvert.d.ts","sourceRoot":"","sources":["../../src/hooks/useConvert.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAWxD,MAAM,WAAW,qBAAqB;IAEpC,QAAQ,EAAE,MAAM,CAAC;IAEjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,GAAG,CAAC,EAAE,OAAO,CAAC;IAEd,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAkDD,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU,sLAuB5C"}
|
package/dist/hooks/useConvert.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useMutation } from "@tanstack/react-query";
|
|
2
2
|
export function useConvert(client) {
|
|
3
3
|
return useMutation({
|
|
4
|
-
mutationFn: ({ original, filename, quality, transparentBg, ocr, mergePaths, smooth, }) => client.convert(original, filename, quality, transparentBg, ocr, mergePaths, smooth),
|
|
4
|
+
mutationFn: ({ original, filename, quality, transparentBg, ocr, mergePaths, smooth, imageType, }) => client.convert(original, filename, quality, transparentBg, ocr, mergePaths, smooth, imageType),
|
|
5
5
|
});
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=useConvert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConvert.js","sourceRoot":"","sources":["../../src/hooks/useConvert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"useConvert.js","sourceRoot":"","sources":["../../src/hooks/useConvert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAgFpD,MAAM,UAAU,UAAU,CAAC,MAAkB;IAC3C,OAAO,WAAW,CAAC;QACjB,UAAU,EAAE,CAAC,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,aAAa,EACb,GAAG,EACH,UAAU,EACV,MAAM,EACN,SAAS,GACa,EAAE,EAAE,CAC1B,MAAM,CAAC,OAAO,CACZ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,aAAa,EACb,GAAG,EACH,UAAU,EACV,MAAM,EACN,SAAS,CACV;KACJ,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { useMutation } from \"@tanstack/react-query\";\nimport type { ImageType } from \"@sudobility/svgr_types\";\nimport type { SvgrClient } from \"../network/SvgrClient\";\n\n/**\n * Parameters for the {@link useConvert} mutation hook.\n *\n * @interface ConvertMutationParams\n * @property {string} original - Base64-encoded raster image data (PNG, JPG, WEBP, BMP, or GIF)\n * @property {string} [filename] - Optional filename for metadata or audit purposes\n * @property {number} [quality] - Conversion quality level from 1 to 10. Default: 5\n * @property {boolean} [transparentBg] - If true, removes the background from the SVG. Default: false\n */\nexport interface ConvertMutationParams {\n /** Base64-encoded raster image data (PNG, JPG, WEBP, BMP, or GIF) */\n original: string;\n /** Optional filename for metadata or audit purposes */\n filename?: string;\n /** Conversion quality level from 1 to 10 (1 = smallest, 10 = highest fidelity). Default: 5 */\n quality?: number;\n /** If true, removes the background from the SVG. Default: false */\n transparentBg?: boolean;\n /** If true, runs OCR to detect text and emit editable SVG text elements. Default: true */\n ocr?: boolean;\n /** If true, aggressively merges small and thin vector paths into neighbors. Default: true */\n mergePaths?: boolean;\n /** Smoothing level 0-3 for the output SVG paths. Default: 0 (no smoothing) */\n smooth?: number;\n /** Image type for preprocessing: 'auto', 'photo', or 'design'. Default: 'auto' */\n imageType?: ImageType;\n}\n\n/**\n * TanStack Query mutation hook for converting raster images to SVG.\n *\n * Wraps {@link SvgrClient.convert} in a `useMutation` hook, providing\n * loading state, error handling, and cache integration via TanStack Query.\n *\n * @param client - An initialized {@link SvgrClient} instance\n * @returns A TanStack Query mutation result object with `mutate`, `mutateAsync`,\n * `isPending`, `isError`, `data`, `error`, and other standard mutation properties\n *\n * @example\n * ```tsx\n * import { useConvert } from '@sudobility/svgr_client';\n *\n * function ConvertButton({ client }: { client: SvgrClient }) {\n * const convert = useConvert(client);\n *\n * const handleConvert = () => {\n * convert.mutate({\n * original: base64ImageData,\n * filename: 'logo.png',\n * quality: 7,\n * transparentBg: true,\n * });\n * };\n *\n * if (convert.isPending) return <p>Converting...</p>;\n * if (convert.isError) return <p>Error: {convert.error.message}</p>;\n * if (convert.data?.data) return <div>{convert.data.data.svg}</div>;\n *\n * return <button onClick={handleConvert}>Convert</button>;\n * }\n * ```\n *\n * @example\n * ```typescript\n * // Using mutateAsync for async/await flow\n * const convert = useConvert(client);\n * try {\n * const result = await convert.mutateAsync({ original: imageData });\n * console.log(result.data?.svg);\n * } catch (error) {\n * if (error instanceof SvgrApiError) {\n * console.error(`HTTP ${error.status}: ${error.message}`);\n * }\n * }\n * ```\n */\nexport function useConvert(client: SvgrClient) {\n return useMutation({\n mutationFn: ({\n original,\n filename,\n quality,\n transparentBg,\n ocr,\n mergePaths,\n smooth,\n imageType,\n }: ConvertMutationParams) =>\n client.convert(\n original,\n filename,\n quality,\n transparentBg,\n ocr,\n mergePaths,\n smooth,\n imageType,\n ),\n });\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { SvgrClient, SvgrApiError, type SvgrClientConfig, type RetryConfig, } from "./network/SvgrClient";
|
|
2
2
|
export { useConvert, svgrKeys } from "./hooks";
|
|
3
3
|
export type { ConvertMutationParams } from "./hooks/useConvert";
|
|
4
|
-
export type { ConvertRequest, ConvertResult, ConvertResponse, BaseResponse, } from "@sudobility/svgr_types";
|
|
4
|
+
export type { ConvertRequest, ConvertResult, ConvertResponse, BaseResponse, ImageType, } from "@sudobility/svgr_types";
|
|
5
|
+
export { IMAGE_TYPES } from "@sudobility/svgr_types";
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EACL,UAAU,EACV,YAAY,EACZ,KAAK,gBAAgB,EACrB,KAAK,WAAW,GACjB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/C,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAGhE,YAAY,EACV,cAAc,EACd,aAAa,EACb,eAAe,EACf,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EACL,UAAU,EACV,YAAY,EACZ,KAAK,gBAAgB,EACrB,KAAK,WAAW,GACjB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/C,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAGhE,YAAY,EACV,cAAc,EACd,aAAa,EACb,eAAe,EACf,YAAY,EACZ,SAAS,GACV,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EACL,UAAU,EACV,YAAY,GAGb,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC","sourcesContent":["/**\n * @module @sudobility/svgr_client\n *\n * API client SDK for SVGR with React Query hooks.\n *\n * Provides a typed HTTP client ({@link SvgrClient}) for calling the SVGR\n * image-to-SVG conversion API, along with TanStack Query hooks ({@link useConvert})\n * for seamless React integration.\n *\n * @example\n * ```typescript\n * import { SvgrClient, useConvert, svgrKeys } from '@sudobility/svgr_client';\n * ```\n */\n\n// Network\nexport {\n SvgrClient,\n SvgrApiError,\n type SvgrClientConfig,\n type RetryConfig,\n} from \"./network/SvgrClient\";\n\n// Hooks\nexport { useConvert, svgrKeys } from \"./hooks\";\nexport type { ConvertMutationParams } from \"./hooks/useConvert\";\n\n// Re-export types for convenience\nexport type {\n ConvertRequest,\n ConvertResult,\n ConvertResponse,\n BaseResponse,\n} from \"@sudobility/svgr_types\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EACL,UAAU,EACV,YAAY,GAGb,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAW/C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC","sourcesContent":["/**\n * @module @sudobility/svgr_client\n *\n * API client SDK for SVGR with React Query hooks.\n *\n * Provides a typed HTTP client ({@link SvgrClient}) for calling the SVGR\n * image-to-SVG conversion API, along with TanStack Query hooks ({@link useConvert})\n * for seamless React integration.\n *\n * @example\n * ```typescript\n * import { SvgrClient, useConvert, svgrKeys } from '@sudobility/svgr_client';\n * ```\n */\n\n// Network\nexport {\n SvgrClient,\n SvgrApiError,\n type SvgrClientConfig,\n type RetryConfig,\n} from \"./network/SvgrClient\";\n\n// Hooks\nexport { useConvert, svgrKeys } from \"./hooks\";\nexport type { ConvertMutationParams } from \"./hooks/useConvert\";\n\n// Re-export types for convenience\nexport type {\n ConvertRequest,\n ConvertResult,\n ConvertResponse,\n BaseResponse,\n ImageType,\n} from \"@sudobility/svgr_types\";\nexport { IMAGE_TYPES } from \"@sudobility/svgr_types\";\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NetworkClient } from "@sudobility/types";
|
|
2
|
-
import type { BaseResponse, ConvertResult } from "@sudobility/svgr_types";
|
|
2
|
+
import type { BaseResponse, ConvertResult, ImageType } from "@sudobility/svgr_types";
|
|
3
3
|
export interface SvgrClientConfig {
|
|
4
4
|
baseUrl: string;
|
|
5
5
|
networkClient: NetworkClient;
|
|
@@ -19,7 +19,7 @@ export declare class SvgrClient {
|
|
|
19
19
|
private readonly networkClient;
|
|
20
20
|
private readonly retryConfig;
|
|
21
21
|
constructor(config: SvgrClientConfig);
|
|
22
|
-
convert(original: string, filename?: string, quality?: number, transparentBg?: boolean, ocr?: boolean, mergePaths?: boolean, smooth?: number): Promise<BaseResponse<ConvertResult>>;
|
|
22
|
+
convert(original: string, filename?: string, quality?: number, transparentBg?: boolean, ocr?: boolean, mergePaths?: boolean, smooth?: number, imageType?: ImageType): Promise<BaseResponse<ConvertResult>>;
|
|
23
23
|
fetchSvg(cacheId: string): Promise<string>;
|
|
24
24
|
private withRetry;
|
|
25
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SvgrClient.d.ts","sourceRoot":"","sources":["../../src/network/SvgrClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"SvgrClient.d.ts","sourceRoot":"","sources":["../../src/network/SvgrClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,SAAS,EACV,MAAM,wBAAwB,CAAC;AAmBhC,MAAM,WAAW,gBAAgB;IAE/B,OAAO,EAAE,MAAM,CAAC;IAEhB,aAAa,EAAE,aAAa,CAAC;IAM7B,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB;AAqBD,MAAM,WAAW,WAAW;IAE1B,UAAU,EAAE,MAAM,CAAC;IAEnB,WAAW,EAAE,MAAM,CAAC;IAEpB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B;AA8BD,qBAAa,YAAa,SAAQ,KAAK;IAG5B,MAAM,EAAE,MAAM;gBAAd,MAAM,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM;CAKlB;AAgCD,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgB;IAC9C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA0B;gBAE1C,MAAM,EAAE,gBAAgB;IAqC9B,OAAO,CACX,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,MAAM,EAChB,aAAa,CAAC,EAAE,OAAO,EACvB,GAAG,CAAC,EAAE,OAAO,EACb,UAAU,CAAC,EAAE,OAAO,EACpB,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,SAAS,GACpB,OAAO,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;IAoDjC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;YAiBlC,SAAS;CAsBxB"}
|
|
@@ -12,7 +12,7 @@ export class SvgrClient {
|
|
|
12
12
|
this.networkClient = config.networkClient;
|
|
13
13
|
this.retryConfig = config.retry;
|
|
14
14
|
}
|
|
15
|
-
async convert(original, filename, quality, transparentBg, ocr, mergePaths, smooth) {
|
|
15
|
+
async convert(original, filename, quality, transparentBg, ocr, mergePaths, smooth, imageType) {
|
|
16
16
|
const makeRequest = () => this.networkClient.post(`${this.baseUrl}/api/v1/convert`, {
|
|
17
17
|
original,
|
|
18
18
|
filename,
|
|
@@ -21,7 +21,8 @@ export class SvgrClient {
|
|
|
21
21
|
ocr,
|
|
22
22
|
mergePaths,
|
|
23
23
|
smooth,
|
|
24
|
-
|
|
24
|
+
imageType,
|
|
25
|
+
}, { timeout: 120000 });
|
|
25
26
|
const response = this.retryConfig
|
|
26
27
|
? await this.withRetry(makeRequest, this.retryConfig)
|
|
27
28
|
: await makeRequest();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SvgrClient.js","sourceRoot":"","sources":["../../src/network/SvgrClient.ts"],"names":[],"mappings":"AA8DA,MAAM,0BAA0B,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AA2BlE,MAAM,OAAO,YAAa,SAAQ,KAAK;IACrC,YAES,MAAc,EACrB,OAAe;QAEf,KAAK,CAAC,OAAO,CAAC,CAAC;QAHR,WAAM,GAAN,MAAM,CAAQ;QAIrB,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC7B,CAAC;CACF;AAgCD,MAAM,OAAO,UAAU;IAKrB,YAAY,MAAwB;QAClC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;QAC1C,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC;IAClC,CAAC;IAiCD,KAAK,CAAC,OAAO,CACX,QAAgB,EAChB,QAAiB,EACjB,OAAgB,EAChB,aAAuB,EACvB,GAAa,EACb,UAAoB,EACpB,MAAe;QAEf,MAAM,WAAW,GAAG,GAAG,EAAE,CACvB,IAAI,CAAC,aAAa,CAAC,IAAI,CACrB,GAAG,IAAI,CAAC,OAAO,iBAAiB,EAChC;YACE,QAAQ;YACR,QAAQ;YACR,OAAO;YACP,aAAa;YACb,GAAG;YACH,UAAU;YACV,MAAM;SACP,EACD,EAAE,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,EAAE,CAAC;gBAChE,OAAO,QAAQ,CAAC;YAClB,CAAC;YAED,MAAM,KAAK,GAAG,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;YACxD,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;YAE3D,QAAQ,GAAG,MAAM,EAAE,EAAE,CAAC;QACxB,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF","sourcesContent":["import type { NetworkClient } from \"@sudobility/types\";\nimport type { BaseResponse, ConvertResult } from \"@sudobility/svgr_types\";\n\n/**\n * Configuration for creating an {@link SvgrClient} instance.\n *\n * @interface SvgrClientConfig\n * @property {string} baseUrl - The base URL of the SVGR API server (e.g., `https://api.svgr.app`)\n * @property {NetworkClient} networkClient - A platform-agnostic HTTP client from `@sudobility/types`\n * that handles authentication headers and request serialization\n *\n * @example\n * ```typescript\n * const config: SvgrClientConfig = {\n * baseUrl: 'https://api.svgr.app',\n * networkClient: myNetworkClient,\n * };\n * const client = new SvgrClient(config);\n * ```\n */\nexport interface SvgrClientConfig {\n /** The base URL of the SVGR API server (e.g., `https://api.svgr.app`) */\n baseUrl: string;\n /** Platform-agnostic HTTP client that handles auth and serialization */\n networkClient: NetworkClient;\n /**\n * Optional retry configuration for failed requests.\n * When provided, the client will retry failed network requests\n * using exponential backoff.\n */\n retry?: RetryConfig;\n}\n\n/**\n * Configuration for automatic retry of failed network requests.\n *\n * @interface RetryConfig\n * @property {number} maxRetries - Maximum number of retry attempts (default: 3)\n * @property {number} baseDelayMs - Base delay in milliseconds before first retry (default: 1000).\n * Subsequent retries use exponential backoff: `baseDelayMs * 2^attempt`.\n * @property {number[]} [retryableStatuses] - HTTP status codes that should trigger a retry.\n * Defaults to [408, 429, 500, 502, 503, 504].\n *\n * @example\n * ```typescript\n * const retryConfig: RetryConfig = {\n * maxRetries: 3,\n * baseDelayMs: 1000,\n * retryableStatuses: [429, 500, 502, 503, 504],\n * };\n * ```\n */\nexport interface RetryConfig {\n /** Maximum number of retry attempts (default: 3) */\n maxRetries: number;\n /** Base delay in milliseconds before first retry (default: 1000) */\n baseDelayMs: number;\n /** HTTP status codes that should trigger a retry. Defaults to [408, 429, 500, 502, 503, 504] */\n retryableStatuses?: number[];\n}\n\n/** Default HTTP status codes considered retryable */\nconst DEFAULT_RETRYABLE_STATUSES = [408, 429, 500, 502, 503, 504];\n\n/**\n * Error thrown when the SVGR API returns a non-successful HTTP response.\n *\n * Extends the built-in `Error` class with an HTTP `status` code property,\n * allowing consumers to differentiate between different error types.\n *\n * @extends Error\n * @property {number} status - The HTTP status code from the API response\n * @property {string} message - Human-readable error description\n * @property {string} name - Always `\"SvgrApiError\"` for type identification\n *\n * @example\n * ```typescript\n * try {\n * await client.convert(imageData);\n * } catch (error) {\n * if (error instanceof SvgrApiError) {\n * console.error(`API error ${error.status}: ${error.message}`);\n * if (error.status === 429) {\n * // Handle rate limiting\n * }\n * }\n * }\n * ```\n */\nexport class SvgrApiError extends Error {\n constructor(\n /** The HTTP status code from the API response */\n public status: number,\n message: string,\n ) {\n super(message);\n this.name = \"SvgrApiError\";\n }\n}\n\n/**\n * HTTP client for the SVGR image-to-SVG conversion API.\n *\n * Provides a typed interface for calling the SVGR conversion endpoint.\n * Uses a platform-agnostic `NetworkClient` for HTTP communication,\n * making it usable in both web and React Native environments.\n *\n * @example\n * ```typescript\n * import { SvgrClient } from '@sudobility/svgr_client';\n *\n * const client = new SvgrClient({\n * baseUrl: 'https://api.svgr.app',\n * networkClient: myNetworkClient,\n * });\n *\n * const response = await client.convert(base64Image, 'logo.png', 7, true);\n * const svg = await client.fetchSvg(response.data!.cacheId);\n * ```\n *\n * @example\n * ```typescript\n * // With retry configuration\n * const client = new SvgrClient({\n * baseUrl: 'https://api.svgr.app',\n * networkClient: myNetworkClient,\n * retry: { maxRetries: 3, baseDelayMs: 1000 },\n * });\n * ```\n */\nexport class SvgrClient {\n private readonly baseUrl: string;\n private readonly networkClient: NetworkClient;\n private readonly retryConfig: RetryConfig | undefined;\n\n constructor(config: SvgrClientConfig) {\n this.baseUrl = config.baseUrl;\n this.networkClient = config.networkClient;\n this.retryConfig = config.retry;\n }\n\n /**\n * Convert a raster image to SVG format.\n *\n * Sends a POST request to `/api/v1/convert` with the image data and\n * optional conversion parameters. Returns a `BaseResponse<ConvertResult>`\n * containing a cache ID and original image dimensions on success.\n * Use {@link fetchSvg} with the cache ID to retrieve the SVG content.\n *\n * @param original - Base64-encoded raster image data (PNG, JPG, WEBP, BMP, or GIF)\n * @param filename - Optional filename for metadata or audit purposes\n * @param quality - Conversion quality level from 1 to 10 (1 = smallest, 10 = highest fidelity). Default: 5\n * @param transparentBg - If true, removes the background from the SVG. Default: false\n * @returns A promise resolving to a `BaseResponse<ConvertResult>` with the SVG output\n * @throws {SvgrApiError} When the API returns a non-successful response (includes HTTP status code)\n *\n * @example\n * ```typescript\n * const response = await client.convert(\n * 'data:image/png;base64,...',\n * 'logo.png',\n * 7,\n * true,\n * );\n * if (response.success && response.data) {\n * const svg = await client.fetchSvg(response.data.cacheId);\n * console.log(svg); // SVG string\n * console.log(response.data.width); // Original width in px\n * console.log(response.data.height); // Original height in px\n * }\n * ```\n */\n async convert(\n original: string,\n filename?: string,\n quality?: number,\n transparentBg?: boolean,\n ocr?: boolean,\n mergePaths?: boolean,\n smooth?: number,\n ): Promise<BaseResponse<ConvertResult>> {\n const makeRequest = () =>\n this.networkClient.post<BaseResponse<ConvertResult>>(\n `${this.baseUrl}/api/v1/convert`,\n {\n original,\n filename,\n quality,\n transparentBg,\n ocr,\n mergePaths,\n smooth,\n },\n { timeout: 30000 },\n );\n\n const response = this.retryConfig\n ? await this.withRetry(makeRequest, this.retryConfig)\n : await makeRequest();\n\n if (!response.ok || !response.data) {\n const errorData = response.data as { error?: string } | null | undefined;\n throw new SvgrApiError(\n response.status,\n errorData?.error || \"Conversion failed\",\n );\n }\n\n return response.data;\n }\n\n /**\n * Fetch a cached SVG by its cache ID.\n *\n * Sends a GET request to `/api/v1/svg/:cacheId` which returns the raw SVG\n * content with `Content-Type: image/svg+xml`. Uses native `fetch` instead\n * of the `NetworkClient` because the response is raw SVG text, not JSON.\n *\n * @param cacheId - The cache ID returned from a successful {@link convert} call\n * @returns The SVG content as a string\n * @throws {SvgrApiError} When the fetch fails or returns a non-OK status\n *\n * @example\n * ```typescript\n * const response = await client.convert(imageData, 'logo.png');\n * if (response.success && response.data) {\n * const svg = await client.fetchSvg(response.data.cacheId);\n * console.log(svg); // '<svg xmlns=\"http://www.w3.org/2000/svg\">...</svg>'\n * }\n * ```\n */\n async fetchSvg(cacheId: string): Promise<string> {\n const url = `${this.baseUrl}/api/v1/svg/${cacheId}`;\n const response = await fetch(url);\n if (!response.ok) {\n throw new SvgrApiError(response.status, \"Failed to fetch SVG\");\n }\n return response.text();\n }\n\n /**\n * Execute a request function with exponential backoff retry.\n *\n * @param fn - The async function to retry\n * @param config - Retry configuration\n * @returns The result of the successful request\n * @throws The last error encountered after all retries are exhausted\n */\n private async withRetry<T>(\n fn: () => Promise<{ ok: boolean; status: number } & T>,\n config: RetryConfig,\n ): Promise<{ ok: boolean; status: number } & T> {\n const retryableStatuses =\n config.retryableStatuses ?? DEFAULT_RETRYABLE_STATUSES;\n\n let response = await fn();\n\n for (let attempt = 0; attempt < config.maxRetries; attempt++) {\n if (response.ok || !retryableStatuses.includes(response.status)) {\n return response;\n }\n\n const delay = config.baseDelayMs * Math.pow(2, attempt);\n await new Promise((resolve) => setTimeout(resolve, delay));\n\n response = await fn();\n }\n\n return response;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SvgrClient.js","sourceRoot":"","sources":["../../src/network/SvgrClient.ts"],"names":[],"mappings":"AAkEA,MAAM,0BAA0B,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CA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\n * Configuration for creating an {@link SvgrClient} instance.\n *\n * @interface SvgrClientConfig\n * @property {string} baseUrl - The base URL of the SVGR API server (e.g., `https://api.svgr.app`)\n * @property {NetworkClient} networkClient - A platform-agnostic HTTP client from `@sudobility/types`\n * that handles authentication headers and request serialization\n *\n * @example\n * ```typescript\n * const config: SvgrClientConfig = {\n * baseUrl: 'https://api.svgr.app',\n * networkClient: myNetworkClient,\n * };\n * const client = new SvgrClient(config);\n * ```\n */\nexport interface SvgrClientConfig {\n /** The base URL of the SVGR API server (e.g., `https://api.svgr.app`) */\n baseUrl: string;\n /** Platform-agnostic HTTP client that handles auth and serialization */\n networkClient: NetworkClient;\n /**\n * Optional retry configuration for failed requests.\n * When provided, the client will retry failed network requests\n * using exponential backoff.\n */\n retry?: RetryConfig;\n}\n\n/**\n * Configuration for automatic retry of failed network requests.\n *\n * @interface RetryConfig\n * @property {number} maxRetries - Maximum number of retry attempts (default: 3)\n * @property {number} baseDelayMs - Base delay in milliseconds before first retry (default: 1000).\n * Subsequent retries use exponential backoff: `baseDelayMs * 2^attempt`.\n * @property {number[]} [retryableStatuses] - HTTP status codes that should trigger a retry.\n * Defaults to [408, 429, 500, 502, 503, 504].\n *\n * @example\n * ```typescript\n * const retryConfig: RetryConfig = {\n * maxRetries: 3,\n * baseDelayMs: 1000,\n * retryableStatuses: [429, 500, 502, 503, 504],\n * };\n * ```\n */\nexport interface RetryConfig {\n /** Maximum number of retry attempts (default: 3) */\n maxRetries: number;\n /** Base delay in milliseconds before first retry (default: 1000) */\n baseDelayMs: number;\n /** HTTP status codes that should trigger a retry. Defaults to [408, 429, 500, 502, 503, 504] */\n retryableStatuses?: number[];\n}\n\n/** Default HTTP status codes considered retryable */\nconst DEFAULT_RETRYABLE_STATUSES = [408, 429, 500, 502, 503, 504];\n\n/**\n * Error thrown when the SVGR API returns a non-successful HTTP response.\n *\n * Extends the built-in `Error` class with an HTTP `status` code property,\n * allowing consumers to differentiate between different error types.\n *\n * @extends Error\n * @property {number} status - The HTTP status code from the API response\n * @property {string} message - Human-readable error description\n * @property {string} name - Always `\"SvgrApiError\"` for type identification\n *\n * @example\n * ```typescript\n * try {\n * await client.convert(imageData);\n * } catch (error) {\n * if (error instanceof SvgrApiError) {\n * console.error(`API error ${error.status}: ${error.message}`);\n * if (error.status === 429) {\n * // Handle rate limiting\n * }\n * }\n * }\n * ```\n */\nexport class SvgrApiError extends Error {\n constructor(\n /** The HTTP status code from the API response */\n public status: number,\n message: string,\n ) {\n super(message);\n this.name = \"SvgrApiError\";\n }\n}\n\n/**\n * HTTP client for the SVGR image-to-SVG conversion API.\n *\n * Provides a typed interface for calling the SVGR conversion endpoint.\n * Uses a platform-agnostic `NetworkClient` for HTTP communication,\n * making it usable in both web and React Native environments.\n *\n * @example\n * ```typescript\n * import { SvgrClient } from '@sudobility/svgr_client';\n *\n * const client = new SvgrClient({\n * baseUrl: 'https://api.svgr.app',\n * networkClient: myNetworkClient,\n * });\n *\n * const response = await client.convert(base64Image, 'logo.png', 7, true);\n * const svg = await client.fetchSvg(response.data!.cacheId);\n * ```\n *\n * @example\n * ```typescript\n * // With retry configuration\n * const client = new SvgrClient({\n * baseUrl: 'https://api.svgr.app',\n * networkClient: myNetworkClient,\n * retry: { maxRetries: 3, baseDelayMs: 1000 },\n * });\n * ```\n */\nexport class SvgrClient {\n private readonly baseUrl: string;\n private readonly networkClient: NetworkClient;\n private readonly retryConfig: RetryConfig | undefined;\n\n constructor(config: SvgrClientConfig) {\n this.baseUrl = config.baseUrl;\n this.networkClient = config.networkClient;\n this.retryConfig = config.retry;\n }\n\n /**\n * Convert a raster image to SVG format.\n *\n * Sends a POST request to `/api/v1/convert` with the image data and\n * optional conversion parameters. Returns a `BaseResponse<ConvertResult>`\n * containing a cache ID and original image dimensions on success.\n * Use {@link fetchSvg} with the cache ID to retrieve the SVG content.\n *\n * @param original - Base64-encoded raster image data (PNG, JPG, WEBP, BMP, or GIF)\n * @param filename - Optional filename for metadata or audit purposes\n * @param quality - Conversion quality level from 1 to 10 (1 = smallest, 10 = highest fidelity). Default: 5\n * @param transparentBg - If true, removes the background from the SVG. Default: false\n * @returns A promise resolving to a `BaseResponse<ConvertResult>` with the SVG output\n * @throws {SvgrApiError} When the API returns a non-successful response (includes HTTP status code)\n *\n * @example\n * ```typescript\n * const response = await client.convert(\n * 'data:image/png;base64,...',\n * 'logo.png',\n * 7,\n * true,\n * );\n * if (response.success && response.data) {\n * const svg = await client.fetchSvg(response.data.cacheId);\n * console.log(svg); // SVG string\n * console.log(response.data.width); // Original width in px\n * console.log(response.data.height); // Original height in px\n * }\n * ```\n */\n async convert(\n original: string,\n filename?: string,\n quality?: number,\n transparentBg?: boolean,\n ocr?: boolean,\n mergePaths?: boolean,\n smooth?: number,\n imageType?: ImageType,\n ): Promise<BaseResponse<ConvertResult>> {\n const makeRequest = () =>\n this.networkClient.post<BaseResponse<ConvertResult>>(\n `${this.baseUrl}/api/v1/convert`,\n {\n original,\n filename,\n quality,\n transparentBg,\n ocr,\n mergePaths,\n smooth,\n imageType,\n },\n { timeout: 120000 },\n );\n\n const response = this.retryConfig\n ? await this.withRetry(makeRequest, this.retryConfig)\n : await makeRequest();\n\n if (!response.ok || !response.data) {\n const errorData = response.data as { error?: string } | null | undefined;\n throw new SvgrApiError(\n response.status,\n errorData?.error || \"Conversion failed\",\n );\n }\n\n return response.data;\n }\n\n /**\n * Fetch a cached SVG by its cache ID.\n *\n * Sends a GET request to `/api/v1/svg/:cacheId` which returns the raw SVG\n * content with `Content-Type: image/svg+xml`. Uses native `fetch` instead\n * of the `NetworkClient` because the response is raw SVG text, not JSON.\n *\n * @param cacheId - The cache ID returned from a successful {@link convert} call\n * @returns The SVG content as a string\n * @throws {SvgrApiError} When the fetch fails or returns a non-OK status\n *\n * @example\n * ```typescript\n * const response = await client.convert(imageData, 'logo.png');\n * if (response.success && response.data) {\n * const svg = await client.fetchSvg(response.data.cacheId);\n * console.log(svg); // '<svg xmlns=\"http://www.w3.org/2000/svg\">...</svg>'\n * }\n * ```\n */\n async fetchSvg(cacheId: string): Promise<string> {\n const url = `${this.baseUrl}/api/v1/svg/${cacheId}`;\n const response = await fetch(url);\n if (!response.ok) {\n throw new SvgrApiError(response.status, \"Failed to fetch SVG\");\n }\n return response.text();\n }\n\n /**\n * Execute a request function with exponential backoff retry.\n *\n * @param fn - The async function to retry\n * @param config - Retry configuration\n * @returns The result of the successful request\n * @throws The last error encountered after all retries are exhausted\n */\n private async withRetry<T>(\n fn: () => Promise<{ ok: boolean; status: number } & T>,\n config: RetryConfig,\n ): Promise<{ ok: boolean; status: number } & T> {\n const retryableStatuses =\n config.retryableStatuses ?? DEFAULT_RETRYABLE_STATUSES;\n\n let response = await fn();\n\n for (let attempt = 0; attempt < config.maxRetries; attempt++) {\n if (response.ok || !retryableStatuses.includes(response.status)) {\n return response;\n }\n\n const delay = config.baseDelayMs * Math.pow(2, attempt);\n await new Promise((resolve) => setTimeout(resolve, delay));\n\n response = await fn();\n }\n\n return response;\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sudobility/svgr_client",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.29",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"verify": "bun run typecheck && bun run lint && bun run test && bun run build"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@sudobility/svgr_types": "^1.0.
|
|
32
|
+
"@sudobility/svgr_types": "^1.0.18"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"@sudobility/types": "^1.9.61",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@tanstack/react-query": "^5.0.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@sudobility/di": "^1.5.
|
|
40
|
+
"@sudobility/di": "^1.5.53",
|
|
41
41
|
"@sudobility/types": "^1.9.61",
|
|
42
42
|
"@eslint/js": "^9.38.0",
|
|
43
43
|
"@tanstack/react-query": "^5.0.0",
|