Commit Graph

657 Commits (35b46c23009faab8630629d7c61736b0d1495747)

Author SHA1 Message Date
Rich Harris d02c468834 update component bindings together. WIP
9 years ago
Rich Harris f63a07f139 we can now do changed.foo instead of "foo" in changed - is faster and smaller
9 years ago
Rich Harris 7fea57c44f rename addConditionalLine to addConditional
9 years ago
Rich Harris 09d95b30f7 add note to self
9 years ago
Rich Harris dd8cc8c194 tidy up, dedupe a bit
9 years ago
Rich Harris 2f0abaa719 apply optimisation to raw tags
9 years ago
Rich Harris d07af2a0c5 fix select edge case
9 years ago
Rich Harris 8faa01ad5c only cache values when it makes sense
9 years ago
Rich Harris 84feff0799 only cache values if necessary
9 years ago
Rich Harris 2705cf4621 handle funky edge case around outroing blocks
9 years ago
Rich Harris 6292204072 do dirty check in _set, so we can easily skip unnecessary computations later (#768)
9 years ago
Rich Harris 1038d3fccc Merge pull request #766 from sveltejs/gh-740
9 years ago
Rich Harris 4d9b57e911 bind to change events for range inputs, as well as input events (#740)
9 years ago
Rich Harris 06c9e37770 call create() on new iterations of static each blocks (#762)
9 years ago
Rich Harris a2e85aec1d replace destroy with noop on destroy
9 years ago
Rich Harris c799c416c1 no need to bind destroy, event handlers are called with the component as context
9 years ago
Rich Harris 92766ee9e7 handle set after destroy, and move destroy into shared helpers
9 years ago
Rich Harris 33580f272e Merge pull request #751 from sveltejs/hoist-if-block-selectors
9 years ago
Hunter Perrin 22579bae78 Changed from this keyword to argument in setup method.
9 years ago
Hunter Perrin d45bb7a16c Added setup function which can supply static methods/properties. Closes #480. Closes #578.
9 years ago
Rich Harris a2f2bf09bc rename to select_block_type and current_block_type
9 years ago
Rich Harris 177ca13e70 Merge branch 'master' into hoist-if-block-selectors
9 years ago
Rich Harris 30eceebb13 hoist if block selectors
9 years ago
Conduitry cb8452489a actually, we don't want to escape @ or # in sharedPath at all
9 years ago
Conduitry 9f8ee62b7d don't over-escape '#' in sharedPath
9 years ago
Conduitry c0aa3f12c1 saner escaping/unescaping of `@` and `#` sigils
9 years ago
Rich Harris fb0b4156ef fix escaping/unescaping — closes #741
9 years ago
Rich Harris 6f3e37d442 Merge branch 'master' into gh-693
9 years ago
Rich Harris e67225bd7f Merge pull request #737 from sveltejs/update-deps
9 years ago
Rich Harris 6e494ef3d7 Merge pull request #735 from sveltejs/gh-643
9 years ago
Rich Harris 17a95239b3 support ref:foo as a CSS selector (#693)
9 years ago
Rich Harris 91c3aa8542 use Records to remove TS errors
9 years ago
Rich Harris 508188d107 add dev mode warning for double destroy
9 years ago
Rich Harris d2a5f5df33 remove reify
9 years ago
Rich Harris fedbab8839 more TS fixes
9 years ago
Rich Harris 60c3c8f7ea fix various typescript errors
9 years ago
Rich Harris 714a267837 dont throw error if component is destroyed twice (closes #643)
9 years ago
Rich Harris 92313501d0 use helper to encapsulate styles, rather than being repetitious (fixes #375)
9 years ago
Rich Harris 55778c3b8e Merge pull request #732 from sveltejs/gh-638
9 years ago
Rich Harris d13b682f85 Merge pull request #728 from sveltejs/gh-721
9 years ago
Rich Harris 8720fa5fbc event propagation shorthand for components (#638)
9 years ago
Rich Harris e25a4d5882 event propagation shorthand for elements (#638)
9 years ago
Rich Harris 1feee787f5 use _set, not set, when updating child components - fixes #721
9 years ago
Rich Harris 3c04dd7ed1 clear refs in destroy, not unmount, so that refs are populated in ondestroy. fixes #706
9 years ago
Rich Harris d5ac8d1be2 unescape hash character (#722)
9 years ago
Rich Harris 7bddf3a034 reverse bad fix from yesterday - only have state object in mount if its a yield block
9 years ago
Yury Zhuravlev 8193ab534c Fix binding in each block
9 years ago
Rich Harris 1ff8feb341 Merge pull request #720 from sveltejs/gh-711
9 years ago
Rich Harris 6676fe31b4 Merge pull request #719 from sveltejs/gh-712
9 years ago
Rich Harris 66adfefd36 Merge pull request #718 from sveltejs/gh-713
9 years ago
Rich Harris 99fa6aee99 rename _block to _lock
9 years ago
Rich Harris 850d66411f ensure data is up to date when re-rendering yield blocks (fixes #711)
9 years ago
Rich Harris 265c99e054 fix unescaping edge case
9 years ago
Rich Harris 098e3db683 correctly unescape @ symbols (#712)
9 years ago
Rich Harris 540f83529c dont strip whitespace at the end of an each block (#713)
9 years ago
Rich Harris 071337d36d enforce order of operations
9 years ago
Rich Harris 84503ced19 tidy up
9 years ago
Rich Harris 7a8283e03f rename postcreate to aftercreate
9 years ago
Rich Harris 1ba0c88b3d NAILED IT
9 years ago
Rich Harris 34d14839f4 almost all tests passing again
9 years ago
Rich Harris 3032c82111 sketch of a solution to #708
9 years ago
Rich Harris c90441f345 Merge branch 'master' into gh-691
9 years ago
Rich Harris 9803202e8a Merge pull request #704 from sveltejs/gh-700
9 years ago
Rich Harris ae9de0f25e remove _flush in favour of callAll
9 years ago
Rich Harris f505a07384 fire intro.start and outro.start events (#702)
9 years ago
Rich Harris de3dfbd302 use anchor comments to preserve order in keyed each blocks with components (fixes #700)
9 years ago
Rich Harris 45a55a2325 alias #component in hoisted event handlers - fixes #699
9 years ago
Rich Harris 2b15bbae91 tidy up, add sourcemaps to add_css function
9 years ago
Rich Harris 6aed59170a move Stylesheet
9 years ago
Rich Harris f1e98219bf remove unused code
9 years ago
Rich Harris 3fae55b199 reduce duplication by moving validation into stylesheet
9 years ago
Rich Harris 8d8e5aa998 remove processCss
9 years ago
Rich Harris 62c70cce9f move css logic into new Stylesheet class, add CSS sourcemap support
9 years ago
Rich Harris befb5f1615 Merge pull request #690 from sveltejs/gh-685
9 years ago
Rich Harris b37cfd37f2 rename _renderHooks to _oncreate, since thats all its used for
9 years ago
Rich Harris 1f34e4a469 call oncreate functions before bindings
9 years ago
Rich Harris a07cd328a0 fix context for bindings (#685)
9 years ago
Rich Harris 10a46a5bab Merge pull request #680 from sveltejs/gh-679
9 years ago
Rich Harris e90ca611c5 fix handling of modified :global(...) selectors
9 years ago
Rich Harris 278c44a234 warn on unused selectors
9 years ago
Rich Harris 12977f94d6 refactor a bit, fix typing error
9 years ago
Rich Harris 11da4841a7 bug fix
9 years ago
Rich Harris 5c3bb52fb9 apply css optimisations to SSR
9 years ago
Rich Harris 13cd7a6820 implement ID selectors, refactor
9 years ago
Rich Harris fbacf3a9ee implement all attribute selector operators
9 years ago
Rich Harris f82da68afc handle ~= attribute selector operator
9 years ago
Rich Harris 6196d80e5c handle empty attributes
9 years ago
Rich Harris 07d102717d handle attribute selectors with = operator
9 years ago
Rich Harris ffea4201e0 handle universal selectors
9 years ago
Rich Harris 94cd2eeb1a create reusable walkRules helper
9 years ago
Rich Harris 03271b176e refactoring, and more :global(...) fixes
9 years ago
Rich Harris 1b9b12b7a4 more :global(...) handling
9 years ago
Rich Harris afbef75516 handle :global(...) styles
9 years ago
Rich Harris 5d44d65ae8 hack sourcemap to mitigate confusion caused by missing data for each block (#681)
9 years ago
Rich Harris 22e33a7c8c move CSS analysis into preprocess
9 years ago
Rich Harris 1d9900272e Merge branch 'master' into gh-679
9 years ago
Rich Harris 79ed77414c Merge pull request #676 from sveltejs/gh-608
9 years ago
Rich Harris f644807e7a only apply svelte-123xyz attributes where necessary (WIP)
9 years ago
Rich Harris 217f2662c3 Merge branch 'master' into codegen
9 years ago
Rich Harris aaa0c50651 handle @foo and #foo edge cases
9 years ago
Rich Harris 0cbd35cc16 add dev mode hydration error (closes #664)
9 years ago
Rich Harris 4db141dc63 Merge branch 'master' into codegen
9 years ago
Rich Harris 70cd2a205f Merge pull request #675 from sveltejs/gh-651
9 years ago
Rich Harris f34b3218c6 only remove whitespace at end of range if safe to do so
9 years ago
Rich Harris 137cefde72 move whitespace logic out of parse and into preprocess
9 years ago
Rich Harris 21b8776ae2 merge master -> codegen
9 years ago
Rich Harris 9e4765a217 run intro transitions on initial render (#651)
9 years ago
Rich Harris e8f43c9e3e deconflict name with imports (#655)
9 years ago
Rich Harris e4483eb46a run prettier
9 years ago
Rich Harris 8e06072f03 use #target and #component instead of block.target and block.component
9 years ago
Rich Harris f387bb43d4 remove unused regex
9 years ago
Rich Harris c2cf6214c7 use #foo instead of block.alias("foo")
9 years ago
Rich Harris 3101c699aa use @foo for generator.alias("foo")
9 years ago
Rich Harris 11ec5985bf remove unnecessary codebuilder
9 years ago
Rich Harris 3d9835daea simplify helpers
9 years ago
Rich Harris 09213f5d12 dont recreate if_blocks incorrectly
9 years ago
Rich Harris 4b7f9ec722 pass params to get_block (#667)
9 years ago
Rich Harris 729f909b1b only run create() for new if blocks - fixes #665
9 years ago
Rich Harris f6a6c55007 fix each-else blocks that are empty on initial render (#662)
9 years ago
Rich Harris 47da5f9038 put attribute selector before pseudo-class selector - fixes #658
9 years ago
Rich Harris 30cc2664c7 test with hydratable: true and hydratable: false
9 years ago
Rich Harris f9e17d6d0e keyed each block and select fixes
9 years ago
Rich Harris 93087403d3 fix yield blocks
9 years ago
Rich Harris f10d2bb250 fix most non-hydration tests
9 years ago
Rich Harris 79ca1b962c events, bindings, if block fixes
9 years ago
Rich Harris d964b63ad3 fix component hydration
9 years ago
Rich Harris e26c37b408 more hydration
9 years ago
Rich Harris 1cc36884d4 hydration working with elements, text nodes, tags and if blocks
9 years ago
Rich Harris 451ea0068c Merge branch 'master' into hydration
9 years ago
Rich Harris 30bbbc5c30 fix bad indentation in generated code
9 years ago
Paul Sauve 62b42db6cf Fix #643
9 years ago
Rich Harris 77cd688922 Merge pull request #642 from sveltejs/gh-639-b
9 years ago
Rich Harris 937a33b03c Merge pull request #641 from sveltejs/gh-639-a
9 years ago
Rich Harris 8a095f1d11 mark indirect dependencies of <select> bindings - #639
9 years ago
Rich Harris f2596decc6 sync state with view, if <select> binding does not have initial value (#639)
9 years ago
Rich Harris 0013764a01 first, very incorrect stab at hydration
9 years ago
Rich Harris 0c0122cd1f include ast in svelte.compile return value (#632)
9 years ago
Rich Harris b844f7a58d Merge pull request #627 from sveltejs/gh-624
9 years ago
Conduitry c31bdc6863 correctly handle empty <style> tag (#634)
9 years ago
Rich Harris ae39be8368 Merge pull request #630 from sveltejs/gh-620
9 years ago
Rich Harris e926dc09f4 only enforce static type if input is bound (fixes #620)
9 years ago
Rich Harris 4591b3f0a5 rename addEventListener and removeEventListener (#621)
9 years ago
Rich Harris e04ae39b51 allow components to have computed member expressions for bindings (fixes #624)
9 years ago
Rich Harris 745ed90bab fix #625
9 years ago
Rich Harris 4747964bac typo
9 years ago
Rich Harris 204ee5a746 Merge branch 'master' into gh-616
9 years ago
Rich Harris ba0cbdb8d0 TS-ify spaces.js and deindent.js, so they get included in prettier task
9 years ago
Rich Harris 3cc89a0a95 add trailing commas to prettier config, only run on .ts files
9 years ago
Conduitry 330c22e146 also escape back-ticks and backslashes in text nodes in SSR code (#616)
9 years ago
Rich Harris f92b33c130 run prettier on src, update tests
9 years ago