@mui/material-nextjs 7.0.0-alpha.0 → 7.0.0-alpha.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.
Files changed (73) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/esm/package.json +1 -0
  3. package/esm/v13-appRouter/appRouterV13.d.ts +27 -0
  4. package/{node → esm}/v13-appRouter/appRouterV13.js +13 -20
  5. package/esm/v13-appRouter/index.d.ts +2 -0
  6. package/esm/v13-appRouter/index.js +2 -0
  7. package/esm/v13-pagesRouter/createCache.d.ts +1 -0
  8. package/{node → esm}/v13-pagesRouter/createCache.js +3 -10
  9. package/esm/v13-pagesRouter/index.d.ts +2 -0
  10. package/esm/v13-pagesRouter/index.js +2 -0
  11. package/esm/v13-pagesRouter/nextDocument.cjs +1 -0
  12. package/esm/v13-pagesRouter/nextDocument.d.cts +2 -0
  13. package/esm/v13-pagesRouter/pagesRouterV13App.d.ts +9 -0
  14. package/esm/v13-pagesRouter/pagesRouterV13App.js +14 -0
  15. package/esm/v13-pagesRouter/pagesRouterV13Document.d.ts +23 -0
  16. package/{node → esm}/v13-pagesRouter/pagesRouterV13Document.js +16 -25
  17. package/esm/v14-appRouter/index.d.ts +1 -0
  18. package/esm/v14-appRouter/index.js +1 -0
  19. package/esm/v14-pagesRouter/index.d.ts +1 -0
  20. package/esm/v14-pagesRouter/index.js +1 -0
  21. package/esm/v15-appRouter/index.d.ts +1 -0
  22. package/esm/v15-appRouter/index.js +1 -0
  23. package/esm/v15-pagesRouter/index.d.ts +1 -0
  24. package/esm/v15-pagesRouter/index.js +1 -0
  25. package/modern/package.json +1 -0
  26. package/modern/v13-appRouter/appRouterV13.d.ts +27 -0
  27. package/modern/v13-appRouter/index.d.ts +2 -0
  28. package/modern/v13-pagesRouter/createCache.d.ts +1 -0
  29. package/modern/v13-pagesRouter/index.d.ts +2 -0
  30. package/modern/v13-pagesRouter/nextDocument.cjs +1 -0
  31. package/modern/v13-pagesRouter/pagesRouterV13App.d.ts +9 -0
  32. package/modern/v13-pagesRouter/pagesRouterV13Document.d.ts +23 -0
  33. package/modern/v13-pagesRouter/pagesRouterV13Document.js +2 -1
  34. package/modern/v14-appRouter/index.d.ts +1 -0
  35. package/modern/v14-pagesRouter/index.d.ts +1 -0
  36. package/modern/v15-appRouter/index.d.ts +1 -0
  37. package/modern/v15-pagesRouter/index.d.ts +1 -0
  38. package/package.json +31 -1
  39. package/tsconfig.build.tsbuildinfo +1 -0
  40. package/v13-appRouter/appRouterV13.d.ts +16 -16
  41. package/v13-appRouter/appRouterV13.js +20 -13
  42. package/v13-appRouter/index.d.ts +2 -2
  43. package/v13-appRouter/index.js +27 -2
  44. package/v13-pagesRouter/createCache.d.ts +1 -1
  45. package/v13-pagesRouter/createCache.js +10 -3
  46. package/v13-pagesRouter/index.d.ts +2 -2
  47. package/v13-pagesRouter/index.js +27 -2
  48. package/v13-pagesRouter/nextDocument.cjs +1 -0
  49. package/v13-pagesRouter/pagesRouterV13App.d.ts +5 -2
  50. package/v13-pagesRouter/pagesRouterV13App.js +15 -7
  51. package/v13-pagesRouter/pagesRouterV13Document.d.ts +8 -8
  52. package/v13-pagesRouter/pagesRouterV13Document.js +25 -14
  53. package/v14-appRouter/index.d.ts +1 -1
  54. package/v14-appRouter/index.js +16 -1
  55. package/v14-pagesRouter/index.d.ts +1 -1
  56. package/v14-pagesRouter/index.js +16 -1
  57. package/v15-appRouter/index.d.ts +1 -1
  58. package/v15-appRouter/index.js +16 -1
  59. package/v15-pagesRouter/index.d.ts +1 -1
  60. package/v15-pagesRouter/index.js +16 -1
  61. package/node/v13-appRouter/index.js +0 -27
  62. package/node/v13-pagesRouter/index.js +0 -27
  63. package/node/v13-pagesRouter/pagesRouterV13App.js +0 -22
  64. package/node/v14-appRouter/index.js +0 -16
  65. package/node/v14-pagesRouter/index.js +0 -16
  66. package/node/v15-appRouter/index.js +0 -16
  67. package/node/v15-pagesRouter/index.js +0 -16
  68. package/v13-appRouter/package.json +0 -6
  69. package/v13-pagesRouter/package.json +0 -6
  70. package/v14-appRouter/package.json +0 -6
  71. package/v14-pagesRouter/package.json +0 -6
  72. package/v15-appRouter/package.json +0 -6
  73. package/v15-pagesRouter/package.json +0 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,66 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 7.0.0-alpha.1
4
+
5
+ <!-- generated comparing v7.0.0-alpha.0..master -->
6
+
7
+ _Feb 11, 2025_
8
+
9
+ A big thanks to the 11 contributors who made this release possible.
10
+
11
+ ### `@mui/material@7.0.0-alpha.1`
12
+
13
+ - [Checkbox] Add slots and slotProps (#44974) @sai6855
14
+ - [LinearProgress][CircularProgress] Add variant overrides for module augumentation (#45163) @kingflamez
15
+ - [Drawer] Deprecate \*Props and complete `slots`, `slotProps` (#44960) @siriwatknp
16
+ - Fix wrong `slotProps` of `DetailsHTMLAttributes` types (#45215) @siriwatknp
17
+ - [MobileStepper] deprecate `LinearProgressProps` and complete `slots`, `slotProps` (#45033) @siriwatknp
18
+ - [Radio] Add slots and slotProps (#44972) @sai6855
19
+ - [Radio] Remove empty line (#45184) @sai6855
20
+ - [Slider] Deprecate composed classes (#45201) @sai6855
21
+ - [Snackbar] Fix generated proptypes (#45156) @siriwatknp
22
+ - [SpeedDialAction] Add slots and slotProps (#45065) @sai6855
23
+ - [SwitchBase] Fix spreading of `handlers` in getSlotProps (#45197) @sai6855
24
+ - [Tabs] Deprecate \*Props and complete `slots`, `slotProps` (#45012) @siriwatknp
25
+ - [TextField] Remove deprecated props from documentation (#45199) @sai6855
26
+
27
+ ### `@mui/icons-material@7.0.0-alpha.1`
28
+
29
+ - Change icon source URL and add overrides (#45020) @siriwatknp
30
+
31
+ ### `@mui/lab@7.0.0-beta.1`
32
+
33
+ - Remove components which were moved from lab to material (#45232) @DiegoAndai
34
+
35
+ ### Docs
36
+
37
+ - [Autocomplete] Improve Google Maps search example (#44708) @oliviertassinari
38
+ - [Dialog] Removes deprecated PaperProps from docs (#45195) @sai6855
39
+ - [Menu] Add Grouped Menu demo (#45241) @noobDev31
40
+ - [material] Add disableInteractive on colorTool grid Tooltips (#37800) @Janpot
41
+ - [blog] Consistent Base UI terminology (#45264) @oliviertassinari
42
+ - A quick first step to update docs for Tailwind v4 (#45147) @oliviertassinari
43
+ - Fix `element.ref` accessing warning on docs (#45155) @DiegoAndai
44
+ - Mention Toolpad as experimental (#45273) @prakhargupta1
45
+ - [joy-ui] Update "Set up providers" section of integration with Material UI (#45183) @mateuseap
46
+
47
+ ### Core
48
+
49
+ - Update branch switch tags (#45198) @DiegoAndai
50
+ - Fix double redirection to Base UI (#45146) @oliviertassinari
51
+ - Fix corepack and pnpm installation in CircleCI (#45185) @mj12albert
52
+ - Fix typo on Netlify script (#45278) @maximevtush
53
+ - [code-infra] Fix testing library resolution with custom react (#44061) @Janpot
54
+ - [code-infra] Update package layout for better ESM support (#43264) @Janpot
55
+ - Update `@typescript-eslint/*` packages and remove deprecated `eslint-config-airbnb-typescript` package (#45245) @ZeeshanTamboli
56
+ - [docs] Restore utility component docs from MUI Base to Material UI (#45213) @mapache-salvaje
57
+ - [docs] Sync active sponsors (#45204) @oliviertassinari
58
+ - [docs] Fix links in CONTRIBUTING.md (#45202) @bernardobelchior
59
+ - [docs-infra] Point to MUI X next docs (#45207) @cherniavskii
60
+ - [test] Fix React 18 tests (#45161) @DiegoAndai
61
+
62
+ All contributors of this release in alphabetical order: @bernardobelchior, @cherniavskii, @DiegoAndai, @Janpot, @kingflamez, @mapache-salvaje, @mateuseap, @maximevtush, @mj12albert, @noobDev31, @oliviertassinari, @prakhargupta1, @sai6855, @siriwatknp, @ZeeshanTamboli
63
+
3
64
  ## 7.0.0-alpha.0
4
65
 
5
66
  <!-- generated comparing v6.4.1..master -->
@@ -0,0 +1 @@
1
+ {"type":"module","sideEffects":false}
@@ -0,0 +1,27 @@
1
+ import * as React from 'react';
2
+ import { EmotionCache, Options as OptionsOfCreateCache } from '@emotion/cache';
3
+ export type AppRouterCacheProviderProps = {
4
+ /**
5
+ * These are the options passed to createCache() from 'import createCache from "@emotion/cache"'.
6
+ */
7
+ options?: Partial<OptionsOfCreateCache> & {
8
+ /**
9
+ * If `true`, the generated styles are wrapped within `@layer mui`.
10
+ * This is useful if you want to override the Material UI's generated styles with different styling solution, like Tailwind CSS, plain CSS etc.
11
+ */
12
+ enableCssLayer?: boolean;
13
+ };
14
+ /**
15
+ * By default <CacheProvider /> from 'import { CacheProvider } from "@emotion/react"'.
16
+ */
17
+ CacheProvider?: React.ElementType<{
18
+ value: EmotionCache;
19
+ }>;
20
+ children: React.ReactNode;
21
+ };
22
+ /**
23
+ * Emotion works OK without this provider but it's recommended to use this provider to improve performance.
24
+ * Without it, Emotion will generate a new <style> tag during SSR for every component.
25
+ * See https://github.com/mui/material-ui/issues/26561#issuecomment-855286153 for why it's a problem.
26
+ */
27
+ export default function AppRouterCacheProvider(props: AppRouterCacheProviderProps): React.JSX.Element;
@@ -1,30 +1,23 @@
1
- "use strict";
2
1
  'use client';
3
2
 
4
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
6
- Object.defineProperty(exports, "__esModule", {
7
- value: true
8
- });
9
- exports.default = AppRouterCacheProvider;
10
- var React = _interopRequireWildcard(require("react"));
11
- var _cache = _interopRequireDefault(require("@emotion/cache"));
12
- var _react2 = require("@emotion/react");
13
- var _navigation = require("next/navigation");
14
- var _jsxRuntime = require("react/jsx-runtime");
3
+ import * as React from 'react';
4
+ import createCache from '@emotion/cache';
5
+ import { CacheProvider as DefaultCacheProvider } from '@emotion/react';
6
+ import { useServerInsertedHTML } from 'next/navigation';
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
8
  /**
16
9
  * Emotion works OK without this provider but it's recommended to use this provider to improve performance.
17
10
  * Without it, Emotion will generate a new <style> tag during SSR for every component.
18
11
  * See https://github.com/mui/material-ui/issues/26561#issuecomment-855286153 for why it's a problem.
19
12
  */
20
- function AppRouterCacheProvider(props) {
13
+ export default function AppRouterCacheProvider(props) {
21
14
  const {
22
15
  options,
23
- CacheProvider = _react2.CacheProvider,
16
+ CacheProvider = DefaultCacheProvider,
24
17
  children
25
18
  } = props;
26
19
  const [registry] = React.useState(() => {
27
- const cache = (0, _cache.default)({
20
+ const cache = createCache({
28
21
  ...options,
29
22
  key: options?.key ?? 'mui'
30
23
  });
@@ -55,7 +48,7 @@ function AppRouterCacheProvider(props) {
55
48
  flush
56
49
  };
57
50
  });
58
- (0, _navigation.useServerInsertedHTML)(() => {
51
+ useServerInsertedHTML(() => {
59
52
  const inserted = registry.flush();
60
53
  if (inserted.length === 0) {
61
54
  return null;
@@ -80,11 +73,11 @@ function AppRouterCacheProvider(props) {
80
73
  }
81
74
  }
82
75
  });
83
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
76
+ return /*#__PURE__*/_jsxs(React.Fragment, {
84
77
  children: [globals.map(({
85
78
  name,
86
79
  style
87
- }) => /*#__PURE__*/(0, _jsxRuntime.jsx)("style", {
80
+ }) => /*#__PURE__*/_jsx("style", {
88
81
  nonce: options?.nonce,
89
82
  "data-emotion": `${registry.cache.key}-global ${name}`
90
83
  // eslint-disable-next-line react/no-danger
@@ -92,7 +85,7 @@ function AppRouterCacheProvider(props) {
92
85
  dangerouslySetInnerHTML: {
93
86
  __html: style
94
87
  }
95
- }, name)), styles && /*#__PURE__*/(0, _jsxRuntime.jsx)("style", {
88
+ }, name)), styles && /*#__PURE__*/_jsx("style", {
96
89
  nonce: options?.nonce,
97
90
  "data-emotion": dataEmotionAttribute
98
91
  // eslint-disable-next-line react/no-danger
@@ -103,7 +96,7 @@ function AppRouterCacheProvider(props) {
103
96
  })]
104
97
  });
105
98
  });
106
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(CacheProvider, {
99
+ return /*#__PURE__*/_jsx(CacheProvider, {
107
100
  value: registry.cache,
108
101
  children: children
109
102
  });
@@ -0,0 +1,2 @@
1
+ export { default as AppRouterCacheProvider } from "./appRouterV13.js";
2
+ export * from "./appRouterV13.js";
@@ -0,0 +1,2 @@
1
+ export { default as AppRouterCacheProvider } from "./appRouterV13.js";
2
+ export * from "./appRouterV13.js";
@@ -0,0 +1 @@
1
+ export default function createEmotionCache(): import("@emotion/cache").EmotionCache;
@@ -1,23 +1,16 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = createEmotionCache;
8
- var _cache = _interopRequireDefault(require("@emotion/cache"));
1
+ import createCache from '@emotion/cache';
9
2
  const isBrowser = typeof document !== 'undefined';
10
3
 
11
4
  // On the client side, Create a meta tag at the top of the <head> and set it as insertionPoint.
12
5
  // This assures that MUI styles are loaded first.
13
6
  // It allows developers to easily override MUI styles with other styling solutions, like CSS modules.
14
- function createEmotionCache() {
7
+ export default function createEmotionCache() {
15
8
  let insertionPoint;
16
9
  if (isBrowser) {
17
10
  const emotionInsertionPoint = document.querySelector('meta[name="emotion-insertion-point"]');
18
11
  insertionPoint = emotionInsertionPoint ?? undefined;
19
12
  }
20
- return (0, _cache.default)({
13
+ return createCache({
21
14
  key: 'mui',
22
15
  insertionPoint
23
16
  });
@@ -0,0 +1,2 @@
1
+ export * from "./pagesRouterV13Document.js";
2
+ export * from "./pagesRouterV13App.js";
@@ -0,0 +1,2 @@
1
+ export * from "./pagesRouterV13Document.js";
2
+ export * from "./pagesRouterV13App.js";
@@ -0,0 +1 @@
1
+ module.exports = require('next/document');
@@ -0,0 +1,2 @@
1
+ declare const _exports: typeof import("next/document");
2
+ export = _exports;
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import { EmotionCache } from '@emotion/react';
3
+ export interface EmotionCacheProviderProps {
4
+ emotionCache?: EmotionCache;
5
+ }
6
+ export declare function AppCacheProvider({
7
+ emotionCache,
8
+ children
9
+ }: React.PropsWithChildren<EmotionCacheProviderProps>): React.JSX.Element;
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ import { CacheProvider } from '@emotion/react';
3
+ import createEmotionCache from "./createCache.js";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ const defaultEmotionCache = createEmotionCache();
6
+ export function AppCacheProvider({
7
+ emotionCache = defaultEmotionCache,
8
+ children
9
+ }) {
10
+ return /*#__PURE__*/_jsx(CacheProvider, {
11
+ value: emotionCache,
12
+ children: children
13
+ });
14
+ }
@@ -0,0 +1,23 @@
1
+ import * as React from 'react';
2
+ import { AppType } from 'next/app';
3
+ import { EmotionCache } from '@emotion/react';
4
+ import type { DocumentContext, DocumentInitialProps } from 'next/document';
5
+ interface Plugin {
6
+ enhanceApp: (App: React.ComponentType<React.ComponentProps<AppType>>) => (props: any) => React.JSX.Element;
7
+ resolveProps: (initialProps: DocumentInitialProps) => Promise<DocumentInitialProps>;
8
+ }
9
+ /**
10
+ * A utility to compose multiple `getInitialProps` functions.
11
+ */
12
+ export declare function createGetInitialProps(plugins: Plugin[]): (ctx: DocumentContext) => Promise<DocumentInitialProps>;
13
+ export interface DocumentHeadTagsProps {
14
+ emotionStyleTags: React.ReactElement<unknown>[];
15
+ }
16
+ export declare function DocumentHeadTags(props: DocumentHeadTagsProps): React.JSX.Element;
17
+ export declare function documentGetInitialProps(ctx: DocumentContext, options?: {
18
+ emotionCache?: EmotionCache;
19
+ plugins?: Plugin[];
20
+ }): Promise<import("next/dist/shared/lib/utils").RenderPageResult & {
21
+ styles?: React.ReactElement[] | Iterable<React.ReactNode> | React.JSX.Element;
22
+ } & DocumentHeadTagsProps>;
23
+ export {};
@@ -1,36 +1,27 @@
1
- "use strict";
2
-
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.DocumentHeadTags = DocumentHeadTags;
9
- exports.createGetInitialProps = createGetInitialProps;
10
- exports.documentGetInitialProps = documentGetInitialProps;
11
- var React = _interopRequireWildcard(require("react"));
12
- var _createInstance = _interopRequireDefault(require("@emotion/server/create-instance"));
13
- var _document = _interopRequireDefault(require("next/document"));
14
- var _createCache = _interopRequireDefault(require("./createCache"));
15
- var _jsxRuntime = require("react/jsx-runtime");
16
1
  var _meta;
2
+ import * as React from 'react';
3
+ import createEmotionServer from '@emotion/server/create-instance';
4
+ import nextDocument from "./nextDocument.cjs";
5
+ import createEmotionCache from "./createCache.js";
6
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
+ const Document = nextDocument.default || nextDocument;
17
8
  /**
18
9
  * A utility to compose multiple `getInitialProps` functions.
19
10
  */
20
- function createGetInitialProps(plugins) {
11
+ export function createGetInitialProps(plugins) {
21
12
  return async function getInitialProps(ctx) {
22
13
  const originalRenderPage = ctx.renderPage;
23
14
  ctx.renderPage = () => originalRenderPage({
24
15
  enhanceApp: App => plugins.reduce((result, plugin) => plugin.enhanceApp(result), App)
25
16
  });
26
- const initialProps = await _document.default.getInitialProps(ctx);
17
+ const initialProps = await Document.getInitialProps(ctx);
27
18
  const finalProps = await plugins.reduce(async (result, plugin) => plugin.resolveProps(await result), Promise.resolve(initialProps));
28
19
  return finalProps;
29
20
  };
30
21
  }
31
- function DocumentHeadTags(props) {
32
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
33
- children: [_meta || (_meta = /*#__PURE__*/(0, _jsxRuntime.jsx)("meta", {
22
+ export function DocumentHeadTags(props) {
23
+ return /*#__PURE__*/_jsxs(React.Fragment, {
24
+ children: [_meta || (_meta = /*#__PURE__*/_jsx("meta", {
34
25
  name: "emotion-insertion-point",
35
26
  content: ""
36
27
  })), props.emotionStyleTags]
@@ -39,7 +30,7 @@ function DocumentHeadTags(props) {
39
30
 
40
31
  // `getInitialProps` belongs to `_document` (instead of `_app`),
41
32
  // it's compatible with static-site generation (SSG).
42
- async function documentGetInitialProps(ctx, options) {
33
+ export async function documentGetInitialProps(ctx, options) {
43
34
  // Resolution order
44
35
  //
45
36
  // On the server:
@@ -64,15 +55,15 @@ async function documentGetInitialProps(ctx, options) {
64
55
 
65
56
  // You can consider sharing the same Emotion cache between all the SSR requests to speed up performance.
66
57
  // However, be aware that it can have global side effects.
67
- const cache = options?.emotionCache ?? (0, _createCache.default)();
58
+ const cache = options?.emotionCache ?? createEmotionCache();
68
59
  // The createEmotionServer has to be called directly after the cache creation due to the side effect of cache.compat = true,
69
60
  // otherwise the <style> tag will not come with the HTML string from the server.
70
61
  const {
71
62
  extractCriticalToChunks
72
- } = (0, _createInstance.default)(cache);
63
+ } = createEmotionServer(cache);
73
64
  return createGetInitialProps([{
74
65
  enhanceApp: App => function EnhanceApp(props) {
75
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(App, {
66
+ return /*#__PURE__*/_jsx(App, {
76
67
  emotionCache: cache,
77
68
  ...props
78
69
  });
@@ -83,7 +74,7 @@ async function documentGetInitialProps(ctx, options) {
83
74
  } = extractCriticalToChunks(initialProps.html);
84
75
  return {
85
76
  ...initialProps,
86
- emotionStyleTags: styles.map(style => /*#__PURE__*/(0, _jsxRuntime.jsx)("style", {
77
+ emotionStyleTags: styles.map(style => /*#__PURE__*/_jsx("style", {
87
78
  "data-emotion": `${style.key} ${style.ids.join(' ')}`,
88
79
  // eslint-disable-next-line react/no-danger
89
80
  dangerouslySetInnerHTML: {
@@ -0,0 +1 @@
1
+ export * from "../v13-appRouter/index.js";
@@ -0,0 +1 @@
1
+ export * from "../v13-appRouter/index.js";
@@ -0,0 +1 @@
1
+ export * from "../v13-pagesRouter/index.js";
@@ -0,0 +1 @@
1
+ export * from "../v13-pagesRouter/index.js";
@@ -0,0 +1 @@
1
+ export * from "../v13-appRouter/index.js";
@@ -0,0 +1 @@
1
+ export * from "../v13-appRouter/index.js";
@@ -0,0 +1 @@
1
+ export * from "../v13-pagesRouter/index.js";
@@ -0,0 +1 @@
1
+ export * from "../v13-pagesRouter/index.js";
@@ -0,0 +1 @@
1
+ {"type":"module","sideEffects":false}
@@ -0,0 +1,27 @@
1
+ import * as React from 'react';
2
+ import { EmotionCache, Options as OptionsOfCreateCache } from '@emotion/cache';
3
+ export type AppRouterCacheProviderProps = {
4
+ /**
5
+ * These are the options passed to createCache() from 'import createCache from "@emotion/cache"'.
6
+ */
7
+ options?: Partial<OptionsOfCreateCache> & {
8
+ /**
9
+ * If `true`, the generated styles are wrapped within `@layer mui`.
10
+ * This is useful if you want to override the Material UI's generated styles with different styling solution, like Tailwind CSS, plain CSS etc.
11
+ */
12
+ enableCssLayer?: boolean;
13
+ };
14
+ /**
15
+ * By default <CacheProvider /> from 'import { CacheProvider } from "@emotion/react"'.
16
+ */
17
+ CacheProvider?: React.ElementType<{
18
+ value: EmotionCache;
19
+ }>;
20
+ children: React.ReactNode;
21
+ };
22
+ /**
23
+ * Emotion works OK without this provider but it's recommended to use this provider to improve performance.
24
+ * Without it, Emotion will generate a new <style> tag during SSR for every component.
25
+ * See https://github.com/mui/material-ui/issues/26561#issuecomment-855286153 for why it's a problem.
26
+ */
27
+ export default function AppRouterCacheProvider(props: AppRouterCacheProviderProps): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default as AppRouterCacheProvider } from "./appRouterV13.js";
2
+ export * from "./appRouterV13.js";
@@ -0,0 +1 @@
1
+ export default function createEmotionCache(): import("@emotion/cache").EmotionCache;
@@ -0,0 +1,2 @@
1
+ export * from "./pagesRouterV13Document.js";
2
+ export * from "./pagesRouterV13App.js";
@@ -0,0 +1 @@
1
+ module.exports = require('next/document');
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import { EmotionCache } from '@emotion/react';
3
+ export interface EmotionCacheProviderProps {
4
+ emotionCache?: EmotionCache;
5
+ }
6
+ export declare function AppCacheProvider({
7
+ emotionCache,
8
+ children
9
+ }: React.PropsWithChildren<EmotionCacheProviderProps>): React.JSX.Element;
@@ -0,0 +1,23 @@
1
+ import * as React from 'react';
2
+ import { AppType } from 'next/app';
3
+ import { EmotionCache } from '@emotion/react';
4
+ import type { DocumentContext, DocumentInitialProps } from 'next/document';
5
+ interface Plugin {
6
+ enhanceApp: (App: React.ComponentType<React.ComponentProps<AppType>>) => (props: any) => React.JSX.Element;
7
+ resolveProps: (initialProps: DocumentInitialProps) => Promise<DocumentInitialProps>;
8
+ }
9
+ /**
10
+ * A utility to compose multiple `getInitialProps` functions.
11
+ */
12
+ export declare function createGetInitialProps(plugins: Plugin[]): (ctx: DocumentContext) => Promise<DocumentInitialProps>;
13
+ export interface DocumentHeadTagsProps {
14
+ emotionStyleTags: React.ReactElement<unknown>[];
15
+ }
16
+ export declare function DocumentHeadTags(props: DocumentHeadTagsProps): React.JSX.Element;
17
+ export declare function documentGetInitialProps(ctx: DocumentContext, options?: {
18
+ emotionCache?: EmotionCache;
19
+ plugins?: Plugin[];
20
+ }): Promise<import("next/dist/shared/lib/utils").RenderPageResult & {
21
+ styles?: React.ReactElement[] | Iterable<React.ReactNode> | React.JSX.Element;
22
+ } & DocumentHeadTagsProps>;
23
+ export {};
@@ -1,9 +1,10 @@
1
1
  var _meta;
2
2
  import * as React from 'react';
3
3
  import createEmotionServer from '@emotion/server/create-instance';
4
- import Document from 'next/document';
4
+ import nextDocument from "./nextDocument.cjs";
5
5
  import createEmotionCache from "./createCache.js";
6
6
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
+ const Document = nextDocument.default || nextDocument;
7
8
  /**
8
9
  * A utility to compose multiple `getInitialProps` functions.
9
10
  */
@@ -0,0 +1 @@
1
+ export * from "../v13-appRouter/index.js";
@@ -0,0 +1 @@
1
+ export * from "../v13-pagesRouter/index.js";
@@ -0,0 +1 @@
1
+ export * from "../v13-appRouter/index.js";
@@ -0,0 +1 @@
1
+ export * from "../v13-pagesRouter/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/material-nextjs",
3
- "version": "7.0.0-alpha.0",
3
+ "version": "7.0.0-alpha.1",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "Collection of utilities for integration between Material UI and Next.js.",
@@ -52,5 +52,35 @@
52
52
  },
53
53
  "engines": {
54
54
  "node": ">=14.0.0"
55
+ },
56
+ "exports": {
57
+ "./*": {
58
+ "require": {
59
+ "types": "./*/index.d.ts",
60
+ "default": "./*/index.js"
61
+ },
62
+ "import": {
63
+ "types": "./esm/*/index.d.ts",
64
+ "default": "./esm/*/index.js"
65
+ },
66
+ "mui-modern": {
67
+ "types": "./modern/*/index.d.ts",
68
+ "default": "./modern/*/index.js"
69
+ }
70
+ },
71
+ "./v13-pagesRouter": {
72
+ "require": {
73
+ "types": "./v13-pagesRouter/index.d.ts",
74
+ "default": "./v13-pagesRouter/index.js"
75
+ },
76
+ "import": {
77
+ "types": "./esm/v13-pagesRouter/index.d.ts",
78
+ "default": "./esm/v13-pagesRouter/index.js"
79
+ },
80
+ "mui-modern": {
81
+ "types": "./modern/v13-pagesRouter/index.d.ts",
82
+ "default": "./modern/v13-pagesRouter/index.js"
83
+ }
84
+ }
55
85
  }
56
86
  }