@torpor/view 0.3.0 → 0.3.2
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 +15 -0
- package/dist/Component-C6Y3UwGs.d.cts +11 -0
- package/dist/Component-C6Y3UwGs.d.cts.map +1 -0
- package/dist/ServerSlotRender-COS6H8Yk.d.cts +41 -0
- package/dist/ServerSlotRender-COS6H8Yk.d.cts.map +1 -0
- package/dist/compile.cjs +3735 -0
- package/dist/compile.cjs.map +1 -0
- package/dist/compile.d.cts +216 -0
- package/dist/compile.d.cts.map +1 -0
- package/dist/compile.d.ts +6 -0
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +128 -76
- package/dist/compile.js.map +1 -1
- package/dist/formatText-B0FXBdFT.js.map +1 -1
- package/dist/formatText-DufG5l83.cjs +500 -0
- package/dist/formatText-DufG5l83.cjs.map +1 -0
- package/dist/index.cjs +906 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +411 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/ssr.cjs +40 -0
- package/dist/ssr.cjs.map +1 -0
- package/dist/ssr.d.cts +19 -0
- package/dist/ssr.d.cts.map +1 -0
- package/package.json +7 -4
- package/src/compile/build/client/buildAwaitNode.ts +15 -7
- package/src/compile/build/client/buildCode.ts +8 -1
- package/src/compile/build/client/buildIfNode.ts +11 -5
- package/src/compile/build/client/buildSwitchNode.ts +12 -5
- package/src/compile/buildType.ts +11 -12
- package/src/compile/parse/ParseComponentStatus.ts +6 -0
- package/src/compile/parse/parseCode.ts +61 -7
- package/src/compile/parse/parseTag.ts +7 -0
- package/src/types/TemplateComponent.ts +6 -0
- package/src/watch/checkEffect.ts +2 -0
- package/test/attributes/components/output/Attributes-client.ts +3 -0
- package/test/attributes/components/output/Attributes-types.ts +10 -0
- package/test/attributes/components/temp/{Attributes-client-9b2935d7824ba501776fdc6c48861422c15b6a12.ts → Attributes-client-ffbdd4d85a50436c1a51a4499921304098c1b396.ts} +3 -0
- package/test/attributes/components/temp/Attributes-types-5892927754ac19a8b3a8560fa1c78ce653e5f318.ts +10 -0
- package/test/attributes/errors.test.ts +35 -0
- package/test/await/components/output/Await-client.ts +12 -5
- package/test/await/components/output/Await-types.ts +10 -0
- package/test/await/components/temp/{Await-client-e969f4bd0712acf259ddfaa5a3b3448307201fd2.ts → Await-client-4d2c318baf00e6fb8fea11e34189817ca8002a1f.ts} +12 -5
- package/test/await/components/temp/Await-types-355b335acd1c17a2271920d51e542ce1fc61eeef.ts +10 -0
- package/test/bench/components/output/Bench-client.ts +3 -0
- package/test/bench/components/output/Bench-types.ts +10 -0
- package/test/bench/components/temp/{Bench-client-7f31596dafc8077370d8d90b1bb9b6e0208154e7.ts → Bench-client-33b5a23562f6a00687449c5ffe72dc42ac7f766e.ts} +3 -0
- package/test/bench/components/temp/Bench-types-a798f6c7b7ec235754ff5fdd5d7020633253b042.ts +10 -0
- package/test/bind/components/output/BindComponent-client.ts +5 -0
- package/test/bind/components/output/BindComponent-types.ts +10 -0
- package/test/bind/components/output/BindText-client.ts +3 -0
- package/test/bind/components/output/BindText-types.ts +10 -0
- package/test/bind/components/temp/{BindComponent-client-22eccb5354a2b0267841e015f3a2a0baf534bf89.ts → BindComponent-client-eb816edf9f83c19641ced9ecb1c2c5fc87e8e32c.ts} +5 -0
- package/test/bind/components/temp/BindComponent-types-8a10f6efddd92990ed5390f3c89ba17db179d801.ts +10 -0
- package/test/bind/components/temp/{BindText-client-7692ae1570533cc17e2186e9c7d4768529e4a2fe.ts → BindText-client-63e98b4407a8f0f22f4766d029567ac0aac7dba8.ts} +3 -0
- package/test/bind/components/temp/BindText-types-5892d9ef33c61a0de524b74323ba135accee8175.ts +10 -0
- package/test/build-server/components/output/IfNested-client.ts +17 -8
- package/test/build-server/components/output/IfNested-types.ts +10 -0
- package/test/build-server/components/temp/{IfNested-client-eefdd449fa700b2e7326bc72df8b32ddcadf9d21.ts → IfNested-client-2af78cceff5dbce510db31fd5b8bb4da5d30d53a.ts} +17 -8
- package/test/build-server/components/temp/IfNested-types-692d58ca98f3534102193a44aa358994f798ca7b.ts +10 -0
- package/test/buildOutputFiles.ts +16 -4
- package/test/child-component/components/output/ParentChild-client.ts +5 -0
- package/test/child-component/components/output/ParentChild-types.ts +10 -0
- package/test/child-component/components/temp/{ParentChild-client-2dfd600f7d409630d429a1d2d18c038bd08b08da.ts → ParentChild-client-93ca4d2ac521ef996a6548bfacb3e36f6f71fcf9.ts} +5 -0
- package/test/child-component/components/temp/ParentChild-types-4d26850ef18600f398f7aa9c4502071349bf5624.ts +10 -0
- package/test/class/components/output/Class-client.ts +5 -0
- package/test/class/components/output/Class-types.ts +10 -0
- package/test/class/components/temp/{Class-client-5af6a50cd454ae019b2aa79457ba7ead83b8c056.ts → Class-client-284ac46628b2d3d6b4a4edbdbfd1700626d3fed0.ts} +5 -0
- package/test/class/components/temp/Class-types-38567e85c9ec17739c7c97e12281fc1818267190.ts +10 -0
- package/test/component/components/output/Component-client.ts +3 -0
- package/test/component/components/output/Component-types.ts +10 -0
- package/test/component/components/output/Header-client.ts +3 -0
- package/test/component/components/output/Header-types.ts +10 -0
- package/test/component/components/temp/{Component-client-fdc327499be0a01f987d0f2897baf022a247c77c.ts → Component-client-3cb873dd1782874af78544c1d8886bbfa4bef11b.ts} +3 -0
- package/test/component/components/temp/Component-types-3ef4f140ba29c98357caf0f2618785437b5804de.ts +10 -0
- package/test/component/components/temp/{Header-client-6beb5770e68e6b19595e53e20bc906765fc6c260.ts → Header-client-cb780b85ee6e0587eca3d9ad7a8b8c947075e394.ts} +3 -0
- package/test/component/components/temp/Header-types-c56a108c6fb5a22b8ae156936bc05e58eef199c2.ts +10 -0
- package/test/console/components/output/Console-client.ts +3 -0
- package/test/console/components/output/Console-types.ts +10 -0
- package/test/console/components/temp/{Console-client-2b58290ac407ebbe89a0613d64eb9cd141b99887.ts → Console-client-b0feb868a912138e8af01bd06902d28c536ebb87.ts} +3 -0
- package/test/console/components/temp/Console-types-93ad3f25ddc6280fcff2cf4db7c2913d3a474912.ts +10 -0
- package/test/const/components/output/Const-client.ts +3 -0
- package/test/const/components/output/Const-types.ts +10 -0
- package/test/const/components/temp/{Const-client-d1037557e7ef75a8fe06f56816e65883047e9421.ts → Const-client-149dbc44ee609c54a99bacb715d04034a1d33c9c.ts} +3 -0
- package/test/const/components/temp/Const-types-afba269310bd143aa325752d3cc7e0c598fd0de2.ts +10 -0
- package/test/context/components/output/ChildA-client.ts +3 -0
- package/test/context/components/output/ChildA-types.ts +10 -0
- package/test/context/components/output/ChildB-client.ts +3 -0
- package/test/context/components/output/ChildB-types.ts +10 -0
- package/test/context/components/{temp/Parent-client-9898b2e521527c86d69905053b6727ea8fd28166.ts → output/Parent-client.ts} +3 -0
- package/test/context/components/output/Parent-types.ts +10 -0
- package/test/context/components/temp/{ChildA-client-9dea3e29ffcb82ca1779f6ff671e19b1c106fc4a.ts → ChildA-client-b9ad03bb0c64e9fb27a38b85792df79dc3ebf7f1.ts} +3 -0
- package/test/context/components/temp/ChildA-types-2ee15b25e68166d1574582f08e2280cbae948e5d.ts +10 -0
- package/test/context/components/temp/{ChildB-client-4b801099936c8aa013a1220f291375f67eba1acb.ts → ChildB-client-f4e1a447378a9a9be05aa37c8b3eae7ca6be8411.ts} +3 -0
- package/test/context/components/temp/ChildB-types-531f67cfda5bd04468e827c14f9358a431853fc5.ts +10 -0
- package/test/context/components/temp/Parent-client-2ecf387911773f5cd74c7bf1d04f98da08bc4450.ts +44 -0
- package/test/context/components/temp/Parent-types-e6be7d1cf118d7a8927af59db780010392966d01.ts +10 -0
- package/test/effects/components/output/For-client.ts +3 -0
- package/test/effects/components/output/For-types.ts +10 -0
- package/test/effects/components/output/If-client.ts +10 -4
- package/test/effects/components/output/If-types.ts +10 -0
- package/test/effects/components/output/NestedIf-client.ts +17 -8
- package/test/effects/components/output/NestedIf-types.ts +10 -0
- package/test/effects/components/temp/{For-client-7c7d7c0dba2547f816b9bd9c6a95d6873ec00ffd.ts → For-client-af16b99099e237c988932845b79500dfc28c6642.ts} +3 -0
- package/test/effects/components/temp/For-types-cfec41b41b054674bf8b01ce0e0003c8a6640a82.ts +10 -0
- package/test/effects/components/temp/{If-client-f0480a98f80b32612d12765c6838ff6db5982e82.ts → If-client-7f0b171f29a1f1ff969b21c33b241cd35eb1ce0e.ts} +10 -4
- package/test/effects/components/temp/If-types-7b245b6e531e122e0d0cfb72903bb88223b98793.ts +10 -0
- package/test/effects/components/temp/{NestedIf-client-702deffd158f219c5da4199b563a62cd54385a7f.ts → NestedIf-client-e2dd594c8f77f5ce53265b234e72b7c2f29ba76d.ts} +17 -8
- package/test/effects/components/temp/NestedIf-types-0912466d777f52f3616557823a7e47f5901cb755.ts +10 -0
- package/test/events/components/output/Increment-client.ts +3 -0
- package/test/events/components/output/Increment-types.ts +10 -0
- package/test/events/components/temp/{Increment-client-84c09711baf098c82ee226598ba7a36913616b75.ts → Increment-client-aeee696f3a4363c5c4c1ecf86de8ec071342ba22.ts} +3 -0
- package/test/events/components/temp/Increment-types-f259dd221aa967b0426746303f1f2c33aeeaf068.ts +10 -0
- package/test/for/components/output/For-client.ts +3 -0
- package/test/for/components/output/For-types.ts +10 -0
- package/test/for/components/output/ForEscape-client.ts +3 -0
- package/test/for/components/output/ForEscape-types.ts +10 -0
- package/test/for/components/output/ForIn-client.ts +3 -0
- package/test/for/components/output/ForIn-types.ts +10 -0
- package/test/for/components/output/ForOf-client.ts +3 -0
- package/test/for/components/output/ForOf-types.ts +10 -0
- package/test/for/components/temp/{For-client-2f6b4b81670b0ba31b01176b4f61ebf321e945bb.ts → For-client-bc23ebc49e3cf710762bce7cd1b73244c94a3abb.ts} +3 -0
- package/test/for/components/temp/For-types-8bcd17ab2e0faebb340a19f56e052cc94820a29a.ts +10 -0
- package/test/for/components/temp/{ForEscape-client-8d0fcc940851e687173b6a9129c3d83e0fc771ef.ts → ForEscape-client-a475ec9bdab5d57d30c27124fcf9ce38110ddf75.ts} +3 -0
- package/test/for/components/temp/ForEscape-types-bb4f3457b02c2ad97a7b6cbc66f9097a37728ed2.ts +10 -0
- package/test/for/components/temp/{ForIn-client-fa0614a1c7b8aa6e8819ed91a518479fd80453ae.ts → ForIn-client-890cee3ac35ede73eafad4e935eefd2fe7ecb9e2.ts} +3 -0
- package/test/for/components/temp/ForIn-types-fb4f7b02e23a40d27376760b7e1d06f8ecaa13ba.ts +10 -0
- package/test/for/components/temp/{ForOf-client-11006c4239d9018363e582dc5b54b50477d652e7.ts → ForOf-client-309297e25afd249f1a3e27126af23b7329c5c727.ts} +3 -0
- package/test/for/components/temp/ForOf-types-6e2fbcd0fbfd3c0a2c3d8c458fdda7b05c2a19b1.ts +10 -0
- package/test/function/components/output/Function-client.ts +3 -0
- package/test/function/components/output/Function-types.ts +10 -0
- package/test/function/components/temp/{Function-client-ec5fe7d599d6099bdfab78c2a0c8edf77a23cd9b.ts → Function-client-8423f53837e6503cdcc0d997684dd3e208b5dd13.ts} +3 -0
- package/test/function/components/temp/Function-types-5479cb46b9bef3251b7961fb6e99a8c30cd4220f.ts +10 -0
- package/test/html/components/output/Html-client.ts +3 -0
- package/test/html/components/output/Html-types.ts +10 -0
- package/test/html/components/temp/{Html-client-82ff34dcdcbdf4be1112bcb1baac8027cdc32de7.ts → Html-client-83b1a1be5c4b8e9cc06a616acf8418c786804255.ts} +3 -0
- package/test/html/components/temp/Html-types-c5dc816f932e3fb021c006f266a7c9a2f2fb5353.ts +10 -0
- package/test/if/components/IfCache.torp +14 -0
- package/test/if/components/output/IfAfterIf-client.ts +17 -8
- package/test/if/components/output/IfAfterIf-types.ts +10 -0
- package/test/if/components/output/IfCache-client.ts +70 -0
- package/test/if/components/output/IfCache-server.ts +22 -0
- package/test/if/components/output/IfCache-types.ts +10 -0
- package/test/if/components/output/IfElse-client.ts +10 -4
- package/test/if/components/output/IfElse-types.ts +10 -0
- package/test/if/components/output/IfElseIf-client.ts +12 -5
- package/test/if/components/output/IfElseIf-types.ts +10 -0
- package/test/if/components/output/IfFalse-client.ts +10 -4
- package/test/if/components/output/IfFalse-types.ts +10 -0
- package/test/if/components/output/IfNested-client.ts +17 -8
- package/test/if/components/output/IfNested-types.ts +10 -0
- package/test/if/components/temp/{IfAfterIf-client-c1cfd21a6ace4945703ba8f46aada923a60265d9.ts → IfAfterIf-client-5aa5aac7099224e0ec1e8bff6162d729f89267ec.ts} +17 -8
- package/test/if/components/temp/IfAfterIf-types-c4bd4f93c103a618889f40c77d55fa7de454f70b.ts +10 -0
- package/test/if/components/temp/IfCache-client-8433b3b239bc225d616f12e8904c4f2ba530efb4.ts +70 -0
- package/test/if/components/temp/IfCache-server-8b35e6a2009d72083013cfb01b187a1d027fdcc9.ts +22 -0
- package/test/if/components/temp/IfCache-types-02f467ce9ebc23ae68c9e5f33c90ecc96b666452.ts +10 -0
- package/test/if/components/temp/{IfElse-client-06dfcacd3a5225dcb0947587bcd4fae9ec3d3c1e.ts → IfElse-client-8bd2aa123e050847fdf28172479f0cc1a3ddb01c.ts} +10 -4
- package/test/if/components/temp/IfElse-types-e81080227f8f69ac1d81141d97a07e0a0e9391c1.ts +10 -0
- package/test/if/components/temp/{IfElseIf-client-26df9a728c9cb712d5ac0235b4c99885f25545b8.ts → IfElseIf-client-a17e2408252495ef0e90ba303a2d9e076867b6fd.ts} +12 -5
- package/test/if/components/temp/IfElseIf-types-a492d2b6e8517f598befca7127cd514244239984.ts +10 -0
- package/test/if/components/temp/{IfFalse-client-de6fc8e9eb222153608490e6d172e9aae9000aa1.ts → IfFalse-client-00a24a722347d2c711064dd504db9443747e5099.ts} +10 -4
- package/test/if/components/temp/IfFalse-types-1d512c6d82e2af9efe0221a9929b05ad62fd97fb.ts +10 -0
- package/test/if/components/temp/{IfNested-client-eefdd449fa700b2e7326bc72df8b32ddcadf9d21.ts → IfNested-client-2af78cceff5dbce510db31fd5b8bb4da5d30d53a.ts} +17 -8
- package/test/if/components/temp/IfNested-types-692d58ca98f3534102193a44aa358994f798ca7b.ts +10 -0
- package/test/if/if-cache.test.ts +68 -0
- package/test/mount/components/output/Mount-client.ts +3 -0
- package/test/mount/components/output/Mount-types.ts +10 -0
- package/test/mount/components/temp/{Mount-client-29896228d7d0ef3692a9d13065c1bbfbe3198cdc.ts → Mount-client-f4dd3d5a21d287d3d22a797805816fe09528dfb6.ts} +3 -0
- package/test/mount/components/temp/Mount-types-2d88616243f860d43b8b7d74a6bbeff9b2c6f27b.ts +10 -0
- package/test/on-mount/components/output/OnMount-client.ts +3 -0
- package/test/on-mount/components/output/OnMount-types.ts +10 -0
- package/test/on-mount/components/temp/{OnMount-client-038f8c6bbcf0278406909d6ba5394f311924fda9.ts → OnMount-client-8afb8473b51815e9b0ba994f3476217506b41b1d.ts} +3 -0
- package/test/on-mount/components/temp/OnMount-types-d0f834addb351520cc75a589cb9ec5b6a5a787b4.ts +10 -0
- package/test/party/components/output/AnswerButton-client.ts +3 -0
- package/test/party/components/output/AnswerButton-types.ts +10 -0
- package/test/party/components/output/AnswerButtonApp-client.ts +3 -0
- package/test/party/components/output/AnswerButtonApp-types.ts +10 -0
- package/test/party/components/output/ColorSelect-client.ts +3 -0
- package/test/party/components/output/ColorSelect-types.ts +10 -0
- package/test/party/components/output/Colors-client.ts +3 -0
- package/test/party/components/output/Colors-types.ts +10 -0
- package/test/party/components/output/Counter-client.ts +3 -0
- package/test/party/components/output/Counter-types.ts +10 -0
- package/test/party/components/output/CssStyle-client.ts +3 -0
- package/test/party/components/output/CssStyle-types.ts +10 -0
- package/test/party/components/output/DoubleCount-client.ts +3 -0
- package/test/party/components/output/DoubleCount-types.ts +10 -0
- package/test/party/components/output/FunnyButton-client.ts +3 -0
- package/test/party/components/output/FunnyButton-types.ts +10 -0
- package/test/party/components/output/FunnyButtonApp-client.ts +3 -0
- package/test/party/components/output/FunnyButtonApp-types.ts +10 -0
- package/test/party/components/output/HelloWorld-client.ts +3 -0
- package/test/party/components/output/HelloWorld-types.ts +10 -0
- package/test/party/components/output/InputFocused-client.ts +3 -0
- package/test/party/components/output/InputFocused-types.ts +10 -0
- package/test/party/components/output/InputHello-client.ts +3 -0
- package/test/party/components/output/InputHello-types.ts +10 -0
- package/test/party/components/output/IsAvailable-client.ts +3 -0
- package/test/party/components/output/IsAvailable-types.ts +10 -0
- package/test/party/components/output/Name-client.ts +3 -0
- package/test/party/components/output/Name-types.ts +10 -0
- package/test/party/components/output/NameUpdate-client.ts +3 -0
- package/test/party/components/output/NameUpdate-types.ts +10 -0
- package/test/party/components/output/PageTitle-client.ts +3 -0
- package/test/party/components/output/PageTitle-types.ts +10 -0
- package/test/party/components/output/PickPill-client.ts +3 -0
- package/test/party/components/output/PickPill-types.ts +10 -0
- package/test/party/components/output/Time-client.ts +3 -0
- package/test/party/components/output/Time-types.ts +10 -0
- package/test/party/components/output/TrafficLight-client.ts +14 -6
- package/test/party/components/output/TrafficLight-types.ts +10 -0
- package/test/party/components/output/UserProfile-client.ts +3 -0
- package/test/party/components/output/UserProfile-types.ts +15 -0
- package/test/party/components/output/UserProfileApp-client.ts +3 -0
- package/test/party/components/output/UserProfileApp-types.ts +10 -0
- package/test/party/components/output/UserProfileContext-client.ts +3 -0
- package/test/party/components/output/UserProfileContext-types.ts +10 -0
- package/test/party/components/output/UserProfileContextApp-client.ts +3 -0
- package/test/party/components/output/UserProfileContextApp-types.ts +10 -0
- package/test/party/components/temp/{AnswerButton-client-df895c3e7a88fd7ede9f951fc9de2ed75c27a5cb.ts → AnswerButton-client-2119fa9523949bca3e8ef264eff7e72611d70bac.ts} +3 -0
- package/test/party/components/temp/AnswerButton-types-7dc4d046e52be1e6cb46d6235ce7540bd3e7b2a5.ts +10 -0
- package/test/party/components/temp/{AnswerButtonApp-client-4c05ef36b1c0e93370fb463643419928717fa701.ts → AnswerButtonApp-client-87979b0578066e637c4257d6a7dbc2bfa1542515.ts} +3 -0
- package/test/party/components/temp/AnswerButtonApp-types-10a6f55029e859366f9a3a73cdcdb3f63e89dbeb.ts +10 -0
- package/test/party/components/temp/{ColorSelect-client-5db8d1b0924361fdb5efb867c14491402ec9668c.ts → ColorSelect-client-d7eb9276031b613439d7bd6212c76b4a972ebcad.ts} +3 -0
- package/test/party/components/temp/ColorSelect-types-e652a36ebdd98e8c23a8de3156c4499023f09301.ts +10 -0
- package/test/party/components/temp/{Colors-client-6d3ac693e85bdda50b8742282915997063a32769.ts → Colors-client-42c890154b9a132ebd784cccc4f4f9962f400b3e.ts} +3 -0
- package/test/party/components/temp/Colors-types-075975e9b9074b49f96f99d660f0ee580546a630.ts +10 -0
- package/test/party/components/temp/{Counter-client-0c604a107c5b84cdbf725f307dfe29d34f8a2cc8.ts → Counter-client-ad5e891eaea79548afabef156b87fee5317319b2.ts} +3 -0
- package/test/party/components/temp/Counter-types-206b0704ee2e25f5f3198d716fa524295581c075.ts +10 -0
- package/test/party/components/temp/{CssStyle-client-2a642d115ad52539f97c051c34687b8d6d12b324.ts → CssStyle-client-5078b4c735f6273e2565c7d7688c41afa026a2c3.ts} +3 -0
- package/test/party/components/temp/CssStyle-types-f1ce4f0b03d404c70704f271ce9bfc5d5107346c.ts +10 -0
- package/test/party/components/temp/{DoubleCount-client-8c85c3af12c471ea23bb702bbf5a3e240420f3ec.ts → DoubleCount-client-9406fd993ae8d0efa1f87848ae6e952591b20c3d.ts} +3 -0
- package/test/party/components/temp/DoubleCount-types-436bd75fe7808c3a30389aeb1740aea361aa8681.ts +10 -0
- package/test/party/components/temp/{FunnyButton-client-850dd3da0fa803c1bce5c53e88fcd2d48d279eb8.ts → FunnyButton-client-f8dea087fd6e3f2d7d0697cd3c87444c6866daf5.ts} +3 -0
- package/test/party/components/temp/FunnyButton-types-7780d5c5dfe3ff2369f8e3c505616036cfcd3759.ts +10 -0
- package/test/party/components/temp/{FunnyButtonApp-client-00300846d11a3d0a5a620c2ade87b935b7f0ebf8.ts → FunnyButtonApp-client-22aa2ee00b25a3ee0bda442372da843828231242.ts} +3 -0
- package/test/party/components/temp/FunnyButtonApp-types-ea73d641565a4478759166f462206dd97c92cedd.ts +10 -0
- package/test/party/components/temp/{HelloWorld-client-890b311ad9a3919379acdc1d52807ea36cc9f489.ts → HelloWorld-client-84fa7bd70d75149892044f4a15fdbf9ac8c7fcff.ts} +3 -0
- package/test/party/components/temp/HelloWorld-types-3c153ac7af343dbce6cb081f1ae1b4f85d7f0b10.ts +10 -0
- package/test/party/components/temp/{InputFocused-client-03527f9ceb52f66ac53887dbc884a0aa83bb7a23.ts → InputFocused-client-504b10731a6c96079a0abd7bb4a8381634ff4a0d.ts} +3 -0
- package/test/party/components/temp/InputFocused-types-33da14c13216ca00edaa8f02508db21f5cd32d31.ts +10 -0
- package/test/party/components/temp/{InputHello-client-f65a477624975b68b7aaa3614fbf198d4476480f.ts → InputHello-client-b9dd846c4cc129749781955f645327cc3c0956ac.ts} +3 -0
- package/test/party/components/temp/InputHello-types-ab629048402441fde9a292bc2d376c0deea482a8.ts +10 -0
- package/test/party/components/temp/{IsAvailable-client-8767437fd92cf79713de5b00828e1502e38d79e3.ts → IsAvailable-client-3bd6d53a45c3dcda3e958bb4b5000fef78301b04.ts} +3 -0
- package/test/party/components/temp/IsAvailable-types-23d4e196c659901c347a7b3e5c9e4a6668234adb.ts +10 -0
- package/test/party/components/temp/{Name-client-08903a8df8bdff5288170d3c89658192956587a9.ts → Name-client-b2cd160fc076bb34c0421a673358e7b7f61e4b49.ts} +3 -0
- package/test/party/components/temp/Name-types-06f89338c785a1fd352ed7de3ebe02b30722760d.ts +10 -0
- package/test/party/components/temp/{NameUpdate-client-d65b2476c3721d2efddf9385a61433e2a2dd0d72.ts → NameUpdate-client-f2dfcab63d80c25681aa6b15a61c547a0aab2f96.ts} +3 -0
- package/test/party/components/temp/NameUpdate-types-9c69805006d2d3bb457c5d4d87db8baeb431aeb6.ts +10 -0
- package/test/party/components/temp/{PageTitle-client-c006df9a3e662488a1db089de53fd485c6b923e4.ts → PageTitle-client-f4094f4b23126a99a211f804ed7c4a97a34733b3.ts} +3 -0
- package/test/party/components/temp/PageTitle-types-dfb55ea9b607c89167dbd7538523a484a6eec300.ts +10 -0
- package/test/party/components/temp/{PickPill-client-af8357daf3f6633c7f451d0bddd72fefe786d5c3.ts → PickPill-client-0a4e095bc2c963a2f091ae2f69c8d075f7d9b5a5.ts} +3 -0
- package/test/party/components/temp/PickPill-types-526e2bb4c36ec1bed87eaf5722093a0eaefcd9d3.ts +10 -0
- package/test/party/components/temp/{Time-client-94380d45de7275a5cec98e5f58c15b74b13e9c3e.ts → Time-client-95ee134377911d1c1cddbf074b8f943cdcf2a966.ts} +3 -0
- package/test/party/components/temp/Time-types-2bf6facfbb2d6e7de472d18760029afaefbb93e1.ts +10 -0
- package/test/party/components/temp/{TrafficLight-client-12b20962b4146ef08fe0c37597441533c7699408.ts → TrafficLight-client-dc0248dc967afbbbce4873cd37677cd97cc4933c.ts} +14 -6
- package/test/party/components/temp/TrafficLight-types-d301a2317da01a215fc8e5222dc6ff87226fa250.ts +10 -0
- package/test/party/components/temp/{UserProfile-client-e5330b2c96bd8b225cb6291bc8b1d9f35c93307e.ts → UserProfile-client-352291dcaf115cc563ae3a07ec6aed901fcc2bc1.ts} +3 -0
- package/test/party/components/temp/UserProfile-types-412089462c8dcc757d2f53e7ff8030296d3100c2.ts +15 -0
- package/test/party/components/temp/{UserProfileApp-client-4c86e4f9a0d042f4f4811868f0146e872b17353c.ts → UserProfileApp-client-18ad0243fd853dac3c3f71bea21b021bbd5b35f4.ts} +3 -0
- package/test/party/components/temp/UserProfileApp-types-3e70c106e03c68b4aa06c2fe21dfeceffe7cc313.ts +10 -0
- package/test/party/components/temp/{UserProfileContext-client-424131db3cc89ae4babe127b9108ffc5696c9e1d.ts → UserProfileContext-client-a3f521facb10ae64007c362e34bce41d8144bf96.ts} +3 -0
- package/test/party/components/temp/UserProfileContext-types-076b9fa0a87d3ca098884a003284050b36172cc6.ts +10 -0
- package/test/party/components/temp/{UserProfileContextApp-client-5f94a7ccf3e4542ea40d8046ad75eeb21005c55f.ts → UserProfileContextApp-client-cccb3b8e819279cd7f729af61b84ad9801213597.ts} +3 -0
- package/test/party/components/temp/UserProfileContextApp-types-d04199ab7d43ecc12ceccb7a0bef7ff38ac1e8b1.ts +10 -0
- package/test/props/components/output/Reactive-client.ts +5 -0
- package/test/props/components/output/Reactive-types.ts +10 -0
- package/test/props/components/temp/{Reactive-client-9bc3643675fc563f96efb00bc3c4b843ba4b7f2e.ts → Reactive-client-644526502a3c5db2be797056d127a124f76976d5.ts} +5 -0
- package/test/props/components/temp/Reactive-types-bd642939107f1be06666bfce1ad97a94ccc21ee1.ts +10 -0
- package/test/replace/components/output/Replace-client.ts +3 -0
- package/test/replace/components/output/Replace-types.ts +10 -0
- package/test/replace/components/temp/{Replace-client-6f21ff3eb303bd5488d211087dc35fcf998d4e2a.ts → Replace-client-b80bc4591f8638cf125e8de9c1b25ea840dc75e9.ts} +3 -0
- package/test/replace/components/temp/Replace-types-9aedaa79e9b616ea1780ea97306f3428faa5d477.ts +10 -0
- package/test/slots/components/output/Article-client.ts +3 -0
- package/test/slots/components/output/Article-types.ts +10 -0
- package/test/slots/components/output/Basic-client.ts +3 -0
- package/test/slots/components/output/Basic-types.ts +10 -0
- package/test/slots/components/output/Header-client.ts +3 -0
- package/test/slots/components/output/Header-types.ts +10 -0
- package/test/slots/components/output/Let-client.ts +3 -0
- package/test/slots/components/output/Let-types.ts +10 -0
- package/test/slots/components/output/List-client.ts +3 -0
- package/test/slots/components/output/List-types.ts +10 -0
- package/test/slots/components/output/Named-client.ts +3 -0
- package/test/slots/components/output/Named-types.ts +10 -0
- package/test/slots/components/output/Unused-client.ts +3 -0
- package/test/slots/components/output/Unused-types.ts +10 -0
- package/test/slots/components/temp/{Article-client-0b674ee98ae7f85021bfb8b912f28e3c4b35e877.ts → Article-client-df86e549f8681f2329bffb4bc6bdf8ef60659d82.ts} +3 -0
- package/test/slots/components/temp/Article-types-d3d960fbab7644ec2d90dfe39d908fbb65abaaa2.ts +10 -0
- package/test/slots/components/temp/{Basic-client-196f7f0244dca0baeffb547eec55c089a108283d.ts → Basic-client-5bf137a656d5bc8739443df8e6876ac6ffdaeddd.ts} +3 -0
- package/test/slots/components/temp/Basic-types-709765786c453e34088db3e894a59fb3332d3ed1.ts +10 -0
- package/test/slots/components/temp/{Header-client-e5c784d60469523803898ee4d8b85fb82a7b7c0b.ts → Header-client-89439803e4de9b44da53fc051088ded2b4816a83.ts} +3 -0
- package/test/slots/components/temp/Header-types-c56a108c6fb5a22b8ae156936bc05e58eef199c2.ts +10 -0
- package/test/slots/components/temp/{Let-client-645271fcd63cd500001c75740b22b1b387330657.ts → Let-client-1e404c72bae5fe99bdced72d497dc3700d001112.ts} +3 -0
- package/test/slots/components/temp/Let-types-3d05614de77a23df63a3cc1873b27ce1b0148c58.ts +10 -0
- package/test/slots/components/temp/{List-client-ee6047ac396dc0b6fce5e38af51c38093fae83a2.ts → List-client-73ebb1a2d1364d807ca67c2b3008efb73e5bc74f.ts} +3 -0
- package/test/slots/components/temp/List-types-fd59ad7d85c06e67ee766a2cf14a637dd129569e.ts +10 -0
- package/test/slots/components/temp/{Named-client-559988562c5de1ae6017d2ad6de063f4363064b6.ts → Named-client-fae857376ae748995be367ea0b78c86cb778dcee.ts} +3 -0
- package/test/slots/components/temp/Named-types-ed10fb6338eb9bd67281b9658bd7b10b572d346a.ts +10 -0
- package/test/slots/components/temp/{Unused-client-52d1828bd28ebf7046a2e948a369563c0ea83b98.ts → Unused-client-715ddd9fa963f8185b11dd3725849dddc9b4a8e0.ts} +3 -0
- package/test/slots/components/temp/Unused-types-88f7e38611b4cae1067969cf702cde41422837ae.ts +10 -0
- package/test/source-maps/components/output/Source-client.ts +10 -4
- package/test/source-maps/components/output/Source-types.ts +10 -0
- package/test/source-maps/components/temp/{Source-client-ae8c4811ff658c13ee8c9b9e0e53fff1b83b178b.ts → Source-client-ea4254d629d7270203bf98ffae915e9b753a2fe2.ts} +10 -4
- package/test/source-maps/components/temp/Source-types-69770c124317e0a0fd6aeb3d4f331b50231452fa.ts +10 -0
- package/test/special-component/components/output/BigTitle-client.ts +3 -0
- package/test/special-component/components/output/BigTitle-types.ts +10 -0
- package/test/special-component/components/output/Component-client.ts +3 -0
- package/test/special-component/components/output/Component-types.ts +10 -0
- package/test/special-component/components/output/SmallTitle-client.ts +3 -0
- package/test/special-component/components/output/SmallTitle-types.ts +10 -0
- package/test/special-component/components/temp/{BigTitle-client-cb3055f809aaf17bd1fa82748d039ac3730a8d44.ts → BigTitle-client-d46e785f86a5daee62360043056359ca3e1cb7a0.ts} +3 -0
- package/test/special-component/components/temp/BigTitle-types-cb6363da78f853772d3408240f32030d5e826859.ts +10 -0
- package/test/special-component/components/temp/{Component-client-0eb9553b52acce2dfa564242295a4c57a38bd540.ts → Component-client-bd3af877909777431434a02fb77e751980a0b822.ts} +3 -0
- package/test/special-component/components/temp/Component-types-196e5e5c55f61a9d24837f8de1fb9e9eeb2dd3f1.ts +10 -0
- package/test/special-component/components/temp/{SmallTitle-client-5a65b233be29395e9650f57d9708a33de1279af3.ts → SmallTitle-client-28035d0154e3af173e9e3a1921be3a358e236cc5.ts} +3 -0
- package/test/special-component/components/temp/SmallTitle-types-629b435eb6f9a402ff576511db3e1d150f8c612b.ts +10 -0
- package/test/special-element/components/output/Element-client.ts +3 -0
- package/test/special-element/components/output/Element-types.ts +10 -0
- package/test/special-element/components/temp/{Element-client-745e610fbd5c652d327c8ac349d49d5ee4c8d9ea.ts → Element-client-83bfbaab3d8c85cce6b97675d8955e03ae99ba24.ts} +3 -0
- package/test/special-element/components/temp/Element-types-478aac6fcc8cc71dc587b534bb45ddcde069e2cb.ts +10 -0
- package/test/special-head/components/output/Head-client.ts +3 -0
- package/test/special-head/components/output/Head-types.ts +10 -0
- package/test/special-head/components/temp/{Head-client-bbbb5e712247ee41ca65a7ffd457987de5e99b3e.ts → Head-client-9e828c39f1930711e6c7db1d318b63f195e01e92.ts} +3 -0
- package/test/special-head/components/temp/Head-types-88772e6c9aefe7f65c342350ad45b29e7fa16604.ts +10 -0
- package/test/special-self/components/output/Self-client.ts +10 -4
- package/test/special-self/components/output/Self-types.ts +10 -0
- package/test/special-self/components/temp/{Self-client-dfe57df69e3677e94f7b5f3657c82602054ef19e.ts → Self-client-6846c5e6cdac15947ab4361f2e2b4ec900abd988.ts} +10 -4
- package/test/special-self/components/temp/Self-types-d438955d6f42951942dfa72ec1b79ad4ee95e966.ts +10 -0
- package/test/style/components/output/Style-client.ts +3 -0
- package/test/style/components/output/Style-types.ts +10 -0
- package/test/style/components/temp/{Style-client-9491a5aff97f118df542f976d7f7a21e7cc88c62.ts → Style-client-710dc4eba0e6a6ecbee26adc0d739ffdfb73ef10.ts} +3 -0
- package/test/style/components/temp/Style-types-d7ced2961f74be74eebaedfb98c492c6789d3cb8.ts +10 -0
- package/test/svg/components/output/Shape-client.ts +10 -4
- package/test/svg/components/output/Shape-types.ts +10 -0
- package/test/svg/components/temp/{Shape-client-4cc148d8b70d3750d2982360aad76b74d194b60e.ts → Shape-client-691decdc6064d94b0951c7a08da10feebd087324.ts} +10 -4
- package/test/svg/components/temp/Shape-types-70f9e311a005452b58286636c0dcb67a73e9fab4.ts +10 -0
- package/test/switch/components/Switch.torp +6 -4
- package/test/switch/components/output/Switch-client.ts +18 -9
- package/test/switch/components/output/Switch-server.ts +6 -4
- package/test/switch/components/output/Switch-types.ts +18 -0
- package/test/switch/components/temp/{Switch-client-5fc00f4d41300dc7587b113d8e53a102beca7558.ts → Switch-client-dcb3511bb3db12ad47e2237afc32a788184ad566.ts} +18 -9
- package/test/switch/components/temp/{Switch-server-440f7e852145b79656c0023ddc776e4d1d077d2a.ts → Switch-server-bbb3b40226e88388eb6f016cb0fd4be54f6139e7.ts} +6 -4
- package/test/switch/components/temp/Switch-types-fad2e2b194747eb6c06474c81de5f814c15e06aa.ts +18 -0
- package/test/text/components/output/Text-client.ts +3 -0
- package/test/text/components/output/Text-types.ts +16 -0
- package/test/text/components/temp/{Text-client-6c3be8a1a31a13eff86ce8b5330829cd15b07fab.ts → Text-client-e05d0c431475bf49349b4f6c162c9e78e0577b10.ts} +3 -0
- package/test/text/components/temp/Text-types-f9e6d77cf5a6def5aff78be41ebca3e8e6a54278.ts +16 -0
- package/test/watch-array/components/output/Array-client.ts +3 -0
- package/test/watch-array/components/output/Array-types.ts +10 -0
- package/test/watch-array/components/output/ArrayEntries-client.ts +3 -0
- package/test/watch-array/components/output/ArrayEntries-types.ts +10 -0
- package/test/watch-array/components/output/ArrayIndexes-client.ts +3 -0
- package/test/watch-array/components/output/ArrayIndexes-types.ts +10 -0
- package/test/watch-array/components/output/ArrayUnkeyed-client.ts +3 -0
- package/test/watch-array/components/output/ArrayUnkeyed-types.ts +10 -0
- package/test/watch-array/components/temp/{Array-client-552f81452d33fe6dc715c9f6bb7986f06475d761.ts → Array-client-3110972e940a678cc26316f5f38b9315a27559ee.ts} +3 -0
- package/test/watch-array/components/temp/Array-types-4afcc38999fa0a5d5b28b8c54ea8f25659d91165.ts +10 -0
- package/test/watch-array/components/temp/{ArrayEntries-client-736755fba2492e74812ff9c905202810de54e15a.ts → ArrayEntries-client-7f1e7bf740768a929f21e62f6b8ee31db8a50918.ts} +3 -0
- package/test/watch-array/components/temp/ArrayEntries-types-ae83cd05c68e5e6b7e8d31212035c14ec9ea6b85.ts +10 -0
- package/test/watch-array/components/temp/{ArrayIndexes-client-a496328fa92ffca676ab8893013a0cfec1734ad1.ts → ArrayIndexes-client-9861162934f1d779326d4d268cd95d765155a085.ts} +3 -0
- package/test/watch-array/components/temp/ArrayIndexes-types-5f02ec73d46553fd5730abfe022dba9a76a341f7.ts +10 -0
- package/test/watch-array/components/temp/{ArrayUnkeyed-client-5a2c5cb1fecba52653f7f35cfd07627682930c15.ts → ArrayUnkeyed-client-4ae3d9a74e763f8879458012de2a3c3837956c99.ts} +3 -0
- package/test/watch-array/components/temp/ArrayUnkeyed-types-6f544a6b354c46913b9ee0e843d0a6482af2745d.ts +10 -0
- package/test/watch-object/components/output/Watched-client.ts +3 -0
- package/test/watch-object/components/output/Watched-types.ts +10 -0
- package/test/watch-object/components/temp/{Watched-client-1f0409aa6e2c425d0319a23caec7d10ad313d579.ts → Watched-client-a7ddca317e29ef12d882d90e7b043d9c99a5f355.ts} +3 -0
- package/test/watch-object/components/temp/Watched-types-70c7bde732f624bfbb8e353bf9d1be8dbaea63e1.ts +10 -0
- package/tsdown.config.ts +1 -1
- package/test/attributes/components/Attributes.d.ts +0 -18
- package/test/await/components/Await.d.ts +0 -18
- package/test/bench/components/Bench.d.ts +0 -18
- package/test/bind/components/BindText.d.ts +0 -18
- package/test/child-component/components/ParentChild.d.ts +0 -34
- package/test/class/components/Class.d.ts +0 -18
- package/test/component/components/Component.d.ts +0 -18
- package/test/component/components/Header.d.ts +0 -18
- package/test/console/components/Console.d.ts +0 -18
- package/test/const/components/Const.d.ts +0 -18
- package/test/effects/components/For.d.ts +0 -18
- package/test/effects/components/If.d.ts +0 -18
- package/test/effects/components/NestedIf.d.ts +0 -18
- package/test/events/components/Increment.d.ts +0 -18
- package/test/for/components/For.d.ts +0 -18
- package/test/for/components/ForEscape.d.ts +0 -18
- package/test/for/components/ForIn.d.ts +0 -18
- package/test/for/components/ForOf.d.ts +0 -18
- package/test/function/components/Function.d.ts +0 -18
- package/test/html/components/Html.d.ts +0 -18
- package/test/if/components/IfAfterIf.d.ts +0 -18
- package/test/if/components/IfElse.d.ts +0 -18
- package/test/if/components/IfElseIf.d.ts +0 -18
- package/test/if/components/IfNested.d.ts +0 -18
- package/test/mount/components/Mount.d.ts +0 -18
- package/test/on-mount/components/OnMount.d.ts +0 -18
- package/test/party/components/AnswerButton.d.ts +0 -18
- package/test/party/components/AnswerButtonApp.d.ts +0 -18
- package/test/party/components/ColorSelect.d.ts +0 -18
- package/test/party/components/Colors.d.ts +0 -18
- package/test/party/components/Counter.d.ts +0 -18
- package/test/party/components/CssStyle.d.ts +0 -18
- package/test/party/components/DoubleCount.d.ts +0 -18
- package/test/party/components/FunnyButton.d.ts +0 -18
- package/test/party/components/FunnyButtonApp.d.ts +0 -18
- package/test/party/components/HelloWorld.d.ts +0 -18
- package/test/party/components/InputFocused.d.ts +0 -18
- package/test/party/components/InputHello.d.ts +0 -18
- package/test/party/components/IsAvailable.d.ts +0 -18
- package/test/party/components/Name.d.ts +0 -18
- package/test/party/components/NameUpdate.d.ts +0 -18
- package/test/party/components/PageTitle.d.ts +0 -18
- package/test/party/components/PickPill.d.ts +0 -18
- package/test/party/components/Time.d.ts +0 -18
- package/test/party/components/TrafficLight.d.ts +0 -18
- package/test/party/components/UserProfile.d.ts +0 -23
- package/test/party/components/UserProfileApp.d.ts +0 -18
- package/test/party/components/UserProfileContext.d.ts +0 -18
- package/test/party/components/UserProfileContextApp.d.ts +0 -18
- package/test/replace/components/Replace.d.ts +0 -18
- package/test/slots/components/Article.d.ts +0 -18
- package/test/slots/components/Basic.d.ts +0 -18
- package/test/slots/components/Header.d.ts +0 -18
- package/test/slots/components/Let.d.ts +0 -18
- package/test/slots/components/List.d.ts +0 -18
- package/test/slots/components/Named.d.ts +0 -18
- package/test/slots/components/Unused.d.ts +0 -18
- package/test/special-component/components/BigTitle.d.ts +0 -18
- package/test/special-component/components/Component.d.ts +0 -18
- package/test/special-component/components/SmallTitle.d.ts +0 -18
- package/test/special-element/components/Element.d.ts +0 -18
- package/test/special-head/components/Head.d.ts +0 -18
- package/test/special-self/components/Self.d.ts +0 -18
- package/test/style/components/Style.d.ts +0 -18
- package/test/svg/components/Shape.d.ts +0 -18
- package/test/switch/components/Switch.d.ts +0 -21
- package/test/text/components/Text.d.ts +0 -21
- package/test/watch-array/components/Array.d.ts +0 -18
- package/test/watch-array/components/ArrayEntries.d.ts +0 -18
- package/test/watch-array/components/ArrayIndexes.d.ts +0 -18
- package/test/watch-array/components/ArrayUnkeyed.d.ts +0 -18
- package/test/watch-object/components/Watched.d.ts +0 -18
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["effect: Effect","EFFECT_TYPE","proxyDataSymbol: unique symbol","proxyHandledSymbol: unique symbol","SIGNAL_TYPE","lastEffect: Effect | null","context","targetSub: Subscription","computed: Computed | undefined","EFFECT_TYPE","COMPUTED_TYPE","data: ProxyData","context","SIGNAL_TYPE","COMPUTED_TYPE","arrayWrapper: Record<PropertyKey, any>","context","handler: ProxyHandler<T>","context","context","context","context","setAttribute","animations: Animation[] | undefined","context","context","context","context","context","context","context","context","runControl","context","oldKeyToIndex: Map<any, number> | undefined","newKeyToIndex: Map<any, number> | undefined","listItems: ListItem[]","runList","context","context","#init"],"sources":["../src/render/$mount.ts","../src/render/$run.ts","../src/watch/symbols.ts","../src/render/$unwrap.ts","../src/watch/trackProxyEffect.ts","../src/watch/updateSignal.ts","../src/watch/proxyGet.ts","../src/watch/proxySet.ts","../src/render/$watch.ts","../src/render/addAnimation.ts","../src/render/addEvent.ts","../src/motion/animate.ts","../src/render/isFragmentNode.ts","../src/render/addFragment.ts","../src/render/applyProps.ts","../src/render/clearRange.ts","../src/render/clearLayoutSlot.ts","../src/render/newRange.ts","../src/render/popRange.ts","../src/render/pushRange.ts","../src/render/fillLayoutSlot.ts","../src/render/getFragment.ts","../src/render/hydrate.ts","../src/render/mount.ts","../src/render/newListItem.ts","../src/render/hydrationMarkers.ts","../src/render/isCommentNode.ts","../src/render/isTextNode.ts","../src/render/nodeCheckHydrationBreak.ts","../src/render/nodeNext.ts","../src/render/nodeAnchor.ts","../src/render/nodeChild.ts","../src/render/nodeRoot.ts","../src/render/nodeSkip.ts","../src/render/runControl.ts","../src/render/runControlBranch.ts","../src/render/moveRange.ts","../src/render/runListItems.ts","../src/render/runList.ts","../src/render/setAttribute.ts","../src/render/setDynamicElement.ts","../src/wrappers/ReactiveDate.ts"],"sourcesContent":["import type Cleanup from \"../types/Cleanup\";\nimport context from \"./context\";\n\n/**\n * Runs and re-runs a function on component mount\n *\n * @param fn The function to run, which may return a cleanup function\n */\nexport default function $mount(fn: () => Cleanup | void): void {\n\tcontext.mountEffects.push(fn);\n}\n","import type Cleanup from \"../types/Cleanup\";\nimport type Effect from \"../types/Effect\";\nimport { EFFECT_TYPE } from \"../types/constants\";\nimport runEffect from \"../watch/runEffect\";\n\n// TODO: Take a pipeline of operators e.g. debounce\n\n/**\n * Runs and re-runs a function that depends on a watched object\n *\n * @param fn The function to run, which may return a cleanup function.\n */\nexport default function $run(fn: () => Cleanup | void, name?: string): Effect {\n\tlet effect: Effect = {\n\t\ttype: EFFECT_TYPE,\n\t\trun: fn,\n\t\tcleanup: undefined,\n\t\tfirstSource: null,\n\t\tnextEffect: null,\n\t\textent: 0,\n\t\tnextEffectToRun: null,\n\t\tdidError: false,\n\t\tname,\n\t\t//name: dev.effectName(fn),\n\t};\n\n\trunEffect(effect);\n\n\treturn effect;\n}\n","// TODO: Should these be branded?\nconst proxyDataSymbol: unique symbol = Symbol(\"_proxy_data\");\nconst proxyHandledSymbol: unique symbol = Symbol(\"_proxy_handled\");\n\nexport { proxyDataSymbol, proxyHandledSymbol };\n","import { proxyDataSymbol } from \"../watch/symbols\";\n\n/**\n * Returns the target object of a proxy\n *\n * @param object The proxy object\n */\nexport default function $unwrap<T extends Record<PropertyKey, any>>(object: T): T {\n\treturn object !== undefined && object !== null && object[proxyDataSymbol] !== undefined\n\t\t? (object[proxyDataSymbol].target ?? object)\n\t\t: object;\n}\n","import type ProxyData from \"../types/ProxyData\";\nimport { SIGNAL_TYPE } from \"../types/constants\";\nimport trackEffect from \"./trackEffect\";\n\nexport default function trackProxyEffect(data: ProxyData, key: PropertyKey): void {\n\t//console.log(`tracking effect '${context.activeTarget.name}' for '${String(key)}' prop`);\n\n\t// Create or get the signals\n\tlet signal = data.signals.get(key);\n\tif (signal === undefined) {\n\t\tsignal = {\n\t\t\ttype: SIGNAL_TYPE,\n\t\t\tfirstTarget: null,\n\t\t\tnextSignalToUpdate: null,\n\t\t\t//name: dev.propName(key),\n\t\t};\n\t\tdata.signals.set(key, signal);\n\t}\n\n\ttrackEffect(signal);\n}\n","import context from \"../render/context\";\nimport type Computed from \"../types/Computed\";\nimport type Effect from \"../types/Effect\";\nimport type ProxyData from \"../types/ProxyData\";\nimport type ProxySignal from \"../types/ProxySignal\";\nimport type Subscription from \"../types/Subscription\";\nimport { COMPUTED_TYPE, EFFECT_TYPE } from \"../types/constants\";\nimport batchEnd from \"./batchEnd\";\nimport batchStart from \"./batchStart\";\n\nlet lastEffect: Effect | null;\n\n/**\n * When a signal is changed, we need to\n * - Set the signal's subscriptions to recalc\n * - Set any dependent computed values to recalc\n * - Gather dependent effects that will need to be re-run\n */\nexport default function updateSignal(proxy: ProxyData, key: PropertyKey): void {\n\t//console.log(`triggering effects for '${String(key)}' on`, proxy);\n\t//console.log(\"===\");\n\t//console.log(`triggering effects for '${String(key)}'`);\n\n\tlet signal = proxy.signals.get(key) as ProxySignal;\n\tif (signal !== undefined && signal.firstTarget !== null) {\n\t\tbatchStart();\n\n\t\ttry {\n\t\t\t// Add the signal to the context for updating after triggering\n\t\t\tif (context.firstSignalToUpdate === null) {\n\t\t\t\tcontext.firstSignalToUpdate = signal;\n\t\t\t} else if (signal.nextSignalToUpdate === null) {\n\t\t\t\tlet lastSignal = context.firstSignalToUpdate;\n\t\t\t\twhile (lastSignal.nextSignalToUpdate !== null) {\n\t\t\t\t\tlastSignal = lastSignal.nextSignalToUpdate;\n\t\t\t\t}\n\t\t\t\tlastSignal.nextSignalToUpdate = signal;\n\t\t\t}\n\n\t\t\t// Cache the last effect in the chain, so we don't have to keep\n\t\t\t// looping in cases where there are lots of them for this signal\n\t\t\tlastEffect = context.firstEffectToRun;\n\t\t\tif (lastEffect !== null) {\n\t\t\t\twhile (lastEffect.nextEffectToRun !== null) {\n\t\t\t\t\tlastEffect = lastEffect.nextEffectToRun;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// De-activate all targets, so they can be re-used/updated/deleted,\n\t\t\t// and mark them to be recalculated\n\t\t\tlet targetSub: Subscription = signal.firstTarget;\n\t\t\tlet computed: Computed | undefined;\n\t\t\touter: while (true) {\n\t\t\t\t// De-activate all targets, so they can be re-used/updated/deleted\n\t\t\t\ttargetSub.active = false;\n\t\t\t\ttargetSub.recalc = true;\n\n\t\t\t\tconst target = targetSub.target;\n\t\t\t\tif (target.type === EFFECT_TYPE) {\n\t\t\t\t\t// Add the effect to the context for running after triggering\n\t\t\t\t\tif (lastEffect === null) {\n\t\t\t\t\t\tcontext.firstEffectToRun = target;\n\t\t\t\t\t\tlastEffect = target;\n\t\t\t\t\t} else if (target.nextEffectToRun === null && lastEffect !== target) {\n\t\t\t\t\t\tlastEffect.nextEffectToRun = target;\n\t\t\t\t\t\tlastEffect = target;\n\t\t\t\t\t}\n\t\t\t\t} else if (/*target.type === COMPUTED_TYPE*/ !target.recalc) {\n\t\t\t\t\t// This may need to be re-computed in the pull phase\n\t\t\t\t\ttarget.recalc = true;\n\n\t\t\t\t\t// Check the computed's targets\n\t\t\t\t\tif (target.firstTarget !== null) {\n\t\t\t\t\t\tcomputed = target;\n\t\t\t\t\t\tcomputed.rollback = targetSub;\n\t\t\t\t\t\ttargetSub = target.firstTarget;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If there are no more targets, we may need to rollback to the\n\t\t\t\t// last computed that had more targets\n\t\t\t\twhile (targetSub.nextTarget === null && computed !== undefined) {\n\t\t\t\t\ttargetSub = computed.rollback!;\n\t\t\t\t\tif (targetSub.source.type !== COMPUTED_TYPE) {\n\t\t\t\t\t\tcomputed = undefined;\n\t\t\t\t\t\tcontinue outer;\n\t\t\t\t\t}\n\t\t\t\t\tcomputed = targetSub.source;\n\t\t\t\t}\n\n\t\t\t\tif (targetSub.nextTarget === null) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\ttargetSub = targetSub.nextTarget;\n\t\t\t}\n\t\t} finally {\n\t\t\tbatchEnd();\n\t\t}\n\t}\n}\n","import $watch from \"../render/$watch\";\nimport context from \"../render/context\";\nimport type Computed from \"../types/Computed\";\nimport type ProxyData from \"../types/ProxyData\";\nimport { COMPUTED_TYPE, SIGNAL_TYPE } from \"../types/constants\";\nimport checkComputed from \"./checkComputed\";\nimport { proxyDataSymbol } from \"./symbols\";\nimport trackEffect from \"./trackEffect\";\nimport trackProxyEffect from \"./trackProxyEffect\";\nimport updateSignal from \"./updateSignal\";\n\nexport default function proxyGet(\n\ttarget: Record<PropertyKey, any>,\n\tkey: PropertyKey,\n\treceiver: any,\n): any {\n\tlet data: ProxyData = target[proxyDataSymbol];\n\n\tif (key === proxyDataSymbol) {\n\t\treturn data;\n\t}\n\n\t//console.log(`object get '${String(key)}' on`, target);\n\t//console.log(`object get '${String(key)}'`);\n\n\tlet signal = data.signals.get(key);\n\tif (signal === undefined) {\n\t\tconst propDescriptor = Object.getOwnPropertyDescriptor(target, key);\n\t\tif (propDescriptor !== undefined) {\n\t\t\tif (propDescriptor.writable) {\n\t\t\t\t// Setup data for the property\n\t\t\t\tif (data.shallow !== true) {\n\t\t\t\t\t// Set the value to a new proxy if it's an object\n\t\t\t\t\tconst value = target[key];\n\t\t\t\t\tif (\n\t\t\t\t\t\tvalue !== undefined &&\n\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\ttypeof value === \"object\" &&\n\t\t\t\t\t\tvalue[proxyDataSymbol] === undefined &&\n\t\t\t\t\t\t// But not if it's a Promise (i.e. has a `then` method)\n\t\t\t\t\t\tvalue.then === undefined\n\t\t\t\t\t) {\n\t\t\t\t\t\ttarget[key] = $watch(value);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If a property is being accessed in the course of setting up an\n\t\t\t\t// effect, track it\n\t\t\t\ttrackProxyEffect(data, key);\n\t\t\t} else if (propDescriptor.get) {\n\t\t\t\t// OK, we're only checking for computed values if it's read-only for\n\t\t\t\t// now, but we probably need to check any getter's value -- e.g. the\n\t\t\t\t// user may wish to add a setter to optimistically set a value, have\n\t\t\t\t// the UI update, then set the value concretely later (e.g. if\n\t\t\t\t// updating a `count` via a fetch)\n\n\t\t\t\tconst oldRegisterComputed = context.registerComputed;\n\t\t\t\ttry {\n\t\t\t\t\t// Allow calling `$cache` to assign the computed to a proxy\n\t\t\t\t\t// signal\n\t\t\t\t\tcontext.registerComputed = (computed: Computed) => {\n\t\t\t\t\t\tdata.signals.set(key, computed);\n\t\t\t\t\t};\n\t\t\t\t\treturn Reflect.get(target, key, receiver);\n\t\t\t\t} finally {\n\t\t\t\t\tcontext.registerComputed = oldRegisterComputed;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (data.isArray) {\n\t\t\t// If it's a function in an array, we may intercept it\n\t\t\tif (arrayWrapper[key] !== undefined) {\n\t\t\t\treturn arrayWrapper[key](data, target, key);\n\t\t\t}\n\t\t}\n\t} else if (signal.type === SIGNAL_TYPE) {\n\t\t// If a property is being accessed in the course of setting up an\n\t\t// effect, track it\n\t\ttrackProxyEffect(data, key);\n\t} else if (signal.type === COMPUTED_TYPE) {\n\t\tif (signal.running) {\n\t\t\tthrow new Error(\"Cycle detected\");\n\t\t} else if (signal.recalc) {\n\t\t\t// If a signal that the computed depends on has been changed,\n\t\t\t// but the computed hasn't yet been read, it may need to be\n\t\t\t// re-computed\n\t\t\tcheckComputed(signal);\n\t\t} else if (signal.didError) {\n\t\t\t// If there was a previous error, and no dependencies have\n\t\t\t// changed, throw the error again\n\t\t\tthrow signal.value;\n\t\t} else {\n\t\t\ttrackEffect(signal);\n\t\t}\n\t\treturn signal.value;\n\t}\n\n\t// Return the property value\n\treturn Reflect.get(target, key, receiver);\n}\n\n// Prevent array functions from calling functions and properties in breakable\n// ways (e.g. calling splice sets length before adding items)\nconst arrayWrapper: Record<PropertyKey, any> = {\n\t[Symbol.iterator]: function (data: ProxyData, target: any, key: PropertyKey) {\n\t\ttrackProxyEffect(data, \"length\");\n\t\t// HACK: This prevents lists being re-run on every random property\n\t\t// access by disabling the active effect before properties get\n\t\t// accessed. I'm not sure if this is the best way to achieve this...\n\t\tcontext.activeTarget = null;\n\t\treturn target[key];\n\t},\n\tpop: arrayHandle,\n\tpush: arrayHandle,\n\treverse: arrayHandle,\n\tshift: arrayHandle,\n\tsort: arrayHandle,\n\tsplice: arrayHandle,\n\tunshift: arrayHandle,\n};\n\nfunction arrayHandle(data: ProxyData, target: any, key: PropertyKey): Function {\n\t// Call the function on the target (so proxy properties don't get\n\t// intercepted) and trigger effects that depend on `length`\n\treturn function (...args: any[]) {\n\t\tconst func = target[key];\n\t\tconst result = func.apply(target, args);\n\t\tupdateSignal(data, \"length\");\n\t\treturn result;\n\t};\n}\n","import $watch from \"../render/$watch\";\nimport context from \"../render/context\";\nimport { proxyDataSymbol } from \"./symbols\";\n//import transferEffects from \"./transferEffects\";\nimport updateSignal from \"./updateSignal\";\n\nexport default function proxySet(\n\ttarget: Record<PropertyKey, any>,\n\tkey: PropertyKey,\n\tvalue: any,\n\treceiver: any,\n): boolean {\n\t//console.log(`object set '${String(key)}' to '`, value, `' on`, target);\n\t//console.log(`object set '${String(key)}'`);\n\n\t// Only do things if the value has changed\n\tconst oldValue = target[key];\n\tif (value !== oldValue) {\n\t\tif (context.batchOperation > 100) {\n\t\t\tthrow new Error(\"Cycle detected\");\n\t\t}\n\n\t\tlet data = target[proxyDataSymbol];\n\n\t\t// If the value was previously a proxy, watch the new value and update\n\t\t// its effect subscriptions\n\t\tif (oldValue && oldValue[proxyDataSymbol] !== undefined) {\n\t\t\tvalue = $watch(value, { shallow: oldValue[proxyDataSymbol].shallow });\n\t\t\t//transferEffects(oldValue, newValue);\n\t\t}\n\n\t\t// Set the property value on the target\n\t\tReflect.set(target, key, value, receiver);\n\n\t\t// Re-run effects\n\t\tupdateSignal(data, key);\n\n\t\t// If an item in an array is being set directly, trigger the length to\n\t\t// cause any lists to be re-run and data re-bound\n\t\t// TODO: Can we update the single item's data directly somehow?\n\t\tif (data.isArray && !isNaN(+String(key))) {\n\t\t\tupdateSignal(data, \"length\");\n\t\t}\n\t}\n\n\treturn true;\n}\n","import type ProxyData from \"../types/ProxyData\";\nimport type WatchOptions from \"../types/WatchOptions\";\nimport proxyGet from \"../watch/proxyGet\";\nimport proxySet from \"../watch/proxySet\";\nimport { proxyDataSymbol } from \"../watch/symbols\";\n\n/**\n * Watches an object and runs effects when its properties are changed\n *\n * @param object The object to watch\n */\nexport default function $watch<T extends Record<PropertyKey, any>>(\n\tobject: T,\n\toptions?: WatchOptions,\n): T {\n\t// Return the object itself if it is undefined or null, or if it is already a proxy\n\tif (object === undefined || object === null || object[proxyDataSymbol] !== undefined) {\n\t\treturn object;\n\t}\n\n\t// DEBUG: Make sure we can proxy this value\n\t//if (typeof object !== \"object\") {\n\t//\tthrow new Error(`$watch can't be called with a ${typeof object}`);\n\t//}\n\n\t// Create a proxy handler for each object, and store some data for it here\n\tconst data: ProxyData = {\n\t\ttarget: object,\n\t\tisArray: Array.isArray(object),\n\t\tshallow: options?.shallow === true,\n\t\tsignals: new Map(),\n\t};\n\n\t// @ts-ignore\n\tobject[proxyDataSymbol] = data;\n\n\tconst handler: ProxyHandler<T> = {\n\t\tget: proxyGet,\n\t\tset: proxySet,\n\t};\n\n\treturn new Proxy(object, handler) as T;\n}\n","import type Animation from \"../types/Animation\";\nimport context from \"./context\";\n\nexport default function addAnimation(el: HTMLElement, entry?: Animation, exit?: Animation): void {\n\t// Stash the event in context so that it can be added when the fragment is\n\t// added to the DOM\n\t// NOTE: We don't need to do this for hydration, but it's simpler to do it\n\t// the same way in both processes\n\tcontext.stashedAnimations.push({\n\t\trange: context.activeRange,\n\t\tel,\n\t\tin: entry,\n\t\tout: exit,\n\t});\n}\n","import context from \"./context\";\n\nexport default function addEvent(\n\tel: Element,\n\ttype: string,\n\tlistener: (this: Element, ev: any) => any,\n): void {\n\t// Stash the event in context so that it can be added when the fragment is\n\t// added to the DOM\n\t// NOTE: We don't need to do this for hydration, but it's simpler to do it\n\t// the same way in both processes\n\tcontext.stashedEvents.push({ range: context.activeRange, el, type, listener });\n}\n","import context from \"../render/context\";\n\n/**\n * Adds an animation for an element\n * @param el The element to animate\n * @param enter Whether the animation is being run on enter\n * @param keyframes The Web Animation API keyframes\n * @param options The Web Animmation API options\n */\nexport default async function animate(\n\tel: HTMLElement,\n\tenter: boolean,\n\tkeyframes: Keyframe[] | PropertyIndexedKeyframes | null,\n\toptions?: number | KeyframeAnimationOptions,\n): Promise<void> {\n\t// This is quite simplistic\n\t// We might need to\n\t// - store the animation\n\t// - reverse it if it's running and the range appears/disappears\n\t// - transfer the animation to the new element\n\tlet animationOptions = Object.assign(\n\t\t{\n\t\t\tdirection: enter ? \"normal\" : \"reverse\",\n\t\t\t// TODO: Should probably have a global setting for these somewhere\n\t\t\t// And respect browser reduce motion settings\n\t\t\tduration: 300,\n\t\t\teasing: \"ease-in-out\",\n\t\t\tfill: \"forwards\",\n\t\t},\n\t\toptions,\n\t);\n\n\tconst animation = el.animate(keyframes, animationOptions);\n\n\t// HACK: I'm not entirely sure why we need to sent the animation's timeline,\n\t// but without it, animations never start\n\t// HACK: We also need to make sure the element has been added to the DOM\n\t// with a timeout\n\tsetTimeout(() => {\n\t\tanimation.timeline = el.ownerDocument.timeline;\n\t}, 1);\n\n\t// Add the animation to the active range, so that the range won't be cleared\n\t// until the animation is completed\n\tlet activeRange = context.activeRange;\n\tif (activeRange) {\n\t\t// TODO: An option for whether to await or cancel events on range remove\n\t\t// e.g. if you are doing a client side navigation, you don't want to run animations\n\t\tactiveRange.animations ??= new Set();\n\t\tactiveRange.animations.add(animation);\n\t\tawait animation.finished;\n\t\tactiveRange.animations.delete(animation);\n\t}\n}\n","export default function isFragmentNode(node: Node): node is DocumentFragment {\n\treturn node.nodeType === 11;\n}\n","import animate from \"../motion/animate\";\nimport $run from \"./$run\";\nimport context from \"./context\";\nimport isFragmentNode from \"./isFragmentNode\";\n\nexport default function addFragment(\n\tfragment: DocumentFragment,\n\tparent: ParentNode,\n\tbefore: Node | null,\n\tendNode?: ChildNode,\n): void {\n\t//console.log(`adding fragment '${fragment.textContent}' to `, parent);\n\t//console.log(\"before\", before);\n\n\tconst range = context.activeRange;\n\tconst hydrationNode = context.hydrationNode;\n\n\t// Set the active range's end node to the last node in the fragment\n\tif (hydrationNode !== null) {\n\t\trange.endNode = endNode ?? hydrationNode;\n\t} else {\n\t\trange.startNode = fragment.firstChild;\n\t\trange.endNode = fragment.lastChild;\n\t}\n\n\tparent = before?.parentNode ?? parent;\n\n\t// Add the fragment\n\tif (hydrationNode === null) {\n\t\tparent.insertBefore(fragment, before);\n\t}\n\n\t// If we're adding this fragment to the DOM, we can now run any $mount\n\t// effects, add our stashed events and play our stashed animations\n\tif (!isFragmentNode(parent)) {\n\t\t// Only run $mount effects if not hydrating (if hydrating, they will get\n\t\t// run at the end when everything is hooked up)\n\t\tif (hydrationNode === null) {\n\t\t\tfor (let effect of context.mountEffects) {\n\t\t\t\t$run(effect);\n\t\t\t}\n\t\t\tcontext.mountEffects.length = 0;\n\t\t}\n\n\t\t// Set the active range for each event so it will get attached to the\n\t\t// right one and set it back afterwards\n\t\tfor (let event of context.stashedEvents) {\n\t\t\tcontext.activeRange = event.range;\n\t\t\t$run(function addFragmentEvent() {\n\t\t\t\tevent.el.addEventListener(event.type, event.listener);\n\t\t\t\treturn () => {\n\t\t\t\t\tevent.el.removeEventListener(event.type, event.listener);\n\t\t\t\t};\n\t\t\t});\n\t\t}\n\t\tcontext.stashedEvents.length = 0;\n\n\t\t// Set the active range for each animation so it will get attached to\n\t\t// the right one and set it back afterwards\n\t\t// Don't await animations\n\t\tfor (let animation of context.stashedAnimations) {\n\t\t\tcontext.activeRange = animation.range;\n\t\t\t$run(function addFragmentAnimation() {\n\t\t\t\tif (animation.in !== undefined) {\n\t\t\t\t\t// eslint-disable-next-line no-floating-promises\n\t\t\t\t\tanimate(animation.el, true, animation.in.keyframes, animation.in.options);\n\t\t\t\t}\n\t\t\t\tif (animation.out !== undefined) {\n\t\t\t\t\treturn () => {\n\t\t\t\t\t\t// eslint-disable-next-line no-floating-promises\n\t\t\t\t\t\tanimate(animation.el, false, animation.out!.keyframes, animation.out!.options);\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tcontext.stashedAnimations.length = 0;\n\n\t\t// Set the active range back\n\t\tcontext.activeRange = range;\n\t}\n}\n","import $run from \"./$run\";\n\nexport default function applyProps(\n\tel: Element,\n\tprops: Record<string, any> | undefined,\n\tpropNamesUsed: string[],\n): void {\n\tif (props !== undefined) {\n\t\tfor (let [name, value] of Object.entries(props)) {\n\t\t\tif (!propNamesUsed.includes(name)) {\n\t\t\t\tif (name.startsWith(\"on\")) {\n\t\t\t\t\tconst eventName = name.substring(2);\n\t\t\t\t\tel.addEventListener(eventName, value);\n\t\t\t\t} else {\n\t\t\t\t\t$run(function setAttribute() {\n\t\t\t\t\t\tel.setAttribute(name, value);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import type Range from \"../types/Range\";\n\nexport default function clearRange(range: Range): void {\n\t//console.log(\"clearing range\", range.name, \"from\", range.startNode, \"to\", range.endNode);\n\n\t// Clear child ranges and collect animations that take place within this\n\t// range and its children\n\tlet animations: Animation[] | undefined =\n\t\trange.animations !== null ? Array.from(range.animations) : undefined;\n\tlet childRange = range.nextRange;\n\twhile (childRange !== null && childRange.depth > range.depth) {\n\t\tif (childRange.animations !== null) {\n\t\t\tanimations ??= [];\n\t\t\tanimations.push(...childRange.animations);\n\t\t}\n\t\treleaseRange(childRange);\n\t\t// HACK: see runControlBranch\n\t\tchildRange.depth = -2;\n\t\tchildRange = childRange.nextRange;\n\t}\n\trange.nextRange = childRange;\n\n\tif (range.previousRange !== null) {\n\t\trange.previousRange.nextRange = range.nextRange;\n\t}\n\tif (range.nextRange !== null) {\n\t\trange.nextRange.previousRange = range.previousRange;\n\t}\n\n\t// Wait for animations, if any, then clear the range's nodes\n\tif (animations !== undefined) {\n\t\t// eslint-disable-next-line no-floating-promises\n\t\tPromise.all(animations.map((a) => a.finished)).then(() => clearNodes(range));\n\t} else {\n\t\tclearNodes(range);\n\t}\n}\n\nfunction clearNodes(range: Range) {\n\t// Clear the nodes for this range\n\tif (range.startNode !== null && range.endNode !== null) {\n\t\tlet currentNode = range.endNode;\n\t\t// DEBUG:\n\t\t//if (range.startNode.parentNode !== currentNode.parentNode) {\n\t\t//\tthrow new Error(\"range nodes have different parents\");\n\t\t//}\n\t\twhile (currentNode !== range.startNode) {\n\t\t\tlet previousNode = currentNode.previousSibling;\n\t\t\tcurrentNode.remove();\n\t\t\tcurrentNode = previousNode!;\n\t\t}\n\t\tcurrentNode.remove();\n\t}\n\treleaseRange(range);\n}\n\nfunction releaseRange(range: Range) {\n\trange.startNode = null;\n\trange.endNode = null;\n\trange.previousRange = null;\n\trange.nextRange = null;\n\trange.animations = null;\n}\n","import type Range from \"../types/Range\";\nimport clearRange from \"./clearRange\";\n\nexport default function clearLayoutSlot(range: Range): void {\n\tclearRange(range);\n}\n","import type Range from \"../types/Range\";\n\nexport default function newRange(name?: string): Range {\n\treturn {\n\t\tstartNode: null,\n\t\tendNode: null,\n\t\tpreviousRange: null,\n\t\tnextRange: null,\n\t\tdepth: -1,\n\t\tanimations: null,\n\t\tname,\n\t};\n}\n","import type Range from \"../types/Range\";\nimport context from \"./context\";\n\nexport default function popRange(oldRange: Range): void {\n\tcontext.activeRange = oldRange;\n}\n","import type Range from \"../types/Range\";\nimport context from \"./context\";\n\nexport default function pushRange(range: Range, toParent = false): Range {\n\tconst activeRange = context.activeRange;\n\n\t// Add the new range to the currently active range's children, so that we\n\t// can delete the children with the parent\n\tif (toParent) {\n\t\tconst previousRange = context.previousRange;\n\t\trange.previousRange = previousRange;\n\n\t\tconst nextRange = previousRange.nextRange;\n\t\tpreviousRange.nextRange = range;\n\t\trange.nextRange = nextRange;\n\n\t\trange.depth = activeRange.depth + 1;\n\t}\n\n\t// Set the new active range\n\tcontext.activeRange = range;\n\tcontext.previousRange = range;\n\n\t// Return the old active range, so that it can be reset when done\n\treturn activeRange;\n}\n","import type Component from \"../types/Component\";\nimport type Range from \"../types/Range\";\nimport type SlotRender from \"../types/SlotRender\";\nimport newRange from \"./newRange\";\nimport popRange from \"./popRange\";\nimport pushRange from \"./pushRange\";\n\nexport default function fillLayoutSlot(\n\tcomponent: Component,\n\tslot: SlotRender,\n\tparent: ParentNode,\n\tanchor: Node | null,\n\t$props: Record<string, string>,\n\t$context?: Record<PropertyKey, any>,\n): Range {\n\tconst range = newRange();\n\tconst oldRange = pushRange(range);\n\n\tcomponent(parent, anchor, $props, $context, {\n\t\t_: slot,\n\t});\n\n\tpopRange(oldRange);\n\n\treturn range;\n}\n","export default function getFragment(\n\tdocument: Document,\n\tarray: DocumentFragment[],\n\tindex: number,\n\thtml: string,\n\tns?: boolean,\n): DocumentFragment {\n\t// Create the fragment in the array if it hasn't yet been used\n\tif (array[index] === undefined) {\n\t\t// TODO: Should pass a string for the ns, when we support other element types\n\t\tif (ns === true) {\n\t\t\tconst template = document.createElementNS(\"http://www.w3.org/2000/svg\", \"template\");\n\t\t\ttemplate.innerHTML = html;\n\t\t\tconst fragment = new DocumentFragment();\n\t\t\tfragment.append(...template.childNodes);\n\t\t\tarray[index] = fragment;\n\t\t} else {\n\t\t\tconst template = document.createElement(\"template\");\n\t\t\ttemplate.innerHTML = html;\n\t\t\tarray[index] = template.content;\n\t\t}\n\t}\n\n\t// Get the fragment from the array\n\t// TODO: If we're hydrating we probably don't want to create and return a\n\t// fragment unless we really need to\n\tlet fragment = array[index].cloneNode(true) as DocumentFragment;\n\n\treturn fragment;\n}\n","import type Component from \"../types/Component\";\nimport type SlotRender from \"../types/SlotRender\";\nimport $run from \"./$run\";\nimport context from \"./context\";\nimport newRange from \"./newRange\";\nimport pushRange from \"./pushRange\";\n\n/**\n * Hydrates a component into an existing DOM tree\n * @param parent The parent node\n * @param component The component to mount\n * @param props An object containing component props\n */\nexport default function hydrate(\n\tparent: ParentNode,\n\tcomponent: Component,\n\tprops?: Record<string, any>,\n\tslots?: Record<string, SlotRender>,\n): void {\n\t// When mounting, the parent must have no child elements, so we can just set\n\t// the hydration node to the first child node\n\tcontext.hydrationNode = parent.firstChild;\n\n\t// Create and push the root range\n\tcontext.rootRange = newRange();\n\tcontext.previousRange = context.rootRange;\n\tpushRange(context.rootRange);\n\n\t// Call the component's render function\n\tcomponent(parent, null, props, undefined, slots);\n\n\tcontext.hydrationNode = null;\n\n\t// Now that we've hydrated, we can run $mount effects\n\tfor (let effect of context.mountEffects) {\n\t\t$run(effect);\n\t}\n\tcontext.mountEffects.length = 0;\n}\n","import type Component from \"../types/Component\";\nimport type SlotRender from \"../types/SlotRender\";\nimport context from \"./context\";\nimport newRange from \"./newRange\";\nimport pushRange from \"./pushRange\";\n\n/**\n * Mounts a component into a DOM node\n *\n * @param parent The node to mount the component into\n * @param component The component to mount\n * @param props An object containing component props\n */\nexport default function mount(\n\tparent: ParentNode,\n\tcomponent: Component,\n\tprops?: Record<string, any>,\n\tslots?: Record<string, SlotRender>,\n): void {\n\t// The parent node must have no child elements, so that we can hydrate\n\t// without worrying about where to start\n\tif (parent.childElementCount > 0) {\n\t\tthrow new Error(\"The parent node must have no child elements\");\n\t}\n\n\t// Remove all text, commments, etc\n\twhile (parent.firstChild !== null) {\n\t\tparent.firstChild.remove();\n\t}\n\n\t// Create and push the root range\n\tcontext.rootRange = newRange();\n\tcontext.previousRange = context.rootRange;\n\tpushRange(context.rootRange);\n\n\t// Call the component's render function\n\tcomponent(parent, null, props, undefined, slots);\n}\n","import type ListItem from \"../types/ListItem\";\n\nexport default function newListItem(data: Record<PropertyKey, any>, key?: any): ListItem {\n\treturn {\n\t\tstartNode: null,\n\t\tendNode: null,\n\t\tpreviousRange: null,\n\t\tnextRange: null,\n\t\tdepth: -1,\n\t\tanimations: null,\n\t\tdata,\n\t\tkey,\n\t};\n}\n","const HYDRATION_START = \"[\";\nconst HYDRATION_END = \"]\";\nconst HYDRATION_BREAK = \"^\";\n\nexport { HYDRATION_START, HYDRATION_END, HYDRATION_BREAK };\n","export default function isCommentNode(node: Node): node is Comment {\n\treturn node.nodeType === 8;\n}\n","export default function isTextNode(node: Node): node is Text {\n\treturn node.nodeType === 3;\n}\n","import context from \"./context\";\nimport { HYDRATION_BREAK } from \"./hydrationMarkers\";\nimport isCommentNode from \"./isCommentNode\";\n\n// TODO: It would be good to remove this, if possible\n\n/**\n * When hydrating, removes and skips hydration comments that are inserted at the\n * start of branches and used to split up text nodes that would otherwise be\n * joined in HTML.\n *\n * @param node The node to check and maybe skip.\n * @returns The next node.\n */\nexport default function nodeCheckHydrationBreak(node: ChildNode | null): ChildNode | null {\n\tif (context.hydrationNode !== null) {\n\t\tif (node !== null && isCommentNode(node) && node.data === HYDRATION_BREAK) {\n\t\t\tlet comment = node;\n\t\t\tnode = node.nextSibling;\n\t\t\tcomment.remove();\n\t\t}\n\t\tcontext.hydrationNode = node;\n\t}\n\treturn node;\n}\n","import context from \"./context\";\nimport isTextNode from \"./isTextNode\";\nimport nodeCheckHydrationBreak from \"./nodeCheckHydrationBreak\";\n\n/**\n * Gets the next sibling of a node.\n *\n * When hydrating, sets the hydration node.\n *\n * @param node The node.\n * @param text Whether we require a text node.\n */\nexport default function nodeNext(node: ChildNode, text = false): ChildNode {\n\t// If the required node is a text node, and we already have one, just use\n\t// it. This is caused by text nodes being merged in HTML\n\tif (context.hydrationNode !== null && text && isTextNode(node)) {\n\t\treturn node;\n\t}\n\n\tlet nextNode = nodeCheckHydrationBreak(node.nextSibling);\n\n\t// NOTE: We know this is not null as it is being called from generated code\n\treturn nextNode!;\n}\n","import context from \"./context\";\nimport { HYDRATION_END, HYDRATION_START } from \"./hydrationMarkers\";\nimport isCommentNode from \"./isCommentNode\";\nimport nodeNext from \"./nodeNext\";\n\n/**\n * Gets the anchor node for a control statement or component.\n *\n * When mounting, this just returns the anchor node parameter (because it was\n * created).\n *\n * When hydrating, there should be matched <![> and <!]> comments in the HTML,\n * and the anchor node should be after the end comment. The matched comment\n * nodes will be deleted, and the hydration node set to the first node inside\n * the matched comments.\n *\n * @param node The potential anchor node.\n * @returns The anchor node.\n */\nexport default function nodeAnchor(node: ChildNode): ChildNode {\n\tif (context.hydrationNode !== null) {\n\t\tif (isCommentNode(node) && node.data === HYDRATION_START) {\n\t\t\t// Skip and remove the start node, setting the hydration node in\n\t\t\t// nodeNext\n\t\t\tlet currentNode = nodeNext(node);\n\t\t\tnode.remove();\n\n\t\t\t// Go through siblings until we get to the end\n\t\t\tlet level = 1;\n\t\t\twhile (currentNode !== null) {\n\t\t\t\tif (isCommentNode(currentNode)) {\n\t\t\t\t\tif (currentNode.data === HYDRATION_START) {\n\t\t\t\t\t\tlevel += 1;\n\t\t\t\t\t} else if (currentNode.data === HYDRATION_END) {\n\t\t\t\t\t\tlevel -= 1;\n\t\t\t\t\t\tif (level === 0) {\n\t\t\t\t\t\t\t// Remove the end node and return the next one\n\t\t\t\t\t\t\tconst endNode = currentNode.nextSibling;\n\t\t\t\t\t\t\tcurrentNode.remove();\n\n\t\t\t\t\t\t\t// If the statement is empty (i.e. the end comment\n\t\t\t\t\t\t\t// immediately follows the start comment), move the\n\t\t\t\t\t\t\t// hydration node past the removed end comment to\n\t\t\t\t\t\t\t// the anchor, so that we can continue to the next\n\t\t\t\t\t\t\t// nodes\n\t\t\t\t\t\t\tif (context.hydrationNode === currentNode) {\n\t\t\t\t\t\t\t\tcontext.hydrationNode = endNode;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// NOTE: We know this is not null as it is being\n\t\t\t\t\t\t\t// called from generated code\n\t\t\t\t\t\t\treturn endNode!;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcurrentNode = currentNode.nextSibling!;\n\t\t\t}\n\n\t\t\tif (currentNode === null) {\n\t\t\t\tthrow new Error(\"End hydration comment not found\");\n\t\t\t}\n\t\t}\n\t}\n\n\treturn node;\n}\n","import context from \"./context\";\n\n/**\n * Gets the first child of a node.\n *\n * Sets the hydration node.\n *\n * @param parent The parent node.\n */\nexport default function nodeChild(parent: Node): ChildNode {\n\tlet childNode = parent.firstChild;\n\tif (context.hydrationNode !== null) {\n\t\t// The child may be null when hydrating the sole text child of an\n\t\t// element with no text\n\t\tif (childNode === null) {\n\t\t\tchildNode = parent.appendChild(parent.ownerDocument!.createTextNode(\"\"));\n\t\t}\n\t\tcontext.hydrationNode = childNode;\n\t}\n\n\t// NOTE: We know this is not null as it is being called from generated code\n\treturn childNode!;\n}\n","import context from \"./context\";\nimport { HYDRATION_START } from \"./hydrationMarkers\";\nimport isCommentNode from \"./isCommentNode\";\nimport isTextNode from \"./isTextNode\";\n\n/**\n * Gets the first child in a fragment.\n *\n * When hydrating, also sets the active range's start node, while we have it.\n *\n * @param parent The parent of the fragment.\n * @param text Whether we require a text node.\n */\nexport default function nodeRoot(parent: Node, text = false): ChildNode {\n\tif (context.hydrationNode !== null) {\n\t\tlet rootNode = context.hydrationNode;\n\n\t\t// If the root node we need is a text node, and the hydration node is\n\t\t// not a text node but the previous node is, use the previous node. This\n\t\t// is caused by text nodes being merged in HTML\n\t\tif (\n\t\t\ttext &&\n\t\t\t!isTextNode(rootNode) &&\n\t\t\trootNode.previousSibling !== null &&\n\t\t\tisTextNode(rootNode.previousSibling)\n\t\t) {\n\t\t\trootNode = rootNode.previousSibling;\n\t\t\tcontext.hydrationNode = rootNode;\n\t\t}\n\n\t\t// HACK: If the root node is a hydration start comment node, get the\n\t\t// next one instead\n\t\tif (isCommentNode(rootNode) && rootNode.data === HYDRATION_START) {\n\t\t\trootNode = rootNode.nextSibling!;\n\t\t\tcontext.hydrationNode = rootNode;\n\t\t}\n\n\t\t// If hydrating, set the active range's start node\n\t\tconst range = context.activeRange;\n\t\tif (range.startNode === null) {\n\t\t\trange.startNode = rootNode;\n\t\t}\n\n\t\treturn rootNode;\n\t} else {\n\t\t// NOTE: We know this is not null as it is being called from generated\n\t\t// code\n\t\treturn parent.firstChild!;\n\t}\n}\n","import nodeCheckHydrationBreak from \"./nodeCheckHydrationBreak\";\n\n/**\n * Gets the sibling of a node, x nodes after it.\n *\n * When hydrating, sets the hydration node.\n *\n * @param node The node.\n * @param count The number of nodes to skip.\n */\nexport default function nodeSkip(node: ChildNode, count: number): ChildNode {\n\tlet nextNode = node;\n\n\tfor (let i = 0; i < count; i++) {\n\t\tnextNode = nodeCheckHydrationBreak(nextNode.nextSibling)!;\n\t}\n\n\t// NOTE: We know this is not null as it is being called from generated code\n\treturn nextNode!;\n}\n","import type Range from \"../types/Range\";\nimport $run from \"./$run\";\nimport context from \"./context\";\nimport popRange from \"./popRange\";\nimport pushRange from \"./pushRange\";\n\n/**\n * Runs an`if`, `switch` or `await` control statement\n * @param create A function that creates the control statement's branches\n */\nexport default function runControl(\n\trange: Range,\n\tanchor: Node | null,\n\tcreate: (anchor: Node | null) => void,\n): void {\n\tconst oldRange = pushRange(range, true);\n\n\t// Run the control statement in an effect\n\t$run(function runControl() {\n\t\t// Push and pop the control statement on subsequent runs, so that new branch\n\t\t// ranges will be added to its children\n\t\tconst oldBranchRange = pushRange(range);\n\n\t\t// Run the function that creates the control statement's branches\n\t\tcreate(anchor);\n\n\t\tpopRange(oldBranchRange);\n\t});\n\n\t// If we're mounting, the anchor will be the one that is passed in, but if\n\t// we're hydrating it will be after the active branch's HTML elements, so we\n\t// need to update it after the branches have been hydrated\n\tif (context.hydrationNode) {\n\t\tanchor = context.hydrationNode.nextSibling;\n\t}\n\n\tpopRange(oldRange);\n}\n","import type Range from \"../types/Range\";\nimport clearRange from \"./clearRange\";\nimport newRange from \"./newRange\";\nimport popRange from \"./popRange\";\nimport pushRange from \"./pushRange\";\n\nexport default function runControlBranch(range: Range, create: () => void): void {\n\t// HACK: This is bad -- it means that the parent range has been cleared,\n\t// but that should have cleared the effect that runs this child range??\n\t// TODO: Look into this further...\n\tif (range.depth === -2) return;\n\n\t// Branching ranges have exactly one child -- remove it if necessary\n\tif (range.nextRange !== null && range.nextRange.depth > range.depth) {\n\t\tclearRange(range.nextRange!);\n\t}\n\n\tconst oldRange = pushRange(newRange(), true);\n\n\t// Run the create function\n\tcreate();\n\n\tpopRange(oldRange);\n}\n","import type Range from \"../types/Range\";\n\nexport default function moveRange(parent: Node, range: Range, before: ChildNode | null): void {\n\tparent = before?.parentNode ?? parent;\n\tconst endNode = range.endNode ?? range.startNode;\n\tlet currentNode = range.startNode;\n\n\twhile (currentNode !== null) {\n\t\tconst nextNode = currentNode.nextSibling;\n\t\tparent.insertBefore(currentNode, before);\n\t\tif (currentNode === endNode) break;\n\t\tcurrentNode = nextNode;\n\t}\n}\n","// Adapted from https://github.com/snabbdom/snabbdom\n// With changes from https://github.com/luwes/js-diff-benchmark\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 Simon Friis Vindum\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nimport type ListItem from \"../types/ListItem\";\nimport type Range from \"../types/Range\";\nimport $watch from \"./$watch\";\nimport clearRange from \"./clearRange\";\nimport moveRange from \"./moveRange\";\n\n/**\n * @param range The list's range\n * @param parent The parent DOM element\n * @param anchor The DOM element to create new items before\n * @param oldItems The list of current items\n * @param newItems The list of future items\n * @param create A function that creates the DOM elements for a new item\n */\nexport default function runListItems(\n\trange: Range,\n\tparent: ParentNode,\n\tanchor: Node | null,\n\toldItems: ListItem[],\n\tnewItems: ListItem[],\n\tcreate: (item: ListItem, before: Node | null) => void,\n\tupdate: (oldItem: ListItem, newItem: ListItem) => void,\n): void {\n\tlet oldStartIndex = 0;\n\tlet oldEndIndex = oldItems.length - 1;\n\tlet oldStartItem = oldItems[0];\n\tlet oldEndItem = oldItems[oldEndIndex];\n\n\tlet newStartIndex = 0;\n\tlet newEndIndex = newItems.length - 1;\n\tlet newStartItem = newItems[0];\n\tlet newEndItem = newItems[newEndIndex];\n\n\tlet oldKeyToIndex: Map<any, number> | undefined;\n\tlet newKeyToIndex: Map<any, number> | undefined;\n\n\twhile (oldStartIndex <= oldEndIndex && newStartIndex <= newEndIndex) {\n\t\tif (oldStartItem === null) {\n\t\t\toldStartItem = oldItems[++oldStartIndex];\n\t\t} else if (oldEndItem === null) {\n\t\t\toldEndItem = oldItems[--oldEndIndex];\n\t\t} else if (newStartItem === null) {\n\t\t\tnewStartItem = newItems[++newStartIndex];\n\t\t} else if (newEndItem === null) {\n\t\t\tnewEndItem = newItems[--newEndIndex];\n\t\t} else if (oldStartItem.key === newStartItem.key) {\n\t\t\ttransferListItemData(oldStartItem, newStartItem, update);\n\t\t\toldStartItem = oldItems[++oldStartIndex];\n\t\t\tnewStartItem = newItems[++newStartIndex];\n\t\t} else if (oldEndItem.key === newEndItem.key) {\n\t\t\ttransferListItemData(oldEndItem, newEndItem, update);\n\t\t\toldEndItem = oldItems[--oldEndIndex];\n\t\t\tnewEndItem = newItems[--newEndIndex];\n\t\t} else if (oldStartItem.key === newEndItem.key) {\n\t\t\t// Move to the end\n\t\t\t//console.log(\"move\", oldStartItem.key, \"to the end\");\n\t\t\tmoveRange(parent, oldStartItem, oldEndItem.endNode!.nextSibling!);\n\t\t\ttransferListItemData(oldStartItem, newEndItem, update);\n\t\t\toldStartItem = oldItems[++oldStartIndex];\n\t\t\tnewEndItem = newItems[--newEndIndex];\n\t\t} else if (oldEndItem.key === newStartItem.key) {\n\t\t\t// Move to the start\n\t\t\t//console.log(\"move\", oldEndItem.key, \"to the start\");\n\t\t\tmoveRange(parent, oldEndItem, oldStartItem!.startNode);\n\t\t\ttransferListItemData(oldEndItem, newStartItem, update);\n\t\t\toldEndItem = oldItems[--oldEndIndex];\n\t\t\tnewStartItem = newItems[++newStartIndex];\n\t\t} else {\n\t\t\t// Lazily build maps of keys to indexes here\n\t\t\t// They are relevant only if there has been a move, or a mid-list\n\t\t\t// insertion or deletion, and not if there has been an insertion\n\t\t\t// at the end or deletion from the front\n\t\t\tif (oldKeyToIndex === undefined || newKeyToIndex === undefined) {\n\t\t\t\toldKeyToIndex = new Map();\n\t\t\t\tfor (let i = oldStartIndex; i < oldEndIndex; i++) {\n\t\t\t\t\toldKeyToIndex.set(oldItems[i].key, i);\n\t\t\t\t}\n\t\t\t\tnewKeyToIndex = new Map();\n\t\t\t\tfor (let i = newStartIndex; i < newEndIndex; i++) {\n\t\t\t\t\tnewKeyToIndex.set(newItems[i].key, i);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet oldIndex = oldKeyToIndex.get(newStartItem.key);\n\t\t\tlet newIndex = newKeyToIndex.get(oldStartItem.key);\n\n\t\t\tif (oldIndex === undefined && newIndex === undefined) {\n\t\t\t\t// Replace\n\t\t\t\t//console.log(\"replace\", oldStartItem.key, \"with\", newStartItem.key);\n\t\t\t\tnewStartItem.data = $watch(newStartItem.data, { shallow: true });\n\t\t\t\tcreate(newStartItem, oldStartItem.startNode);\n\t\t\t\tnewStartItem.previousRange = oldStartItem.previousRange;\n\t\t\t\tnewStartItem.nextRange = oldStartItem;\n\t\t\t\toldStartItem.previousRange = newStartItem;\n\t\t\t\tclearRange(oldStartItem);\n\t\t\t\toldStartItem = oldItems[++oldStartIndex];\n\t\t\t\tnewStartItem = newItems[++newStartIndex];\n\t\t\t} else if (oldIndex === undefined) {\n\t\t\t\t// Insert\n\t\t\t\t//console.log(\"insert\", newStartItem.key);\n\t\t\t\tnewStartItem.data = $watch(newStartItem.data, { shallow: true });\n\t\t\t\tcreate(newStartItem, oldStartItem.startNode);\n\t\t\t\tnewStartItem = newItems[++newStartIndex];\n\t\t\t} else if (newIndex === undefined) {\n\t\t\t\t// Delete\n\t\t\t\t//console.log(\"delete\", oldStartItem.key);\n\t\t\t\tclearRange(oldStartItem);\n\t\t\t\toldStartItem = oldItems[++oldStartIndex];\n\t\t\t} else {\n\t\t\t\t// Move\n\t\t\t\t//console.log(\"move\", newStartItem.key, \"before\", oldStartItem.key);\n\t\t\t\tconst oldData = oldItems[oldIndex];\n\t\t\t\tmoveRange(parent, oldData, oldStartItem.startNode);\n\t\t\t\ttransferListItemData(oldData, newStartItem, update);\n\t\t\t\t// @ts-ignore TODO: Set key null instead?\n\t\t\t\toldItems[oldIndex] = null;\n\t\t\t\tnewStartItem = newItems[++newStartIndex];\n\t\t\t}\n\t\t}\n\t}\n\n\tif (oldStartIndex <= oldEndIndex || newStartIndex <= newEndIndex) {\n\t\tif (oldStartIndex > oldEndIndex) {\n\t\t\t// The old list is exhausted; process new list additions\n\t\t\t// HACK: I think it would be better to move anchors to the end?\n\t\t\tlet before =\n\t\t\t\toldStartItem?.startNode ?? oldItems[oldItems.length - 1]?.endNode?.nextSibling ?? anchor;\n\t\t\tfor (newStartIndex; newStartIndex <= newEndIndex; newStartItem = newItems[++newStartIndex]) {\n\t\t\t\t//console.log(\"create\", newStartItem.key);\n\t\t\t\tnewStartItem.data = $watch(newStartItem.data, { shallow: true });\n\t\t\t\tcreate(newStartItem, before);\n\t\t\t\tbefore = newStartItem.endNode!.nextSibling;\n\t\t\t}\n\t\t} else {\n\t\t\t// The new list is exhausted; process old list removals\n\t\t\tfor (oldEndIndex; oldEndIndex >= oldStartIndex; oldStartItem = oldItems[oldEndIndex--]) {\n\t\t\t\t//console.log(\"clear\", oldStartItem.key);\n\t\t\t\tclearRange(oldStartItem);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (newItems.length > 0) {\n\t\trange.nextRange = newItems[0];\n\t} else if (oldItems.length > 0) {\n\t\trange.nextRange = oldItems[oldItems.length - 1].nextRange;\n\t}\n}\n\nfunction transferListItemData(\n\toldItem: ListItem,\n\tnewItem: ListItem,\n\tupdate: (oldItem: ListItem, newItem: ListItem) => void,\n) {\n\tnewItem.startNode = oldItem.startNode;\n\tnewItem.endNode = oldItem.endNode;\n\t// Manually transfer the new data's props to the old ones (to run effects)\n\t// and then set the new data to the old one\n\tupdate(oldItem, newItem);\n\tnewItem.data = oldItem.data;\n}\n","import type ListItem from \"../types/ListItem\";\nimport type Range from \"../types/Range\";\nimport $run from \"./$run\";\nimport context from \"./context\";\nimport popRange from \"./popRange\";\nimport pushRange from \"./pushRange\";\nimport runListItems from \"./runListItems\";\n\n/**\n * Runs a `for` control statement\n * @param create A function that creates the control statement's branches\n */\nexport default function runList(\n\trange: Range,\n\tparent: ParentNode,\n\tanchor: Node | null,\n\tbuildItems: () => ListItem[],\n\tcreate: (item: ListItem, anchor: Node | null) => void,\n\tupdate: (oldItem: ListItem, newItem: ListItem) => void,\n): void {\n\tconst oldRange = pushRange(range, true);\n\n\tlet listItems: ListItem[] = [];\n\n\t// Run the list in an effect\n\t$run(function runList() {\n\t\t// Push and pop the control statement on subsequent runs, so that new\n\t\t// item ranges will be added to its children\n\t\tconst oldBranchRange = pushRange(range);\n\n\t\t// Build the array of items with keys and data\n\t\tconst newItems = buildItems();\n\n\t\t// Do NOT re-run the list for properties accessed while updating its\n\t\t// items. E.g. we want to re-run the list for `@for (item of $items)`\n\t\t// (in buildItems, above) but not for `<span>{item.id}</span>` (in\n\t\t// runListItems, below)\n\t\tcontext.activeTarget = null;\n\n\t\t// Run the function that updates the list's items\n\t\trunListItems(range, parent, anchor, listItems, newItems, create, update);\n\n\t\tlistItems = newItems;\n\n\t\tpopRange(oldBranchRange);\n\t});\n\n\t// If we're mounting, the anchor will be the one that is passed in, but if\n\t// we're hydrating it will be after the items' HTML elements, so we need to\n\t// update it after all of the items have been hydrated\n\tif (context.hydrationNode !== null) {\n\t\tanchor = context.hydrationNode.nextSibling;\n\t}\n\n\tpopRange(oldRange);\n}\n","export default function setAttribute(el: Element, name: string, value: any): void {\n\tif (value === false || value === undefined || value === null) {\n\t\tel.removeAttribute(name);\n\t} else {\n\t\tel.setAttribute(name, value);\n\t}\n}\n","import context from \"./context\";\n\n// TODO: Should we @toggle this instead? That would call onmount etc again for the new element\n\nexport default function setDynamicElement(el: HTMLElement, tag: string): HTMLElement {\n\t// If hydrating, it should already have been created as the correct element\n\tif (context.hydrationNode !== null) {\n\t\treturn el;\n\t}\n\n\t// Replace the old element with the new element\n\tlet newElement = el.ownerDocument.createElement(tag);\n\tel.replaceWith(newElement);\n\n\treturn newElement;\n}\n","import type ProxyData from \"../types/ProxyData\";\nimport { proxyDataSymbol, proxyHandledSymbol } from \"../watch/symbols\";\nimport trackProxyEffect from \"../watch/trackProxyEffect\";\nimport updateSignal from \"../watch/updateSignal\";\n\n// NOTE: this is mostly copied from SvelteDate, without the memoization\n// I'm not 100% sold on it, maybe it would be better to intercept $watch calls on a Date?\n\nlet initialized = false;\n\n/**\n * Wraps a Date object for $watching.\n */\nexport default class ReactiveDate extends Date {\n\tconstructor(...params: any[]) {\n\t\t// @ts-ignore\n\t\tsuper(...params);\n\n\t\tif (!initialized) {\n\t\t\tthis.#init();\n\t\t}\n\n\t\t// @ts-ignore\n\t\tthis[proxyHandledSymbol] = true;\n\t\t// @ts-ignore\n\t\tthis[proxyDataSymbol] = {\n\t\t\ttarget: this,\n\t\t\tisArray: false,\n\t\t\tshallow: true,\n\t\t\tsignals: new Map(),\n\t\t} satisfies ProxyData;\n\t}\n\n\t#init() {\n\t\tinitialized = true;\n\n\t\tlet reactivePrototype = ReactiveDate.prototype;\n\t\tlet datePrototype = Date.prototype;\n\n\t\tconst methods = Object.getOwnPropertyNames(datePrototype);\n\n\t\tfor (const method of methods) {\n\t\t\tif (method.startsWith(\"get\") || method.startsWith(\"to\") || method === \"valueOf\") {\n\t\t\t\t// @ts-ignore\n\t\t\t\treactivePrototype[method] = function (...args) {\n\t\t\t\t\t// @ts-ignore\n\t\t\t\t\tconst data = this[proxyDataSymbol];\n\t\t\t\t\t// @ts-ignore\n\t\t\t\t\tconst result = datePrototype[method].apply(this, args);\n\t\t\t\t\ttrackProxyEffect(data, \"#time\");\n\t\t\t\t\treturn result;\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (method.startsWith(\"set\")) {\n\t\t\t\t// @ts-ignore\n\t\t\t\treactivePrototype[method] = function (...args) {\n\t\t\t\t\t// @ts-ignore\n\t\t\t\t\tconst data = this[proxyDataSymbol];\n\t\t\t\t\t// @ts-ignore\n\t\t\t\t\tconst result = datePrototype[method].apply(this, args);\n\t\t\t\t\tupdateSignal(data, \"#time\");\n\t\t\t\t\treturn result;\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n"],"mappings":";;;;;;;;AAQA,SAAwB,OAAO,IAAgC;AAC9D,oCAAQ,aAAa,KAAK,GAAG;;;;;;;;;;ACG9B,SAAwB,KAAK,IAA0B,MAAuB;CAC7E,IAAIA,SAAiB;EACpB,MAAMC;EACN,KAAK;EACL,SAAS;EACT,aAAa;EACb,YAAY;EACZ,QAAQ;EACR,iBAAiB;EACjB,UAAU;EACV;EAEA;AAED,8BAAU,OAAO;AAEjB,QAAO;;;;;AC3BR,MAAMC,kBAAiC,OAAO,cAAc;AAC5D,MAAMC,qBAAoC,OAAO,iBAAiB;;;;;;;;;ACKlE,SAAwB,QAA4C,QAAc;AACjF,QAAO,WAAW,UAAa,WAAW,QAAQ,OAAO,qBAAqB,SAC1E,OAAO,iBAAiB,UAAU,SACnC;;;;;ACNJ,SAAwB,iBAAiB,MAAiB,KAAwB;CAIjF,IAAI,SAAS,KAAK,QAAQ,IAAI,IAAI;AAClC,KAAI,WAAW,QAAW;AACzB,WAAS;GACR,MAAMC;GACN,aAAa;GACb,oBAAoB;GAEpB;AACD,OAAK,QAAQ,IAAI,KAAK,OAAO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,WAAO;;AAIT,OAAI,OAAO,WAAW,MAAM,CAE3B,mBAAkB,UAAU,SAAU,GAAG,MAAM;IAE9C,MAAM,OAAO,KAAK;IAElB,MAAM,SAAS,cAAc,QAAQ,MAAM,MAAM,KAAK;AACtD,iBAAa,MAAM,QAAQ;AAC3B,WAAO"}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
import { Component, SlotRender } from "./Component-C6Y3UwGs.cjs";
|
|
2
|
+
import { $batch, $cache, $peek, Cleanup, ServerSlotRender, buildClasses, buildStyles, formatText } from "./ServerSlotRender-COS6H8Yk.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/render/$mount.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Runs and re-runs a function on component mount
|
|
8
|
+
*
|
|
9
|
+
* @param fn The function to run, which may return a cleanup function
|
|
10
|
+
*/
|
|
11
|
+
declare function $mount(fn: () => Cleanup | void): void;
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/types/constants.d.ts
|
|
14
|
+
/**
|
|
15
|
+
* The type of a Signal object.
|
|
16
|
+
*/
|
|
17
|
+
declare const SIGNAL_TYPE = 0;
|
|
18
|
+
/**
|
|
19
|
+
* The type of a Computed object.
|
|
20
|
+
*/
|
|
21
|
+
declare const COMPUTED_TYPE = 1;
|
|
22
|
+
/**
|
|
23
|
+
* The type of an Effect object.
|
|
24
|
+
*/
|
|
25
|
+
declare const EFFECT_TYPE = 2;
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/types/Computed.d.ts
|
|
28
|
+
/**
|
|
29
|
+
* A computed value that is lazily refreshed when accessed from an Effect or
|
|
30
|
+
* another Computed. Our computed values are implemented as property getter
|
|
31
|
+
* functions.
|
|
32
|
+
*/
|
|
33
|
+
interface Computed<T = any> {
|
|
34
|
+
/**
|
|
35
|
+
* COMPUTED.
|
|
36
|
+
*/
|
|
37
|
+
type: typeof COMPUTED_TYPE;
|
|
38
|
+
/**
|
|
39
|
+
* The cached, computed value.
|
|
40
|
+
*/
|
|
41
|
+
value: T;
|
|
42
|
+
/**
|
|
43
|
+
* The getter function to run to access this computed's value.
|
|
44
|
+
*/
|
|
45
|
+
run: () => T;
|
|
46
|
+
/**
|
|
47
|
+
* The first signal or computed that causes this effect to be run.
|
|
48
|
+
*/
|
|
49
|
+
firstSource: Subscription | null;
|
|
50
|
+
/**
|
|
51
|
+
* The first computed or effect that is triggered when this property is changed.
|
|
52
|
+
*/
|
|
53
|
+
firstTarget: Subscription | null;
|
|
54
|
+
/**
|
|
55
|
+
* Whether the computed may need to be recalculated (if any of its sources
|
|
56
|
+
* have changed). We store this on the computed (as well as its
|
|
57
|
+
* subscription) so we don't have to check the sources every time (which may
|
|
58
|
+
* be expensive).
|
|
59
|
+
*/
|
|
60
|
+
recalc: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Used to track cycles.
|
|
63
|
+
*/
|
|
64
|
+
running: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* True if the computed encountered an exception in its last run.
|
|
67
|
+
*/
|
|
68
|
+
didError: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* A subscription to roll back to when recursively updating signal targets.
|
|
71
|
+
*/
|
|
72
|
+
rollback: Subscription | null;
|
|
73
|
+
/**
|
|
74
|
+
* The name of the computed property, for debugging.
|
|
75
|
+
*/
|
|
76
|
+
name?: string;
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/types/ProxySignal.d.ts
|
|
80
|
+
/**
|
|
81
|
+
* A value that causes dependent Computeds and Effects to be re-run. Our signals
|
|
82
|
+
* are implemented as object properties.
|
|
83
|
+
*/
|
|
84
|
+
interface ProxySignal {
|
|
85
|
+
/**
|
|
86
|
+
* SIGNAL.
|
|
87
|
+
*/
|
|
88
|
+
type: typeof SIGNAL_TYPE;
|
|
89
|
+
/**
|
|
90
|
+
* The first Computed or Effect that is triggered when this property is changed.
|
|
91
|
+
*/
|
|
92
|
+
firstTarget: Subscription | null;
|
|
93
|
+
/**
|
|
94
|
+
* When signals have been changed in a batch, this is the next changed signal.
|
|
95
|
+
*/
|
|
96
|
+
nextSignalToUpdate: ProxySignal | null;
|
|
97
|
+
/**
|
|
98
|
+
* The name of the property, for debugging.
|
|
99
|
+
*/
|
|
100
|
+
name?: string;
|
|
101
|
+
}
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region src/types/Subscription.d.ts
|
|
104
|
+
/**
|
|
105
|
+
* A subscription that connects a source Signal or Computed to a target Computed
|
|
106
|
+
* or Effect.
|
|
107
|
+
*/
|
|
108
|
+
interface Subscription {
|
|
109
|
+
/**
|
|
110
|
+
* The source Signal or Computed.
|
|
111
|
+
*/
|
|
112
|
+
source: ProxySignal | Computed;
|
|
113
|
+
/**
|
|
114
|
+
* The target Computed or Effect.
|
|
115
|
+
*/
|
|
116
|
+
target: Computed | Effect;
|
|
117
|
+
/**
|
|
118
|
+
* The next source subscription. After the targets have been re-run, we run
|
|
119
|
+
* through sources to remove any that weren't re-used.
|
|
120
|
+
*/
|
|
121
|
+
nextSource: Subscription | null;
|
|
122
|
+
/**
|
|
123
|
+
* The next target subscription. When the source is changed, we run through
|
|
124
|
+
* targets to mark them dirty and possibly re-run them.
|
|
125
|
+
*/
|
|
126
|
+
nextTarget: Subscription | null;
|
|
127
|
+
/**
|
|
128
|
+
* The previous target subscription. We remove subscriptions by looping
|
|
129
|
+
* through the sources list, so we only need to know the next source, but we
|
|
130
|
+
* need to know both the next and previous targets to properly update the
|
|
131
|
+
* targets list.
|
|
132
|
+
*/
|
|
133
|
+
previousTarget: Subscription | null;
|
|
134
|
+
/**
|
|
135
|
+
* Whether this subscription is active. At the start of a re-run, all
|
|
136
|
+
* subscriptions are marked inactive and marked active if re-used. If not
|
|
137
|
+
* re-used, they are removed after the run.
|
|
138
|
+
*/
|
|
139
|
+
active: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* Whether the subscription's target may need to be recalculated (if any of
|
|
142
|
+
* its sources have changed).
|
|
143
|
+
*/
|
|
144
|
+
recalc: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* The name of the subscription, for debugging.
|
|
147
|
+
*/
|
|
148
|
+
name?: string;
|
|
149
|
+
}
|
|
150
|
+
//#endregion
|
|
151
|
+
//#region src/types/Effect.d.ts
|
|
152
|
+
/**
|
|
153
|
+
* An effect that is run and re-run when the properties it depends on change.
|
|
154
|
+
*/
|
|
155
|
+
interface Effect {
|
|
156
|
+
/**
|
|
157
|
+
* EFFECT.
|
|
158
|
+
*/
|
|
159
|
+
type: typeof EFFECT_TYPE;
|
|
160
|
+
/**
|
|
161
|
+
*
|
|
162
|
+
* @returns An optional cleanup function, to run when the effect is re-run or disposed.
|
|
163
|
+
*/
|
|
164
|
+
run: () => Cleanup | void;
|
|
165
|
+
/**
|
|
166
|
+
* The optional cleanup function that may have been returned from the run function.
|
|
167
|
+
*/
|
|
168
|
+
cleanup: Cleanup | void;
|
|
169
|
+
/**
|
|
170
|
+
* The first signal or computed that causes this effect to be run.
|
|
171
|
+
*/
|
|
172
|
+
firstSource: Subscription | null;
|
|
173
|
+
nextEffect: Effect | null;
|
|
174
|
+
/**
|
|
175
|
+
* The number of children of this effect.
|
|
176
|
+
*/
|
|
177
|
+
extent: number;
|
|
178
|
+
/**
|
|
179
|
+
* When signals have been changed, this is the next dependent effect to run.
|
|
180
|
+
*/
|
|
181
|
+
nextEffectToRun: Effect | null;
|
|
182
|
+
/**
|
|
183
|
+
* True if the effect encountered an exception in its last run.
|
|
184
|
+
*/
|
|
185
|
+
didError: boolean;
|
|
186
|
+
/**
|
|
187
|
+
* The name of the effect, for debugging.
|
|
188
|
+
*/
|
|
189
|
+
name?: string;
|
|
190
|
+
}
|
|
191
|
+
//#endregion
|
|
192
|
+
//#region src/render/$run.d.ts
|
|
193
|
+
/**
|
|
194
|
+
* Runs and re-runs a function that depends on a watched object
|
|
195
|
+
*
|
|
196
|
+
* @param fn The function to run, which may return a cleanup function.
|
|
197
|
+
*/
|
|
198
|
+
declare function $run(fn: () => Cleanup | void, name?: string): Effect;
|
|
199
|
+
//#endregion
|
|
200
|
+
//#region src/render/$unwrap.d.ts
|
|
201
|
+
/**
|
|
202
|
+
* Returns the target object of a proxy
|
|
203
|
+
*
|
|
204
|
+
* @param object The proxy object
|
|
205
|
+
*/
|
|
206
|
+
declare function $unwrap<T extends Record<PropertyKey, any>>(object: T): T;
|
|
207
|
+
//#endregion
|
|
208
|
+
//#region src/types/WatchOptions.d.ts
|
|
209
|
+
/**
|
|
210
|
+
* Options for $watch.
|
|
211
|
+
*/
|
|
212
|
+
interface WatchOptions {
|
|
213
|
+
/**
|
|
214
|
+
* Only watch top-level properties, don't recursively watch children.
|
|
215
|
+
*/
|
|
216
|
+
shallow?: boolean;
|
|
217
|
+
}
|
|
218
|
+
//#endregion
|
|
219
|
+
//#region src/render/$watch.d.ts
|
|
220
|
+
/**
|
|
221
|
+
* Watches an object and runs effects when its properties are changed
|
|
222
|
+
*
|
|
223
|
+
* @param object The object to watch
|
|
224
|
+
*/
|
|
225
|
+
declare function $watch<T extends Record<PropertyKey, any>>(object: T, options?: WatchOptions): T;
|
|
226
|
+
//#endregion
|
|
227
|
+
//#region src/types/Animation.d.ts
|
|
228
|
+
interface Animation$1 {
|
|
229
|
+
keyframes: Keyframe[] | PropertyIndexedKeyframes;
|
|
230
|
+
options?: number | KeyframeAnimationOptions;
|
|
231
|
+
}
|
|
232
|
+
//#endregion
|
|
233
|
+
//#region src/render/addAnimation.d.ts
|
|
234
|
+
declare function addAnimation(el: HTMLElement, entry?: Animation$1, exit?: Animation$1): void;
|
|
235
|
+
//#endregion
|
|
236
|
+
//#region src/render/addEvent.d.ts
|
|
237
|
+
declare function addEvent(el: Element, type: string, listener: (this: Element, ev: any) => any): void;
|
|
238
|
+
//#endregion
|
|
239
|
+
//#region src/render/addFragment.d.ts
|
|
240
|
+
declare function addFragment(fragment: DocumentFragment, parent: ParentNode, before: Node | null, endNode?: ChildNode): void;
|
|
241
|
+
//#endregion
|
|
242
|
+
//#region src/render/applyProps.d.ts
|
|
243
|
+
declare function applyProps(el: Element, props: Record<string, any> | undefined, propNamesUsed: string[]): void;
|
|
244
|
+
//#endregion
|
|
245
|
+
//#region src/types/Range.d.ts
|
|
246
|
+
interface Range {
|
|
247
|
+
startNode: ChildNode | null;
|
|
248
|
+
endNode: ChildNode | null;
|
|
249
|
+
previousRange: Range | null;
|
|
250
|
+
nextRange: Range | null;
|
|
251
|
+
depth: number;
|
|
252
|
+
/**
|
|
253
|
+
* Animations that are currently running in the range, and which need to
|
|
254
|
+
* awaited or canceled before it is removed
|
|
255
|
+
*/
|
|
256
|
+
animations: Set<Animation> | null;
|
|
257
|
+
/**
|
|
258
|
+
* The name of the range, for debugging.
|
|
259
|
+
*/
|
|
260
|
+
name?: string;
|
|
261
|
+
}
|
|
262
|
+
//#endregion
|
|
263
|
+
//#region src/render/clearLayoutSlot.d.ts
|
|
264
|
+
declare function clearLayoutSlot(range: Range): void;
|
|
265
|
+
//#endregion
|
|
266
|
+
//#region src/render/fillLayoutSlot.d.ts
|
|
267
|
+
declare function fillLayoutSlot(component: Component, slot: SlotRender, parent: ParentNode, anchor: Node | null, $props: Record<string, string>, $context?: Record<PropertyKey, any>): Range;
|
|
268
|
+
//#endregion
|
|
269
|
+
//#region src/render/getFragment.d.ts
|
|
270
|
+
declare function getFragment(document: Document, array: DocumentFragment[], index: number, html: string, ns?: boolean): DocumentFragment;
|
|
271
|
+
//#endregion
|
|
272
|
+
//#region src/render/hydrate.d.ts
|
|
273
|
+
/**
|
|
274
|
+
* Hydrates a component into an existing DOM tree
|
|
275
|
+
* @param parent The parent node
|
|
276
|
+
* @param component The component to mount
|
|
277
|
+
* @param props An object containing component props
|
|
278
|
+
*/
|
|
279
|
+
declare function hydrate(parent: ParentNode, component: Component, props?: Record<string, any>, slots?: Record<string, SlotRender>): void;
|
|
280
|
+
//#endregion
|
|
281
|
+
//#region src/render/mount.d.ts
|
|
282
|
+
/**
|
|
283
|
+
* Mounts a component into a DOM node
|
|
284
|
+
*
|
|
285
|
+
* @param parent The node to mount the component into
|
|
286
|
+
* @param component The component to mount
|
|
287
|
+
* @param props An object containing component props
|
|
288
|
+
*/
|
|
289
|
+
declare function mount(parent: ParentNode, component: Component, props?: Record<string, any>, slots?: Record<string, SlotRender>): void;
|
|
290
|
+
//#endregion
|
|
291
|
+
//#region src/types/ListItem.d.ts
|
|
292
|
+
interface ListItem extends Range {
|
|
293
|
+
data: Record<string, any>;
|
|
294
|
+
key: any;
|
|
295
|
+
}
|
|
296
|
+
//#endregion
|
|
297
|
+
//#region src/render/newListItem.d.ts
|
|
298
|
+
declare function newListItem(data: Record<PropertyKey, any>, key?: any): ListItem;
|
|
299
|
+
//#endregion
|
|
300
|
+
//#region src/render/newRange.d.ts
|
|
301
|
+
declare function newRange(name?: string): Range;
|
|
302
|
+
//#endregion
|
|
303
|
+
//#region src/render/nodeAnchor.d.ts
|
|
304
|
+
/**
|
|
305
|
+
* Gets the anchor node for a control statement or component.
|
|
306
|
+
*
|
|
307
|
+
* When mounting, this just returns the anchor node parameter (because it was
|
|
308
|
+
* created).
|
|
309
|
+
*
|
|
310
|
+
* When hydrating, there should be matched <![> and <!]> comments in the HTML,
|
|
311
|
+
* and the anchor node should be after the end comment. The matched comment
|
|
312
|
+
* nodes will be deleted, and the hydration node set to the first node inside
|
|
313
|
+
* the matched comments.
|
|
314
|
+
*
|
|
315
|
+
* @param node The potential anchor node.
|
|
316
|
+
* @returns The anchor node.
|
|
317
|
+
*/
|
|
318
|
+
declare function nodeAnchor(node: ChildNode): ChildNode;
|
|
319
|
+
//#endregion
|
|
320
|
+
//#region src/render/nodeChild.d.ts
|
|
321
|
+
/**
|
|
322
|
+
* Gets the first child of a node.
|
|
323
|
+
*
|
|
324
|
+
* Sets the hydration node.
|
|
325
|
+
*
|
|
326
|
+
* @param parent The parent node.
|
|
327
|
+
*/
|
|
328
|
+
declare function nodeChild(parent: Node): ChildNode;
|
|
329
|
+
//#endregion
|
|
330
|
+
//#region src/render/nodeNext.d.ts
|
|
331
|
+
/**
|
|
332
|
+
* Gets the next sibling of a node.
|
|
333
|
+
*
|
|
334
|
+
* When hydrating, sets the hydration node.
|
|
335
|
+
*
|
|
336
|
+
* @param node The node.
|
|
337
|
+
* @param text Whether we require a text node.
|
|
338
|
+
*/
|
|
339
|
+
declare function nodeNext(node: ChildNode, text?: boolean): ChildNode;
|
|
340
|
+
//#endregion
|
|
341
|
+
//#region src/render/nodeRoot.d.ts
|
|
342
|
+
/**
|
|
343
|
+
* Gets the first child in a fragment.
|
|
344
|
+
*
|
|
345
|
+
* When hydrating, also sets the active range's start node, while we have it.
|
|
346
|
+
*
|
|
347
|
+
* @param parent The parent of the fragment.
|
|
348
|
+
* @param text Whether we require a text node.
|
|
349
|
+
*/
|
|
350
|
+
declare function nodeRoot(parent: Node, text?: boolean): ChildNode;
|
|
351
|
+
//#endregion
|
|
352
|
+
//#region src/render/nodeSkip.d.ts
|
|
353
|
+
/**
|
|
354
|
+
* Gets the sibling of a node, x nodes after it.
|
|
355
|
+
*
|
|
356
|
+
* When hydrating, sets the hydration node.
|
|
357
|
+
*
|
|
358
|
+
* @param node The node.
|
|
359
|
+
* @param count The number of nodes to skip.
|
|
360
|
+
*/
|
|
361
|
+
declare function nodeSkip(node: ChildNode, count: number): ChildNode;
|
|
362
|
+
//#endregion
|
|
363
|
+
//#region src/render/popRange.d.ts
|
|
364
|
+
declare function popRange(oldRange: Range): void;
|
|
365
|
+
//#endregion
|
|
366
|
+
//#region src/render/pushRange.d.ts
|
|
367
|
+
declare function pushRange(range: Range, toParent?: boolean): Range;
|
|
368
|
+
//#endregion
|
|
369
|
+
//#region src/render/runControl.d.ts
|
|
370
|
+
/**
|
|
371
|
+
* Runs an`if`, `switch` or `await` control statement
|
|
372
|
+
* @param create A function that creates the control statement's branches
|
|
373
|
+
*/
|
|
374
|
+
declare function runControl(range: Range, anchor: Node | null, create: (anchor: Node | null) => void): void;
|
|
375
|
+
//#endregion
|
|
376
|
+
//#region src/render/runControlBranch.d.ts
|
|
377
|
+
declare function runControlBranch(range: Range, create: () => void): void;
|
|
378
|
+
//#endregion
|
|
379
|
+
//#region src/render/runList.d.ts
|
|
380
|
+
/**
|
|
381
|
+
* Runs a `for` control statement
|
|
382
|
+
* @param create A function that creates the control statement's branches
|
|
383
|
+
*/
|
|
384
|
+
declare function runList(range: Range, parent: ParentNode, anchor: Node | null, buildItems: () => ListItem[], create: (item: ListItem, anchor: Node | null) => void, update: (oldItem: ListItem, newItem: ListItem) => void): void;
|
|
385
|
+
//#endregion
|
|
386
|
+
//#region src/render/setAttribute.d.ts
|
|
387
|
+
declare function setAttribute(el: Element, name: string, value: any): void;
|
|
388
|
+
//#endregion
|
|
389
|
+
//#region src/render/setDynamicElement.d.ts
|
|
390
|
+
declare function setDynamicElement(el: HTMLElement, tag: string): HTMLElement;
|
|
391
|
+
//#endregion
|
|
392
|
+
//#region src/types/ServerComponent.d.ts
|
|
393
|
+
/**
|
|
394
|
+
* A component that generates HTML
|
|
395
|
+
*/
|
|
396
|
+
type ServerComponent = ($props?: Record<string, any>, $context?: Record<string, any>, $slots?: Record<string, ServerSlotRender>) => {
|
|
397
|
+
body: string;
|
|
398
|
+
head: string;
|
|
399
|
+
};
|
|
400
|
+
//#endregion
|
|
401
|
+
//#region src/wrappers/ReactiveDate.d.ts
|
|
402
|
+
/**
|
|
403
|
+
* Wraps a Date object for $watching.
|
|
404
|
+
*/
|
|
405
|
+
declare class ReactiveDate extends Date {
|
|
406
|
+
#private;
|
|
407
|
+
constructor(...params: any[]);
|
|
408
|
+
}
|
|
409
|
+
//#endregion
|
|
410
|
+
export { $batch, $cache, $mount, $peek, $run, $unwrap, $watch, type Component, type ListItem, ReactiveDate, type ServerComponent, type ServerSlotRender, type SlotRender, clearLayoutSlot, fillLayoutSlot, hydrate, mount, addFragment as t_add_fragment, nodeAnchor as t_anchor, addAnimation as t_animate, applyProps as t_apply_props, setAttribute as t_attribute, nodeChild as t_child, buildClasses as t_class, setDynamicElement as t_dynamic, addEvent as t_event, formatText as t_fmt, getFragment as t_fragment, newListItem as t_list_item, nodeNext as t_next, popRange as t_pop_range, pushRange as t_push_range, newRange as t_range, nodeRoot as t_root, runControlBranch as t_run_branch, runControl as t_run_control, runList as t_run_list, nodeSkip as t_skip, buildStyles as t_style };
|
|
411
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/render/$mount.ts","../src/types/constants.ts","../src/types/Computed.ts","../src/types/ProxySignal.ts","../src/types/Subscription.ts","../src/types/Effect.ts","../src/render/$run.ts","../src/render/$unwrap.ts","../src/types/WatchOptions.ts","../src/render/$watch.ts","../src/types/Animation.ts","../src/render/addAnimation.ts","../src/render/addEvent.ts","../src/render/addFragment.ts","../src/render/applyProps.ts","../src/types/Range.ts","../src/render/clearLayoutSlot.ts","../src/render/fillLayoutSlot.ts","../src/render/getFragment.ts","../src/render/hydrate.ts","../src/render/mount.ts","../src/types/ListItem.ts","../src/render/newListItem.ts","../src/render/newRange.ts","../src/render/nodeAnchor.ts","../src/render/nodeChild.ts","../src/render/nodeNext.ts","../src/render/nodeRoot.ts","../src/render/nodeSkip.ts","../src/render/popRange.ts","../src/render/pushRange.ts","../src/render/runControl.ts","../src/render/runControlBranch.ts","../src/render/runList.ts","../src/render/setAttribute.ts","../src/render/setDynamicElement.ts","../src/types/ServerComponent.ts","../src/wrappers/ReactiveDate.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAAyB;;iBAQD,MAAA,WAAiB;;;;;;cCL5B,WAAA;ADHY;;;cCQZ,aAAA;AALb;AAKA;AAKA;cAAa,WAAA;;;;;ADbY;;;UEQA;EDLzB;AAKA;AAKA;eCDc;;;AAXgB;EAOL,KAAA,EASjB,CATiB;;;;UAmBX,GALF,CAKE;;;;eAAA;;;AC1Bc;EAMH,WAAA,EDyBX,YCzBW,GAAA,IAAA;;;;;;;;ECLI;;;SAUN,EAAA,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B,EAAA,KAAA,EAAA,MAAA,CAAA,E2BOqD,S3BPrD;;;iB4BAW,QAAA,WAAmB;;;iBCAnB,SAAA,QAAiB,4BAA0B;;;;;;A9BH1C;iB+BUD,UAAA,QAChB,eACC,8BACS;;;iBCPM,gBAAA,QAAwB;;;;;AhCNvB;;iBiCYD,OAAA,QAChB,eACC,oBACA,+BACU,2BACH,kBAAkB,wCACf,mBAAmB;;;iBClBd,YAAA,KAAiB;;;iBCIjB,iBAAA,KAAsB,2BAA2B;;;;;;AnCJhD,KoCKpB,eAAA,GpCGoC,CAAA,MAAA,CAAA,EoCF/B,MpCE+B,CAAA,MAAA,EAAA,GAAA,CAAA,EAAA,QAAA,CAAA,EoCD7B,MpCC6B,CAAA,MAAA,EAAA,GAAA,CAAA,EAAA,MAAA,CAAA,EoCA/B,MpCA+B,CAAA,MAAA,EoCAhB,gBpCAgB,CAAA,EAAA,GAAA;;;;;;;;;cqCKpB,YAAA,SAAqB,IAAA;ErCbjB,CAAA,OAQD"}
|
package/dist/ssr.cjs
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const require_formatText = require('./formatText-DufG5l83.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/render/$serverMount.ts
|
|
4
|
+
function $serverMount(_) {}
|
|
5
|
+
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region src/render/$serverRun.ts
|
|
8
|
+
function $serverRun(_) {}
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/render/$serverUnwrap.ts
|
|
12
|
+
function $serverUnwrap(object) {
|
|
13
|
+
return object;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/render/$serverWatch.ts
|
|
18
|
+
function $serverWatch(object) {
|
|
19
|
+
return object;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/render/formatAttributeText.ts
|
|
24
|
+
function formatAttributeText(value) {
|
|
25
|
+
return (value ?? "").toString().replaceAll("\"", """);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
exports.$batch = require_formatText.$batch;
|
|
30
|
+
exports.$cache = require_formatText.$cache;
|
|
31
|
+
exports.$mount = $serverMount;
|
|
32
|
+
exports.$peek = require_formatText.$peek;
|
|
33
|
+
exports.$run = $serverRun;
|
|
34
|
+
exports.$unwrap = $serverUnwrap;
|
|
35
|
+
exports.$watch = $serverWatch;
|
|
36
|
+
exports.t_attr = formatAttributeText;
|
|
37
|
+
exports.t_class = require_formatText.buildClasses;
|
|
38
|
+
exports.t_fmt = require_formatText.formatText;
|
|
39
|
+
exports.t_style = require_formatText.buildStyles;
|
|
40
|
+
//# sourceMappingURL=ssr.cjs.map
|
package/dist/ssr.cjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssr.cjs","names":[],"sources":["../src/render/$serverMount.ts","../src/render/$serverRun.ts","../src/render/$serverUnwrap.ts","../src/render/$serverWatch.ts","../src/render/formatAttributeText.ts"],"sourcesContent":["import type Cleanup from \"../types/Cleanup\";\n\nexport default function $serverMount(_: () => Cleanup | void): void {}\n","import type Cleanup from \"../types/Cleanup\";\n\nexport default function $serverRun(_: () => Cleanup | void): void {}\n","export default function $serverUnwrap<T extends Record<PropertyKey, any>>(object: T): T {\n\treturn object;\n}\n","export default function $serverWatch<T extends Record<PropertyKey, any>>(object: T): T {\n\treturn object;\n}\n","export default function formatAttributeText(value: any): string {\n\treturn (value ?? \"\").toString().replaceAll('\"', \""\");\n}\n"],"mappings":";;;AAEA,SAAwB,aAAa,GAA+B;;;;ACApE,SAAwB,WAAW,GAA+B;;;;ACFlE,SAAwB,cAAkD,QAAc;AACvF,QAAO;;;;;ACDR,SAAwB,aAAiD,QAAc;AACtF,QAAO;;;;;ACDR,SAAwB,oBAAoB,OAAoB;AAC/D,SAAQ,SAAS,IAAI,UAAU,CAAC,WAAW,MAAK,SAAS"}
|
package/dist/ssr.d.cts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { $batch, $cache, $peek, Cleanup, ServerSlotRender, buildClasses, buildStyles, formatText } from "./ServerSlotRender-COS6H8Yk.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/render/$serverMount.d.ts
|
|
4
|
+
declare function $serverMount(_: () => Cleanup | void): void;
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region src/render/$serverRun.d.ts
|
|
7
|
+
declare function $serverRun(_: () => Cleanup | void): void;
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/render/$serverUnwrap.d.ts
|
|
10
|
+
declare function $serverUnwrap<T extends Record<PropertyKey, any>>(object: T): T;
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/render/$serverWatch.d.ts
|
|
13
|
+
declare function $serverWatch<T extends Record<PropertyKey, any>>(object: T): T;
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/render/formatAttributeText.d.ts
|
|
16
|
+
declare function formatAttributeText(value: any): string;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { $batch, $cache, $serverMount as $mount, $peek, $serverRun as $run, $serverUnwrap as $unwrap, $serverWatch as $watch, type ServerSlotRender, formatAttributeText as t_attr, buildClasses as t_class, formatText as t_fmt, buildStyles as t_style };
|
|
19
|
+
//# sourceMappingURL=ssr.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssr.d.cts","names":[],"sources":["../src/render/$serverMount.ts","../src/render/$serverRun.ts","../src/render/$serverUnwrap.ts","../src/render/$serverWatch.ts","../src/render/formatAttributeText.ts"],"sourcesContent":[],"mappings":";;;iBAEwB,YAAA,UAAsB;;;iBCAtB,UAAA,UAAoB;;;iBCFpB,wBAAwB,OAAO,2BAA2B,IAAI;;;iBCA9D,uBAAuB,OAAO,2BAA2B,IAAI;;;iBCA7D,mBAAA"}
|