Commit Graph

657 Commits (35b46c23009faab8630629d7c61736b0d1495747)

Author SHA1 Message Date
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
Conduitry e9c63a2803 update for magic-string .overwrite API change
9 years ago
Conduitry c97159ee2e sanitize event name in handler function name (#612)
9 years ago
Rich Harris 8458a3f9e2 merge master -> gh-592
9 years ago
Rich Harris 63a1df3f76 Merge pull request #607 from sveltejs/gh-583
9 years ago
Rich Harris 5a3aa566ce Merge pull request #606 from sveltejs/gh-584
9 years ago
Rich Harris 173fdffaa8 Merge pull request #605 from sveltejs/gh-602
9 years ago
Hunter Perrin eb71c440a4 Fixed each block producing elements in wrong order after change. Fixes #610.
9 years ago
Rich Harris ac83b405a6 add cascade option, to prevent components inheriting styles (#583)
9 years ago
Rich Harris 41cd7f1b15 coerce empty string in number/range inputs to undefined - closes #584
9 years ago
Rich Harris 19a64181b6 support binding to computed member expressions (fixes #602)
9 years ago
Rich Harris 96efd6d993 Merge branch 'master' into gh-592
9 years ago
Rich Harris feb308cebf Merge pull request #601 from sveltejs/gh-574
9 years ago
Rich Harris ac6bdd4df3 Merge pull request #600 from sveltejs/gh-575
9 years ago
Rich Harris 8f1b43d4d7 Merge pull request #599 from sveltejs/gh-582
9 years ago
Rich Harris bc1f416121 remove TODO
9 years ago
Rich Harris 4fa37c3b8a tidy up
9 years ago
Rich Harris cbc0b968ef separate unmount from destroy
9 years ago
Rich Harris 76ddf96154 remove generated shared.ts file from repo
9 years ago
Rich Harris 14936889ae always use helpers if referenced, not just for CallExpressions, and warn on context clashes (#575)
9 years ago
Rich Harris d1e2ef34f1 treat <textarea> children the same as a value attribute
9 years ago
Rich Harris 2da800524d fix server-side rendering of textareas with value/children
9 years ago
Rich Harris 791bbc0ad5 use value property for textareas
9 years ago
Rich Harris e4d8af7646 fix for environments where node.style.animation is undefined (fixes #587)
9 years ago
Rich Harris cd76c110f7 make transitionManager treeshakeable (fixes #593)
9 years ago
Rich Harris 55b8679a3c Merge branch 'master' of https://github.com/hville/svelte into hville-master
9 years ago
Marvin Hagemeister 8de9c94290 Fix typing errors
9 years ago
hville ac22ce715c minor fixes - redundant conditions and loops
9 years ago
Rich-Harris ac1e5d8366 more TS
9 years ago
Rich-Harris 1fa899b811 more TS
9 years ago
Rich-Harris 4db0c65218 more TS
9 years ago
Rich-Harris 8af39b4577 more TS
9 years ago
Rich-Harris 8a5b11dd74 more typescript conversion
9 years ago
Rich-Harris fcc12a53a9 Merge branch 'master' into typescript
9 years ago
Conduitry 48832ecfa8 fix special props on `<select>` elements (#590)
9 years ago
Rich-Harris 65a82a5683 gah, rollup needs the file extensions. which idiot wrote it
9 years ago
Rich-Harris fd8b09eb2e add a few type annotations
9 years ago
Rich-Harris e8027c6d6f remove .ts file extensions
9 years ago
Rich-Harris 3d234f070b rename all (almost) .js files
9 years ago
Rich-Harris 21fea5ee67 fix destruction of compound if blocks with outros
9 years ago
Rich Harris eb6c72debe Merge pull request #571 from sveltejs/gh-569
9 years ago
Rich-Harris 735bd21550 fix insertion order of if blocks and their anchors
9 years ago
Rich-Harris 9a43593a9e reintro unkeyed each block iterations as necessary
9 years ago
Rich-Harris 3224b93766 get rid of hardcoded variable names
9 years ago
Rich-Harris 13607ebe89 dont store keyed block iterations in an array
9 years ago
Rich-Harris 5ecdcaf0ad update dynamic keyed each blocks
9 years ago
Rich-Harris e9a9aea5a8 handle bidirectional transitions
9 years ago
Rich-Harris 1f6743c197 Merge branch 'master' into gh-543
9 years ago
Rich-Harris baeafbb9d5 use anchor when updating
9 years ago
Rich-Harris 3458b53556 ok, i think it actually works now
9 years ago
Rich-Harris ae138329dd another crack at the algorithm. outros not currently applied
9 years ago
Rich-Harris 3d8a09880b mostly working list diffing algorithm
9 years ago
Rich-Harris f652bb0edb create start anchors for each-blocks that need them
9 years ago
Rich-Harris 3db74bff28 apply delays to bidirectional transitions - fixes #562
9 years ago
Rich Harris 3c8e83edfb Merge pull request #563 from sveltejs/gh-561
9 years ago
Rich-Harris 796adf8961 fix outros on compound if blocks, get IfBlock.js coverage to 100%
9 years ago
Rich-Harris 2d7d7fec2a validate <:Window>
9 years ago
Rich-Harris 5b307ca1ee increase test coverage
9 years ago
Rich-Harris d13cae0309 mount yield blocks immediately, if yield has a parent node (fixes #561)
9 years ago
Rich Harris 41a5a53be5 Merge pull request #559 from sveltejs/simpler-codegen
9 years ago
Rich Harris 952a381445 Merge pull request #556 from sveltejs/gh-540
9 years ago
Rich-Harris 690249816c abort intros before restarting them - fixes #546
9 years ago
Rich-Harris 72b7b3447e remove unnecessary if statement
9 years ago
Rich-Harris 0431d7029f more simplification
9 years ago
Rich-Harris b90d5b3903 more simplification
9 years ago
Rich-Harris 30abda37bd simplify SSR codegen
9 years ago
Rich-Harris 00d2f6b8c5 collapse constructor block into builders.main
9 years ago
Rich-Harris 52f3d76e1d more codebuilder consolidation
9 years ago
Rich-Harris 051731268d build _set method in one place
9 years ago
Rich-Harris 64dbd45601 generate less code for if-blocks with else-blocks (closes #540)
9 years ago
Conduitry 980c2626b4 label <style> element with id instead of with attribute, for performance
9 years ago
Conduitry 168b43eea1 when creating a component, always check whether its css is still in the dom (#554)
9 years ago
Rich-Harris f810459a21 stringify helpers before bundling
9 years ago
Rich-Harris 4bbd4eb0f9 merge master -> gh-7
9 years ago
Conduitry 25ce8dd951 correctly handle when helper functions have been internally renamed in Svelte bundle (#538)
9 years ago
Rich-Harris 3871627d63 outros on keyed each-blocks
9 years ago
Rich-Harris f30162f5e6 unkeyed each-blocks with outros
9 years ago
Rich-Harris e8a0646f88 fix mount order of keyed each-block with intros
9 years ago
Rich-Harris 2bec32fd4f remove redundant ternary
9 years ago
Rich-Harris 6601a27ad0 intro transitions in each-blocks
9 years ago
Zirro 3280a1974d Use .querySelector(':checked'), enable several <select> tests
9 years ago
Rich-Harris 90105e7371 support transitions in compound if-blocks
9 years ago
Rich-Harris a839f7fc9a support dynamic simple if-blocks
9 years ago
Rich-Harris 0a62ac7619 some more transition tests, albeit somewhat ugly
9 years ago
Rich-Harris 7467f5ea12 get basic intro transition test passing
9 years ago
Rich-Harris 3d5e3d7114 restart animations on secondary intro, various bits of cleanup
9 years ago
Rich-Harris 70f2433bba never abort transitions, they are either bidi or non-abortable
9 years ago
Rich-Harris b7ab024d12 handle bidirectional transitions differently
9 years ago
Rich-Harris 9a29bad538 abort transitions
9 years ago
Rich-Harris 3eda59d2cb Merge branch 'master' into gh-7
9 years ago
Conduitry dcd2a99a77 fix simple if blocks with top-level or conditions (#532)
9 years ago
Rich-Harris 7aa5273fe4 support very basic outro transitions
9 years ago
Rich-Harris 33bce40839 allow parameter-less transitions
9 years ago
Rich-Harris 8d9f69c152 first working intro transition, woooo
9 years ago
Rich-Harris 1503744e74 add transitions property to default export, track intros/outros in Block
9 years ago
Rich-Harris 789b759d48 fix for #524
9 years ago
Rich-Harris dc54caaef7 sanitize element names in preprocess step
9 years ago
Rich Harris 5dac68ed5a Merge branch 'master' into gh-3
9 years ago
Conduitry d9234572be visit all attributes of select elements after visiting children
9 years ago
Conduitry 5f27bbdcde replace invalid characters in element names when creating variables (#516)
9 years ago
Conduitry bbca5d1402 only call .update on yield fragment if it's present (#514)
9 years ago