svelte 5.45.4 → 5.45.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compiler/index.js +1 -1
- package/elements.d.ts +1 -0
- package/package.json +1 -1
- package/src/compiler/phases/2-analyze/visitors/shared/a11y/index.js +8 -0
- package/src/internal/client/constants.js +1 -0
- package/src/internal/client/dev/inspect.js +0 -2
- package/src/internal/client/dom/blocks/css-props.js +2 -3
- package/src/internal/client/dom/blocks/each.js +212 -202
- package/src/internal/client/dom/blocks/html.js +4 -2
- package/src/internal/client/dom/blocks/svelte-element.js +3 -3
- package/src/internal/client/dom/blocks/svelte-head.js +2 -2
- package/src/internal/client/dom/hydration.js +2 -2
- package/src/internal/client/dom/operations.js +10 -13
- package/src/internal/client/dom/template.js +3 -3
- package/src/internal/client/reactivity/effects.js +5 -11
- package/src/internal/client/render.js +3 -2
- package/src/version.js +1 -1
- package/types/index.d.ts.map +1 -1
package/elements.d.ts
CHANGED
|
@@ -1239,6 +1239,7 @@ export interface HTMLMediaAttributes<T extends HTMLMediaElement> extends HTMLAtt
|
|
|
1239
1239
|
playsinline?: boolean | undefined | null;
|
|
1240
1240
|
preload?: 'auto' | 'none' | 'metadata' | '' | undefined | null;
|
|
1241
1241
|
src?: string | undefined | null;
|
|
1242
|
+
srcobject?: MediaStream | MediaSource | File | Blob;
|
|
1242
1243
|
/**
|
|
1243
1244
|
* a value between 0 and 1
|
|
1244
1245
|
*/
|
package/package.json
CHANGED
|
@@ -486,9 +486,17 @@ export function check_element(node, context) {
|
|
|
486
486
|
case 'video': {
|
|
487
487
|
const aria_hidden_attribute = attribute_map.get('aria-hidden');
|
|
488
488
|
const aria_hidden_exist = aria_hidden_attribute && get_static_value(aria_hidden_attribute);
|
|
489
|
+
|
|
489
490
|
if (attribute_map.has('muted') || aria_hidden_exist === 'true' || has_spread) {
|
|
490
491
|
return;
|
|
491
492
|
}
|
|
493
|
+
|
|
494
|
+
if (!attribute_map.has('src')) {
|
|
495
|
+
// don't warn about missing captions if `<video>` has no `src` —
|
|
496
|
+
// could e.g. be playing a MediaStream
|
|
497
|
+
return;
|
|
498
|
+
}
|
|
499
|
+
|
|
492
500
|
let has_caption = false;
|
|
493
501
|
const track = /** @type {AST.RegularElement | undefined} */ (
|
|
494
502
|
node.fragment.nodes.find((i) => i.type === 'RegularElement' && i.name === 'track')
|
|
@@ -34,8 +34,6 @@ export function inspect(get_value, inspector, show_stack = false) {
|
|
|
34
34
|
|
|
35
35
|
if (!initial) {
|
|
36
36
|
const stack = get_error('$inspect(...)');
|
|
37
|
-
// eslint-disable-next-line no-console
|
|
38
|
-
|
|
39
37
|
if (stack) {
|
|
40
38
|
// eslint-disable-next-line no-console
|
|
41
39
|
console.groupCollapsed('stack trace');
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { render_effect, teardown } from '../../reactivity/effects.js';
|
|
1
|
+
import { render_effect } from '../../reactivity/effects.js';
|
|
3
2
|
import { hydrating, set_hydrate_node } from '../hydration.js';
|
|
4
3
|
import { get_first_child } from '../operations.js';
|
|
5
4
|
|
|
@@ -10,7 +9,7 @@ import { get_first_child } from '../operations.js';
|
|
|
10
9
|
*/
|
|
11
10
|
export function css_props(element, get_styles) {
|
|
12
11
|
if (hydrating) {
|
|
13
|
-
set_hydrate_node(
|
|
12
|
+
set_hydrate_node(get_first_child(element));
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
render_effect(() => {
|