@commercetools-demo/puck-theme-manager 0.6.0 → 0.6.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/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -3
package/dist/index.mjs
CHANGED
|
@@ -45,12 +45,28 @@ var DEFAULT_THEME = {
|
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
// src/EnsureNimbusProvider.tsx
|
|
48
|
-
import {
|
|
48
|
+
import { ChakraProvider, createSystem } from "@chakra-ui/react/styled-system";
|
|
49
|
+
import {
|
|
50
|
+
NimbusI18nProvider,
|
|
51
|
+
_RegionProvider,
|
|
52
|
+
system as nimbusSystem
|
|
53
|
+
} from "@commercetools/nimbus";
|
|
49
54
|
import { jsx } from "react/jsx-runtime";
|
|
55
|
+
var SCOPED_SYSTEM_KEY = /* @__PURE__ */ Symbol.for(
|
|
56
|
+
"@commercetools-demo/puck:nimbus-scoped-system"
|
|
57
|
+
);
|
|
58
|
+
var globalScope = globalThis;
|
|
59
|
+
var scopedSystem = globalScope[SCOPED_SYSTEM_KEY] ?? (globalScope[SCOPED_SYSTEM_KEY] = createSystem({
|
|
60
|
+
// `_config` is the fully-merged Nimbus + Chakra config used to build the
|
|
61
|
+
// stock system; reusing it keeps all Nimbus theming intact.
|
|
62
|
+
...nimbusSystem._config,
|
|
63
|
+
preflight: false,
|
|
64
|
+
globalCss: {}
|
|
65
|
+
}));
|
|
50
66
|
var EnsureNimbusProvider = ({
|
|
51
67
|
locale = "en",
|
|
52
68
|
children
|
|
53
|
-
}) => /* @__PURE__ */ jsx(
|
|
69
|
+
}) => /* @__PURE__ */ jsx(ChakraProvider, { value: scopedSystem, children: /* @__PURE__ */ jsx(NimbusI18nProvider, { locale, children: /* @__PURE__ */ jsx(_RegionProvider, { children }) }) });
|
|
54
70
|
|
|
55
71
|
// src/components/theme-preset-selector.tsx
|
|
56
72
|
import { useState } from "react";
|