@ricsam/isolate-types 0.1.14 → 0.1.16

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.
@@ -2,27 +2,37 @@ var __defProp = Object.defineProperty;
2
2
  var __getOwnPropNames = Object.getOwnPropertyNames;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __moduleCache = /* @__PURE__ */ new WeakMap;
5
+ function __accessProp(key) {
6
+ return this[key];
7
+ }
6
8
  var __toCommonJS = (from) => {
7
- var entry = __moduleCache.get(from), desc;
9
+ var entry = (__moduleCache ??= new WeakMap).get(from), desc;
8
10
  if (entry)
9
11
  return entry;
10
12
  entry = __defProp({}, "__esModule", { value: true });
11
- if (from && typeof from === "object" || typeof from === "function")
12
- __getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
13
- get: () => from[key],
14
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
- }));
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (var key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(entry, key))
16
+ __defProp(entry, key, {
17
+ get: __accessProp.bind(from, key),
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
16
21
  __moduleCache.set(from, entry);
17
22
  return entry;
18
23
  };
24
+ var __moduleCache;
25
+ var __returnValue = (v) => v;
26
+ function __exportSetter(name, newValue) {
27
+ this[name] = __returnValue.bind(null, newValue);
28
+ }
19
29
  var __export = (target, all) => {
20
30
  for (var name in all)
21
31
  __defProp(target, name, {
22
32
  get: all[name],
23
33
  enumerable: true,
24
34
  configurable: true,
25
- set: (newValue) => all[name] = () => newValue
35
+ set: __exportSetter.bind(all, name)
26
36
  });
27
37
  };
28
38
 
@@ -47,4 +57,4 @@ module.exports = __toCommonJS(exports_src);
47
57
  var import_isolate_types = require("./isolate-types.cjs");
48
58
  var import_typecheck = require("./typecheck.cjs");
49
59
 
50
- //# debugId=6774E826610E30D464756E2164756E21
60
+ //# debugId=1660894E5BDB4F1264756E2164756E21
@@ -4,7 +4,7 @@
4
4
  "sourcesContent": [
5
5
  "/**\n * @ricsam/isolate-types\n *\n * Type definitions and type-checking utilities for isolated-vm V8 sandbox code.\n */\n\n// Re-export type definitions\nexport {\n CORE_TYPES,\n CONSOLE_TYPES,\n CRYPTO_TYPES,\n ENCODING_TYPES,\n FETCH_TYPES,\n FS_TYPES,\n PATH_TYPES,\n TEST_ENV_TYPES,\n TIMERS_TYPES,\n PLAYWRIGHT_TYPES,\n TYPE_DEFINITIONS,\n type TypeDefinitionKey,\n} from \"./isolate-types.cjs\";\n\n// Re-export typecheck utilities\nexport {\n typecheckIsolateCode,\n formatTypecheckErrors,\n type TypecheckResult,\n type TypecheckError,\n type TypecheckOptions,\n type LibraryTypes,\n type LibraryTypeFile,\n} from \"./typecheck.cjs\";\n"
6
6
  ],
7
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBO,IAbP;AAwBO,IARP;",
8
- "debugId": "6774E826610E30D464756E2164756E21",
7
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBO,IAbP;AAwBO,IARP;",
8
+ "debugId": "1660894E5BDB4F1264756E2164756E21",
9
9
  "names": []
10
10
  }
@@ -2,27 +2,37 @@ var __defProp = Object.defineProperty;
2
2
  var __getOwnPropNames = Object.getOwnPropertyNames;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __moduleCache = /* @__PURE__ */ new WeakMap;
5
+ function __accessProp(key) {
6
+ return this[key];
7
+ }
6
8
  var __toCommonJS = (from) => {
7
- var entry = __moduleCache.get(from), desc;
9
+ var entry = (__moduleCache ??= new WeakMap).get(from), desc;
8
10
  if (entry)
9
11
  return entry;
10
12
  entry = __defProp({}, "__esModule", { value: true });
11
- if (from && typeof from === "object" || typeof from === "function")
12
- __getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
13
- get: () => from[key],
14
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
- }));
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (var key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(entry, key))
16
+ __defProp(entry, key, {
17
+ get: __accessProp.bind(from, key),
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
16
21
  __moduleCache.set(from, entry);
17
22
  return entry;
18
23
  };
24
+ var __moduleCache;
25
+ var __returnValue = (v) => v;
26
+ function __exportSetter(name, newValue) {
27
+ this[name] = __returnValue.bind(null, newValue);
28
+ }
19
29
  var __export = (target, all) => {
20
30
  for (var name in all)
21
31
  __defProp(target, name, {
22
32
  get: all[name],
23
33
  enumerable: true,
24
34
  configurable: true,
25
- set: (newValue) => all[name] = () => newValue
35
+ set: __exportSetter.bind(all, name)
26
36
  });
27
37
  };
28
38
 
@@ -128,6 +138,71 @@ declare global {
128
138
  */
129
139
  const URLSearchParams: typeof globalThis.URLSearchParams;
130
140
 
141
+ // ============================================
142
+ // DOM Parsing and Constructors
143
+ // ============================================
144
+
145
+ /**
146
+ * Parses HTML/XML strings into Document objects.
147
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser
148
+ */
149
+ const DOMParser: typeof globalThis.DOMParser;
150
+
151
+ /**
152
+ * Base DOM node constructor.
153
+ */
154
+ const Node: typeof globalThis.Node;
155
+
156
+ /**
157
+ * DOM document constructor.
158
+ */
159
+ const Document: typeof globalThis.Document;
160
+
161
+ /**
162
+ * DOM document fragment constructor.
163
+ */
164
+ const DocumentFragment: typeof globalThis.DocumentFragment;
165
+
166
+ /**
167
+ * DOM document type constructor.
168
+ */
169
+ const DocumentType: typeof globalThis.DocumentType;
170
+
171
+ /**
172
+ * DOM element constructor.
173
+ */
174
+ const Element: typeof globalThis.Element;
175
+
176
+ /**
177
+ * DOM attribute constructor.
178
+ */
179
+ const Attr: typeof globalThis.Attr;
180
+
181
+ /**
182
+ * DOM text node constructor.
183
+ */
184
+ const Text: typeof globalThis.Text;
185
+
186
+ /**
187
+ * DOM comment node constructor.
188
+ */
189
+ const Comment: typeof globalThis.Comment;
190
+
191
+ /**
192
+ * DOM event constructor.
193
+ */
194
+ const Event: typeof globalThis.Event;
195
+
196
+ /**
197
+ * Base event target constructor.
198
+ */
199
+ const EventTarget: typeof globalThis.EventTarget;
200
+
201
+ /**
202
+ * Custom event constructor.
203
+ */
204
+ const CustomEvent: typeof globalThis.CustomEvent;
205
+
131
206
  // ============================================
132
207
  // Error Handling
133
208
  // ============================================
@@ -2536,4 +2611,4 @@ var TYPE_DEFINITIONS = {
2536
2611
  playwright: PLAYWRIGHT_TYPES
2537
2612
  };
2538
2613
 
2539
- //# debugId=86F16192ABAB885164756E2164756E21
2614
+ //# debugId=1A40EEA3D4A00E2664756E2164756E21