@mui/material-nextjs 6.0.0-alpha.0 → 6.0.0-dev.240424162023-9968b4889d

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/CHANGELOG.md CHANGED
@@ -1,5 +1,259 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## v6.0.0-alpha.4
4
+
5
+ <!-- generated comparing v6.0.0-alpha.3..next -->
6
+
7
+ _Apr 24, 2024_
8
+
9
+ A big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ - 🔥 Converted 3 more Material UI components to use Pigment CSS.
12
+ - ℹ️ Pigment CSS now lives in [its own repository](https://github.com/mui/pigment-css)! From now on, all future development will happen there.
13
+
14
+ ### `@mui/material@6.0.0-alpha.4`
15
+
16
+ - [Checkbox] Convert to support CSS extraction (#41957) @lhilgert9
17
+ - [IconButton] Convert to support CSS extraction (#41850) @gijsbotje
18
+ - [Radio] Convert to support CSS extraction (#41840) @lhilgert9
19
+ - [Typography] Fix ownerState prop placement (#41903) @sai6855
20
+ - Generate typography tokens (#41703) @siriwatknp
21
+ - Move typography CSS variables to `font` (#42003) @siriwatknp
22
+ - Fix getOverlayAlpha type (#41995) @oliviertassinari
23
+ - Support CSS Extraction using codemod (#41935) @siriwatknp
24
+
25
+ ### `@mui/icons-material@6.0.0-alpha.4`
26
+
27
+ - &#8203;<!-- 08 -->[icons] Update the icons package (#41937) @danilo-leal
28
+
29
+ ### Docs
30
+
31
+ - [material-ui] Remove react-swipeable-views from demos as it's no longer maintained (#41912) @soler1212
32
+ - [material-ui] Add dark theme thumbnails for templates (#41947) @zanivan
33
+ - [material-ui] Remove links and interdependencies from free templates (#41941) @zanivan
34
+ - [material-ui] Add missing backticks to HTML tag in the installation page (#41972) @Miguelrom
35
+ - Fix 301 Toolpad links @oliviertassinari
36
+ - Fix 301 image redirections @oliviertassinari
37
+
38
+ ### Core
39
+
40
+ - pnpm docs:zipRules && vale sync @oliviertassinari
41
+ - Remove @pigment-css/\* packages (#41965) @mnajdova
42
+ - [code-infra] Move the HighlightedCode component to @mui/docs (#41859) @Janpot
43
+ - [code-infra] Move the HighlightedCode component to @mui/docs (#41859) @Janpot
44
+ - [code-infra] Make Babel config path configurable in API docs builder (#41999) @michaldudak
45
+ - [docs-infra] Fix flex-shrink pro-plan (#41990) @oliviertassinari
46
+ - [docs-infra] Allow more value uses of MUI (#41706) @oliviertassinari
47
+ - [docs-infra] Move CPU to shared config (#41901) @oliviertassinari
48
+ - [docs-infra] Improve Twitter OG:image (#41860) @oliviertassinari
49
+ - [docs-infra] Adapt docs infra to Base UI docs needs (#41963) @michaldudak
50
+ - [docs-infra] Add demo container design refinements (#41948) @danilo-leal
51
+ - [docs-infra] Use the `getLayout` on the material demo pages (#41936) @alexfauquette
52
+ - [test] Update browser versions in karma config (#42008) @ZeeshanTamboli
53
+ - [website] Remove customer support agent role from website (#41969) @rluzists1
54
+ - [website] Fix grid usage and add stray improvements (#41930) @danilo-leal
55
+
56
+ All contributors of this release in alphabetical order: @alexfauquette, @danilo-leal, @gijsbotje, @Janpot, @lhilgert9, @michaldudak, @Miguelrom, @mnajdova, @oliviertassinari, @rluzists1, @sai6855, @siriwatknp, @soler1212, @zanivan, @ZeeshanTamboli
57
+
58
+ ## v6.0.0-alpha.3
59
+
60
+ <!-- generated comparing v6.0.0-alpha.2..next -->
61
+
62
+ _Apr 17, 2024_
63
+
64
+ A big thanks to the 24 contributors who made this release possible. Here are some highlights ✨:
65
+
66
+ - 🔥 Converted 5 more Material UI components to use Pigment CSS.
67
+ - 🚀 Added container queries utility to the `@mui/system` package (#41674) @siriwatknp.
68
+
69
+ ### `@mui/material@6.0.0-alpha.3`
70
+
71
+ - Convert `LinearProgress` to support Pigment CSS (#41816) @siriwatknp
72
+ - [Dialog] Prevent onClick on the root element from being overwritten (#41881) @ryanburr
73
+ - [FloatingActionButton] Convert to support CSS extraction (#41851) @gijsbotje
74
+ - Convert `CircularProgress` to support Pigment CSS (#41776) @siriwatknp
75
+ - [PaginationItem] Convert to support CSS extraction (#41848) @gijsbotje
76
+ - [StepConnector] deprecate composed classes (#41740) @sai6855
77
+ - [StepLabel] Deprecate `StepIconComponent`, `StepIconProps` (#41835) @sai6855
78
+ - [ToggleButton] Convert to support CSS extraction (#41782) @lhilgert9
79
+ - [ToggleButtonGroup] Deprecate composed classes (#41288) @sai6855
80
+ - [Typography] Fix Typography inherit variant styles (#41308) @kealjones-wk
81
+
82
+ ### `@mui/system@6.0.0-alpha.3`
83
+
84
+ - Add container queries utility (#41674) @siriwatknp
85
+
86
+ ### `@mui/codemod@6.0.0-alpha.3`
87
+
88
+ - Add styled v6 transformation (#41743) @siriwatknp
89
+
90
+ ### `@mui/joy@5.0.0-beta.36`
91
+
92
+ - [Button] Disable text highlighting (#41902) @mithun522
93
+
94
+ ### `@pigment-css/react@0.0.7`
95
+
96
+ - Patch WyW's WeakRef usage (#41909) @DiegoAndai
97
+ - Implement sx transform for system components (#41861) @brijeshb42
98
+
99
+ ### Docs
100
+
101
+ - [material-ui] Add Connect-related content (#40848) @danilo-leal
102
+ - [material-ui] Fix credit comment typo (#41872) @aarongarciah
103
+ - [material-ui] Remove Data Grid v7 beta callout (#41839) @cherniavskii
104
+ - [material-ui] Add stray design tweaks to free templates (#41696) @zanivan
105
+ - [material-ui] Simplify components styling on templates (#41845) @zanivan
106
+ - [material-ui][Button] Add `onChange` event handler to file upload example (#41863) @aarongarciah
107
+ - [material-ui] Fix import statement in migration guide (#41852) @sai6855
108
+ - Fix 301 redirection @oliviertassinari
109
+ - Fix format git diff regression (#41882) @oliviertassinari
110
+ - Fix small SEO issues @oliviertassinari
111
+ - [pigment-css] Fix README typos (#41870) @MohammadShehadeh
112
+
113
+ ### Core
114
+
115
+ - Begin removing IE 11-related code (#41709) @iammminzzy
116
+ - [blog] Add post to introduce the Connect plugin (#41763) @danilo-leal
117
+ - [code-infra] Fix require.context with aliases (#41682) @Janpot
118
+ - [code-infra] Allow customizing hooks imports in API docs generator (#41828) @michaldudak
119
+ - [codemod] Add utils for `*Component` and `*Props` props deprecations (#41685) @DiegoAndai
120
+ - Replace bundle size reporter filter (#38979) @Janpot
121
+ - [docs-infra] Make the whole header clickable (#39603) @MoazMirza-13
122
+ - [docs-infra] Improve demo container and related components design (#41827) @danilo-leal
123
+ - [docs-infra] Use edge function for card generation (#41188) (#41836) @alexfauquette
124
+ - [docs-infra] Fix code block layout shift (#41917) @oliviertassinari
125
+ - [docs-infra] Fine-tune the OG card image design (#41862) @danilo-leal
126
+ - [docs-infra] Fix markdown version for material (#41908) @alexfauquette
127
+ - [docs-infra] Support multiple tabs in demos (#40901) @bharatkashyap
128
+
129
+ All contributors of this release in alphabetical order: @aarongarciah, @alexfauquette, @bharatkashyap, @brijeshb42, @cherniavskii, @danilo-leal, @DiegoAndai, @EyaOuenniche, @gijsbotje, @iammminzzy, @Janpot, @kealjones-wk, @lhilgert9, @magnimarels, @michaldudak, @mithun522, @mnajdova, @MoazMirza-13, @MohammadShehadeh, @oliviertassinari, @ryanburr, @sai6855, @siriwatknp, @zanivan
130
+
131
+ ## v6.0.0-alpha.2
132
+
133
+ <!-- generated comparing v6.0.0-alpha.1..next -->
134
+
135
+ _Apr 9, 2024_
136
+
137
+ A big thanks to the 5 contributors who made this release possible.
138
+ This release was mostly about 🐛 bug fixes and 📚 documentation improvements.
139
+
140
+ ### `@mui/material@6.0.0-alpha.2`
141
+
142
+ - &#8203;<!-- 03 -->[typescript][Select] Fix `muiName` property TypeScript error (#41726) @EyaOuenniche
143
+ - &#8203;<!-- 04 -->[l10n] Fix typo in is-IS locale (#41810) @magnimarels
144
+
145
+ ### `@pigment-css/react@0.0.6`
146
+
147
+ - &#8203;<!-- 12 -->[core] Remove `muiName` during eval phase (#41811) @brijeshb42
148
+
149
+ ### `@pigment-css/nextjs-plugin@0.0.6`
150
+
151
+ - &#8203;<!-- 02 -->[nextjs] Handle file references passed through imports (#41817) @brijeshb42
152
+ - &#8203;<!-- 01 -->[nextjs] Allow usage of url() CSS function (#41758) @brijeshb42
153
+
154
+ ### Docs
155
+
156
+ - &#8203;<!-- 11 -->[docs] Fix 301 links @oliviertassinari
157
+ - &#8203;<!-- 06 -->[pigment-css][docs] Fix README typo (#41808) @aarongarciah
158
+ - &#8203;<!-- 05 -->[pigment-css][docs] Fix output on dynamic styles example (#41805) @aarongarciah
159
+ - &#8203;<!-- 07 -->[material-ui][docs] Fix Material 3 message typo (#41821) @aarongarciah
160
+ - &#8203;<!-- 08 -->[material-ui][docs] Add stray design tweaks to free templates (#41696) @zanivan
161
+
162
+ ### Core
163
+
164
+ - &#8203;<!-- 13 -->[core] Remove unused files (#41818) @mnajdova
165
+ - &#8203;<!-- 10 -->[docs-infra] Fix analytics about inline ads (#41474) (#41819) @alexfauquette
166
+ - &#8203;<!-- 08 -->[docs-infra] Fix drawer performances (#41807) @alexfauquette
167
+
168
+ All contributors of this release in alphabetical order: @aarongarciah, @alexfauquette, @brijeshb42, @EyaOuenniche, @oliviertassinari
169
+
170
+ ## v6.0.0-alpha.1
171
+
172
+ <!-- generated comparing v6.0.0-alpha.0..next -->
173
+
174
+ _Apr 5, 2024_
175
+
176
+ A big thanks to the 19 contributors who made this release possible. Here are some highlights ✨:
177
+
178
+ - 🔥 Converted 3 more Material UI components to use Pigment CSS. Current progress is 36%!
179
+ - 🚀 Added a spacing CSS variable to the Material UI and Joy UI themes.
180
+ - 💫 Added 3 redesigned free Material UI templates: [Sign-in](https://next.mui.com/material-ui/getting-started/templates/sign-in/), [Sign-in side](https://next.mui.com/material-ui/getting-started/templates/sign-in-side/), and [Sign-up](https://next.mui.com/material-ui/getting-started/templates/sign-up/).
181
+
182
+ ### `@mui/material@6.0.0-alpha.1`
183
+
184
+ - [AppBar] Convert to support CSS extraction (#41247) @mnajdova
185
+ - [Badge] Deprecate components and componentsProps (#41655) @skmanoj322
186
+ - [Button] Convert to support CSS extraction (#41378) @siriwatknp
187
+ - [ButtonGroup] Convert to support CSS extraction (#41666) @zanivan
188
+ - [RadioGroup] Apply classnames (#41610) @ZeeshanTamboli
189
+ - [Slider] Move palette styles to the bottom (#41676) @siriwatknp
190
+ - Add the `spacing` theme token (#40224) @siriwatknp
191
+
192
+ ### `@mui/system@6.0.0-alpha.1`
193
+
194
+ - Add the `spacing` theme token to be used in `theme.spacing()` (#40224) @siriwatknp
195
+
196
+ ### `@mui/codemod@6.0.0-alpha.1`
197
+
198
+ - [codemod] Setup v6 codemod structure (#41668) @DiegoAndai
199
+
200
+ ### `@mui/lab@6.0.0-alpha.1`
201
+
202
+ - [TabPanel] Add keepMounted prop to match Joy UI (#41651) @ppaskaris-plooto
203
+
204
+ ### `@mui/joy@5.0.0-beta.34`
205
+
206
+ - Add `spacing` theme token (#40224) @siriwatknp
207
+
208
+ ### `@pigment-css/react@0.0.5`
209
+
210
+ - Improve sx prop support (#41589) @brijeshb42
211
+ - Fix Emotion styled error (#41699) @siriwatknp
212
+ - Fix propTypes removal during eval stage (#41695) @brijeshb42
213
+ - Fix props forwarding (#41688) @siriwatknp
214
+ - Fix sx prop transformation on Box (#41705) @brijeshb42
215
+
216
+ ### `@pigment-css/vite-plugin@0.0.5`
217
+
218
+ - Use constant filename for pigment styles (#41667) @brijeshb42
219
+
220
+ ### `@pigment-css/nextjs-plugin@0.0.5`
221
+
222
+ - Add missing RTL implementation (#41751) @brijeshb42
223
+
224
+ ### Docs
225
+
226
+ - [pigment-css] Update README.md installation to use the next tag (#41649) @mnajdova
227
+ - [pigment-css] Add "Building design system components" guide with Pigment CSS (#41635) @siriwatknp
228
+ - Continue migration of Base UI to sperate repository @oliviertassinari
229
+ - Stick to one way to write IE 11 @oliviertassinari
230
+ - Fix typo in CONTRIBUTING.md (#41670) @adriancuadrado
231
+ - Drop IE 11 official support (#41611) @iammminzzy
232
+ - [material-ui] Fix typo on the Accordion page (#41687) @connorshea
233
+ - [pigment-css] Add small edits on the README (#41646) @danilo-leal
234
+ - [pigment-css] Edit the example app's README files (#41639) @danilo-leal
235
+
236
+ ### Core
237
+
238
+ - [code-infra] Move BrandingProvider/brandingTheme/InfoCard to @mui/docs (#41206) @Janpot
239
+ - [core] Automate cherry-pick of PRs from `next` -> `master` (#41741) @aarongarciah
240
+ - [core] Update the prettier script to use the next branch (#41637) @mnajdova
241
+ - [docs-infra] Skip loading source for non-editable modules (#41588) @bharatkashyap
242
+ - [docs-infra] Vale rule for M3 (#41737) @oliviertassinari
243
+ - [docs-infra] Allows to remove edit button (#41702) @alexfauquette
244
+ - [pigment-css][examples] Add example project with Remix (#41700) @brijeshb42
245
+ - [examples] Update MUI's packages to the next version (#41701) @mnajdova
246
+ - [material-ui] Refine the Sign-in and Sign-up templates (#41192) @zanivan
247
+ - [test] Add test to display options provided to the options prop even if loading is true. (#41675) @ZeeshanTamboli
248
+ - [blog] Refresh the design slightly (#41697) @danilo-leal
249
+ - [website] Use en-US over en-UK for career link @oliviertassinari
250
+ - [website] Add Aarón to About Us (#41736) @aarongarciah
251
+ - [website] Refine button design and other details (#41686) @danilo-leal
252
+ - [website] Improve job og image (#41672) @oliviertassinari
253
+ - [website] Page <title> should have no dots @oliviertassinari
254
+
255
+ All contributors of this release in alphabetical order: @aarongarciah, @adriancuadrado, @alexfauquette, @bharatkashyap, @brijeshb42, @connorshea, @danilo-leal, @DiegoAndai, @iammminzzy, @Janpot, @JCQuintas, @levigunz, @mnajdova, @oliviertassinari, @ppaskaris-plooto, @siriwatknp, @skmanoj322, @zanivan, @ZeeshanTamboli
256
+
3
257
  ## v6.0.0-alpha.0
4
258
 
5
259
  <!-- generated comparing v5.15.14..next -->
@@ -79,6 +333,46 @@ A big thanks to the 18 contributors who made this release possible. Here are som
79
333
 
80
334
  All contributors of this release in alphabetical order: @aacevski, @brijeshb42, @cherniavskii, @cipherlogs, @danilo-leal, @DiegoAndai, @harry-whorlow, @Janpot, @joserodolfofreitas, @michael-land, @michaldudak, @mnajdova, @nekoya, @sai6855, @siriwatknp, @StylesTrip, @zanivan, @ZeeshanTamboli
81
335
 
336
+ ## v5.15.15
337
+
338
+ <!-- generated comparing v5.15.14..master -->
339
+
340
+ _Apr 4, 2024_
341
+
342
+ A big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
343
+ This release was mostly about 🐛 bug fixes and 📚 documentation improvements.
344
+
345
+ ### `@mui/material@5.15.15`
346
+
347
+ - [Autocomplete] Display options provided to the `options` prop even if loading is true (#41677) @ZeeshanTamboli
348
+ - [RadioGroup] Apply classnames (#41681) @ZeeshanTamboli
349
+
350
+ ### `@mui/system@5.15.15`
351
+
352
+ - Fix typo to avoid infinite recursion in function call (#41678) @ZeeshanTamboli
353
+
354
+ ### Docs
355
+
356
+ - [material-ui][Slider] Remove `valueLabelFormat` from restricted values demo so that the tooltip thumb label displays the same as the value text (#41679) @ZeeshanTamboli
357
+ - [material-ui] Remove deleted page from the sidenav (#41594) @danilo-leal
358
+ - [material-ui] Fix typo in CSS theme variables customization (#41680) @ZeeshanTamboli
359
+ - Continue migration of Base UI to sperate repository @oliviertassinari
360
+ - Add notification for MUI X v7 blog post (#41587) (#41605) @cherniavskii
361
+ - Update the versions dropdown to show v6 (#41557) @mnajdova
362
+
363
+ ### Core
364
+
365
+ - [blog] Link to Romain's blog post in MUI X v7 announcement post (#41641) @cherniavskii
366
+ - [blog] Blog post with MUI X v7.0.0 annoucement (#41563) (#41604) @cherniavskii
367
+ - [blog] Add post about remote (#41565) @danilo-leal
368
+ - [core] Continue rename of Toolpad @oliviertassinari
369
+ - [docs-infra] Add Toolpad product/category IDs to types (#41551) @bharatkashyap
370
+ - [website] Add Aarón to About Us (#41747) @aarongarciah
371
+ - [website] Add stray design adjustments throughout the site (#41642) @mnajdova
372
+ - [website] Update pricing table (#41606) @cherniavskii
373
+
374
+ All contributors of this release in alphabetical order: @aarongarciah, @bharatkashyap, @cherniavskii, @danilo-leal, @mnajdova, @oliviertassinari, @ZeeshanTamboli
375
+
82
376
  ## v5.15.14
83
377
 
84
378
  <!-- generated comparing v5.15.13..master -->
@@ -893,7 +1187,7 @@ A big thanks to the 22 contributors who made this release possible. Here are som
893
1187
  - [material-ui] Revise the Alert demo page (#34892) @samuelsycamore
894
1188
  - [material-ui] Revise the Accordion page (#40284) @anle9650
895
1189
  - [material-ui] Add docs for complementary Card components (#40346) @anle9650
896
- - [material-ui] Add Material 3 components page (#40350) @DiegoAndai
1190
+ - [material-ui] Add Material Design 3 components page (#40350) @DiegoAndai
897
1191
  - Fix strange italic style @oliviertassinari
898
1192
  - Fix references to ESLint @oliviertassinari
899
1193
  - Fix 301 redirections @oliviertassinari
@@ -8001,7 +8295,7 @@ A big thanks to the 25 contributors who made this release possible. Here are som
8001
8295
 
8002
8296
  <a href="https://mui.com/components/tables/#unstyled-table"><img width="800" alt="unstyled table" src="https://user-images.githubusercontent.com/4512430/144862194-584356ef-7d9d-462c-a631-186a7e716193.png"></a>
8003
8297
 
8004
- You can follow our progress with unstyled components at https://github.com/mui/material-ui/issues/27170.
8298
+ You can follow our progress with unstyled components at https://github.com/mui/base-ui/issues/10.
8005
8299
 
8006
8300
  - 🎉 We have added an example of how to use MUI with [Remix](https://remix.run/) (#29952) @mnajdova
8007
8301
 
@@ -9471,7 +9765,7 @@ A big thanks to the 17 contributors who made this release possible. Here are som
9471
9765
 
9472
9766
  <a href="https://mui.com/components/switches/#unstyled"><img width="832" alt="switch" src="https://user-images.githubusercontent.com/3165635/125192249-236f8a80-e247-11eb-9df9-17d476379a32.png"></a>
9473
9767
 
9474
- You can follow our progress at https://github.com/mui/material-ui/issues/27170.
9768
+ You can follow our progress at https://github.com/mui/base-ui/issues/10.
9475
9769
 
9476
9770
  - 💄 We have updated the default `info` `success` `warning` color to be more accessible (#26817) @siriwatknp.
9477
9771
  You can find the new [default values](https://mui.com/material-ui/customization/palette/#default-values) in the documentation.
@@ -13057,7 +13351,7 @@ Here are some highlights ✨:
13057
13351
 
13058
13352
  1. `stable` (default, formerly `esm`) which targets a snapshot (on release) of `> 0.5%, last 2 versions, Firefox ESR, not dead, not IE 11"`
13059
13353
  2. `node` (formerly default) which targets a snapshot (on release) of `maintained node versions`
13060
- 3. `legacy` (new) which is `stable` + IE11
13354
+ 3. `legacy` (new) which is `stable` + IE 11
13061
13355
  4. `modern` (formerly `es`) which targets the last 1 version of evergreen browsers and active node (currently that is 14
13062
13356
 
13063
13357
  The change yields a 6% reduction in bundle size 📦 (Babel only).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/material-nextjs",
3
- "version": "6.0.0-alpha.0",
3
+ "version": "6.0.0-dev.240424162023-9968b4889d",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "Collection of utilities for integration between Material UI and Next.js.",
@@ -24,7 +24,7 @@
24
24
  "url": "https://opencollective.com/mui-org"
25
25
  },
26
26
  "dependencies": {
27
- "@babel/runtime": "^7.23.9"
27
+ "@babel/runtime": "^7.24.4"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@emotion/cache": "^11.11.0",
@@ -32,7 +32,7 @@
32
32
  "@types/react": "^17.0.0 || ^18.0.0",
33
33
  "next": "^13.0.0 || ^14.0.0",
34
34
  "react": "^17.0.0 || ^18.0.0",
35
- "@mui/material": "^6.0.0-alpha.0"
35
+ "@mui/material": "^6.0.0-dev.240424162023-9968b4889d"
36
36
  },
37
37
  "peerDependenciesMeta": {
38
38
  "@types/react": {
@@ -1,108 +0,0 @@
1
- 'use client';
2
-
3
- import _extends from "@babel/runtime/helpers/esm/extends";
4
- import * as React from 'react';
5
- import createCache from '@emotion/cache';
6
- import { CacheProvider as DefaultCacheProvider } from '@emotion/react';
7
- import { useServerInsertedHTML } from 'next/navigation';
8
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
- /**
10
- * Emotion works OK without this provider but it's recommended to use this provider to improve performance.
11
- * Without it, Emotion will generate a new <style> tag during SSR for every component.
12
- * See https://github.com/mui/material-ui/issues/26561#issuecomment-855286153 for why it's a problem.
13
- */
14
- export default function AppRouterCacheProvider(props) {
15
- var options = props.options,
16
- _props$CacheProvider = props.CacheProvider,
17
- CacheProvider = _props$CacheProvider === void 0 ? DefaultCacheProvider : _props$CacheProvider,
18
- children = props.children;
19
- var _React$useState = React.useState(function () {
20
- var _options$key;
21
- var cache = createCache(_extends({}, options, {
22
- key: (_options$key = options == null ? void 0 : options.key) != null ? _options$key : 'mui'
23
- }));
24
- cache.compat = true;
25
- var prevInsert = cache.insert;
26
- var inserted = [];
27
- // Override the insert method to support streaming SSR with flush().
28
- cache.insert = function () {
29
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
30
- args[_key] = arguments[_key];
31
- }
32
- if (options != null && options.enableCssLayer) {
33
- args[1].styles = "@layer mui {".concat(args[1].styles, "}");
34
- }
35
- var selector = args[0],
36
- serialized = args[1];
37
- if (cache.inserted[serialized.name] === undefined) {
38
- inserted.push({
39
- name: serialized.name,
40
- isGlobal: !selector
41
- });
42
- }
43
- return prevInsert.apply(void 0, args);
44
- };
45
- var flush = function flush() {
46
- var prevInserted = inserted;
47
- inserted = [];
48
- return prevInserted;
49
- };
50
- return {
51
- cache: cache,
52
- flush: flush
53
- };
54
- }),
55
- registry = _React$useState[0];
56
- useServerInsertedHTML(function () {
57
- var inserted = registry.flush();
58
- if (inserted.length === 0) {
59
- return null;
60
- }
61
- var styles = '';
62
- var dataEmotionAttribute = registry.cache.key;
63
- var globals = [];
64
- inserted.forEach(function (_ref) {
65
- var name = _ref.name,
66
- isGlobal = _ref.isGlobal;
67
- var style = registry.cache.inserted[name];
68
- if (typeof style !== 'boolean') {
69
- if (isGlobal) {
70
- globals.push({
71
- name: name,
72
- style: style
73
- });
74
- } else {
75
- styles += style;
76
- dataEmotionAttribute += " ".concat(name);
77
- }
78
- }
79
- });
80
- return /*#__PURE__*/_jsxs(React.Fragment, {
81
- children: [globals.map(function (_ref2) {
82
- var name = _ref2.name,
83
- style = _ref2.style;
84
- return /*#__PURE__*/_jsx("style", {
85
- nonce: options == null ? void 0 : options.nonce,
86
- "data-emotion": "".concat(registry.cache.key, "-global ").concat(name)
87
- // eslint-disable-next-line react/no-danger
88
- ,
89
- dangerouslySetInnerHTML: {
90
- __html: style
91
- }
92
- }, name);
93
- }), styles && /*#__PURE__*/_jsx("style", {
94
- nonce: options == null ? void 0 : options.nonce,
95
- "data-emotion": dataEmotionAttribute
96
- // eslint-disable-next-line react/no-danger
97
- ,
98
- dangerouslySetInnerHTML: {
99
- __html: styles
100
- }
101
- })]
102
- });
103
- });
104
- return /*#__PURE__*/_jsx(CacheProvider, {
105
- value: registry.cache,
106
- children: children
107
- });
108
- }
@@ -1,2 +0,0 @@
1
- export { default as AppRouterCacheProvider } from './appRouterV13';
2
- export * from './appRouterV13';
@@ -1,17 +0,0 @@
1
- import createCache from '@emotion/cache';
2
- var isBrowser = typeof document !== 'undefined';
3
-
4
- // On the client side, Create a meta tag at the top of the <head> and set it as insertionPoint.
5
- // This assures that MUI styles are loaded first.
6
- // It allows developers to easily override MUI styles with other styling solutions, like CSS modules.
7
- export default function createEmotionCache() {
8
- var insertionPoint;
9
- if (isBrowser) {
10
- var emotionInsertionPoint = document.querySelector('meta[name="emotion-insertion-point"]');
11
- insertionPoint = emotionInsertionPoint != null ? emotionInsertionPoint : undefined;
12
- }
13
- return createCache({
14
- key: 'mui',
15
- insertionPoint: insertionPoint
16
- });
17
- }
@@ -1,2 +0,0 @@
1
- export * from './pagesRouterV13Document';
2
- export * from './pagesRouterV13App';
@@ -1,14 +0,0 @@
1
- import * as React from 'react';
2
- import { CacheProvider } from '@emotion/react';
3
- import createEmotionCache from './createCache';
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- var defaultEmotionCache = createEmotionCache();
6
- export function AppCacheProvider(_ref) {
7
- var _ref$emotionCache = _ref.emotionCache,
8
- emotionCache = _ref$emotionCache === void 0 ? defaultEmotionCache : _ref$emotionCache,
9
- children = _ref.children;
10
- return /*#__PURE__*/_jsx(CacheProvider, {
11
- value: emotionCache,
12
- children: children
13
- });
14
- }
@@ -1,164 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
- import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
- import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
4
- var _meta;
5
- import _regeneratorRuntime from "@babel/runtime/regenerator";
6
- import * as React from 'react';
7
- import createEmotionServer from '@emotion/server/create-instance';
8
- import Document from 'next/document';
9
- import createEmotionCache from './createCache';
10
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
- /**
12
- * A utility to compose multiple `getInitialProps` functions.
13
- */
14
- export function createGetInitialProps(plugins) {
15
- return /*#__PURE__*/function () {
16
- var _getInitialProps = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(ctx) {
17
- var originalRenderPage, initialProps, finalProps;
18
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
19
- while (1) switch (_context2.prev = _context2.next) {
20
- case 0:
21
- originalRenderPage = ctx.renderPage;
22
- ctx.renderPage = function () {
23
- return originalRenderPage({
24
- enhanceApp: function enhanceApp(App) {
25
- return plugins.reduce(function (result, plugin) {
26
- return plugin.enhanceApp(result);
27
- }, App);
28
- }
29
- });
30
- };
31
- _context2.next = 4;
32
- return Document.getInitialProps(ctx);
33
- case 4:
34
- initialProps = _context2.sent;
35
- _context2.next = 7;
36
- return plugins.reduce( /*#__PURE__*/function () {
37
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(result, plugin) {
38
- return _regeneratorRuntime.wrap(function _callee$(_context) {
39
- while (1) switch (_context.prev = _context.next) {
40
- case 0:
41
- _context.t0 = plugin;
42
- _context.next = 3;
43
- return result;
44
- case 3:
45
- _context.t1 = _context.sent;
46
- return _context.abrupt("return", _context.t0.resolveProps.call(_context.t0, _context.t1));
47
- case 5:
48
- case "end":
49
- return _context.stop();
50
- }
51
- }, _callee);
52
- }));
53
- return function (_x2, _x3) {
54
- return _ref.apply(this, arguments);
55
- };
56
- }(), Promise.resolve(initialProps));
57
- case 7:
58
- finalProps = _context2.sent;
59
- return _context2.abrupt("return", finalProps);
60
- case 9:
61
- case "end":
62
- return _context2.stop();
63
- }
64
- }, _callee2);
65
- }));
66
- function getInitialProps(_x) {
67
- return _getInitialProps.apply(this, arguments);
68
- }
69
- return getInitialProps;
70
- }();
71
- }
72
- export function DocumentHeadTags(props) {
73
- return /*#__PURE__*/_jsxs(React.Fragment, {
74
- children: [_meta || (_meta = /*#__PURE__*/_jsx("meta", {
75
- name: "emotion-insertion-point",
76
- content: ""
77
- })), props.emotionStyleTags]
78
- });
79
- }
80
-
81
- // `getInitialProps` belongs to `_document` (instead of `_app`),
82
- // it's compatible with static-site generation (SSG).
83
- export function documentGetInitialProps(_x4, _x5) {
84
- return _documentGetInitialProps.apply(this, arguments);
85
- }
86
- function _documentGetInitialProps() {
87
- _documentGetInitialProps = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(ctx, options) {
88
- var _options$emotionCache, _options$plugins;
89
- var cache, _createEmotionServer, extractCriticalToChunks;
90
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
91
- while (1) switch (_context4.prev = _context4.next) {
92
- case 0:
93
- // Resolution order
94
- //
95
- // On the server:
96
- // 1. app.getInitialProps
97
- // 2. page.getInitialProps
98
- // 3. document.getInitialProps
99
- // 4. app.render
100
- // 5. page.render
101
- // 6. document.render
102
- //
103
- // On the server with error:
104
- // 1. document.getInitialProps
105
- // 2. app.render
106
- // 3. page.render
107
- // 4. document.render
108
- //
109
- // On the client
110
- // 1. app.getInitialProps
111
- // 2. page.getInitialProps
112
- // 3. app.render
113
- // 4. page.render
114
- // You can consider sharing the same Emotion cache between all the SSR requests to speed up performance.
115
- // However, be aware that it can have global side effects.
116
- cache = (_options$emotionCache = options == null ? void 0 : options.emotionCache) != null ? _options$emotionCache : createEmotionCache(); // The createEmotionServer has to be called directly after the cache creation due to the side effect of cache.compat = true,
117
- // otherwise the <style> tag will not come with the HTML string from the server.
118
- _createEmotionServer = createEmotionServer(cache), extractCriticalToChunks = _createEmotionServer.extractCriticalToChunks;
119
- return _context4.abrupt("return", createGetInitialProps([{
120
- enhanceApp: function enhanceApp(App) {
121
- return function EnhanceApp(props) {
122
- return /*#__PURE__*/_jsx(App, _extends({
123
- emotionCache: cache
124
- }, props));
125
- };
126
- },
127
- resolveProps: function () {
128
- var _resolveProps = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(initialProps) {
129
- var _extractCriticalToChu, styles;
130
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
131
- while (1) switch (_context3.prev = _context3.next) {
132
- case 0:
133
- _extractCriticalToChu = extractCriticalToChunks(initialProps.html), styles = _extractCriticalToChu.styles;
134
- return _context3.abrupt("return", _extends({}, initialProps, {
135
- emotionStyleTags: styles.map(function (style) {
136
- return /*#__PURE__*/_jsx("style", {
137
- "data-emotion": "".concat(style.key, " ").concat(style.ids.join(' ')),
138
- // eslint-disable-next-line react/no-danger
139
- dangerouslySetInnerHTML: {
140
- __html: style.css
141
- }
142
- }, style.key);
143
- })
144
- }));
145
- case 2:
146
- case "end":
147
- return _context3.stop();
148
- }
149
- }, _callee3);
150
- }));
151
- function resolveProps(_x6) {
152
- return _resolveProps.apply(this, arguments);
153
- }
154
- return resolveProps;
155
- }()
156
- }].concat(_toConsumableArray((_options$plugins = options == null ? void 0 : options.plugins) != null ? _options$plugins : [])))(ctx));
157
- case 3:
158
- case "end":
159
- return _context4.stop();
160
- }
161
- }, _callee4);
162
- }));
163
- return _documentGetInitialProps.apply(this, arguments);
164
- }
@@ -1 +0,0 @@
1
- export * from '../v13-appRouter';
@@ -1 +0,0 @@
1
- export * from '../v13-pagesRouter';