Closes#3310
---------
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Resolves a second unintended regression introduced in #6170.
Follow-up to #8331, this time addressing the root issue so the correct select option won't be deselected in the first place when the initial bound value is undefined.
Fixes#8361
track all `#each` variables that could result in a change to the inputs and also update the `$$binding_groups` variable which holds the references to the inputs of each group accordingly.
Fixes#7633Fixes#6112Fixes#7884
Closes#4129
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
Closes#5085
---------
Co-authored-by: Marcin Wicha <23581770+marcin-wicha@users.noreply.github.com>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
fixes#8026
1. replace the big entities list with entities that have a ; at the end where valid (there are some exceptions)
2. construct two regexes from that entities list: one for HTML where it's strictly matched, one for attributes where it tries to match browser behavior by also allowing = / digit / character afterwards
3. decode character references with one of these regexes depending on this is an attribute value or not
---------
Co-authored-by: Yuichiro Yamashita <xydybaseball@gmail.com>
Ensure innerHTML for template is done on template element
fixes#7315fixes#7319
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* feat: optimise svelte-element output code for static tag and static attribute
* Update src/compiler/compile/render_dom/wrappers/Element/index.ts
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* Update src/runtime/internal/dom.ts
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* Update src/compiler/compile/render_dom/wrappers/Element/index.ts
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* fix logic
* fix pipeline errors
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Fixes#7964
currently for a case where the parent type is ArrayPattern code needs to check if the elements are of direct type MemberExpression or Identifier, in the case of MemberExpression there will be an Identifier check for the Object of the MemberExpression.
---------
Co-authored-by: Yuichiro Yamashita <xydybaseball@gmail.com>
Fixes: #7578
When remounting a keyed input element (e.g. because the element order has changed) with spread properties, the input value gets undefined. This has happened because data_value is updated before remounting and it won't contain a value for input-value (because the value hasn't changed). When calling mount() an undefined value was assigned because of a missing check.
fixes#7948
- The assignment of the variable "previous_tag" was incorrectly positioned and could cause race condition when used with transitions.
- We need another variable to detect when we are in a transition to remove a node
---------
Co-authored-by: Yuichiro Yamashita <xydybaseball@gmail.com>
* add inert to attribute_lookup
* typed for preventing a repeat of the tragedy
* add tests
* revert unnecessary change
* add more test
---------
Co-authored-by: fcrozatier <frederic.crozatier@protonmail.com>
By passing an empty object literal as first argument to Object.assign we can avoid having objects spread as props on a component being mutated during SSR.
Fixes#8171
* [fix] static svelte:element not replaced with tag in production mode
* [fix] static svelte:element not replaced with tag in production mode
* add optimization of static <svelte:element> and fix a bug
Co-authored-by: Yuichiro Yamashita <xydybaseball@gmail.com>
* add test
* improve error message if this attribute of <svelte:component> is not SvelteComponent
* add more tests
* improve validation
* simplify test
Co-authored-by: Tan Li Hau <tanhauhau@users.noreply.github.com>
* fix: destroy non-fragment element such as empty components
* fix: fragment property of Empty Component is set as true in dev mode, inconsistent with production mode
* chore: revert 'removal' of component.compile_options.dev
* feat: add test for destroying empty component
* chore: update typechecking callback
* chore: revert fragment dev checks
* chore: remove unnecessary comment
* chore: update test for empty-component-destroy
* fix: revert back the patching of console.log
* use before_test and after_test
Co-authored-by: qinmu <magenta2127@mail.com>
Co-authored-by: tanhauhau <lhtan93@gmail.com>