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/compiler.mjs CHANGED
@@ -20171,7 +20171,7 @@ class Let extends Node$1 {
20171
20171
  }
20172
20172
 
20173
20173
  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)$/;
20174
- 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(' ');
20174
+ 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(' ');
20175
20175
  const aria_attribute_set = new Set(aria_attributes);
20176
20176
  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(' ');
20177
20177
  const aria_role_set = new Set(aria_roles);
@@ -23435,6 +23435,7 @@ class ElementWrapper extends Wrapper {
23435
23435
  node.classes.length > 0 ||
23436
23436
  node.intro || node.outro ||
23437
23437
  node.handlers.length > 0 ||
23438
+ node.styles.length > 0 ||
23438
23439
  this.node.name === 'option' ||
23439
23440
  renderer.options.dev) {
23440
23441
  this.parent.cannot_use_innerhtml(); // need to use add_location
@@ -30176,6 +30177,10 @@ class Declaration$1 {
30176
30177
  const first = this.node.value.children
30177
30178
  ? this.node.value.children[0]
30178
30179
  : this.node.value;
30180
+ // Don't minify whitespace in custom properties, since some browsers (Chromium < 99)
30181
+ // treat --foo: ; and --foo:; differently
30182
+ if (first.type === 'Raw' && /^\s+$/.test(first.value))
30183
+ return;
30179
30184
  let start = first.start;
30180
30185
  while (/\s/.test(code.original[start]))
30181
30186
  start += 1;
@@ -30666,7 +30671,7 @@ class Component {
30666
30671
  if (result) {
30667
30672
  const { compile_options, name } = this;
30668
30673
  const { format = 'esm' } = compile_options;
30669
- const banner = `${this.file ? `${this.file} ` : ''}generated by Svelte v${'3.46.4'}`;
30674
+ const banner = `${this.file ? `${this.file} ` : ''}generated by Svelte v${'3.46.5'}`;
30670
30675
  const program = { type: 'Program', body: result.js };
30671
30676
  walk(program, {
30672
30677
  enter: (node, parent, key) => {
@@ -30877,7 +30882,7 @@ class Component {
30877
30882
  extract_names(declarator.id).forEach(name => {
30878
30883
  const variable = this.var_lookup.get(name);
30879
30884
  variable.export_name = name;
30880
- if (variable.writable && !(variable.referenced || variable.referenced_from_script || variable.subscribable)) {
30885
+ if (!module_script && variable.writable && !(variable.referenced || variable.referenced_from_script || variable.subscribable)) {
30881
30886
  this.warn(declarator, compiler_warnings.unused_export_let(this.name.name, name));
30882
30887
  }
30883
30888
  });
@@ -30895,7 +30900,7 @@ class Component {
30895
30900
  const variable = this.var_lookup.get(specifier.local.name);
30896
30901
  if (variable) {
30897
30902
  variable.export_name = specifier.exported.name;
30898
- if (variable.writable && !(variable.referenced || variable.referenced_from_script || variable.subscribable)) {
30903
+ if (!module_script && variable.writable && !(variable.referenced || variable.referenced_from_script || variable.subscribable)) {
30899
30904
  this.warn(specifier, compiler_warnings.unused_export_let(this.name.name, specifier.exported.name));
30900
30905
  }
30901
30906
  }
@@ -32159,7 +32164,7 @@ async function preprocess(source, preprocessor, options) {
32159
32164
  return result.to_processed();
32160
32165
  }
32161
32166
 
32162
- const VERSION = '3.46.4';
32167
+ const VERSION = '3.46.5';
32163
32168
 
32164
32169
  export { VERSION, compile, parse$3 as parse, preprocess, walk };
32165
32170
  //# sourceMappingURL=compiler.mjs.map