@targoninc/jess-components 0.0.4 → 0.0.6
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.js +3 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ class Signal {
|
|
|
4
4
|
_callbacks = [];
|
|
5
5
|
_value;
|
|
6
6
|
_values = {};
|
|
7
|
+
type = "jess-signal";
|
|
7
8
|
constructor(initialValue, updateCallback = () => {}) {
|
|
8
9
|
this._value = initialValue;
|
|
9
10
|
this._values = {};
|
|
@@ -68,7 +69,7 @@ function compute(valueFunction, ...signals) {
|
|
|
68
69
|
return out;
|
|
69
70
|
}
|
|
70
71
|
function isSignal(obj) {
|
|
71
|
-
return obj?.
|
|
72
|
+
return obj?.type === "jess-signal";
|
|
72
73
|
}
|
|
73
74
|
function asSignal(obj) {
|
|
74
75
|
return obj;
|
|
@@ -170,7 +171,7 @@ class DomNode {
|
|
|
170
171
|
}
|
|
171
172
|
classes(...classes) {
|
|
172
173
|
for (let cls of classes) {
|
|
173
|
-
if (cls && isSignal(cls
|
|
174
|
+
if (cls && isSignal(cls)) {
|
|
174
175
|
const sig = cls;
|
|
175
176
|
let previousValue = sig.value;
|
|
176
177
|
this._node.classList.add(previousValue);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@targoninc/jess-components",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.6",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"prepublishOnly": "bun run build"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@targoninc/jess": "^0.0.
|
|
20
|
+
"@targoninc/jess": "^0.0.10"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/bun": "latest",
|