@zumer/snapdom 3.0.0 → 3.0.1-dev.1
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/README.md +3 -2
- package/dist/snapdom.js +10 -10
- package/dist/snapdom.mjs +10 -10
- package/package.json +7 -5
- package/types/snapdom.d.ts +11 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zumer/snapdom",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1-dev.1",
|
|
4
4
|
"description": "Browser capture engine for web interfaces. Reusable images and canvas, with plugins for HTML, context, PDF and recordings.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/snapdom.js",
|
|
@@ -39,10 +39,11 @@
|
|
|
39
39
|
"test:firefox": "BROWSER=firefox npx vitest run --browser.headless --reporter=verbose",
|
|
40
40
|
"test:webkit": "BROWSER=webkit npx vitest run --browser.headless --reporter=verbose",
|
|
41
41
|
"test:full": "npm run lint && npm run test:types && npm run test:release-checks && npm run test:bundle && BROWSER=all npx vitest run --browser.headless --reporter=dot",
|
|
42
|
-
"test:release-checks": "node --test scripts/release-checks.node.mjs",
|
|
42
|
+
"test:release-checks": "node --test scripts/release-checks.node.mjs scripts/benchmark-statistics.node.mjs",
|
|
43
43
|
"report:cross": "node scripts/cross-report.mjs",
|
|
44
44
|
"test:coverage": "npx vitest run --browser.headless --coverage",
|
|
45
|
-
"test:benchmark": "
|
|
45
|
+
"test:benchmark": "node scripts/benchmark-stable.mjs",
|
|
46
|
+
"test:benchmark:legacy": "npx vitest bench --browser.headless --watch=false",
|
|
46
47
|
"bench:realpage": "node scripts/realpage-bench.mjs",
|
|
47
48
|
"test:pack": "node scripts/check-pack.mjs",
|
|
48
49
|
"site": "npm run compile && node scripts/serve-site.mjs",
|
|
@@ -50,9 +51,10 @@
|
|
|
50
51
|
"bump": "npx @zumerbox/bump && npx @zumerbox/changelog",
|
|
51
52
|
"prepack": "npm run compile",
|
|
52
53
|
"build": "npm pack",
|
|
53
|
-
"release": "REQUIRE_VISUAL=1 npm run test:full && npm run test:pack && npm run build && echo \"\\n→ Review CHANGELOG.md, then: npm run release:push\"",
|
|
54
|
+
"release": "REQUIRE_VISUAL=1 npm run test:full && npm run test:pack && npm run test:benchmark && npm run build && echo \"\\n→ Review CHANGELOG.md, then: npm run release:push\"",
|
|
54
55
|
"release:push": "git add CHANGELOG.md && git commit -m \"Bumped version\" && git push --follow-tags",
|
|
55
|
-
"publish:beta": "npm publish --tag beta"
|
|
56
|
+
"publish:beta": "npm publish --tag beta",
|
|
57
|
+
"publish:dev": "node scripts/publish-dev.mjs"
|
|
56
58
|
},
|
|
57
59
|
"repository": {
|
|
58
60
|
"type": "git",
|
package/types/snapdom.d.ts
CHANGED
|
@@ -152,6 +152,16 @@ export interface SnapdomOptions {
|
|
|
152
152
|
*/
|
|
153
153
|
reconcile?: boolean;
|
|
154
154
|
|
|
155
|
+
/**
|
|
156
|
+
* Whether a long capture may yield to the page. `true` (default) clones in one task, the
|
|
157
|
+
* fastest total. `false` hands the event loop a turn about every frame, so the page keeps
|
|
158
|
+
* painting and taking input while it captures. `'auto'` (experimental, may change) does the
|
|
159
|
+
* same only once a capture runs past 40 ms. When the captured element changes while a capture yields, the clone is
|
|
160
|
+
* redone in one task; a capture that is never memoized (frame-driven trees, function-valued
|
|
161
|
+
* callbacks, captureSelection) keeps what it read.
|
|
162
|
+
*/
|
|
163
|
+
fast?: boolean | "auto";
|
|
164
|
+
|
|
155
165
|
/**
|
|
156
166
|
* Forces one fresh capture that is not served from the existing memo, and clears style
|
|
157
167
|
* snapshots after application changes for which the browser exposes no signal, notably
|
|
@@ -342,6 +352,7 @@ export interface CaptureContext extends Omit<SnapdomOptions, "exclude" | "filter
|
|
|
342
352
|
classCSS: string;
|
|
343
353
|
fontsCSS: string;
|
|
344
354
|
baseCSS: string;
|
|
355
|
+
/** Author rules for UA parts the clone cannot read: scrollbars, meter, progress, slider. */
|
|
345
356
|
scrollbarCSS: string;
|
|
346
357
|
} | null;
|
|
347
358
|
|