@lumal/icons 0.0.2-beta → 0.0.3-beta

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 ADDED
@@ -0,0 +1,12 @@
1
+ # @lumal/icons
2
+
3
+ ## 0.0.3-beta (2026-10-16)
4
+
5
+ ### Patch Changes
6
+
7
+ - 修复静态本地 SVG 插件代理模块重复解析自身的问题,并增加真实 Vite 构建回归。
8
+ - 与其他 Lumal 公共包同步版本。
9
+
10
+ ## 0.0.2-beta (2026-08-01)
11
+
12
+ - Version bump only, to stay in lockstep with the other @lumal packages.
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  框架无关的 Lumal 图标内核,提供图标注册表、分组、SVG 改色、渐变、校验、合成、Data URI 缓存和 Vite 静态 SVG 插件。
4
4
 
5
+ SVG 输入必须是可信静态资源。注册不自动净化输入,`validateMonochromeSvg` 仅做有限格式检查,不是完整 sanitizer;不要直接注册用户上传或远程不可信 SVG。
6
+
5
7
  ```ts
6
8
  import { recolorSvgString, registerIcons } from '@lumal/icons'
7
9
 
@@ -8,7 +8,7 @@ export interface CreateStaticLocalSvgIconsPluginOptions {
8
8
  interface VitePluginLike {
9
9
  name: string;
10
10
  enforce?: 'pre' | 'post';
11
- resolveId?: (source: string) => string | null | undefined;
11
+ resolveId?: (source: string, importer?: string) => string | null | undefined;
12
12
  load?: (id: string) => string | null | undefined;
13
13
  }
14
14
  /***********************静态 SVG 注入插件*********************/
@@ -1 +1 @@
1
- {"version":3,"file":"static-local-svg-icons.d.ts","sourceRoot":"","sources":["../../../src/vite/static-local-svg-icons.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iCAAiC;IAChD,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,sCAAsC;IACrD,QAAQ,CAAC,EAAE,iCAAiC,GAAG,MAAM,GAAG,KAAK,CAAA;CAC9D;AAED,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACzD,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;CACjD;AAgBD,yDAAyD;AACzD,wBAAgB,+BAA+B,CAC7C,OAAO,GAAE,sCAA2C,GACnD,cAAc,CA+BhB"}
1
+ {"version":3,"file":"static-local-svg-icons.d.ts","sourceRoot":"","sources":["../../../src/vite/static-local-svg-icons.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iCAAiC;IAChD,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,sCAAsC;IACrD,QAAQ,CAAC,EAAE,iCAAiC,GAAG,MAAM,GAAG,KAAK,CAAA;CAC9D;AAED,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IAC5E,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;CACjD;AAgBD,yDAAyD;AACzD,wBAAgB,+BAA+B,CAC7C,OAAO,GAAE,sCAA2C,GACnD,cAAc,CAgChB"}
package/dist/vite.cjs CHANGED
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=`\0@lumal/icons/static-local-svg`,t=`@lumal/icons`;function n(e){if(e)return typeof e==`string`?{import:e}:e}function r(r={}){let i=n(r.localSvg);return{name:`lumal:static-local-svg-icons`,enforce:`pre`,resolveId(n){return!i||n!==t?null:e},load(n){if(!i||n!==e)return null;let r=JSON.stringify(i.import);return[i.exportName?`import { ${i.exportName} as staticLocalSvgIcons } from ${r};`:`import staticLocalSvgIcons from ${r};`,`export * from ${JSON.stringify(t)};`,`import { registerStaticLocalSvgIcons } from "@lumal/icons";`,`registerStaticLocalSvgIcons(Array.isArray(staticLocalSvgIcons) ? staticLocalSvgIcons : []);`].join(`
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=`\0@lumal/icons/static-local-svg`,t=`@lumal/icons`;function n(e){if(e)return typeof e==`string`?{import:e}:e}function r(r={}){let i=n(r.localSvg);return{name:`lumal:static-local-svg-icons`,enforce:`pre`,resolveId(n,r){return!i||n!==t||r===e?null:e},load(n){if(!i||n!==e)return null;let r=JSON.stringify(i.import);return[i.exportName?`import { ${i.exportName} as staticLocalSvgIcons } from ${r};`:`import staticLocalSvgIcons from ${r};`,`export * from ${JSON.stringify(t)};`,`import { registerStaticLocalSvgIcons } from "@lumal/icons";`,`registerStaticLocalSvgIcons(Array.isArray(staticLocalSvgIcons) ? staticLocalSvgIcons : []);`].join(`
2
2
  `)}}}exports.createStaticLocalSvgIconsPlugin=r;
package/dist/vite.js CHANGED
@@ -8,8 +8,8 @@ function r(r = {}) {
8
8
  return {
9
9
  name: "lumal:static-local-svg-icons",
10
10
  enforce: "pre",
11
- resolveId(n) {
12
- return !i || n !== t ? null : e;
11
+ resolveId(n, r) {
12
+ return !i || n !== t || r === e ? null : e;
13
13
  },
14
14
  load(n) {
15
15
  if (!i || n !== e) return null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lumal/icons",
3
3
  "type": "module",
4
- "version": "0.0.2-beta",
4
+ "version": "0.0.3-beta",
5
5
  "description": "Framework-agnostic Lumal icon registry and SVG utilities.",
6
6
  "license": "MIT",
7
7
  "keywords": [
@@ -30,6 +30,7 @@
30
30
  "module": "./dist/index.js",
31
31
  "types": "./dist/src/index.d.ts",
32
32
  "files": [
33
+ "CHANGELOG.md",
33
34
  "README.md",
34
35
  "dist"
35
36
  ],