@openpresentation/opf-render 0.25.0 → 0.26.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/README.md +14 -16
- package/dist/index.d.ts +2 -1
- package/dist/preview-fonts-cli.js +0 -0
- package/dist/svg.d.ts +2 -1
- package/dist/svg.js +2 -1
- package/package.json +62 -62
package/README.md
CHANGED
|
@@ -186,7 +186,7 @@ Installed size, measured on Windows with `npm install --ignore-scripts`, unpacke
|
|
|
186
186
|
## Scope
|
|
187
187
|
|
|
188
188
|
- Package: `@openpresentation/opf-render`
|
|
189
|
-
- Repository: `OpenPresentation/opf
|
|
189
|
+
- Repository: `OpenPresentation/opf` (`packages/render`)
|
|
190
190
|
- License: MIT
|
|
191
191
|
- Compatibility target: `@openpresentation/opf`
|
|
192
192
|
- Entry points: root, `/svg`, `/png`, `/pdf`, `/export-browser`, `/fonts-node`, `/fonts-browser`, `/fonts`, `/player`, `/element`, `/element/define`, `/preview-fonts`, `/preview-fonts-node` (see [Install](#install-what-to-add-for-what-rr-63))
|
|
@@ -647,35 +647,33 @@ The report (JSON with the per-job records and memory series) and a Markdown summ
|
|
|
647
647
|
npm ci
|
|
648
648
|
npm install --no-save @openpresentation/opf-pptx@0.18.0 # optional: without it the PPTX leg is skipped
|
|
649
649
|
npm run build
|
|
650
|
-
|
|
651
|
-
|
|
650
|
+
pnpm run bench:soak --link-renderer # 500 jobs per worker at concurrency 1 and 4 (about 35 minutes)
|
|
651
|
+
pnpm run bench:soak --iterations 20 --concurrency 1,2 --decks 6 --script-every 0 # smoke run
|
|
652
652
|
```
|
|
653
653
|
|
|
654
654
|
## Development
|
|
655
655
|
|
|
656
656
|
```sh
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
657
|
+
pnpm install # at the repository root: one lockfile for every package
|
|
658
|
+
cd packages/render
|
|
659
|
+
pnpm run build:deps # core and the gallery, which the tests import through the workspace
|
|
660
|
+
pnpm run build
|
|
661
|
+
pnpm run typecheck
|
|
662
|
+
pnpm run validate
|
|
663
|
+
pnpm test
|
|
662
664
|
```
|
|
663
665
|
|
|
664
|
-
The accepted-text regression `
|
|
666
|
+
The accepted-text regression `pnpm run test:text` checks 24 combinations of dimensions, alignment, cards and formatting, including exact accepted positions/styles and strict overflow. `pnpm run test:rich-spacing-browser <new-output-directory>` compares two unchanged gallery slides with identical open font bytes. `pnpm run test:text-browser <new-output-directory>` also checks actual text paint: it currently exits 1 for four portrait/right title cases with one painted pixel beyond the 0.1-pixel cell tolerance in the recorded Windows Edge environment. Its advance/origin checks pass. Font text rectangles, painted-pixel containment, source whitespace and native fidelity are separate results; that historical plain fitting normalized whitespace. Later source-whitespace evidence below supersedes that behavior and has its own reviewed corpus checkpoint.
|
|
665
667
|
|
|
666
|
-
|
|
668
|
+
`pnpm test` also renders every `examples/**/*.opf.json` deck twice and asserts byte-identical SVG output. Golden PNG drift is checked on every run against all 805 slides from the installed core package, identified by a content digest. Changed or missing corpora fail; Git history cannot skip the gate. To generate a review candidate after an intentional visual change:
|
|
667
669
|
|
|
668
670
|
```sh
|
|
669
|
-
|
|
671
|
+
pnpm run golden:update
|
|
670
672
|
```
|
|
671
673
|
|
|
672
674
|
## Release Lane
|
|
673
675
|
|
|
674
|
-
Public npm package publication is handled by
|
|
675
|
-
|
|
676
|
-
1. Open a release-prep PR containing only the version bump, `CHANGELOG.md` (assembled from `changes/` with `node scripts/changelog-fragments.mjs assemble --version X.Y.Z`), dependency ranges, lockfile and current-instruction docs. Publish in dependency order (core, then renderer and PPTX, then editor): refresh this repo's lockfile only after the required `@openpresentation/opf` version is on the registry (`npm install --package-lock-only`), then run `npm run test:packed` against it.
|
|
677
|
-
2. Merge after CI is green, then publish by pushing the git tag `opf-render-v<version>` (or `@openpresentation/opf-render@v<version>`) at the merge commit. The workflow verifies that the tag matches `package.json`, that the push-to-`main` run of `ci.yml` on exactly the tagged commit succeeded (`scripts/ci-evidence.mjs`; it fails closed and re-runs no test, RR-100), and the artifact itself (audit, the packed install, `npm pack --dry-run`) before `npm publish --access public --provenance`. A tag pushed while CI still runs fails at the evidence step; re-run the failed job once CI is green. A manual `workflow_dispatch` runs the same job without the tag check and is a fallback only.
|
|
678
|
-
3. Verify with `npm view @openpresentation/opf-render@<version> version gitHead dist.attestations` and, from the core repo, `node scripts/test-renderer-publication.mjs <version> <release-commit> <this-checkout>`. Never republish an existing version.
|
|
676
|
+
Public npm package publication is handled by the repository's one `npm-publish.yml` through npm Trusted Publishing (GitHub Actions OIDC) with npm provenance; no npm token is stored. All six packages (core, CLI, gallery, this renderer, opf-pptx and opf-editor) share one version and are released together: see [docs/release-process.md](../../docs/release-process.md) at the repository root. The owner authorized agents to prepare and publish npm releases whenever a release is required (2026-09-29). This authorization does not waive any gate. Fragments for this package are `changes/<slug>.md` files at the repository root with `packages: [render]`. Never republish an existing version.
|
|
679
677
|
|
|
680
678
|
## Shared dynamic composition (local development)
|
|
681
679
|
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,8 @@ import type { SlideComposition, LayoutDiagnostic, TextMeasurement } from "@openp
|
|
|
5
5
|
export declare const packageName = "@openpresentation/opf-render";
|
|
6
6
|
|
|
7
7
|
export declare const releaseLane: Readonly<{
|
|
8
|
-
githubRepository: "OpenPresentation/opf
|
|
8
|
+
githubRepository: "OpenPresentation/opf";
|
|
9
|
+
directory: "packages/render";
|
|
9
10
|
npmPackage: "@openpresentation/opf-render";
|
|
10
11
|
compatibilityPackage: "@openpresentation/opf";
|
|
11
12
|
}>;
|
|
File without changes
|
package/dist/svg.d.ts
CHANGED
|
@@ -5,7 +5,8 @@ import type { SlideComposition, LayoutDiagnostic, TextMeasurement } from "@openp
|
|
|
5
5
|
export declare const packageName = "@openpresentation/opf-render";
|
|
6
6
|
|
|
7
7
|
export declare const releaseLane: Readonly<{
|
|
8
|
-
githubRepository: "OpenPresentation/opf
|
|
8
|
+
githubRepository: "OpenPresentation/opf";
|
|
9
|
+
directory: "packages/render";
|
|
9
10
|
npmPackage: "@openpresentation/opf-render";
|
|
10
11
|
compatibilityPackage: "@openpresentation/opf";
|
|
11
12
|
}>;
|
package/dist/svg.js
CHANGED
|
@@ -30,7 +30,8 @@ import { rejectRenamedOptions, selectSlides } from "./slide-sources.js";
|
|
|
30
30
|
export const packageName = "@openpresentation/opf-render";
|
|
31
31
|
|
|
32
32
|
export const releaseLane = Object.freeze({
|
|
33
|
-
githubRepository: "OpenPresentation/opf
|
|
33
|
+
githubRepository: "OpenPresentation/opf",
|
|
34
|
+
directory: "packages/render",
|
|
34
35
|
npmPackage: "@openpresentation/opf-render",
|
|
35
36
|
compatibilityPackage: "@openpresentation/opf"
|
|
36
37
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openpresentation/opf-render",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "Deterministic local OPF renderer for SVG, PNG, and PDF output.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -10,12 +10,13 @@
|
|
|
10
10
|
},
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
|
-
"url": "git+https://github.com/OpenPresentation/opf
|
|
13
|
+
"url": "git+https://github.com/OpenPresentation/opf.git",
|
|
14
|
+
"directory": "packages/render"
|
|
14
15
|
},
|
|
15
16
|
"bugs": {
|
|
16
|
-
"url": "https://github.com/OpenPresentation/opf
|
|
17
|
+
"url": "https://github.com/OpenPresentation/opf/issues"
|
|
17
18
|
},
|
|
18
|
-
"homepage": "https://github.com/OpenPresentation/opf
|
|
19
|
+
"homepage": "https://github.com/OpenPresentation/opf/tree/main/packages/render#readme",
|
|
19
20
|
"publishConfig": {
|
|
20
21
|
"access": "public"
|
|
21
22
|
},
|
|
@@ -88,65 +89,12 @@
|
|
|
88
89
|
"sideEffects": [
|
|
89
90
|
"./dist/element-define.js"
|
|
90
91
|
],
|
|
91
|
-
"scripts": {
|
|
92
|
-
"build": "node scripts/build.mjs",
|
|
93
|
-
"typecheck": "node scripts/check-syntax.mjs src test scripts",
|
|
94
|
-
"validate": "node scripts/validate-package.mjs",
|
|
95
|
-
"test": "npm run build && npm run check:fonts && node scripts/run-tests.mjs && npm run build:browser-check && npm run check:runners && npm run check:changes",
|
|
96
|
-
"test:contract": "npm run build && npm run check:fonts && node scripts/run-tests.mjs --suite contract && npm run build:browser-check",
|
|
97
|
-
"check:runners": "node --test scripts/run-tests.test.mjs",
|
|
98
|
-
"check:changes": "node --test scripts/changelog-fragments.test.mjs && node scripts/changelog-fragments.mjs check",
|
|
99
|
-
"check:fonts": "node test/font-licenses.mjs && npm run check:font-hotlinks",
|
|
100
|
-
"check:font-hotlinks": "node --test scripts/check-font-hotlinks.test.mjs && node scripts/check-font-hotlinks.mjs",
|
|
101
|
-
"test:golden": "npm run build && node test/golden.mjs",
|
|
102
|
-
"test:packed": "node test/packed-install.mjs",
|
|
103
|
-
"test:next-bundle": "node scripts/check-next-bundle.mjs",
|
|
104
|
-
"test:browser": "npm run build:browser-check && node test/browser-check.mjs && node test/rich-tab-browser.mjs && node test/rich-tab-estimated-browser.mjs",
|
|
105
|
-
"golden:update": "npm run build && node test/golden.mjs --update",
|
|
106
|
-
"golden:promote": "node scripts/golden-promote.mjs",
|
|
107
|
-
"bench:soak": "node scripts/soak.mjs",
|
|
108
|
-
"prepack": "npm run build",
|
|
109
|
-
"build:browser-check": "node scripts/build-browser-check.mjs",
|
|
110
|
-
"test:styled-table": "node test/styled-table.mjs",
|
|
111
|
-
"test:pdf-vector": "node test/pdf-vector.mjs && node test/pdf-vector-visual.mjs",
|
|
112
|
-
"test:export-browser": "node test/export-browser.mjs artifacts/export-browser",
|
|
113
|
-
"report:pdf-vector": "node test/pdf-vector-visual.mjs --all --report artifacts/pdf-vector-visual.json",
|
|
114
|
-
"test:code": "node test/shared-code.mjs",
|
|
115
|
-
"test:code-browser": "node test/shared-code-browser.mjs",
|
|
116
|
-
"test:metric": "node test/shared-metric.mjs",
|
|
117
|
-
"test:images-browser": "node test/image-placeholders-browser.mjs",
|
|
118
|
-
"test:font-preparation": "node test/font-preparation.mjs artifacts/font-preparation.json",
|
|
119
|
-
"test:font-preparation-browser": "node test/font-preparation-browser.mjs artifacts/font-preparation-browser.json",
|
|
120
|
-
"test:font-variants": "node test/font-variants.mjs",
|
|
121
|
-
"test:font-variants-browser": "node test/font-variants-browser.mjs",
|
|
122
|
-
"test:variable-font-gate": "node test/platform-residual-probe.mjs ../archive/test/fixtures/font-formats artifacts/variable-font-gate/live.json && node test/variable-font-retained-gate.mjs ../archive/docs/evidence/rejected-truetype-rounding-20260915 artifacts/variable-font-gate/retained.json",
|
|
123
|
-
"test:aptos-preview-browser": "node test/aptos-preview-browser.mjs artifacts/aptos-preview-browser.json",
|
|
124
|
-
"test:lazy-face-fallback-browser": "node test/lazy-face-fallback-browser.mjs artifacts/lazy-face-fallback",
|
|
125
|
-
"test:lazy-fonts-browser": "node test/lazy-fonts-browser.mjs artifacts/lazy-fonts",
|
|
126
|
-
"test:latin-family-hosts-browser": "node test/latin-family-hosts-browser.mjs artifacts/latin-family-hosts",
|
|
127
|
-
"test:script-family-hosts-browser": "node test/script-family-hosts-browser.mjs artifacts/script-family-hosts",
|
|
128
|
-
"test:extra-lazy-fonts-browser": "node test/extra-lazy-fonts-browser.mjs artifacts/extra-lazy-fonts",
|
|
129
|
-
"test:script-fonts-browser": "node test/script-fonts-browser.mjs artifacts/script-fonts-browser.json",
|
|
130
|
-
"test:script-corpora-browser": "node test/script-corpora-browser.mjs artifacts/script-corpora-browser.json && node test/script-corpora-slides-browser.mjs artifacts/script-corpora-slides-browser.json",
|
|
131
|
-
"test:script-fonts-auto-browser": "node test/script-fonts-auto-browser.mjs artifacts/script-fonts-auto",
|
|
132
|
-
"test:symbol-fonts-browser": "node test/symbol-fonts-browser.mjs artifacts/symbol-fonts-browser.json",
|
|
133
|
-
"test:text": "node test/font-outlines.mjs && node test/accepted-text.mjs",
|
|
134
|
-
"test:text-browser": "node test/accepted-text-browser.mjs",
|
|
135
|
-
"test:rich-spacing-browser": "node test/rich-spacing-browser.mjs",
|
|
136
|
-
"test:rich-flow-browser": "node test/rich-flow-browser.mjs",
|
|
137
|
-
"test:plain-whitespace-browser": "node test/plain-whitespace-browser.mjs",
|
|
138
|
-
"test:emoji-math-browser": "node test/emoji-math-browser.mjs artifacts/emoji-math-browser.json",
|
|
139
|
-
"test:player": "node test/player-unit.mjs",
|
|
140
|
-
"test:player-browser": "node test/player-browser.mjs artifacts/player",
|
|
141
|
-
"test:preview-a11y-browser": "node test/preview-a11y-browser.mjs",
|
|
142
|
-
"test:forced-colors-browser": "node test/forced-colors-browser.mjs artifacts/forced-colors"
|
|
143
|
-
},
|
|
144
92
|
"dependencies": {
|
|
145
|
-
"@openpresentation/opf": "^0.25.0",
|
|
146
93
|
"bidi-js": "1.1.0",
|
|
147
94
|
"fontkit": "^2.0.4",
|
|
148
95
|
"harfbuzzjs": "1.6.3",
|
|
149
|
-
"pako": "3.0.2"
|
|
96
|
+
"pako": "3.0.2",
|
|
97
|
+
"@openpresentation/opf": "^0.26.0"
|
|
150
98
|
},
|
|
151
99
|
"peerDependencies": {
|
|
152
100
|
"@expo-google-fonts/arimo": "0.4.3",
|
|
@@ -341,7 +289,6 @@
|
|
|
341
289
|
}
|
|
342
290
|
},
|
|
343
291
|
"devDependencies": {
|
|
344
|
-
"@openpresentation/gallery": "^5.0.0",
|
|
345
292
|
"@expo-google-fonts/arimo": "0.4.3",
|
|
346
293
|
"@expo-google-fonts/caladea": "0.4.2",
|
|
347
294
|
"@expo-google-fonts/cousine": "0.4.3",
|
|
@@ -395,9 +342,62 @@
|
|
|
395
342
|
"pdf-lib": "1.17.1",
|
|
396
343
|
"pdfjs-dist": "6.4.299",
|
|
397
344
|
"playwright": "1.64.0",
|
|
398
|
-
"sharp": "0.35.5"
|
|
345
|
+
"sharp": "0.35.5",
|
|
346
|
+
"@openpresentation/gallery": "0.26.0"
|
|
399
347
|
},
|
|
400
348
|
"bin": {
|
|
401
349
|
"opf-preview-fonts": "./dist/preview-fonts-cli.js"
|
|
402
|
-
}
|
|
350
|
+
},
|
|
351
|
+
"scripts": {
|
|
352
|
+
"build": "node scripts/build.mjs",
|
|
353
|
+
"build:deps": "pnpm --filter \"@openpresentation/opf-render^...\" --fail-if-no-match run build",
|
|
354
|
+
"typecheck": "node scripts/check-syntax.mjs src test scripts",
|
|
355
|
+
"validate": "node scripts/validate-package.mjs",
|
|
356
|
+
"test": "pnpm run build:deps && pnpm run build && pnpm run check:fonts && node ../../scripts/run-tests.mjs && pnpm run build:browser-check && pnpm run check:scripts",
|
|
357
|
+
"test:contract": "pnpm run build:deps && pnpm run build && pnpm run check:fonts && node ../../scripts/run-tests.mjs --suite contract && pnpm run build:browser-check",
|
|
358
|
+
"check:fonts": "node test/font-licenses.mjs",
|
|
359
|
+
"check:scripts": "node --test scripts/check-syntax.test.mjs",
|
|
360
|
+
"test:golden": "pnpm run build:deps && pnpm run build && node test/golden.mjs",
|
|
361
|
+
"test:packed": "node test/packed-install.mjs",
|
|
362
|
+
"test:next-bundle": "node scripts/check-next-bundle.mjs",
|
|
363
|
+
"test:browser": "pnpm run build:browser-check && node test/browser-check.mjs && node test/rich-tab-browser.mjs && node test/rich-tab-estimated-browser.mjs",
|
|
364
|
+
"golden:update": "pnpm run build:deps && pnpm run build && node test/golden.mjs --update",
|
|
365
|
+
"golden:promote": "node scripts/golden-promote.mjs",
|
|
366
|
+
"bench:soak": "node scripts/soak.mjs",
|
|
367
|
+
"build:browser-check": "node scripts/build-browser-check.mjs",
|
|
368
|
+
"test:styled-table": "node test/styled-table.mjs",
|
|
369
|
+
"test:pdf-vector": "node test/pdf-vector.mjs && node test/pdf-vector-visual.mjs",
|
|
370
|
+
"test:export-browser": "node test/export-browser.mjs artifacts/export-browser",
|
|
371
|
+
"report:pdf-vector": "node test/pdf-vector-visual.mjs --all --report artifacts/pdf-vector-visual.json",
|
|
372
|
+
"test:code": "node test/shared-code.mjs",
|
|
373
|
+
"test:code-browser": "node test/shared-code-browser.mjs",
|
|
374
|
+
"test:metric": "node test/shared-metric.mjs",
|
|
375
|
+
"test:images-browser": "node test/image-placeholders-browser.mjs",
|
|
376
|
+
"test:font-preparation": "node test/font-preparation.mjs artifacts/font-preparation.json",
|
|
377
|
+
"test:font-preparation-browser": "node test/font-preparation-browser.mjs artifacts/font-preparation-browser.json",
|
|
378
|
+
"test:font-variants": "node test/font-variants.mjs",
|
|
379
|
+
"test:font-variants-browser": "node test/font-variants-browser.mjs",
|
|
380
|
+
"test:variable-font-gate": "node scripts/fetch-archive-fixtures.mjs && node test/platform-residual-probe.mjs ../../artifacts/render-archive/test/fixtures/font-formats artifacts/variable-font-gate/live.json && node test/variable-font-retained-gate.mjs ../../artifacts/render-archive/docs/evidence/rejected-truetype-rounding-20260915 artifacts/variable-font-gate/retained.json",
|
|
381
|
+
"test:aptos-preview-browser": "node test/aptos-preview-browser.mjs artifacts/aptos-preview-browser.json",
|
|
382
|
+
"test:lazy-face-fallback-browser": "node test/lazy-face-fallback-browser.mjs artifacts/lazy-face-fallback",
|
|
383
|
+
"test:lazy-fonts-browser": "node test/lazy-fonts-browser.mjs artifacts/lazy-fonts",
|
|
384
|
+
"test:latin-family-hosts-browser": "node test/latin-family-hosts-browser.mjs artifacts/latin-family-hosts",
|
|
385
|
+
"test:script-family-hosts-browser": "node test/script-family-hosts-browser.mjs artifacts/script-family-hosts",
|
|
386
|
+
"test:extra-lazy-fonts-browser": "node test/extra-lazy-fonts-browser.mjs artifacts/extra-lazy-fonts",
|
|
387
|
+
"test:script-fonts-browser": "node test/script-fonts-browser.mjs artifacts/script-fonts-browser.json",
|
|
388
|
+
"test:script-corpora-browser": "node test/script-corpora-browser.mjs artifacts/script-corpora-browser.json && node test/script-corpora-slides-browser.mjs artifacts/script-corpora-slides-browser.json",
|
|
389
|
+
"test:script-fonts-auto-browser": "node test/script-fonts-auto-browser.mjs artifacts/script-fonts-auto",
|
|
390
|
+
"test:symbol-fonts-browser": "node test/symbol-fonts-browser.mjs artifacts/symbol-fonts-browser.json",
|
|
391
|
+
"test:text": "node test/font-outlines.mjs && node test/accepted-text.mjs",
|
|
392
|
+
"test:text-browser": "node test/accepted-text-browser.mjs",
|
|
393
|
+
"test:rich-spacing-browser": "node test/rich-spacing-browser.mjs",
|
|
394
|
+
"test:rich-flow-browser": "node test/rich-flow-browser.mjs",
|
|
395
|
+
"test:plain-whitespace-browser": "node test/plain-whitespace-browser.mjs",
|
|
396
|
+
"test:emoji-math-browser": "node test/emoji-math-browser.mjs artifacts/emoji-math-browser.json",
|
|
397
|
+
"test:player": "node test/player-unit.mjs",
|
|
398
|
+
"test:player-browser": "node test/player-browser.mjs artifacts/player",
|
|
399
|
+
"test:preview-a11y-browser": "node test/preview-a11y-browser.mjs",
|
|
400
|
+
"test:forced-colors-browser": "node test/forced-colors-browser.mjs artifacts/forced-colors"
|
|
401
|
+
},
|
|
402
|
+
"gitHead": "ae4ddd76e40b5778c1fdc255e4e3b24334748d7e"
|
|
403
403
|
}
|