0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-11-22 03:47:27 +01:00
Commit Graph

8236 Commits

Author SHA1 Message Date
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
2024-03-30 11:34:06 -04:00
Dominic Gannaway
3f6eff55a4
chore: use internal doubly linked listed for effect tree (#10994)
* chore: use internal doubly linked listed for effect tree

* cleanup

* todo
2024-03-30 14:28:37 +00:00
Rich Harris
4a6316818c
feat: faster HTML tags (#10986)
* feat: faster HTML tags

* move code to where it is used
2024-03-30 09:46:53 -04:00
Rich Harris
cd90a5d946
chore: rename css.ts to css.d.ts (#10991) 2024-03-30 09:45:21 -04:00
github-actions[bot]
442f2d7c39
Version Packages (next) (#10983)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-29 15:35:00 -04:00
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
2024-03-29 15:05:49 -04:00
Rich Harris
5b2d5212d2
feat: expose 'svelte/internal' (#10987)
* feat: expose svelte/internal

* fix
2024-03-29 15:05:31 -04:00
Dominic Gannaway
a1d74bd56d
chore: remove signal field from effects (#10984) 2024-03-29 15:58:50 +00:00
Dominic Gannaway
696b6922e8
fix: revert shorthand ssr comments (#10980)
* fix: revert shorthand ssr comments

* tests

* add changeset
2024-03-29 10:03:52 -04:00
github-actions[bot]
ef0191a6ae
Version Packages (next) (#10977)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-29 10:11:09 +00:00
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
2024-03-28 21:24:40 -04:00
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>
2024-03-28 21:24:13 -04:00
Rich Harris
293f905a53
chore: use #client alias (#10974) 2024-03-28 19:02:21 -04:00
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
2024-03-28 17:21:05 -04:00
Rich Harris
d49e2aeb15
chore: explicit reexports (#10970)
* explicit re-exports

* explicit re-exports

* regenerate types
2024-03-28 16:09:49 -04:00
Rich Harris
8a758d86ee
move some code (#10969) 2024-03-28 15:50:20 -04:00
Rich Harris
cebbccbcba
chore: move svelte/internal to svelte/internal/client (#10968) 2024-03-28 14:48:33 -04:00
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
2024-03-28 14:36:11 -04:00
github-actions[bot]
de6a802435
Version Packages (next) (#10966)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-28 13:35:23 -04:00
Dominic Gannaway
ea6fd72e79
fix: apply animate on prefix/suffix each block mutations (#10965) 2024-03-28 17:24:33 +00:00
github-actions[bot]
1c645c3c07
Version Packages (next) (#10963)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-28 17:06:58 +00:00
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>
2024-03-28 13:01:36 -04:00
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>
2024-03-28 12:13:58 -04:00
Rich Harris
2079e675ea
replace skip_if_ssr and skip_if_hydrate with modes (#10956) 2024-03-27 12:56:55 -04:00
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
2024-03-27 10:56:08 -04:00
Dominic Gannaway
faf838c46d
update playwright (#10955) 2024-03-27 13:59:44 +00:00
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>
2024-03-26 22:09:01 +00:00
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
2024-03-26 16:36:53 -04:00
github-actions[bot]
b6598a3cc5
Version Packages (next) (#10934)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-26 13:40:16 -04:00
Rich Harris
c683484f5f
chore: tidy up some hydration code (#10944)
* tidy up

* tidy up
2024-03-26 13:33:56 -04:00
Rich Harris
f8fcbf0b0b
chore: tidy up some outdated code (#10947) 2024-03-26 13:33:45 -04:00
Rich Harris
66e0378155
chore: remove $.space (#10945)
* chore: remove $.space

* simplify space_frag

* rename $.space_frag to $.text
2024-03-26 13:33:34 -04:00
Rich Harris
4fcedb2fb1
chore: simplify hydration (#10943)
* WIP

* unused

* unused

* fix head hydration

* working

* simplify

* tighten up

* css props

* fix treeshaking

* add a comment
2024-03-26 11:55:35 -04:00
Dominic Gannaway
afe589e219
fix: improve order of pre-effect execution (#10942)
* chore: refactor local effect flushing to use new topological approach
2024-03-26 14:14:05 +00:00
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>
2024-03-26 11:05:22 +00:00
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
2024-03-26 10:06:44 +00:00
Rich Harris
7adc14e24c
chore: unify pre effects (#10933)
* breaking: always run pre effects synchronously

* unify pre effects
2024-03-26 10:05:40 +00:00
Rich Harris
f2cca537a3
feat: use implicit return for each block keys (#10938)
* feat: use implicit return for each block keys

* swap args

* update test
2024-03-26 10:04:49 +00:00
Rich Harris
808cc6fca6
feat: shorter each blocks (#10937) 2024-03-25 22:01:22 -04:00
Rich Harris
8cfea9f36c
breaking: always run pre effects synchronously (#10928) 2024-03-25 19:12:44 -04:00
dependabot[bot]
dbd111762d
chore(deps-dev): bump express from 4.18.2 to 4.19.2 (#10932)
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-25 19:00:47 -04:00
github-actions[bot]
b44311acc1
Version Packages (next) (#10920)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-25 18:50:45 -04:00
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
2024-03-25 17:33:44 -04:00
Rich Harris
456e50d14b
chore: use effect(...) instead of user_effect(...) (#10927) 2024-03-25 17:21:55 -04:00
Rich Harris
7a17e21f8a
chore: remove managed_effect (#10926)
* chore: remove managed_effect

* remove managed_pre_effect
2024-03-25 16:55:01 -04:00
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>
2024-03-25 16:53:56 -04:00
Rich Harris
b7a0d80bfc
simplify render_effect signature (#10925)
* simplify render_effect signature

* lint
2024-03-25 16:53:45 -04:00
Rich Harris
59ff650ccb
remove if blocks around attribute updates (#10917) 2024-03-25 13:38:52 -04:00
Rich Harris
7e584e40d7
chore: optimise attributes (#10916)
* avoid getAttribute outside hydration

* tidy up

* simplify

* dom -> element
2024-03-25 11:55:10 -04:00
Rich Harris
4f24eae9c3
simplify updates (#10912) 2024-03-25 11:08:06 -04:00