svelte 4.2.2 → 4.2.3
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.cjs
CHANGED
|
@@ -15558,7 +15558,7 @@ var compiler_warnings = {
|
|
|
15558
15558
|
a11y_click_events_have_key_events: {
|
|
15559
15559
|
code: 'a11y-click-events-have-key-events',
|
|
15560
15560
|
message:
|
|
15561
|
-
'A11y: visible, non-interactive elements with an on:click event must be accompanied by an
|
|
15561
|
+
'A11y: visible, non-interactive elements with an on:click event must be accompanied by a keyboard event handler. Consider whether an interactive element such as <button type="button"> or <a> might be more appropriate. See https://svelte.dev/docs/accessibility-warnings#a11y-click-events-have-key-events for more details.'
|
|
15562
15562
|
},
|
|
15563
15563
|
a11y_missing_content: /** @param {string} name */ (name) => ({
|
|
15564
15564
|
code: 'a11y-missing-content',
|
|
@@ -15707,7 +15707,7 @@ function is_dynamic$1(variable) {
|
|
|
15707
15707
|
return false;
|
|
15708
15708
|
}
|
|
15709
15709
|
|
|
15710
|
-
function nodes_match(a, b, ignoreKeys=[]) {
|
|
15710
|
+
function nodes_match(a, b, ignoreKeys = []) {
|
|
15711
15711
|
if (!!a !== !!b) return false;
|
|
15712
15712
|
if (Array.isArray(a) !== Array.isArray(b)) return false;
|
|
15713
15713
|
|
|
@@ -15717,8 +15717,12 @@ function nodes_match(a, b, ignoreKeys=[]) {
|
|
|
15717
15717
|
return a.every((child, i) => nodes_match(child, b[i]));
|
|
15718
15718
|
}
|
|
15719
15719
|
|
|
15720
|
-
const a_keys = Object.keys(a)
|
|
15721
|
-
|
|
15720
|
+
const a_keys = Object.keys(a)
|
|
15721
|
+
.sort()
|
|
15722
|
+
.filter((key) => !ignoreKeys.includes(key));
|
|
15723
|
+
const b_keys = Object.keys(b)
|
|
15724
|
+
.sort()
|
|
15725
|
+
.filter((key) => !ignoreKeys.includes(key));
|
|
15722
15726
|
|
|
15723
15727
|
if (a_keys.length !== b_keys.length) return false;
|
|
15724
15728
|
|
|
@@ -15789,7 +15793,7 @@ function invalidate(renderer, scope, node, names, main_execution_context = false
|
|
|
15789
15793
|
if (
|
|
15790
15794
|
node.type === 'AssignmentExpression' &&
|
|
15791
15795
|
node.operator === '=' &&
|
|
15792
|
-
nodes_match(node.left, node.right, ['trailingComments','leadingComments']) &&
|
|
15796
|
+
nodes_match(node.left, node.right, ['trailingComments', 'leadingComments']) &&
|
|
15793
15797
|
tail.length === 0
|
|
15794
15798
|
) {
|
|
15795
15799
|
return get_invalidated(head, node);
|
|
@@ -43632,7 +43636,7 @@ function is_used_as_reference(node, parent) {
|
|
|
43632
43636
|
* https://svelte.dev/docs/svelte-compiler#svelte-version
|
|
43633
43637
|
* @type {string}
|
|
43634
43638
|
*/
|
|
43635
|
-
const VERSION = '4.2.
|
|
43639
|
+
const VERSION = '4.2.3';
|
|
43636
43640
|
|
|
43637
43641
|
const regex_leading_directory_separator = /^[/\\]/;
|
|
43638
43642
|
const regex_starts_with_term_export = /^Export/;
|
package/package.json
CHANGED
|
@@ -271,7 +271,7 @@ export default {
|
|
|
271
271
|
a11y_click_events_have_key_events: {
|
|
272
272
|
code: 'a11y-click-events-have-key-events',
|
|
273
273
|
message:
|
|
274
|
-
'A11y: visible, non-interactive elements with an on:click event must be accompanied by an
|
|
274
|
+
'A11y: visible, non-interactive elements with an on:click event must be accompanied by a keyboard event handler. Consider whether an interactive element such as <button type="button"> or <a> might be more appropriate. See https://svelte.dev/docs/accessibility-warnings#a11y-click-events-have-key-events for more details.'
|
|
275
275
|
},
|
|
276
276
|
a11y_missing_content: /** @param {string} name */ (name) => ({
|
|
277
277
|
code: 'a11y-missing-content',
|
|
@@ -50,7 +50,7 @@ export function invalidate(renderer, scope, node, names, main_execution_context
|
|
|
50
50
|
if (
|
|
51
51
|
node.type === 'AssignmentExpression' &&
|
|
52
52
|
node.operator === '=' &&
|
|
53
|
-
nodes_match(node.left, node.right, ['trailingComments','leadingComments']) &&
|
|
53
|
+
nodes_match(node.left, node.right, ['trailingComments', 'leadingComments']) &&
|
|
54
54
|
tail.length === 0
|
|
55
55
|
) {
|
|
56
56
|
return get_invalidated(head, node);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function nodes_match(a, b, ignoreKeys=[]) {
|
|
1
|
+
export function nodes_match(a, b, ignoreKeys = []) {
|
|
2
2
|
if (!!a !== !!b) return false;
|
|
3
3
|
if (Array.isArray(a) !== Array.isArray(b)) return false;
|
|
4
4
|
|
|
@@ -8,8 +8,12 @@ export function nodes_match(a, b, ignoreKeys=[]) {
|
|
|
8
8
|
return a.every((child, i) => nodes_match(child, b[i]));
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
const a_keys = Object.keys(a)
|
|
12
|
-
|
|
11
|
+
const a_keys = Object.keys(a)
|
|
12
|
+
.sort()
|
|
13
|
+
.filter((key) => !ignoreKeys.includes(key));
|
|
14
|
+
const b_keys = Object.keys(b)
|
|
15
|
+
.sort()
|
|
16
|
+
.filter((key) => !ignoreKeys.includes(key));
|
|
13
17
|
|
|
14
18
|
if (a_keys.length !== b_keys.length) return false;
|
|
15
19
|
|
|
@@ -807,6 +807,9 @@ export function claim_html_tag(nodes, is_svg) {
|
|
|
807
807
|
detach(html_tag_nodes[0]);
|
|
808
808
|
detach(html_tag_nodes[html_tag_nodes.length - 1]);
|
|
809
809
|
const claimed_nodes = html_tag_nodes.slice(1, html_tag_nodes.length - 1);
|
|
810
|
+
if (claimed_nodes.length === 0) {
|
|
811
|
+
return new HtmlTagHydration(is_svg);
|
|
812
|
+
}
|
|
810
813
|
for (const n of claimed_nodes) {
|
|
811
814
|
n.claim_order = nodes.claim_info.total_claimed;
|
|
812
815
|
nodes.claim_info.total_claimed += 1;
|
package/src/shared/version.js
CHANGED