-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It is now in sync with the base-ui docs design.
- Loading branch information
Brijesh Bittu
committed
Feb 8, 2025
1 parent
0cd6daa
commit 979e996
Showing
87 changed files
with
3,054 additions
and
3,068 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
REPO_ROOT=https://github.com/mui/pigment-css | ||
DEFAULT_BRANCH=master | ||
|
||
SOURCE_CODE_REPO=https://github.com/mui/pigment-css | ||
SOURCE_GITHUB_BRANCH=master |
This file was deleted.
Oops, something went wrong.
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,4 +1,36 @@ | ||
# Pigment CSS Docs app | ||
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). | ||
|
||
This is the Pigment CSS docs application bootstrapped with Next.js 15. It uses App Router and | ||
Pigment CSS for styling. | ||
## Getting Started | ||
|
||
First, run the development server: | ||
|
||
```bash | ||
npm run dev | ||
# or | ||
yarn dev | ||
# or | ||
pnpm dev | ||
# or | ||
bun dev | ||
``` | ||
|
||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
|
||
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. | ||
|
||
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. | ||
|
||
## Learn More | ||
|
||
To learn more about Next.js, take a look at the following resources: | ||
|
||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. | ||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. | ||
|
||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! | ||
|
||
## Deploy on Vercel | ||
|
||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. | ||
|
||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. | ||
Check warning on line 36 in docs/README.md
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,16 @@ | ||
import { dirname } from "path"; | ||
import { fileURLToPath } from "url"; | ||
import { FlatCompat } from "@eslint/eslintrc"; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = dirname(__filename); | ||
|
||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
}); | ||
|
||
const eslintConfig = [ | ||
...compat.extends("next/core-web-vitals", "next/typescript"), | ||
]; | ||
|
||
export default eslintConfig; |
This file was deleted.
Oops, something went wrong.
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,54 +1,46 @@ | ||
import * as url from 'url'; | ||
import * as path from 'path'; | ||
import type { NextConfig } from 'next'; | ||
// @ts-ignore | ||
// eslint-disable-next-line no-restricted-imports | ||
import nextMdx from '@next/mdx'; | ||
import withPigment, { type PigmentCSSConfig } from '@pigment-css/plugin/nextjs'; | ||
import remarkGfm from 'remark-gfm'; | ||
import remarkTypography from 'remark-typography'; | ||
import rehypeExtractToc from '@stefanprobst/rehype-extract-toc'; | ||
// @ts-expect-error This file doesn't have TS definitions. | ||
import withDocsInfra from '@mui/monorepo/docs/nextConfigDocsInfra.js'; | ||
import { withPigment, extendTheme } from '@pigment-css/nextjs-plugin'; | ||
|
||
import { theme as baseTheme } from './src/theme'; | ||
import theme from './src/theme'; | ||
import rootPackage from '../package.json'; | ||
|
||
const currentDirectory = url.fileURLToPath(new URL('.', import.meta.url)); | ||
const DATA_DIR = path.join(currentDirectory, 'data'); | ||
const withMdx = nextMdx({ | ||
options: { | ||
remarkPlugins: [remarkGfm, remarkTypography], | ||
rehypePlugins: [rehypeExtractToc], | ||
}, | ||
}); | ||
|
||
const isProd = process.env.NODE_ENV === 'production'; | ||
|
||
const nextConfig: NextConfig = { | ||
trailingSlash: false, | ||
pageExtensions: ['mdx', 'tsx'], | ||
env: { | ||
DATA_DIR, | ||
CURRENT_VERSION: rootPackage.version, | ||
}, | ||
distDir: 'export', | ||
output: process.env.NODE_ENV === 'production' ? 'export' : undefined, | ||
eslint: { | ||
ignoreDuringBuilds: true, | ||
}, | ||
devIndicators: { | ||
buildActivity: true, | ||
buildActivityPosition: 'bottom-right', | ||
appIsrStatus: false, | ||
LIB_VERSION: rootPackage.version, | ||
APP_NAME: 'Pigment CSS', | ||
GITHUB: 'https://github.com/mui/pigment-css', | ||
NPM: 'https://www.npmjs.com/package/@pigment-css/core', | ||
}, | ||
...(isProd && { distDir: 'export', output: 'export' }), | ||
experimental: { | ||
esmExternals: true, | ||
workerThreads: false, | ||
turbo: undefined, | ||
}, | ||
}; | ||
|
||
const theme = extendTheme({ | ||
colorSchemes: { | ||
light: baseTheme, | ||
}, | ||
}); | ||
|
||
export default withPigment(withDocsInfra(nextConfig), { | ||
const pigmentConfig: PigmentCSSConfig = { | ||
theme, | ||
displayName: true, | ||
sourceMap: process.env.NODE_ENV !== 'production', | ||
babelOptions: { | ||
plugins: [ | ||
'@babel/plugin-proposal-explicit-resource-management', | ||
'@babel/plugin-transform-unicode-property-regex', | ||
], | ||
}, | ||
}); | ||
transformSx: false, | ||
displayName: !isProd, | ||
sourceMap: !isProd, | ||
include: /\.pigment\.tsx?$/, | ||
}; | ||
|
||
export default withPigment(withMdx(withDocsInfra(nextConfig)), pigmentConfig); |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/_next/*.js | ||
Cache-Control: public, max-age=31536000, immutable | ||
|
||
/static/*.ico | ||
Content-Type: image/x-icon | ||
|
||
/performance/* | ||
X-Robots-Tag: noindex | ||
|
||
/experiments/* | ||
X-Robots-Tag: noindex | ||
|
||
/* | ||
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload | ||
# Block usage in iframes. | ||
X-Frame-Options: SAMEORIGIN | ||
# Force the browser to trust the Content-Type header | ||
# https://stackoverflow.com/questions/18337630/what-is-x-content-type-options-nosniff | ||
X-Content-Type-Options: nosniff | ||
X-XSS-Protection: 1; mode=block | ||
Referrer-Policy: strict-origin-when-cross-origin | ||
# TODO: progressively reduce the CSP scopes | ||
# Start with a wildcard, using https://github.com/mui/toolpad/blob/f4c4eb046b352e4fc00729c3bed605e671b040c4/packages/toolpad-studio/src/server/index.ts#L241 | ||
Content-Security-Policy: default-src * data: mediastream: blob: filesystem: about: ws: wss: 'unsafe-eval' 'wasm-unsafe-eval' 'unsafe-inline'; script-src * data: blob: 'unsafe-inline' 'unsafe-eval'; script-src-elem * data: blob: 'unsafe-inline'; connect-src * data: blob: 'unsafe-inline'; img-src * data: blob: 'unsafe-inline'; media-src * data: blob: 'unsafe-inline'; frame-src * data: blob: ; style-src * data: blob: 'unsafe-inline'; font-src * data: blob: 'unsafe-inline'; frame-ancestors *; |
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,4 @@ | ||
# Algolia-Crawler-Verif: 98C49CAFF7AEED76 | ||
|
||
User-agent: * | ||
Allow: / |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.