Dominic Gannaway
777527b5a3
fix: remove memory leak from retaining old DOM elements ( #11197 )
...
* fix: remove memory leak from retaining old DOM elements
* missing logic
* fix dynamic html bug
1 year ago
Dominic Gannaway
63456f1df9
fix: remove memory leak from bind:this ( #11194 )
...
* fix: remove memory leak from bind:this
* alternative approach
* add error
* tidy
* tidy
* add TODO
* add TODO
* alternative approach
1 year ago
github-actions[bot]
9aebae83a5
Version Packages (next) ( #11192 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Simon H
1cc6a32069
fix: ConstTag AST tweak ( #11196 )
...
VariableDeclaration should start at `const`, not at `@const`
As a side-effect, this will create less diff noise for language tools tests
1 year ago
Rich Harris
1c33ff0107
fix: make snippet effects transparent for transitions ( #11195 )
1 year ago
Rich Harris
8fef412dbb
feat: use state proxy ancestry for ownership validation ( #11184 )
...
* rename metadata.o to metadata.owners, tweak check_ownership implementation
* track parent relationships
* update
* changeset
* adjust test to reflect new semantics
* prevent component using bind: with object it does not own
* failing test
* fix #11060
* add explanatory comment
* don't accidentally narrow global ownership, fix has_owner method
* widen ownership if assigning different state proxies to one another
* don't set owners to null when parent exists
* fix
* only recurse into POJOs
* handle cycles on context
---------
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
Co-authored-by: Dominic Gannaway <dg@domgan.com>
1 year ago
Dominic Gannaway
77ed790fb3
fix: ensure bind:this unmount behavior for members is conditional ( #11193 )
...
* fix: ensure bind:this unmount behavior for members is conditional
* revise
1 year ago
Simon H
e7869faf4d
fix: return ast from `compile` ( #11191 )
...
Svelte 4 does it and language tools assumes it's there
This also uncovered another case of how ridicoulus the old AST was
1 year ago
Simon H
7363f873df
chore: remove unused code ( #11190 )
...
leftover from earlier iterations of #11183
1 year ago
github-actions[bot]
30fa876a79
Version Packages (next) ( #11186 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Dominic Gannaway
18097478fc
breaking: remove unstate(), replace with $state.snapshot rune ( #11180 )
...
* breaking: remove untrack(), replace with $state.clean rune
* lol
* update types
* update types
* undo
* undo
* rename to raw
* rename to snapshot
* fix
* tweak docs, to make it explicitly that we're converting to and from proxies
* remove vestiges
* validation
* tweak
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 year ago
Simon H
cd7c3fea16
fix: more accurate default value handling ( #11183 )
...
- don't call fallback values eagerly, only when it's actually needed. Avoids potential unwanted side effects
- use derived_safe_equals to memoize results of destructured snippet/each context values with default values to ensure they're only recalculated when their dependencies change. Avoids unstable default values getting called multiple times yielding different results. Use derived_safe_equals to ensure new values are always set, even when mutated. fixes #11143
1 year ago
github-actions[bot]
ae7d73453c
Version Packages (next) ( #11176 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Dominic Gannaway
2fa095b61e
fix: improve spreading of attributes ( #11177 )
...
* fix: improve spreading of attributes
* twak
1 year ago
Daniel
d061f2f137
fix: ssr comments in head elements that require raw content ( #10936 )
...
* added raw elements set
* added test
* added changeset
* moved raw text elements to constands and made array
* moved to correct constants
* fix test
* fix constants formatting
1 year ago
github-actions[bot]
322737ac01
Version Packages (next) ( #11162 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Tan Li Hau
8caaa375cf
feat: add reactive URL object to svelte/reactivity ( #11157 )
...
* feat: reactive url
* fix
* simplify
* tidy
* simplify, make ReactiveURLSearchParams signature match URLSearchParams
* Update .changeset/tidy-chefs-taste.md
* fix
* fix
* regenerate types
* improve minifiability
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Rich Harris <hello@rich-harris.dev>
1 year ago
Rich Harris
2cefd785a4
fix: make ownership validation work with HMR ( #11171 )
...
* fix: make ownership validation work with HMR
* bump vite-plugin-svelte in playground
* missed a spot
1 year ago
Tan Li Hau
a092899843
feat: update error message for snippet binding and assignments ( #11168 )
...
* feat: update error message for snippet binding and assignments
* make invalid-snippet-assignment apply in non-runes mode too
* update tests
* update types
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 year ago
Tan Li Hau
d1976c07ff
fix: fix string name of reactive map and set iterator ( #11169 )
...
* fix: fix string name of reactive map and set iterator
* remove solo: true
* lint
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 year ago
Tan Li Hau
dd9a8a2578
feat: remove todo ( #11167 )
1 year ago
Tan Li Hau
9b67ee18eb
fix: throw error when auto-subscribed store variable shadow by local variable ( #11170 )
1 year ago
Rich Harris
dc6a8398d1
Revert "fix: ensure deep mutation ownership widening" ( #11155 )
...
* Revert "fix: ensure deep mutation ownership widening (#11094 )"
This reverts commit 8578857332
.
* don't delete the changeset, it's already merged
1 year ago
github-actions[bot]
be842425f5
Version Packages (next) ( #11154 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Rich Harris
c1a549e801
check generated types ( #11068 )
...
* check generated types
* bump dts-buddy
1 year ago
github-actions[bot]
70ddaf4048
Version Packages (next) ( #11133 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Dominic Gannaway
19144b000f
fix: add validation around disallowed sequence expressions to element attributes ( #11149 )
1 year ago
Tan Li Hau
15eb5b5864
fix: missing classes after dynamic expressions in class attributes ( #11134 )
1 year ago
Rich Harris
d5776c3ec3
feat: simplify HMR implementation ( #11132 )
...
* chore: simplify HMR implementation
* changeset
* unused
* prettier
1 year ago
github-actions[bot]
a740b7bb43
Version Packages (next) ( #11130 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Dominic Gannaway
0896543e67
fix: further improvements to hmr component key generation ( #11129 )
1 year ago
github-actions[bot]
3f9f28604e
Version Packages (next) ( #11126 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Dominic Gannaway
53e6a99458
fix: use correct meta property for hmr key ( #11125 )
1 year ago
github-actions[bot]
37b689b320
Version Packages (next) ( #11121 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Dominic Gannaway
b01af747e8
fix: use keys for hmr modules ( #11123 )
...
* fix: use keys for hmr modules
* simplify
* lint
* ts
1 year ago
Dominic Gannaway
1183984f68
fix: addresses reactive Set bug in certain engines ( #11120 )
1 year ago
Jeremiasz Major
0cf2e98322
chore: upgrade eslint to v9 ( #11108 )
1 year ago
github-actions[bot]
710c8f4924
Version Packages (next) ( #11111 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Dominic Gannaway
afe1d11a5b
feat: hot module reloading support for Svelte 5 ( #11106 )
...
* feat: hot module reloading support for Svelte 5
* fix lockfile
* tweaks
* types
* lint
* lint
* tweaks
* add hmr flag
* tweak
* tweaks
* move HMR logic into its own module
* simplify
* tidy up types
* fix test
* lint
* need some indirection here or references break
* prevent transitions during HMR update
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 year ago
Dominic Gannaway
e1b2d29eda
chore: add hmr compiler flag ( #11112 )
...
* chore: add hmr compiler flag
* lint
1 year ago
Dominic Gannaway
3bb231197e
fix: loosen proxy signal creation heuristics ( #11109 )
...
* fix: loosen proxy signal creation heuristics
* tighten up test
* update comment
* no need to create a source outside an effect here, because it can't result in a reference
* preserve reference to props.$$events
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 year ago
Simon H
27891cb2dd
fix: ensure top level snippets are defined when binding to component prop ( #11104 )
...
...by hoisting top level snippets out of the binding loop in ssr mode
fixes #11086
1 year ago
Rich Harris
4d0b743918
feat: use linked lists for each blocks ( #11107 )
...
* unify indexed/keyed each blocks
* WIP
* comment out console temporarily
* WIP
* animations
* fix animations
* mostly working
* working
* revert unnecessary test changes
* remove unused code
* noop when item matches
* add test
* DRY
* simplify
* mostly working
* fix
* fix
* uncomment
* remove unnecessary test
* unused
* appease eslint etc
* avoid mutating lookup
* reuse lookup
* perf tweaks
* microoptimisations
* more efficient linking
* optimise
1 year ago
Dominic Gannaway
ce348f0d69
chore: add test to show usage of context in component template ( #11061 )
...
* chore: prevent usage of getContext during component template
* repurpose test to be just a test to capture context in template
1 year ago
github-actions[bot]
e8f7437cf6
Version Packages (next) ( #11093 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Simon H
5a1c756a4e
fix: execute sole static script tag ( #11095 )
...
- take into account that template could consist of a single script tag, for which querySelectorAll('script') would yield false negatives
- add test to ensure that we don't execute script tags inside `@html` tags next to static script tags
fixes #11082
1 year ago
Dominic Gannaway
3c2f4d2d55
fix: improve hydration of svelte head blocks ( #11099 )
...
* fix: improve hydration of svelte head blocks
* revert sandbox
* simplify
1 year ago
Dominic Gannaway
48549f7d00
fix: improve internal proxied state signal heuristic ( #11102 )
...
Fixes #11069
1 year ago
Simon H
d2b6159d2e
chore: css unused selector warnings ( #11098 )
...
The character adjustments in the existing warnings are because we remove some tabs from empty lines when initializing the Svelte 5 repo; the warnings were just not checked at that time yet.
1 year ago
Simon H
ed9bab9200
fix: better sibling selector handling ( #11096 )
...
Keep sibling selectors when dealing with slots/render tags/`svelte:element` tags
fixes #9274
1 year ago
Dominic Gannaway
3462c54fd2
fix: improve compiled output of multiple call expression in single text node ( #11097 )
...
* fix: improve compiled output of multiple call expression in single text node
* fix
1 year ago
Simon H
22494be9ec
feat: introduce `$host` rune, deprecate `createEventDispatcher` ( #11059 )
...
closes #11022
1 year ago
Simon H
8578857332
fix: ensure deep mutation ownership widening ( #11094 )
...
Previously, ownership widening/removal was only done if the immediate object that was encountered was state. This isn't always the case. It also didn't take into account classes with state on it (which turn into getters). This change takes both these cases into account and now always traverses the given object deeply.
fixes #11060
1 year ago
Simon H
b1a8038f8b
fix: make static `element` property available ( #11079 )
...
for the SvelteComponent type
closes #8936
1 year ago
github-actions[bot]
dfc55c18f0
Version Packages (next) ( #11072 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Simon H
a9e15bdf2d
breaking: robustify interop of exports and props ( #11064 )
...
- don't throw a dev time error when binding to an export (fixes #11008 )
- remove bindings that are for component exports
- throw an error when using a component export with the same name as a property
1 year ago
Dominic Gannaway
452749494e
Fix unowned bug 2 ( #11077 )
...
* fix: improve handled of unowned derived signals
* fix: improve handled of unowned derived signals
* lint
1 year ago
Rich Harris
8cbe8c1197
fix: bundle CSS types ( #11067 )
...
* make Css a proper namespace
* changeset
1 year ago
github-actions[bot]
ae3d472cbc
Version Packages (next) ( #11057 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Dominic Gannaway
b87d57dc6e
fix: add `anchor` support to mount() API ( #11050 )
...
* fix: add `anchor` support to mount() API
* use ??
* fix inconsistent formatting
* required options before optional ones
* regenerate types
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 year ago
Dominic Gannaway
02441c6a19
chore: apply each block controlled teardown optimization, again ( #11051 )
1 year ago
Rich Harris
f7c8fd569b
Revert "chore: apply each block controlled teardown optimization ( #11045 )" ( #11049 )
...
This reverts commit 1afec80261
.
1 year ago
Rich Harris
bb1d229e26
fix docs ( #11048 )
1 year ago
Dominic Gannaway
1afec80261
chore: apply each block controlled teardown optimization ( #11045 )
...
* chore: apply each block controlled teardown optimization
remove deopt
remove deopt
* remove deopt
* give a more descriptive name if we're running it across modules
* shorter comment
* rename each_element -> parent_node
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 year ago
Dominic Gannaway
17281c3df1
Revert "chore: remove deopts and refactor code for controlled optimizations (…" ( #11043 )
...
This reverts commit 3ece9cd051
.
1 year ago
Dominic Gannaway
3ece9cd051
chore: remove deopts and refactor code for controlled optimizations ( #11040 )
...
* chore: remove deopts and refactor code for controlled optimizations
* remove comment
* tune
* tweak
* tweak
* typo
* get rid of single-use variable
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 year ago
github-actions[bot]
d85d5a060b
Version Packages (next) ( #11035 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Dominic Gannaway
c50883e496
fix: ensure transition errors are not swallowed ( #11039 )
...
* fix: ensure transition errors are not swallowed
* feedback
1 year ago
Dominic Gannaway
b210fe3c9d
chore: remove parent DOM before children DOM ( #11038 )
1 year ago
Rich Harris
92909834f0
breaking: prevent unparenthesized sequence expressions in attributes ( #11032 )
1 year ago
github-actions[bot]
2a1d3c6e73
Version Packages (next) ( #11034 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Rich Harris
3254d2e22f
fix: add missing package.json in package ( #11033 )
1 year ago
github-actions[bot]
6bb825b1b1
Version Packages (next) ( #11018 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Dominic Gannaway
1d52c1323b
fix: improve unowned derived signal heuristics ( #11029 )
...
* fix: improve unowned derived signal heuristics
* spelling
1 year ago
Dominic Gannaway
2a784fce16
fix: correctly handle closure passed to $derived.by when destructuring ( #11028 )
...
* fix: correctly handle closure passed to $derived.by when destructuring
* oops
1 year ago
Rich Harris
3c155e3f3e
fix: ensure effect cleanup functions are called with null `this` ( #11024 )
1 year ago
Rich Harris
ad11c5087f
fix: ensure correct context for action update/destroy functions ( #11023 )
1 year ago
Rich Harris
34748ba015
chore: verify that `$effect.root(...)` does not re-run ( #11020 )
1 year ago
Rich Harris
0a162924fb
feat: more efficient hydration markers ( #11019 )
...
* remove <!--ssr:if:true--> comments
* remove <!--ssr:each_else--> comments
* changeset
* tidy up
1 year ago
Rich Harris
4f3fae7c6d
chore: compiler subpackage ( #10988 )
...
* move compiler.cjs to compiler/index.js
* changeset
* prettier
* ugh
1 year ago
Frédéric Crozatier
1c75b9ac4d
fix: add `name` to HTMLDetailsAttributes ( #11013 )
...
* add name attribute to HTMLDetailsAttributes
* changeset
1 year ago
Dominic Gannaway
8c4769db37
chore: improve internal performance of effect runtime ( #10999 )
...
* chore: improve internal performance of effect runtime
* add TODOs
* add TODOs
1 year ago
github-actions[bot]
57813124d8
Version Packages (next) ( #10995 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Rich Harris
7bd853b1a8
fix: hydrate HTML with surrounding whitespace ( #10996 )
...
* fix: hydrate HTML with surrounding whitespace
* add test
* fix a few more short comments
* tidy up
* avoid magic strings
* avoid magic strings
* fix
* oops
1 year ago
Dominic Gannaway
3f6eff55a4
chore: use internal doubly linked listed for effect tree ( #10994 )
...
* chore: use internal doubly linked listed for effect tree
* cleanup
* todo
1 year ago
Rich Harris
4a6316818c
feat: faster HTML tags ( #10986 )
...
* feat: faster HTML tags
* move code to where it is used
1 year ago
Rich Harris
cd90a5d946
chore: rename css.ts to css.d.ts ( #10991 )
1 year ago
github-actions[bot]
442f2d7c39
Version Packages (next) ( #10983 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Dominic Gannaway
b119600966
fix: ensure child effects are removed from parent branches ( #10985 )
...
* fix: ensure child effects are removed from parent branches
* fix: child effects are removed from parent branches
* oops
1 year ago
Rich Harris
5b2d5212d2
feat: expose `'svelte/internal'` ( #10987 )
...
* feat: expose svelte/internal
* fix
1 year ago
Dominic Gannaway
a1d74bd56d
chore: remove signal field from effects ( #10984 )
1 year ago
Dominic Gannaway
696b6922e8
fix: revert shorthand ssr comments ( #10980 )
...
* fix: revert shorthand ssr comments
* tests
* add changeset
1 year ago
github-actions[bot]
ef0191a6ae
Version Packages (next) ( #10977 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Rich Harris
227945d242
feat: re-export built-ins from `svelte/reactivity` on the server ( #10973 )
...
* chore: re-export builtins from svelte/reactivity on the server
* changeset
* fix
1 year ago
Dominic Gannaway
8971910940
fix: further improvements to effect scheduling and flushing ( #10971 )
...
* fix: improve effect scheduling
* fix: further improvements to effect scheduling and flushin
* add test
* simplify
* simplify
* lint
* fix e2e tests
* fix e2e tests
* simplify
* Update packages/svelte/src/internal/client/runtime.js
* Update packages/svelte/src/internal/client/runtime.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update packages/svelte/src/internal/client/runtime.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update packages/svelte/src/internal/client/runtime.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* style tweak
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 year ago
Rich Harris
293f905a53
chore: use #client alias ( #10974 )
1 year ago
Rich Harris
f303d82043
chore: tidy up server exports ( #10972 )
...
* tidy up server exports
* tidy up server exports
* docs are unnecessary here
* eliminate client dependencies from server code
* lint
1 year ago
Rich Harris
d49e2aeb15
chore: explicit reexports ( #10970 )
...
* explicit re-exports
* explicit re-exports
* regenerate types
1 year ago
Rich Harris
8a758d86ee
move some code ( #10969 )
1 year ago
Rich Harris
cebbccbcba
chore: move svelte/internal to svelte/internal/client ( #10968 )
1 year ago
Rich Harris
eaa243d2da
chore: reshuffle some code ( #10967 )
...
* remove superfluous .d.ts file
* remove main/main-client.js to index-client.js
* move main/main-server.js to index-server.js
* move main/public.d.ts to index.d.ts
* move ambient.d.ts
* fix
* fix
1 year ago
github-actions[bot]
de6a802435
Version Packages (next) ( #10966 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Dominic Gannaway
ea6fd72e79
fix: apply animate on prefix/suffix each block mutations ( #10965 )
1 year ago
github-actions[bot]
1c645c3c07
Version Packages (next) ( #10963 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Dominic Gannaway
f118f8ea27
fix: improve action support for nested $effect ( #10962 )
...
* fix: improve action support for nested $effect
* tweaks
* simplify
* comment
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 year ago
Dominic Gannaway
d50b7661e5
fix: improve effect sequencing and execution order ( #10949 )
...
* WIP
* WIP
* address bad merge conflict
* add test
* fix issues
* remove debugger
* increase count
* increase count
* something different
* change
* change
* try it
* better comment
* remove deadcode
* move to continue
* fix tests
* add optimization
* unksip test
* Update packages/svelte/src/internal/client/dom/elements/bindings/this.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update packages/svelte/src/internal/client/dom/elements/bindings/this.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update packages/svelte/src/internal/client/dom/elements/bindings/this.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* remove import
* add changeset
* tweaks
* code golf
* remove pre effects
* more effect ordering stuff (#10958 )
* WIP
* i guess this change makes sense?
* simplify
* delete unused code
* delete pre_effect
* note to self
* tidy up
* typos
* style tweaks
* style tweaks
* improve reactive statement handling
* no return needed
* let prettier put everything on a single line
* style tweaks
* var
* failing test
* fix test
* fix ordering
* simplify
* ondestroy
* working
* note breaking change
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 year ago
Rich Harris
2079e675ea
replace skip_if_ssr and skip_if_hydrate with modes ( #10956 )
2 years ago
Rich Harris
326e2b4840
chore: simplify templates ( #10954 )
...
* WIP
* WIP
* fix
* simplify
* rename close to append
* appease typescript
* simplify
* simplify
* frag -> root
* move logic to where it's used
2 years ago
Dominic Gannaway
cb18f8fbbe
chore: root effects should not have parents ( #10950 )
...
* chore: root effects should not have parents
* tune
* oops
* Update packages/svelte/src/internal/client/runtime.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
2 years ago
Rich Harris
9a4cd7e8d8
chore: refactor effects a bit ( #10948 )
...
* WIP
* formalise branch effects
* WIP
* rename MANAGED to BRANCH_EFFECT
* remove ondestroy functions
* tidy up
* simplify
* lint
* tidy up
* tidy up
* tidy up
* tidy up
* remove ondestroy
* tidy up
* tidy up
* remove TODO comment
* update comment
2 years ago
github-actions[bot]
b6598a3cc5
Version Packages (next) ( #10934 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2 years ago
Rich Harris
c683484f5f
chore: tidy up some hydration code ( #10944 )
...
* tidy up
* tidy up
2 years ago
Rich Harris
f8fcbf0b0b
chore: tidy up some outdated code ( #10947 )
2 years ago
Rich Harris
66e0378155
chore: remove `$.space` ( #10945 )
...
* chore: remove $.space
* simplify space_frag
* rename $.space_frag to $.text
2 years ago
Rich Harris
4fcedb2fb1
chore: simplify hydration ( #10943 )
...
* WIP
* unused
* unused
* fix head hydration
* working
* simplify
* tighten up
* css props
* fix treeshaking
* add a comment
2 years ago
Dominic Gannaway
afe589e219
fix: improve order of pre-effect execution ( #10942 )
...
* chore: refactor local effect flushing to use new topological approach
2 years ago
Rich Harris
3ce74e47a9
chore: update sequencing inside blocks ( #10939 )
...
* WIP
* fix timing issue
* compromise
* fix
* add missing before_init
* lint
---------
Co-authored-by: Dominic Gannaway <dg@domgan.com>
2 years ago
Rich Harris
9bbc3328ee
chore: tidy up effect init ( #10931 )
...
* move signal init logic into create_effect
* tidy up
* call set_signal_status inside execute_effect
* tidy up
* unused import
2 years ago
Rich Harris
7adc14e24c
chore: unify pre effects ( #10933 )
...
* breaking: always run pre effects synchronously
* unify pre effects
2 years ago
Rich Harris
f2cca537a3
feat: use implicit return for each block keys ( #10938 )
...
* feat: use implicit return for each block keys
* swap args
* update test
2 years ago
Rich Harris
808cc6fca6
feat: shorter each blocks ( #10937 )
2 years ago
Rich Harris
8cfea9f36c
breaking: always run pre effects synchronously ( #10928 )
2 years ago
github-actions[bot]
b44311acc1
Version Packages (next) ( #10920 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2 years ago
Rich Harris
ed2981d7b8
chore: simplify updates ( #10922 )
...
* remove if blocks around attribute updates
* remove singular updates
* simplify
* get rid of text_effect
* get rid of class_toggle_effect and style_effect
* remove spread_attributes_effect
* simplify
* simplify
* simplify
* remove unused stuff
* get rid of spread_dynamic_element_attributes_effect
* remove set_custom_element_data_effect
* unused import
* more descriptive names
2 years ago
Rich Harris
456e50d14b
chore: use `effect(...)` instead of `user_effect(...)` ( #10927 )
2 years ago
Rich Harris
7a17e21f8a
chore: remove managed_effect ( #10926 )
...
* chore: remove managed_effect
* remove managed_pre_effect
2 years ago
miunau
bbd44e9e47
fix: Add `elementtiming` HTMLAttribute, remove `crossorigin` from HTMLInputAttributes ( #10921 )
...
* Removed `crossorigin` from HTMLInputAttributes
* Added `elementtiming` attribute to HTMLAttributes
* changeset
---------
Co-authored-by: Rich Harris <hello@rich-harris.dev>
2 years ago
Rich Harris
b7a0d80bfc
simplify render_effect signature ( #10925 )
...
* simplify render_effect signature
* lint
2 years ago
Rich Harris
59ff650ccb
remove if blocks around attribute updates ( #10917 )
2 years ago
Rich Harris
7e584e40d7
chore: optimise attributes ( #10916 )
...
* avoid getAttribute outside hydration
* tidy up
* simplify
* dom -> element
2 years ago
Rich Harris
4f24eae9c3
simplify updates ( #10912 )
2 years ago
github-actions[bot]
1e0054e915
Version Packages (next) ( #10889 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2 years ago
miunau
0c05733d31
fix: Add `dirname` to HTMLInputAttributes ( #10908 )
...
* Add `dirname` to HTMLInputAttributes
* changeset
---------
Co-authored-by: Rich Harris <hello@rich-harris.dev>
2 years ago
Rich Harris
8685d497e5
feat: use bracket matching instead of `ssr:n` comments ( #10904 )
...
* use short comments
* use bracket matching
* fix
* update snapshots
* update tests
* fix
2 years ago
Rich Harris
f1d9afe32f
changeset ( #10906 )
2 years ago
Rich Harris
302b0ec973
chore: remove unused selector() function ( #10903 )
2 years ago
Rich Harris
7e5e462194
feat: use short comments ( #10899 )
...
* use short comments
* fix
2 years ago
Rich Harris
32b1824198
chore: more hydration stuff ( #10896 )
...
* this condition is always true
* rename child_frag to first_child
* no need to use is_array, it is always an array when hydrating
* simplify close_template
* spread is faster than Array.from
* avoid reassigning argument
2 years ago
Rich Harris
9b7331c04c
chore: only specify use_clone_node when necessary ( #10895 )
2 years ago
Rich Harris
89f4e8d53a
chore: more hydration stuff ( #10894 )
...
* simplify
* put memory cleanup where it belongs
2 years ago
Rich Harris
8214075285
fix: update type of `options.target` ( #10892 )
2 years ago
Rich Harris
1fc5f8b9c0
chore: code-golf a bit ( #10893 )
2 years ago
Rich Harris
dfd1819559
chore: tidy up hydration code ( #10891 )
...
* remove some indirection
* tidy up
* tidy
* tidy up
* simplify
* fix
* don't attempt to hydrate children of void dynamic element
* simplify
* tighten up
* fix
* add note, simplify
* tidy up
* changeset
* revert this change, save for a separate PR
2 years ago
Rich Harris
7f10642add
chore: improve hydration tests ( #10887 )
...
* use server-rendered HTML as hydration test starting point
* update tests
* remove _before.html files
* remove _before_head.html files
* override output with _expected.html
* expected output for binding-input case
* remove unused files
* fix
* changeset
2 years ago
Dominic Gannaway
fe7c45ba13
Add more tests ( #10882 )
...
* Add more tests
* ts
2 years ago
Dominic Gannaway
d6f10c5421
add more legacy tests ( #10881 )
...
* add more legacy tests
* add more tests
* ts
2 years ago
Rich Harris
b6c7956b26
chore: remove blocks ( #10880 )
...
* attach DOM to effects
* null out effect.dom
* remove some block.d references
* another
* drive-by fix
* better comment
* unused arg
* another
* another
* another
* more
* finish renaming stuff
* more
* remove item.d
* remove block.d
* remove effect.block
* remove current_block
* delete delete delete
* rename
* remove some stuff we dont need
* simplify
2 years ago
github-actions[bot]
c47c5713e2
Version Packages (next) ( #10869 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2 years ago
Dominic Gannaway
83f30bf0e8
fix: allow runes for variable declarations in the template ( #10879 )
2 years ago
Simon H
852eca4ee6
chore: error on accessing global that is a rune ( #10877 )
...
...rather than only when the function is invoked
2 years ago