@gjsify/canvas2d-core 0.4.35 → 0.4.36
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/globals.mjs +16 -0
- package/package.json +30 -15
package/globals.mjs
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-exports native Canvas 2D globals for browser builds.
|
|
3
|
+
*
|
|
4
|
+
* On any browser these classes are part of the global Canvas API. The
|
|
5
|
+
* resolver routes `@gjsify/canvas2d-core` here on `--app browser` because
|
|
6
|
+
* `package.json#gjsify.runtimes.browser === "native"`.
|
|
7
|
+
*
|
|
8
|
+
* NOT used on Node (`runtimes.node` is `"none"` — node-canvas is out of
|
|
9
|
+
* scope for the polyfill axis).
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
export const CanvasRenderingContext2D = globalThis.CanvasRenderingContext2D;
|
|
13
|
+
export const CanvasGradient = globalThis.CanvasGradient;
|
|
14
|
+
export const CanvasPattern = globalThis.CanvasPattern;
|
|
15
|
+
export const Path2D = globalThis.Path2D;
|
|
16
|
+
export const ImageData = globalThis.ImageData;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/canvas2d-core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.36",
|
|
4
4
|
"description": "Cairo-backed Canvas 2D core (CanvasRenderingContext2D, Path2D, ImageData) — no GTK dependency",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -9,10 +9,15 @@
|
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./lib/types/index.d.ts",
|
|
11
11
|
"default": "./lib/esm/index.js"
|
|
12
|
-
}
|
|
12
|
+
},
|
|
13
|
+
"./globals": "./globals.mjs"
|
|
13
14
|
},
|
|
14
15
|
"files": [
|
|
15
|
-
"lib"
|
|
16
|
+
"lib",
|
|
17
|
+
"globals.mjs"
|
|
18
|
+
],
|
|
19
|
+
"sideEffects": [
|
|
20
|
+
"./globals.mjs"
|
|
16
21
|
],
|
|
17
22
|
"scripts": {
|
|
18
23
|
"clear": "rm -rf lib tmp tsconfig.tsbuildinfo test.gjs.mjs || exit 0",
|
|
@@ -34,20 +39,20 @@
|
|
|
34
39
|
"offscreen"
|
|
35
40
|
],
|
|
36
41
|
"dependencies": {
|
|
37
|
-
"@girs/gdk-4.0": "4.0.0-4.0.
|
|
38
|
-
"@girs/gdkpixbuf-2.0": "2.0.0-4.0.
|
|
39
|
-
"@girs/gjs": "4.0.
|
|
40
|
-
"@girs/glib-2.0": "2.88.0-4.0.
|
|
41
|
-
"@girs/gobject-2.0": "2.88.0-4.0.
|
|
42
|
-
"@girs/pango-1.0": "1.57.1-4.0.
|
|
43
|
-
"@girs/pangocairo-1.0": "1.0.0-4.0.
|
|
42
|
+
"@girs/gdk-4.0": "4.0.0-4.0.4",
|
|
43
|
+
"@girs/gdkpixbuf-2.0": "2.0.0-4.0.4",
|
|
44
|
+
"@girs/gjs": "4.0.4",
|
|
45
|
+
"@girs/glib-2.0": "2.88.0-4.0.4",
|
|
46
|
+
"@girs/gobject-2.0": "2.88.0-4.0.4",
|
|
47
|
+
"@girs/pango-1.0": "1.57.1-4.0.4",
|
|
48
|
+
"@girs/pangocairo-1.0": "1.0.0-4.0.4"
|
|
44
49
|
},
|
|
45
50
|
"devDependencies": {
|
|
46
|
-
"@gjsify/cli": "^0.4.
|
|
47
|
-
"@gjsify/dom-elements": "^0.4.
|
|
48
|
-
"@gjsify/unit": "^0.4.
|
|
51
|
+
"@gjsify/cli": "^0.4.36",
|
|
52
|
+
"@gjsify/dom-elements": "^0.4.36",
|
|
53
|
+
"@gjsify/unit": "^0.4.36",
|
|
49
54
|
"@types/node": "^25.9.1",
|
|
50
|
-
"typescript": "^
|
|
55
|
+
"typescript": "^5.9.3"
|
|
51
56
|
},
|
|
52
57
|
"gjsify": {
|
|
53
58
|
"runtimes": {
|
|
@@ -55,5 +60,15 @@
|
|
|
55
60
|
"node": "none",
|
|
56
61
|
"browser": "native"
|
|
57
62
|
}
|
|
58
|
-
}
|
|
63
|
+
},
|
|
64
|
+
"license": "MIT",
|
|
65
|
+
"repository": {
|
|
66
|
+
"type": "git",
|
|
67
|
+
"url": "git+https://github.com/gjsify/gjsify.git",
|
|
68
|
+
"directory": "packages/dom/canvas2d-core"
|
|
69
|
+
},
|
|
70
|
+
"bugs": {
|
|
71
|
+
"url": "https://github.com/gjsify/gjsify/issues"
|
|
72
|
+
},
|
|
73
|
+
"homepage": "https://github.com/gjsify/gjsify/tree/main/packages/dom/canvas2d-core#readme"
|
|
59
74
|
}
|