@gjsify/web-globals 0.4.30 → 0.4.32

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/globals.mjs +24 -0
  2. package/package.json +29 -19
package/globals.mjs ADDED
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Re-exports unified Web API globals for browser builds.
3
+ *
4
+ * `@gjsify/web-globals` is a convenience aggregator over sibling
5
+ * `@gjsify/<web-pkg>` packages. On browser, each of those siblings routes
6
+ * its own `/globals` to the corresponding native globalThis value, so the
7
+ * cleanest re-export here is just to read the same names directly off
8
+ * globalThis (matches what the polyfill `index.ts` surfaces in shape).
9
+ */
10
+ export const DOMException = globalThis.DOMException;
11
+ export const AudioContext = globalThis.AudioContext;
12
+ export const HTMLAudioElement = globalThis.HTMLAudioElement;
13
+ export const Event = globalThis.Event;
14
+ export const EventTarget = globalThis.EventTarget;
15
+ export const CustomEvent = globalThis.CustomEvent;
16
+ export const AbortController = globalThis.AbortController;
17
+ export const AbortSignal = globalThis.AbortSignal;
18
+ export const URL = globalThis.URL;
19
+ export const URLSearchParams = globalThis.URLSearchParams;
20
+ export const Blob = globalThis.Blob;
21
+ export const File = globalThis.File;
22
+ export const FormData = globalThis.FormData;
23
+ export const performance = globalThis.performance;
24
+ export const PerformanceObserver = globalThis.PerformanceObserver;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/web-globals",
3
- "version": "0.4.30",
3
+ "version": "0.4.32",
4
4
  "description": "Unified Web API globals for GJS — single import for all Web standard polyfills",
5
5
  "module": "lib/esm/index.js",
6
6
  "types": "lib/types/index.d.ts",
@@ -18,14 +18,17 @@
18
18
  },
19
19
  "./register/formdata": {
20
20
  "default": "./lib/esm/register/formdata.js"
21
- }
21
+ },
22
+ "./globals": "./globals.mjs"
22
23
  },
23
24
  "files": [
24
- "lib"
25
+ "lib",
26
+ "globals.mjs"
25
27
  ],
26
28
  "sideEffects": [
27
29
  "./lib/esm/register.js",
28
- "./lib/esm/register/*.js"
30
+ "./lib/esm/register/*.js",
31
+ "./globals.mjs"
29
32
  ],
30
33
  "scripts": {
31
34
  "clear": "rm -rf lib tsconfig.tsbuildinfo tsconfig.types.tsbuildinfo test.gjs.mjs test.node.mjs || exit 0",
@@ -45,24 +48,31 @@
45
48
  "web-apis"
46
49
  ],
47
50
  "dependencies": {
48
- "@gjsify/abort-controller": "^0.4.30",
49
- "@gjsify/buffer": "^0.4.30",
50
- "@gjsify/compression-streams": "^0.4.30",
51
- "@gjsify/dom-events": "^0.4.30",
52
- "@gjsify/dom-exception": "^0.4.30",
53
- "@gjsify/eventsource": "^0.4.30",
54
- "@gjsify/formdata": "^0.4.30",
55
- "@gjsify/gamepad": "^0.4.30",
56
- "@gjsify/perf_hooks": "^0.4.30",
57
- "@gjsify/url": "^0.4.30",
58
- "@gjsify/web-streams": "^0.4.30",
59
- "@gjsify/webaudio": "^0.4.30",
60
- "@gjsify/webcrypto": "^0.4.30"
51
+ "@gjsify/abort-controller": "^0.4.32",
52
+ "@gjsify/buffer": "^0.4.32",
53
+ "@gjsify/compression-streams": "^0.4.32",
54
+ "@gjsify/dom-events": "^0.4.32",
55
+ "@gjsify/dom-exception": "^0.4.32",
56
+ "@gjsify/eventsource": "^0.4.32",
57
+ "@gjsify/formdata": "^0.4.32",
58
+ "@gjsify/gamepad": "^0.4.32",
59
+ "@gjsify/perf_hooks": "^0.4.32",
60
+ "@gjsify/url": "^0.4.32",
61
+ "@gjsify/web-streams": "^0.4.32",
62
+ "@gjsify/webaudio": "^0.4.32",
63
+ "@gjsify/webcrypto": "^0.4.32"
61
64
  },
62
65
  "devDependencies": {
63
- "@gjsify/cli": "^0.4.30",
64
- "@gjsify/unit": "^0.4.30",
66
+ "@gjsify/cli": "^0.4.32",
67
+ "@gjsify/unit": "^0.4.32",
65
68
  "@types/node": "^25.9.1",
66
69
  "typescript": "^6.0.3"
70
+ },
71
+ "gjsify": {
72
+ "runtimes": {
73
+ "gjs": "polyfill",
74
+ "node": "polyfill",
75
+ "browser": "native"
76
+ }
67
77
  }
68
78
  }