svelte 3.46.4 → 3.46.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Svelte changelog
2
2
 
3
+ ## 3.46.5
4
+
5
+ * Add TypeScript interfaces for typing actions ([#6538](https://github.com/sveltejs/svelte/issues/6538))
6
+ * Do not generate `unused-export-let` warning inside `<script context="module">` blocks ([#7055](https://github.com/sveltejs/svelte/issues/7055))
7
+ * Do not collapse whitespace-only CSS vars ([#7152](https://github.com/sveltejs/svelte/issues/7152))
8
+ * Add `aria-description` to the list of allowed ARIA attributes ([#7301](https://github.com/sveltejs/svelte/issues/7301))
9
+ * Fix attribute escaping during SSR ([#7327](https://github.com/sveltejs/svelte/issues/7327))
10
+ * Prevent `.innerHTML` optimization from being used when `style:` directive is present ([#7386](https://github.com/sveltejs/svelte/issues/7386))
11
+
3
12
  ## 3.46.4
4
13
 
5
14
  * Avoid `maximum call stack size exceeded` errors on large components ([#4694](https://github.com/sveltejs/svelte/issues/4694))
package/compiler.js CHANGED
@@ -20177,7 +20177,7 @@
20177
20177
  }
20178
20178
 
20179
20179
  const svg$1 = /^(?:altGlyph|altGlyphDef|altGlyphItem|animate|animateColor|animateMotion|animateTransform|circle|clipPath|color-profile|cursor|defs|desc|discard|ellipse|feBlend|feColorMatrix|feComponentTransfer|feComposite|feConvolveMatrix|feDiffuseLighting|feDisplacementMap|feDistantLight|feDropShadow|feFlood|feFuncA|feFuncB|feFuncG|feFuncR|feGaussianBlur|feImage|feMerge|feMergeNode|feMorphology|feOffset|fePointLight|feSpecularLighting|feSpotLight|feTile|feTurbulence|filter|font|font-face|font-face-format|font-face-name|font-face-src|font-face-uri|foreignObject|g|glyph|glyphRef|hatch|hatchpath|hkern|image|line|linearGradient|marker|mask|mesh|meshgradient|meshpatch|meshrow|metadata|missing-glyph|mpath|path|pattern|polygon|polyline|radialGradient|rect|set|solidcolor|stop|svg|switch|symbol|text|textPath|tref|tspan|unknown|use|view|vkern)$/;
20180
- const aria_attributes = 'activedescendant atomic autocomplete busy checked colcount colindex colspan controls current describedby details disabled dropeffect errormessage expanded flowto grabbed haspopup hidden invalid keyshortcuts label labelledby level live modal multiline multiselectable orientation owns placeholder posinset pressed readonly relevant required roledescription rowcount rowindex rowspan selected setsize sort valuemax valuemin valuenow valuetext'.split(' ');
20180
+ const aria_attributes = 'activedescendant atomic autocomplete busy checked colcount colindex colspan controls current describedby description details disabled dropeffect errormessage expanded flowto grabbed haspopup hidden invalid keyshortcuts label labelledby level live modal multiline multiselectable orientation owns placeholder posinset pressed readonly relevant required roledescription rowcount rowindex rowspan selected setsize sort valuemax valuemin valuenow valuetext'.split(' ');
20181
20181
  const aria_attribute_set = new Set(aria_attributes);
20182
20182
  const aria_roles = 'alert alertdialog application article banner blockquote button caption cell checkbox code columnheader combobox complementary contentinfo definition deletion dialog directory document emphasis feed figure form generic graphics-document graphics-object graphics-symbol grid gridcell group heading img link list listbox listitem log main marquee math meter menu menubar menuitem menuitemcheckbox menuitemradio navigation none note option paragraph presentation progressbar radio radiogroup region row rowgroup rowheader scrollbar search searchbox separator slider spinbutton status strong subscript superscript switch tab table tablist tabpanel term textbox time timer toolbar tooltip tree treegrid treeitem'.split(' ');
20183
20183
  const aria_role_set = new Set(aria_roles);
@@ -23441,6 +23441,7 @@
23441
23441
  node.classes.length > 0 ||
23442
23442
  node.intro || node.outro ||
23443
23443
  node.handlers.length > 0 ||
23444
+ node.styles.length > 0 ||
23444
23445
  this.node.name === 'option' ||
23445
23446
  renderer.options.dev) {
23446
23447
  this.parent.cannot_use_innerhtml(); // need to use add_location
@@ -30182,6 +30183,10 @@
30182
30183
  const first = this.node.value.children
30183
30184
  ? this.node.value.children[0]
30184
30185
  : this.node.value;
30186
+ // Don't minify whitespace in custom properties, since some browsers (Chromium < 99)
30187
+ // treat --foo: ; and --foo:; differently
30188
+ if (first.type === 'Raw' && /^\s+$/.test(first.value))
30189
+ return;
30185
30190
  let start = first.start;
30186
30191
  while (/\s/.test(code.original[start]))
30187
30192
  start += 1;
@@ -30672,7 +30677,7 @@
30672
30677
  if (result) {
30673
30678
  const { compile_options, name } = this;
30674
30679
  const { format = 'esm' } = compile_options;
30675
- const banner = `${this.file ? `${this.file} ` : ''}generated by Svelte v${'3.46.4'}`;
30680
+ const banner = `${this.file ? `${this.file} ` : ''}generated by Svelte v${'3.46.5'}`;
30676
30681
  const program = { type: 'Program', body: result.js };
30677
30682
  walk(program, {
30678
30683
  enter: (node, parent, key) => {
@@ -30883,7 +30888,7 @@
30883
30888
  extract_names(declarator.id).forEach(name => {
30884
30889
  const variable = this.var_lookup.get(name);
30885
30890
  variable.export_name = name;
30886
- if (variable.writable && !(variable.referenced || variable.referenced_from_script || variable.subscribable)) {
30891
+ if (!module_script && variable.writable && !(variable.referenced || variable.referenced_from_script || variable.subscribable)) {
30887
30892
  this.warn(declarator, compiler_warnings.unused_export_let(this.name.name, name));
30888
30893
  }
30889
30894
  });
@@ -30901,7 +30906,7 @@
30901
30906
  const variable = this.var_lookup.get(specifier.local.name);
30902
30907
  if (variable) {
30903
30908
  variable.export_name = specifier.exported.name;
30904
- if (variable.writable && !(variable.referenced || variable.referenced_from_script || variable.subscribable)) {
30909
+ if (!module_script && variable.writable && !(variable.referenced || variable.referenced_from_script || variable.subscribable)) {
30905
30910
  this.warn(specifier, compiler_warnings.unused_export_let(this.name.name, specifier.exported.name));
30906
30911
  }
30907
30912
  }
@@ -32165,7 +32170,7 @@
32165
32170
  return result.to_processed();
32166
32171
  }
32167
32172
 
32168
- const VERSION = '3.46.4';
32173
+ const VERSION = '3.46.5';
32169
32174
 
32170
32175
  exports.VERSION = VERSION;
32171
32176
  exports.compile = compile;