Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"@eslint/compat": "2.1.1",
"@mui/internal-babel-plugin-minify-errors": "3.0.1-canary.4",
"@mui/internal-bundle-size-checker": "1.1.1-canary.9",
"@mui/internal-code-infra": "0.1.1-canary.37",
"@mui/internal-code-infra": "0.1.1-canary.38",
"@mui/internal-docs-infra": "catalog:docs",
"@mui/internal-docs-utils": "workspace:^",
"@mui/internal-netlify-cache": "0.1.1-canary.2",
Expand Down
2 changes: 1 addition & 1 deletion packages-internal/api-docs-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"test": "pnpm --workspace-root test:unit --project \"*:@mui/internal-api-docs-builder\"",
"typescript": "tsc -p tsconfig.json",
"build": "code-infra build --tsgo --flat --skipBabelRuntimeCheck"
"build": "code-infra build-new"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages-internal/core-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"homepage": "https://github.com/mui/material-ui/tree/master/packages-internal/core-docs",
"scripts": {
"build": "code-infra build --tsgo --flat --bundle esm --copy \"src/translations/translations.json\" --copy \"src/nextFonts/fonts\" --copy \"src/ThemeContext/syntax.css\"",
"build": "code-infra build-new --bundle esm --copy \"src/translations/translations.json\" --copy \"src/nextFonts/fonts\" --copy \"src/ThemeContext/syntax.css\"",
"release": "pnpm build && pnpm publish",
"test": "exit 0",
"typescript": "tsc -p tsconfig.json"
Expand Down
6 changes: 5 additions & 1 deletion packages-internal/core-docs/src/AppLayout/icons/navIcons.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import type SvgIcon from '@mui/material/SvgIcon';
import ArticleRoundedIcon from '@mui/icons-material/ArticleRounded';
import VisibilityRoundedIcon from '@mui/icons-material/VisibilityRounded';
import BookRoundedIcon from '@mui/icons-material/BookRounded';
import ChromeReaderModeRoundedIcon from '@mui/icons-material/ChromeReaderModeRounded';
import WebRoundedIcon from '@mui/icons-material/WebRounded';

export const standardNavIcons = {
type NavIconName = 'ReaderIcon' | 'BookIcon' | 'DescriptionIcon' | 'VisibilityIcon' | 'WebIcon';

// Without the annotation, the declaration points at `packages/mui-material/src`.
export const standardNavIcons: Record<NavIconName, typeof SvgIcon> = {
ReaderIcon: ChromeReaderModeRoundedIcon,
BookIcon: BookRoundedIcon,
DescriptionIcon: ArticleRoundedIcon,
Expand Down
16 changes: 0 additions & 16 deletions packages-internal/core-docs/src/DocsApp/VersionsContext.js

This file was deleted.

11 changes: 11 additions & 0 deletions packages-internal/core-docs/src/DocsApp/VersionsContext.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from 'react';

export type VersionsContextValue = Array<{ version: string; url: string }>;

const VersionsContext = React.createContext<VersionsContextValue>(null!);

if (process.env.NODE_ENV !== 'production') {
VersionsContext.displayName = 'VersionsContext';
}

export default VersionsContext;
1 change: 0 additions & 1 deletion packages-internal/core-docs/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"emitDeclarationOnly": true,
"outDir": "build",
"rootDir": "./src",
"tsBuildInfoFile": "build/tsconfig.build.tsbuildinfo",
"paths": {
"@mui/internal-markdown": ["../markdown/index.d.mts"],
"@mui/internal-markdown/prism": ["../markdown/prism.d.mts"]
Expand Down
2 changes: 1 addition & 1 deletion packages-internal/docs-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"scripts": {
"prebuild": "rimraf ./build",
"build": "code-infra build --tsgo --flat --skip-babel-runtime-check",
"build": "code-infra build-new",
"typescript": "tsc -p tsconfig.json",
"release:publish": "pnpm build && pnpm publish --tag latest",
"release:publish:dry-run": "pnpm build && pnpm publish --tag latest --registry=\"http://localhost:4873/\""
Expand Down
1 change: 0 additions & 1 deletion packages-internal/docs-utils/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"declaration": true,
"noEmit": false,
"composite": true,
"tsBuildInfoFile": "./build/.tsbuildinfo",
"target": "ES2020",
"types": ["node"]
},
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-envinfo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"homepage": "https://github.com/mui/material-ui/tree/HEAD/packages/mui-envinfo",
"files": [],
"scripts": {
"build": "code-infra build --flat --bundle cjs --buildTypes false --skipBabelRuntimeCheck"
"build": "code-infra build-new --bundle cjs --buildTypes false"
},
"dependencies": {
"envinfo": "^7.21.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/mui-icons-material/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"author": "MUI Team",
"description": "Material Design icons distributed as SVG React components.",
"license": "MIT",
"main": "./src/index.js",
"keywords": [
"react",
"react-component",
Expand All @@ -29,7 +28,7 @@
"scripts": {
"build": "rimraf build && shx cp -r lib/ build/ && pnpm build:copy-files && pnpm build:typings && pnpm build:pkg-json",
"build:pkg-json": "node ./scripts/merge-package-json.mjs",
"build:lib": "code-infra build --flat --hasLargeFiles --skipMainCheck --buildTypes false --no-expand",
"build:lib": "code-infra build-new --buildTypes false --no-expand && node ./scripts/strip-icon-banners.mjs",
"build:lib:clean": "rimraf lib && pnpm build:lib && shx cp -R build lib && rimraf build",
"build:copy-files": "shx cp README.md ../../CHANGELOG.md ../../LICENSE build",
"build:typings": "node ./scripts/create-typings.mjs",
Expand Down Expand Up @@ -77,6 +76,7 @@
".": "./src/index.js",
"./*": "./src/*.js",
"./index*": null,
"./utils/createSvgIcon": "./src/utils/createSvgIcon.js",
"./utils/*": null
}
}
1 change: 1 addition & 0 deletions packages/mui-icons-material/scripts/merge-package-json.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const packageDir = path.resolve(currentDirectory, '..');
// and https://github.com/microsoft/TypeScript/issues/60854.
const wildcardExports = {
'./package.json': './package.json',
'./_virtual/*': null,
'.': {
require: './index.js',
import: './index.mjs',
Expand Down
31 changes: 31 additions & 0 deletions packages/mui-icons-material/scripts/strip-icon-banners.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* eslint-disable no-console */

@brijeshb42 brijeshb42 Nov 20, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is optional to strip banners from each file to reduce the package size due to the huge number of redundant files in the package.

import path from 'path';
import * as fs from 'fs/promises';
import glob from 'fast-glob';
import url from 'url';

const currentDirectory = url.fileURLToPath(new URL('.', import.meta.url));
const BUILD_DIR = path.resolve(currentDirectory, '../build');
const BANNER_END = ' */\n';

// `code-infra build-new` adds the license header to every file. With ~21k icon files it adds
// ~4 MB to the package, so only the index files keep it, as with `code-infra build`.
async function run() {
const files = await glob(['**/*.{js,mjs}', '!index.{js,mjs}'], { cwd: BUILD_DIR });
await Promise.all(
files.map(async (file) => {
const filePath = path.join(BUILD_DIR, file);
const code = await fs.readFile(filePath, 'utf8');
if (!code.startsWith('/**\n * @mui/icons-material v')) {
return;
}
await fs.writeFile(filePath, code.slice(code.indexOf(BANNER_END) + BANNER_END.length));
}),
);
console.log(`Removed the license header from ${files.length} files.`);
}

run().catch((error) => {
console.error(error);
process.exit(1);
});
2 changes: 1 addition & 1 deletion packages/mui-lab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"url": "https://opencollective.com/mui-org"
},
"scripts": {
"build": "code-infra build --tsgo --flat",
"build": "code-infra build-new",
"release": "pnpm build && pnpm publish",
"test": "pnpm --workspace-root test:unit --project \"*:@mui/lab\"",
"typescript": "tsc -p tsconfig.json"
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"url": "https://opencollective.com/mui-org"
},
"scripts": {
"build": "code-infra build --tsgo --flat",
"build": "code-infra build-new --cjsCopy",
"release": "pnpm build && pnpm publish",
"test": "pnpm --workspace-root test:unit --project \"*:@mui/material-nextjs\"",
"typescript": "tsc -p tsconfig.json",
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material-pigment-css/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"url": "https://opencollective.com/mui-org"
},
"scripts": {
"build": "code-infra build --tsgo --flat --copy \"src/styles.css\"",
"build": "code-infra build-new --copy \"src/styles.css\"",
"release": "pnpm build && pnpm publish",
"test": "pnpm --workspace-root test:unit --project \"*:@mui/material-pigment-css\"",
"typescript": "tsc -p tsconfig.json"
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"scripts": {
"prebuild": "node ./scripts/stagePublishedDocs.mjs",
"build": "code-infra build --tsgo --flat --copy \"published-docs/**:docs\"",
"build": "code-infra build-new --copy \"published-docs/**:docs\"",
"release": "pnpm build && pnpm publish",
"test": "pnpm --workspace-root test:unit --project \"*:@mui/material\"",
"typescript": "tsc -p tsconfig.json",
Expand Down
7 changes: 4 additions & 3 deletions packages/mui-material/src/Popover/Popover.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export interface PopoverPosition {

export type PopoverReference = 'anchorEl' | 'anchorPosition' | 'none';

interface PopoverVirtualElement {
export interface PopoverVirtualElement {
getBoundingClientRect: () => DOMRect;
nodeType: Node['ELEMENT_NODE'];
}
Expand Down Expand Up @@ -210,8 +210,9 @@ export function getOffsetLeft(
horizontal: number | 'center' | 'right' | 'left',
): number;

type PopoverRootProps = NonNullable<PopoverProps['slotProps']>['root'];
type PopoverPaperProps = NonNullable<PopoverProps['slotProps']>['paper'];
export type PopoverRootProps = NonNullable<PopoverProps['slotProps']>['root'];

export type PopoverPaperProps = NonNullable<PopoverProps['slotProps']>['paper'];

export declare const PopoverRoot: React.FC<PopoverRootProps>;
export declare const PopoverPaper: React.FC<PopoverPaperProps>;
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-private-theming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"url": "https://opencollective.com/mui-org"
},
"scripts": {
"build": "code-infra build --tsgo --flat",
"build": "code-infra build-new",
"release": "pnpm build && pnpm publish",
"test": "pnpm --workspace-root test:unit --project \"*:@mui/private-theming\"",
"typescript": "tsc -p tsconfig.json"
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-styled-engine-sc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"url": "https://opencollective.com/mui-org"
},
"scripts": {
"build": "code-infra build --tsgo --flat",
"build": "code-infra build-new",
"release": "pnpm build && pnpm publish",
"test": "pnpm --workspace-root test:unit --project \"*:@mui/styled-engine-sc\"",
"typescript": "tsc -p tsconfig.json"
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-styled-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"url": "https://opencollective.com/mui-org"
},
"scripts": {
"build": "code-infra build --tsgo --flat",
"build": "code-infra build-new",
"release": "pnpm build && pnpm publish",
"test": "pnpm --workspace-root test:unit --project \"*:@mui/styled-engine\"",
"typescript": "tsc -p tsconfig.json",
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-stylis-plugin-rtl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"url": "https://opencollective.com/mui-org"
},
"scripts": {
"build": "code-infra build --tsgo --flat",
"build": "code-infra build-new",
"release": "pnpm build && pnpm publish",
"test": "pnpm --workspace-root test:unit --project \"*:@mui/stylis-plugin-rtl\"",
"typescript": "tsc -p tsconfig.json",
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"url": "https://opencollective.com/mui-org"
},
"scripts": {
"build": "code-infra build --tsgo --flat",
"build": "code-infra build-new",
"release": "pnpm build && pnpm publish",
"test": "pnpm --workspace-root test:unit --project \"*:@mui/system\"",
"typescript": "tsc -p tsconfig.json",
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"homepage": "https://github.com/mui/material-ui/tree/master/packages/mui-types",
"scripts": {
"build": "code-infra build --tsgo --flat",
"build": "code-infra build-new",
"release": "pnpm build && pnpm publish",
"test": "echo 'No runtime test. Type tests are run with the `typescript` script.'",
"typescript": "tsc -p tsconfig.json",
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"url": "https://opencollective.com/mui-org"
},
"scripts": {
"build": "code-infra build --tsgo --flat",
"build": "code-infra build-new",
"release": "pnpm build && pnpm publish",
"test": "pnpm --workspace-root test:unit --project \"*:@mui/utils\"",
"typescript": "tsc -p tsconfig.json",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading