@paged-media/canvas-wasm 0.39.0 → 0.40.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/package.json +1 -1
- package/paged_canvas_wasm.d.ts +29 -1
- package/paged_canvas_wasm.js +2 -2
- package/paged_canvas_wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/paged_canvas_wasm.d.ts
CHANGED
|
@@ -43,6 +43,34 @@ export interface SceneLayer {
|
|
|
43
43
|
items: SceneItem[];
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
/**
|
|
47
|
+
* A single-line text run in frame-content coordinates (C-1.1).
|
|
48
|
+
*/
|
|
49
|
+
export interface SceneTextItem {
|
|
50
|
+
/**
|
|
51
|
+
* Baseline origin x in frame-content points.
|
|
52
|
+
*/
|
|
53
|
+
x: number;
|
|
54
|
+
/**
|
|
55
|
+
* Baseline origin y in frame-content points (the text baseline).
|
|
56
|
+
*/
|
|
57
|
+
y: number;
|
|
58
|
+
/**
|
|
59
|
+
* The run\'s text (single line — newlines are not laid out).
|
|
60
|
+
*/
|
|
61
|
+
text: string;
|
|
62
|
+
/**
|
|
63
|
+
* Point size.
|
|
64
|
+
*/
|
|
65
|
+
size: number;
|
|
66
|
+
paint: ScenePaint;
|
|
67
|
+
/**
|
|
68
|
+
* Reserved face hints (v1 renders in the document default font).
|
|
69
|
+
*/
|
|
70
|
+
family?: string;
|
|
71
|
+
style?: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
46
74
|
/**
|
|
47
75
|
* A solid paint in **sRGB** (0..=1 per channel; alpha is linear). Core
|
|
48
76
|
* converts to the display list\'s linear-light [`Color`] so plugin
|
|
@@ -557,7 +585,7 @@ export interface SnapLine {
|
|
|
557
585
|
/**
|
|
558
586
|
* One drawable in a [`SceneLayer`]. Coordinates are frame-content points.
|
|
559
587
|
*/
|
|
560
|
-
export type SceneItem = { kind: "fillPath"; path: ScenePathSeg[]; paint: ScenePaint } | { kind: "strokePath"; path: ScenePathSeg[]; paint: ScenePaint; width: number };
|
|
588
|
+
export type SceneItem = { kind: "fillPath"; path: ScenePathSeg[]; paint: ScenePaint } | { kind: "strokePath"; path: ScenePathSeg[]; paint: ScenePaint; width: number } | ({ kind: "text" } & SceneTextItem);
|
|
561
589
|
|
|
562
590
|
/**
|
|
563
591
|
* One entry in the field diff: a field whose resolved text
|
package/paged_canvas_wasm.js
CHANGED
|
@@ -1480,12 +1480,12 @@ function __wbg_get_imports() {
|
|
|
1480
1480
|
arg0.writeTexture(arg1, getArrayU8FromWasm0(arg2, arg3), arg4, arg5);
|
|
1481
1481
|
}, arguments); },
|
|
1482
1482
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
1483
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1483
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 3420, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1484
1484
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h84d34b615e684f5e);
|
|
1485
1485
|
return ret;
|
|
1486
1486
|
},
|
|
1487
1487
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
1488
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1488
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 4880, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1489
1489
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hba9dab33e391dce8);
|
|
1490
1490
|
return ret;
|
|
1491
1491
|
},
|
|
Binary file
|