@gjsify/dom-elements 0.4.35 → 0.4.37
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 +30 -0
- package/package.json +31 -17
package/globals.mjs
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-exports native DOM Element globals for browser builds.
|
|
3
|
+
*
|
|
4
|
+
* On any browser these classes are part of the global DOM platform. The
|
|
5
|
+
* resolver routes `@gjsify/dom-elements` here on `--app browser` because
|
|
6
|
+
* `package.json#gjsify.runtimes.browser === "native"`.
|
|
7
|
+
*
|
|
8
|
+
* NOT used on Node (`runtimes.node` is `"none"` — Node has no DOM).
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export const Node = globalThis.Node;
|
|
12
|
+
export const Element = globalThis.Element;
|
|
13
|
+
export const HTMLElement = globalThis.HTMLElement;
|
|
14
|
+
export const HTMLCanvasElement = globalThis.HTMLCanvasElement;
|
|
15
|
+
export const HTMLImageElement = globalThis.HTMLImageElement;
|
|
16
|
+
export const HTMLMediaElement = globalThis.HTMLMediaElement;
|
|
17
|
+
export const HTMLVideoElement = globalThis.HTMLVideoElement;
|
|
18
|
+
export const HTMLAudioElement = globalThis.HTMLAudioElement;
|
|
19
|
+
export const Image = globalThis.Image;
|
|
20
|
+
export const Document = globalThis.Document;
|
|
21
|
+
export const Text = globalThis.Text;
|
|
22
|
+
export const Comment = globalThis.Comment;
|
|
23
|
+
export const DocumentFragment = globalThis.DocumentFragment;
|
|
24
|
+
export const DOMTokenList = globalThis.DOMTokenList;
|
|
25
|
+
export const Attr = globalThis.Attr;
|
|
26
|
+
export const NamedNodeMap = globalThis.NamedNodeMap;
|
|
27
|
+
export const NodeList = globalThis.NodeList;
|
|
28
|
+
export const MutationObserver = globalThis.MutationObserver;
|
|
29
|
+
export const ResizeObserver = globalThis.ResizeObserver;
|
|
30
|
+
export const IntersectionObserver = globalThis.IntersectionObserver;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/dom-elements",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.37",
|
|
4
4
|
"description": "DOM element hierarchy (Node, Element, HTMLElement, HTMLImageElement) for GJS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -37,14 +37,17 @@
|
|
|
37
37
|
},
|
|
38
38
|
"./register/navigator": {
|
|
39
39
|
"default": "./lib/esm/register/navigator.js"
|
|
40
|
-
}
|
|
40
|
+
},
|
|
41
|
+
"./globals": "./globals.mjs"
|
|
41
42
|
},
|
|
42
43
|
"files": [
|
|
43
|
-
"lib"
|
|
44
|
+
"lib",
|
|
45
|
+
"globals.mjs"
|
|
44
46
|
],
|
|
45
47
|
"sideEffects": [
|
|
46
48
|
"./lib/esm/register.js",
|
|
47
|
-
"./lib/esm/register/*.js"
|
|
49
|
+
"./lib/esm/register/*.js",
|
|
50
|
+
"./globals.mjs"
|
|
48
51
|
],
|
|
49
52
|
"scripts": {
|
|
50
53
|
"clear": "rm -rf lib tsconfig.tsbuildinfo tsconfig.types.tsbuildinfo test.gjs.mjs test.node.mjs || exit 0",
|
|
@@ -65,26 +68,37 @@
|
|
|
65
68
|
"node"
|
|
66
69
|
],
|
|
67
70
|
"dependencies": {
|
|
68
|
-
"@girs/gdkpixbuf-2.0": "2.0.0-4.0.
|
|
69
|
-
"@girs/gjs": "4.0.
|
|
70
|
-
"@girs/glib-2.0": "2.88.0-4.0.
|
|
71
|
-
"@gjsify/abort-controller": "^0.4.
|
|
72
|
-
"@gjsify/canvas2d-core": "^0.4.
|
|
73
|
-
"@gjsify/dom-events": "^0.4.
|
|
74
|
-
"@gjsify/fetch": "^0.4.
|
|
71
|
+
"@girs/gdkpixbuf-2.0": "2.0.0-4.0.4",
|
|
72
|
+
"@girs/gjs": "4.0.4",
|
|
73
|
+
"@girs/glib-2.0": "2.88.0-4.0.4",
|
|
74
|
+
"@gjsify/abort-controller": "^0.4.37",
|
|
75
|
+
"@gjsify/canvas2d-core": "^0.4.37",
|
|
76
|
+
"@gjsify/dom-events": "^0.4.37",
|
|
77
|
+
"@gjsify/fetch": "^0.4.37"
|
|
75
78
|
},
|
|
76
79
|
"devDependencies": {
|
|
77
|
-
"@girs/gst-1.0": "1.28.1-4.0.
|
|
78
|
-
"@gjsify/cli": "^0.4.
|
|
79
|
-
"@gjsify/unit": "^0.4.
|
|
80
|
+
"@girs/gst-1.0": "1.28.1-4.0.4",
|
|
81
|
+
"@gjsify/cli": "^0.4.37",
|
|
82
|
+
"@gjsify/unit": "^0.4.37",
|
|
80
83
|
"@types/node": "^25.9.1",
|
|
81
|
-
"typescript": "^
|
|
84
|
+
"typescript": "^5.9.3"
|
|
82
85
|
},
|
|
83
86
|
"gjsify": {
|
|
84
87
|
"runtimes": {
|
|
85
88
|
"gjs": "polyfill",
|
|
86
89
|
"node": "none",
|
|
87
|
-
"browser": "native"
|
|
90
|
+
"browser": "native",
|
|
91
|
+
"nativescript": "none"
|
|
88
92
|
}
|
|
89
|
-
}
|
|
93
|
+
},
|
|
94
|
+
"license": "MIT",
|
|
95
|
+
"repository": {
|
|
96
|
+
"type": "git",
|
|
97
|
+
"url": "git+https://github.com/gjsify/gjsify.git",
|
|
98
|
+
"directory": "packages/dom/dom-elements"
|
|
99
|
+
},
|
|
100
|
+
"bugs": {
|
|
101
|
+
"url": "https://github.com/gjsify/gjsify/issues"
|
|
102
|
+
},
|
|
103
|
+
"homepage": "https://github.com/gjsify/gjsify/tree/main/packages/dom/dom-elements#readme"
|
|
90
104
|
}
|