@muraldevkit/ds-pictograms 2.3.1 → 2.4.0-dev-LLUt.1
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/README.md +16 -0
- package/package.json +16 -1
package/README.md
CHANGED
|
@@ -17,6 +17,22 @@ Review the Design System's global usage guidelines to learn how to install compo
|
|
|
17
17
|
|
|
18
18
|
After you have installed the package into your project, you can import the pictograms you need into your file and use the `@muraldevkit/ds-component-svg` package to render the SVG HTML.
|
|
19
19
|
|
|
20
|
+
This package is side-effect-free, so if you have tree shaking properly configured your bundler will include only the pictograms you actually import.
|
|
21
|
+
|
|
22
|
+
### Deep imports
|
|
23
|
+
|
|
24
|
+
Alternatively, you can import a single pictogram directly by its module name. This lets your bundler include only the pictograms you use, regardless of tree-shaking configuration:
|
|
25
|
+
|
|
26
|
+
```javascript
|
|
27
|
+
// ESM
|
|
28
|
+
import { brandWordmark } from '@muraldevkit/ds-pictograms/brandWordmark';
|
|
29
|
+
|
|
30
|
+
// CommonJS
|
|
31
|
+
const { brandWordmark } = require('@muraldevkit/ds-pictograms/brandWordmark');
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The subpath matches the built module name (camelCase), e.g. `voteAnonymous`, `brandWordmark` — not the kebab-case SVG file name.
|
|
35
|
+
|
|
20
36
|
## Available SVGs file
|
|
21
37
|
|
|
22
38
|
A file will be available at `@muraldevkit/ds-pictograms/dist/availableSvgs/index.js`. It can be used to check if an icon exists by a given name. A type definition is included at `@muraldevkit/ds-pictograms/dist/availableSvgs/index.d.ts`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@muraldevkit/ds-pictograms",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0-dev-LLUt.1",
|
|
4
4
|
"description": "Mural's design system's pictogram library",
|
|
5
5
|
"license": "https://www.mural.co/terms/developer-addendum",
|
|
6
6
|
"files": [
|
|
@@ -12,6 +12,21 @@
|
|
|
12
12
|
"types": "./dist/types/index.d.ts",
|
|
13
13
|
"main": "./dist/cjs/index.js",
|
|
14
14
|
"module": "./dist/esm/index.js",
|
|
15
|
+
"sideEffects": false,
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/types/index.d.ts",
|
|
19
|
+
"import": "./dist/esm/index.js",
|
|
20
|
+
"require": "./dist/cjs/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./package.json": "./package.json",
|
|
23
|
+
"./dist/*": "./dist/*",
|
|
24
|
+
"./*": {
|
|
25
|
+
"types": "./dist/esm/*.d.ts",
|
|
26
|
+
"import": "./dist/esm/*.js",
|
|
27
|
+
"require": "./dist/cjs/*.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
15
30
|
"scripts": {
|
|
16
31
|
"build": "npm run clean && npm run build:pictograms",
|
|
17
32
|
"build:pictograms": "node ./lib/index.js",
|