@glissade/backend-dom 0.22.0-pre.2 → 0.22.0-pre.4

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 (2) hide show
  1. package/README.md +12 -5
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -110,15 +110,22 @@ base bundle is absent or a different version (never a cryptic `undefined`).
110
110
 
111
111
  - **Text line-breaking** is the browser's layout engine, **not** the canvas/Skia
112
112
  rasterizer — so line breaks can differ from `gs render`. Intended.
113
- - **`measureText`** measures via a hidden DOM element (so it matches what this
114
- backend draws). With no layout engine (e.g. jsdom) it falls back to an estimate
115
- and warns once.
113
+ - **Text line-breaking** uses the browser's layout engine, so it can differ from
114
+ the canvas/Skia rasterizer; the measuring span is mounted in the live document
115
+ so wrapping reflects the real font (a detached host would measure 0).
116
+ - **`measureText`** measures `width` via a hidden DOM element (matching what this
117
+ backend draws). `ascent`/`descent` are **estimates** (`0.8`/`0.2 × fontSize`),
118
+ not real font metrics — fine for layout composition, not for exact vertical
119
+ metrics. With no layout engine (e.g. jsdom) `width` also falls back to an
120
+ estimate and warns once.
116
121
  - **Mesh paints, gaussian/smooth gradient interpolation, and exact blend
117
122
  isolation** have no CSS/SVG analogue — they **degrade to a best-effort solid /
118
123
  linear** and the element is stamped **`data-approx="true"`** so an editor can
119
124
  badge it. Shader (`pushGroup.shader`) passes are ignored (`caps.shaders=false`).
120
- - **`readPixels()` throws** — there is no pixel buffer; use canvas2d/skia for
121
- readback.
125
+ - **`readPixels()` rejects** (it is `async` — there is no pixel buffer). It
126
+ returns a `Promise` per the `RenderBackend` contract, so **`await` it or use
127
+ `.catch()`** — a bare synchronous `try/catch` will not see the rejection. Use
128
+ canvas2d/skia for real pixel readback.
122
129
 
123
130
  The backend only ever manages its **own root** subtree — your overlay/foreign DOM
124
131
  in the host element is left untouched.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissade/backend-dom",
3
- "version": "0.22.0-pre.2",
3
+ "version": "0.22.0-pre.4",
4
4
  "description": "glissade DOM render backend: DisplayList -> HTML/SVG elements. A preview / non-parity realtime tier (accessibility, selectable text, CSS-native embedding) — NOT a Skia-export twin.",
5
5
  "license": "Apache-2.0",
6
6
  "engines": {
@@ -18,8 +18,8 @@
18
18
  "dist"
19
19
  ],
20
20
  "dependencies": {
21
- "@glissade/core": "0.22.0-pre.2",
22
- "@glissade/scene": "0.22.0-pre.2"
21
+ "@glissade/core": "0.22.0-pre.4",
22
+ "@glissade/scene": "0.22.0-pre.4"
23
23
  },
24
24
  "repository": {
25
25
  "type": "git",