@codecademy/gamut-styles 17.7.0 → 17.7.1-alpha.519a2d.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.
@@ -8,6 +8,7 @@ export interface GamutProviderProps {
8
8
  theme: Theme;
9
9
  variables?: Record<string, CSSObject>;
10
10
  cache?: EmotionCache;
11
+ nonce?: string;
11
12
  }
12
13
  export declare const GamutContext: React.Context<{
13
14
  hasGlobals?: boolean | undefined;
@@ -18,7 +18,8 @@ export const GamutProvider = _ref => {
18
18
  theme = coreTheme,
19
19
  variables,
20
20
  useGlobals = true,
21
- useCache = true
21
+ useCache = true,
22
+ nonce
22
23
  } = _ref;
23
24
  const {
24
25
  hasGlobals,
@@ -28,7 +29,9 @@ export const GamutProvider = _ref => {
28
29
  const shouldInsertGlobals = useGlobals && !hasGlobals;
29
30
 
30
31
  // Do not initialize a new cache if one has been provided as props
31
- const activeCache = useRef(shouldCreateCache && (cache ?? createEmotionCache()));
32
+ const activeCache = useRef(shouldCreateCache && (cache ?? createEmotionCache({
33
+ nonce
34
+ })));
32
35
  const contextValue = {
33
36
  hasGlobals: shouldInsertGlobals,
34
37
  hasCache: shouldCreateCache
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@codecademy/gamut-styles",
3
3
  "description": "Styleguide & Component library for codecademy.com",
4
- "version": "17.7.0",
4
+ "version": "17.7.1-alpha.519a2d.0",
5
5
  "author": "Jake Hiller <jake@codecademy.com>",
6
6
  "dependencies": {
7
7
  "@codecademy/variance": "0.23.0",
@@ -34,5 +34,5 @@
34
34
  "scripts": {
35
35
  "build": "nx build @codecademy/gamut-styles"
36
36
  },
37
- "gitHead": "69e39c0d35e0f90db5d72a520af6f97275b12d65"
37
+ "gitHead": "c73e0f1931a27d1e24cd973f65677d5c1a30cc85"
38
38
  }