Teo
228dd4d9d7
fix: svelte:element with dynamic this and spread attributes throws error ( #9112 )
...
fixes #9092
---------
Co-authored-by: gtmnayan <50981692+gtm-nayan@users.noreply.github.com>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
1 year ago
gtmnayan
3191147c2a
chore: document init parameters ( #9118 )
1 year ago
paulreece
6fe17eabf2
fix: This makes the indeterminate HTML attribute available for use. Fixes #9176 . ( #9180 )
...
Fixes #9176 . This adds indeterminate to the list of HTMLAttributes so that one can use it without receiving an error.
1 year ago
Kelvin Soh
d5a1822428
fix: style directive not updating when style attribute is present and style directive is updated via an object prop. fixes #9185 ( #9187 )
...
fixes #9185 .
I narrowed down the issue to the bug surfacing when we use object properties to update style attributes and directives. This fix removes the size check (because a single object will be of size 1 but can affect n attributes/directives via its properties).
In addition, the order of the OR is switched as the earlier condition has some reactive assignments which are not run in the current order when style_changed_var is truthy.
1 year ago
gtmnayan
115ea1ff4a
fix: do not add module declared variables as dependencies ( #9122 )
...
closes #5943
1 year ago
Yeom suyun
b62fc8c8fd
chore: eslint rule for naming convention ( #9208 )
1 year ago
gtmnayan
d5839ef194
fix: head duplication when binding is present ( #9124 )
...
fixes #7879
fixes #4982
1 year ago
Teo
bd64f07e98
fix: take custom attribute name into account when reflecting property ( #9140 )
...
fixes #9134
1 year ago
Ben McCann
3d3680cd11
chore: move playground ( #9131 )
1 year ago
gtmnayan
d06cfe3723
chore: render head output in playground ( #9123 )
1 year ago
gtmnayan
ba1e67844e
fix: css sourcemap generation with unicode filenames ( #9120 )
...
* fix: css sourcemap generation with unicode filenames
* format
1 year ago
github-actions[bot]
50c270a54d
Version Packages ( #9096 )
...
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
1 year ago
Lyu, Wei-Da
05f99d20f9
feat: move svelteHTML to load the correct svelte/element ( #9070 )
...
Make IntrinsicElements extends SvelteHTMLElements
so it can be extend with declare module
converting to module so it can extend without needing another type alias
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
1 year ago
Artxe2
8b1cdde548
fix:change typescript url ( #9093 )
1 year ago
Nguyen Tran
f4c4d99e13
fix: add test so #6009 doesn't regress ( #9075 )
...
closes #6009
1 year ago
Михаил Туник
6f73afb497
chore: refactor return statement in `_distance` function ( #9025 )
...
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
1 year ago
github-actions[bot]
a08ae0f555
Version Packages ( #9037 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
hackape
99a3cc93b6
fix: allow child element with slot attribute within svelte:element ( #9038 )
...
fix #9018
1 year ago
Teo
01cbb661d0
chore: remove duplicate condition in `if` statement ( #9023 )
1 year ago
Conduitry
959825c7c4
chore: fix tests on Node 18.17.0 ( #9049 )
1 year ago
Paolo Ricciuti
a71f3595a3
fix: Add data-* to svg attributes ( #9036 )
...
* Add data-* to svg attributes
* Create twelve-suits-drive.md
1 year ago
github-actions[bot]
6827709373
Version Packages ( #9008 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
hackape
a2b6401c43
fix: `svelte:component` spread props change not picked up ( #9006 )
...
fix #9003 , amend #8946 (comment)
1 year ago
github-actions[bot]
5d66f96d01
Version Packages ( #8928 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Nguyen Tran
f8283fbc77
fix: remove let variable from select binding dependencies ( #8969 )
...
Fixes #2943
The issue linked above invalidates a variable that is not defined in <script> but instead is defined as a let: variable, which does not make sense to invalidate, therefore, this PR exists.
1 year ago
Simon H
cb1358cc41
fix: don't add accessor twice ( #8996 )
...
In dev mode, Svelte creates a setter to throw an error noting that you can't set that readonly prop, which resulted in the accessor getting applied twice to the custom element wrapper, causing an error
fixes #8971
1 year ago
Simon H
657f11376c
feat: add ability to extend custom element class ( #8991 )
...
This should help everyone who has special needs and use cases around custom elements. Since Svelte components are wrapped and only run on connectedCallback, it makes sense to expose the custom element class for modification before that.
- fixes #8954 / closes #8955 - use extend to attach the function manually and save possible values to a prop
- closes #8473 / closes #4168 - use extend to set the proper static attribute and then call attachInternals in the constructor
- closes #8472 - use extend to attach anything custom you need
- closes #3091 - pass `this` to a prop of your choice and use it inside your component
- add some doc for #8987
1 year ago
Ben McCann
4bbb5454e2
perf: optimize imports that are not mutated or reassigned ( #8948 )
...
this means such imports are seen as static and subsequently Svelte needs to generate way less code
1 year ago
gtmnayan
33fd631b5f
chore: upgrade dependencies ( #8939 )
...
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
1 year ago
gtmnayan
20dac2ae12
fix: handle patterns in destructured literals ( #8871 )
...
fixes #8863
---------
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
1 year ago
Nguyen Tran
66593c62f4
fix: svelte:component evaluates props once ( #8946 )
...
Fixes #6634
1 year ago
Ben McCann
ff7a4c07d7
chore: fix broken script for generating parser tests ( #8945 )
...
---------
Co-authored-by: gtmnayan <50981692+gtm-nayan@users.noreply.github.com>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
1 year ago
Ben McCann
8601195a85
docs: add a couple internal JSDocs and cleanup from TS migration ( #8940 )
1 year ago
github-actions[bot]
3ff0084dc3
Version Packages ( #8925 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Lyu, Wei-Da
0a2732a2b0
fix: generate type definition with nullable types ( #8924 )
...
This results in `undefined` and `null` being added explicitly in places which is crucial in some situations
1 year ago
github-actions[bot]
a12643cbb8
Version Packages ( #8911 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Simon H
136aebd8eb
fix: repair invalid raw html content during hydration ( #8912 )
...
When the HTML that is coming from raw html is invalid, the browser reshuffles things. Bail in that case to try to repair more often. Should help with https://github.com/withastro/astro/issues/7557
1 year ago
Simon H
35221c8811
fix: claim svg tags in raw mustache tags correctly ( #8910 )
...
fixes #8904
1 year ago
github-actions[bot]
800f6c076b
Version Packages ( #8902 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Simon H
8de9dc6144
fix: handle falsy srcset values ( #8901 )
...
fixes #8899
1 year ago
github-actions[bot]
ae752c9693
Version Packages ( #8877 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Simon H
0aa03df086
fix: reflect all custom element prop updates back to attribute ( #8898 )
...
fixes #8879
1 year ago
Simon H
4b3eb72346
fix: shrink custom element baseline a bit ( #8858 )
...
- use shorter class property names as they are not minified
- reuse some dom helper methods
#8826
1 year ago
Simon H
2f5e371046
chore: run tsc properly ( #8884 )
...
Runs type check as part of the CI. This needs a new path alias in the tsconfig so that TS resolves the svelte import in the ambient file directly to the correct d.ts file and doesn't load Svelte through the node_modules, at which point it would load the generated ambient type definitions and throw a duplicate definitions error.
Also removes a tgz that was accidentally added
1 year ago
Simon H
d2ff04f9fe
fix: use non-destructive hydration for all `@html` tags ( #8880 )
...
html tags that could be optimized to use innerHTML in mount ignored any hydration code, which leads to everything getting unmounted and mounted again. This takes the non-optimized path for hydration, too.
fixes https://github.com/sveltejs/kit/issues/10245
1 year ago
Simon H
1a3e50b6b7
fix: check srcset when hydrating to prevent needless requests ( #8868 )
...
---------
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
1 year ago
L
270cfce065
chore: adding default for disclose version ( #8874 )
1 year ago
Simon Holthausen
1de2144dae
chore: tests for #8872
1 year ago
github-actions[bot]
90860550ae
Version Packages ( #8855 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Simon H
b0a3fa1766
fix: ensure createEventDispatcher and ActionReturn work with generic function types ( #8872 )
...
fixes #8860
This contains a small but unfortunately unavoidable breaking change: If you used `never` to type that the second parameter of `createEventDispatcher` shouldn't be set or that the action accepts no parameters (which the docs recommended for a short time), then you need to change that to `null` and `undefined` respectively
1 year ago
Simon H
1cfed0bf29
fix: relax a11y "no redundant role" rule for li, ul, ol ( #8867 )
...
fixes #8854
1 year ago
hackape
876f894c64
fix: apply transition_in/out to svelte:element with local transition ( #8865 )
...
fixes #8233
1 year ago
Simon H
2b9b99bd35
fix: remove tsconfig.json from published package ( #8859 )
...
fixes #8839
1 year ago
Nguyen Tran
3576c7443e
fix: Make sure 'func' doesn't clash with destructured contexts ( #8840 )
...
Fixes : #8753
1 year ago
Ben McCann
68e6336637
chore: upgrade dependencies ( #8827 )
1 year ago
Eric Liu
abe2ee73e1
docs: fix link to changelog ( #8845 )
1 year ago
Ben McCann
7bab2d4033
docs: fix link in changelog
1 year ago
Simon H
037ac2f55a
docs: update transitions tutorial ( #8822 )
...
fixes #8820
1 year ago
Isaiah Banks
140bed5386
Update CHANGELOG.md ( #8809 )
...
Fix misformatted links in 4.0.0 changelog
1 year ago
github-actions[bot]
0596c4797d
Version Packages ( #8799 )
...
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
1 year ago
Ben McCann
60eee9a73f
chore: better error messages for CJS users ( #8790 )
1 year ago
Simon Holthausen
8905877bab
fix: add any fallback to generic
...
was like this in Svelte 3
1 year ago
Jimmy Wärting
7cbd36d6b2
chore: Remove the need for `node:process` ( #8795 )
...
performance.now() exist in all envs we support now
1 year ago
github-actions[bot]
82cc48390c
Version Packages (next) ( #8772 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
Simon H
ef1b98f9d9
fix: account for sourcemap in meta info ( #8778 )
...
We need to use a different method for getting the meta info because `locate` is used to help construct the source map that references the preprocessed Svelte file. If we would now add source maps to that `locate` function it would go the the original source directly which means skipping potentially intermediate source maps which we would need in other situations. Sadly we can't map the character offset because for that we would need to the original source contents which we don't have in this context.
fixes #8360
closes #8362
1 year ago
gtmnayan
5702142d9e
feat: attach Svelte major version info to window global ( #8761 )
...
Can be opt out by setting discloseVersion to false
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
1 year ago
gtmnayan
03942162f8
chore: deindent cjs output for compiler ( #8785 )
...
makes package size a tiny bit smaller
1 year ago
Jimmy Wärting
f76a75b97d
chore: remove btoa fallback ( #8783 )
...
Since we're targeting NodeJS >16 we don't need any Buffer fallback as it's now built in globally from that version onwards.
1 year ago
Puru Vijay
cf32fa2497
fix(site): update tutorial links ( #8780 )
...
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
1 year ago
Simon H
203490c3e4
breaking: use `CustomEvent` constructor instead of deprecated `createEvent` method ( #8775 )
...
closes #8474
1 year ago
Puru Vijay
78749101e7
fix: update/add links to website ( #8729 )
...
---------
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
1 year ago
gtmnayan
de8dfda049
chore: move tests to the correct place ( #8773 )
1 year ago
Ben McCann
4d491d41cc
merge changelog for 3.59.2
1 year ago
Ben McCann
a856128d80
merge master
1 year ago
gtmnayan
914529fa76
feat: smaller destructor chunk ( #8763 )
...
technically a breaking change because someone with a mutation observer could rely on the order of operations
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
1 year ago
Puru Vijay
88504ee90a
docs(sites): Auto-generated CompileOptions ( #8756 )
...
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
1 year ago
GrygrFlzr
54f72f4545
fix: update onMount type to allow async to return any ( #8714 )
...
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
1 year ago
Ben McCann
0724261b4d
chore: update code-red ( #8719 )
...
---------
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
Co-authored-by: gtmnayan <gtmnayan@gmail.com>
1 year ago
Simon H
752ee69e6b
chore: a11y tests cleanup ( #8759 )
...
closes #8728
Turns out all the removed previous test failures are indeed correct to be removed, according to the test adjustments in https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/pull/937
1 year ago
github-actions[bot]
520a5784fb
Version Packages (next) ( #8733 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
gtmnayan
cc82d5ddcb
fix: expose types for all TS resolution modes, fix SvelteComponent export ( #8721 )
...
also add some legacy import paths which should be changed in usage sites ASAP
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
1 year ago
Simon H
aa8cc5d26f
fix: never use html optimization for mustache tags in hydration mode ( #8744 )
...
---------
Co-authored-by: gtmnayan <gtmnayan@gmail.com>
1 year ago
Ben McCann
bdf10f125c
merge
1 year ago
Ben McCann
e8e9c6cc19
chore: update `locate-character` and `dts-buddy` ( #8737 )
1 year ago
Puru Vijay
62bef809b2
Merge remote-tracking branch 'origin/version-4' into sites
1 year ago
Simon H
c587c8aaaa
docs: note limitations of not using shadow root ( #8734 )
...
closes #8686
1 year ago
mimbrown
4f1063723e
fix: Don't break in `attributeChangedCallback` if `$$component` does not exist yet ( #8701 )
...
Since the custom element class waits one tick before instantiating the `$$component` field, it's possibly undefined when `attributeChangedCallback` is called.
1 year ago
gtmnayan
f580e2e0c8
fix: warn on boolean compilerOptions.css ( #8710 )
...
* warn on boolean compilerOptions.css
* changeset
1 year ago
Ben McCann
20d95ddb23
merge
1 year ago
Rich Harris
b1cafc4573
update type generation script ( #8712 )
...
* chore: playground (#8648 )
* initialize playground
* pnpm up
* tidy up git ignore
* remove fluff
* format
* rm readme
* fix jsconfig error
* add skip-worktree instructions
* reload hack
* simplify
* use rollup
* ughh
* add flag for SSR
* ...
* simplify further
* configure launch.json
* add debugger info to readme
* remove vm modules flag
* use replaceAll instead of replace
* tidy up
* fix: make it run
* add watch to launch config
* Generate type declarations with `dts-buddy` (#8702 )
* use dts-buddy
* remove debug output
* remove existing type generation script
* fix package.json
* update gitignore
* bump dts-buddy
* remove unused action entry point
* add svelte/compiler and svelte/types/compiler/preprocess modules
* bump dts-buddy
* annoying
* changeset
* bump dts-buddy
* get rid of .d.ts files
* another one
* Update packages/svelte/package.json
Co-authored-by: gtmnayan <50981692+gtm-nayan@users.noreply.github.com>
---------
Co-authored-by: Rich Harris <git@rich-harris.dev>
Co-authored-by: gtmnayan <50981692+gtm-nayan@users.noreply.github.com>
* fix: export ComponentType (#8694 )
* fix: export ComponentType
* ughh
* changeset
* fix: derived types (#8700 )
* fix: derived store types
* changeset
* Version Packages (next) (#8709 )
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* update type generation script
* remove unused stuff
* fix: changeset publish script isn't called release anymore (#8711 )
* chore: remove prepare script (#8713 )
* chore: fix release workflow (#8716 )
* More readable, Fix $$_attributes
* Fix types (#8727 )
* put comment in right place
* bump dts-buddy
---------
Co-authored-by: Rich Harris <git@rich-harris.dev>
* build types
* add svelte/compiler types
* remove prepare script
* fix
* typo
* squelch errors
* Add svelte and kit to twoslash's types field
* squelch more stuff
* Add errors to account for new types
* Remove deps
* formatting tweak
* fix linting, maybe
* the hell
* gah
* Fix types a bit
* bump dts-buddy
* pnpm generate in dev mode
* Cache again
* reduce index
* bump dts-buddy
* remove comment
---------
Co-authored-by: gtmnayan <50981692+gtm-nayan@users.noreply.github.com>
Co-authored-by: Rich Harris <git@rich-harris.dev>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dominik G <dominik.goepel@gmx.de>
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Puru Vijay <devpuruvj@gmail.com>
1 year ago
Ben McCann
83e91782e6
chore: upgrade aria-query and axobject-query ( #8724 )
...
Co-authored-by: gtmnayan <gtmnayan@gmail.com>
1 year ago
Ben McCann
cc1f4bc6ff
chore: upgrade eslint config ( #8717 )
1 year ago
Rich Harris
d6f0b7bd5b
Fix types ( #8727 )
...
* put comment in right place
* bump dts-buddy
---------
Co-authored-by: Rich Harris <git@rich-harris.dev>
1 year ago
Puru Vijay
ad9a672171
Merge version-4
1 year ago
gtmnayan
8bd90219ec
chore: fix release workflow ( #8716 )
1 year ago
Ben McCann
0c6f17274e
chore: remove prepare script ( #8713 )
1 year ago
github-actions[bot]
5963b6fd84
Version Packages (next) ( #8709 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 year ago
gtmnayan
264da48887
fix: derived types ( #8700 )
...
* fix: derived store types
* changeset
1 year ago
gtmnayan
0b15bb6928
fix: export ComponentType ( #8694 )
...
* fix: export ComponentType
* ughh
* changeset
1 year ago
Rich Harris
1046daba6a
Generate type declarations with `dts-buddy` ( #8702 )
...
* use dts-buddy
* remove debug output
* remove existing type generation script
* fix package.json
* update gitignore
* bump dts-buddy
* remove unused action entry point
* add svelte/compiler and svelte/types/compiler/preprocess modules
* bump dts-buddy
* annoying
* changeset
* bump dts-buddy
* get rid of .d.ts files
* another one
* Update packages/svelte/package.json
Co-authored-by: gtmnayan <50981692+gtm-nayan@users.noreply.github.com>
---------
Co-authored-by: Rich Harris <git@rich-harris.dev>
Co-authored-by: gtmnayan <50981692+gtm-nayan@users.noreply.github.com>
1 year ago
gtmnayan
15bdadb2ae
chore: playground ( #8648 )
...
* initialize playground
* pnpm up
* tidy up git ignore
* remove fluff
* format
* rm readme
* fix jsconfig error
* add skip-worktree instructions
* reload hack
* simplify
* use rollup
* ughh
* add flag for SSR
* ...
* simplify further
* configure launch.json
* add debugger info to readme
* remove vm modules flag
* use replaceAll instead of replace
* tidy up
* fix: make it run
* add watch to launch config
1 year ago
Ben McCann
276d2f86ba
merge version-4 branch
1 year ago
Ben McCann
f2ff684b5f
chore: setup changesets ( #8668 )
...
Co-authored-by: dominikg <dominik.goepel@gmx.de>
1 year ago
Ben McCann
f74dddd1d5
docs: correct link in changelog
1 year ago
Puru Vijay
2efd78cba4
Merge remote-tracking branch 'origin/version-4' into sites
1 year ago
gtmnayan
fe06a39229
fix: store types and some other internal types that got lost in the conversion ( #8658 )
1 year ago
Ben McCann
b0619377b1
docs: update changelog with minimum `rollup-plugin-svelte` and `svelte-loader` versions ( #8666 )
1 year ago
Ben McCann
b41c4407c2
docs: update changelog to follow changesets format ( #8642 )
1 year ago
Ben McCann
0e19350e62
docs: update changelog with required version of vite-plugin-svelte ( #8654 )
1 year ago
Puru Vijay
eb18769e59
Merge remote-tracking branch 'origin/version-4' into sites
1 year ago
Simon Holthausen
79f9d8f41f
chore: remove type * for better backwards compatibility
...
doesnt need ts 5.0 then, at least for now
1 year ago
Puru Vijay
d8139430ff
Merge remote-tracking branch 'origin/version-4' into sites
1 year ago
Puru Vijay
bd51e6f3ea
Merge remote-tracking branch 'origin/version-4' into sites
1 year ago
Ben McCann
ddfff4df8c
chore: convert to monorepo ( #8644 )
1 year ago