Commit Graph

491 Commits (642b414c9cd9fecaf6623ec2ef8e49be5d833004)

Author SHA1 Message Date
Rich-Harris a010778ac6 helpers should not be considered dependencies — fixes #492
10 years ago
Rich-Harris d8cec7f414 style consistency
10 years ago
Rich-Harris 86413ef4fa optimise simple if-blocks
10 years ago
Rich-Harris 67fa013604 implement block.alias, so consecutive each-blocks dont get i, i_1, i_2...
10 years ago
Rich-Harris 9f2bd988a0 collapse text around comments
10 years ago
Rich-Harris a59e017fad separate if statements in codebuilder
10 years ago
Rich-Harris 3629c9e9a1 exclude indexes from dependencies
10 years ago
Rich-Harris 0c013cfd9b use correct dependencies for each-block updates
10 years ago
Rich-Harris 9f2a20763a dont create yield block for childless component
10 years ago
Rich-Harris 080afc99a8 simplify if-block switching code
10 years ago
Rich-Harris b7a40879a7 remove some unused code
10 years ago
Rich-Harris 49bea1b489 dont recompute dependencies
10 years ago
Rich-Harris f8f32a13ba contextualise is only called once per expression
10 years ago
Rich-Harris c9a2bf98a5 rename some variables so that they make more sense
10 years ago
Rich-Harris 2e7a429684 get rid of tmp variable, we dont need it
10 years ago
Rich-Harris 950f2ce2fd dont update static subtrees, even with a noop
10 years ago
Rich-Harris 92b49eed4e more tidying up
10 years ago
Rich-Harris c7f15738ee create all blocks in preprocess step
10 years ago
Rich-Harris 906b5319e6 create each-block else child blocks in preprocess step
10 years ago
Rich-Harris 3cfb823076 tidy up
10 years ago
Rich-Harris 7132551183 factor in attributes and bindings
10 years ago
Rich-Harris b574c405eb conditionalise each-block updates
10 years ago
Rich-Harris ab19649dfa preprocess template, so that we can discover dependencies ahead of time
10 years ago
Rich-Harris d00348d3d6 reduce noise a bit
10 years ago
Rich-Harris 30d4c1c166 less indirection when mounting
10 years ago
Rich-Harris 1d5018bf1e tame each-block code a bit
10 years ago
Rich-Harris 3d259f46ee rename some things so they make more sense
10 years ago
Rich-Harris 34622a8a5a tidy up
10 years ago
Rich-Harris 7a3611b5df wait this is actually way easier
10 years ago
Rich-Harris 227ce7928c alternative approach - dont init observer if data has not changed
10 years ago
Rich-Harris 4c3aa0a36f prevent component binding blowback on initial render
10 years ago
Rich-Harris ef52a93699 ensure binding event handlers precede normal ones (fixes #486)
10 years ago
Rich-Harris e56f09dfe5 clone before set — fixes #479
10 years ago
Rich-Harris 51ff9ecfa6 allow helpers to depend on one another (closes #481)
10 years ago
Rich Harris c0aa3ef7e1 Merge pull request #478 from sveltejs/gh-476
10 years ago
Rich Harris d4d7f6c53e Merge pull request #473 from sveltejs/gh-166
10 years ago
Rich-Harris 02e55e8f7a update select value bindings at the end of the cycle (fixes #476)
10 years ago
Conduitry c6304b19f7 only warn on missing properties in dev mode, do not warn on whitelisted globals
10 years ago
Rich Harris cc722f8f7a handle this.get special case in helpers
10 years ago
Rich Harris fa65f7af60 enforce helper function purity
10 years ago
Rich Harris c7ac8b82ba check that event handler callee corresponds to a valid method
10 years ago
Rich Harris 3595470305 validate namespaces
10 years ago
Rich-Harris a47a679e38 replace all invalid characters in attribute names when creating variables (fixes #470)
10 years ago
Rich Harris faa287f5f3 Merge pull request #468 from sveltejs/gh-465
10 years ago
Rich Harris 2069372369 remove hardcoded component reference
10 years ago
Rich Harris 79b5ce090e Merge branch 'master' into gh-465
10 years ago
Rich Harris 7176001963 Merge branch 'master' into readonly-dev-warning
10 years ago
Rich Harris eaf5b6bfc7 Merge pull request #462 from sveltejs/gh-404-online
10 years ago
Rich Harris 229d9f0a5f Merge pull request #461 from sveltejs/gh-404-scroll
10 years ago
Rich Harris 91a58a0f26 fix all aliasing tests
10 years ago
Rich Harris a793398d63 catch hardcoded names that should be aliases (#465)
10 years ago
Rich Harris 352bb3d354 ensure hoisted event handler names are globally unique — fixes #466
10 years ago
Conduitry 4fe03652f8 warn if options.name does not begin with a capital letter; tidying
10 years ago
Conduitry e76f4fe6cd recognize component name as a global identifier to be avoided (#451)
10 years ago
Rich Harris 5f2c6e3c19 merge master -> readonly-dev-warning
10 years ago
Rich Harris 8b38b2b802 throw if user sets read-only properties in dev mode
10 years ago
Rich Harris 38ae43f6d7 add bind:online to <:Window/> (#404)
10 years ago
Rich Harris 783cd383e3 window scroll bindings are bidirectional (#404)
10 years ago
Rich Harris 79c456333c Merge pull request #460 from sveltejs/gh-450
10 years ago
Rich Harris 9c166a86f0 Merge pull request #459 from sveltejs/gh-189
10 years ago
Rich Harris b096385df1 lint
10 years ago
Rich Harris 2852b96e65 collapse consecutive if-statements with the same condition (#450)
10 years ago
Rich Harris 182a04e8fc dont create whitespace nodes inside elements like <select> (#189)
10 years ago
Rich Harris 99d6502bfd better error for attempts to use getters/setters for methods. closes #425
10 years ago
Rich Harris 93e51d6ef3 correctly bind one-way select value attributes (#423)
10 years ago
Rich Harris fb9edf2f57 align component code more closely with post-refactor element code
10 years ago
Rich Harris 1e2c8593f2 hoist some event handlers, rewrite non-hoisted ones to avoid binding
10 years ago
Rich-Harris 9561a36eb2 more refactoring
10 years ago
Rich-Harris 4a782bc8f6 refactor a lot of attribute code
10 years ago
Rich-Harris e960e8b5c5 move some files, tidy up a bit
10 years ago
Rich-Harris 57f1b64ddb start refactoring element code a bit
10 years ago
Rich-Harris 731f09d173 Merge branch 'master' into refactor
10 years ago
Rich Harris 35113bdee1 Merge pull request #448 from sveltejs/gh-441
10 years ago
Rich-Harris 67967b1a83 DRY out block.tmp stuff
10 years ago
Rich-Harris 8148230e49 align SSR compiler with DOM compiler
10 years ago
Rich-Harris f88788cc29 rename fragment to block everywhere
10 years ago
Rich-Harris 0050871197 more consistent naming
10 years ago
Rich-Harris aa41135f21 remove redundant addSourcemapLocations calls
10 years ago
Rich-Harris 552820cd7f rename Fragment to Block
10 years ago
Rich-Harris bd85ffbf28 move render logic into fragment
10 years ago
Rich-Harris cca91f88bb remove getBuilders
10 years ago
Rich-Harris cc2b6fd53b make fragment constructor more explicit
10 years ago
Rich-Harris 078f36be6a get rid of fragment.type
10 years ago
Rich-Harris 96eca1235b get rid of findBlock
10 years ago
Rich-Harris c87967be69 rename state.target to more self-explanatory state.parentNode
10 years ago
Rich-Harris 4b3bdcf946 use isTopLevel instead of elementDepth
10 years ago
Rich-Harris a9fb93eb32 remove redundant localElementDepth
10 years ago
Rich-Harris 421f3d698f separate current *fragment* from current *generator state*
10 years ago
Rich-Harris abf774bc57 remove generator.push and generator.pop
10 years ago
Rich-Harris d93a3698fb all tests passing once more. now the real work begins
10 years ago
Rich-Harris cdb8b9d01d get yield blocks working
10 years ago
Rich Harris c0442b5eb1 another horrible half-done commit
10 years ago
Rich Harris d0752cd6b1 another half-done commit
10 years ago
Rich Harris 063e76f322 baby steps...
10 years ago
Rich Harris 3006a245af more consistent naming
10 years ago
Taylor Zane Glaeser 3ed4dc68ee Fixes #452. Fixed an issue that caused setting `computed` to an empty object to prevent the component from compiling.
10 years ago
Rich-Harris b8705a5b0c turn dom generator visitors into functions
10 years ago
Rich-Harris e7d324f305 visitors can just be functions now
10 years ago
Rich-Harris 2d4f9eac00 make visitors responsible for visiting their own children
10 years ago
Rich Harris 00f1eaee12 remove this._callbacks
10 years ago
Rich Harris 77eee8602d remove some long-since obsolete generator code
10 years ago
Rich Harris 7219202471 reverse pre and post to fix deferrerd observers (fixes #441)
10 years ago
Rich Harris 3fcbf428bd while we're at it, remove unused stuff from generated SSR code
10 years ago
Rich Harris d2db41f811 remove unnecessary template declarations - fixes #440
10 years ago
Rich Harris 4b5754b9a7 centralise logic for manipulating source javascript
10 years ago
Rich-Harris caec96f9da make abstract removeNode function
10 years ago
Rich Harris 3881f5f84b Merge pull request #445 from sveltejs/gh-442-b
10 years ago
Rich-Harris 90b9dc84ad fix broken proto helper
10 years ago
Rich-Harris 92f19a0a74 better prototype assignment
10 years ago
Rich-Harris 91bf849cc7 generate more idiomatic code when removing object properties
10 years ago
Rich Harris b2ec4afdb8 Merge branch 'master' into gh-442
10 years ago
Rich Harris 9da4e80aa7 Merge pull request #443 from sveltejs/gh-431
10 years ago
Rich Harris ced1de84b3 Merge pull request #422 from sveltejs/gh-419
10 years ago
Rich-Harris 5a4f1aeba5 fix remaining test failures
10 years ago
Rich-Harris be33a29a56 mostly fix insane node 4 issue
10 years ago
Rich-Harris 66d48c4830 dont generate intermediate data objects for components unnecessarily (#442)
10 years ago
Rich-Harris e592c052aa use assign helper, to avoid compatibility headaches
10 years ago
Rich Harris 63011075f0 Merge pull request #438 from sveltejs/gh-436
10 years ago
Rich-Harris 75e8d6205e better error for bind:value="{{foo}}" - fixes #437
10 years ago
Rich-Harris 605040ddb7 read values from range/number inputs as numbers - fixes #436
10 years ago
Rich-Harris 05ea031895 prevent unclosed <script> causing infinite loop
10 years ago
Rich-Harris 6e0d0b1a12 use a map to avoid false positives
10 years ago
Rich-Harris 6c754c2a3d special case literals
10 years ago
Rich-Harris 1a49c2f344 Merge branch 'master' into gh-424
10 years ago
Rich Harris 6074178c65 Merge pull request #427 from sveltejs/gh-423
10 years ago
Rich Harris 0d5d7ff6bf Merge pull request #429 from sveltejs/gh-428
10 years ago
Rich Harris 132de5cf72 Merge pull request #430 from sveltejs/disallow-import-root
10 years ago
Rich-Harris cf626ff880 retain binding sourcemaps to the extent possible
10 years ago
Rich-Harris 92e4b7f813 prevent hard-to-reproduce bug with deep two-way bindings
10 years ago
Conduitry f6934a1d20 disallow `import root` during validation
10 years ago
Conduitry b03c024160 bind callback passed to custom events to the node context (#428)
10 years ago
Conduitry aba21f8eb9 <select> elements should use .value prop to update value (#423)
10 years ago
Conduitry e32e69f3e8 deconflict `tmp` within its fragment
10 years ago
Conduitry d2a701c4f5 use snake case in generated identifiers (#419)
10 years ago
Conduitry eab3f62f25 try to parse expressions as javascript before interpreting them as an identifier (#424)
10 years ago
Rich-Harris ae660f9ff9 remove surplus `root.` prefix
10 years ago
Dexter 3ba4793728
Fixes #420
10 years ago
Rich Harris 731f840a34 Merge pull request #416 from sveltejs/gh-413
10 years ago
Rich-Harris 1308907f67 include css in compiler output (#409)
10 years ago
Rich-Harris 44287f846a recompute computed values with functions as dependencies (#413)
10 years ago
Conduitry 0014945777 fix merge
10 years ago
Rich Harris 108876b64b Merge branch 'master' into gh-400
10 years ago
Rich-Harris 1780876b99 prevent infinite loops caused by pathological component bindings (#398)
10 years ago
Conduitry 6d1623cf0e new aliaser mechanism replacing existing mechanism and counters; a bunch more deconflicting
10 years ago
Rich Harris 9988749b74 Merge pull request #391 from sveltejs/gh-371
10 years ago
Rich Harris 5d697eca65 Merge pull request #403 from widgetic/fix/binding-input-radio-group
10 years ago
Rich-Harris 8df1356ef8 fix bad merge
10 years ago
Rich Harris 3ead9bfc3f Merge branch 'master' into gh-371
10 years ago
Cristian Necula 3c9f82a7b6 (fix:radio-groups) preserve the radio input's checked state after handling a state change
10 years ago
Conduitry 7d03b74576 use maps and sets in many places instead of plain objects
10 years ago