diff --git a/docs/interfaces/ChafaModule.md b/docs/interfaces/ChafaModule.md index 1934de6..ba981e4 100644 --- a/docs/interfaces/ChafaModule.md +++ b/docs/interfaces/ChafaModule.md @@ -25,6 +25,9 @@ An object that contains the Chafa WebAssembly module API. • **decodeImage**: (`image`: `ArrayBuffer` \| [`ImageDataLike`](../README.md#imagedatalike), `callback`: (`error`: ``null``, `image`: [`ImageDataLike`](../README.md#imagedatalike)) => `void`(`error`: `unknown`, `image`: ``null``) => `void`) => `void` +Decodes a PNG, JPEG or WebP image into an ImageDataLike object. +If an already decoded image is specified, it will be left as is. + #### Type declaration ▸ (`image`, `callback`): `void` @@ -49,6 +52,8 @@ ___ • **imageToAnsi**: (`image`: `ArrayBuffer` \| [`ImageDataLike`](../README.md#imagedatalike), `config`: [`PartialChafaConfig`](../README.md#partialchafaconfig), `callback`: (`error`: ``null``, `data`: \{ `ansi`: `string` ; `config`: [`ReadonlyChafaConfig`](../README.md#readonlychafaconfig) }) => `void`(`error`: `unknown`, `data`: \{ `ansi`: ``null`` ; `config`: ``null`` }) => `void`) => `void` +Converts an image into an ANSI string. + #### Type declaration ▸ (`image`, `config`, `callback`): `void` @@ -73,6 +78,8 @@ ___ • **imageToCanvas**: (`image`: `ArrayBuffer` \| [`ImageDataLike`](../README.md#imagedatalike), `config`: [`PartialChafaConfig`](../README.md#partialchafaconfig), `callback`: (`error`: ``null``, `data`: \{ `canvas`: `number` ; `config`: [`ReadonlyChafaConfig`](../README.md#readonlychafaconfig) }) => `void`(`error`: `unknown`, `data`: \{ `canvas`: ``null`` ; `config`: ``null`` }) => `void`) => `void` +Converts an image into a Chafa canvas pointer. + #### Type declaration ▸ (`image`, `config`, `callback`): `void` @@ -97,6 +104,8 @@ ___ • **imageToConsoleLogArgs**: (`image`: `ArrayBuffer` \| [`ImageDataLike`](../README.md#imagedatalike), `config`: [`PartialChafaConfig`](../README.md#partialchafaconfig), `callback`: (`error`: ``null``, `data`: \{ `args`: `string`[] ; `config`: [`ReadonlyChafaConfig`](../README.md#readonlychafaconfig) }) => `void`(`error`: `unknown`, `data`: \{ `args`: ``null`` ; `config`: ``null`` }) => `void`) => `void` +Converts an image into an array of `console.log` arguments. + #### Type declaration ▸ (`image`, `config`, `callback`): `void` @@ -121,6 +130,8 @@ ___ • **imageToHtml**: (`image`: `ArrayBuffer` \| [`ImageDataLike`](../README.md#imagedatalike), `config`: [`PartialChafaConfig`](../README.md#partialchafaconfig), `callback`: (`error`: ``null``, `data`: \{ `config`: [`ReadonlyChafaConfig`](../README.md#readonlychafaconfig) ; `html`: `string` }) => `void`(`error`: `unknown`, `data`: \{ `config`: ``null`` ; `html`: ``null`` }) => `void`) => `void` +Converts an image into an HTML string. + #### Type declaration ▸ (`image`, `config`, `callback`): `void` @@ -145,6 +156,8 @@ ___ • **imageToMatrix**: (`image`: `ArrayBuffer` \| [`ImageDataLike`](../README.md#imagedatalike), `config`: [`PartialChafaConfig`](../README.md#partialchafaconfig), `callback`: (`error`: ``null``, `data`: \{ `config`: [`ReadonlyChafaConfig`](../README.md#readonlychafaconfig) ; `matrix`: `number`[][][] }) => `void`(`error`: `unknown`, `data`: \{ `config`: ``null`` ; `matrix`: ``null`` }) => `void`) => `void` +Converts an image into a matrix of characters. + #### Type declaration ▸ (`image`, `config`, `callback`): `void` diff --git a/package-lock.json b/package-lock.json index 2d3c2f7..64c04d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "chafa-wasm", - "version": "0.0.4", + "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "chafa-wasm", - "version": "0.0.4", + "version": "0.1.0", "license": "LGPL-3.0", "devDependencies": { "chai": "~5.0.0", diff --git a/package.json b/package.json index b9d7f9e..ac4e447 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chafa-wasm", - "version": "0.0.4", + "version": "0.1.0", "description": "Chafa WebAssembly module to convert images to text", "keywords": [ "chafa",