@zumer/snapdom-plugins 4.4.1-dev.1 → 5.0.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.
Files changed (70) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +30 -83
  3. package/ascii-export.d.ts +0 -7
  4. package/ascii-export.js +0 -21
  5. package/index.d.ts +0 -3
  6. package/index.js +1 -4
  7. package/package.json +4 -19
  8. package/pdf/LICENSE +0 -21
  9. package/pdf/README.md +0 -22
  10. package/pdf/REFERENCE.md +0 -520
  11. package/pdf/src/frontmatter.js +0 -200
  12. package/pdf/src/furniture.js +0 -398
  13. package/pdf/src/index.js +0 -2415
  14. package/pdf/src/mega/README.md +0 -47
  15. package/pdf/src/mega/diag.js +0 -148
  16. package/pdf/src/mega/flow.js +0 -56
  17. package/pdf/src/mega/fonts.js +0 -287
  18. package/pdf/src/mega/forms.js +0 -479
  19. package/pdf/src/mega/labels.js +0 -43
  20. package/pdf/src/mega/meta.js +0 -145
  21. package/pdf/src/nav.js +0 -357
  22. package/pdf/src/paginate.js +0 -583
  23. package/pdf/src/tagged.js +0 -355
  24. package/pdf/src/text-layer.js +0 -1771
  25. package/pdf/src/writer/encrypt.js +0 -218
  26. package/pdf/src/writer/font.js +0 -507
  27. package/pdf/src/writer/index.js +0 -1135
  28. package/pdf/src/writer/subset.js +0 -387
  29. package/pdf.d.ts +0 -294
  30. package/pdf.js +0 -1
  31. package/stream/LICENSE +0 -21
  32. package/stream/README.md +0 -142
  33. package/stream/src/index.js +0 -41
  34. package/stream/src/overlays.js +0 -153
  35. package/stream/src/recorder.js +0 -41
  36. package/stream/src/stream.js +0 -686
  37. package/stream/src/webgl.js +0 -58
  38. package/stream.d.ts +0 -86
  39. package/stream.js +0 -1
  40. package/vector/CONTRACT.md +0 -903
  41. package/vector/LICENSE +0 -21
  42. package/vector/README.md +0 -35
  43. package/vector/src/adapters/snapdom.js +0 -795
  44. package/vector/src/collect/box.js +0 -1676
  45. package/vector/src/collect/font.js +0 -487
  46. package/vector/src/collect/image.js +0 -1458
  47. package/vector/src/collect/mathml.js +0 -272
  48. package/vector/src/collect/text.js +0 -3027
  49. package/vector/src/css/color.js +0 -823
  50. package/vector/src/css/gradient.js +0 -1126
  51. package/vector/src/css/matrix.js +0 -398
  52. package/vector/src/css/radius.js +0 -124
  53. package/vector/src/css/shadow.js +0 -201
  54. package/vector/src/emit/figma-json.js +0 -1995
  55. package/vector/src/emit/h2d-vector.js +0 -215
  56. package/vector/src/emit/h2d.js +0 -1147
  57. package/vector/src/emit/pdf.js +0 -2571
  58. package/vector/src/emit/svg-flat.js +0 -4842
  59. package/vector/src/exclusion.js +0 -13
  60. package/vector/src/index.js +0 -2910
  61. package/vector/src/paint.js +0 -2908
  62. package/vector/src/public.js +0 -57
  63. package/vector/src/writer/encrypt.js +0 -227
  64. package/vector/src/writer/font.js +0 -507
  65. package/vector/src/writer/index.js +0 -1148
  66. package/vector/src/writer/subset.js +0 -387
  67. package/vector/svd/index.js +0 -72
  68. package/vector/svd/schema.js +0 -985
  69. package/vector.d.ts +0 -28
  70. package/vector.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # Plugin changes
2
2
 
3
+ ## 5.0.0
4
+
5
+ > 9 November 2026
6
+
7
+ **Breaking changes**
8
+
9
+ - PDF, Vector and Stream are their own packages: [`@zumer/snapdom-pdf`](https://www.npmjs.com/package/@zumer/snapdom-pdf), [`@zumer/snapdom-vector`](https://www.npmjs.com/package/@zumer/snapdom-vector) and [`@zumer/snapdom-stream`](https://www.npmjs.com/package/@zumer/snapdom-stream). The `/pdf`, `/vector` and `/stream` subpaths are gone; change the import and nothing else, the options and behavior are unchanged.
10
+ - `asciiStream` left with the stream. Use the two calls it wrapped: `stream(el, { onFrame: (f) => onText(asciiFromCanvas(f.canvas, options)) })`, with `stream` from `@zumer/snapdom-stream` and `asciiFromCanvas` from `@zumer/snapdom-plugins/ascii-export`. The README's "Migrating from 4.x" table has every import side by side.
11
+
12
+ The package keeps the eleven toolbox plugins and still requires SnapDOM 3.4.0 or newer within 3.x.
13
+
14
+ ## 4.4.1
15
+
16
+ > 29 October 2026
17
+
18
+ **Features**
19
+
20
+ - **stream:** capture windows one task at a time, report busyMs, drop them on stop() [`edbc556`](https://github.com/zumerlab/snapdom/commit/edbc556ca2f73157f5487d13b8e1c15db8dcdd6e)
21
+ - **engine:** ship html-in-canvas in the default build, with a guide [`8294802`](https://github.com/zumerlab/snapdom/commit/8294802cedd1d850573d57b369e2130667d9e490)
22
+
23
+ **Fixes**
24
+
25
+ - **stream:** repaint hostless changes as a clip window, ignore unhovered pointer moves [`5e97874`](https://github.com/zumerlab/snapdom/commit/5e9787476555c9ceda54a843d5601a5ccaa811df)
26
+ - **stream:** read the :hover rules before the first capture [`1ea0f3b`](https://github.com/zumerlab/snapdom/commit/1ea0f3bae10fb59377bedc6ec86a8cfa0264feba)
27
+
28
+ **Docs**
29
+
30
+ - add a plugins version badge to the READMEs [`3bf9489`](https://github.com/zumerlab/snapdom/commit/3bf9489774c89e771cd58dc624e2af35ddbe38ae)
31
+
3
32
  ## 4.4.0
4
33
 
5
34
  > 27 October 2026
package/README.md CHANGED
@@ -5,8 +5,10 @@
5
5
 
6
6
  Official plugins for [SnapDOM](https://github.com/zumerlab/snapdom), a high-performance DOM engine
7
7
  that exports a rendered element as PNG, SVG or canvas in the browser. Core exports images and
8
- canvases; this package adds HTML, structured context, element maps, PDF, editable vectors, ASCII,
9
- visual transforms, live GIF/video recording and live DOM streaming.
8
+ canvases; this package adds HTML, structured context, element maps, ASCII, visual transforms,
9
+ redaction and live GIF/video recording. PDF, Vector and Stream are their own packages:
10
+ [`@zumer/snapdom-pdf`](https://snapdom.dev/plugins/pdf/), [`@zumer/snapdom-vector`](https://snapdom.dev/plugins/vector/)
11
+ and [`@zumer/snapdom-stream`](https://snapdom.dev/plugins/stream/).
10
12
 
11
13
  Image, HTML and structured exports use captured state; GIF and video start a sequence of
12
14
  live captures when their export method is called.
@@ -19,7 +21,7 @@ Install the plugins next to a core supported by their peer dependency:
19
21
  npm install @zumer/snapdom@latest @zumer/snapdom-plugins@latest
20
22
  ```
21
23
 
22
- Plugins 4.x in this checkout require SnapDOM 3.4.0 or newer within 3.x. The 4.x release replaces pdf-image with the full PDF exporter and adds Vector. Both are MIT-licensed and available on npm in `@zumer/snapdom-plugins` 4.x. The `@latest` command above installs the published release. See the [migration guide](https://github.com/zumerlab/snapdom#migrating-from-v2) when upgrading from v2.
24
+ Plugins 5.x require SnapDOM 3.4.0 or newer within 3.x and hold the eleven toolbox plugins. PDF, Vector and Stream moved to their own packages in 5.0; see [Migrating from 4.x](#migrating-from-4x). See the [migration guide](https://github.com/zumerlab/snapdom#migrating-from-v2) when upgrading from v2.
23
25
 
24
26
  ## Usage
25
27
 
@@ -66,7 +68,7 @@ snapdom(el, { plugins: [filter({ preset: 'grayscale' })] });
66
68
 
67
69
  | Option | Type | Default | Description |
68
70
  |--------|------|---------|-------------|
69
- | `preset` | `string` | — | `'grayscale'` \| `'sepia'` \| `'blur'` \| `'invert'` \| `'vintage'` \| `'dramatic'` |
71
+ | `preset` | `string` | none | `'grayscale'` \| `'sepia'` \| `'blur'` \| `'invert'` \| `'vintage'` \| `'dramatic'` |
70
72
  | `filter` | `string` | `''` | Raw CSS filter string, e.g. `'blur(2px) contrast(1.2)'` |
71
73
 
72
74
  ---
@@ -231,49 +233,20 @@ console.log(art);
231
233
  `toAscii({ width, charset, invert, format, contrast })` overrides any of them per call.
232
234
 
233
235
  The conversion is also exported on its own. `asciiFromCanvas(source, options)` turns any
234
- drawable (a canvas, an image, a video frame) into ASCII with the same options, and
235
- `asciiStream(element, options)` runs it on every frame of a [`stream()`](stream/README.md):
236
+ drawable (a canvas, an image, a video frame) into ASCII with the same options. Run it on every
237
+ frame of a [`@zumer/snapdom-stream`](https://snapdom.dev/plugins/stream/) stream for a live ASCII mirror:
236
238
 
237
239
  ```js
238
- import { asciiStream } from '@zumer/snapdom-plugins/ascii-export';
240
+ import { stream } from '@zumer/snapdom-stream';
241
+ import { asciiFromCanvas } from '@zumer/snapdom-plugins/ascii-export';
239
242
 
240
- const live = asciiStream(el, { width: 100, fps: 15, onText: (text) => (pre.textContent = text) });
243
+ const live = stream(el, { fps: 15, onFrame: (frame) => (pre.textContent = asciiFromCanvas(frame.canvas, { width: 100 })) });
241
244
  await live.ready;
242
245
  live.stop();
243
246
  ```
244
247
 
245
248
  ---
246
249
 
247
- ### `pdf`
248
-
249
- Adds `toPdf()`, returning a PDF Blob with the capture's appearance, selectable text,
250
- links and pagination. MIT licensed.
251
- It replaces `pdf-image`; there is no second image-only PDF implementation.
252
-
253
- ```js
254
- import { pdf } from '@zumer/snapdom-plugins/pdf';
255
-
256
- const result = await snapdom(el, { plugins: [pdf()] });
257
- const blob = await result.toPdf({ page: 'a4', margin: 36 });
258
- await result.toPdf({ page: 'letter', download: 'report.pdf' });
259
- ```
260
-
261
- Configure capture-time measurement on `pdf({ forms, outline, breakAvoid, shadow,
262
- formValues })`. Configure paper size, orientation, margins, tagging, metadata,
263
- headers, footers, compression or encryption on `toPdf()`. Downloads are opt-in;
264
- ordinary exports return a Blob. See [the PDF overview](pdf/README.md) and [full reference](pdf/REFERENCE.md).
265
-
266
- **Migration:** import `pdf` from `/pdf`, replace `pdfImage()` with `pdf()`, and
267
- replace `toPdfImage()` with `toPdf({ download: 'capture.pdf' })`. Put orientation
268
- on the export. The old temporary object-URL return becomes a persistent Blob.
269
- The default page sizing and pagination differ: choose `page: 'a4'` explicitly.
270
-
271
- Tagged output alone is not a PDF/UA conformance guarantee. The exporter reports
272
- eligibility and blockers. Redact source text structurally; covering pixels does
273
- not remove text from a searchable document.
274
-
275
- ---
276
-
277
250
  ### `agent-map`
278
251
 
279
252
  Adds `toAgentMap()`: an image with numbered badges on interactive elements and a JSON map
@@ -423,24 +396,6 @@ The document retains source markup, including event-handler attributes; it is no
423
396
 
424
397
  ---
425
398
 
426
- ### `vector`
427
-
428
- Adds `toVector()` for standalone SVG with editable text and supported shapes, and
429
- `toFigma()` for Figma clipboard export. Its source and internal SVD format live in
430
- `vector/` under the MIT license. Both exporters are available on npm in `@zumer/snapdom-plugins` 4.x.
431
-
432
- ```js
433
- import { vector } from '@zumer/snapdom-plugins/vector';
434
- const result = await snapdom(el, { plugins: [vector()] });
435
- const svg = await result.toVector({ exclude: '.private' });
436
- await result.toFigma(); // HTTPS or localhost, from a user action
437
- ```
438
-
439
- Register per capture. Unsupported paint is diagnosed; the connected source and
440
- its styles must remain available during export. See [Vector](./vector/README.md).
441
-
442
- ---
443
-
444
399
  ### `gif-export`
445
400
 
446
401
  Adds `toGif()`, which records the live element and returns an `image/gif` Blob. Its built-in
@@ -460,14 +415,14 @@ await result.toGif({ download: 'animation.gif' });
460
415
  |--------|------|---------|-------------|
461
416
  | `fps` | `number` | `10` | Frames per second |
462
417
  | `duration` | `number` | `2000` | Total duration in ms (ignored if `frames` is set) |
463
- | `frames` | `number` | — | Explicit frame count (overrides `duration`) |
418
+ | `frames` | `number` | none | Explicit frame count (overrides `duration`) |
464
419
  | `maxColors` | `number` | `256` | Palette size per frame (2–256) |
465
420
  | `background` | `string` | `'#ffffff'` | Color composited under transparent pixels |
466
421
  | `scale` | `number` | capture's scale | Capture scale |
467
422
  | `repeat` | `number` | `0` | Loop count (`0` = forever, `-1` = play once) |
468
423
  | `filename` | `string` | `'capture.gif'` | Download filename |
469
424
 
470
- Per-call `opts` override constructor options and accept `download` (`boolean \| string`).
425
+ Per-call `opts` override constructor options and accept `download` (`boolean | string`).
471
426
  Recording starts when `toGif()` runs, including its first frame. It preserves the original
472
427
  capture policy, including exclusions and plugins. Frame capture speed limits the sampling rate.
473
428
 
@@ -496,36 +451,17 @@ filenames and `download` strings are used as supplied.
496
451
  |--------|------|---------|-------------|
497
452
  | `fps` | `number` | `10` | Frames per second |
498
453
  | `duration` | `number` | `2000` | Total duration in ms (ignored if `frames` is set) |
499
- | `frames` | `number` | — | Explicit frame count (overrides `duration`) |
454
+ | `frames` | `number` | none | Explicit frame count (overrides `duration`) |
500
455
  | `background` | `string` | `'#ffffff'` | Color composited under transparent pixels |
501
456
  | `scale` | `number` | capture's scale | Capture scale |
502
- | `bitrate` | `number` | — | `videoBitsPerSecond` passed to `MediaRecorder` |
503
- | `filename` | `string` | — | Download filename; the default follows the recorded `.mp4` / `.webm` container |
457
+ | `bitrate` | `number` | none | `videoBitsPerSecond` passed to `MediaRecorder` |
458
+ | `filename` | `string` | none | Download filename; the default follows the recorded `.mp4` / `.webm` container |
504
459
 
505
460
  Requires `MediaRecorder` and `canvas.captureStream()`, which may be unavailable in headless
506
461
  environments. Per-call `opts` override constructor options and accept `download`
507
- (`boolean \| string`). Recording starts at the call and preserves capture options as GIF
462
+ (`boolean | string`). Recording starts at the call and preserves capture options as GIF
508
463
  recording does. MediaRecorder uses a real-time clock, so slow captures can stretch duration.
509
464
 
510
- ### `stream`
511
-
512
- Streams a live element into a canvas that repaints only the boxes that changed, for WebGL
513
- textures and video overlays. `stream(el, options)` is the entry; `streamExport()` adds the same
514
- as `toStream()`. Includes `streamTexture(gl)`, which uploads only the changed rects, and
515
- `recordCanvas(canvas)`.
516
-
517
- ```js
518
- import { stream, streamTexture } from '@zumer/snapdom-plugins/stream';
519
-
520
- const tex = streamTexture(gl);
521
- const live = stream(panel, { scale: 2, onFrame: (frame) => tex.update(frame) });
522
- ```
523
-
524
- Each patched frame matches a full capture of the same DOM state. Full documentation, options
525
- and limits: [stream/README.md](stream/README.md).
526
-
527
- ---
528
-
529
465
  ## Plugin registration
530
466
 
531
467
  **Global** (applies to all captures):
@@ -564,7 +500,7 @@ See [PLUGIN_SPEC.md](../../PLUGIN_SPEC.md) for the full hook specification and [
564
500
 
565
501
  ## Live demos
566
502
 
567
- Run `npm run compile` and `npm run site` from the monorepo root, then open `/showcase/`, `/plugins/pdf/` or `/plugins/vector/`. The demos generate actual files from editable DOM samples.
503
+ Run `npm run compile` and `npm run site` from the monorepo root, then open `/plugins/` (one page per plugin, each with its demo) or `/showcase/` for every demo on one page. The demos generate actual files from editable DOM samples.
568
504
 
569
505
  ## Releasing from the repository root
570
506
 
@@ -576,7 +512,18 @@ npm run release:plugins
576
512
  npm run publish:plugins
577
513
  ```
578
514
 
579
- `release:plugins` commits the plugin version, the lockfile and the changelog, then pushes. `publish:plugins` runs the PDF and vector checks, then publishes only `@zumer/snapdom-plugins` under `latest`. `bump:plugins` runs `@zumerbox/bump` followed by `@zumerbox/changelog` inside the plugin workspace, matching the core's tools. The bump command requires a clean Git working tree and prompts for the next version. It updates the plugin version and root lockfile; the changelog command writes `packages/plugins/CHANGELOG.md`. `bump:plugins:dry` previews the bump without updating the version or changelog. Skip the bump if the version has already been prepared.
515
+ `release:plugins` commits the plugin version, the lockfile and the changelog, then pushes. `publish:plugins` runs the packaging check (`scripts/check-pack.mjs`), then publishes only `@zumer/snapdom-plugins` under `latest`. PDF, Vector and Stream have the same scripts under their own suffix (`bump:pdf`, `release:pdf`, `publish:pdf`, `publish:pdf:dev`). `bump:plugins` runs `@zumerbox/bump` followed by `@zumerbox/changelog` inside the plugin workspace, matching the core's tools. The bump command requires a clean Git working tree and prompts for the next version. It updates the plugin version and root lockfile; the changelog command writes `packages/plugins/CHANGELOG.md`. `bump:plugins:dry` previews the bump without updating the version or changelog. Skip the bump if the version has already been prepared.
516
+
517
+ ## Migrating from 4.x
518
+
519
+ The `/pdf`, `/vector` and `/stream` subpaths are gone. Install the package you use and change the import; options and behavior are unchanged.
520
+
521
+ | 4.x | 5.x |
522
+ |-----|-----|
523
+ | `import { pdf } from '@zumer/snapdom-plugins/pdf'` | `import { pdf } from '@zumer/snapdom-pdf'` |
524
+ | `import { vector } from '@zumer/snapdom-plugins/vector'` | `import { vector } from '@zumer/snapdom-vector'` |
525
+ | `import { stream } from '@zumer/snapdom-plugins/stream'` | `import { stream } from '@zumer/snapdom-stream'` |
526
+ | `asciiStream(el, options)` | `stream(el, { onFrame: (f) => onText(asciiFromCanvas(f.canvas, options)) })` |
580
527
 
581
528
  ## License
582
529
 
package/ascii-export.d.ts CHANGED
@@ -6,7 +6,6 @@
6
6
  * at capture time.
7
7
  */
8
8
  import type { SnapdomPlugin } from '@zumer/snapdom';
9
- import type { Stream, StreamOptions, StreamFrame } from './stream.js';
10
9
 
11
10
  export interface AsciiExportOptions {
12
11
  /** Character width of the output. */
@@ -32,9 +31,3 @@ declare module '@zumer/snapdom' {
32
31
  toAscii(options?: AsciiExportOptions): Promise<string>;
33
32
  }
34
33
  }
35
-
36
- /** `stream()` plus `asciiFromCanvas()` on every frame; `onText` receives the text (or HTML when `format: 'html'`). */
37
- export declare function asciiStream(
38
- element: Element,
39
- options?: AsciiExportOptions & { charset?: string | string[] } & StreamOptions & { onText?: (text: string, frame: StreamFrame) => void }
40
- ): Stream;
package/ascii-export.js CHANGED
@@ -12,8 +12,6 @@
12
12
  * @param {number} [options.contrast=0] - Non-negative luminance contrast boost
13
13
  * @returns {Object} SnapDOM plugin
14
14
  */
15
- import { stream } from './stream.js';
16
-
17
15
  export function asciiExport(options = {}) {
18
16
  const {
19
17
  width: charWidth = 80,
@@ -102,22 +100,3 @@ export function asciiFromCanvas(source, options = {}) {
102
100
  }
103
101
  return colored ? ascii + '</pre>' : ascii;
104
102
  }
105
-
106
- /**
107
- * Stream a live element as ASCII: `stream()` keeps a canvas in step with the element and every
108
- * frame is converted with `asciiFromCanvas()`. Returns the stream handle (`ready`, `stats`, `stop()`).
109
- * @param {Element} element
110
- * @param {Object} [options] - ascii options (width, charset, invert, format, contrast) plus stream
111
- * options (fps, scale, plugins, ...) and `onText(text, frame)`, called after each repaint.
112
- */
113
- export function asciiStream(element, options = {}) {
114
- const { width, charset, invert, format, contrast, onText, onFrame, ...streamOptions } = options;
115
- const ascii = { width, charset, invert, format, contrast };
116
- return stream(element, {
117
- ...streamOptions,
118
- onFrame(frame) {
119
- onFrame?.(frame);
120
- onText?.(asciiFromCanvas(frame.canvas, ascii), frame);
121
- },
122
- });
123
- }
package/index.d.ts CHANGED
@@ -11,11 +11,8 @@ export * from './replace-text.js';
11
11
  export * from './timestamp-overlay.js';
12
12
  export * from './redact-inputs.js';
13
13
  export * from './ascii-export.js';
14
- export * from './pdf.js';
15
14
  export * from './html-export.js';
16
15
  export * from './gif-export.js';
17
16
  export * from './video-export.js';
18
17
  export * from './agent-map.js';
19
18
  export * from './context-export.js';
20
- export * from './vector.js';
21
- export * from './stream.js';
package/index.js CHANGED
@@ -7,16 +7,13 @@
7
7
  */
8
8
 
9
9
  export { timestampOverlay } from './timestamp-overlay.js';
10
- export { asciiExport, asciiFromCanvas, asciiStream } from './ascii-export.js';
10
+ export { asciiExport, asciiFromCanvas } from './ascii-export.js';
11
11
  export { replaceText } from './replace-text.js';
12
12
  export { redactInputs } from './redact-inputs.js';
13
13
  export { filter } from './filter.js';
14
14
  export { colorTint } from './color-tint.js';
15
- export { pdf } from './pdf.js';
16
15
  export { agentMap } from './agent-map.js';
17
16
  export { contextExport } from './context-export.js';
18
17
  export { htmlExport } from './html-export.js';
19
18
  export { gifExport } from './gif-export.js';
20
19
  export { videoExport } from './video-export.js';
21
- export { vector } from './vector.js';
22
- export { stream, streamExport, streamTexture, recordCanvas, overlayStage, scoreboard, lowerThird, ticker, liveBadge } from './stream.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zumer/snapdom-plugins",
3
- "version": "4.4.1-dev.1",
4
- "description": "Official plugins for SnapDOM",
3
+ "version": "5.0.0",
4
+ "description": "Official plugin toolbox for SnapDOM: prepare, export and record captures",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "bump:dry": "npx @zumerbox/bump -d",
@@ -19,29 +19,14 @@
19
19
  "./context-export": "./context-export.js",
20
20
  "./html-export": "./html-export.js",
21
21
  "./gif-export": "./gif-export.js",
22
- "./video-export": "./video-export.js",
23
- "./pdf": "./pdf.js",
24
- "./vector": "./vector.js",
25
- "./stream": "./stream.js"
22
+ "./video-export": "./video-export.js"
26
23
  },
27
24
  "files": [
28
25
  "*.js",
29
26
  "*.d.ts",
30
27
  "README.md",
31
28
  "LICENSE",
32
- "pdf/src/",
33
- "pdf/README.md",
34
- "pdf/REFERENCE.md",
35
- "pdf/LICENSE",
36
- "CHANGELOG.md",
37
- "vector/src/",
38
- "vector/svd/",
39
- "vector/CONTRACT.md",
40
- "vector/LICENSE",
41
- "vector/README.md",
42
- "stream/src/",
43
- "stream/README.md",
44
- "stream/LICENSE"
29
+ "CHANGELOG.md"
45
30
  ],
46
31
  "types": "./index.d.ts",
47
32
  "keywords": [
package/pdf/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 ZumerLab
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
package/pdf/README.md DELETED
@@ -1,22 +0,0 @@
1
- # PDF plugin
2
-
3
- MIT-licensed PDF export for SnapDOM, replacing the former `pdf-image` implementation. This source is part of `@zumer/snapdom-plugins` 4.x and requires core 3.x. The 4.x release is available on npm.
4
-
5
- ```js
6
- import { snapdom } from '@zumer/snapdom';
7
- import { pdf } from '@zumer/snapdom-plugins/pdf';
8
-
9
- const result = await snapdom(element, { plugins: [pdf()] });
10
- const blob = await result.toPdf({ page: 'a4', margin: 36 });
11
- await result.toPdf({ page: 'letter', download: 'report.pdf' });
12
- ```
13
-
14
- `toPdf()` returns a `Blob`; downloading is opt-in. The exporter preserves the captured appearance and supports selectable, searchable text, links, pagination, repeated table headers, Unicode, transparency and optional form fields. Export options also cover headers, footers, metadata, tagging and encryption. Tagged output alone does not guarantee PDF/UA conformance.
15
-
16
- Put capture-time measurement options on `pdf()` and paper/output options on `toPdf()`. Structurally redact sensitive source content before capture: covering pixels does not remove searchable text. See the [full reference](REFERENCE.md) and [public types](../pdf.d.ts).
17
-
18
- ## Live demo and verification
19
-
20
- From the monorepo root, run `npm run compile` and `npm run site`, then open `/plugins/pdf/` or `/showcase/`. These demos generate real PDFs from editable DOM samples. The retained `/pro/` URL does not denote a paid product.
21
-
22
- Run `npm run test:pdf` for the PDF engine suites. See [verification notes](test/README.md).