@mantine/emotion 8.3.13 → 9.0.0-alpha.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.
|
@@ -7,7 +7,7 @@ var react$1 = require('@emotion/react');
|
|
|
7
7
|
|
|
8
8
|
const EmotionCacheContext = react.createContext(null);
|
|
9
9
|
function useEmotionCache() {
|
|
10
|
-
const cache = react.
|
|
10
|
+
const cache = react.use(EmotionCacheContext);
|
|
11
11
|
if (cache === null) {
|
|
12
12
|
throw new Error(
|
|
13
13
|
"Emotion cache is not available in context, make sure that you have MantineEmotionProvider in the component tree"
|
|
@@ -16,7 +16,7 @@ function useEmotionCache() {
|
|
|
16
16
|
return cache;
|
|
17
17
|
}
|
|
18
18
|
const MantineEmotionProvider = react$1.withEmotionCache(
|
|
19
|
-
({ children, cache }, ctx) => /* @__PURE__ */ jsxRuntime.jsx(EmotionCacheContext
|
|
19
|
+
({ children, cache }, ctx) => /* @__PURE__ */ jsxRuntime.jsx(EmotionCacheContext, { value: cache || ctx, children })
|
|
20
20
|
);
|
|
21
21
|
|
|
22
22
|
exports.EmotionCacheContext = EmotionCacheContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MantineEmotionProvider.cjs","sources":["../src/MantineEmotionProvider.tsx"],"sourcesContent":["import { createContext,
|
|
1
|
+
{"version":3,"file":"MantineEmotionProvider.cjs","sources":["../src/MantineEmotionProvider.tsx"],"sourcesContent":["import { createContext, use } from 'react';\nimport { EmotionCache, withEmotionCache } from '@emotion/react';\n\nexport const EmotionCacheContext = createContext<EmotionCache | null>(null);\n\nexport function useEmotionCache() {\n const cache = use(EmotionCacheContext);\n\n if (cache === null) {\n throw new Error(\n 'Emotion cache is not available in context, make sure that you have MantineEmotionProvider in the component tree'\n );\n }\n\n return cache;\n}\n\ninterface EmotionCacheProviderProps {\n children: React.ReactNode;\n cache?: EmotionCache;\n}\n\nexport const MantineEmotionProvider = withEmotionCache<EmotionCacheProviderProps>(\n ({ children, cache }, ctx) => (\n <EmotionCacheContext value={cache || ctx}>{children}</EmotionCacheContext>\n )\n);\n"],"names":["createContext","use","withEmotionCache","jsx"],"mappings":";;;;;;;AAGO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAsBA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAmC,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA;AAEnE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,eAAA,CAAA,CAAA,CAAkB,CAAA;AAChC,CAAA,CAAA,MAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAI,mBAAmB,CAAA,CAAA;AAErC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,MAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA;AAClB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,IAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACR,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CA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AAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAoB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAA,CAAA,CAAA,CAAA,CAAS,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAA;AAExD,CAAA,CAAA;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { createContext,
|
|
3
|
+
import { createContext, use } from 'react';
|
|
4
4
|
import { withEmotionCache } from '@emotion/react';
|
|
5
5
|
|
|
6
6
|
const EmotionCacheContext = createContext(null);
|
|
7
7
|
function useEmotionCache() {
|
|
8
|
-
const cache =
|
|
8
|
+
const cache = use(EmotionCacheContext);
|
|
9
9
|
if (cache === null) {
|
|
10
10
|
throw new Error(
|
|
11
11
|
"Emotion cache is not available in context, make sure that you have MantineEmotionProvider in the component tree"
|
|
@@ -14,7 +14,7 @@ function useEmotionCache() {
|
|
|
14
14
|
return cache;
|
|
15
15
|
}
|
|
16
16
|
const MantineEmotionProvider = withEmotionCache(
|
|
17
|
-
({ children, cache }, ctx) => /* @__PURE__ */ jsx(EmotionCacheContext
|
|
17
|
+
({ children, cache }, ctx) => /* @__PURE__ */ jsx(EmotionCacheContext, { value: cache || ctx, children })
|
|
18
18
|
);
|
|
19
19
|
|
|
20
20
|
export { EmotionCacheContext, MantineEmotionProvider, useEmotionCache };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MantineEmotionProvider.mjs","sources":["../src/MantineEmotionProvider.tsx"],"sourcesContent":["import { createContext,
|
|
1
|
+
{"version":3,"file":"MantineEmotionProvider.mjs","sources":["../src/MantineEmotionProvider.tsx"],"sourcesContent":["import { createContext, use } from 'react';\nimport { EmotionCache, withEmotionCache } from '@emotion/react';\n\nexport const EmotionCacheContext = createContext<EmotionCache | null>(null);\n\nexport function useEmotionCache() {\n const cache = use(EmotionCacheContext);\n\n if (cache === null) {\n throw new Error(\n 'Emotion cache is not available in context, make sure that you have MantineEmotionProvider in the component tree'\n );\n }\n\n return cache;\n}\n\ninterface EmotionCacheProviderProps {\n children: React.ReactNode;\n cache?: EmotionCache;\n}\n\nexport const MantineEmotionProvider = withEmotionCache<EmotionCacheProviderProps>(\n ({ children, cache }, ctx) => (\n <EmotionCacheContext value={cache || ctx}>{children}</EmotionCacheContext>\n )\n);\n"],"names":[],"mappings":";;;;;AAGO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAmC,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA;AAEnE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,eAAA,CAAA,CAAA,CAAkB,CAAA;AAChC,CAAA,CAAA,MAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,EAAI,mBAAmB,CAAA,CAAA;AAErC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,MAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA;AAClB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,IAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACR,C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AA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACpB,CAAA,CAAA,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAoB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAA,CAAA,CAAA,CAAA,CAAS,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAA;AAExD,CAAA,CAAA;;"}
|
package/lib/types.d.ts
CHANGED
|
@@ -39,5 +39,5 @@ export interface SerializedStyles {
|
|
|
39
39
|
export type InterpolationPrimitive = null | undefined | boolean | number | string | ComponentSelector | Keyframes | SerializedStyles | CSSObject;
|
|
40
40
|
export type CSSInterpolation = InterpolationPrimitive | ArrayCSSInterpolation;
|
|
41
41
|
export interface CSSOthersObject {
|
|
42
|
-
[propertiesName: string]:
|
|
42
|
+
[propertiesName: string]: any;
|
|
43
43
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mantine/emotion",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0-alpha.0",
|
|
4
4
|
"description": "Emotion bindings for Mantine",
|
|
5
5
|
"homepage": "https://mantine.dev/",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,19 +35,20 @@
|
|
|
35
35
|
"@emotion/react": "^11.11.4",
|
|
36
36
|
"@emotion/serialize": "^1.1.4",
|
|
37
37
|
"@emotion/utils": "^1.2.1",
|
|
38
|
-
"@mantine/core": "
|
|
39
|
-
"@mantine/hooks": "
|
|
38
|
+
"@mantine/core": "9.0.0-alpha.0",
|
|
39
|
+
"@mantine/hooks": "9.0.0-alpha.0",
|
|
40
40
|
"react": "^18.x || ^19.x",
|
|
41
41
|
"react-dom": "^18.x || ^19.x"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"
|
|
44
|
+
"csstype": "^3.2.3",
|
|
45
|
+
"html-react-parser": "^5.2.10"
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
47
48
|
"@mantine-tests/core": "workspace:*",
|
|
48
49
|
"@mantine/core": "workspace:*",
|
|
49
50
|
"@mantine/hooks": "workspace:*",
|
|
50
|
-
"react": "19.
|
|
51
|
-
"react-dom": "19.
|
|
51
|
+
"react": "19.2.1",
|
|
52
|
+
"react-dom": "19.2.1"
|
|
52
53
|
}
|
|
53
54
|
}
|