vite-plugin-material-symbols 0.6.0 → 0.7.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
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Version 0
4
4
 
5
+ ### v0.7.0
6
+
7
+ - Supporting Vite 8;
8
+ - Drop Vite 6 and 7 support;
9
+ - Drop Node 20 support.
10
+
5
11
  ### v0.6.0
6
12
 
7
13
  - Supporting Vite 7.
package/README.md CHANGED
@@ -18,8 +18,10 @@ the font downloaded by the user.
18
18
 
19
19
  ## Requirements
20
20
 
21
- - Node.js `^20 || ^22 || ^24`;
22
- - Vite `^6 || ^7`.
21
+ - Node.js `^22 || ^24`;
22
+ - use the plugin version 0.6 for Node 20;
23
+ - Vite `^8`
24
+ - use the plugin version 0.6 for Vite 6 and 7;
23
25
 
24
26
  ## Installation
25
27
 
@@ -34,7 +36,7 @@ Add it to the Vite configuration:
34
36
  ```ts
35
37
  // vite.config.ts
36
38
  import { defineConfig } from "vite";
37
- import react from "@vitejs/plugin-react-swc";
39
+ import react from "@vitejs/plugin-react";
38
40
  import materialSymbols from "vite-plugin-material-symbols";
39
41
 
40
42
  export default defineConfig({
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import e from"esquery";const t=e=>e.type===`Literal`&&`value`in e&&typeof e.value==`string`,n=e=>`https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0&${e}`,r=e=>[`CallExpression[callee.name='jsx'][arguments.0.name='${e}']`,`.arguments`,`Property[key.name='children'] Literal`].join(` > `),i=e=>{if(!e.size)return``;let t=[];for(let n of e.values())t.push(n);return`icon_names=${t.toSorted().join(`,`)}`},a=({component:a=`Icon`,getUrl:o=n,preload:s=!1}={})=>{let c=new Set;return{name:`material-symbols`,enforce:`pre`,moduleParsed:function({id:n,ast:i}){if(!i)return;let o=e.query(i,r(a)).filter(t);for(let{value:e}of o)this.debug({id:n,message:e}),c.add(e)},transformIndexHtml:e=>{let t=o(i(c)),n=[{injectTo:`head`,tag:`link`,attrs:{rel:`stylesheet`,href:t}}];return s&&n.push({injectTo:`head-prepend`,tag:`link`,attrs:{rel:`preload`,as:`style`,href:t}},{injectTo:`head-prepend`,tag:`link`,attrs:{rel:`preconnect`,href:`https://fonts.gstatic.com`}}),{html:e,tags:n}}}};var o=a;export{o as default};
1
+ import e from"esquery";const t=e=>e.type===`Literal`&&`value`in e&&typeof e.value==`string`,n=e=>`https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0&${e}`,r=e=>[`CallExpression[callee.name=/jsx/][arguments.0.name='${e}']`,`.arguments`,`Property[key.name='children'] Literal`].join(` > `),i=e=>{if(!e.size)return``;let t=[];for(let n of e.values())t.push(n);return`icon_names=${t.toSorted().join(`,`)}`},a=({component:a=`Icon`,getUrl:o=n,preload:s=!1}={})=>{let c=new Set;return{name:`material-symbols`,enforce:`pre`,moduleParsed:function({id:n,code:i}){if(!i||!/.([jt])sx?$/i.test(n))return;let o=this.parse(i),s=r(a),l=e.query(o,s).filter(t);for(let{value:e}of l)this.debug({id:n,message:e}),c.add(e)},transformIndexHtml:e=>{let t=o(i(c)),n=[{injectTo:`head`,tag:`link`,attrs:{rel:`stylesheet`,href:t}}];return s&&n.push({injectTo:`head-prepend`,tag:`link`,attrs:{rel:`preload`,as:`style`,href:t}},{injectTo:`head-prepend`,tag:`link`,attrs:{rel:`preconnect`,href:`https://fonts.gstatic.com`}}),{html:e,tags:n}}}};export{a as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-material-symbols",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Selective loading of Material Symbols for production",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -14,7 +14,6 @@
14
14
  "lint": "bun run biome check",
15
15
  "prebuild": "tsc --noEmit",
16
16
  "build": "tsdown",
17
- "postbuild": "attw --pack --profile esm-only",
18
17
  "mdfix": "bunx --bun prettier *.md --write",
19
18
  "version": "bun run tools/version.ts",
20
19
  "prepublishOnly": "bun lint && bun test && bun run build"
@@ -30,28 +29,28 @@
30
29
  "*.md"
31
30
  ],
32
31
  "engines": {
33
- "node": "^20 || ^22 || ^24"
32
+ "node": "^22 || ^24"
34
33
  },
35
34
  "peerDependencies": {
36
- "vite": "^6.0.0 || ^7.0.0"
35
+ "vite": "^8.0.0"
37
36
  },
38
37
  "dependencies": {
39
- "esquery": "^1.6.0"
38
+ "esquery": "^1.7.0"
40
39
  },
41
40
  "devDependencies": {
42
- "@arethetypeswrong/cli": "^0.18.2",
43
- "@biomejs/biome": "2.0.5",
41
+ "@arethetypeswrong/core": "^0.18.2",
42
+ "@biomejs/biome": "2.4.7",
44
43
  "@tsconfig/bun": "^1.0.8",
45
44
  "@types/bun": "^1.2.17",
46
45
  "@types/esquery": "^1.5.4",
47
46
  "@types/react": "^19.1.8",
48
47
  "@types/react-dom": "^19.1.6",
49
48
  "@types/semver": "^7.7.0",
50
- "@vitejs/plugin-react-swc": "^3.10.2",
49
+ "@vitejs/plugin-react": "^6.0.1",
51
50
  "react": "^19.1.0",
52
51
  "react-dom": "^19.1.0",
53
52
  "semver": "^7.7.2",
54
- "tsdown": "^0.12.8",
53
+ "tsdown": "^0.21.2",
55
54
  "typescript": "^5.8.3"
56
55
  },
57
56
  "keywords": [