Richard Harris
9e9db10719
lint
7 years ago
Rich Harris
b21a5c8562
Merge branch 'onmount_triggers_in_reverse_order_for_siblings' of https://github.com/colincasey/svelte into colincasey-onmount_triggers_in_reverse_order_for_siblings
7 years ago
Rich Harris
87f5ae925a
Merge pull request #3149 from Conduitry/preprocess-attribute-parsing-fix
...
preprocess: fix handling of attribute values containing `=`
7 years ago
Rich Harris
c01745abcc
preserve symmetry when walking css ast
7 years ago
Conduitry
475433c7d7
preprocess: fix handling of attribute values containing `=`
7 years ago
Rich Harris
fba160906c
Merge branch 'gh-3135' of https://github.com/btk5h/svelte into btk5h-gh-3135
7 years ago
Rich Harris
cb545713a6
Merge pull request #3147 from sveltejs/gh-2693
...
distinguish between lazy and non-lazy expressions
7 years ago
Rich Harris
36b15b50a3
Merge pull request #3146 from sveltejs/gh-2135
...
handle circular values when rendering bindings
7 years ago
Rich Harris
3f7c7e021e
Merge pull request #3145 from sveltejs/gh-2034
...
update bind:this references when setting to null
7 years ago
Rich Harris
fc71d001b3
Merge pull request #3142 from sveltejs/gh-1496
...
prevent await block mounting inside removed if block
7 years ago
Rich Harris
65b0b6a571
on second thoughts
7 years ago
Richard Harris
00d43752bb
distinguish between lazy and non-lazy expressions - fixes #2693
7 years ago
Richard Harris
9601f44ff2
handle circular values when rendering bindings - fixes #2135
7 years ago
Richard Harris
d4b021201f
update bind:this references when setting to null - fixes #2034
7 years ago
Richard Harris
8d95c53c09
prevent await block mounting inside removed if block - fixes #1496
7 years ago
Richard Harris
15f89891a0
add scoping attribute for pseudo-class selectors without a type/class - fixes #1705
7 years ago
Timothy Johnson
5567365cde
Typo
7 years ago
Timothy Johnson
35f4f288c8
Events for dom properties
7 years ago
Timothy Johnson
885e0035c8
Pass options in component event
7 years ago
Timothy Johnson
ad7c62d983
Events for DOM methods
7 years ago
Timothy Johnson
8658c5e5fb
Component.$unsafe_set
7 years ago
Timothy Johnson
fe2d875815
Events for Blocks and Components
7 years ago
Bryan Terce
f317dc451d
Restore correct current_atrule
7 years ago
Richard Harris
5576b60474
lint
7 years ago
Rich Harris
eb8ae7194d
Pass hoisted values through to slots ( #3124 )
...
* Fixed bug with slot props variables
* dont add hoisted items to context
* alternative fix for #2586
* update slots more conservatively
7 years ago
Axelen123
bdb8237cf8
Make inject_state and capture_state always available
7 years ago
Rich Harris
3ec8e5fe33
Fix contextual bind:this ( #2806 )
7 years ago
Rich Harris
26e15dc74c
Merge pull request #3112 from sveltejs/gh-2917
...
fix placement of each-else block, and clarify node references in source
7 years ago
Axelen123
508f2e7e34
Only capture and inject writable props
7 years ago
Axelen123
99fecab33e
Add hooks for HMR support (sveltejs#2377)
7 years ago
Conduitry
ea7654adb1
escape `@` sigils in debug filename
7 years ago
Rich Harris
e105d2ade2
Merge branch 'master' into gh-2917
7 years ago
Rich Harris
a9cec4d457
Merge pull request #3110 from sveltejs/gh-3054
...
check for existence of switch instance before introing
7 years ago
Rich Harris
a3f70bd288
Merge pull request #3111 from sveltejs/gh-2923
...
sanitize names of automatically-bubbled events
7 years ago
Rich Harris
9afe62b0ef
Merge pull request #3109 from sveltejs/gh-3064-part-2
...
add a few more known globals
7 years ago
Rich Harris
bc84ea23f4
Merge pull request #3106 from sveltejs/gh-3035
...
remove components without props from each block
7 years ago
Rich Harris
3aab13914c
fix placement of each-else block, and clarify node references in source - fixes #2917
7 years ago
Rich Harris
098b92a3bf
sanitize names of automatically-bubbled events - fixes #2923
7 years ago
Rich Harris
307db077eb
check for existence of switch instance before introing - fixes #3054
7 years ago
Rich Harris
a93f089765
doh
7 years ago
Rich Harris
5a732658ce
prevent empty if block
7 years ago
Rich Harris
1c0ead302f
add a few more known globals
7 years ago
Richard Harris
6f9230a915
fix #3035 for real
7 years ago
Richard Harris
1e8728e2a4
only call subscriber once for writable with callback - fixes #3022
7 years ago
Richard Harris
6886d3260f
remove components without props from each block - fixes #3035
7 years ago
Rich Harris
2e8da2bc1f
Merge pull request #3102 from sveltejs/gh-3027
...
prevent top-level text being discarded
7 years ago
Richard Harris
bdd4bb1f95
remove unused code
7 years ago
Richard Harris
ea0dd9c0de
prevent top-level text being discarded - fixes #3027
7 years ago
Richard Harris
e1148b6590
always bail out of hoisting on encountering local state - fixes #3044
7 years ago
Rich Harris
497472d01a
Merge pull request #3098 from sveltejs/gh-3064
...
add Error to known globals, declare catch block parameter
7 years ago
Rich Harris
a1f5bb96b7
add Error to known globals, declare catch block parameter. fixes #3064
7 years ago
Rich Harris
f2c0364da0
Merge branch 'master' into gh-3058
7 years ago
Rich Harris
57c6b2e94a
always run onDestroy functions - fixes #3058
7 years ago
43081j
e65c8e4f8d
fix existing lint errors
7 years ago
Rich Harris
0034b6b074
merge master -> snake_case
7 years ago
Rich Harris
02e635687b
rename kebab-case files - supercedes #2890
7 years ago
Rich Harris
8390195c3a
Merge branch 'master' into gh-2612
7 years ago
Rich Harris
b1bf645272
Merge pull request #3093 from sveltejs/gh-3092
...
handle member expressions in destructuring assignments
7 years ago
Rich Harris
14e739379b
handle member expressions in destructuring assignments - fixes #3092
7 years ago
Rich Harris
a7aa95477f
typo
7 years ago
Rich Harris
204766ec0a
add some docs, rename to textContent and innerHTML
7 years ago
Rich Harris
3c21a184d1
Merge branch 'master' into init-contenteditable
7 years ago
Thomas Ghysels
d6b5c42f7f
Fix parsing ambiguous HTML entities ( #3071 )
...
Fixes sveltejs/sapper#759
7 years ago
Bryan Terce
34ac1ff42e
Fix binding to values in a component when it uses `$$props` ( #2725 )
7 years ago
Bryan Terce
dc3cb06f91
Fix dynamic `bind:this` on components ( #2333 )
7 years ago
Maurício Kishi
d0448aba01
Merge branch 'master' into gh-2612
7 years ago
mrkishi
b57354d8ac
replace ninja globals
7 years ago
Bryan Terce
b61b92166e
preserve whitespace at each block boundaries ( #713 )
7 years ago
Bryan Terce
0cc4b91f65
Fix each blocks not unmounting components correctly ( #3056 )
...
* Prevent outro from invoking detach multiple times
* Add tests for unmounting entries in an each block
* Remove redundant function for removing from lookup
7 years ago
Rich Harris
7de7cdbf06
Track which blocks are outroing to prevent duplication
...
* track whether block is already outroing
* get tests passing
* use transition_in and transition_out helpers
* fix some stuff
* fix non-existent dynamic component outros
* another fix
* another fix
* argh so close
* NAILED IT
* remove unused code
* tidy up
7 years ago
Conduitry
3bc50e0945
fix text nodes in .innerHTML-optimized output
...
- collapse whitespace to single space when appropriate (#2745 )
- escape template string characters in script and style tags
7 years ago
Conduitry
fa485165ce
Merge branch 'master' into gh-2612
7 years ago
Conduitry
88881cd3c5
don't grab page offsets too early
7 years ago
Richard Harris
d21f2b4518
merge master -> init-contenteditable
7 years ago
Richard Harris
b95d200a04
Merge branch 'master' of github.com:sveltejs/svelte
7 years ago
Richard Harris
f82378e64f
whoops
7 years ago
Rich Harris
f8433a30e6
Merge pull request #2990 from mrkishi/component-type
...
Add ambient types for `*.svelte` files
7 years ago
Richard Harris
dd162a2536
Merge branch 'master' into IlyaSemenov-gh-2843
7 years ago
Richard Harris
39bb045d8e
move get_name to get_name_from_filename and add unit tests
7 years ago
Conduitry
e8a53373f2
only set attributes via properties when truly necessary ( #1434 )
7 years ago
mrkishi
61f4d3a8f2
make eslint happy
7 years ago
mrkishi
75568f3656
split typescript projects
7 years ago
Mikhail Korepanov
eee073966c
Allow whitespace after = in attributes ( #3026 )
7 years ago
Johan
74a767403f
ensure correct requestAnimationFrame context ( #2933 )
7 years ago
Efe Küçük
52b964652f
do not collapse whitespace containing nbsp ( #3014 )
7 years ago
Conduitry
0b2d0f6711
use `@_` sigil for globals
7 years ago
Richard Harris
25dcf49b3c
prevent compiled output blowing up in Node if window is not defined
7 years ago
mrkishi
c0d9d555df
deconflict more globals
7 years ago
Conduitry
0b913aa338
import globals from helpers ( #2612 ) ( #2947 )
7 years ago
Ilya Semenov
1a74cede2f
Improve file name to component name conversion, fix #2843
7 years ago
Richard Harris
b502022d67
use helpers
7 years ago
Richard Harris
ceca640822
tidy up, prevent collisions
7 years ago
Richard Harris
e30d7b97d0
initialise text/html bindings if necessary
7 years ago
Richard Harris
4499969337
merge master -> leporo-master
7 years ago
Richard Harris
3bb160571c
Merge branch 'master' of https://github.com/leporo/svelte
7 years ago
Rich Harris
358e79f762
allow empty <title> tags - fixes #2980 ( #2988 )
7 years ago
Rich Harris
e69e891691
support once modifier on component events, fail on others ( #2987 )
...
* support once modifier on component events, fail on others. fixes #2654
* appease the gods of typescript
7 years ago
Rich Harris
6cc03f873c
Merge branch 'master' into master
7 years ago
mrkishi
fca5435605
add ambient type for generated svelte components
7 years ago
James Garbutt
11ced4a257
Introduce ESLint to svelte sources ( #2958 )
...
* introduce eslint
* add lint npm script
* first eslint run
* use tsc stronger checks for unused vars
* fix strict typescript unused checks
* reintroduce unicode oddities
* revert ordering changes
* revert whitespace changes
* set indent lint rule as error and ignore outliers
* revert some more unicode
* reintroduce scissors unicode again
7 years ago
Efe Küçük
e73eb33b45
Render textarea binding values inside element
...
* ssr-textarea-bind-fix
* oops
* trying again
* Fixing an old test
* avoid creating extra function expression
7 years ago
Rich Harris
9c892724c6
Merge pull request #2910 from Harald-1/animation-with-delay
...
follow-up fix to #2871
7 years ago
Richard Harris
bb96112eed
Merge branch 'master' of github.com:sveltejs/svelte
7 years ago
Richard Harris
fc3ae7356b
Merge branch 'fix-2929' of https://github.com/qintarp/svelte into qintarp-fix-2929
7 years ago
Vlad Glushchuk
46781985a1
Rebase and fix linter warning
7 years ago
Vlad Glushchuk
53d03811c8
Fix the cursor reset issue
7 years ago
Vlad Glushchuk
d0edb3167d
Fix a typo
7 years ago
Vlad Glushchuk
bf0d66175b
Add bind:text and bind:html support for contenteditable elements
...
Fixes #310
7 years ago
Richard Harris
833145cb28
fix typo
7 years ago
Richard Harris
0f06710da8
DRY out
7 years ago
Rich Harris
6c874569de
solve diamond dependencies ( #2660 )
7 years ago
Benjamin W. Broersma
1ffaccffc1
Fixing #2689 correctly, checking outro.is_local for adding if(local).
7 years ago
Lyphon
c865d53e5e
Fix build appveyor build failure
7 years ago
Lyphon
0b22030848
Fix 2929
7 years ago
Harald Fassler
082f86b1c6
remove prepare_outro
7 years ago
Harald-1
eb6a3c5b71
Apply suggestions from code review
...
call add_transform directly instead of wrapping it into prepare_outro
Co-Authored-By: Rich Harris <richard.a.harris@gmail.com>
7 years ago
Rich Harris
abf01fddcf
Merge pull request #2909 from Harald-1/animations-without-transitions
...
fix #2908
7 years ago
Rich Harris
b71b7fb5f6
Merge pull request #2912 from yazonnile/master
...
Fix for #2655 - adding introstart...outroend events to in-out transition
7 years ago
Slava Z
126d095bdb
Fix for #2655 - adding introstart...outroend events to in-out transition
7 years ago
Harald Fassler
35cdaa821e
follow-up fix to #2871
7 years ago
Ankeet Maini
c61ad46b06
Fix typo.
7 years ago
Harald Fassler
4d0d63f722
fix #2908
7 years ago
Colin Casey
a2cdcfde40
Merge branch 'master' into onmount_triggers_in_reverse_order_for_siblings
...
* master: (35 commits)
Fix overwrite of 'offset' value in reactive statement
fix slide example
typos
update svelte-repl (fixes download button)
update svelte-repl
update svelte-repl version
use better eliza package
gitignore workers
add compiler typings to list of published files
improve typings for animate, easing, transition, motion and internal apis
update bundler worker
fix gitignore
fix types for easing functions
fix build order
generate internal-exports file
update gitignore
update folder structure - #2790
bump estree-walker to fix some svelte.walk bugs
bundle locally
-> v3.4.4
...
7 years ago
Richard Harris
69b7b5e637
Merge branch 'master' into folder-structure
7 years ago
Rich Harris
98174f8374
typos
7 years ago
Colin Casey
142e6fb19f
Merge branch 'master' into onmount_triggers_in_reverse_order_for_siblings
...
* master: (66 commits)
-> v3.4.3
always add raw property to text nodes
flesh out in/out transition tutorial chapter (#2792 )
code style
fix test
fix tests
Fix CRUD example to allow changing input values.
Fixes #2714
treat requestAnimationFrame as a noop on the server
site: actions tutorial: destroy is not required (#2776 )
Allow binding of <details> open
site: add /faq redirect to GitHub wiki FAQ
fix case sensitive import name, improve tsconfig
type declarations for bundled files
convert everything to TypeScript
check for unknown props when creating component
cleanup, improve comments
typecheck npm script
workarond for estree-walker related typings conflict
compile/render-dom and other remaining typings
...
7 years ago
Bogdan Savluk
0173aa1147
improve typings for animate, easing, transition, motion and internal apis
7 years ago
Richard Harris
2d647ec071
fix types for easing functions
7 years ago
Richard Harris
b151458b07
update gitignore
7 years ago
Richard Harris
965fae7991
update folder structure - #2790
7 years ago
Rich Harris
bf5b8ab777
Merge pull request #2881 from sveltejs/gh-2878
...
dont create unknown prop warnings for $$scope etc, or if component has $$props
7 years ago
Rich Harris
95533b226d
Merge pull request #2880 from cudr/head_html_fix
...
repair dynamic {@html} in head
7 years ago
Richard Harris
3122decd33
dont create unknown prop warnings for $$scope etc, or if component has $$props - fixes #2878
7 years ago
Richard Harris
1c2c3b166c
make is_reactive_dependency optional
7 years ago
Rich Harris
1176e674d0
Merge branch 'master' into less-invalidation
7 years ago
Rich Harris
ca192e15df
Merge pull request #2872 from Harald-1/master
...
Update animations.js
7 years ago
Rich Harris
7ed3965f98
Merge pull request #2877 from colincasey/feat/omit_readonly_ssr_bindings
...
Omits readonly attributes from SSR code
7 years ago
cudr
435f3993ea
add tests
7 years ago
Colin Casey
3f906bfd95
Omits readonly attributes from SSR code
...
* move `is_readonly` into the common `Binding` AST class
* prevents the following bindings from being emitted into the SSR code:
* `bind:clientWidth`
* `bind:clientHeight`
* `bind:offsetWidth`
* `bind:offsetHeight`
* `bind:duration`
* `bind:buffered`
* `bind:seekable`
* `bind:played`
* `bind:value` (only for `input` with `type=file`)
7 years ago
Brian Takita
3c6acd7aa3
jsdoc: `derived` second argument
...
* optional first argument is a Stores type
* optional second argument is a function that takes a single argument
* has a return value
7 years ago
Brian Takita
0f493d8d78
Apply suggestions from code review
...
Co-Authored-By: Rich Harris <richard.a.harris@gmail.com>
7 years ago
Brian Takita
4e0555d5b3
Additional detail to jsdocs for writable, readable, & derived
...
Fixes https://github.com/sveltejs/svelte/issues/2867
7 years ago
Harald Fassler
3aa5bc1c35
Merge remote-tracking branch 'upstream/master'
7 years ago
Harald Fassler
5af26cf37b
Update animations.js
...
Fix issue #2871
7 years ago
Richard Harris
4da1f5d05e
Merge branch 'master' of github.com:sveltejs/svelte
7 years ago
Richard Harris
c8abbfc3a1
always add raw property to text nodes
7 years ago
Richard Harris
32c500f987
Merge branch 'raw-entities' of https://github.com/RedHatter/svelte into RedHatter-raw-entities
7 years ago
Richard Harris
cb04297b8a
merge master -> zxbodya-ts
7 years ago
Richard Harris
d0f84150bf
code style
7 years ago
Richard Harris
c2fa3dd30d
Merge branch 'feat/2174_dev_runtime_warning_when_passing_unknown_props' of https://github.com/colincasey/svelte into colincasey-feat/2174_dev_runtime_warning_when_passing_unknown_props
7 years ago
Rich Harris
8507ac2663
Merge branch 'master' into improve-typings
7 years ago
Rich Harris
c96ccf6dc6
Merge pull request #2856 from sveltejs/raf
...
treat requestAnimationFrame as a noop on the server
7 years ago
cudr
c7e3e26940
works correct
7 years ago
Richard Harris
181e954224
only invalidate referenced values
7 years ago
Richard Harris
0f51970ac1
fix tests
7 years ago
Timothy Johnson
5a87705a38
Fixes #2714
7 years ago
Rich Harris
47dcd385fe
treat requestAnimationFrame as a noop on the server
7 years ago
Benjamin Milde
f56445f3a1
Allow binding of <details> open
7 years ago
Bogdan Savluk
83114b29c8
fix case sensitive import name, improve tsconfig
7 years ago
Bogdan Savluk
70a9cec0f7
convert everything to TypeScript
7 years ago
Colin Casey
4f474521ec
check for unknown props when creating component
7 years ago
Bogdan Savluk
4c08e93f58
cleanup, improve comments
7 years ago
Bogdan Savluk
762a9c2bea
workarond for estree-walker related typings conflict
7 years ago
Bogdan Savluk
fef6dff347
compile/render-dom and other remaining typings
7 years ago
Bogdan Savluk
7d68f2e934
fix compile/render-ssr typings
7 years ago
Bogdan Savluk
e9ff062e41
fix compile/nodes typings
7 years ago
Bogdan Savluk
aee3dcae4d
improve parser typings
7 years ago
Rich Harris
6d6685c4ca
Merge pull request #2829 from colincasey/bugfix/2821_custom_elements_with_no_svelte_options
...
Allow custom element to be declared with no tag and no options
7 years ago
Rich Harris
4c9c04fc44
Merge pull request #2795 from sanderhahn/master
...
Add docstrings to store
7 years ago
Rich Harris
9c911462c4
Update store.ts
7 years ago
Colin Casey
a21afe8b5e
Allow custom element to be declared with no tag and no options
7 years ago
mrkishi
a01b1986bd
allow end tag omission in blocks
7 years ago
Christian Kaisermann
ab5b379c3c
fix: 🐛 data attributes without value outputting as "true"
7 years ago
Sander Hahn
701fe15ebc
add docstrings to store
7 years ago
Rich Harris
6c2f7347fa
Merge pull request #2784 from clarkdo/refactor
...
refactor: remove unnecessary return null in style attribute
7 years ago
Clark Du
29586f0d83
fix: add super.render back
7 years ago
Clark Du
e694fc36b2
refactor: remove unnecessary super.render in style attribute
7 years ago
Rich Harris
ce3a49520a
Merge pull request #2781 from sveltejs/gh-2780
...
handle non-falsy non-function deriver return values
7 years ago
Richard Harris
aa35bb5634
ensure spring works server-side = fixes #2773
7 years ago
Richard Harris
5c172504c0
handle non-falsy non-function deriver return values - fixes #2780
7 years ago
Rich Harris
960e0be017
Merge pull request #2733 from sanderhahn/master
...
typescript version of store
7 years ago
Rich Harris
103e56410f
Merge pull request #2749 from colincasey/custom_elements_without_tags
...
Allows custom element to be defined without a tag
7 years ago
Rich Harris
eabc9ba385
Merge pull request #2754 from EmilTholin/reset-quote-mark
...
Set quote_mark to null when closing quote mark is found
7 years ago
Rich Harris
902b7dbae1
Merge pull request #2755 from EmilTholin/mutated-const-reative-dependency
...
Set mutated const variables as reactive dependencies
7 years ago
Rich Harris
d060af034e
Merge pull request #2766 from EmilTholin/debug-hoisted-variable
...
Don't get hoisted variable from ctx when using @debug
7 years ago
Emil Tholin
3b163fe341
Add error for missing equals after attribute name
7 years ago
Emil Tholin
093bf15cb9
Don't get hoisted variable from ctx when using @debug
7 years ago
Emil Tholin
c6df0df7df
Set mutated const variables as reactive dependencies
7 years ago
Sander Hahn
cabd8ad3a5
advanced type for derived
7 years ago
Emil Tholin
00324b2d0e
Set quote_mark to null when closing quote mark is found
7 years ago
Colin Casey
5d1aece2ab
FIX : #2281 - trigger onMount callbacks in same order as child components
7 years ago
Colin Casey
6481c4cd61
FIX #2417 : allows custom element to be defined without a tag
...
* warning given on compile if tag is absent
* no warning if tag is set to `null`
7 years ago
Sander Hahn
05c26d789e
typescript version of store
7 years ago
Rich Harris
3cb1ef8e23
fix vars/warnings
7 years ago
Rich Harris
b858e8db32
implement namespaced components
7 years ago
Rich Harris
ceca22b26f
Merge pull request #2709 from LostKobrakai/multiple-event-listeners
...
Allow multiple event listeners on a single node
7 years ago
Benjamin Milde
85b256432a
Implement suggestions
7 years ago
Rich Harris
f84e46e227
Merge pull request #2696 from PaulMaly/patch-1
...
Make component.$$.dirty just a dictionary
7 years ago
Rich Harris
1652548ca2
Merge pull request #2698 from jacobmischka/fix-get-slot-changes
...
Initialize `get_slot_changes` to null when not needed
7 years ago
Rich Harris
580224d07d
Merge pull request #2703 from EmilTholin/hoisting-injected-reactive-vars
...
Don't hoist functions dependent on injected reactive variables
7 years ago
Julien Mourer
fef58ba8bb
Add `window` and `document` to globals
...
To prevent the following warning message:
```
(!) svelte plugin: 'window' is not defined
src/templates/Share.svelte
20: </script>
21:
22: {#if window.navigator.share}
^
23: <button class="icon-share2" on:click="{shareNatively}" title="Share"></button>
24: {:else}
```
7 years ago
Emil Tholin
fb3c5f6a90
Don't hoist functions dependent on injected reactive variables
7 years ago
Jacob Mischka
39e7487cec
Initialize `get_slot_changes` to null when not needed
...
Fixes #2697
7 years ago
PaulMaly
1ca1148dcd
Use special blank_object() for component.$$.dirty
7 years ago
PaulMaly
498049f368
Make component.$$.dirty just a dictionary
...
To be sure that we won't have any hidden behavior related to a prototype: https://davidwalsh.name/object-create-null
7 years ago
Rich Harris
47e6cc3935
Merge pull request #2694 from sveltejs/gh-2444
...
invalidate dependencies of reactive declarations
7 years ago
Rich Harris
ccf90f6e36
Merge pull request #2683 from sveltejs/gh-2681
...
fix instrumentation of auto-subscription self-assignments
7 years ago
Rich Harris
a74df4a149
Merge pull request #2679 from EmilTholin/reactive-declaration-warnings
...
Warn on improper use of reactive declarations
7 years ago
Richard Harris
dfc06cc7a1
invalidate dependencies of reactive declarations - fixes #2444
7 years ago
Benjamin Milde
73cbb4ce74
Allow multiple event listeners on a single node
7 years ago
Emil Tholin
9d237f9f4b
Warn on improper use of reactive declarations
7 years ago
Conduitry
6c56ea204b
some linting and tidying
7 years ago
Conduitry
f31a155f07
fix instrumentation of auto-subscription self-assignments ( #2681 )
7 years ago
Richard Harris
bdb9d8a859
lint
7 years ago
Rich Harris
094f6733cd
Merge pull request #2627 from lorenbrichter/spring-verlet
...
Subtle tweaks to spring animations
7 years ago
Rich Harris
50ee4efac4
Merge pull request #2658 from MikeMatrix/each-block-rest-destructuring
...
each-block array destructuring
7 years ago
Rich Harris
3364ba22cf
Merge pull request #2664 from EmilTholin/each-block-destructuring-rest
...
Add support for object-rest in each destructuring
7 years ago
Rich Harris
6524cbb8ad
Merge pull request #2670 from MikeMatrix/fix-readonly-form-attribute
...
Applying read only property form onto elements using `attr` instead
7 years ago
Rich Harris
cb3eb33952
Merge pull request #2672 from sveltejs/gh-2661
...
expose svelte.walk
7 years ago
Rich Harris
acc4dfd293
Merge pull request #2607 from EmilTholin/figcaption_figure_first_element_ancestor
...
Check if a figcaption's first element ancestor is a figure
7 years ago
Rich Harris
d81e453a0f
Merge branch 'master' into feat/abstract-block-class
7 years ago
Rich Harris
06436eb029
Merge pull request #2596 from EmilTholin/await-empty-block-warnings
...
Don't show 'Empty block' warnings for non-existent await branches
7 years ago
Conduitry
31df69581d
expose svelte.walk ( #2661 )
7 years ago
Michael Braun
3626d8ebbd
Applying read only property form onto elements using `attr` instead
...
This should generate the wanted behavior, without generating an exception.
7 years ago
Clemens Akens
6652a16c7a
expose parse to the public
7 years ago
Rich Harris
c54ad3d7aa
Merge pull request #2616 from EmilTholin/insertBefore_null_default_anchor
...
Make null the default anchor of insertBefore
7 years ago
Rich Harris
d9f81dcb82
Merge pull request #2618 from EmilTholin/remove_21618scope_from_spread
...
Remove the $$scope key from $$props when calculating spread
7 years ago
Rich Harris
394900935f
Merge pull request #2619 from sveltejs/gh-2435
...
fix resubscriptions inside script block
7 years ago
Rich Harris
e17e7807d0
Merge pull request #2631 from EmilTholin/reactive-values-fixed
...
Check 'injected' and 'fixed_reactive_declarations' independently
7 years ago
Rich Harris
7003ecc33a
Merge pull request #2634 from sveltejs/gh-2625
...
fix invalidating stores with UpdateExpression
7 years ago
Rich Harris
a3f2ae95ee
Merge pull request #2637 from sveltejs/gh-2635
...
Fix determining which props need a value in dev mode
7 years ago
Rich Harris
bd06e13dc0
Merge pull request #2649 from EmilTholin/alert-global
...
Add alert, confirm, and prompt to globals
7 years ago
Emil Tholin
f1d8b480fa
Add support for object-rest in each destructuring
7 years ago
Michael Braun
5bcba3b388
Fix NPE on pattern check
7 years ago
Michael Braun
aa6e612bf0
Experimenting with array destructuring in each-blocks
7 years ago
Emil Tholin
80d5c1442f
Remove v1 each key parsing
7 years ago
Emil Tholin
de6e4588fb
Add alert, confirm, and prompt to globals
7 years ago
Emil Tholin
151cc46574
Remove the scope key from props when calculating spread
7 years ago
Conduitry
2efaf79503
fix determining which variables are initialised ( #2635 )
7 years ago
Conduitry
7b51a185a7
fix invalidating stores with UpdateExpression ( #2625 )
7 years ago
Emil Tholin
74d40e0510
Check 'injected' and 'fixed_reactive_declarations' independently
7 years ago
Loren Brichter
448479902d
Subtle tweaks to spring animations
...
Use verlet-style integration for spring animations. Rather than keeping track of "value" and velocity over time, keep track of value and previous-value, and derive velocity from the delta every tick. This has a few benefits, including greater stability (position and velocity can't drift) and simplifying signature of tick_spring (no need to pass velocity back up).
Pulling "settled" flag out of the return signature as well means return value is just "next value", simplifying code mapping over objects and arrays, and eliminating duplicated code across get_initial_velocity, get_threshold and tick_spring.
Refactored "threshold" calcs, extremely inexpensive to do inline in tick_spring rather than create a parallel structure. Also fixes a rare pathological case where springs will never settle (reading through the code, could happen if velocity was non-zero during a set() where target==current, threshold will be calculated to be zero and settled will always be set to false, leading to infinite animations).
Functional changes:
In my experience dealing with spring animations, there are a handful of edge-cases where it is nice to have library support. 99% of the time, the only times you'd want to fudge 'stiffness' and 'damping' is during a live interaction (e.g. dragging something around). By providing an idiomatic mechanism hopefully the code around dealing with that could be simpler.
I propose an additional "options" parameter to 'set()' and 'update()'.
If passed {hard:true} the set will be considered a "hard" set, where you want the value to be set to the target value immediately. This could be extremely useful when implementing dragging for instance.
If passed {soft:true} or {soft:<duration>}, the set will be considered a "soft" set, where momentum will be preserved for some duration before settling. This could be useful when implementing "throwing", e.g. after a drag, on mouseup, 'soft set' to some position and the user's previous momentum will be honored before settling down.
Technically momentum preservation happens to a degree now, but aggressive stiffness and/or damping values make it nearly unapparent. This handles the case where you may want more aggressive or heavily underdamped springs but without the apparent velocity discontinuity that happens on throw. (As a real example, in FaceTime, note behavior when tossing around the picture-in-picture, or the iPhone X gestural behavior when tossing apps back to the home screen).
Internally this is implemented by temporarily setting mass to infinity and ramping back to normal over some duration.
"Hard sets" are also special-cased to trigger a same-frame set and fulfilment, leading to more responsive dragging. Best case is a one frame improvement in drag latency (noticed in Safari). This also handles the "old way" method of munging 'stiffness' and 'damping' to 1, so the improvement applies to existing code.
7 years ago
Conduitry
46092cbfb7
fix resubscriptions inside script block ( #2435 )
7 years ago
Emil Tholin
698a14b58f
Make null the default anchor of insertBefore
7 years ago
thollander
c8bf81f274
Create a new abstraction level to handle `Block`
...
- `AbstractBlock` contains the Block' specific rules
- extends a `Node`
- has a `block` and `children`
- can warn if empty
7 years ago
Emil Tholin
7da6ef68bc
Check if a figcaption's first element ancestor is a figure
7 years ago
thollander
be13b56643
Use the already defined type for AppendTarget
7 years ago
Emil Tholin
227a08fc59
Don't show 'Empty block' warnings for non-existent await branches
7 years ago
Richard Harris
4fcd2583b1
fix subscribe implementation, add test for unsubscribing observables
7 years ago
Richard Harris
89fe6a132e
Merge branch 'rxjs-support' of https://github.com/benlesh/svelte into benlesh-rxjs-support
7 years ago
Rich Harris
8513d9527f
RxJS always returns a Subscription object with an unsubscribe.
...
Co-Authored-By: benlesh <ben@benlesh.com>
7 years ago
Ben Lesh
ce209dd0ee
fix: Ensure RxJS users don't create memory leaks
...
There is a bit of excitement in the RxJS community about Svelte.
- It seems like the rest of Svelte "just works™" with RxJS!
- **BUT** The danger is that unwary users will figure out how smooth this API is and accidentally create nasty memory leaks if the returned RxJS Subscriptions are not handled. Fortunately the required change is small.
NOTE: I am not entirely sure how to test this change. The goal here is to make sure that whenever you would normally teardown your store subscriptions, it is also tearing down these RxJS-shaped subscriptions. This is most commonly something you want in a component scenario. Say you have a timer component in your app that you show and remove with an `{#if}` block, when the `{#if}` block hides the component, you'd want to tear down the underlying Observable that is "ticking".
Related #2549
7 years ago
Rich Harris
72d665ba72
Merge pull request #2511 from atomAltera/fix/2506
...
Fixing issue with cursor jumping in Safari #2506
7 years ago
Rich Harris
23778f1135
Merge pull request #2518 from sveltejs/gh-2510
...
handle unknown nodes in extract_identifiers
7 years ago
Rich Harris
f3a725176b
Merge pull request #2543 from jches/gh/2542
...
Fix is_hoistable cycle
7 years ago
Ben Lesh
f2ee6458e0
perf: Reuse the same promise instance in the scheduler
...
- Scheduling an update no longer allocates two new promises, only one via `then`.
- The `tick` method was really returning an empty, resolved promise, so just reusing the same promise there as well. It was a little confusing because it _looked_ like it would return a promise to when the flush had completed, but in fact it was returning a promise that would resolve before the flush completed, as it was the promise that was "thenned" for the flush.
7 years ago
John Chesley
b2e5becb12
fix cycle check for exported functions
7 years ago
Conduitry
9e9ea411f7
handle unknown nodes in extract_identifiers ( #2510 ) ( #2514 )
7 years ago
Konstantin Alikhanov
d808d9ee5d
Fixing issue with cursor jumping in Safari #2506
7 years ago
Richard Harris
70e4a1ba34
Merge branch 'master' of https://github.com/leporo/svelte into leporo-master
7 years ago
Rich Harris
f9f2afdd15
Merge pull request #2433 from sveltejs/gh-2430
...
Use Map for keyed each block lookups
7 years ago
Richard Harris
a63cdcdf94
use maps for keyed each block lookups - fixes #2430
7 years ago
Mikhail Korepanov
c904e21674
Fix creation of debugging comment for elements without children
7 years ago
Richard Harris
a1d35d868d
disallow duplicate slot="xxx" elements - fixes second half of #2320
7 years ago
Richard Harris
e44293aa64
remove renderer.slots
7 years ago
Richard Harris
c08cfc2bf8
sanitize names
7 years ago
Richard Harris
0cf04988c6
remove unused code
7 years ago
Richard Harris
394556941a
fix
7 years ago
Richard Harris
b6ca514188
inherit default slot values in named slots in SSR mode
7 years ago
Richard Harris
cf2bf05812
receive default slot values in named slots
7 years ago
Richard Harris
4c86701f92
pass default slot values through to named slots
7 years ago
Rich Harris
71dc6bddda
Merge pull request #2415 from sveltejs/gh-2356
...
Prevent infinite loops with chained bindings
7 years ago
Richard Harris
017cbc6bd3
oops, messed up the merge
7 years ago
Richard Harris
864d9f9cfb
propagate scope changes across chained slots - fixes #2359
7 years ago
Rich Harris
49330b1994
Merge branch 'master' into gh-2356
7 years ago
Richard Harris
330b9ea55a
wait until flush complete before unlocking bindings - fixes #2356
7 years ago
Richard Harris
cc50321f95
only fire binding callbacks when values change
7 years ago
Conduitry
f328f219e5
deconflict `value` argument in component bindings ( #2395 )
7 years ago
Rich Harris
c610e83a00
Merge pull request #2409 from sveltejs/gh-2354
...
only create fallback content if no slot is provided
7 years ago
Rich Harris
92fc5da0a5
Merge pull request #2406 from sveltejs/gh-2399
...
skip observedAttributes where appropriate
7 years ago
Richard Harris
48ac4ed1f1
only create fallback content if no slot is provided - fixes #2354
7 years ago
Richard Harris
3201e717df
better error for bindings to let: values - fixes #2301
7 years ago
Richard Harris
04900e90cd
skip observedAttributes where appropriate - fixes #2399
7 years ago
Richard Harris
08fab520be
allow reactive declarations to reference self - fixes #2386
7 years ago
Richard Harris
dda2012b4d
inject lets for destructured reactive declarations - fixes #2396
7 years ago
Richard Harris
7823bb7134
optimise certain $$invalidate calls
7 years ago
Richard Harris
6b1067e8c1
allow reactive declarations without dependencies - fixes #2285
7 years ago
nhducit
21db6acf3b
Fĩ type
7 years ago
Vlad Glushchuk
25b6c07816
Fix a typo
8 years ago
Vlad Glushchuk
54be0fbe44
Add bind:text and bind:html support for contenteditable elements
...
Fixes #310
8 years ago
Richard Harris
aac1f74d58
only use explicit namespace for top-level elements
8 years ago
Richard Harris
bbe4ab7b7d
apply namespace to foreignObject correctly - fixes #2340
8 years ago
Rich Harris
380f5ffaf2
Merge pull request #2349 from Panya/issue-2348
...
Pass block to the render of an expression in an attribute
8 years ago
Rich Harris
2157430a3f
Merge pull request #2351 from jches/gh/2347
...
Don't hoist non-renamed exports
8 years ago
Rich Harris
ed983c1e88
Merge pull request #2357 from sveltejs/conditional-text-updates-2
...
Update text.data only when necessary
8 years ago
Rich Harris
5cd5f36cce
only coerce once
8 years ago
John Chesley
a26c7824ac
hoist all hoistable top-level functions
8 years ago
Jacob Wright
82baceb8ac
Update text.data only when necessary
...
Only update the text node if the text node's value is not equal. This fix is for contenteditable usage where text content may change outside of Svelte's control in order to preserve text composition.
Accomplishes the same thing as #2341 without the added API.
8 years ago
John Chesley
25f3f39ca6
do not hoist declaration if it is exported ( fixes #2347 )
8 years ago
Mikhail Korepanov
1c5b730698
Pass block to the render of an expression in an attribute
8 years ago