@pygmalionjs/pygmalion 0.16.0 → 0.17.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 +34 -3
- package/dist-lib/{CameraLayer-BNw26sgR.js → CameraLayer-Clqgdcjb.js} +1 -1
- package/dist-lib/pygmalion.js +11341 -11100
- package/dist-lib/{runtime-Bo5tncK_.js → runtime-B8Qu1ung.js} +3 -2
- package/dist-lib/style.css +1 -1
- package/dist-lib/testing.js +2 -2
- package/dist-lib/types/document/exportSettings.d.ts +4 -1
- package/dist-lib/types/lib.d.ts +1 -0
- package/dist-lib/types/workspace/configuration.d.ts +3 -0
- package/dist-lib/types/workspace/edit/AssetsPanel.d.ts +3 -1
- package/dist-lib/types/workspace/edit/NodeExportPanel.d.ts +3 -1
- package/dist-lib/types/workspace/edit/TextStyleCatalog.d.ts +6 -0
- package/dist-lib/types/workspace/edit/rasterCanvas.d.ts +6 -0
- package/dist-lib/types/workspace/edit/rasterExport.d.ts +9 -1
- package/dist-lib/types/workspace/edit/staticTextRaster.d.ts +50 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -494,9 +494,40 @@ sample; the SDK does not guess that sample from a canonical placeholder.
|
|
|
494
494
|
|
|
495
495
|
The existing family/weight `TextFontLoader` API remains available. Browser
|
|
496
496
|
`document.fonts.check()` success alone does not establish an exact face or glyph
|
|
497
|
-
coverage. The preparation capability does not download fonts implicitly
|
|
498
|
-
text geometry
|
|
499
|
-
|
|
497
|
+
coverage. The preparation capability does not download fonts implicitly or change
|
|
498
|
+
text geometry. Dispose the runtime when its font environment is no longer used.
|
|
499
|
+
|
|
500
|
+
### Export authored text and inspect file styles
|
|
501
|
+
|
|
502
|
+
The browser `createDesignRasterRenderer({ textFontPreparation, resolvePreparedFace })`
|
|
503
|
+
factory reuses that explicit preparation runtime for a selected static text
|
|
504
|
+
layer. The face resolver maps the prepared environment and face identity to its
|
|
505
|
+
exact registered `FontFace` object. Missing, replaced or ambiguous registrations
|
|
506
|
+
are refused. Workspace connects `textFontPreparation` and
|
|
507
|
+
`textRasterFaceResolver` to its inspector and asset export controls. Text
|
|
508
|
+
requires a fixed positive box, one unwrapped paragraph, explicit family, size,
|
|
509
|
+
weight, line height and zero letter spacing, one solid color, and a registered
|
|
510
|
+
browser face matching the declared style and weight. The provider attests exact
|
|
511
|
+
face identity and sample coverage; browser fallback or synthesized styling is
|
|
512
|
+
not accepted as that evidence.
|
|
513
|
+
|
|
514
|
+
PNG, JPG and WebP retain the layer box and existing output size limits. Text
|
|
515
|
+
with mixed runs, automatic sizing, layout-dependent placement, source/bound
|
|
516
|
+
content, decorations, effects or unresolved colors is refused. SVG text and
|
|
517
|
+
frames containing text remain unsupported by the built-in exporter. The
|
|
518
|
+
existing `renderDesignRaster` geometry renderer remains available without a
|
|
519
|
+
font provider. Raster success never enables a source writer.
|
|
520
|
+
|
|
521
|
+
`exportDesignNode` accepts an optional fifth `{ signal }` argument. Workspace
|
|
522
|
+
cancels pending output when the layer, document, target, page or mode changes,
|
|
523
|
+
including a rapid departure and return before a render. Export never adds a
|
|
524
|
+
history entry or applies implementation source.
|
|
525
|
+
|
|
526
|
+
With no layer selected, the properties sidebar lists the file's authored text
|
|
527
|
+
styles, grouped by their slash-separated names. Expanding a style displays its
|
|
528
|
+
stored typography and library origin. This metadata browser neither discovers
|
|
529
|
+
installed fonts nor downloads faces; selecting a layer retains the existing
|
|
530
|
+
style application and editing controls.
|
|
500
531
|
|
|
501
532
|
## Local development
|
|
502
533
|
|
|
@@ -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-B8Qu1ung.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})`;
|