Richard Harris
0891495647
code style
6 years ago
Richard Harris
5e3ee4e26b
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
6 years ago
Rich Harris
bebed18a93
Merge pull request #2856 from sveltejs/raf
...
treat requestAnimationFrame as a noop on the server
6 years ago
Richard Harris
db938a4559
only invalidate referenced values
6 years ago
Richard Harris
9d53f568fa
fix tests
6 years ago
Benjamin Milde
dabc9c3e53
Allow binding of <details> open
6 years ago
Colin Casey
05fb05bfae
check for unknown props when creating component
6 years ago
Emil Tholin
9cd0b0761b
Don't get hoisted variable from ctx when using @debug
6 years ago
Richard Harris
c988457afa
use maps for keyed each block lookups - fixes #2430
6 years ago
Richard Harris
d2568aa583
skip observedAttributes where appropriate - fixes #2399
6 years ago
Richard Harris
b36d24032b
optimise certain $$invalidate calls
6 years ago
Richard Harris
30c8fe0c6e
allow reactive declarations without dependencies - fixes #2285
6 years ago
Rich Harris
a07eac432a
update API reference docs ( #2206 )
6 years ago
Lukas
1a1664341a
add playbackrate to compilation test
6 years ago
Richard Harris
6a7721b05f
replace comment anchors with empty text nodes - fixes #2280
6 years ago
Rich Harris
4348727fca
Merge pull request #2258 from sveltejs/collapse-whitespace
...
collapse consecutive whitespace characters
6 years ago
Conduitry
a8e59d7fd7
update tests
6 years ago
Rich Harris
8feef5edfc
fix
6 years ago
Rich Harris
003a56b348
implement bind:online
6 years ago
Richard Harris
2b1aa77f29
collapse consecutive whitespace characters in the absense of options.preserveWhitespace or a <pre>
6 years ago
Rich Harris
21d56c9ee3
Tidy up ( #2252 )
6 years ago
Richard Harris
83a9b6af23
default to accessors: false ( #2144 )
6 years ago
Richard Harris
bd4d561fec
update test
6 years ago
Richard Harris
b162de80ce
update JS tests
6 years ago
Richard Harris
ca0e5df0d8
update parser and js tests
6 years ago
Conduitry
a26b276c5e
update tests
6 years ago
Richard Harris
91b9917a59
generate valid code for each block array literals ( #2180 )
6 years ago
Rich Harris
b604b5223c
Merge pull request #2188 from sveltejs/gh-2180
...
optimise iteration over array literals
6 years ago
Richard Harris
180c387c8d
optimise iteration over array literals - fixes #2180
6 years ago
Rich Harris
06040d3513
Merge pull request #2185 from Panya/issue-2184
...
Don't invalidate `this`. Fixes #2184
6 years ago
Mikhail Korepanov
3ced3c1325
Don't invalidate `this`. Fixes #2184
6 years ago
Conduitry
957093e81a
update tests
6 years ago
Richard Harris
3953c2dbfc
error on invalid compiler options — closes #2094
6 years ago
Rich Harris
206a3d0131
update tests
6 years ago
Rich Harris
687e352209
rename .html files to .svelte
6 years ago
Rich Harris
bf16bb89c3
only do dirty check for writable values - fixes #2052
6 years ago
Rich Harris
aa7bcb0a8e
prevent duplicated reactive declarations - fixes #2054
6 years ago
Rich Harris
3a03485d0d
fix tests
6 years ago
Conduitry
a270661d20
rename `<svelte:meta>` to `<svelte:options>` ( #2017 )
6 years ago
Richard Harris
cdcccfb4e4
set current = true on mount as well as intro - fixes #2000
6 years ago
Rich Harris
eccc8b264d
Implement local transitions — fixes #1480
6 years ago
Rich Harris
c2e6d1bf0d
Better composition — implements https://github.com/sveltejs/rfcs/pull/12
6 years ago
Chris Reeves
c9301dc9f7
defer hoisting until after the template is walked - fixes #2005
6 years ago
Rich Harris
ff6e378fcb
Merge pull request #1993 from sveltejs/gh-1920
...
prevent writing to reactive values
6 years ago
Richard Harris
b8e0cccea8
prevent writing to reactive values - fixes #1920
6 years ago
Richard Harris
ed9df1fff3
dont use identity function to reflect props
6 years ago
Rich Harris
5be480d7ac
Merge pull request #1991 from sveltejs/gh-1952-b
...
hoist vars and lets that don't change
6 years ago
Richard Harris
81d9647517
hoist vars and lets - closes #1952
6 years ago
Richard Harris
8c3f652a01
fix scroll bindings
6 years ago
Chris Reeves
d3a7ccae4f
reconcile test diff
6 years ago
Rich Harris
f3701794be
Merge pull request #1978 from evs-chris/gh-1977-evschris
...
Render default slot content event handlers conditionally (with bonus) - #1977
6 years ago
Rich Harris
4c9a55cb66
Merge pull request #1980 from evs-chris/gh-1952-evschris
...
First pass at tracking mutation to avoid unnecessary update code - #1952
6 years ago
Rich Harris
0ea3840046
Overhaul transitions - fixes #1906
6 years ago
Chris Reeves
e85222ad84
first pass at tracking mutation to avoid unnecessary update code - #1952
...
also tracks mutation on child refs of const declarations - #1917
6 years ago
Chris Reeves
057298a79f
fix newline-before-block diffs caused by code builder adjustments
6 years ago
Richard Harris
423e4e6cbc
deconflict with implicit props - fixes #1957
6 years ago
Richard Harris
1d9ce0fff5
update tests
6 years ago
Richard Harris
a7370ce024
fix test
6 years ago
Rich Harris
c0a8e630e3
Fix media bindings, simplify others
6 years ago
Richard Harris
18c2ae715f
prevent false positive detection of events that can be made passive - fixes #1914
6 years ago
Richard Harris
468b5dc0c4
fix tests
6 years ago
Richard Harris
ef944b5713
prevent parent component modifying child component state - fixes #1924
6 years ago
Rich Harris
abdbb00d6d
fix test
6 years ago
Rich Harris
7440fa54e9
remove missing prop warning false positives - fixes #1902
6 years ago
Rich Harris
1f46e23e1b
More conservative invalidation
6 years ago
Rich Harris
29052aba7d
Bring svelte.technology source into main repo
6 years ago
Conduitry
df57e508f8
use extension-less import for svelte/internal
6 years ago
Rich Harris
f45e2b70fd
Implement reactive assignments ( #1839 )
...
This also includes elements of RFCs 2 and 3
6 years ago
Rich Harris
79ea0bd43c
Merge pull request #1822 from aphitiel/gh-1743
...
move resize handler from _beforecreate to _after.. (fixes #1743 )
6 years ago
Rich Harris
e5ae97b9c9
use helper for combining window binding props
6 years ago
pk
d27dbae51c
move resize handler from _beforecreate to _after.. ( fixes #1743 )
6 years ago
Rich Harris
54fe128cf8
Merge pull request #1819 from sveltejs/gh-1088
...
Implement event modifiers
6 years ago
Rich Harris
82b1b75afe
implement event modifiers
6 years ago
Rich Harris
e7c62e9182
only add list/index to each block context if necessary
6 years ago
Rich Harris
681de7d220
merge master -> gh-1187-b
6 years ago
Rich Harris
d6f25a6a21
redo 9e9a078d
on top of current master
6 years ago
Rich Harris
004a7a24ed
Merge branch 'master' into gh-938
6 years ago
Rich Harris
4afa133214
reinstate tests
6 years ago
Rich Harris
86fd8f3e16
merge master -> gh-938
6 years ago
Rich Harris
4a88c9ccb5
remove -bundle files
6 years ago
Rich Harris
e0fe31327a
move render logic into separate phase ( #1678 )
6 years ago
Rich Harris
f54c1ec7b8
support dynamic import in expressions
6 years ago
Josh Duff
211e0383cf
Only update inputs when the value changed
...
Fixes #1699
6 years ago
Rich Harris
a18cec0ec6
not sure where that extra blank line came from
6 years ago
Rich Harris
c2f0ca3e2e
alternative approach to #1520
6 years ago
Rich Harris
33ed2f504e
Merge branch 'master' into gh-1520
6 years ago
Rich Harris
ff6c4c7767
Merge pull request #1681 from sveltejs/gh-1666
...
correctly set select value on mount
6 years ago
Rich Harris
154ee73765
support debug tag in SSR mode - fixes #1659
6 years ago
Rich Harris
ec6360487e
correctly set select value on mount - fixes #1666
6 years ago
Jacob Wright
2c24c36120
Allows fragment updates to happen after state updates
...
Proposed fix for #1520 . Provides a starting point for discussion.
6 years ago
Rich Harris
3778431775
Merge pull request #1670 from sveltejs/init
...
Share more init work
6 years ago
Rich Harris
d323f51e6c
update tests
6 years ago
Jacob Wright
b6e51ddc32
Change actions to init on mount rather than hydrate
...
Looking at the discussion on https://github.com/sveltejs/svelte/pull/1247 it sounds like this was the intended way actions would be set up to work (which is why we didn't add a `mount` lifecycle method). I *believe* this is a fix in the original implementation.
Complaints in chat about this surfaced the issue. Some libraries expect the element to be in the DOM when initializing and these libraries cannot be used without any lifecycle hook. @PaulMaly is requesting this be looked at, and I agree with his assesment.
What's more, this change *should* be backwards compatable. Actions which work before this change should continue working after this change.
6 years ago
Rich Harris
d56b0b007e
update tests
6 years ago
Rich Harris
bcf4c59cc6
-> v2.10.0
6 years ago
Rich Harris
6b56d0494c
Merge branch 'master' of github.com:sveltejs/svelte
6 years ago
Rich Harris
b6c3749d99
tidy up
6 years ago
Rich Harris
1dc1343f00
only add debugger statements in dev mode
6 years ago
Rich Harris
be412d3605
Merge pull request #1642 from ekhaled/gh-1600-ios
...
fix #1600 for ios
6 years ago
Rich Harris
401a6fea5d
handle single identifiers in {@debug} tags
6 years ago
Rich Harris
a1264f583d
fix test
6 years ago
Rich Harris
a5967fa118
Merge branch 'debug' of https://github.com/GarrettGeorge/svelte into GarrettGeorge-debug
6 years ago
Admin
4004a569e1
Adds tests for valid and invalid debug tag usage.
6 years ago
ekhaled
b8e03dcfb8
update snapshot
6 years ago
Rich Harris
b94d7adfec
replace appendNode(node, parent) with append(parent, node) - easier to follow
6 years ago
Rich Harris
9964a77565
stringify values before setting text data - fixes #1598
6 years ago
Rich Harris
264d65d52c
Merge pull request #1610 from ekhaled/gh-1600
...
closes #1600
6 years ago
ekhaled
259f77d015
closes #1600
6 years ago
Curtis Maloney
f0a247a4e6
[ Fixed #1608 ] Allow binding of input files
6 years ago
Conduitry
e66d9ffae7
in .fire always set calling flag back to false ( #1587 )
...
* in .fire always set calling flag back to false (#1573 )
* update expected bundles
6 years ago
Rich Harris
7678b36581
separate groupOutros from transitionsManager
6 years ago
Rich Harris
ce575e1065
Revert "Fix for #1553"
6 years ago
Pavel Malyshev
f1fc81a49f
Fix for #1553
6 years ago
Pavel Malyshev
52ece0b5f0
Fix for #1538
6 years ago
Rich Harris
04ef203787
prevent possibility of conflicts with __file
7 years ago
Rich Harris
d3201603d9
change __svelte_meta to __svelte_meta.loc
7 years ago
Rich Harris
63a712ccd9
add location info to nodes - fixes #1499
7 years ago
Rich Harris
8ba809ded1
add snapshot test
7 years ago
Rich Harris
a75b0b71c5
pass in destroy method
7 years ago
Rich Harris
c4937d271f
fix skipped intros
7 years ago
Rich Harris
042ec54f7f
nested component transitions
7 years ago
Rich Harris
44bb2da29b
add skipIntroByDefault compiler option ( #547 )
7 years ago
Rich Harris
c7c46dec29
Merge pull request #1422 from sveltejs/each-object-create
...
use Object.create for each block child contexts
7 years ago
Rich Harris
fabfc78620
fix duplicate events on range input bindings ( #1419 )
7 years ago
Rich Harris
d85b60a09c
use Object.create for each block child contexts
7 years ago
Rich Harris
a18be79887
simplify handling of html blocks
7 years ago
Rich Harris
103f278cfc
update tests
7 years ago
Rich Harris
6ddfc19bbc
only update component props if they are dynamic - fixes #1394
7 years ago
Rich Harris
5f46650801
update test
7 years ago
Rich Harris
14f84a3e8a
Merge pull request #1386 from sveltejs/gh-984
...
width and height bindings
7 years ago
Rich Harris
8f8b1308b7
update tests
7 years ago
Rich Harris
ac4ff538ae
Merge branch 'master' into gh-984
7 years ago
Rich Harris
c01cde9065
Merge branch 'master' into gh-1360
7 years ago
Rich Harris
da2a45af80
keep ES5 function names in dev mode
7 years ago
Rich Harris
b381aa63a4
integrate CLI - fixes #1360
7 years ago
Rich Harris
a29e2733cd
update tests
7 years ago
Rich Harris
1bacad1087
update tests
7 years ago
Rich Harris
541ec6c397
bind to dimensions
7 years ago
Rich Harris
f00d08427e
Merge branch 'master' into gh-984
7 years ago
Rich Harris
2866b11c7d
WIP towards #984
7 years ago
Rich Harris
506ab3952e
destructuring
7 years ago
Rich Harris
f5048fcf10
deduplicate each block context generation for keyed blocks
7 years ago
Rich Harris
61ee380e26
deduplicate each block context generation ( #1287 )
7 years ago
Rich Harris
7fe3e4a85d
failing test for #1187
7 years ago
Rich Harris
9e9a078d5c
set window scroll from bindings on initialisation - fixes #938
7 years ago
Rich Harris
ff45a5315f
Merge pull request #1375 from sveltejs/gh-1369
...
assign custom methods to custom element prototype
7 years ago
Rich Harris
f0bf1ef8d5
recalculate each block values lazily - fixes #1286
7 years ago
Rich Harris
ef39f00902
assign custom methods to custom element prototype - fixes #1369
7 years ago
Rich Harris
7224ef4eff
all tests passing
7 years ago
Rich Harris
c3c7970dc9
minor fixes
7 years ago
Rich Harris
86d3476b55
minor fixes, update various tests
7 years ago
Rich Harris
6534fef37d
Merge pull request #1364 from sveltejs/gh-1356
...
Report initial `changed` based on state, not expected properties
7 years ago
Rich Harris
f8b076b2f3
set state to blank object on destroy, not null - fixes #1354
7 years ago
Rich Harris
8643b7ac88
tweak
7 years ago
Rich Harris
991bd9dce8
correctly report changed properties in initial state/update events - fixes #1356
7 years ago
Rich Harris
6ff02b263e
remove legacy prop stuff, now that we emit ES2015
7 years ago
Conduitry
f2b6ec47a2
fix <svelte:window> to use new APIs
7 years ago
Rich Harris
5a457bfb87
rename loc to start, include character info in locations
7 years ago
Rich Harris
73e83e5571
tidy up
7 years ago
Rich Harris
cae4dd93bf
fix some more tests
7 years ago
Rich Harris
2d5b47b8a4
remove store option
7 years ago
Rich Harris
ce114600d1
remove deprecated renderCss method
7 years ago
Rich Harris
ab79cc6608
remove v1 snapshot tests
7 years ago
Rich Harris
a3add04e7c
remove code, map and cssMap from svelte.compile output
7 years ago
Rich Harris
df4e3678dc
update snapshot tests
7 years ago
Rich Harris
daa2635cd3
update snapshot tests
7 years ago
Rich Harris
5ebd43898c
deprecate get with string argument
7 years ago
Rich Harris
ee8256604c
allow overwritten observe
7 years ago
Rich Harris
6249fa6bc8
Merge pull request #1345 from sveltejs/gh-1069
...
use destructuring syntax for computed props in v2 mode - fixes #1069
7 years ago
Rich Harris
99ea7539af
use destructuring syntax for computed props in v2 mode - fixes #1069
7 years ago
Rich Harris
3d8c768c81
update tests
7 years ago
Rich Harris
2a43fe94b3
deprecate observe
7 years ago
Rich Harris
c1573dbf2c
implement onstate and onupdate
7 years ago
Rich Harris
e85eda8279
reenable all tests
7 years ago
Rich Harris
94a7ffb9a5
fix debugging comments
7 years ago
Rich Harris
7681939d3e
fix head/window meta tags
7 years ago
Rich Harris
bb61e6e911
v2 js tests
7 years ago
Rich Harris
f27b29d5cb
Merge pull request #1289 from sveltejs/gh-195
...
Multi-spread
7 years ago
Rich-Harris
36290cb6cd
component spread
7 years ago
Rich-Harris
6e5523cb89
Revert "fix handler in-place"
...
This reverts commit 6ebf46ad67
.
7 years ago
ekhaled
6ebf46ad67
fix handler in-place
7 years ago
ekhaled
b8c0ab2949
support both destroy and teardown in custom event handlers
7 years ago
Rich Harris
c9435fc87f
Merge pull request #1279 from jacwright/action-this
...
Make actions execute with the component context
7 years ago
Luke Edwards
a412f11907
update test samples’ expectants
7 years ago
Jacob Wright
9b0a884035
Make actions execute with the component context
7 years ago
Rich Harris
e77988b195
Merge pull request #1247 from jacwright/behaviors
...
Adds actions to components
7 years ago
Alan Palazzolo
3c61655e93
Add option preserve comments in SSR rendering.
7 years ago
Jacob Wright
04f5d5c975
Adds actions to components
...
Actions add additional functionality to elements within your component's template that may be difficult to add with other mechanisms. Examples of functionality which actions makes trivial to attach are:
* tooltips
* image lazy loaders
* drag and drop functionality
Actions can be added to an element with the `use` directive.
```html
<img use:lazyload data-src="giant-photo.jpg>
```
Data may be passed to the action as an object literal (e.g. `use:b="{ setting: true }"`, a literal value (e.g. `use:b="'a string'"`), or a value or function from your component's state (e.g. `add:b="foo"` or `add:b="foo()"`).
Actions are defined in a "actions" property on your component definition.
```html
<script>
export default {
actions: {
b(node, data) {
// do something
return {
update(data) {},
destroy() {}
}
}
}
}
</script>
```
A action is a function which receives a reference to an element and optionally the data if it is added in the HTML. This function can then attach listeners or alter the element as needed. The action can optionally return an object with the methods `update(data)` and `destroy()`.
When data is added in the HTML and comes from state, the action's `update(data)` will be called if defined whenever the state is changed.
When the element is removed from the DOM `destroy()` will be called if provided, allowing for cleanup of event listeners, etc.
See https://github.com/sveltejs/svelte/issues/469 for discussion around this feature and more examples of how it could be used.
7 years ago
Rich Harris
86a151a7ea
Merge pull request #1243 from sveltejs/gh-1240
...
fix #1240
7 years ago
Rich Harris
7c25eb32fa
skip missing property warning for computed/global properties
7 years ago
Rich Harris
ce607d5ab3
add local variable for list values - fixes #1240
7 years ago
Rich Harris
26239463c5
Merge pull request #1237 from sveltejs/gh-1209
...
use setAttribute with inputs, for benefit of IE - fixes #1209
7 years ago
Rich Harris
4e99eb8d37
use setAttribute with inputs, for benefit of IE - fixes #1209
7 years ago
Rich Harris
01f6f9fa4d
alias listName to deconflict with shared helpers - fixes #1229
7 years ago
Rich Harris
d680356622
update test
7 years ago
Rich Harris
428784d570
Merge branch 'gh-1118' into gh-1118-base36
7 years ago
Rich Harris
2f01115a41
merge master -> gh-1118
7 years ago
Rich Harris
0c66e9e2f7
merge
7 years ago
ekhaled
2e9cd4742c
fix snapshots for the actual mounting code
7 years ago
ekhaled
270be984ac
fix bundle snapshots
7 years ago