@stnd/icon 0.3.1 → 0.4.0

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,11 @@
1
1
  # @stnd/icon
2
2
 
3
+ ## 0.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Auto-bumped @stnd/icon due to modified code.
8
+
3
9
  ## 0.3.1
4
10
 
5
11
  ### Patch Changes
package/Icon.svelte CHANGED
@@ -55,6 +55,15 @@
55
55
  })
56
56
  .then((text) => {
57
57
  if (!isCancelled) {
58
+ // An app with an SPA fallback answers a missing icon with its own
59
+ // index.html and a 200, so `res.ok` proves nothing. Injecting that
60
+ // page via {@html} drops its <link rel="stylesheet"> into the
61
+ // document — a second copy of the app CSS, last in tree order, that
62
+ // re-asserts the framework defaults over the active theme for as
63
+ // long as the icon is mounted (Reveal's photo menu, 2026-09-30).
64
+ if (!/^\s*(<\?xml[^>]*>\s*)?(<!--[\s\S]*?-->\s*)*<svg[\s>]/i.test(text)) {
65
+ throw new Error(`Not an SVG: ${currentSrc}`);
66
+ }
58
67
  // Ensure SVG scales properly by injecting a viewBox if missing
59
68
  if (!text.includes("viewBox=")) {
60
69
  const widthMatch = text.match(/<svg[^>]*\swidth="([^"]+)"/);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stnd/icon",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./normalize.js",
package/tokens.js CHANGED
@@ -57,7 +57,6 @@ export const tokens = {
57
57
  copy: "ph:copy",
58
58
  plus: "ph:plus",
59
59
  minus: "ph:minus",
60
- check: "ph:check",
61
60
  command: "ph:terminal-window",
62
61
  login: "ph:sign-in",
63
62
  logout: "ph:sign-out",