Rich Harris
c2e6d1bf0d
Better composition — implements https://github.com/sveltejs/rfcs/pull/12
2019-01-26 18:53:47 -05:00
Richard Harris
88c674079b
always use stats.warn instead of options.onwarn - fixes #1918
2018-12-28 22:19:25 -05:00
Rich Harris
48f1f6b4d0
implement bind:this
2018-12-16 09:26:53 -05:00
Rich Harris
f45e2b70fd
Implement reactive assignments ( #1839 )
...
This also includes elements of RFCs 2 and 3
2018-12-15 19:18:03 -05:00
Rich Harris
b3b95d4ee6
disallow passive|preventDefault combo
2018-10-28 13:58:43 -04:00
Rich Harris
8ec02b336d
disallow once/passive in legacy mode, for now
2018-10-28 13:24:09 -04:00
Rich Harris
aa203973e0
add some more modifier validation tests
2018-10-28 12:33:21 -04:00
Rich Harris
769e03296f
merge master -> gh-1088
2018-10-28 11:29:08 -04:00
Rich Harris
945134bc81
warn on unused helpers - fixes #1704
2018-09-15 17:47:16 -04:00
Rich Harris
c52a6f011b
dont warn on empty block for nbsp - fixes #1658
2018-08-24 08:22:41 -04:00
Admin
7c4b9a5a41
Changes stop and prevent to stopPropagation and preventDefault
2018-08-11 21:16:42 -05:00
Rich Harris
401a6fea5d
handle single identifiers in {@debug} tags
2018-08-11 17:18:43 -04:00
Admin
4004a569e1
Adds tests for valid and invalid debug tag usage.
2018-08-11 00:26:24 -05:00
Admin
adfc0e3e45
Adds invalid test for event-modifiers.
2018-08-09 22:05:31 -05:00
Admin
a3c71af5c5
Changes {@debug _ } to {@debug}
2018-08-08 18:21:33 -05:00
Admin
622e7b0190
Adds debug all option to debug tag
2018-08-08 00:36:52 -05:00
Admin
89412e370e
Adds validation for invalid reference names like foo-bar.
2018-08-05 00:29:38 -05:00
Christian Kaisermann
19d541ab77
Add refs.* to valid event handler callees warning message
2018-06-06 14:32:34 -03:00
Conduitry
5e8a8b95e5
update some stray references to v1 syntax
2018-05-27 15:48:21 -04:00
Rich Harris
94206ca439
add animation validation tests
2018-05-13 18:43:48 -04:00
Rich Harris
4a67542bec
prevent bind:offsetWidth etc on void elements
2018-04-30 08:57:50 -04:00
Rich Harris
fe4637305b
add validation logic, error on dimension bindings for SVG elements
2018-04-29 20:00:02 -04:00
Rich Harris
aaab6853ce
support $method(...) calls, and warn on store.method(...)
2018-04-18 23:35:22 -04:00
Rich Harris
5a457bfb87
rename loc to start, include character info in locations
2018-04-16 21:50:57 -04:00
Rich Harris
b9fcc16d68
update test
2018-04-16 20:53:17 -04:00
Rich Harris
73e83e5571
tidy up
2018-04-16 00:05:51 -04:00
Rich Harris
cae4dd93bf
fix some more tests
2018-04-16 00:03:22 -04:00
Rich Harris
39ad124c99
update validation tests
2018-04-15 23:06:57 -04:00
Rich Harris
1143b0a991
remove v1 tests
2018-04-15 22:19:05 -04:00
Rich Harris
80e0dceb9a
remove validate and Stylesheet from public API
2018-04-15 19:57:12 -04:00
Rich Harris
c1573dbf2c
implement onstate and onupdate
2018-04-15 13:09:59 -04:00
Rich Harris
410f44dced
Merge branch 'master' into gh-1197
2018-04-15 11:30:48 -04:00
Rich Harris
33afb7e49a
add some onstate/onupdate tests
2018-04-15 11:30:36 -04:00
Rich Harris
35f4a1f063
add codes to errors
2018-04-15 10:31:23 -04:00
Rich Harris
b86a1edb52
add codes to validation errors
2018-04-15 00:06:27 -04:00
Rich Harris
f0b2cb99f2
add codes to warnings ( #474 )
2018-04-14 21:38:37 -04:00
Rich Harris
813e077ccc
Merge pull request #1330 from sveltejs/gh-1318
...
implement syntax changes
2018-04-14 18:18:36 -04:00
Rich Harris
0edbac615c
add validator tests
2018-04-12 23:34:46 -04:00
Rich Harris
032083bb34
fix #1331
2018-04-11 21:31:42 -04:00
Rich Harris
0ebe5355e1
Merge pull request #1299 from sveltejs/gh-1257
...
Stats
2018-04-08 10:05:31 -07:00
Rich-Harris
dfc8462d98
fail validation if bound <select> has dynamic multiple attribute - fixes #1270
2018-04-04 08:29:54 -04:00
Rich-Harris
c0287f2080
include warnings in stats object
2018-04-01 14:25:33 -04:00
Josh Duff
864fd313bb
Accept backtick string literals in tag/props properties
2018-03-28 16:12:38 -05:00
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.
2018-03-19 15:23:27 -06:00
James Birtles
89024177fc
Fix named-export end position
2018-03-18 17:22:46 +00:00
James Birtles
da6a74016f
add end position to errors
2018-03-16 03:42:30 +00:00
James Birtles
d07721cd50
add end position to warnings
2018-03-16 03:42:29 +00:00
Rich Harris
fdd9adab4d
add test for #1179
2018-02-23 08:40:02 -05:00
Rich Harris
f77314f647
increase test coverage
2018-02-10 23:29:47 -05:00
Rich Harris
bc6ee3ef9f
increase test coverage, handle immediately-closed blocks
2018-02-10 22:08:39 -05:00