@toyz/loom 0.4.0 → 0.6.0
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/app.d.ts +4 -1
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +9 -9
- package/dist/app.js.map +1 -1
- package/dist/decorators/create.d.ts +16 -25
- package/dist/decorators/create.d.ts.map +1 -1
- package/dist/decorators/create.js +25 -34
- package/dist/decorators/create.js.map +1 -1
- package/dist/decorators/events.d.ts +10 -8
- package/dist/decorators/events.d.ts.map +1 -1
- package/dist/decorators/events.js +53 -43
- package/dist/decorators/events.js.map +1 -1
- package/dist/decorators/index.d.ts +1 -0
- package/dist/decorators/index.d.ts.map +1 -1
- package/dist/decorators/index.js +1 -0
- package/dist/decorators/index.js.map +1 -1
- package/dist/decorators/symbols.d.ts +2 -0
- package/dist/decorators/symbols.d.ts.map +1 -1
- package/dist/decorators/symbols.js +2 -0
- package/dist/decorators/symbols.js.map +1 -1
- package/dist/di/decorators.d.ts +15 -15
- package/dist/di/decorators.d.ts.map +1 -1
- package/dist/di/decorators.js +23 -33
- package/dist/di/decorators.js.map +1 -1
- package/dist/di/watch.d.ts +5 -20
- package/dist/di/watch.d.ts.map +1 -1
- package/dist/di/watch.js +5 -38
- package/dist/di/watch.js.map +1 -1
- package/dist/element/decorators.d.ts +26 -10
- package/dist/element/decorators.d.ts.map +1 -1
- package/dist/element/decorators.js +75 -31
- package/dist/element/decorators.js.map +1 -1
- package/dist/element/element.d.ts.map +1 -1
- package/dist/element/element.js +15 -3
- package/dist/element/element.js.map +1 -1
- package/dist/element/form.d.ts +63 -0
- package/dist/element/form.d.ts.map +1 -0
- package/dist/element/form.js +167 -0
- package/dist/element/form.js.map +1 -0
- package/dist/element/icon.d.ts +3 -3
- package/dist/element/icon.d.ts.map +1 -1
- package/dist/element/icon.js +131 -74
- package/dist/element/icon.js.map +1 -1
- package/dist/element/index.d.ts +8 -1
- package/dist/element/index.d.ts.map +1 -1
- package/dist/element/index.js +9 -1
- package/dist/element/index.js.map +1 -1
- package/dist/element/lazy.d.ts +31 -0
- package/dist/element/lazy.d.ts.map +1 -0
- package/dist/element/lazy.js +71 -0
- package/dist/element/lazy.js.map +1 -0
- package/dist/element/lifecycle.d.ts +27 -29
- package/dist/element/lifecycle.d.ts.map +1 -1
- package/dist/element/lifecycle.js +60 -79
- package/dist/element/lifecycle.js.map +1 -1
- package/dist/element/slots.d.ts +23 -0
- package/dist/element/slots.d.ts.map +1 -0
- package/dist/element/slots.js +54 -0
- package/dist/element/slots.js.map +1 -0
- package/dist/element/timing.d.ts +10 -7
- package/dist/element/timing.d.ts.map +1 -1
- package/dist/element/timing.js +67 -52
- package/dist/element/timing.js.map +1 -1
- package/dist/element/transition.d.ts +32 -0
- package/dist/element/transition.d.ts.map +1 -0
- package/dist/element/transition.js +70 -0
- package/dist/element/transition.js.map +1 -0
- package/dist/element/virtual.js +235 -194
- package/dist/element/virtual.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/router/decorators.d.ts +9 -38
- package/dist/router/decorators.d.ts.map +1 -1
- package/dist/router/decorators.js +7 -52
- package/dist/router/decorators.js.map +1 -1
- package/dist/router/link.d.ts +4 -4
- package/dist/router/link.d.ts.map +1 -1
- package/dist/router/link.js +134 -72
- package/dist/router/link.js.map +1 -1
- package/dist/router/outlet.d.ts +2 -2
- package/dist/router/outlet.d.ts.map +1 -1
- package/dist/router/outlet.js +188 -138
- package/dist/router/outlet.js.map +1 -1
- package/dist/router/route-lifecycle.d.ts +2 -2
- package/dist/router/route-lifecycle.d.ts.map +1 -1
- package/dist/router/route-lifecycle.js +18 -8
- package/dist/router/route-lifecycle.js.map +1 -1
- package/dist/router/route.d.ts +1 -1
- package/dist/router/route.d.ts.map +1 -1
- package/dist/router/router.js +2 -2
- package/dist/router/router.js.map +1 -1
- package/dist/store/decorators.d.ts +32 -24
- package/dist/store/decorators.d.ts.map +1 -1
- package/dist/store/decorators.js +98 -117
- package/dist/store/decorators.js.map +1 -1
- package/dist/store/watch.d.ts +24 -11
- package/dist/store/watch.d.ts.map +1 -1
- package/dist/store/watch.js +43 -16
- package/dist/store/watch.js.map +1 -1
- package/dist/testing.d.ts +55 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +99 -0
- package/dist/testing.js.map +1 -0
- package/dist/transform/transform.d.ts +7 -3
- package/dist/transform/transform.d.ts.map +1 -1
- package/dist/transform/transform.js +17 -9
- package/dist/transform/transform.js.map +1 -1
- package/dist/transform/typed.d.ts +1 -1
- package/dist/transform/typed.d.ts.map +1 -1
- package/dist/transform/typed.js.map +1 -1
- package/package.json +5 -1
|
@@ -1,57 +1,55 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Loom —
|
|
2
|
+
* Loom — Lifecycle decorators (TC39 Stage 3)
|
|
3
3
|
*
|
|
4
|
-
* @catch_ —
|
|
5
|
-
* @suspend —
|
|
6
|
-
* @mount — connectedCallback
|
|
7
|
-
* @unmount — disconnectedCallback
|
|
4
|
+
* @catch_ — Wrap update() with a try/catch, render fallback on error
|
|
5
|
+
* @suspend — Show fallback until method resolves
|
|
6
|
+
* @mount — Run method on connectedCallback
|
|
7
|
+
* @unmount — Run method on disconnectedCallback
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
/** Function called when update() throws */
|
|
10
|
+
type CatchFn = (error: unknown, element: HTMLElement & {
|
|
11
|
+
shadow: ShadowRoot;
|
|
12
|
+
}) => void;
|
|
10
13
|
/**
|
|
11
|
-
* Error
|
|
12
|
-
*
|
|
14
|
+
* Error-boundary decorator. If update() throws, catches the error
|
|
15
|
+
* and calls the handler with (error, element).
|
|
13
16
|
*
|
|
14
17
|
* ```ts
|
|
15
|
-
* @component("my-
|
|
16
|
-
* @catch_((err, el) => {
|
|
17
|
-
*
|
|
18
|
-
* })
|
|
19
|
-
* class MyWidget extends LoomElement { ... }
|
|
18
|
+
* @component("my-page")
|
|
19
|
+
* @catch_((err, el) => { el.shadow.innerHTML = `<p>Error: ${err}</p>`; })
|
|
20
|
+
* class MyPage extends LoomElement { ... }
|
|
20
21
|
* ```
|
|
21
22
|
*/
|
|
22
|
-
export declare
|
|
23
|
+
export declare function catch_(handler: CatchFn): (value: Function, _context: ClassDecoratorContext) => void;
|
|
23
24
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
25
|
+
* Suspend decorator. Wraps an async method with loading/error state
|
|
26
|
+
* management. Sets `this.loading = true` before the call, and
|
|
27
|
+
* `this.loading = false` after. Captures errors on `this.error`.
|
|
26
28
|
*
|
|
29
|
+
* Use as `@suspend()` on a method:
|
|
27
30
|
* ```ts
|
|
28
31
|
* @suspend()
|
|
29
|
-
* async
|
|
30
|
-
* const res = await fetch(`/api/users/${this.userId}`);
|
|
31
|
-
* this.user = await res.json();
|
|
32
|
-
* }
|
|
32
|
+
* async fetchData() { this.result = await api.get(); }
|
|
33
33
|
* ```
|
|
34
34
|
*/
|
|
35
|
-
export declare function suspend(): (
|
|
35
|
+
export declare function suspend(): (method: Function, context: ClassMethodDecoratorContext) => (this: any, ...args: any[]) => Promise<any>;
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
38
|
-
* Multiple @mount methods per class allowed. No need to call super.
|
|
37
|
+
* Run decorated method when the element connects to the DOM.
|
|
39
38
|
*
|
|
40
39
|
* ```ts
|
|
41
40
|
* @mount
|
|
42
|
-
* setup() { this.
|
|
41
|
+
* setup() { this.shadow.adoptedStyleSheets = [myStyles]; }
|
|
43
42
|
* ```
|
|
44
43
|
*/
|
|
45
|
-
export declare function mount(
|
|
44
|
+
export declare function mount(method: Function, context: ClassMethodDecoratorContext): void;
|
|
46
45
|
/**
|
|
47
|
-
*
|
|
48
|
-
* Multiple @unmount methods per class allowed. Runs BEFORE track() cleanup.
|
|
46
|
+
* Run decorated method when the element disconnects from the DOM.
|
|
49
47
|
*
|
|
50
48
|
* ```ts
|
|
51
49
|
* @unmount
|
|
52
|
-
*
|
|
50
|
+
* teardown() { console.log("removed!"); }
|
|
53
51
|
* ```
|
|
54
52
|
*/
|
|
55
|
-
export declare function unmount(
|
|
53
|
+
export declare function unmount(method: Function, context: ClassMethodDecoratorContext): void;
|
|
56
54
|
export {};
|
|
57
55
|
//# sourceMappingURL=lifecycle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../src/element/lifecycle.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,KAAK,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../src/element/lifecycle.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,2CAA2C;AAC3C,KAAK,OAAO,GAAG,CACb,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,WAAW,GAAG;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,KAC1C,IAAI,CAAC;AAEV;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,OAAO,IAC7B,OAAO,QAAQ,EAAE,UAAU,qBAAqB,UAWzD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,OAAO,KACb,QAAQ,QAAQ,EAAE,SAAS,2BAA2B,MAC3C,MAAM,GAAG,EAAE,GAAG,MAAM,GAAG,EAAE,kBAkB7C;AAGD;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,2BAA2B,QAO3E;AAED;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,2BAA2B,QAQ7E"}
|
|
@@ -1,120 +1,101 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Loom —
|
|
2
|
+
* Loom — Lifecycle decorators (TC39 Stage 3)
|
|
3
3
|
*
|
|
4
|
-
* @catch_ —
|
|
5
|
-
* @suspend —
|
|
6
|
-
* @mount — connectedCallback
|
|
7
|
-
* @unmount — disconnectedCallback
|
|
4
|
+
* @catch_ — Wrap update() with a try/catch, render fallback on error
|
|
5
|
+
* @suspend — Show fallback until method resolves
|
|
6
|
+
* @mount — Run method on connectedCallback
|
|
7
|
+
* @unmount — Run method on disconnectedCallback
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
9
|
+
import { CONNECT_HOOKS } from "../decorators/symbols";
|
|
10
10
|
/**
|
|
11
|
-
* Error
|
|
12
|
-
*
|
|
11
|
+
* Error-boundary decorator. If update() throws, catches the error
|
|
12
|
+
* and calls the handler with (error, element).
|
|
13
13
|
*
|
|
14
14
|
* ```ts
|
|
15
|
-
* @component("my-
|
|
16
|
-
* @catch_((err, el) => {
|
|
17
|
-
*
|
|
18
|
-
* })
|
|
19
|
-
* class MyWidget extends LoomElement { ... }
|
|
15
|
+
* @component("my-page")
|
|
16
|
+
* @catch_((err, el) => { el.shadow.innerHTML = `<p>Error: ${err}</p>`; })
|
|
17
|
+
* class MyPage extends LoomElement { ... }
|
|
20
18
|
* ```
|
|
21
19
|
*/
|
|
22
|
-
export
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const origUpdate = ctor.prototype.update;
|
|
29
|
-
if (origUpdate) {
|
|
30
|
-
ctor.prototype.update = function () {
|
|
31
|
-
try {
|
|
32
|
-
return origUpdate.call(this);
|
|
33
|
-
}
|
|
34
|
-
catch (err) {
|
|
35
|
-
handler(err, this);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
20
|
+
export function catch_(handler) {
|
|
21
|
+
return (value, _context) => {
|
|
22
|
+
const origUpdate = value.prototype.update;
|
|
23
|
+
value.prototype.update = function () {
|
|
24
|
+
try {
|
|
25
|
+
return origUpdate.call(this);
|
|
38
26
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
ctor.prototype.connectedCallback = function () {
|
|
43
|
-
try {
|
|
44
|
-
origConnect.call(this);
|
|
45
|
-
}
|
|
46
|
-
catch (err) {
|
|
47
|
-
handler(err, this);
|
|
48
|
-
}
|
|
49
|
-
};
|
|
27
|
+
catch (err) {
|
|
28
|
+
handler(err, this);
|
|
29
|
+
return null;
|
|
50
30
|
}
|
|
51
31
|
};
|
|
52
32
|
};
|
|
53
|
-
}
|
|
33
|
+
}
|
|
54
34
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
35
|
+
* Suspend decorator. Wraps an async method with loading/error state
|
|
36
|
+
* management. Sets `this.loading = true` before the call, and
|
|
37
|
+
* `this.loading = false` after. Captures errors on `this.error`.
|
|
57
38
|
*
|
|
39
|
+
* Use as `@suspend()` on a method:
|
|
58
40
|
* ```ts
|
|
59
41
|
* @suspend()
|
|
60
|
-
* async
|
|
61
|
-
* const res = await fetch(`/api/users/${this.userId}`);
|
|
62
|
-
* this.user = await res.json();
|
|
63
|
-
* }
|
|
42
|
+
* async fetchData() { this.result = await api.get(); }
|
|
64
43
|
* ```
|
|
65
44
|
*/
|
|
66
45
|
export function suspend() {
|
|
67
|
-
return (
|
|
68
|
-
|
|
69
|
-
desc.value = async function (...args) {
|
|
46
|
+
return (method, context) => {
|
|
47
|
+
return function (...args) {
|
|
70
48
|
this.loading = true;
|
|
71
49
|
this.error = null;
|
|
72
|
-
|
|
73
|
-
|
|
50
|
+
this.scheduleUpdate?.();
|
|
51
|
+
return Promise.resolve()
|
|
52
|
+
.then(() => method.call(this, ...args))
|
|
53
|
+
.then((result) => {
|
|
54
|
+
this.loading = false;
|
|
55
|
+
this.scheduleUpdate?.();
|
|
74
56
|
return result;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
this.error = err;
|
|
78
|
-
const handler = this.constructor[CATCH_HANDLER];
|
|
79
|
-
if (handler)
|
|
80
|
-
handler(err, this);
|
|
81
|
-
}
|
|
82
|
-
finally {
|
|
57
|
+
})
|
|
58
|
+
.catch((err) => {
|
|
83
59
|
this.loading = false;
|
|
84
|
-
|
|
60
|
+
this.error = err;
|
|
61
|
+
this.scheduleUpdate?.();
|
|
62
|
+
});
|
|
85
63
|
};
|
|
86
64
|
};
|
|
87
65
|
}
|
|
88
66
|
/**
|
|
89
|
-
*
|
|
90
|
-
* Multiple @mount methods per class allowed. No need to call super.
|
|
67
|
+
* Run decorated method when the element connects to the DOM.
|
|
91
68
|
*
|
|
92
69
|
* ```ts
|
|
93
70
|
* @mount
|
|
94
|
-
* setup() { this.
|
|
71
|
+
* setup() { this.shadow.adoptedStyleSheets = [myStyles]; }
|
|
95
72
|
* ```
|
|
96
73
|
*/
|
|
97
|
-
export function mount(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
this[
|
|
102
|
-
|
|
74
|
+
export function mount(method, context) {
|
|
75
|
+
context.addInitializer(function () {
|
|
76
|
+
if (!this[CONNECT_HOOKS])
|
|
77
|
+
this[CONNECT_HOOKS] = [];
|
|
78
|
+
this[CONNECT_HOOKS].push((el) => {
|
|
79
|
+
method.call(el);
|
|
80
|
+
});
|
|
81
|
+
});
|
|
103
82
|
}
|
|
104
83
|
/**
|
|
105
|
-
*
|
|
106
|
-
* Multiple @unmount methods per class allowed. Runs BEFORE track() cleanup.
|
|
84
|
+
* Run decorated method when the element disconnects from the DOM.
|
|
107
85
|
*
|
|
108
86
|
* ```ts
|
|
109
87
|
* @unmount
|
|
110
|
-
*
|
|
88
|
+
* teardown() { console.log("removed!"); }
|
|
111
89
|
* ```
|
|
112
90
|
*/
|
|
113
|
-
export function unmount(
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
91
|
+
export function unmount(method, context) {
|
|
92
|
+
context.addInitializer(function () {
|
|
93
|
+
if (!this[CONNECT_HOOKS])
|
|
94
|
+
this[CONNECT_HOOKS] = [];
|
|
95
|
+
// Return a cleanup function that calls the unmount method
|
|
96
|
+
this[CONNECT_HOOKS].push((el) => {
|
|
97
|
+
return () => method.call(el);
|
|
98
|
+
});
|
|
99
|
+
});
|
|
119
100
|
}
|
|
120
101
|
//# sourceMappingURL=lifecycle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.js","sourceRoot":"","sources":["../../src/element/lifecycle.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"lifecycle.js","sourceRoot":"","sources":["../../src/element/lifecycle.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAQtD;;;;;;;;;GASG;AACH,MAAM,UAAU,MAAM,CAAC,OAAgB;IACrC,OAAO,CAAC,KAAe,EAAE,QAA+B,EAAE,EAAE;QAC1D,MAAM,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;QAC1C,KAAK,CAAC,SAAS,CAAC,MAAM,GAAG;YACvB,IAAI,CAAC;gBACH,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC/B,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,OAAO,CAAC,GAAG,EAAE,IAA4C,CAAC,CAAC;gBAC3D,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,OAAO;IACrB,OAAO,CAAC,MAAgB,EAAE,OAAoC,EAAE,EAAE;QAChE,OAAO,UAAqB,GAAG,IAAW;YACxC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;YACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;YAClB,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;YACxB,OAAO,OAAO,CAAC,OAAO,EAAE;iBACrB,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,I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 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loom — @slot<...T> decorator (TC39 Stage 3)
|
|
3
|
+
*
|
|
4
|
+
* Auto-accessor decorator that provides typed access to slot-assigned elements.
|
|
5
|
+
*
|
|
6
|
+
* ```ts
|
|
7
|
+
* // Default slot
|
|
8
|
+
* @slot()
|
|
9
|
+
* accessor content!: Element[];
|
|
10
|
+
*
|
|
11
|
+
* // Typed single
|
|
12
|
+
* @slot<CardHeader>("header")
|
|
13
|
+
* accessor headers!: CardHeader[];
|
|
14
|
+
*
|
|
15
|
+
* // Spread — heterogeneous
|
|
16
|
+
* @slot<CardHeader, CardBody, CardFooter>("content")
|
|
17
|
+
* accessor sections!: (CardHeader | CardBody | CardFooter)[];
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare function slot<T extends Element[] = [Element]>(name?: string): <This extends {
|
|
21
|
+
shadow: ShadowRoot;
|
|
22
|
+
}>(_target: ClassAccessorDecoratorTarget<This, T[number][]>, context: ClassAccessorDecoratorContext<This, T[number][]>) => ClassAccessorDecoratorResult<This, T[number][]>;
|
|
23
|
+
//# sourceMappingURL=slots.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slots.d.ts","sourceRoot":"","sources":["../../src/element/slots.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,wBAAgB,IAAI,CAAC,CAAC,SAAS,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,EAAE,MAAM,IACzD,IAAI,SAAS;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,EACzC,SAAS,4BAA4B,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,EACxD,SAAS,6BAA6B,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,KACxD,4BAA4B,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAmCnD"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { CONNECT_HOOKS } from "../decorators/symbols";
|
|
2
|
+
/**
|
|
3
|
+
* Loom — @slot<...T> decorator (TC39 Stage 3)
|
|
4
|
+
*
|
|
5
|
+
* Auto-accessor decorator that provides typed access to slot-assigned elements.
|
|
6
|
+
*
|
|
7
|
+
* ```ts
|
|
8
|
+
* // Default slot
|
|
9
|
+
* @slot()
|
|
10
|
+
* accessor content!: Element[];
|
|
11
|
+
*
|
|
12
|
+
* // Typed single
|
|
13
|
+
* @slot<CardHeader>("header")
|
|
14
|
+
* accessor headers!: CardHeader[];
|
|
15
|
+
*
|
|
16
|
+
* // Spread — heterogeneous
|
|
17
|
+
* @slot<CardHeader, CardBody, CardFooter>("content")
|
|
18
|
+
* accessor sections!: (CardHeader | CardBody | CardFooter)[];
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export function slot(name) {
|
|
22
|
+
return (_target, context) => {
|
|
23
|
+
const storageKey = Symbol(`slot:${String(context.name)}`);
|
|
24
|
+
context.addInitializer(function () {
|
|
25
|
+
if (!this[CONNECT_HOOKS])
|
|
26
|
+
this[CONNECT_HOOKS] = [];
|
|
27
|
+
this[CONNECT_HOOKS].push((el) => {
|
|
28
|
+
// Defer to allow update() to render the slot elements first
|
|
29
|
+
queueMicrotask(() => {
|
|
30
|
+
const selector = name ? `slot[name="${name}"]` : "slot:not([name])";
|
|
31
|
+
const slotEl = el.shadow.querySelector(selector);
|
|
32
|
+
if (!slotEl)
|
|
33
|
+
return;
|
|
34
|
+
const updateSlotted = () => {
|
|
35
|
+
el[storageKey] = slotEl.assignedElements({ flatten: true });
|
|
36
|
+
el.scheduleUpdate?.();
|
|
37
|
+
};
|
|
38
|
+
updateSlotted();
|
|
39
|
+
slotEl.addEventListener("slotchange", updateSlotted);
|
|
40
|
+
el.track(() => slotEl.removeEventListener("slotchange", updateSlotted));
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
return {
|
|
45
|
+
get() {
|
|
46
|
+
return this[storageKey] ?? [];
|
|
47
|
+
},
|
|
48
|
+
set(val) {
|
|
49
|
+
this[storageKey] = val;
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=slots.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slots.js","sourceRoot":"","sources":["../../src/element/slots.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,UAAU,IAAI,CAAkC,IAAa;IACjE,OAAO,CACL,OAAwD,EACxD,OAAyD,EACR,EAAE;QACnD,MAAM,UAAU,GAAG,MAAM,CAAC,QAAQ,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAE1D,OAAO,CAAC,cAAc,CAAC;YACrB,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC;gBAAE,IAAI,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC;YACnD,IAAI,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,CAAC,EAAO,EAAE,EAAE;gBACnC,4DAA4D;gBAC5D,cAAc,CAAC,GAAG,EAAE;oBAClB,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,kBAAkB,CAAC;oBACpE,MAAM,MAAM,GAAG,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,QAAQ,CAA2B,CAAC;oBAE3E,IAAI,CAAC,MAAM;wBAAE,OAAO;oBAEpB,MAAM,aAAa,GAAG,GAAG,EAAE;wBACzB,EAAE,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;wBAC5D,EAAE,CAAC,cAAc,EAAE,EAAE,CAAC;oBACxB,CAAC,CAAC;oBAEF,aAAa,EAAE,CAAC;oBAEhB,MAAM,CAAC,gBAAgB,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;oBACrD,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC;gBAC1E,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,OAAO;YACL,GAAG;gBACD,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;YAChC,CAAC;YACD,GAAG,CAAY,GAAgB;gBAC7B,IAAI,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC;YACzB,CAAC;SACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
package/dist/element/timing.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Loom — Element timing decorators
|
|
2
|
+
* Loom — Element timing decorators (TC39 Stage 3)
|
|
3
3
|
*
|
|
4
4
|
* @interval — Auto-cleaned setInterval
|
|
5
5
|
* @timeout — Auto-cleaned setTimeout
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* tick() { this.time = new Date(); }
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
|
-
export declare const interval: (ms: number) => (
|
|
19
|
+
export declare const interval: (ms: number) => (method: Function, context: ClassMethodDecoratorContext) => void;
|
|
20
20
|
/**
|
|
21
21
|
* Auto-cleaned setTimeout. Runs the method once after `ms` milliseconds.
|
|
22
22
|
* Timer is started on connect, cleared on disconnect via track().
|
|
@@ -26,7 +26,7 @@ export declare const interval: (ms: number) => (target: any, key: string, desc?:
|
|
|
26
26
|
* hideWelcome() { this.$(".welcome")?.remove(); }
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
|
-
export declare const timeout: (ms: number) => (
|
|
29
|
+
export declare const timeout: (ms: number) => (method: Function, context: ClassMethodDecoratorContext) => void;
|
|
30
30
|
/**
|
|
31
31
|
* Debounce a method — delays execution until `ms` of inactivity.
|
|
32
32
|
* Auto-cancels pending timer on disconnect.
|
|
@@ -36,7 +36,7 @@ export declare const timeout: (ms: number) => (target: any, key: string, desc?:
|
|
|
36
36
|
* onInput(e: Event) { this.query = (e.target as HTMLInputElement).value; }
|
|
37
37
|
* ```
|
|
38
38
|
*/
|
|
39
|
-
export declare
|
|
39
|
+
export declare function debounce(ms: number): (method: Function, context: ClassMethodDecoratorContext) => (this: any, ...args: unknown[]) => void;
|
|
40
40
|
/**
|
|
41
41
|
* Throttle a method — fires at most once per `ms` milliseconds.
|
|
42
42
|
* Uses trailing-edge: the last call within the window always fires.
|
|
@@ -47,7 +47,7 @@ export declare const debounce: (ms: number) => (target: any, key: string, desc?:
|
|
|
47
47
|
* onScroll() { this.offset = this.scrollTop; }
|
|
48
48
|
* ```
|
|
49
49
|
*/
|
|
50
|
-
export declare
|
|
50
|
+
export declare function throttle(ms: number): (method: Function, context: ClassMethodDecoratorContext) => (this: any, ...args: unknown[]) => void;
|
|
51
51
|
/**
|
|
52
52
|
* Centralized rAF loop via RenderLoop. Method receives (deltaTime, timestamp).
|
|
53
53
|
* Use layer to control execution order (lower = earlier).
|
|
@@ -58,8 +58,11 @@ export declare const throttle: (ms: number) => (target: any, key: string, desc?:
|
|
|
58
58
|
*
|
|
59
59
|
* @animationFrame() // default layer 0
|
|
60
60
|
* physics(dt: number) { ... }
|
|
61
|
+
*
|
|
62
|
+
* @animationFrame // also valid
|
|
63
|
+
* render(dt: number) { ... }
|
|
61
64
|
* ```
|
|
62
65
|
*/
|
|
63
|
-
export declare function animationFrame(layer?: number): (
|
|
64
|
-
export declare function animationFrame(
|
|
66
|
+
export declare function animationFrame(layer?: number): (method: Function, context: ClassMethodDecoratorContext) => void;
|
|
67
|
+
export declare function animationFrame(method: Function, context: ClassMethodDecoratorContext): void;
|
|
65
68
|
//# sourceMappingURL=timing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timing.d.ts","sourceRoot":"","sources":["../../src/element/timing.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"timing.d.ts","sourceRoot":"","sources":["../../src/element/timing.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ,kFAKnB,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,OAAO,kFAKlB,CAAC;AAEH;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,IACzB,QAAQ,QAAQ,EAAE,SAAS,2BAA2B,YAIjC,GAAG,WAAW,OAAO,EAAE,UAerD;AAED;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,IACzB,QAAQ,QAAQ,EAAE,SAAS,2BAA2B,YAKjC,GAAG,WAAW,OAAO,EAAE,UAyBrD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,2BAA2B,KAAK,IAAI,CAAC;AACjH,wBAAgB,cAAc,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,2BAA2B,GAAG,IAAI,CAAC"}
|
package/dist/element/timing.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Loom — Element timing decorators
|
|
2
|
+
* Loom — Element timing decorators (TC39 Stage 3)
|
|
3
3
|
*
|
|
4
4
|
* @interval — Auto-cleaned setInterval
|
|
5
5
|
* @timeout — Auto-cleaned setTimeout
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { renderLoop } from "../render-loop";
|
|
11
11
|
import { createDecorator } from "../decorators/create";
|
|
12
|
+
import { CONNECT_HOOKS } from "../decorators/symbols";
|
|
12
13
|
/**
|
|
13
14
|
* Auto-cleaned setInterval. Runs the method every `ms` milliseconds.
|
|
14
15
|
* Timer is started on connect, cleared on disconnect via track().
|
|
@@ -18,9 +19,9 @@ import { createDecorator } from "../decorators/create";
|
|
|
18
19
|
* tick() { this.time = new Date(); }
|
|
19
20
|
* ```
|
|
20
21
|
*/
|
|
21
|
-
export const interval = createDecorator((
|
|
22
|
+
export const interval = createDecorator((method, _key, ms) => {
|
|
22
23
|
return (el) => {
|
|
23
|
-
const id = setInterval(() => el
|
|
24
|
+
const id = setInterval(() => method.call(el), ms);
|
|
24
25
|
return () => clearInterval(id);
|
|
25
26
|
};
|
|
26
27
|
});
|
|
@@ -33,9 +34,9 @@ export const interval = createDecorator((_proto, key, ms) => {
|
|
|
33
34
|
* hideWelcome() { this.$(".welcome")?.remove(); }
|
|
34
35
|
* ```
|
|
35
36
|
*/
|
|
36
|
-
export const timeout = createDecorator((
|
|
37
|
+
export const timeout = createDecorator((method, _key, ms) => {
|
|
37
38
|
return (el) => {
|
|
38
|
-
const id = setTimeout(() => el
|
|
39
|
+
const id = setTimeout(() => method.call(el), ms);
|
|
39
40
|
return () => clearTimeout(id);
|
|
40
41
|
};
|
|
41
42
|
});
|
|
@@ -48,19 +49,25 @@ export const timeout = createDecorator((_proto, key, ms) => {
|
|
|
48
49
|
* onInput(e: Event) { this.query = (e.target as HTMLInputElement).value; }
|
|
49
50
|
* ```
|
|
50
51
|
*/
|
|
51
|
-
export
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
52
|
+
export function debounce(ms) {
|
|
53
|
+
return (method, context) => {
|
|
54
|
+
const timerKey = `__debounce_${String(context.name)}`;
|
|
55
|
+
// Replace with debounced version
|
|
56
|
+
function replacement(...args) {
|
|
57
|
+
clearTimeout(this[timerKey]);
|
|
58
|
+
this[timerKey] = setTimeout(() => method.apply(this, args), ms);
|
|
59
|
+
}
|
|
60
|
+
// Lifecycle: cancel pending timer on disconnect
|
|
61
|
+
context.addInitializer(function () {
|
|
62
|
+
if (!this[CONNECT_HOOKS])
|
|
63
|
+
this[CONNECT_HOOKS] = [];
|
|
64
|
+
this[CONNECT_HOOKS].push((el) => {
|
|
65
|
+
return () => clearTimeout(el[timerKey]);
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
return replacement;
|
|
62
69
|
};
|
|
63
|
-
}
|
|
70
|
+
}
|
|
64
71
|
/**
|
|
65
72
|
* Throttle a method — fires at most once per `ms` milliseconds.
|
|
66
73
|
* Uses trailing-edge: the last call within the window always fires.
|
|
@@ -71,46 +78,54 @@ export const debounce = createDecorator((proto, key, ms) => {
|
|
|
71
78
|
* onScroll() { this.offset = this.scrollTop; }
|
|
72
79
|
* ```
|
|
73
80
|
*/
|
|
74
|
-
export
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
export function throttle(ms) {
|
|
82
|
+
return (method, context) => {
|
|
83
|
+
const lastKey = `__throttle_last_${String(context.name)}`;
|
|
84
|
+
const timerKey = `__throttle_timer_${String(context.name)}`;
|
|
85
|
+
// Replace with throttled version
|
|
86
|
+
function replacement(...args) {
|
|
87
|
+
const now = Date.now();
|
|
88
|
+
if (!this[lastKey] || now - this[lastKey] >= ms) {
|
|
89
|
+
this[lastKey] = now;
|
|
90
|
+
method.apply(this, args);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
clearTimeout(this[timerKey]);
|
|
94
|
+
this[timerKey] = setTimeout(() => {
|
|
95
|
+
this[lastKey] = Date.now();
|
|
96
|
+
method.apply(this, args);
|
|
97
|
+
}, ms - (now - this[lastKey]));
|
|
98
|
+
}
|
|
84
99
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
this[
|
|
88
|
-
this[
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
return (el) => {
|
|
95
|
-
return () => clearTimeout(el[timerKey]);
|
|
100
|
+
// Lifecycle: cancel pending timer on disconnect
|
|
101
|
+
context.addInitializer(function () {
|
|
102
|
+
if (!this[CONNECT_HOOKS])
|
|
103
|
+
this[CONNECT_HOOKS] = [];
|
|
104
|
+
this[CONNECT_HOOKS].push((el) => {
|
|
105
|
+
return () => clearTimeout(el[timerKey]);
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
return replacement;
|
|
96
109
|
};
|
|
97
|
-
}
|
|
98
|
-
export function animationFrame(
|
|
99
|
-
// Called as @animationFrame (no parens)
|
|
100
|
-
if (typeof
|
|
101
|
-
wireAnimationFrame(
|
|
110
|
+
}
|
|
111
|
+
export function animationFrame(methodOrLayer, context) {
|
|
112
|
+
// Called as @animationFrame (no parens) — method is first arg
|
|
113
|
+
if (typeof methodOrLayer === "function" && context) {
|
|
114
|
+
wireAnimationFrame(methodOrLayer, context, 0);
|
|
102
115
|
return;
|
|
103
116
|
}
|
|
104
117
|
// Called as @animationFrame() or @animationFrame(layer)
|
|
105
|
-
const layer = typeof
|
|
106
|
-
return (
|
|
118
|
+
const layer = typeof methodOrLayer === "number" ? methodOrLayer : 0;
|
|
119
|
+
return (method, ctx) => wireAnimationFrame(method, ctx, layer);
|
|
107
120
|
}
|
|
108
|
-
/** Internal:
|
|
109
|
-
function wireAnimationFrame(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
this.
|
|
114
|
-
|
|
121
|
+
/** Internal: wire rAF lifecycle via addInitializer */
|
|
122
|
+
function wireAnimationFrame(method, context, layer) {
|
|
123
|
+
context.addInitializer(function () {
|
|
124
|
+
if (!this[CONNECT_HOOKS])
|
|
125
|
+
this[CONNECT_HOOKS] = [];
|
|
126
|
+
this[CONNECT_HOOKS].push((el) => {
|
|
127
|
+
return renderLoop.add(layer, (dt, t) => method.call(el, dt, t));
|
|
128
|
+
});
|
|
129
|
+
});
|
|
115
130
|
}
|
|
116
131
|
//# sourceMappingURL=timing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timing.js","sourceRoot":"","sources":["../../src/element/timing.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"timing.js","sourceRoot":"","sources":["../../src/element/timing.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAe,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE;IACzE,OAAO,CAAC,EAAO,EAAE,EAAE;QACjB,MAAM,EAAE,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QAClD,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;IACjC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAe,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE;IACxE,OAAO,CAAC,EAAO,EAAE,EAAE;QACjB,MAAM,EAAE,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACjD,OAAO,GAAG,EAAE,CAAC,YAAY,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