emoji-picker-react 4.18.0 → 4.19.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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.18.0",
2
+ "version": "4.19.0",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -18,7 +18,7 @@ import { PickerProps } from './index';
18
18
  function EmojiPicker(props: PickerProps) {
19
19
  return (
20
20
  <ElementRefContextProvider>
21
- <PickerStyleTag />
21
+ <PickerStyleTag nonce={props.nonce} />
22
22
  <PickerConfigProvider {...props}>
23
23
  <PickerDataProvider>
24
24
  <ContentControl />
@@ -20,9 +20,14 @@ export const commonStyles = stylesheet.create({
20
20
  },
21
21
  });
22
22
 
23
- export const PickerStyleTag = React.memo(function PickerStyleTag() {
23
+ export const PickerStyleTag = React.memo(function PickerStyleTag({
24
+ nonce,
25
+ }: {
26
+ nonce?: string;
27
+ }) {
24
28
  return (
25
29
  <style
30
+ nonce={nonce}
26
31
  suppressHydrationWarning
27
32
  dangerouslySetInnerHTML={{ __html: stylesheet.getStyle() }}
28
33
  />
@@ -115,6 +115,7 @@ export function basePickerConfig(): PickerConfigInternal {
115
115
  hiddenEmojis: [],
116
116
  emojiData: undefined,
117
117
  categoryIcons: {},
118
+ nonce: undefined,
118
119
  };
119
120
  }
120
121
 
@@ -148,6 +149,7 @@ export type PickerConfigInternal = {
148
149
  hiddenEmojis: string[];
149
150
  emojiData?: EmojiData;
150
151
  categoryIcons: CategoryIcons;
152
+ nonce?: string;
151
153
  };
152
154
 
153
155
  export type PreviewConfig = {