@r2digisolutions/components 0.21.25 → 0.21.26

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.
@@ -97,7 +97,16 @@
97
97
  return rules.some((rule) => {
98
98
  if (rule.startsWith('.')) return name.endsWith(rule);
99
99
  if (rule.endsWith('/*')) return type.startsWith(rule.slice(0, -1));
100
- return type === rule || name.endsWith(`.${rule}`);
100
+ if (type && type === rule) return true;
101
+ // image/png → also match *.png when browser leaves type empty
102
+ const slash = rule.lastIndexOf('/');
103
+ if (slash > 0) {
104
+ const subtype = rule.slice(slash + 1);
105
+ if (subtype && subtype !== '*' && name.endsWith(`.${subtype}`)) return true;
106
+ if (subtype === 'jpeg' && name.endsWith('.jpg')) return true;
107
+ if (subtype === 'svg+xml' && name.endsWith('.svg')) return true;
108
+ }
109
+ return false;
101
110
  });
102
111
  }
103
112
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@r2digisolutions/components",
3
- "version": "0.21.25",
3
+ "version": "0.21.26",
4
4
  "private": false,
5
5
  "description": "R2DigiSolutions Svelte 5 component library — Atomic Design, Tailwind 4, Light/Dark mode",
6
6
  "license": "MIT",