@pygmalionjs/pygmalion 0.15.0 → 0.16.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 +22 -0
- package/dist-lib/{CameraLayer-CWrlA9D-.js → CameraLayer-BNw26sgR.js} +1 -1
- package/dist-lib/pygmalion.js +11139 -10957
- package/dist-lib/{runtime-7no5RTHJ.js → runtime-Bo5tncK_.js} +3 -2
- package/dist-lib/testing.js +2 -2
- package/dist-lib/types/document/richText.d.ts +10 -0
- package/dist-lib/types/document/textFontPreparation.d.ts +36 -0
- package/dist-lib/types/lib.d.ts +8 -1
- package/dist-lib/types/workspace/configuration.d.ts +3 -0
- package/dist-lib/types/workspace/edit/TextEditor.d.ts +7 -1
- package/dist-lib/types/workspace/edit/textFontOccurrences.d.ts +34 -0
- package/dist-lib/types/workspace/edit/textFontRuntime.d.ts +15 -0
- package/dist-lib/types/workspace/edit/useTextFontPreparation.d.ts +12 -0
- package/dist-lib/types/workspace/view/prototypeMotionInterruption.d.ts +13 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -476,6 +476,28 @@ Process-group cleanup supports macOS and Linux. Catalog generation callbacks
|
|
|
476
476
|
receive an isolated archive for the exact requested commit; cancelling one
|
|
477
477
|
catalog request does not cancel generation shared with another caller.
|
|
478
478
|
|
|
479
|
+
### Prepare declared text faces
|
|
480
|
+
|
|
481
|
+
An optional `WorkspaceTargetConfiguration.textFontPreparation` capability can
|
|
482
|
+
prepare fonts for the visible page and selected text layer. Create it with
|
|
483
|
+
`createTextFontPreparationRuntime(resolver)` and reuse it for the lifetime of
|
|
484
|
+
the declared font environment. The resolver receives the original family
|
|
485
|
+
expression, numeric weight, normal/italic style, exact text sample and an abort
|
|
486
|
+
signal. A ready result identifies the actual face and attests to that sample's
|
|
487
|
+
coverage; otherwise it returns a named unavailable or failed result.
|
|
488
|
+
|
|
489
|
+
The SDK shares identical pending requests, cancels abandoned readers, caches
|
|
490
|
+
successful results and offers retry without editing the document. Page changes
|
|
491
|
+
exclude hidden pages, and resolved component overrides retain their own font
|
|
492
|
+
requirements. Connected or source-rendered text needs an explicit rendered
|
|
493
|
+
sample; the SDK does not guess that sample from a canonical placeholder.
|
|
494
|
+
|
|
495
|
+
The existing family/weight `TextFontLoader` API remains available. Browser
|
|
496
|
+
`document.fonts.check()` success alone does not establish an exact face or glyph
|
|
497
|
+
coverage. The preparation capability does not download fonts implicitly, change
|
|
498
|
+
text geometry, or enable text raster/SVG output; those output boundaries remain
|
|
499
|
+
explicit. Dispose the runtime when its font environment is no longer used.
|
|
500
|
+
|
|
479
501
|
## Local development
|
|
480
502
|
|
|
481
503
|
```bash
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
-
import { n as C, R as g, aM as P, ck as R, cl as k, Y as E, cm as I, a7 as m, a4 as b } from "./runtime-
|
|
2
|
+
import { n as C, R as g, aM as P, ck as R, cl as k, Y as E, cm as I, a7 as m, a4 as b } from "./runtime-Bo5tncK_.js";
|
|
3
3
|
import { useRef as L, useLayoutEffect as h } from "react";
|
|
4
4
|
function v(n) {
|
|
5
5
|
return `translate(${n.panX}px, ${n.panY}px) scale(${n.zoom})`;
|