mirror of https://github.com/sveltejs/svelte
pull/12452/head
commit
c27209cc64
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
feat: skip pending block for already-resolved promises
|
||||
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
feat: move dev-time component properties to private symbols'
|
||||
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: ensure hydration walks all nodes
|
||||
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: always pass original component to HMR wrapper
|
||||
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
feat: add ability to ignore warnings through `warningFilter` compiler option
|
||||
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: prevent whitespaces merging across component boundaries
|
||||
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: ensure previous transitions are properly aborted
|
||||
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: run animations in microtask so that deferred transitions can measure nodes correctly
|
||||
@ -1,4 +1,4 @@
|
||||
<div class="a svelte-xyz"></div>
|
||||
<div class="d svelte-xyz"></div>
|
||||
<div class="f svelte-xyz"></div>
|
||||
<div class="b svelte-xyz"></div>
|
||||
<div class="g svelte-xyz"></div>
|
||||
<div class="h svelte-xyz"></div>
|
||||
@ -1,3 +1,3 @@
|
||||
<div class="a svelte-xyz"></div>
|
||||
<div class="b svelte-xyz"></div>
|
||||
<div class="c svelte-xyz"></div>
|
||||
<div class="e svelte-xyz"></div>
|
||||
@ -1,4 +1,4 @@
|
||||
<div class="a svelte-xyz"></div>
|
||||
<div class="d svelte-xyz"></div>
|
||||
<div class="f svelte-xyz"></div>
|
||||
<div class="b svelte-xyz"></div>
|
||||
<div class="g svelte-xyz"></div>
|
||||
<div class="h svelte-xyz"></div>
|
||||
@ -1,3 +1,3 @@
|
||||
<div class="a svelte-xyz"></div>
|
||||
<div class="b svelte-xyz"></div>
|
||||
<div class="c svelte-xyz"></div>
|
||||
<div class="e svelte-xyz"></div>
|
||||
@ -0,0 +1,27 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
get props() {
|
||||
return { visible: false };
|
||||
},
|
||||
|
||||
test({ assert, component, target, raf, logs }) {
|
||||
component.visible = true;
|
||||
const span = /** @type {HTMLSpanElement & { foo: number }} */ (target.querySelector('span'));
|
||||
|
||||
raf.tick(50);
|
||||
assert.equal(span.foo, 0.5);
|
||||
|
||||
component.visible = false;
|
||||
assert.equal(span.foo, 0.5);
|
||||
|
||||
raf.tick(75);
|
||||
assert.equal(span.foo, 0.25);
|
||||
|
||||
component.visible = true;
|
||||
raf.tick(100);
|
||||
assert.equal(span.foo, 0.5);
|
||||
|
||||
assert.deepEqual(logs, ['transition']); // should only run once
|
||||
}
|
||||
});
|
||||
@ -0,0 +1,18 @@
|
||||
<script>
|
||||
export let visible;
|
||||
|
||||
function foo(node) {
|
||||
console.log('transition');
|
||||
|
||||
return {
|
||||
duration: 100,
|
||||
tick: (t) => {
|
||||
node.foo = t;
|
||||
}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if visible}
|
||||
<span transition:foo>hello</span>
|
||||
{/if}
|
||||
@ -0,0 +1,31 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
get props() {
|
||||
return { visible: false };
|
||||
},
|
||||
|
||||
test({ assert, component, target, raf, logs }) {
|
||||
component.visible = true;
|
||||
const span = /** @type {HTMLSpanElement & { foo: number, bar: number }} */ (
|
||||
target.querySelector('span')
|
||||
);
|
||||
|
||||
raf.tick(50);
|
||||
assert.equal(span.foo, 0.5);
|
||||
|
||||
component.visible = false;
|
||||
assert.equal(span.foo, 0.5);
|
||||
|
||||
raf.tick(75);
|
||||
assert.equal(span.foo, 0.75);
|
||||
assert.equal(span.bar, 0.75);
|
||||
|
||||
component.visible = true;
|
||||
raf.tick(100);
|
||||
assert.equal(span.foo, 0.25);
|
||||
assert.equal(span.bar, 1);
|
||||
|
||||
assert.deepEqual(logs, ['in', 'out', 'in']);
|
||||
}
|
||||
});
|
||||
@ -0,0 +1,29 @@
|
||||
<script>
|
||||
export let visible;
|
||||
|
||||
function foo(node) {
|
||||
console.log('in');
|
||||
|
||||
return {
|
||||
duration: 100,
|
||||
tick: (t) => {
|
||||
node.foo = t;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function bar(node) {
|
||||
console.log('out');
|
||||
|
||||
return {
|
||||
duration: 100,
|
||||
tick: (t) => {
|
||||
node.bar = t;
|
||||
}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if visible}
|
||||
<span in:foo out:bar>hello</span>
|
||||
{/if}
|
||||
@ -0,0 +1,5 @@
|
||||
<script>
|
||||
const { children } = $props();
|
||||
</script>
|
||||
|
||||
<p>text before the render tag {@render children()}</p>
|
||||
@ -0,0 +1,5 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
html: `<p>text before the render tag dont fuse this text with the one from the child</p>`
|
||||
});
|
||||
@ -0,0 +1,6 @@
|
||||
<script>
|
||||
import Child from './Child.svelte';
|
||||
let text = $state('dont fuse this text with the one from the child');
|
||||
</script>
|
||||
|
||||
<Child>{text}</Child>
|
||||
@ -0,0 +1,8 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
compileOptions: {
|
||||
warningFilter: (warning) =>
|
||||
!['a11y_missing_attribute', 'a11y_misplaced_scope'].includes(warning.code)
|
||||
}
|
||||
});
|
||||
@ -0,0 +1,8 @@
|
||||
<div>
|
||||
<img src="this-is-fine.jpg" />
|
||||
<marquee>but this is still discouraged</marquee>
|
||||
</div>
|
||||
|
||||
<div scope></div>
|
||||
|
||||
<img src="potato.jpg" />
|
||||
@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y_distracting_elements",
|
||||
"end": {
|
||||
"column": 49,
|
||||
"line": 3
|
||||
},
|
||||
"message": "Avoid `<marquee>` elements",
|
||||
"start": {
|
||||
"column": 1,
|
||||
"line": 3
|
||||
}
|
||||
}
|
||||
]
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue