@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.js
CHANGED
|
@@ -68,12 +68,24 @@ var DEFAULT_THEME = {
|
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
// src/EnsureNimbusProvider.tsx
|
|
71
|
+
var import_styled_system = require("@chakra-ui/react/styled-system");
|
|
71
72
|
var import_nimbus = require("@commercetools/nimbus");
|
|
72
73
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
74
|
+
var SCOPED_SYSTEM_KEY = /* @__PURE__ */ Symbol.for(
|
|
75
|
+
"@commercetools-demo/puck:nimbus-scoped-system"
|
|
76
|
+
);
|
|
77
|
+
var globalScope = globalThis;
|
|
78
|
+
var scopedSystem = globalScope[SCOPED_SYSTEM_KEY] ?? (globalScope[SCOPED_SYSTEM_KEY] = (0, import_styled_system.createSystem)({
|
|
79
|
+
// `_config` is the fully-merged Nimbus + Chakra config used to build the
|
|
80
|
+
// stock system; reusing it keeps all Nimbus theming intact.
|
|
81
|
+
...import_nimbus.system._config,
|
|
82
|
+
preflight: false,
|
|
83
|
+
globalCss: {}
|
|
84
|
+
}));
|
|
73
85
|
var EnsureNimbusProvider = ({
|
|
74
86
|
locale = "en",
|
|
75
87
|
children
|
|
76
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_nimbus.
|
|
88
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled_system.ChakraProvider, { value: scopedSystem, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_nimbus.NimbusI18nProvider, { locale, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_nimbus._RegionProvider, { children }) }) });
|
|
77
89
|
|
|
78
90
|
// src/components/theme-preset-selector.tsx
|
|
79
91
|
var import_react = require("react");
|