@bodil/dom 0.1.8 → 0.1.10
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/component.d.ts +218 -6
- package/dist/component.js +154 -13
- package/dist/component.js.map +1 -1
- package/dist/css.d.ts +4 -0
- package/dist/css.js +4 -0
- package/dist/css.js.map +1 -1
- package/dist/decorators/attribute.js +1 -1
- package/dist/decorators/attribute.js.map +1 -1
- package/dist/decorators/connect.test.js +1 -1
- package/dist/decorators/connect.test.js.map +1 -1
- package/dist/decorators/reactive.d.ts +1 -1
- package/dist/decorators/reactive.js +1 -1
- package/dist/decorators/reactive.js.map +1 -1
- package/dist/decorators/reactive.test.js +1 -1
- package/dist/decorators/reactive.test.js.map +1 -1
- package/dist/dom.d.ts +32 -0
- package/dist/dom.js +32 -0
- package/dist/dom.js.map +1 -1
- package/dist/emitter.d.ts +8 -0
- package/dist/emitter.js.map +1 -1
- package/dist/event.d.ts +4 -0
- package/dist/event.js.map +1 -1
- package/dist/geometry.d.ts +7 -0
- package/dist/geometry.js +4 -0
- package/dist/geometry.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/signal.d.ts +29 -0
- package/dist/signal.js +78 -0
- package/dist/signal.js.map +1 -0
- package/dist/signal.test.d.ts +1 -0
- package/dist/signal.test.js +135 -0
- package/dist/signal.test.js.map +1 -0
- package/package.json +16 -8
- package/src/component.ts +237 -20
- package/src/css.ts +5 -0
- package/src/decorators/attribute.ts +1 -1
- package/src/decorators/connect.test.ts +1 -1
- package/src/decorators/reactive.test.ts +1 -1
- package/src/decorators/reactive.ts +4 -4
- package/src/dom.ts +33 -0
- package/src/emitter.ts +8 -0
- package/src/event.ts +4 -0
- package/src/geometry.ts +8 -0
- package/src/index.ts +2 -1
- package/src/signal.test.ts +89 -0
- package/src/signal.ts +109 -0
package/dist/signal.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lit directives for working with signals.
|
|
3
|
+
* @module
|
|
4
|
+
*/
|
|
5
|
+
import { defer } from "@bodil/core/async";
|
|
6
|
+
import { id } from "@bodil/core/fun";
|
|
7
|
+
import { Signal } from "@bodil/signal";
|
|
8
|
+
import { AsyncDirective } from "lit/async-directive.js";
|
|
9
|
+
import { directive } from "lit/directive.js";
|
|
10
|
+
let effectsPending = false;
|
|
11
|
+
const hostlessWatcher = new Signal.subtle.Watcher(() => {
|
|
12
|
+
if (!effectsPending) {
|
|
13
|
+
effectsPending = true;
|
|
14
|
+
defer(() => {
|
|
15
|
+
effectsPending = false;
|
|
16
|
+
for (const signal of hostlessWatcher.getPending()) {
|
|
17
|
+
signal.get();
|
|
18
|
+
}
|
|
19
|
+
hostlessWatcher.watch();
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
/** @internal */
|
|
24
|
+
export class WatchDirective extends AsyncDirective {
|
|
25
|
+
#host;
|
|
26
|
+
#signal;
|
|
27
|
+
#mapper = id;
|
|
28
|
+
#watcher;
|
|
29
|
+
#computed;
|
|
30
|
+
#watch() {
|
|
31
|
+
if (this.#watcher !== undefined) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
this.#computed = new Signal.Computed(() => {
|
|
35
|
+
const value = this.#signal === undefined ? undefined : this.#mapper(this.#signal.get());
|
|
36
|
+
if (this.#host?.isUpdatePending === true) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
this.setValue(value);
|
|
40
|
+
return value;
|
|
41
|
+
});
|
|
42
|
+
this.#watcher = hostlessWatcher;
|
|
43
|
+
this.#watcher.watch(this.#computed);
|
|
44
|
+
Signal.subtle.untrack(() => this.#computed?.get());
|
|
45
|
+
}
|
|
46
|
+
#unwatch() {
|
|
47
|
+
if (this.#watcher !== undefined) {
|
|
48
|
+
this.#watcher.unwatch(this.#computed);
|
|
49
|
+
this.#watcher = undefined;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
render(signal, mapFn) {
|
|
53
|
+
return Signal.subtle.untrack(() => mapFn === undefined ? signal.get() : mapFn(signal.get()));
|
|
54
|
+
}
|
|
55
|
+
update(part, [signal, mapFn]) {
|
|
56
|
+
this.#host ??= part.options?.host;
|
|
57
|
+
if (signal !== this.#signal && this.#signal !== undefined) {
|
|
58
|
+
this.#unwatch();
|
|
59
|
+
}
|
|
60
|
+
this.#signal = signal;
|
|
61
|
+
this.#mapper = mapFn ?? id;
|
|
62
|
+
this.#watch();
|
|
63
|
+
return Signal.subtle.untrack(() => this.#mapper(this.#signal.get()));
|
|
64
|
+
}
|
|
65
|
+
disconnected() {
|
|
66
|
+
this.#unwatch();
|
|
67
|
+
}
|
|
68
|
+
reconnected() {
|
|
69
|
+
this.#watch();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Render a signal and subscribe to it, updating the part when the signal
|
|
74
|
+
* changes independently of the host component.
|
|
75
|
+
* @function
|
|
76
|
+
*/
|
|
77
|
+
export const watch = directive(WatchDirective);
|
|
78
|
+
//# sourceMappingURL=signal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signal.js","sourceRoot":"","sources":["../src/signal.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAmC,MAAM,kBAAkB,CAAC;AAO9E,IAAI,cAAc,GAAG,KAAK,CAAC;AAC3B,MAAM,eAAe,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE;IACnD,IAAI,CAAC,cAAc,EAAE,CAAC;QAClB,cAAc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
1
|
+
export {};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
2
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
3
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
4
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
5
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
6
|
+
var _, done = false;
|
|
7
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
8
|
+
var context = {};
|
|
9
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
10
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
11
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
12
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
13
|
+
if (kind === "accessor") {
|
|
14
|
+
if (result === void 0) continue;
|
|
15
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
16
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
17
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
18
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
19
|
+
}
|
|
20
|
+
else if (_ = accept(result)) {
|
|
21
|
+
if (kind === "field") initializers.unshift(_);
|
|
22
|
+
else descriptor[key] = _;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
26
|
+
done = true;
|
|
27
|
+
};
|
|
28
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
29
|
+
var useValue = arguments.length > 2;
|
|
30
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
31
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
32
|
+
}
|
|
33
|
+
return useValue ? value : void 0;
|
|
34
|
+
};
|
|
35
|
+
import { Signal } from "@bodil/signal";
|
|
36
|
+
import { html } from "lit";
|
|
37
|
+
import { customElement } from "lit/decorators.js";
|
|
38
|
+
import { expect, test } from "vitest";
|
|
39
|
+
import { Component } from "./component";
|
|
40
|
+
import { watch } from "./signal";
|
|
41
|
+
test("watch directive", async () => {
|
|
42
|
+
const counter = Signal.from(1);
|
|
43
|
+
let renders = 0;
|
|
44
|
+
let WatchDirectiveTest = (() => {
|
|
45
|
+
let _classDecorators = [customElement("watch-directive-test")];
|
|
46
|
+
let _classDescriptor;
|
|
47
|
+
let _classExtraInitializers = [];
|
|
48
|
+
let _classThis;
|
|
49
|
+
let _classSuper = Component;
|
|
50
|
+
var WatchDirectiveTest = class extends _classSuper {
|
|
51
|
+
static { _classThis = this; }
|
|
52
|
+
static {
|
|
53
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
54
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
55
|
+
WatchDirectiveTest = _classThis = _classDescriptor.value;
|
|
56
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
57
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
58
|
+
}
|
|
59
|
+
render() {
|
|
60
|
+
renders++;
|
|
61
|
+
return html `<p>${watch(counter)}</p>`;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
return WatchDirectiveTest = _classThis;
|
|
65
|
+
})();
|
|
66
|
+
const t = document.createElement("watch-directive-test");
|
|
67
|
+
document.body.append(t);
|
|
68
|
+
await t.updateComplete;
|
|
69
|
+
expect(t.query("p")?.innerText).toBe("1");
|
|
70
|
+
expect(renders).toBe(1);
|
|
71
|
+
// update the counter and yield, it should update immediately.
|
|
72
|
+
counter.set(2);
|
|
73
|
+
await Promise.resolve();
|
|
74
|
+
expect(t.query("p")?.innerText).toBe("2");
|
|
75
|
+
expect(renders).toBe(1);
|
|
76
|
+
// request an update, it should not update immediately on yield
|
|
77
|
+
// because of the scheduled update
|
|
78
|
+
t.requestUpdate();
|
|
79
|
+
counter.set(3);
|
|
80
|
+
await Promise.resolve();
|
|
81
|
+
expect(t.query("p")?.innerText).toBe("2");
|
|
82
|
+
expect(renders).toBe(1);
|
|
83
|
+
// wait for the update to complete, it should now be in sync
|
|
84
|
+
await t.updateComplete;
|
|
85
|
+
expect(t.query("p")?.innerText).toBe("3");
|
|
86
|
+
expect(renders).toBe(2);
|
|
87
|
+
});
|
|
88
|
+
test("watch directive with mapper function", async () => {
|
|
89
|
+
const counter = Signal.from(1);
|
|
90
|
+
let renders = 0;
|
|
91
|
+
let WatchDirectiveMapperTest = (() => {
|
|
92
|
+
let _classDecorators = [customElement("watch-directive-mapper-test")];
|
|
93
|
+
let _classDescriptor;
|
|
94
|
+
let _classExtraInitializers = [];
|
|
95
|
+
let _classThis;
|
|
96
|
+
let _classSuper = Component;
|
|
97
|
+
var WatchDirectiveMapperTest = class extends _classSuper {
|
|
98
|
+
static { _classThis = this; }
|
|
99
|
+
static {
|
|
100
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
101
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
102
|
+
WatchDirectiveMapperTest = _classThis = _classDescriptor.value;
|
|
103
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
104
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
105
|
+
}
|
|
106
|
+
render() {
|
|
107
|
+
renders++;
|
|
108
|
+
return html `<p>${watch(counter, (i) => i + 1000)}</p>`;
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
return WatchDirectiveMapperTest = _classThis;
|
|
112
|
+
})();
|
|
113
|
+
const t = document.createElement("watch-directive-mapper-test");
|
|
114
|
+
document.body.append(t);
|
|
115
|
+
await t.updateComplete;
|
|
116
|
+
expect(t.query("p")?.innerText).toBe("1001");
|
|
117
|
+
expect(renders).toBe(1);
|
|
118
|
+
// update the counter and yield, it should update immediately.
|
|
119
|
+
counter.set(2);
|
|
120
|
+
await Promise.resolve();
|
|
121
|
+
expect(t.query("p")?.innerText).toBe("1002");
|
|
122
|
+
expect(renders).toBe(1);
|
|
123
|
+
// request an update, it should not update immediately on yield
|
|
124
|
+
// because of the scheduled update
|
|
125
|
+
t.requestUpdate();
|
|
126
|
+
counter.set(3);
|
|
127
|
+
await Promise.resolve();
|
|
128
|
+
expect(t.query("p")?.innerText).toBe("1002");
|
|
129
|
+
expect(renders).toBe(1);
|
|
130
|
+
// wait for the update to complete, it should now be in sync
|
|
131
|
+
await t.updateComplete;
|
|
132
|
+
expect(t.query("p")?.innerText).toBe("1003");
|
|
133
|
+
expect(renders).toBe(2);
|
|
134
|
+
});
|
|
135
|
+
//# sourceMappingURL=signal.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signal.test.js","sourceRoot":"","sources":["../src/signal.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,EAAE,S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C,CAAC,CAAC,CAAC;IAExB,8DAA8D;IAC9D,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACf,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;IAExB,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC7C,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAExB,+DAA+D;IAC/D,kCAAkC;IAClC,CAAC,CAAC,aAAa,EAAE,CAAC;IAClB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACf,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;IAExB,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC7C,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAExB,4DAA4D;IAC5D,MAAM,CAAC,CAAC,cAAc,CAAC;IACvB,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC7C,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC5B,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bodil/dom",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "DOM and web component tools",
|
|
5
5
|
"homepage": "https://codeberg.org/bodil/dom",
|
|
6
6
|
"repository": {
|
|
@@ -50,15 +50,21 @@
|
|
|
50
50
|
"types": "./dist/geometry.d.ts",
|
|
51
51
|
"import": "./dist/geometry.js"
|
|
52
52
|
}
|
|
53
|
+
},
|
|
54
|
+
"./signal": {
|
|
55
|
+
"import": {
|
|
56
|
+
"types": "./dist/signal.d.ts",
|
|
57
|
+
"import": "./dist/signal.js"
|
|
58
|
+
}
|
|
53
59
|
}
|
|
54
60
|
},
|
|
55
61
|
"publishConfig": {
|
|
56
62
|
"access": "public"
|
|
57
63
|
},
|
|
58
64
|
"dependencies": {
|
|
59
|
-
"@bodil/core": "^0.
|
|
60
|
-
"@bodil/opt": "^0.4.
|
|
61
|
-
"@bodil/signal": "^0.
|
|
65
|
+
"@bodil/core": "^0.5.2",
|
|
66
|
+
"@bodil/opt": "^0.4.3",
|
|
67
|
+
"@bodil/signal": "^0.5.1",
|
|
62
68
|
"lit": "^3.3.2",
|
|
63
69
|
"type-fest": "^5.3.1"
|
|
64
70
|
},
|
|
@@ -66,20 +72,22 @@
|
|
|
66
72
|
"@eslint/eslintrc": "^3.3.3",
|
|
67
73
|
"@eslint/js": "^9.39.2",
|
|
68
74
|
"@ianvs/prettier-plugin-sort-imports": "^4.7.0",
|
|
69
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
70
|
-
"@typescript-eslint/parser": "^8.
|
|
75
|
+
"@typescript-eslint/eslint-plugin": "^8.52.0",
|
|
76
|
+
"@typescript-eslint/parser": "^8.52.0",
|
|
77
|
+
"@typhonjs-typedoc/ts-lib-docs": "^2024.12.25",
|
|
71
78
|
"@vitest/browser-playwright": "^4.0.16",
|
|
72
79
|
"@vitest/coverage-v8": "^4.0.16",
|
|
73
80
|
"eslint": "^9.39.2",
|
|
74
81
|
"eslint-config-prettier": "^10.1.8",
|
|
75
|
-
"eslint-plugin-jsdoc": "^
|
|
76
|
-
"globals": "^
|
|
82
|
+
"eslint-plugin-jsdoc": "^61.5.0",
|
|
83
|
+
"globals": "^17.0.0",
|
|
77
84
|
"happy-dom": "^20.0.11",
|
|
78
85
|
"npm-run-all2": "^8.0.4",
|
|
79
86
|
"prettier": "^3.7.4",
|
|
80
87
|
"typedoc": "^0.28.15",
|
|
81
88
|
"typedoc-plugin-extras": "^4.0.1",
|
|
82
89
|
"typedoc-plugin-mdn-links": "^5.0.10",
|
|
90
|
+
"typedoc-theme-fresh": "^0.2.3",
|
|
83
91
|
"typescript": "^5.9.3",
|
|
84
92
|
"vitest": "^4.0.16"
|
|
85
93
|
},
|