thunderous 2.3.7 → 2.3.8

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/dist/index.cjs CHANGED
@@ -58,18 +58,16 @@ var createSignal = (initVal, options) => {
58
58
  subscribers.add(subscriber);
59
59
  }
60
60
  if (options?.debugMode === true || getterOptions?.debugMode === true) {
61
- queueMicrotask(() => {
62
- let label = "anonymous signal";
63
- if (options?.label !== void 0) {
64
- label = `(${options.label})`;
65
- if (getterOptions?.label !== void 0) {
66
- label += ` ${getterOptions.label}`;
67
- }
68
- } else if (getterOptions?.label !== void 0) {
69
- label = getterOptions.label;
61
+ let label = "anonymous signal";
62
+ if (options?.label !== void 0) {
63
+ label = `(${options.label})`;
64
+ if (getterOptions?.label !== void 0) {
65
+ label += ` ${getterOptions.label}`;
70
66
  }
71
- console.log("Signal retrieved:", { value, subscribers, label });
72
- });
67
+ } else if (getterOptions?.label !== void 0) {
68
+ label = getterOptions.label;
69
+ }
70
+ console.log("Signal retrieved:", { value, subscribers, label });
73
71
  }
74
72
  return value;
75
73
  };
@@ -85,18 +83,18 @@ var createSignal = (initVal, options) => {
85
83
  } catch (error) {
86
84
  console.error("Error in subscriber:", { error, oldValue, newValue, fn });
87
85
  }
88
- if (options?.debugMode === true || setterOptions?.debugMode === true) {
89
- let label = "anonymous signal";
90
- if (options?.label !== void 0) {
91
- label = `(${options.label})`;
92
- if (setterOptions?.label !== void 0) {
93
- label += ` ${setterOptions.label}`;
94
- }
95
- } else if (setterOptions?.label !== void 0) {
96
- label = setterOptions.label;
86
+ }
87
+ if (options?.debugMode === true || setterOptions?.debugMode === true) {
88
+ let label = "anonymous signal";
89
+ if (options?.label !== void 0) {
90
+ label = `(${options.label})`;
91
+ if (setterOptions?.label !== void 0) {
92
+ label += ` ${setterOptions.label}`;
97
93
  }
98
- console.log("Signal set:", { oldValue, newValue, subscribers, label });
94
+ } else if (setterOptions?.label !== void 0) {
95
+ label = setterOptions.label;
99
96
  }
97
+ console.log("Signal set:", { oldValue, newValue, subscribers, label });
100
98
  }
101
99
  };
102
100
  return [getter, setter];
@@ -282,7 +280,7 @@ var renderState = {
282
280
  signalMap: /* @__PURE__ */ new Map(),
283
281
  callbackMap: /* @__PURE__ */ new Map(),
284
282
  fragmentMap: /* @__PURE__ */ new Map(),
285
- registry: customElements
283
+ registry: typeof customElements !== "undefined" ? customElements : {}
286
284
  };
287
285
  var logValueError = (value) => {
288
286
  console.error(
package/dist/index.js CHANGED
@@ -23,18 +23,16 @@ var createSignal = (initVal, options) => {
23
23
  subscribers.add(subscriber);
24
24
  }
25
25
  if (options?.debugMode === true || getterOptions?.debugMode === true) {
26
- queueMicrotask(() => {
27
- let label = "anonymous signal";
28
- if (options?.label !== void 0) {
29
- label = `(${options.label})`;
30
- if (getterOptions?.label !== void 0) {
31
- label += ` ${getterOptions.label}`;
32
- }
33
- } else if (getterOptions?.label !== void 0) {
34
- label = getterOptions.label;
26
+ let label = "anonymous signal";
27
+ if (options?.label !== void 0) {
28
+ label = `(${options.label})`;
29
+ if (getterOptions?.label !== void 0) {
30
+ label += ` ${getterOptions.label}`;
35
31
  }
36
- console.log("Signal retrieved:", { value, subscribers, label });
37
- });
32
+ } else if (getterOptions?.label !== void 0) {
33
+ label = getterOptions.label;
34
+ }
35
+ console.log("Signal retrieved:", { value, subscribers, label });
38
36
  }
39
37
  return value;
40
38
  };
@@ -50,18 +48,18 @@ var createSignal = (initVal, options) => {
50
48
  } catch (error) {
51
49
  console.error("Error in subscriber:", { error, oldValue, newValue, fn });
52
50
  }
53
- if (options?.debugMode === true || setterOptions?.debugMode === true) {
54
- let label = "anonymous signal";
55
- if (options?.label !== void 0) {
56
- label = `(${options.label})`;
57
- if (setterOptions?.label !== void 0) {
58
- label += ` ${setterOptions.label}`;
59
- }
60
- } else if (setterOptions?.label !== void 0) {
61
- label = setterOptions.label;
51
+ }
52
+ if (options?.debugMode === true || setterOptions?.debugMode === true) {
53
+ let label = "anonymous signal";
54
+ if (options?.label !== void 0) {
55
+ label = `(${options.label})`;
56
+ if (setterOptions?.label !== void 0) {
57
+ label += ` ${setterOptions.label}`;
62
58
  }
63
- console.log("Signal set:", { oldValue, newValue, subscribers, label });
59
+ } else if (setterOptions?.label !== void 0) {
60
+ label = setterOptions.label;
64
61
  }
62
+ console.log("Signal set:", { oldValue, newValue, subscribers, label });
65
63
  }
66
64
  };
67
65
  return [getter, setter];
@@ -247,7 +245,7 @@ var renderState = {
247
245
  signalMap: /* @__PURE__ */ new Map(),
248
246
  callbackMap: /* @__PURE__ */ new Map(),
249
247
  fragmentMap: /* @__PURE__ */ new Map(),
250
- registry: customElements
248
+ registry: typeof customElements !== "undefined" ? customElements : {}
251
249
  };
252
250
  var logValueError = (value) => {
253
251
  console.error(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thunderous",
3
- "version": "2.3.7",
3
+ "version": "2.3.8",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",