emoji-picker-react 4.19.0 → 4.19.3
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 +15 -2
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -105,6 +105,7 @@ The following is a complete list of all props accepted by `EmojiPicker`.
|
|
|
105
105
|
| `previewConfig` | `PreviewConfig` | `{ showPreview: true }` | Configuration for the bottom preview bar. |
|
|
106
106
|
| `getEmojiUrl` | `(unified: string, style: EmojiStyle) => string` | - | Function to override the default CDN URL for emoji images. |
|
|
107
107
|
| `categoryIcons` | `CategoryIcons` | `{}` | Map `Categories` enum values to custom React nodes for navigation icons. |
|
|
108
|
+
| `nonce` | `string` | `undefined` | Content Security Policy (CSP) nonce for the inline style tag. |
|
|
108
109
|
|
|
109
110
|
### ❤️ Reactions Picker Mode
|
|
110
111
|
|
|
@@ -141,6 +142,14 @@ When passing `customEmojis`, use this format:
|
|
|
141
142
|
|
|
142
143
|
```
|
|
143
144
|
|
|
145
|
+
### Content Security Policy (CSP)
|
|
146
|
+
|
|
147
|
+
If your site has a CSP that blocks inline styles, you can pass a `nonce` to the `EmojiPicker` component. This nonce will be applied to the inline `<style>` tag.
|
|
148
|
+
|
|
149
|
+
```jsx
|
|
150
|
+
<EmojiPicker nonce="your-nonce-value" />
|
|
151
|
+
```
|
|
152
|
+
|
|
144
153
|
### Preview Config
|
|
145
154
|
|
|
146
155
|
Control the footer preview area using `previewConfig`:
|
|
@@ -273,11 +282,15 @@ If you encounter `global is not defined`, add this to your HTML:
|
|
|
273
282
|
|
|
274
283
|
---
|
|
275
284
|
|
|
285
|
+
## More from the maintainer
|
|
286
|
+
|
|
287
|
+
Building complex forms? Check out [**Vest**](https://vestjs.dev) — a validation framework for stateful, async, and dependent validation.
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
276
291
|
## 🤝 Contributing
|
|
277
292
|
|
|
278
293
|
We welcome contributions! Please check out the [Contributing Guide](https://github.com/ealush/emoji-picker-react/blob/master/CONTRIBUTING.md) for how to run the project locally.
|
|
279
294
|
|
|
280
295
|
**Shout Outs:**
|
|
281
296
|
Design inspiration by [Pavel Bolo](https://pavelbolo.com).
|
|
282
|
-
|
|
283
|
-
_If you enjoy using `emoji-picker-react`, check out [Vest validation framework](https://vestjs.dev)._
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "4.19.
|
|
2
|
+
"version": "4.19.3",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
@@ -27,19 +27,19 @@
|
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
29
|
"start": "tsdx watch",
|
|
30
|
-
"build": "
|
|
30
|
+
"build": "npm run build:data:src && npm run type-check && tsdx build --transpileOnly && npm run build:data:dist",
|
|
31
31
|
"type-check": "tsc --noEmit --incremental --pretty --project tsconfig.json",
|
|
32
32
|
"test": "vitest run",
|
|
33
33
|
"test:watch": "vitest",
|
|
34
34
|
"test:visual": "playwright test",
|
|
35
35
|
"lint": "eslint ./src --ext .ts,.tsx",
|
|
36
|
-
"prepare": "
|
|
36
|
+
"prepare": "npm run build",
|
|
37
37
|
"size": "size-limit",
|
|
38
38
|
"analyze": "size-limit --why",
|
|
39
39
|
"build:data:src": "tsc --project ./scripts/tsconfig.build.json && node ./scripts/dist/prepare.js",
|
|
40
40
|
"build:data:dist": "tsc --project tsconfig.data.json && node ./scripts/copyData.js",
|
|
41
|
-
"build:data": "
|
|
42
|
-
"storybook": "
|
|
41
|
+
"build:data": "npm run build:data:src && npm run build:data:dist",
|
|
42
|
+
"storybook": "npm run build:data && storybook dev -p 6006",
|
|
43
43
|
"build-storybook": "storybook build"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"husky": {
|
|
49
49
|
"hooks": {
|
|
50
|
-
"pre-commit": "
|
|
50
|
+
"pre-commit": "npm run lint"
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
"prettier": {
|