svelte 3.59.0 → 3.59.2

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.mjs CHANGED
@@ -14083,7 +14083,7 @@ var compiler_warnings = {
14083
14083
  }),
14084
14084
  a11y_autocomplete_valid: (type, value) => ({
14085
14085
  code: 'a11y-autocomplete-valid',
14086
- message: `A11y: The value '${value}' is not supported by the attribute 'autocomplete' on element <input type="${type}">`
14086
+ message: `A11y: The value '${value}' is not supported by the attribute 'autocomplete' on element <input type="${type || '...'}">`
14087
14087
  }),
14088
14088
  a11y_img_redundant_alt: {
14089
14089
  code: 'a11y-img-redundant-alt',
@@ -30166,10 +30166,13 @@ const autofill_contact_field_name_tokens = new Set([
30166
30166
  'email',
30167
30167
  'impp'
30168
30168
  ]);
30169
- function is_valid_autocomplete(type, autocomplete) {
30170
- if (typeof autocomplete !== 'string' || typeof type !== 'string') {
30169
+ function is_valid_autocomplete(autocomplete) {
30170
+ if (autocomplete === true) {
30171
30171
  return false;
30172
30172
  }
30173
+ else if (!autocomplete) {
30174
+ return true; // dynamic value
30175
+ }
30173
30176
  const tokens = autocomplete.trim().toLowerCase().split(regex_whitespaces);
30174
30177
  if (typeof tokens[0] === 'string' && tokens[0].startsWith('section-')) {
30175
30178
  tokens.shift();
@@ -30897,7 +30900,7 @@ class Element extends Node$1 {
30897
30900
  if (type && autocomplete) {
30898
30901
  const type_value = type.get_static_value();
30899
30902
  const autocomplete_value = autocomplete.get_static_value();
30900
- if (!is_valid_autocomplete(type_value, autocomplete_value)) {
30903
+ if (!is_valid_autocomplete(autocomplete_value)) {
30901
30904
  component.warn(autocomplete, compiler_warnings.a11y_autocomplete_valid(type_value, autocomplete_value));
30902
30905
  }
30903
30906
  }
@@ -38840,7 +38843,7 @@ function Element$1 (node, renderer, options) {
38840
38843
  }
38841
38844
  else if (binding.name === 'value' && node.name === 'textarea') {
38842
38845
  const snippet = expression.node;
38843
- node_contents = x `${snippet} || ""`;
38846
+ node_contents = x `@escape(${snippet} || "")`;
38844
38847
  }
38845
38848
  else if (binding.name === 'value' && node.name === 'select') ;
38846
38849
  else {
@@ -42790,7 +42793,7 @@ class Component {
42790
42793
  if (result) {
42791
42794
  const { compile_options, name } = this;
42792
42795
  const { format = 'esm' } = compile_options;
42793
- const banner = `${this.file ? `${this.file} ` : ''}generated by Svelte v${'3.59.0'}`;
42796
+ const banner = `${this.file ? `${this.file} ` : ''}generated by Svelte v${'3.59.2'}`;
42794
42797
  const program = { type: 'Program', body: result.js };
42795
42798
  walk(program, {
42796
42799
  enter: (node, parent, key) => {
@@ -44365,7 +44368,7 @@ async function preprocess(source, preprocessor, options) {
44365
44368
  return result.to_processed();
44366
44369
  }
44367
44370
 
44368
- const VERSION = '3.59.0';
44371
+ const VERSION = '3.59.2';
44369
44372
  // additional exports added through generate-type-definitions.js
44370
44373
 
44371
44374
  export { VERSION, compile, parse$b as parse, preprocess, walk };