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 +20 -22
- package/dist/index.js +20 -22
- package/package.json +1 -1
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
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
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
|
-
|
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
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
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
|
-
|
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
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
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
|
-
|
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
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
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
|
-
|
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(
|