react-inlinesvg 4.0.0-0 → 4.0.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.
Files changed (2) hide show
  1. package/README.md +4 -9
  2. package/package.json +6 -4
package/README.md CHANGED
@@ -59,7 +59,8 @@ The fallback content in case of a fetch error or unsupported browser.
59
59
  ```
60
60
 
61
61
  **cacheRequests** {boolean} ▶︎ `true`
62
- Cache remote SVGs.
62
+ Cache remote SVGs.
63
+ Starting in version 4.x, you can also cache the files permanently, read more [below](#caching).
63
64
 
64
65
  **description** {string}
65
66
  A description for your SVG. It will override an existing `<desc>` tag.
@@ -137,14 +138,8 @@ Create unique IDs for each icon.
137
138
 
138
139
  ## Caching
139
140
 
140
- The internal cache is exported as `cacheStore` if you need to debug or pre-cache some files.
141
- Since version 4.x, the `cacheStore` is an instance of the [Cache](src/cache.ts) class instead of a plain object.
142
- ⚠️ Use it at your own risk.
143
-
144
- ### Persistent cache
145
-
146
- Starting with version 4.x, you can use the browser's [cache](https://developer.mozilla.org/en-US/docs/Web/API/Cache) to store the SVGs.
147
- To set it up, you need to wrap your app with the provider:
141
+ You can use the browser's cache to store the SVGs permanently.
142
+ To set it up, wrap your app with the cache provider:
148
143
 
149
144
  ```typescript
150
145
  import { createRoot } from 'react-dom/client';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-inlinesvg",
3
- "version": "4.0.0-0",
3
+ "version": "4.0.0",
4
4
  "description": "An SVG loader for React",
5
5
  "author": "Gil Barbara <gilbarbara@gmail.com>",
6
6
  "contributors": [
@@ -40,7 +40,9 @@
40
40
  ],
41
41
  "typesVersions": {
42
42
  "*": {
43
- "provider": ["dist/provider.d.ts"]
43
+ "provider": [
44
+ "dist/provider.d.ts"
45
+ ]
44
46
  }
45
47
  },
46
48
  "types": "dist/index.d.ts",
@@ -58,7 +60,7 @@
58
60
  "@gilbarbara/prettier-config": "^1.0.0",
59
61
  "@gilbarbara/tsconfig": "^0.1.1",
60
62
  "@size-limit/preset-small-lib": "^8.2.6",
61
- "@swc/core": "^1.3.74",
63
+ "@swc/core": "^1.3.75",
62
64
  "@testing-library/jest-dom": "^5.17.0",
63
65
  "@testing-library/react": "^14.0.0",
64
66
  "@types/exenv": "^1.2.0",
@@ -66,7 +68,7 @@
66
68
  "@types/jest": "^29.5.3",
67
69
  "@types/node": "^20.4.8",
68
70
  "@types/node-fetch": "^2.6.4",
69
- "@types/react": "^18.2.18",
71
+ "@types/react": "^18.2.19",
70
72
  "@types/react-dom": "^18.2.7",
71
73
  "browser-cache-mock": "^0.1.7",
72
74
  "cross-fetch": "^4.0.0",