@torpor/view 0.4.6 → 0.4.7
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/CHANGELOG.md +7 -0
- package/dist/compile.cjs +8 -1
- package/dist/compile.cjs.map +1 -1
- package/dist/compile.js +8 -1
- package/dist/compile.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/compile/build/client/buildFragment.ts +9 -0
- package/src/render/addEvent.ts +4 -2
- package/test/await/components/output/Await-client.ts +1 -1
- package/test/await/components/temp/{Await-client-8ad3f252c4550020753eea3c04cde0da435c6aae.ts → Await-client-1587441666890e0beae15f28451bcd04b90cc597.ts} +1 -1
- package/test/bind/components/output/BindText-client.ts +1 -1
- package/test/bind/components/temp/{BindText-client-eebe53ed8c48b5bbd046621efa6d9b5d3d753f6f.ts → BindText-client-c56c86c514eed2bcbe3f9c1bf23507a98d7d14b1.ts} +1 -1
- package/test/class/components/output/Class-client.ts +1 -1
- package/test/class/components/temp/{Class-client-28a59ce1bd5ccd2c6cc48d803216a5346fcf2329.ts → Class-client-d0f120c1171030cbe2862a26bc11965cacdd2b18.ts} +1 -1
- package/test/events/components/output/Events-client.ts +2 -2
- package/test/events/components/temp/{Events-client-af611081aa6cb1567461367daf3068df86c6ff23.ts → Events-client-8708dd031fb42b980e47799e6f6c0de7a35ef7ae.ts} +2 -2
- package/test/for/components/output/ForContainingFunction-client.ts +1 -1
- package/test/for/components/temp/{ForContainingFunction-client-f29a23d27f5458760406127c58520d6abf924409.ts → ForContainingFunction-client-77ccaeea93b0a489c97113bd6bc522e62b7c914a.ts} +1 -1
- package/test/function/components/output/Function-client.ts +1 -1
- package/test/function/components/temp/{Function-client-8ae7f26bcaee6b57251659efc2abcdfd9c0d30e1.ts → Function-client-5173bdb6a5e2eb86060579eb23f70fec20e9b612.ts} +1 -1
- package/test/if/components/output/IfContainingFunction-client.ts +1 -1
- package/test/if/components/temp/{IfContainingFunction-client-1d8f1ce12f4098b425be18149d9c58ea9c4e8de6.ts → IfContainingFunction-client-56c90b091921645a91d5398739cec4e6d56aa0ed.ts} +1 -1
- package/test/party/components/output/Conditional-client.ts +1 -1
- package/test/party/components/output/Context-client.ts +1 -1
- package/test/party/components/output/EmitToParent-client.ts +2 -2
- package/test/party/components/output/EventClick-client.ts +1 -1
- package/test/party/components/output/InputSelect-client.ts +2 -2
- package/test/party/components/temp/{Conditional-client-ed1ba6a97d722503560ffbb3dece1d9af5fbadd2.ts → Conditional-client-96ff11fe28ab46048761ff885b8224635244cd38.ts} +1 -1
- package/test/party/components/temp/{Context-client-fd121c4a2766ee5b41caf79f485f5f11142e43e0.ts → Context-client-73383a2149cb9198a5dfebf1e891987d261f399f.ts} +1 -1
- package/test/party/components/temp/{EmitToParent-client-3666116e65f3e8d4dbb0782d93f631a855b094ec.ts → EmitToParent-client-1292c44777f86076cd7c4060deb2016b9fb7e4cd.ts} +2 -2
- package/test/party/components/temp/{EventClick-client-4344b8012e6f6310b25c6b43d9f5991dc93037e8.ts → EventClick-client-932a2a4a797aca3cb6b869daa0ba314b46505a73.ts} +1 -1
- package/test/party/components/temp/{InputSelect-client-6827b541b2a0569745e21823bc3420bdfff746b2.ts → InputSelect-client-fa6d6680ce239722a0c29b754a2adc26dd2b4ab0.ts} +2 -2
- package/test/props/components/output/Reactive-client.ts +1 -1
- package/test/props/components/temp/{Reactive-client-dc9aadcdcb4a950141942769806a1017c9076b20.ts → Reactive-client-8601769debe846fc809ca960f0ca4b71762912db.ts} +1 -1
|
@@ -33,8 +33,8 @@ export default function Increment(
|
|
|
33
33
|
|
|
34
34
|
const t_fragment_0 = t_fragment($parent.ownerDocument!, t_fragments, 0, ` <button id="increment"> Increment </button> <button id="increment5"> Increment </button> <p>#</p> `);
|
|
35
35
|
const t_root_0 = t_root(t_fragment_0, true);
|
|
36
|
-
const t_button_1 = t_next(t_root_0) as
|
|
37
|
-
const t_button_2 = t_next(t_next(t_button_1, true)) as
|
|
36
|
+
const t_button_1 = t_next(t_root_0) as HTMLButtonElement;
|
|
37
|
+
const t_button_2 = t_next(t_next(t_button_1, true)) as HTMLButtonElement;
|
|
38
38
|
const t_text_1 = t_child(t_next(t_next(t_button_2, true)));
|
|
39
39
|
const t_text_2 = t_next(t_next(t_next(t_button_2, true)), true);
|
|
40
40
|
t_event(t_button_1, "click", increment);
|
|
@@ -62,7 +62,7 @@ export default function ForContainingIf(
|
|
|
62
62
|
let t_old_region_1 = t_push_region(t_item_1);
|
|
63
63
|
const t_fragment_1 = t_fragment($parent.ownerDocument!, t_fragments, 1, ` <button>#</button> `);
|
|
64
64
|
const t_root_1 = t_root(t_fragment_1, true);
|
|
65
|
-
const t_button_1 = t_next(t_root_1) as
|
|
65
|
+
const t_button_1 = t_next(t_root_1) as HTMLButtonElement;
|
|
66
66
|
const t_text_1 = t_child(t_button_1);
|
|
67
67
|
t_event(t_button_1, "click", doit);
|
|
68
68
|
|
|
@@ -62,7 +62,7 @@ export default function ForContainingIf(
|
|
|
62
62
|
let t_old_region_1 = t_push_region(t_item_1);
|
|
63
63
|
const t_fragment_1 = t_fragment($parent.ownerDocument!, t_fragments, 1, ` <button>#</button> `);
|
|
64
64
|
const t_root_1 = t_root(t_fragment_1, true);
|
|
65
|
-
const t_button_1 = t_next(t_root_1) as
|
|
65
|
+
const t_button_1 = t_next(t_root_1) as HTMLButtonElement;
|
|
66
66
|
const t_text_1 = t_child(t_button_1);
|
|
67
67
|
t_event(t_button_1, "click", doit);
|
|
68
68
|
|
|
@@ -29,7 +29,7 @@ export default function Function(
|
|
|
29
29
|
|
|
30
30
|
const t_fragment_0 = t_fragment($parent.ownerDocument!, t_fragments, 0, ` <button id=increment>Increment</button> <p>#</p> `);
|
|
31
31
|
const t_root_0 = t_root(t_fragment_0, true);
|
|
32
|
-
const t_button_1 = t_next(t_root_0) as
|
|
32
|
+
const t_button_1 = t_next(t_root_0) as HTMLButtonElement;
|
|
33
33
|
const t_text_1 = t_child(t_next(t_next(t_button_1, true)));
|
|
34
34
|
const t_text_2 = t_next(t_next(t_next(t_button_1, true)), true);
|
|
35
35
|
t_event(t_button_1, "click", increment);
|
|
@@ -29,7 +29,7 @@ export default function Function(
|
|
|
29
29
|
|
|
30
30
|
const t_fragment_0 = t_fragment($parent.ownerDocument!, t_fragments, 0, ` <button id=increment>Increment</button> <p>#</p> `);
|
|
31
31
|
const t_root_0 = t_root(t_fragment_0, true);
|
|
32
|
-
const t_button_1 = t_next(t_root_0) as
|
|
32
|
+
const t_button_1 = t_next(t_root_0) as HTMLButtonElement;
|
|
33
33
|
const t_text_1 = t_child(t_next(t_next(t_button_1, true)));
|
|
34
34
|
const t_text_2 = t_next(t_next(t_next(t_button_1, true)), true);
|
|
35
35
|
t_event(t_button_1, "click", increment);
|
|
@@ -39,7 +39,7 @@ export default function IfContainingIf(
|
|
|
39
39
|
t_if_creators_1[0] = (t_before) => {
|
|
40
40
|
const t_fragment_1 = t_fragment($parent.ownerDocument!, t_fragments, 1, ` <button>do it</button> `);
|
|
41
41
|
const t_root_1 = t_root(t_fragment_1, true);
|
|
42
|
-
const t_button_1 = t_next(t_root_1) as
|
|
42
|
+
const t_button_1 = t_next(t_root_1) as HTMLButtonElement;
|
|
43
43
|
t_event(t_button_1, "click", doit);
|
|
44
44
|
|
|
45
45
|
/* @function */
|
|
@@ -39,7 +39,7 @@ export default function IfContainingIf(
|
|
|
39
39
|
t_if_creators_1[0] = (t_before) => {
|
|
40
40
|
const t_fragment_1 = t_fragment($parent.ownerDocument!, t_fragments, 1, ` <button>do it</button> `);
|
|
41
41
|
const t_root_1 = t_root(t_fragment_1, true);
|
|
42
|
-
const t_button_1 = t_next(t_root_1) as
|
|
42
|
+
const t_button_1 = t_next(t_root_1) as HTMLButtonElement;
|
|
43
43
|
t_event(t_button_1, "click", doit);
|
|
44
44
|
|
|
45
45
|
/* @function */
|
|
@@ -43,7 +43,7 @@ export default function TrafficLight(
|
|
|
43
43
|
|
|
44
44
|
const t_fragment_0 = t_fragment($parent.ownerDocument!, t_fragments, 0, ` <button>Next light</button> <p>#</p> <p> You must <!> </p> `);
|
|
45
45
|
const t_root_0 = t_root(t_fragment_0, true);
|
|
46
|
-
const t_button_1 = t_next(t_root_0) as
|
|
46
|
+
const t_button_1 = t_next(t_root_0) as HTMLButtonElement;
|
|
47
47
|
const t_text_1 = t_child(t_next(t_next(t_button_1, true)));
|
|
48
48
|
const t_if_parent_1 = t_next(t_next(t_next(t_next(t_button_1, true)), true)) as HTMLElement;
|
|
49
49
|
let t_if_anchor_1 = t_anchor(t_next(t_child(t_next(t_next(t_next(t_next(t_button_1, true)), true))))) as HTMLElement;
|
|
@@ -74,7 +74,7 @@ function UserProfileContext(
|
|
|
74
74
|
const t_root_0 = t_root(t_fragment_0, true);
|
|
75
75
|
const t_text_1 = t_child(t_next(t_next(t_next(t_root_0), true)));
|
|
76
76
|
const t_text_2 = t_child(t_next(t_next(t_next(t_next(t_next(t_root_0), true)), true)));
|
|
77
|
-
const t_button_1 = t_next(t_next(t_next(t_next(t_next(t_next(t_next(t_root_0), true)), true)), true)) as
|
|
77
|
+
const t_button_1 = t_next(t_next(t_next(t_next(t_next(t_next(t_next(t_root_0), true)), true)), true)) as HTMLButtonElement;
|
|
78
78
|
const t_text_3 = t_next(t_button_1, true);
|
|
79
79
|
t_event(t_button_1, "click", () => ($context.user.username = "Jane"));
|
|
80
80
|
$run(() => {
|
|
@@ -80,8 +80,8 @@ function AnswerButton(
|
|
|
80
80
|
|
|
81
81
|
const t_fragment_0 = t_fragment($parent.ownerDocument!, t_fragments, 0, ` <button>YES</button> <button>NO</button> `);
|
|
82
82
|
const t_root_0 = t_root(t_fragment_0, true);
|
|
83
|
-
const t_button_1 = t_next(t_root_0) as
|
|
84
|
-
const t_button_2 = t_next(t_next(t_button_1, true)) as
|
|
83
|
+
const t_button_1 = t_next(t_root_0) as HTMLButtonElement;
|
|
84
|
+
const t_button_2 = t_next(t_next(t_button_1, true)) as HTMLButtonElement;
|
|
85
85
|
const t_text_1 = t_next(t_button_2, true);
|
|
86
86
|
t_event(t_button_1, "click", $props.onYes);
|
|
87
87
|
t_event(t_button_2, "click", $props.onNo);
|
|
@@ -36,7 +36,7 @@ export default function Counter(
|
|
|
36
36
|
const t_fragment_0 = t_fragment($parent.ownerDocument!, t_fragments, 0, ` <p>#</p> <button>+1</button> `);
|
|
37
37
|
const t_root_0 = t_root(t_fragment_0, true);
|
|
38
38
|
const t_text_1 = t_child(t_next(t_root_0));
|
|
39
|
-
const t_button_1 = t_next(t_next(t_next(t_root_0), true)) as
|
|
39
|
+
const t_button_1 = t_next(t_next(t_next(t_root_0), true)) as HTMLButtonElement;
|
|
40
40
|
const t_text_2 = t_next(t_button_1, true);
|
|
41
41
|
t_event(t_button_1, "click", incrementCount);
|
|
42
42
|
$run(() => {
|
|
@@ -47,7 +47,7 @@ export default function ColorSelect(
|
|
|
47
47
|
const t_fragment_0 = t_fragment($parent.ownerDocument!, t_fragments, 0, ` <div>#</div> <select> <!> </select> `);
|
|
48
48
|
const t_root_0 = t_root(t_fragment_0, true);
|
|
49
49
|
const t_text_1 = t_child(t_next(t_root_0));
|
|
50
|
-
const t_select_1 = t_next(t_next(t_next(t_root_0), true)) as
|
|
50
|
+
const t_select_1 = t_next(t_next(t_next(t_root_0), true)) as HTMLSelectElement;
|
|
51
51
|
let t_for_anchor_1 = t_anchor(t_next(t_child(t_select_1))) as HTMLElement;
|
|
52
52
|
|
|
53
53
|
/* @for */
|
|
@@ -76,7 +76,7 @@ export default function ColorSelect(
|
|
|
76
76
|
let t_old_region_1 = t_push_region(t_item_1);
|
|
77
77
|
const t_fragment_1 = t_fragment($parent.ownerDocument!, t_fragments, 1, ` <option>#</option> `);
|
|
78
78
|
const t_root_1 = t_root(t_fragment_1, true);
|
|
79
|
-
const t_option_1 = t_next(t_root_1) as
|
|
79
|
+
const t_option_1 = t_next(t_root_1) as HTMLOptionElement;
|
|
80
80
|
const t_text_2 = t_child(t_option_1);
|
|
81
81
|
const t_text_3 = t_next(t_option_1, true);
|
|
82
82
|
$run(() => {
|
|
@@ -43,7 +43,7 @@ export default function TrafficLight(
|
|
|
43
43
|
|
|
44
44
|
const t_fragment_0 = t_fragment($parent.ownerDocument!, t_fragments, 0, ` <button>Next light</button> <p>#</p> <p> You must <!> </p> `);
|
|
45
45
|
const t_root_0 = t_root(t_fragment_0, true);
|
|
46
|
-
const t_button_1 = t_next(t_root_0) as
|
|
46
|
+
const t_button_1 = t_next(t_root_0) as HTMLButtonElement;
|
|
47
47
|
const t_text_1 = t_child(t_next(t_next(t_button_1, true)));
|
|
48
48
|
const t_if_parent_1 = t_next(t_next(t_next(t_next(t_button_1, true)), true)) as HTMLElement;
|
|
49
49
|
let t_if_anchor_1 = t_anchor(t_next(t_child(t_next(t_next(t_next(t_next(t_button_1, true)), true))))) as HTMLElement;
|
|
@@ -74,7 +74,7 @@ function UserProfileContext(
|
|
|
74
74
|
const t_root_0 = t_root(t_fragment_0, true);
|
|
75
75
|
const t_text_1 = t_child(t_next(t_next(t_next(t_root_0), true)));
|
|
76
76
|
const t_text_2 = t_child(t_next(t_next(t_next(t_next(t_next(t_root_0), true)), true)));
|
|
77
|
-
const t_button_1 = t_next(t_next(t_next(t_next(t_next(t_next(t_next(t_root_0), true)), true)), true)) as
|
|
77
|
+
const t_button_1 = t_next(t_next(t_next(t_next(t_next(t_next(t_next(t_root_0), true)), true)), true)) as HTMLButtonElement;
|
|
78
78
|
const t_text_3 = t_next(t_button_1, true);
|
|
79
79
|
t_event(t_button_1, "click", () => ($context.user.username = "Jane"));
|
|
80
80
|
$run(() => {
|
|
@@ -80,8 +80,8 @@ function AnswerButton(
|
|
|
80
80
|
|
|
81
81
|
const t_fragment_0 = t_fragment($parent.ownerDocument!, t_fragments, 0, ` <button>YES</button> <button>NO</button> `);
|
|
82
82
|
const t_root_0 = t_root(t_fragment_0, true);
|
|
83
|
-
const t_button_1 = t_next(t_root_0) as
|
|
84
|
-
const t_button_2 = t_next(t_next(t_button_1, true)) as
|
|
83
|
+
const t_button_1 = t_next(t_root_0) as HTMLButtonElement;
|
|
84
|
+
const t_button_2 = t_next(t_next(t_button_1, true)) as HTMLButtonElement;
|
|
85
85
|
const t_text_1 = t_next(t_button_2, true);
|
|
86
86
|
t_event(t_button_1, "click", $props.onYes);
|
|
87
87
|
t_event(t_button_2, "click", $props.onNo);
|
|
@@ -36,7 +36,7 @@ export default function Counter(
|
|
|
36
36
|
const t_fragment_0 = t_fragment($parent.ownerDocument!, t_fragments, 0, ` <p>#</p> <button>+1</button> `);
|
|
37
37
|
const t_root_0 = t_root(t_fragment_0, true);
|
|
38
38
|
const t_text_1 = t_child(t_next(t_root_0));
|
|
39
|
-
const t_button_1 = t_next(t_next(t_next(t_root_0), true)) as
|
|
39
|
+
const t_button_1 = t_next(t_next(t_next(t_root_0), true)) as HTMLButtonElement;
|
|
40
40
|
const t_text_2 = t_next(t_button_1, true);
|
|
41
41
|
t_event(t_button_1, "click", incrementCount);
|
|
42
42
|
$run(() => {
|
|
@@ -47,7 +47,7 @@ export default function ColorSelect(
|
|
|
47
47
|
const t_fragment_0 = t_fragment($parent.ownerDocument!, t_fragments, 0, ` <div>#</div> <select> <!> </select> `);
|
|
48
48
|
const t_root_0 = t_root(t_fragment_0, true);
|
|
49
49
|
const t_text_1 = t_child(t_next(t_root_0));
|
|
50
|
-
const t_select_1 = t_next(t_next(t_next(t_root_0), true)) as
|
|
50
|
+
const t_select_1 = t_next(t_next(t_next(t_root_0), true)) as HTMLSelectElement;
|
|
51
51
|
let t_for_anchor_1 = t_anchor(t_next(t_child(t_select_1))) as HTMLElement;
|
|
52
52
|
|
|
53
53
|
/* @for */
|
|
@@ -76,7 +76,7 @@ export default function ColorSelect(
|
|
|
76
76
|
let t_old_region_1 = t_push_region(t_item_1);
|
|
77
77
|
const t_fragment_1 = t_fragment($parent.ownerDocument!, t_fragments, 1, ` <option>#</option> `);
|
|
78
78
|
const t_root_1 = t_root(t_fragment_1, true);
|
|
79
|
-
const t_option_1 = t_next(t_root_1) as
|
|
79
|
+
const t_option_1 = t_next(t_root_1) as HTMLOptionElement;
|
|
80
80
|
const t_text_2 = t_child(t_option_1);
|
|
81
81
|
const t_text_3 = t_next(t_option_1, true);
|
|
82
82
|
$run(() => {
|
|
@@ -29,7 +29,7 @@ export default function Reactive(
|
|
|
29
29
|
|
|
30
30
|
const t_fragment_0 = t_fragment($parent.ownerDocument!, t_fragments, 0, ` <button>Update text</button> <!> `);
|
|
31
31
|
const t_root_0 = t_root(t_fragment_0, true);
|
|
32
|
-
const t_button_1 = t_next(t_root_0) as
|
|
32
|
+
const t_button_1 = t_next(t_root_0) as HTMLButtonElement;
|
|
33
33
|
let t_comp_anchor_1 = t_anchor(t_next(t_next(t_button_1, true))) as HTMLElement;
|
|
34
34
|
|
|
35
35
|
/* @component */
|
|
@@ -29,7 +29,7 @@ export default function Reactive(
|
|
|
29
29
|
|
|
30
30
|
const t_fragment_0 = t_fragment($parent.ownerDocument!, t_fragments, 0, ` <button>Update text</button> <!> `);
|
|
31
31
|
const t_root_0 = t_root(t_fragment_0, true);
|
|
32
|
-
const t_button_1 = t_next(t_root_0) as
|
|
32
|
+
const t_button_1 = t_next(t_root_0) as HTMLButtonElement;
|
|
33
33
|
let t_comp_anchor_1 = t_anchor(t_next(t_next(t_button_1, true))) as HTMLElement;
|
|
34
34
|
|
|
35
35
|
/* @component */
|