aa-coordination
Rich Harris 7 months ago
commit cc7bc3279e

@ -219,11 +219,10 @@ You can give the `<select>` a default value by adding a `selected` attribute to
- [`volume`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/volume)
- [`muted`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/muted)
...and seven readonly ones:
...and six readonly ones:
- [`duration`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/duration)
- [`buffered`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/buffered)
- [`paused`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/paused)
- [`seekable`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/seekable)
- [`seeking`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/seeking_event)
- [`ended`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/ended)

@ -1,5 +1,13 @@
# svelte
## 5.19.7
### Patch Changes
- chore: remove unused code from signal logic ([#15195](https://github.com/sveltejs/svelte/pull/15195))
- fix: encounter svelte:element in blocks as sibling during pruning css ([#15165](https://github.com/sveltejs/svelte/pull/15165))
## 5.19.6
### Patch Changes

@ -2,7 +2,7 @@
"name": "svelte",
"description": "Cybernetically enhanced web apps",
"license": "MIT",
"version": "5.19.6",
"version": "5.19.7",
"type": "module",
"types": "./types/index.d.ts",
"engines": {

@ -933,11 +933,9 @@ function get_possible_element_siblings(node, adjacent_only, seen = new Set()) {
/**
* @param {Compiler.AST.EachBlock | Compiler.AST.IfBlock | Compiler.AST.AwaitBlock | Compiler.AST.KeyBlock | Compiler.AST.SlotElement} node
* @param {boolean} adjacent_only
* @returns {Map<Compiler.AST.RegularElement, NodeExistsValue>}
* @returns {Map<Compiler.AST.RegularElement | Compiler.AST.SvelteElement, NodeExistsValue>}
*/
function get_possible_last_child(node, adjacent_only) {
/** @typedef {Map<Compiler.AST.RegularElement, NodeExistsValue>} NodeMap */
/** @type {Array<Compiler.AST.Fragment | undefined | null>} */
let fragments = [];
@ -960,7 +958,7 @@ function get_possible_last_child(node, adjacent_only) {
break;
}
/** @type {NodeMap} */
/** @type {Map<Compiler.AST.RegularElement | Compiler.AST.SvelteElement, NodeExistsValue>} NodeMap */
const result = new Map();
let exhaustive = node.type !== 'SlotElement';
@ -1001,9 +999,10 @@ function has_definite_elements(result) {
}
/**
* @template T
* @param {Map<T, NodeExistsValue>} from
* @param {Map<T, NodeExistsValue>} to
* @template T2
* @template {T2} T1
* @param {Map<T1, NodeExistsValue>} from
* @param {Map<T2, NodeExistsValue>} to
* @returns {void}
*/
function add_to_map(from, to) {
@ -1028,7 +1027,7 @@ function higher_existence(exist1, exist2) {
* @param {boolean} adjacent_only
*/
function loop_child(children, adjacent_only) {
/** @type {Map<Compiler.AST.RegularElement, NodeExistsValue>} */
/** @type {Map<Compiler.AST.RegularElement | Compiler.AST.SvelteElement, NodeExistsValue>} */
const result = new Map();
let i = children.length;
@ -1041,6 +1040,8 @@ function loop_child(children, adjacent_only) {
if (adjacent_only) {
break;
}
} else if (child.type === 'SvelteElement') {
result.set(child, NODE_PROBABLY_EXISTS);
} else if (is_block(child)) {
const child_result = get_possible_last_child(child, adjacent_only);
add_to_map(child_result, result);

@ -256,15 +256,3 @@ export function update_derived(derived) {
derived.wv = increment_write_version();
}
}
/**
* @param {Derived} derived
* @returns {void}
*/
export function destroy_derived(derived) {
destroy_derived_effects(derived);
remove_reactions(derived, 0);
set_signal_status(derived, DESTROYED);
derived.v = derived.deps = derived.ctx = derived.reactions = null;
}

@ -55,7 +55,7 @@ export function set_text(text, value) {
if (str !== (text.__t ??= text.nodeValue)) {
// @ts-expect-error
text.__t = str;
text.nodeValue = str == null ? '' : str + '';
text.nodeValue = str + '';
}
}

@ -34,9 +34,7 @@ import {
} from './dom/task.js';
import { internal_set } from './reactivity/sources.js';
import {
destroy_derived,
destroy_derived_effects,
execute_derived,
from_async_derived,
recent_async_deriveds,
update_derived
@ -957,15 +955,6 @@ export function get(signal) {
var flags = signal.f;
var is_derived = (flags & DERIVED) !== 0;
// If the derived is destroyed, just execute it again without retaining
// its memoisation properties as the derived is stale
if (is_derived && (flags & DESTROYED) !== 0) {
var value = execute_derived(/** @type {Derived} */ (signal));
// Ensure the derived remains destroyed
destroy_derived(/** @type {Derived} */ (signal));
return value;
}
if (captured_signals !== null) {
captured_signals.add(signal);
}

@ -4,5 +4,5 @@
* The current version, as set in package.json.
* @type {string}
*/
export const VERSION = '5.19.6';
export const VERSION = '5.19.7';
export const PUBLIC_VERSION = '5';

@ -5,15 +5,15 @@ export default test({
{
code: 'css_unused_selector',
end: {
character: 496,
character: 627,
column: 10,
line: 26
line: 32
},
message: 'Unused CSS selector ".x + .bar"',
start: {
character: 487,
character: 618,
column: 1,
line: 26
line: 32
}
}
]

@ -9,5 +9,8 @@
.x.svelte-xyz ~ .foo:where(.svelte-xyz) span:where(.svelte-xyz) { color: green; }
.x.svelte-xyz ~ .bar:where(.svelte-xyz) { color: green; }
.z.svelte-xyz + .z:where(.svelte-xyz) { color: green; }
.z.svelte-xyz ~ .z:where(.svelte-xyz) { color: green; }
/* no match */
/* (unused) .x + .bar { color: green; }*/

@ -10,6 +10,9 @@
</p>
<p class="bar">bar</p>
</div>
{#each [1]}
<svelte:element class="z" this={tag}></svelte:element>
{/each}
<style>
.before + .foo { color: green; }
@ -22,6 +25,9 @@
.x ~ .foo span { color: green; }
.x ~ .bar { color: green; }
.z + .z { color: green; }
.z ~ .z { color: green; }
/* no match */
.x + .bar { color: green; }
</style>

Loading…
Cancel
Save