@gjsify/dom-elements 0.61.0 → 0.63.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/lib/types/html-canvas-element.d.ts +13 -1
- package/package.json +11 -11
|
@@ -1,4 +1,15 @@
|
|
|
1
|
+
import type { Event } from '@gjsify/dom-events';
|
|
1
2
|
import { HTMLElement } from './html-element.js';
|
|
3
|
+
/** The `Blob` slice `toBlob` hands out; `lib.dom` is absent from a GJS program. */
|
|
4
|
+
export interface CanvasBlob {
|
|
5
|
+
readonly size: number;
|
|
6
|
+
readonly type: string;
|
|
7
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
8
|
+
text(): Promise<string>;
|
|
9
|
+
}
|
|
10
|
+
type BlobCallback = {
|
|
11
|
+
bivarianceHack(blob: CanvasBlob | null): void;
|
|
12
|
+
}['bivarianceHack'];
|
|
2
13
|
/**
|
|
3
14
|
* A DOM-spec-compliant canvas with no rendering of its own. `@gjsify/webgl` extends it with a
|
|
4
15
|
* `Gtk.GLArea`-backed `getContext()` override.
|
|
@@ -24,7 +35,8 @@ export declare class HTMLCanvasElement extends HTMLElement {
|
|
|
24
35
|
/** Empty string unless a 2D context is active — the pixels live in that context's surface. */
|
|
25
36
|
toDataURL(type?: string, quality?: unknown): string;
|
|
26
37
|
/** Calls back with `null` when there is no 2D context to read pixels from. */
|
|
27
|
-
toBlob(callback:
|
|
38
|
+
toBlob(callback: BlobCallback, type?: string, quality?: unknown): void;
|
|
28
39
|
/** Stub: the returned object is not a usable MediaStream. */
|
|
29
40
|
captureStream(_frameRequestRate?: number): Record<string, never>;
|
|
30
41
|
}
|
|
42
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/dom-elements",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.63.0",
|
|
4
4
|
"description": "DOM element hierarchy (Node, Element, HTMLElement, HTMLImageElement) for GJS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -71,20 +71,20 @@
|
|
|
71
71
|
"@girs/gdkpixbuf-2.0": "5.4.0",
|
|
72
72
|
"@girs/gjs": "5.4.0",
|
|
73
73
|
"@girs/glib-2.0": "5.4.0",
|
|
74
|
-
"@
|
|
75
|
-
"@gjsify/
|
|
76
|
-
"@gjsify/
|
|
77
|
-
"@gjsify/
|
|
78
|
-
"@gjsify/
|
|
79
|
-
"@gjsify/
|
|
80
|
-
"@gjsify/
|
|
74
|
+
"@girs/gst-1.0": "5.4.0",
|
|
75
|
+
"@gjsify/abort-controller": "^0.63.0",
|
|
76
|
+
"@gjsify/canvas2d-core": "^0.63.0",
|
|
77
|
+
"@gjsify/dom-events": "^0.63.0",
|
|
78
|
+
"@gjsify/domparser": "^0.63.0",
|
|
79
|
+
"@gjsify/fetch": "^0.63.0",
|
|
80
|
+
"@gjsify/node-globals": "^0.63.0",
|
|
81
|
+
"@gjsify/utils": "^0.63.0"
|
|
81
82
|
},
|
|
82
83
|
"devDependencies": {
|
|
83
|
-
"@girs/gst-1.0": "5.4.0",
|
|
84
84
|
"@girs/pango-1.0": "5.4.0",
|
|
85
85
|
"@girs/pangocairo-1.0": "5.4.0",
|
|
86
|
-
"@gjsify/cli": "^0.
|
|
87
|
-
"@gjsify/unit": "^0.
|
|
86
|
+
"@gjsify/cli": "^0.63.0",
|
|
87
|
+
"@gjsify/unit": "^0.63.0",
|
|
88
88
|
"@types/node": "^25.9.2",
|
|
89
89
|
"typescript": "^6.0.3"
|
|
90
90
|
},
|