Socket
Socket
Sign inDemoInstall

@mui/material-nextjs

Package Overview
Dependencies
Maintainers
11
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mui/material-nextjs - npm Package Compare versions

Comparing version 6.0.0-dev.240424162023-9968b4889d to 6.0.0

8

modern/v13-appRouter/appRouterV13.js
'use client';
import _extends from "@babel/runtime/helpers/esm/extends";
import * as React from 'react';

@@ -21,5 +20,6 @@ import createCache from '@emotion/cache';

const [registry] = React.useState(() => {
const cache = createCache(_extends({}, options, {
const cache = createCache({
...options,
key: options?.key ?? 'mui'
}));
});
cache.compat = true;

@@ -65,3 +65,3 @@ const prevInsert = cache.insert;

const style = registry.cache.inserted[name];
if (typeof style !== 'boolean') {
if (typeof style === 'string') {
if (isGlobal) {

@@ -68,0 +68,0 @@ globals.push({

@@ -1,2 +0,2 @@

export { default as AppRouterCacheProvider } from './appRouterV13';
export * from './appRouterV13';
export { default as AppRouterCacheProvider } from "./appRouterV13.js";
export * from "./appRouterV13.js";

@@ -1,2 +0,2 @@

export * from './pagesRouterV13Document';
export * from './pagesRouterV13App';
export * from "./pagesRouterV13Document.js";
export * from "./pagesRouterV13App.js";
import * as React from 'react';
import { CacheProvider } from '@emotion/react';
import createEmotionCache from './createCache';
import createEmotionCache from "./createCache.js";
import { jsx as _jsx } from "react/jsx-runtime";

@@ -5,0 +5,0 @@ const defaultEmotionCache = createEmotionCache();

@@ -1,2 +0,1 @@

import _extends from "@babel/runtime/helpers/esm/extends";
var _meta;

@@ -6,3 +5,3 @@ import * as React from 'react';

import Document from 'next/document';
import createEmotionCache from './createCache';
import createEmotionCache from "./createCache.js";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";

@@ -67,5 +66,6 @@ /**

enhanceApp: App => function EnhanceApp(props) {
return /*#__PURE__*/_jsx(App, _extends({
emotionCache: cache
}, props));
return /*#__PURE__*/_jsx(App, {
emotionCache: cache,
...props
});
},

@@ -76,3 +76,4 @@ resolveProps: async initialProps => {

} = extractCriticalToChunks(initialProps.html);
return _extends({}, initialProps, {
return {
...initialProps,
emotionStyleTags: styles.map(style => /*#__PURE__*/_jsx("style", {

@@ -85,5 +86,5 @@ "data-emotion": `${style.key} ${style.ids.join(' ')}`,

}, style.key))
});
};
}
}, ...(options?.plugins ?? [])])(ctx);
}

@@ -1,1 +0,1 @@

export * from '../v13-appRouter';
export * from "../v13-appRouter/index.js";

@@ -1,1 +0,1 @@

export * from '../v13-pagesRouter';
export * from "../v13-pagesRouter/index.js";

@@ -9,3 +9,2 @@ "use strict";

exports.default = AppRouterCacheProvider;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var React = _interopRequireWildcard(require("react"));

@@ -30,6 +29,6 @@ var _cache = _interopRequireDefault(require("@emotion/cache"));

const [registry] = React.useState(() => {
var _options$key;
const cache = (0, _cache.default)((0, _extends2.default)({}, options, {
key: (_options$key = options == null ? void 0 : options.key) != null ? _options$key : 'mui'
}));
const cache = (0, _cache.default)({
...options,
key: options?.key ?? 'mui'
});
cache.compat = true;

@@ -40,3 +39,3 @@ const prevInsert = cache.insert;

cache.insert = (...args) => {
if (options != null && options.enableCssLayer) {
if (options?.enableCssLayer) {
args[1].styles = `@layer mui {${args[1].styles}}`;

@@ -76,3 +75,3 @@ }

const style = registry.cache.inserted[name];
if (typeof style !== 'boolean') {
if (typeof style === 'string') {
if (isGlobal) {

@@ -94,3 +93,3 @@ globals.push({

}) => /*#__PURE__*/(0, _jsxRuntime.jsx)("style", {
nonce: options == null ? void 0 : options.nonce,
nonce: options?.nonce,
"data-emotion": `${registry.cache.key}-global ${name}`

@@ -103,3 +102,3 @@ // eslint-disable-next-line react/no-danger

}, name)), styles && /*#__PURE__*/(0, _jsxRuntime.jsx)("style", {
nonce: options == null ? void 0 : options.nonce,
nonce: options?.nonce,
"data-emotion": dataEmotionAttribute

@@ -106,0 +105,0 @@ // eslint-disable-next-line react/no-danger

@@ -18,3 +18,3 @@ "use strict";

const emotionInsertionPoint = document.querySelector('meta[name="emotion-insertion-point"]');
insertionPoint = emotionInsertionPoint != null ? emotionInsertionPoint : undefined;
insertionPoint = emotionInsertionPoint ?? undefined;
}

@@ -21,0 +21,0 @@ return (0, _cache.default)({

@@ -10,3 +10,2 @@ "use strict";

exports.documentGetInitialProps = documentGetInitialProps;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var React = _interopRequireWildcard(require("react"));

@@ -46,3 +45,2 @@ var _createInstance = _interopRequireDefault(require("@emotion/server/create-instance"));

async function documentGetInitialProps(ctx, options) {
var _options$emotionCache, _options$plugins;
// Resolution order

@@ -72,3 +70,3 @@ //

// However, be aware that it can have global side effects.
const cache = (_options$emotionCache = options == null ? void 0 : options.emotionCache) != null ? _options$emotionCache : (0, _createCache.default)();
const cache = options?.emotionCache ?? (0, _createCache.default)();
// The createEmotionServer has to be called directly after the cache creation due to the side effect of cache.compat = true,

@@ -81,5 +79,6 @@ // otherwise the <style> tag will not come with the HTML string from the server.

enhanceApp: App => function EnhanceApp(props) {
return /*#__PURE__*/(0, _jsxRuntime.jsx)(App, (0, _extends2.default)({
emotionCache: cache
}, props));
return /*#__PURE__*/(0, _jsxRuntime.jsx)(App, {
emotionCache: cache,
...props
});
},

@@ -90,3 +89,4 @@ resolveProps: async initialProps => {

} = extractCriticalToChunks(initialProps.html);
return (0, _extends2.default)({}, initialProps, {
return {
...initialProps,
emotionStyleTags: styles.map(style => /*#__PURE__*/(0, _jsxRuntime.jsx)("style", {

@@ -99,5 +99,5 @@ "data-emotion": `${style.key} ${style.ids.join(' ')}`,

}, style.key))
});
};
}
}, ...((_options$plugins = options == null ? void 0 : options.plugins) != null ? _options$plugins : [])])(ctx);
}, ...(options?.plugins ?? [])])(ctx);
}
{
"name": "@mui/material-nextjs",
"version": "6.0.0-dev.240424162023-9968b4889d",
"version": "6.0.0",
"private": false,

@@ -27,11 +27,11 @@ "author": "MUI Team",

"dependencies": {
"@babel/runtime": "^7.24.4"
"@babel/runtime": "^7.25.0"
},
"peerDependencies": {
"@emotion/cache": "^11.11.0",
"@emotion/react": "^11.11.4",
"@emotion/server": "^11.11.0",
"@types/react": "^17.0.0 || ^18.0.0",
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
"next": "^13.0.0 || ^14.0.0",
"react": "^17.0.0 || ^18.0.0",
"@mui/material": "^6.0.0-dev.240424162023-9968b4889d"
"react": "^17.0.0 || ^18.0.0 || ^19.0.0"
},

@@ -55,4 +55,4 @@ "peerDependenciesMeta": {

"engines": {
"node": ">=12.0.0"
"node": ">=14.0.0"
}
}
'use client';
import _extends from "@babel/runtime/helpers/esm/extends";
import * as React from 'react';

@@ -21,5 +20,6 @@ import createCache from '@emotion/cache';

const [registry] = React.useState(() => {
const cache = createCache(_extends({}, options, {
const cache = createCache({
...options,
key: options?.key ?? 'mui'
}));
});
cache.compat = true;

@@ -65,3 +65,3 @@ const prevInsert = cache.insert;

const style = registry.cache.inserted[name];
if (typeof style !== 'boolean') {
if (typeof style === 'string') {
if (isGlobal) {

@@ -68,0 +68,0 @@ globals.push({

@@ -1,2 +0,2 @@

export { default as AppRouterCacheProvider } from './appRouterV13';
export * from './appRouterV13';
export { default as AppRouterCacheProvider } from "./appRouterV13.js";
export * from "./appRouterV13.js";

@@ -1,2 +0,2 @@

export * from './pagesRouterV13Document';
export * from './pagesRouterV13App';
export * from "./pagesRouterV13Document.js";
export * from "./pagesRouterV13App.js";
import * as React from 'react';
import { CacheProvider } from '@emotion/react';
import createEmotionCache from './createCache';
import createEmotionCache from "./createCache.js";
import { jsx as _jsx } from "react/jsx-runtime";

@@ -5,0 +5,0 @@ const defaultEmotionCache = createEmotionCache();

@@ -6,3 +6,3 @@ import * as React from 'react';

interface Plugin {
enhanceApp: (App: React.ComponentType<React.ComponentProps<AppType>>) => (props: any) => JSX.Element;
enhanceApp: (App: React.ComponentType<React.ComponentProps<AppType>>) => (props: any) => React.JSX.Element;
resolveProps: (initialProps: DocumentInitialProps) => Promise<DocumentInitialProps>;

@@ -15,3 +15,3 @@ }

export interface DocumentHeadTagsProps {
emotionStyleTags: React.ReactElement[];
emotionStyleTags: React.ReactElement<any>[];
}

@@ -23,4 +23,4 @@ export declare function DocumentHeadTags(props: DocumentHeadTagsProps): React.JSX.Element;

}): Promise<import("next/dist/shared/lib/utils").RenderPageResult & {
styles?: React.ReactFragment | JSX.Element | React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | undefined;
styles?: React.ReactElement[] | React.ReactFragment | JSX.Element;
} & DocumentHeadTagsProps>;
export {};

@@ -1,2 +0,1 @@

import _extends from "@babel/runtime/helpers/esm/extends";
var _meta;

@@ -6,3 +5,3 @@ import * as React from 'react';

import Document from 'next/document';
import createEmotionCache from './createCache';
import createEmotionCache from "./createCache.js";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";

@@ -67,5 +66,6 @@ /**

enhanceApp: App => function EnhanceApp(props) {
return /*#__PURE__*/_jsx(App, _extends({
emotionCache: cache
}, props));
return /*#__PURE__*/_jsx(App, {
emotionCache: cache,
...props
});
},

@@ -76,3 +76,4 @@ resolveProps: async initialProps => {

} = extractCriticalToChunks(initialProps.html);
return _extends({}, initialProps, {
return {
...initialProps,
emotionStyleTags: styles.map(style => /*#__PURE__*/_jsx("style", {

@@ -85,5 +86,5 @@ "data-emotion": `${style.key} ${style.ids.join(' ')}`,

}, style.key))
});
};
}
}, ...(options?.plugins ?? [])])(ctx);
}

@@ -1,1 +0,1 @@

export * from '../v13-appRouter';
export * from "../v13-appRouter/index.js";

@@ -1,1 +0,1 @@

export * from '../v13-pagesRouter';
export * from "../v13-pagesRouter/index.js";

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc