0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 17:30:59 +01:00
Commit Graph

1172 Commits

Author SHA1 Message Date
Tan Li Hau
e50be669cc
fix const declared without let: binding get ignored (#7434) 2022-04-12 16:38:08 +08:00
gtmnayan
afd3f4e5a9
[feat] Make setContext return the value that was passed in (#7432)
* return value from setContext

* update docs

* Add test

* eof new line

* pacify the linter

* const and tabs
2022-04-11 08:50:28 +08:00
Yuichiro Yamashita
eca1a652fb
[fix] better context checks for identifiers in const tags (#7222)
Fixes #7423
Fixes #7431
Fixes #7206
Fixes #7431
Fixes #7221

Co-authored-by: tanhauhau <lhtan93@gmail.com>
2022-04-08 19:30:49 +02:00
Yuichiro Yamashita
e0d93254fd
[feature] Dynamic elements implementation <svelte:element> (#6898)
Closes #2324

Co-authored-by: Alfred Ringstad <alfred.ringstad@hyperlab.se>
Co-authored-by: Simon Holthausen <simon.holthausen@accso.de>
Co-authored-by: tanhauhau <lhtan93@gmail.com>
2022-04-08 16:54:55 +02:00
Tan Li Hau
89fda7edae
[fix] add key dependencies into block dependencies (#7422)
* add key dependencies into block dependencies

* fix lint
2022-04-08 22:24:15 +08:00
Pat Cavit
9f4602ac6f
[fix] style: directive should prevent innerHTML optimization (#7390)
Fixes #7386
2022-03-30 10:49:25 -04:00
Yosuke Ota
7463d51301
[fix]: keep space in <pre> or when preserveWhitespace: true (#6990)
Fixes #6437
Fixes #4731
Closes #4737

Whitespace is now untouched inside <pre> tag and other tags if preserveWhitespace is true
2022-02-02 09:30:25 +01:00
Yuichiro Yamashita
00e394e3c8
[fix] fix crash when using arrow functions in {@const} (#7144) 2022-01-26 09:50:18 -05:00
Tan Li Hau
dc06ea916e
fix: style directive not reactive in {#each} loop (#7140) 2022-01-14 12:16:34 -05:00
Tan Li Hau
815bc7ef6e
fix: test cases should fail when it should fail (#7139) 2022-01-14 12:12:23 -05:00
GHOST
c67f8ef14c
[fix] handle kebab case style directives (#7123)
fixes #7122
2022-01-12 11:42:13 +01:00
Tan Li Hau
b5aaa6641b
[feat] implement constants in markup (#6413) 2022-01-11 17:10:09 -05:00
Paul Murray
8a47b5ec9e
[feat] Style directives (#5923)
* add Style node, interfaces

* style-directives: add parser and runtime test

* style-directives: push styles in to styles array on Element

* style-directives: minimal ssr work

* style-directives: ssr add_styles

* style-directive: tests

* style-directives: work in progress

* obviously incorrect hard-coded color

* tweak

* style directive interface

* style-directives: get text from info in Style node

* style-directives: add_styles func in ElementWrapper

* style-directives: ssr rendering

* handle text-only style directive in tag.ts

* style-directives: handle spread styles in ssr

* style-directives: more parser tests

* style-directives: more inline tests

* style-directives: remove solo tests

* style-directives: cleanup

* style-directives: tweak spread ssr internal

* style-directives: push updater into update chunks; add dynamic test;

* remove .solo

* check for dynamic dependencies before adding update chunk

* add test of multiple styles; remove null styles;

* style-directives: docs; more tests of multiple styles

* style-directives: use camelcase

* style-directives: cleanup

* style-directives: fix mustache template case with template literal

* style-directives: use ternary

* style-directives: linting

* style-directives: remove "text" from interface

* style-directives: actually, remove StyleDirective interface entriely

* add more test, fix test for ssr

* fix lint and tidy up

* add test for css variables

* fix linting errors

Co-authored-by: pmurray73 <pmurray73@bloomberg.net>
Co-authored-by: Tan Li Hau <lhtan93@gmail.com>
2022-01-08 11:09:11 -05:00
Tan Li Hau
9f2b5afdf7
[fix] binding member expression should only invalidate the object, not the member property (#7008) 2022-01-06 15:28:53 -05:00
Tan Li Hau
2f0f330b76
[fix] {:else if} value incorrectly cached (#7043) 2022-01-06 11:07:37 -05:00
pngwn
4240455e02
[fix] ensure truthy non-boolean attributes are rendered correctly in SSR (#7066) 2022-01-06 10:14:09 -05:00
Yuichiro Yamashita
966c03a317
[chore] fix test flakiness (#7076) 2022-01-05 10:30:02 -08:00
Tan Li Hau
6ecc3e4d6a
[feat] opt-out loopGuard for async loops (#6963) 2021-12-13 10:32:33 -05:00
Robin Munn
5a8851436f
[fix] bind:this during onMount in manually-created component (#6920) 2021-12-13 10:02:10 -05:00
Yuichiro Yamashita
a5968dd2d0
[chore] adjust @typescript-eslint/no-unused-vars lint config (#6798) 2021-10-07 16:41:28 -04:00
Conduitry
10ce5c95fd
[fix] handle promise rejections for {#await} in SSR (#6790) 2021-09-30 08:21:32 -04:00
Conduitry
67b53bfe6d
[fix] prefer context from constructor options (#6759) 2021-09-22 16:39:03 -04:00
Bjorn Lu
79df74b087
[fix] run else-if reactive function on re-renders (#6727) 2021-09-15 16:23:41 -04:00
Shinobu Hayashi
f1f7d90240
[fix] handle AssignmentPattern with ObjectPattern in rewrite_identifier (#6715) 2021-09-10 11:36:40 -04:00
Shinobu Hayashi
fc9241fea9
[fix] handle undefined select value with spread (#6687) 2021-08-27 14:53:18 -04:00
Theodore Brown
8cb72d9716
[fix] set selectedIndex to -1 when no option matches bound <select> value (#6170) 2021-08-20 12:24:49 -04:00
Hasan Altan Birler
100561c336
[fix] hydration append issue (#6602) 2021-08-04 14:16:29 -04:00
Tan Li Hau
ce550adef6
[feat] allow use:actions on <svelte:body> (#6608) 2021-08-04 12:19:13 -04:00
Tan Li Hau
e1d0d00ebb
[feat] allow shorthand {#await ... then/catch} (#6564) 2021-07-27 09:58:32 -04:00
Tan Li Hau
b720f0e620
[feat] support destructured declaration of props (#6578) 2021-07-27 09:53:55 -04:00
Tan Li Hau
c550f604f2
[feat] enable export ... from (#6574) 2021-07-27 09:37:37 -04:00
Tan Li Hau
d75ed6a003
[fix] slot data for cancelled transition (#6314) 2021-07-26 14:03:35 -04:00
Yuichiro Yamashita
c8732c8a27
[fix] create in transition even if intro is initialized (#6516) 2021-07-26 13:56:38 -04:00
Tan Li Hau
9501ac6257
[fix] destructuring store assignment (#6529) 2021-07-26 13:44:15 -04:00
Tan Li Hau
1952ea22de
[fix] no root node for detached dom node (#6570) 2021-07-26 13:35:12 -04:00
Bjorn Lu
71c29bbf35
[fix] dynamic autofocus (#6494) 2021-07-23 14:18:16 -04:00
Tan Li Hau
365b5e300c
[fix] store reactivity in reactive declarations (#6559) 2021-07-22 10:59:11 -04:00
Tan Li Hau
8c66acfa92
fix one-way <select> bind with spread (#6512) 2021-07-21 16:36:16 -04:00
Tan Li Hau
f906180435
fix binding when updating through accessors (#6523) 2021-07-21 16:25:18 -04:00
Tan Li Hau
222a9dd2c6
[feat] get all contexts (#6528)
* get all contexts

* docs

* explicit return type

* allow specifying return type through generic parameter

* Update site/content/docs/03-run-time.md

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
2021-07-21 12:59:00 +08:00
Tan Li Hau
2818567925
fix input value 0 for ssr (#6458) 2021-07-13 17:02:43 -07:00
Tan Li Hau
ebaa891e69
[chore] update code-red@0.2.0 (#6425)
Co-authored-by: Conduitry <git@chor.date>
2021-07-10 06:15:44 -07:00
Jonnie
7bcbe67939
add ssr for group bindings (#4621)
* add ssr for group bindings

* remove unnecessary chunk length check

* check if checkbox or radio

Co-authored-by: tanhauhau <lhtan93@gmail.com>
2021-07-10 12:07:37 +08:00
Daybrush (Younkue Choi)
201a71d8b7
fix insert function (#6445) 2021-07-08 05:39:53 -07:00
Dennis Kaspar
b464320607
Add trusted modifier (#6149)
Fixes #6137

Adding a trusted modifier to make events not be dispatchable by console/sourcecode.
Useful to prevent injected code to automatically dispatch event for preventing botting
2021-06-27 18:48:42 +02:00
Tan Li Hau
a6055b34d9
fix slot props not updated when transition aborted (#6414) 2021-06-22 10:26:47 -04:00
Tan Li Hau
7d39e676c5
bind this in bubbled events (#6417) 2021-06-22 10:12:25 -04:00
Tan Li Hau
3f990a96ba
Use SSR rendered as initial html for runtime hydration test (#4444) 2021-06-18 19:06:01 -07:00
Tan Li Hau
ebd21ae6d3
fix updating of slot contents when aborting transition (#6042) 2021-04-30 12:05:43 -04:00
Lyu, Wei-Da
00e58e7bc8
Fix {#await} block scope when updating (#6219) 2021-04-30 10:18:07 -04:00