@elastic/isomer-image-takumi 0.1.0 → 0.3.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.
- package/NOTICE.txt +0 -1571
- package/README.md +17 -6
- package/THIRD_PARTY_LICENSES.md +1 -933
- package/dist/backend.d.ts +30 -17
- package/dist/backend.d.ts.map +1 -1
- package/dist/backend.js +18 -8
- package/dist/backend.js.map +1 -1
- package/dist/cjs/backend.js +19 -9
- package/dist/cjs/backend.js.map +1 -1
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/render_pdf.js +3 -3
- package/dist/cjs/render_pdf.js.map +1 -1
- package/dist/cjs/render_png.js +3 -3
- package/dist/cjs/render_png.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/render_pdf.d.ts +6 -6
- package/dist/render_pdf.d.ts.map +1 -1
- package/dist/render_pdf.js +3 -3
- package/dist/render_pdf.js.map +1 -1
- package/dist/render_png.d.ts +12 -11
- package/dist/render_png.d.ts.map +1 -1
- package/dist/render_png.js +3 -3
- package/dist/render_png.js.map +1 -1
- package/package.json +2 -6
package/README.md
CHANGED
|
@@ -1,20 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
<!-- markdownlint-disable MD033 -->
|
|
2
|
+
<p align="center">
|
|
3
|
+
<img src="https://raw.githubusercontent.com/elastic/isomer/main/docs/logo.svg" alt="Isomer" width="96" height="96">
|
|
4
|
+
</p>
|
|
5
|
+
<h1 align="center">@elastic/isomer-image-takumi</h1>
|
|
6
|
+
<p align="center"><strong>isomer</strong> <i>n.</i> — one formula, many forms; the same composition rendered to every surface.</p>
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://www.npmjs.com/package/@elastic/isomer-image-takumi"><img src="https://img.shields.io/npm/v/@elastic/isomer-image-takumi.svg" alt="npm version"></a>
|
|
9
|
+
<a href="https://github.com/elastic/isomer/actions/workflows/ci.yml"><img src="https://github.com/elastic/isomer/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
10
|
+
<a href="https://github.com/elastic/isomer/blob/main/LICENSE.txt"><img src="https://img.shields.io/badge/License-Elastic%202.0-blue.svg" alt="License: Elastic License 2.0"></a>
|
|
11
|
+
</p>
|
|
12
|
+
<!-- markdownlint-enable MD033 -->
|
|
2
13
|
|
|
3
|
-
Rasterizes the `
|
|
14
|
+
Rasterizes the `snapshot` surface's output with [takumi](https://takumi.kane.tw): PNG, SVG, or PDF out, and a measured layout for the SDK's `checkLayout`.
|
|
4
15
|
|
|
5
16
|
```sh
|
|
6
|
-
npm install @elastic/isomer-image-takumi
|
|
17
|
+
npm install @elastic/isomer-image-takumi
|
|
7
18
|
```
|
|
8
19
|
|
|
9
20
|
```ts
|
|
10
21
|
import { createTakumiImageBackend } from '@elastic/isomer-image-takumi';
|
|
11
22
|
|
|
12
23
|
const takumi = createTakumiImageBackend({ fonts });
|
|
13
|
-
const png = await takumi.png(runtime.surfaces.
|
|
14
|
-
const pdf = await takumi.pdf(runtime.surfaces.
|
|
24
|
+
const png = await takumi.png(runtime.surfaces.snapshot.render(composition));
|
|
25
|
+
const pdf = await takumi.pdf(runtime.surfaces.snapshot.renderPages(deck));
|
|
15
26
|
```
|
|
16
27
|
|
|
17
|
-
`renderPng` and `renderPdf` wrap validation, the `
|
|
28
|
+
`renderPng` and `renderPdf` wrap validation, the `snapshot` surface, and the backend in one call and return the findings beside the bytes. A host-side rasterizer: it reads the snapshot's markup, so it depends on no Isomer package and no React, and it is the one published package that pulls a native dependency. Pass `takumi.formats` to `createIsomerRuntime({ formats })` so `getCapabilities()` reports PNG, SVG, and PDF. Docs: [Takumi image backend](https://elastic.github.io/isomer/image-takumi/).
|
|
18
29
|
|
|
19
30
|
## License
|
|
20
31
|
|