@skyscanner/backpack-web 42.26.0-dev-v27611615692.1 → 42.26.0-dev-v27664212356.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.
@@ -178,6 +178,12 @@ export const BpkProvider = ({
178
178
  setOwnCache(createBpkEmotionCache(false));
179
179
  // eslint-disable-next-line react-hooks/exhaustive-deps
180
180
  }, []);
181
+
182
+ // NOTE: if externalCache changes from non-null to null at runtime, ownCache
183
+ // will still hold the value it was initialised with (the old external cache).
184
+ // This is intentional: BpkEmotionCacheContext.Provider is expected to be
185
+ // mounted for the lifetime of the app once set — toggling it off is not a
186
+ // supported use case. The state initialiser runs only once per mount.
181
187
  const activeCache = isNested ? externalCache : ownCache;
182
188
  const inner = /*#__PURE__*/_jsx(ChakraProvider, {
183
189
  value: bpkSystem,
@@ -186,9 +192,6 @@ export const BpkProvider = ({
186
192
  children: children
187
193
  })
188
194
  });
189
- if (isNested) {
190
- return inner;
191
- }
192
195
  return /*#__PURE__*/_jsx(BpkEmotionCacheContext.Provider, {
193
196
  value: activeCache,
194
197
  children: /*#__PURE__*/_jsx(CacheProvider, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyscanner/backpack-web",
3
- "version": "42.26.0-dev-v27611615692.1",
3
+ "version": "42.26.0-dev-v27664212356.1",
4
4
  "description": "Backpack Design System web library",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,7 +25,7 @@
25
25
  "@ark-ui/react": "^5.34.1",
26
26
  "@chakra-ui/react": "^3.33.0",
27
27
  "@emotion/cache": "^11.14.0",
28
- "@emotion/react": ">=11",
28
+ "@emotion/react": "^11.14.0",
29
29
  "@floating-ui/react": "^0.26.12",
30
30
  "@radix-ui/react-compose-refs": "^1.1.1",
31
31
  "@radix-ui/react-slider": "1.3.5",