forked from mui/toolpad
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
21 changed files
with
1,924 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
|
||
engine-strict = true | ||
auto-install-peers = true | ||
strict-peer-dependencies=false | ||
strict-peer-dependencies = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
const productionPlugins = [ | ||
['babel-plugin-react-remove-properties', { properties: ['data-mui-test'] }], | ||
]; | ||
|
||
module.exports = function getBabelConfig(api) { | ||
const useCommonjs = api.env(['node']); | ||
|
||
const presets = [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
bugfixes: true, | ||
browserslistEnv: process.env.BABEL_ENV || process.env.NODE_ENV, | ||
debug: process.env.MUI_BUILD_VERBOSE === 'true', | ||
modules: useCommonjs ? 'commonjs' : false, | ||
}, | ||
], | ||
[ | ||
'@babel/preset-react', | ||
{ | ||
runtime: 'automatic', | ||
}, | ||
], | ||
'@babel/preset-typescript', | ||
]; | ||
|
||
const plugins = [ | ||
[ | ||
'@babel/plugin-transform-runtime', | ||
{ | ||
useESModules: !useCommonjs, | ||
// any package needs to declare 7.4.4 as a runtime dependency. default is ^7.0.0 | ||
version: '^7.4.4', | ||
}, | ||
], | ||
[ | ||
'babel-plugin-transform-react-remove-prop-types', | ||
{ | ||
mode: 'unsafe-wrap', | ||
}, | ||
], | ||
]; | ||
|
||
if (process.env.NODE_ENV === 'production') { | ||
plugins.push(...productionPlugins); | ||
} | ||
|
||
return { | ||
assumptions: { | ||
noDocumentAll: true, | ||
}, | ||
presets, | ||
plugins, | ||
ignore: [/@babel[\\|/]runtime/], // Fix a Windows issue. | ||
overrides: [ | ||
{ | ||
exclude: /\.test\.(js|ts|tsx)$/, | ||
plugins: ['@babel/plugin-transform-react-constant-elements'], | ||
}, | ||
], | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,71 @@ | ||
{ | ||
"name": "@toolpad/core", | ||
"version": "0.1.55", | ||
"author": "Toolpad Team", | ||
"description": "Dashboard framework powered by MUI.", | ||
"main": "./build/index.js", | ||
"exports": { | ||
"./package.json": "./package.json", | ||
".": { | ||
"types": "./build/index.d.ts", | ||
"default": "./build/index.js" | ||
}, | ||
"./*": { | ||
"types": "./build/*/index.d.ts", | ||
"default": "./build/*/index.js" | ||
} | ||
}, | ||
"keywords": [ | ||
"react", | ||
"mui", | ||
"toolpad" | ||
], | ||
"description": "Build dashboards fast.", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/mui/mui-toolpad.git", | ||
"directory": "packages/toolpad-core" | ||
}, | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/mui/mui-toolpad/issues" | ||
}, | ||
"author": "Toolpad Team", | ||
"homepage": "https://github.com/mui/mui-toolpad#readme", | ||
"license": "MIT", | ||
"main": "./dist/index.cjs", | ||
"module": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"type": "module", | ||
"exports": { | ||
"./package.json": "./package.json", | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.js" | ||
}, | ||
"./*": { | ||
"types": "./dist/*.d.ts", | ||
"require": "./dist/*.cjs", | ||
"default": "./dist/*.js" | ||
} | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "tsup", | ||
"dev": "tsup --watch", | ||
"check-types": "tsup && tsc --noEmit", | ||
"build": "pnpm prebuild && pnpm build:node && pnpm build:stable && pnpm build:types && pnpm build:copy-files", | ||
"build:node": "node ../../scripts/build.mjs node", | ||
"build:stable": "node ../../scripts/build.mjs stable", | ||
"build:copy-files": "node ../../scripts/copyFiles.mjs", | ||
"build:types": "tsc -b tsconfig.build.json", | ||
"prebuild": "rimraf build tsconfig.build.tsbuildinfo", | ||
"dev": "pnpm build:stable --watch & pnpm build:types --watch", | ||
"check-types": "tsc --noEmit", | ||
"test": "vitest run" | ||
}, | ||
"dependencies": { | ||
"@emotion/cache": "11.11.0", | ||
"@emotion/react": "11.11.4", | ||
"@emotion/styled": "11.11.5", | ||
"@mui/icons-material": "5.15.17", | ||
"@mui/material": "5.15.17", | ||
"@mui/material-nextjs": "5.15.11", | ||
"next": "14.2.3", | ||
"react": "18.2.0", | ||
"react-dom": "^18.2.0" | ||
"react-dom": "18.2.0" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "18.3.1", | ||
"@types/react-dom": "18.3.0" | ||
}, | ||
"peerDependencies": { | ||
"@emotion/react": "^11", | ||
"@emotion/styled": "^11", | ||
"@mui/icons-material": "^5", | ||
"@mui/material": "^5", | ||
"@types/react": "^18", | ||
"next": "^14", | ||
"react": "^18", | ||
"react-dom": "^18" | ||
"react": "^18" | ||
}, | ||
"sideEffects": false, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"engines": { | ||
"node": ">=18" | ||
} | ||
}, | ||
"files": [ | ||
"build" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export { default } from './AppProvider'; | ||
'use client'; | ||
export * from './AppProvider'; |
9 changes: 9 additions & 0 deletions
9
packages/toolpad-core/src/DashboardLayout/DashboardLayout.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import * as React from 'react'; | ||
|
||
interface DashboardLayoutProps { | ||
children: React.ReactNode; | ||
} | ||
|
||
export function DashboardLayout({ children }: DashboardLayoutProps) { | ||
return children; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
'use client'; | ||
export * from './DashboardLayout'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
/* eslint-disable import/export */ | ||
export { AppProvider } from './AppProvider'; | ||
|
||
export { default as AppProvider } from './AppProvider'; | ||
export * from './AppProvider'; | ||
export { DashboardLayout } from './DashboardLayout'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
// This config is for emitting declarations (.d.ts) only | ||
// Actual .ts source files are transpiled via babel | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"composite": true, | ||
"declaration": true, | ||
"noEmit": false, | ||
"emitDeclarationOnly": true, | ||
"outDir": "build", | ||
"rootDir": "./src" | ||
}, | ||
"include": ["src/**/*.ts*"], | ||
"exclude": ["src/**/*.spec.ts*", "src/**/*.test.ts*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"allowJs": true, | ||
"isolatedModules": true, | ||
"module": "esnext", | ||
"moduleResolution": "bundler", | ||
"noEmit": false, | ||
"outDir": "./dist", | ||
"pretty": true, | ||
"preserveWatchOutput": true, | ||
"rootDir": "src", | ||
"target": "es5", | ||
"lib": ["es2020", "dom"], | ||
"jsx": "preserve", | ||
"moduleResolution": "node", | ||
"forceConsistentCasingInFileNames": true, | ||
"strict": true, | ||
"skipLibCheck": true, | ||
"target": "es2020", | ||
"types": ["react", "node"] | ||
"noEmit": true, | ||
"experimentalDecorators": true, | ||
"allowSyntheticDefaultImports": true, | ||
"noErrorTruncation": false, | ||
"allowJs": true, | ||
"paths": {} | ||
}, | ||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/index.ts"], | ||
"exclude": ["dist", "src/**/*.spec.*"] | ||
"include": ["src/**/*"], | ||
"exclude": ["build", "node_modules"] | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.