next 15.2.1-canary.0 → 15.2.1-canary.1
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.
Potentially problematic release.
This version of next might be problematic. Click here for more details.
- package/dist/bin/next +1 -1
- package/dist/build/index.js +2 -2
- package/dist/build/swc/index.js +1 -1
- package/dist/build/swc/options.d.ts +1 -0
- package/dist/build/swc/options.js +1 -0
- package/dist/build/swc/options.js.map +1 -1
- package/dist/build/webpack-config.js +2 -2
- package/dist/client/app-bootstrap.js +1 -1
- package/dist/client/components/react-dev-overlay/ui/components/errors/dialog/dialog.d.ts +1 -1
- package/dist/client/components/react-dev-overlay/ui/components/errors/dialog/dialog.js +1 -1
- package/dist/client/components/react-dev-overlay/ui/components/errors/dialog/dialog.js.map +1 -1
- package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-bottom-stack/index.d.ts +1 -1
- package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-bottom-stack/index.js +1 -1
- package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-bottom-stack/index.js.map +1 -1
- package/dist/client/components/react-dev-overlay/ui/components/errors/error-overlay-layout/error-overlay-layout.d.ts +1 -1
- package/dist/client/components/react-dev-overlay/ui/dev-overlay.js +2 -0
- package/dist/client/components/react-dev-overlay/ui/dev-overlay.js.map +1 -1
- package/dist/client/components/react-dev-overlay/ui/storybook/with-shadow-portal.js +2 -0
- package/dist/client/components/react-dev-overlay/ui/storybook/with-shadow-portal.js.map +1 -1
- package/dist/client/components/react-dev-overlay/ui/styles/base.js +2 -14
- package/dist/client/components/react-dev-overlay/ui/styles/base.js.map +1 -1
- package/dist/client/components/react-dev-overlay/ui/styles/colors.js +2 -22
- package/dist/client/components/react-dev-overlay/ui/styles/colors.js.map +1 -1
- package/dist/client/components/react-dev-overlay/ui/styles/dark-theme.d.ts +1 -0
- package/dist/client/components/react-dev-overlay/ui/styles/dark-theme.js +41 -0
- package/dist/client/components/react-dev-overlay/ui/styles/dark-theme.js.map +1 -0
- package/dist/client/index.js +1 -1
- package/dist/compiled/next-server/app-page-experimental.runtime.dev.js +3 -3
- package/dist/compiled/next-server/app-page-experimental.runtime.dev.js.map +1 -1
- package/dist/compiled/next-server/app-page.runtime.dev.js +3 -3
- package/dist/compiled/next-server/app-page.runtime.dev.js.map +1 -1
- package/dist/esm/build/index.js +2 -2
- package/dist/esm/build/swc/index.js +1 -1
- package/dist/esm/build/swc/options.js +1 -0
- package/dist/esm/build/swc/options.js.map +1 -1
- package/dist/esm/build/webpack-config.js +2 -2
- package/dist/esm/client/app-bootstrap.js +1 -1
- package/dist/esm/client/components/react-dev-overlay/ui/components/errors/dialog/dialog.js +1 -1
- package/dist/esm/client/components/react-dev-overlay/ui/components/errors/dialog/dialog.js.map +1 -1
- package/dist/esm/client/components/react-dev-overlay/ui/components/errors/error-overlay-bottom-stack/index.js +1 -1
- package/dist/esm/client/components/react-dev-overlay/ui/components/errors/error-overlay-bottom-stack/index.js.map +1 -1
- package/dist/esm/client/components/react-dev-overlay/ui/dev-overlay.js +2 -0
- package/dist/esm/client/components/react-dev-overlay/ui/dev-overlay.js.map +1 -1
- package/dist/esm/client/components/react-dev-overlay/ui/storybook/with-shadow-portal.js +2 -0
- package/dist/esm/client/components/react-dev-overlay/ui/storybook/with-shadow-portal.js.map +1 -1
- package/dist/esm/client/components/react-dev-overlay/ui/styles/base.js +2 -14
- package/dist/esm/client/components/react-dev-overlay/ui/styles/base.js.map +1 -1
- package/dist/esm/client/components/react-dev-overlay/ui/styles/colors.js +2 -23
- package/dist/esm/client/components/react-dev-overlay/ui/styles/colors.js.map +1 -1
- package/dist/esm/client/components/react-dev-overlay/ui/styles/dark-theme.js +25 -0
- package/dist/esm/client/components/react-dev-overlay/ui/styles/dark-theme.js.map +1 -0
- package/dist/esm/client/index.js +1 -1
- package/dist/esm/server/config.js +1 -1
- package/dist/esm/server/dev/hot-reloader-turbopack.js +1 -1
- package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
- package/dist/esm/server/lib/app-info-log.js +1 -1
- package/dist/esm/server/lib/start-server.js +1 -1
- package/dist/server/config.js +1 -1
- package/dist/server/dev/hot-reloader-turbopack.js +1 -1
- package/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/dist/server/lib/app-info-log.js +1 -1
- package/dist/server/lib/start-server.js +1 -1
- package/dist/telemetry/anonymous-meta.js +1 -1
- package/dist/telemetry/events/session-stopped.js +2 -2
- package/dist/telemetry/events/version.js +2 -2
- package/package.json +15 -15
package/dist/esm/build/index.js
CHANGED
@@ -296,7 +296,7 @@ export default async function build(dir, reactProductionProfiling = false, debug
|
|
296
296
|
const nextBuildSpan = trace('next-build', undefined, {
|
297
297
|
buildMode: experimentalBuildMode,
|
298
298
|
isTurboBuild: String(turboNextBuild),
|
299
|
-
version: "15.2.1-canary.
|
299
|
+
version: "15.2.1-canary.1"
|
300
300
|
});
|
301
301
|
NextBuildContext.nextBuildSpan = nextBuildSpan;
|
302
302
|
NextBuildContext.dir = dir;
|
@@ -655,7 +655,7 @@ export default async function build(dir, reactProductionProfiling = false, debug
|
|
655
655
|
// Files outside of the distDir can be "type": "module"
|
656
656
|
await writeFileUtf8(path.join(distDir, 'package.json'), '{"type": "commonjs"}');
|
657
657
|
// These are written to distDir, so they need to come after creating and cleaning distDr.
|
658
|
-
await recordFrameworkVersion("15.2.1-canary.
|
658
|
+
await recordFrameworkVersion("15.2.1-canary.1");
|
659
659
|
await updateBuildDiagnostics({
|
660
660
|
buildStage: 'start'
|
661
661
|
});
|
@@ -11,7 +11,7 @@ import { isDeepStrictEqual } from 'util';
|
|
11
11
|
import { getDefineEnv } from '../webpack/plugins/define-env-plugin';
|
12
12
|
import { getReactCompilerLoader } from '../get-babel-loader-config';
|
13
13
|
import { TurbopackInternalError } from '../../shared/lib/turbopack/utils';
|
14
|
-
const nextVersion = "15.2.1-canary.
|
14
|
+
const nextVersion = "15.2.1-canary.1";
|
15
15
|
const ArchName = arch();
|
16
16
|
const PlatformName = platform();
|
17
17
|
function infoLog(...args) {
|
@@ -130,6 +130,7 @@ function getBaseSWCOptions({ filename, jest, development, hasReactRefresh, globa
|
|
130
130
|
} : undefined,
|
131
131
|
serverActions: isAppRouterPagesLayer && !jest ? {
|
132
132
|
isReactServerLayer,
|
133
|
+
isDevelopment: development,
|
133
134
|
useCacheEnabled,
|
134
135
|
hashSalt: serverReferenceHashSalt,
|
135
136
|
cacheKinds: [
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/build/swc/options.ts"],"sourcesContent":["import path from 'path'\nimport { WEBPACK_LAYERS, type WebpackLayerName } from '../../lib/constants'\nimport type {\n NextConfig,\n ExperimentalConfig,\n EmotionConfig,\n StyledComponentsConfig,\n} from '../../server/config-shared'\nimport type { ResolvedBaseUrl } from '../load-jsconfig'\nimport { isWebpackServerOnlyLayer, isWebpackAppPagesLayer } from '../utils'\nimport { escapeStringRegexp } from '../../shared/lib/escape-regexp'\n\nconst nextDirname = path.dirname(require.resolve('next/package.json'))\n\nconst nextDistPath = new RegExp(\n `${escapeStringRegexp(nextDirname)}[\\\\/]dist[\\\\/](shared[\\\\/]lib|client|pages)`\n)\n\nconst nodeModulesPath = /[\\\\/]node_modules[\\\\/]/\n\nconst regeneratorRuntimePath = require.resolve(\n 'next/dist/compiled/regenerator-runtime'\n)\n\nfunction isTypeScriptFile(filename: string) {\n return filename.endsWith('.ts') || filename.endsWith('.tsx')\n}\n\nfunction isCommonJSFile(filename: string) {\n return filename.endsWith('.cjs')\n}\n\n// Ensure Next.js internals and .cjs files are output as CJS modules,\n// By default all modules are output as ESM or will treated as CJS if next-swc/auto-cjs plugin detects file is CJS.\nfunction shouldOutputCommonJs(filename: string) {\n return isCommonJSFile(filename) || nextDistPath.test(filename)\n}\n\nexport function getParserOptions({ filename, jsConfig, ...rest }: any) {\n const isTSFile = filename.endsWith('.ts')\n const hasTsSyntax = isTypeScriptFile(filename)\n const enableDecorators = Boolean(\n jsConfig?.compilerOptions?.experimentalDecorators\n )\n return {\n ...rest,\n syntax: hasTsSyntax ? 'typescript' : 'ecmascript',\n dynamicImport: true,\n decorators: enableDecorators,\n // Exclude regular TypeScript files from React transformation to prevent e.g. generic parameters and angle-bracket type assertion from being interpreted as JSX tags.\n [hasTsSyntax ? 'tsx' : 'jsx']: !isTSFile,\n importAssertions: true,\n }\n}\n\nfunction getBaseSWCOptions({\n filename,\n jest,\n development,\n hasReactRefresh,\n globalWindow,\n esm,\n modularizeImports,\n swcPlugins,\n compilerOptions,\n resolvedBaseUrl,\n jsConfig,\n swcCacheDir,\n serverComponents,\n serverReferenceHashSalt,\n bundleLayer,\n isDynamicIo,\n cacheHandlers,\n useCacheEnabled,\n}: {\n filename: string\n jest?: boolean\n development: boolean\n hasReactRefresh: boolean\n globalWindow: boolean\n esm: boolean\n modularizeImports?: NextConfig['modularizeImports']\n compilerOptions: NextConfig['compiler']\n swcPlugins: ExperimentalConfig['swcPlugins']\n resolvedBaseUrl?: ResolvedBaseUrl\n jsConfig: any\n swcCacheDir?: string\n serverComponents?: boolean\n serverReferenceHashSalt: string\n bundleLayer?: WebpackLayerName\n isDynamicIo?: boolean\n cacheHandlers?: ExperimentalConfig['cacheHandlers']\n useCacheEnabled?: boolean\n}) {\n const isReactServerLayer = isWebpackServerOnlyLayer(bundleLayer)\n const isAppRouterPagesLayer = isWebpackAppPagesLayer(bundleLayer)\n const parserConfig = getParserOptions({ filename, jsConfig })\n const paths = jsConfig?.compilerOptions?.paths\n const enableDecorators = Boolean(\n jsConfig?.compilerOptions?.experimentalDecorators\n )\n const emitDecoratorMetadata = Boolean(\n jsConfig?.compilerOptions?.emitDecoratorMetadata\n )\n const useDefineForClassFields = Boolean(\n jsConfig?.compilerOptions?.useDefineForClassFields\n )\n const plugins = (swcPlugins ?? [])\n .filter(Array.isArray)\n .map(([name, options]: any) => [require.resolve(name), options])\n\n return {\n jsc: {\n ...(resolvedBaseUrl && paths\n ? {\n baseUrl: resolvedBaseUrl.baseUrl,\n paths,\n }\n : {}),\n externalHelpers: !process.versions.pnp && !jest,\n parser: parserConfig,\n experimental: {\n keepImportAttributes: true,\n emitAssertForImportAttributes: true,\n plugins,\n cacheRoot: swcCacheDir,\n },\n transform: {\n // Enables https://github.com/swc-project/swc/blob/0359deb4841be743d73db4536d4a22ac797d7f65/crates/swc_ecma_ext_transforms/src/jest.rs\n ...(jest\n ? {\n hidden: {\n jest: true,\n },\n }\n : {}),\n legacyDecorator: enableDecorators,\n decoratorMetadata: emitDecoratorMetadata,\n useDefineForClassFields: useDefineForClassFields,\n react: {\n importSource:\n jsConfig?.compilerOptions?.jsxImportSource ??\n (compilerOptions?.emotion && !isReactServerLayer\n ? '@emotion/react'\n : 'react'),\n runtime: 'automatic',\n pragmaFrag: 'React.Fragment',\n throwIfNamespace: true,\n development: !!development,\n useBuiltins: true,\n refresh: !!hasReactRefresh,\n },\n optimizer: {\n simplify: false,\n globals: jest\n ? null\n : {\n typeofs: {\n window: globalWindow ? 'object' : 'undefined',\n },\n envs: {\n NODE_ENV: development ? '\"development\"' : '\"production\"',\n },\n // TODO: handle process.browser to match babel replacing as well\n },\n },\n regenerator: {\n importPath: regeneratorRuntimePath,\n },\n },\n },\n sourceMaps: jest ? 'inline' : undefined,\n removeConsole: compilerOptions?.removeConsole,\n // disable \"reactRemoveProperties\" when \"jest\" is true\n // otherwise the setting from next.config.js will be used\n reactRemoveProperties: jest\n ? false\n : compilerOptions?.reactRemoveProperties,\n // Map the k-v map to an array of pairs.\n modularizeImports: modularizeImports\n ? Object.fromEntries(\n Object.entries(modularizeImports).map(([mod, config]) => [\n mod,\n {\n ...config,\n transform:\n typeof config.transform === 'string'\n ? config.transform\n : Object.entries(config.transform).map(([key, value]) => [\n key,\n value,\n ]),\n },\n ])\n )\n : undefined,\n relay: compilerOptions?.relay,\n // Always transform styled-jsx and error when `client-only` condition is triggered\n styledJsx: {},\n // Disable css-in-js libs (without client-only integration) transform on server layer for server components\n ...(!isReactServerLayer && {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n emotion: getEmotionOptions(compilerOptions?.emotion, development),\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n styledComponents: getStyledComponentsOptions(\n compilerOptions?.styledComponents,\n development\n ),\n }),\n serverComponents:\n serverComponents && !jest\n ? {\n isReactServerLayer,\n dynamicIoEnabled: isDynamicIo,\n useCacheEnabled,\n }\n : undefined,\n serverActions:\n isAppRouterPagesLayer && !jest\n ? {\n isReactServerLayer,\n useCacheEnabled,\n hashSalt: serverReferenceHashSalt,\n cacheKinds: ['default', 'remote'].concat(\n cacheHandlers ? Object.keys(cacheHandlers) : []\n ),\n }\n : undefined,\n // For app router we prefer to bundle ESM,\n // On server side of pages router we prefer CJS.\n preferEsm: esm,\n lintCodemodComments: true,\n debugFunctionName: development,\n }\n}\n\nfunction getStyledComponentsOptions(\n styledComponentsConfig: undefined | boolean | StyledComponentsConfig,\n development: any\n) {\n if (!styledComponentsConfig) {\n return null\n } else if (typeof styledComponentsConfig === 'object') {\n return {\n ...styledComponentsConfig,\n displayName: styledComponentsConfig.displayName ?? Boolean(development),\n }\n } else {\n return {\n displayName: Boolean(development),\n }\n }\n}\n\nfunction getEmotionOptions(\n emotionConfig: undefined | boolean | EmotionConfig,\n development: boolean\n) {\n if (!emotionConfig) {\n return null\n }\n let autoLabel = !!development\n switch (typeof emotionConfig === 'object' && emotionConfig.autoLabel) {\n case 'never':\n autoLabel = false\n break\n case 'always':\n autoLabel = true\n break\n case 'dev-only':\n default:\n break\n }\n return {\n enabled: true,\n autoLabel,\n sourcemap: development,\n ...(typeof emotionConfig === 'object' && {\n importMap: emotionConfig.importMap,\n labelFormat: emotionConfig.labelFormat,\n sourcemap: development && emotionConfig.sourceMap,\n }),\n }\n}\n\nexport function getJestSWCOptions({\n isServer,\n filename,\n esm,\n modularizeImports,\n swcPlugins,\n compilerOptions,\n jsConfig,\n resolvedBaseUrl,\n pagesDir,\n serverReferenceHashSalt,\n}: {\n isServer: boolean\n filename: string\n esm: boolean\n modularizeImports?: NextConfig['modularizeImports']\n swcPlugins: ExperimentalConfig['swcPlugins']\n compilerOptions: NextConfig['compiler']\n jsConfig: any\n resolvedBaseUrl?: ResolvedBaseUrl\n pagesDir?: string\n serverComponents?: boolean\n serverReferenceHashSalt: string\n}) {\n let baseOptions = getBaseSWCOptions({\n filename,\n jest: true,\n development: false,\n hasReactRefresh: false,\n globalWindow: !isServer,\n modularizeImports,\n swcPlugins,\n compilerOptions,\n jsConfig,\n resolvedBaseUrl,\n esm,\n // Don't apply server layer transformations for Jest\n // Disable server / client graph assertions for Jest\n bundleLayer: undefined,\n serverComponents: false,\n serverReferenceHashSalt,\n })\n\n const useCjsModules = shouldOutputCommonJs(filename)\n return {\n ...baseOptions,\n env: {\n targets: {\n // Targets the current version of Node.js\n node: process.versions.node,\n },\n },\n module: {\n type: esm && !useCjsModules ? 'es6' : 'commonjs',\n },\n disableNextSsg: true,\n disablePageConfig: true,\n pagesDir,\n }\n}\n\nexport function getLoaderSWCOptions({\n // This is not passed yet as \"paths\" resolving is handled by webpack currently.\n // resolvedBaseUrl,\n filename,\n development,\n isServer,\n pagesDir,\n appDir,\n isPageFile,\n isDynamicIo,\n hasReactRefresh,\n modularizeImports,\n optimizeServerReact,\n optimizePackageImports,\n swcPlugins,\n compilerOptions,\n jsConfig,\n supportedBrowsers,\n swcCacheDir,\n relativeFilePathFromRoot,\n serverComponents,\n serverReferenceHashSalt,\n bundleLayer,\n esm,\n cacheHandlers,\n useCacheEnabled,\n}: {\n filename: string\n development: boolean\n isServer: boolean\n pagesDir?: string\n appDir?: string\n isPageFile: boolean\n hasReactRefresh: boolean\n optimizeServerReact?: boolean\n modularizeImports: NextConfig['modularizeImports']\n isDynamicIo?: boolean\n optimizePackageImports?: NonNullable<\n NextConfig['experimental']\n >['optimizePackageImports']\n swcPlugins: ExperimentalConfig['swcPlugins']\n compilerOptions: NextConfig['compiler']\n jsConfig: any\n supportedBrowsers: string[] | undefined\n swcCacheDir: string\n relativeFilePathFromRoot: string\n esm?: boolean\n serverComponents?: boolean\n serverReferenceHashSalt: string\n bundleLayer?: WebpackLayerName\n cacheHandlers: ExperimentalConfig['cacheHandlers']\n useCacheEnabled?: boolean\n}) {\n let baseOptions: any = getBaseSWCOptions({\n filename,\n development,\n globalWindow: !isServer,\n hasReactRefresh,\n modularizeImports,\n swcPlugins,\n compilerOptions,\n jsConfig,\n // resolvedBaseUrl,\n swcCacheDir,\n bundleLayer,\n serverComponents,\n serverReferenceHashSalt,\n esm: !!esm,\n isDynamicIo,\n cacheHandlers,\n useCacheEnabled,\n })\n baseOptions.fontLoaders = {\n fontLoaders: ['next/font/local', 'next/font/google'],\n relativeFilePathFromRoot,\n }\n baseOptions.cjsRequireOptimizer = {\n packages: {\n 'next/server': {\n transforms: {\n NextRequest: 'next/dist/server/web/spec-extension/request',\n NextResponse: 'next/dist/server/web/spec-extension/response',\n ImageResponse: 'next/dist/server/web/spec-extension/image-response',\n userAgentFromString: 'next/dist/server/web/spec-extension/user-agent',\n userAgent: 'next/dist/server/web/spec-extension/user-agent',\n },\n },\n },\n }\n\n if (optimizeServerReact && isServer && !development) {\n baseOptions.optimizeServerReact = {\n optimize_use_state: false,\n }\n }\n\n // Modularize import optimization for barrel files\n if (optimizePackageImports) {\n baseOptions.autoModularizeImports = {\n packages: optimizePackageImports,\n }\n }\n\n const isNodeModules = nodeModulesPath.test(filename)\n const isAppBrowserLayer = bundleLayer === WEBPACK_LAYERS.appPagesBrowser\n const moduleResolutionConfig = shouldOutputCommonJs(filename)\n ? {\n module: {\n type: 'commonjs',\n },\n }\n : {}\n\n let options: any\n if (isServer) {\n options = {\n ...baseOptions,\n ...moduleResolutionConfig,\n // Disables getStaticProps/getServerSideProps tree shaking on the server compilation for pages\n disableNextSsg: true,\n disablePageConfig: true,\n isDevelopment: development,\n isServerCompiler: isServer,\n pagesDir,\n appDir,\n preferEsm: !!esm,\n isPageFile,\n env: {\n targets: {\n // Targets the current version of Node.js\n node: process.versions.node,\n },\n },\n }\n } else {\n options = {\n ...baseOptions,\n ...moduleResolutionConfig,\n disableNextSsg: !isPageFile,\n isDevelopment: development,\n isServerCompiler: isServer,\n pagesDir,\n appDir,\n isPageFile,\n ...(supportedBrowsers && supportedBrowsers.length > 0\n ? {\n env: {\n targets: supportedBrowsers,\n },\n }\n : {}),\n }\n if (!options.env) {\n // Matches default @babel/preset-env behavior\n options.jsc.target = 'es5'\n }\n }\n\n // For node_modules in app browser layer, we don't need to do any server side transformation.\n // Only keep server actions transform to discover server actions from client components.\n if (isAppBrowserLayer && isNodeModules) {\n options.disableNextSsg = true\n options.disablePageConfig = true\n options.isPageFile = false\n options.optimizeServerReact = undefined\n options.cjsRequireOptimizer = undefined\n // Disable optimizer for node_modules in app browser layer, to avoid unnecessary replacement.\n // e.g. typeof window could result differently in js worker or browser.\n if (options.jsc.transform.optimizer.globals?.typeofs) {\n delete options.jsc.transform.optimizer.globals.typeofs.window\n }\n }\n\n return options\n}\n"],"names":["path","WEBPACK_LAYERS","isWebpackServerOnlyLayer","isWebpackAppPagesLayer","escapeStringRegexp","nextDirname","dirname","require","resolve","nextDistPath","RegExp","nodeModulesPath","regeneratorRuntimePath","isTypeScriptFile","filename","endsWith","isCommonJSFile","shouldOutputCommonJs","test","getParserOptions","jsConfig","rest","isTSFile","hasTsSyntax","enableDecorators","Boolean","compilerOptions","experimentalDecorators","syntax","dynamicImport","decorators","importAssertions","getBaseSWCOptions","jest","development","hasReactRefresh","globalWindow","esm","modularizeImports","swcPlugins","resolvedBaseUrl","swcCacheDir","serverComponents","serverReferenceHashSalt","bundleLayer","isDynamicIo","cacheHandlers","useCacheEnabled","isReactServerLayer","isAppRouterPagesLayer","parserConfig","paths","emitDecoratorMetadata","useDefineForClassFields","plugins","filter","Array","isArray","map","name","options","jsc","baseUrl","externalHelpers","process","versions","pnp","parser","experimental","keepImportAttributes","emitAssertForImportAttributes","cacheRoot","transform","hidden","legacyDecorator","decoratorMetadata","react","importSource","jsxImportSource","emotion","runtime","pragmaFrag","throwIfNamespace","useBuiltins","refresh","optimizer","simplify","globals","typeofs","window","envs","NODE_ENV","regenerator","importPath","sourceMaps","undefined","removeConsole","reactRemoveProperties","Object","fromEntries","entries","mod","config","key","value","relay","styledJsx","getEmotionOptions","styledComponents","getStyledComponentsOptions","dynamicIoEnabled","serverActions","hashSalt","cacheKinds","concat","keys","preferEsm","lintCodemodComments","debugFunctionName","styledComponentsConfig","displayName","emotionConfig","autoLabel","enabled","sourcemap","importMap","labelFormat","sourceMap","getJestSWCOptions","isServer","pagesDir","baseOptions","useCjsModules","env","targets","node","module","type","disableNextSsg","disablePageConfig","getLoaderSWCOptions","appDir","isPageFile","optimizeServerReact","optimizePackageImports","supportedBrowsers","relativeFilePathFromRoot","fontLoaders","cjsRequireOptimizer","packages","transforms","NextRequest","NextResponse","ImageResponse","userAgentFromString","userAgent","optimize_use_state","autoModularizeImports","isNodeModules","isAppBrowserLayer","appPagesBrowser","moduleResolutionConfig","isDevelopment","isServerCompiler","length","target"],"mappings":"AAAA,OAAOA,UAAU,OAAM;AACvB,SAASC,cAAc,QAA+B,sBAAqB;AAQ3E,SAASC,wBAAwB,EAAEC,sBAAsB,QAAQ,WAAU;AAC3E,SAASC,kBAAkB,QAAQ,iCAAgC;AAEnE,MAAMC,cAAcL,KAAKM,OAAO,CAACC,QAAQC,OAAO,CAAC;AAEjD,MAAMC,eAAe,IAAIC,OACvB,GAAGN,mBAAmBC,aAAa,2CAA2C,CAAC;AAGjF,MAAMM,kBAAkB;AAExB,MAAMC,yBAAyBL,QAAQC,OAAO,CAC5C;AAGF,SAASK,iBAAiBC,QAAgB;IACxC,OAAOA,SAASC,QAAQ,CAAC,UAAUD,SAASC,QAAQ,CAAC;AACvD;AAEA,SAASC,eAAeF,QAAgB;IACtC,OAAOA,SAASC,QAAQ,CAAC;AAC3B;AAEA,qEAAqE;AACrE,mHAAmH;AACnH,SAASE,qBAAqBH,QAAgB;IAC5C,OAAOE,eAAeF,aAAaL,aAAaS,IAAI,CAACJ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;YAC9FvB,gBAAgB;YAChBC,mBAAmB;YACnBuB,eAAehI;YACfiI,kBAAkBlC;YAClBC;YACAW;YACAzB,WAAW,CAAC,CAAC/E;YACbyG;YACAT,KAAK;gBACHC,SAAS;oBACP,yCAAyC;oBACzCC,MAAMvE,QAAQC,QAAQ,CAACsE,IAAI;gBAC7B;YACF;QACF;IACF,OAAO;QACL3E,UAAU;YACR,GAAGuE,WAAW;YACd,GAAG8B,sBAAsB;YACzBvB,gBAAgB,CAACI;YACjBoB,eAAehI;YACfiI,kBAAkBlC;YAClBC;YACAW;YACAC;YACA,GAAIG,qBAAqBA,kBAAkBmB,MAAM,GAAG,IAChD;gBACE/B,KAAK;oBACHC,SAASW;gBACX;YACF,IACA,CAAC,CAAC;QACR;QACA,IAAI,CAACrF,QAAQyE,GAAG,EAAE;YAChB,6CAA6C;YAC7CzE,QAAQC,GAAG,CAACwG,MAAM,GAAG;QACvB;IACF;IAEA,6FAA6F;IAC7F,wFAAwF;IACxF,IAAIN,qBAAqBD,eAAe;YAQlClG;QAPJA,QAAQ8E,cAAc,GAAG;QACzB9E,QAAQ+E,iBAAiB,GAAG;QAC5B/E,QAAQkF,UAAU,GAAG;QACrBlF,QAAQmF,mBAAmB,GAAGhD;QAC9BnC,QAAQwF,mBAAmB,GAAGrD;QAC9B,6FAA6F;QAC7F,uEAAuE;QACvE,KAAInC,2CAAAA,QAAQC,GAAG,CAACW,SAAS,CAACa,SAAS,CAACE,OAAO,qBAAvC3B,yCAAyC4B,OAAO,EAAE;YACpD,OAAO5B,QAAQC,GAAG,CAACW,SAAS,CAACa,SAAS,CAACE,OAAO,CAACC,OAAO,CAACC,MAAM;QAC/D;IACF;IAEA,OAAO7B;AACT"}
|
1
|
+
{"version":3,"sources":["../../../src/build/swc/options.ts"],"sourcesContent":["import path from 'path'\nimport { WEBPACK_LAYERS, type WebpackLayerName } from '../../lib/constants'\nimport type {\n NextConfig,\n ExperimentalConfig,\n EmotionConfig,\n StyledComponentsConfig,\n} from '../../server/config-shared'\nimport type { ResolvedBaseUrl } from '../load-jsconfig'\nimport { isWebpackServerOnlyLayer, isWebpackAppPagesLayer } from '../utils'\nimport { escapeStringRegexp } from '../../shared/lib/escape-regexp'\n\nconst nextDirname = path.dirname(require.resolve('next/package.json'))\n\nconst nextDistPath = new RegExp(\n `${escapeStringRegexp(nextDirname)}[\\\\/]dist[\\\\/](shared[\\\\/]lib|client|pages)`\n)\n\nconst nodeModulesPath = /[\\\\/]node_modules[\\\\/]/\n\nconst regeneratorRuntimePath = require.resolve(\n 'next/dist/compiled/regenerator-runtime'\n)\n\nfunction isTypeScriptFile(filename: string) {\n return filename.endsWith('.ts') || filename.endsWith('.tsx')\n}\n\nfunction isCommonJSFile(filename: string) {\n return filename.endsWith('.cjs')\n}\n\n// Ensure Next.js internals and .cjs files are output as CJS modules,\n// By default all modules are output as ESM or will treated as CJS if next-swc/auto-cjs plugin detects file is CJS.\nfunction shouldOutputCommonJs(filename: string) {\n return isCommonJSFile(filename) || nextDistPath.test(filename)\n}\n\nexport function getParserOptions({ filename, jsConfig, ...rest }: any) {\n const isTSFile = filename.endsWith('.ts')\n const hasTsSyntax = isTypeScriptFile(filename)\n const enableDecorators = Boolean(\n jsConfig?.compilerOptions?.experimentalDecorators\n )\n return {\n ...rest,\n syntax: hasTsSyntax ? 'typescript' : 'ecmascript',\n dynamicImport: true,\n decorators: enableDecorators,\n // Exclude regular TypeScript files from React transformation to prevent e.g. generic parameters and angle-bracket type assertion from being interpreted as JSX tags.\n [hasTsSyntax ? 'tsx' : 'jsx']: !isTSFile,\n importAssertions: true,\n }\n}\n\nfunction getBaseSWCOptions({\n filename,\n jest,\n development,\n hasReactRefresh,\n globalWindow,\n esm,\n modularizeImports,\n swcPlugins,\n compilerOptions,\n resolvedBaseUrl,\n jsConfig,\n swcCacheDir,\n serverComponents,\n serverReferenceHashSalt,\n bundleLayer,\n isDynamicIo,\n cacheHandlers,\n useCacheEnabled,\n}: {\n filename: string\n jest?: boolean\n development: boolean\n hasReactRefresh: boolean\n globalWindow: boolean\n esm: boolean\n modularizeImports?: NextConfig['modularizeImports']\n compilerOptions: NextConfig['compiler']\n swcPlugins: ExperimentalConfig['swcPlugins']\n resolvedBaseUrl?: ResolvedBaseUrl\n jsConfig: any\n swcCacheDir?: string\n serverComponents?: boolean\n serverReferenceHashSalt: string\n bundleLayer?: WebpackLayerName\n isDynamicIo?: boolean\n cacheHandlers?: ExperimentalConfig['cacheHandlers']\n useCacheEnabled?: boolean\n}) {\n const isReactServerLayer = isWebpackServerOnlyLayer(bundleLayer)\n const isAppRouterPagesLayer = isWebpackAppPagesLayer(bundleLayer)\n const parserConfig = getParserOptions({ filename, jsConfig })\n const paths = jsConfig?.compilerOptions?.paths\n const enableDecorators = Boolean(\n jsConfig?.compilerOptions?.experimentalDecorators\n )\n const emitDecoratorMetadata = Boolean(\n jsConfig?.compilerOptions?.emitDecoratorMetadata\n )\n const useDefineForClassFields = Boolean(\n jsConfig?.compilerOptions?.useDefineForClassFields\n )\n const plugins = (swcPlugins ?? [])\n .filter(Array.isArray)\n .map(([name, options]: any) => [require.resolve(name), options])\n\n return {\n jsc: {\n ...(resolvedBaseUrl && paths\n ? {\n baseUrl: resolvedBaseUrl.baseUrl,\n paths,\n }\n : {}),\n externalHelpers: !process.versions.pnp && !jest,\n parser: parserConfig,\n experimental: {\n keepImportAttributes: true,\n emitAssertForImportAttributes: true,\n plugins,\n cacheRoot: swcCacheDir,\n },\n transform: {\n // Enables https://github.com/swc-project/swc/blob/0359deb4841be743d73db4536d4a22ac797d7f65/crates/swc_ecma_ext_transforms/src/jest.rs\n ...(jest\n ? {\n hidden: {\n jest: true,\n },\n }\n : {}),\n legacyDecorator: enableDecorators,\n decoratorMetadata: emitDecoratorMetadata,\n useDefineForClassFields: useDefineForClassFields,\n react: {\n importSource:\n jsConfig?.compilerOptions?.jsxImportSource ??\n (compilerOptions?.emotion && !isReactServerLayer\n ? '@emotion/react'\n : 'react'),\n runtime: 'automatic',\n pragmaFrag: 'React.Fragment',\n throwIfNamespace: true,\n development: !!development,\n useBuiltins: true,\n refresh: !!hasReactRefresh,\n },\n optimizer: {\n simplify: false,\n globals: jest\n ? null\n : {\n typeofs: {\n window: globalWindow ? 'object' : 'undefined',\n },\n envs: {\n NODE_ENV: development ? '\"development\"' : '\"production\"',\n },\n // TODO: handle process.browser to match babel replacing as well\n },\n },\n regenerator: {\n importPath: regeneratorRuntimePath,\n },\n },\n },\n sourceMaps: jest ? 'inline' : undefined,\n removeConsole: compilerOptions?.removeConsole,\n // disable \"reactRemoveProperties\" when \"jest\" is true\n // otherwise the setting from next.config.js will be used\n reactRemoveProperties: jest\n ? false\n : compilerOptions?.reactRemoveProperties,\n // Map the k-v map to an array of pairs.\n modularizeImports: modularizeImports\n ? Object.fromEntries(\n Object.entries(modularizeImports).map(([mod, config]) => [\n mod,\n {\n ...config,\n transform:\n typeof config.transform === 'string'\n ? config.transform\n : Object.entries(config.transform).map(([key, value]) => [\n key,\n value,\n ]),\n },\n ])\n )\n : undefined,\n relay: compilerOptions?.relay,\n // Always transform styled-jsx and error when `client-only` condition is triggered\n styledJsx: {},\n // Disable css-in-js libs (without client-only integration) transform on server layer for server components\n ...(!isReactServerLayer && {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n emotion: getEmotionOptions(compilerOptions?.emotion, development),\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n styledComponents: getStyledComponentsOptions(\n compilerOptions?.styledComponents,\n development\n ),\n }),\n serverComponents:\n serverComponents && !jest\n ? {\n isReactServerLayer,\n dynamicIoEnabled: isDynamicIo,\n useCacheEnabled,\n }\n : undefined,\n serverActions:\n isAppRouterPagesLayer && !jest\n ? {\n isReactServerLayer,\n isDevelopment: development,\n useCacheEnabled,\n hashSalt: serverReferenceHashSalt,\n cacheKinds: ['default', 'remote'].concat(\n cacheHandlers ? Object.keys(cacheHandlers) : []\n ),\n }\n : undefined,\n // For app router we prefer to bundle ESM,\n // On server side of pages router we prefer CJS.\n preferEsm: esm,\n lintCodemodComments: true,\n debugFunctionName: development,\n }\n}\n\nfunction getStyledComponentsOptions(\n styledComponentsConfig: undefined | boolean | StyledComponentsConfig,\n development: any\n) {\n if (!styledComponentsConfig) {\n return null\n } else if (typeof styledComponentsConfig === 'object') {\n return {\n ...styledComponentsConfig,\n displayName: styledComponentsConfig.displayName ?? Boolean(development),\n }\n } else {\n return {\n displayName: Boolean(development),\n }\n }\n}\n\nfunction getEmotionOptions(\n emotionConfig: undefined | boolean | EmotionConfig,\n development: boolean\n) {\n if (!emotionConfig) {\n return null\n }\n let autoLabel = !!development\n switch (typeof emotionConfig === 'object' && emotionConfig.autoLabel) {\n case 'never':\n autoLabel = false\n break\n case 'always':\n autoLabel = true\n break\n case 'dev-only':\n default:\n break\n }\n return {\n enabled: true,\n autoLabel,\n sourcemap: development,\n ...(typeof emotionConfig === 'object' && {\n importMap: emotionConfig.importMap,\n labelFormat: emotionConfig.labelFormat,\n sourcemap: development && emotionConfig.sourceMap,\n }),\n }\n}\n\nexport function getJestSWCOptions({\n isServer,\n filename,\n esm,\n modularizeImports,\n swcPlugins,\n compilerOptions,\n jsConfig,\n resolvedBaseUrl,\n pagesDir,\n serverReferenceHashSalt,\n}: {\n isServer: boolean\n filename: string\n esm: boolean\n modularizeImports?: NextConfig['modularizeImports']\n swcPlugins: ExperimentalConfig['swcPlugins']\n compilerOptions: NextConfig['compiler']\n jsConfig: any\n resolvedBaseUrl?: ResolvedBaseUrl\n pagesDir?: string\n serverComponents?: boolean\n serverReferenceHashSalt: string\n}) {\n let baseOptions = getBaseSWCOptions({\n filename,\n jest: true,\n development: false,\n hasReactRefresh: false,\n globalWindow: !isServer,\n modularizeImports,\n swcPlugins,\n compilerOptions,\n jsConfig,\n resolvedBaseUrl,\n esm,\n // Don't apply server layer transformations for Jest\n // Disable server / client graph assertions for Jest\n bundleLayer: undefined,\n serverComponents: false,\n serverReferenceHashSalt,\n })\n\n const useCjsModules = shouldOutputCommonJs(filename)\n return {\n ...baseOptions,\n env: {\n targets: {\n // Targets the current version of Node.js\n node: process.versions.node,\n },\n },\n module: {\n type: esm && !useCjsModules ? 'es6' : 'commonjs',\n },\n disableNextSsg: true,\n disablePageConfig: true,\n pagesDir,\n }\n}\n\nexport function getLoaderSWCOptions({\n // This is not passed yet as \"paths\" resolving is handled by webpack currently.\n // resolvedBaseUrl,\n filename,\n development,\n isServer,\n pagesDir,\n appDir,\n isPageFile,\n isDynamicIo,\n hasReactRefresh,\n modularizeImports,\n optimizeServerReact,\n optimizePackageImports,\n swcPlugins,\n compilerOptions,\n jsConfig,\n supportedBrowsers,\n swcCacheDir,\n relativeFilePathFromRoot,\n serverComponents,\n serverReferenceHashSalt,\n bundleLayer,\n esm,\n cacheHandlers,\n useCacheEnabled,\n}: {\n filename: string\n development: boolean\n isServer: boolean\n pagesDir?: string\n appDir?: string\n isPageFile: boolean\n hasReactRefresh: boolean\n optimizeServerReact?: boolean\n modularizeImports: NextConfig['modularizeImports']\n isDynamicIo?: boolean\n optimizePackageImports?: NonNullable<\n NextConfig['experimental']\n >['optimizePackageImports']\n swcPlugins: ExperimentalConfig['swcPlugins']\n compilerOptions: NextConfig['compiler']\n jsConfig: any\n supportedBrowsers: string[] | undefined\n swcCacheDir: string\n relativeFilePathFromRoot: string\n esm?: boolean\n serverComponents?: boolean\n serverReferenceHashSalt: string\n bundleLayer?: WebpackLayerName\n cacheHandlers: ExperimentalConfig['cacheHandlers']\n useCacheEnabled?: boolean\n}) {\n let baseOptions: any = getBaseSWCOptions({\n filename,\n development,\n globalWindow: !isServer,\n hasReactRefresh,\n modularizeImports,\n swcPlugins,\n compilerOptions,\n jsConfig,\n // resolvedBaseUrl,\n swcCacheDir,\n bundleLayer,\n serverComponents,\n serverReferenceHashSalt,\n esm: !!esm,\n isDynamicIo,\n cacheHandlers,\n useCacheEnabled,\n })\n baseOptions.fontLoaders = {\n fontLoaders: ['next/font/local', 'next/font/google'],\n relativeFilePathFromRoot,\n }\n baseOptions.cjsRequireOptimizer = {\n packages: {\n 'next/server': {\n transforms: {\n NextRequest: 'next/dist/server/web/spec-extension/request',\n NextResponse: 'next/dist/server/web/spec-extension/response',\n ImageResponse: 'next/dist/server/web/spec-extension/image-response',\n userAgentFromString: 'next/dist/server/web/spec-extension/user-agent',\n userAgent: 'next/dist/server/web/spec-extension/user-agent',\n },\n },\n },\n }\n\n if (optimizeServerReact && isServer && !development) {\n baseOptions.optimizeServerReact = {\n optimize_use_state: false,\n }\n }\n\n // Modularize import optimization for barrel files\n if (optimizePackageImports) {\n baseOptions.autoModularizeImports = {\n packages: optimizePackageImports,\n }\n }\n\n const isNodeModules = nodeModulesPath.test(filename)\n const isAppBrowserLayer = bundleLayer === WEBPACK_LAYERS.appPagesBrowser\n const moduleResolutionConfig = shouldOutputCommonJs(filename)\n ? {\n module: {\n type: 'commonjs',\n },\n }\n : {}\n\n let options: any\n if (isServer) {\n options = {\n ...baseOptions,\n ...moduleResolutionConfig,\n // Disables getStaticProps/getServerSideProps tree shaking on the server compilation for pages\n disableNextSsg: true,\n disablePageConfig: true,\n isDevelopment: development,\n isServerCompiler: isServer,\n pagesDir,\n appDir,\n preferEsm: !!esm,\n isPageFile,\n env: {\n targets: {\n // Targets the current version of Node.js\n node: process.versions.node,\n },\n },\n }\n } else {\n options = {\n ...baseOptions,\n ...moduleResolutionConfig,\n disableNextSsg: !isPageFile,\n isDevelopment: development,\n isServerCompiler: isServer,\n pagesDir,\n appDir,\n isPageFile,\n ...(supportedBrowsers && supportedBrowsers.length > 0\n ? {\n env: {\n targets: supportedBrowsers,\n },\n }\n : {}),\n }\n if (!options.env) {\n // Matches default @babel/preset-env behavior\n options.jsc.target = 'es5'\n }\n }\n\n // For node_modules in app browser layer, we don't need to do any server side transformation.\n // Only keep server actions transform to discover server actions from client components.\n if (isAppBrowserLayer && isNodeModules) {\n options.disableNextSsg = true\n options.disablePageConfig = true\n options.isPageFile = false\n options.optimizeServerReact = undefined\n options.cjsRequireOptimizer = undefined\n // Disable optimizer for node_modules in app browser layer, to avoid unnecessary replacement.\n // e.g. typeof window could result differently in js worker or browser.\n if (options.jsc.transform.optimizer.globals?.typeofs) {\n delete options.jsc.transform.optimizer.globals.typeofs.window\n }\n }\n\n return options\n}\n"],"names":["path","WEBPACK_LAYERS","isWebpackServerOnlyLayer","isWebpackAppPagesLayer","escapeStringRegexp","nextDirname","dirname","require","resolve","nextDistPath","RegExp","nodeModulesPath","regeneratorRuntimePath","isTypeScriptFile","filename","endsWith","isCommonJSFile","shouldOutputCommonJs","test","getParserOptions","jsConfig","rest","isTSFile","hasTsSyntax","enableDecorators","Boolean","compilerOptions","experimentalDecorators","syntax","dynamicImport","decorators","importAssertions","getBaseSWCOptions","jest","development","hasReactRefresh","globalWindow","esm","modularizeImports","swcPlugins","resolvedBaseUrl","swcCacheDir","serverComponents","serverReferenceHashSalt","bundleLayer","isDynamicIo","cacheHandlers","useCacheEnabled","isReactServerLayer","isAppRouterPagesLayer","parserConfig","paths","emitDecoratorMetadata","useDefineForClassFields","plugins","filter","Array","isArray","map","name","options","jsc","baseUrl","externalHelpers","process","versions","pnp","parser","experimental","keepImportAttributes","emitAssertForImportAttributes","cacheRoot","transform","hidden","legacyDecorator","decoratorMetadata","react","importSource","jsxImportSource","emotion","runtime","pragmaFrag","throwIfNamespace","useBuiltins","refresh","optimizer","simplify","globals","typeofs","window","envs","NODE_ENV","regenerator","importPath","sourceMaps","undefined","removeConsole","reactRemoveProperties","Object","fromEntries","entries","mod","config","key","value","relay","styledJsx","getEmotionOptions","styledComponents","getStyledComponentsOptions","dynamicIoEnabled","serverActions","isDevelopment","hashSalt","cacheKinds","concat","keys","preferEsm","lintCodemodComments","debugFunctionName","styledComponentsConfig","displayName","emotionConfig","autoLabel","enabled","sourcemap","importMap","labelFormat","sourceMap","getJestSWCOptions","isServer","pagesDir","baseOptions","useCjsModules","env","targets","node","module","type","disableNextSsg","disablePageConfig","getLoaderSWCOptions","appDir","isPageFile","optimizeServerReact","optimizePackageImports","supportedBrowsers","relativeFilePathFromRoot","fontLoaders","cjsRequireOptimizer","packages","transforms","NextRequest","NextResponse","ImageResponse","userAgentFromString","userAgent","optimize_use_state","autoModularizeImports","isNodeModules","isAppBrowserLayer","appPagesBrowser","moduleResolutionConfig","isServerCompiler","length","target"],"mappings":"AAAA,OAAOA,UAAU,OAAM;AACvB,SAASC,cAAc,QAA+B,sBAAqB;AAQ3E,SAASC,wBAAwB,EAAEC,sBAAsB,QAAQ,WAAU;AAC3E,SAASC,kBAAkB,QAAQ,iCAAgC;AAEnE,MAAMC,cAAcL,KAAKM,OAAO,CAACC,QAAQC,OAAO,CAAC;AAEjD,MAAMC,eAAe,IAAIC,OACvB,GAAGN,mBAAmBC,aAAa,2CAA2C,CAAC;AAGjF,MAAMM,kBAAkB;AAExB,MAAMC,yBAAyBL,QAAQC,OAAO,CAC5C;AAGF,SAASK,iBAAiBC,QAAgB;IACxC,OAAOA,SAASC,QAAQ,CAAC,UAAUD,SAASC,QAAQ,CAAC;AACvD;AAEA,SAASC,eAAeF,QAAgB;IACtC,OAAOA,SAASC,QAAQ,CAAC;AAC3B;AAEA,qEAAqE;AACrE,mHAAmH;AACnH,SAASE,qBAAqBH,QAAgB;IAC5C,OAAOE,eAAeF,aAAaL,aAAaS,IAAI,CAACJ;AACvD;AAEA,OAAO,SAASK,iBAAiB,EAAEL,QAAQ,EAAEM,QAAQ,EAAE,GAAGC,MAAW;QAIjED;IAHF,MAAME,WAAWR,SAASC,QAAQ,CAAC;IACnC,MAAMQ,cAAcV,iBAAiBC;IACrC,MAAMU,mBAAmBC,QACvBL,6BAAAA,4BAAAA,SAAUM,eAAe,qBAAzBN,0BAA2BO,sBAAsB;IAEnD,OAAO;QACL,GAAGN,IAAI;QACPO,QAAQL,cAAc,eAAe;QACrCM,eAAe;QACfC,YAAYN;QACZ,qKAAqK;QACrK,CAACD,cAAc,QAAQ,MAAM,EAAE,CAACD;QAChCS,kBAAkB;IACpB;AACF;AAEA,SAASC,kBAAkB,EACzBlB,QAA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AASW;gBACX;YACF,IACA,CAAC,CAAC;QACR;QACA,IAAI,CAACtF,QAAQ0E,GAAG,EAAE;YAChB,6CAA6C;YAC7C1E,QAAQC,GAAG,CAACwG,MAAM,GAAG;QACvB;IACF;IAEA,6FAA6F;IAC7F,wFAAwF;IACxF,IAAIL,qBAAqBD,eAAe;YAQlCnG;QAPJA,QAAQ+E,cAAc,GAAG;QACzB/E,QAAQgF,iBAAiB,GAAG;QAC5BhF,QAAQmF,UAAU,GAAG;QACrBnF,QAAQoF,mBAAmB,GAAGjD;QAC9BnC,QAAQyF,mBAAmB,GAAGtD;QAC9B,6FAA6F;QAC7F,uEAAuE;QACvE,KAAInC,2CAAAA,QAAQC,GAAG,CAACW,SAAS,CAACa,SAAS,CAACE,OAAO,qBAAvC3B,yCAAyC4B,OAAO,EAAE;YACpD,OAAO5B,QAAQC,GAAG,CAACW,SAAS,CAACa,SAAS,CAACE,OAAO,CAACC,OAAO,CAACC,MAAM;QAC/D;IACF;IAEA,OAAO7B;AACT"}
|
@@ -1525,7 +1525,7 @@ export default async function getBaseWebpackConfig(dir, { buildId, encryptionKey
|
|
1525
1525
|
isClient && new CopyFilePlugin({
|
1526
1526
|
// file path to build output of `@next/polyfill-nomodule`
|
1527
1527
|
filePath: require.resolve('./polyfills/polyfill-nomodule'),
|
1528
|
-
cacheKey: "15.2.1-canary.
|
1528
|
+
cacheKey: "15.2.1-canary.1",
|
1529
1529
|
name: `static/chunks/polyfills${dev ? '' : '-[hash]'}.js`,
|
1530
1530
|
minimize: false,
|
1531
1531
|
info: {
|
@@ -1702,7 +1702,7 @@ export default async function getBaseWebpackConfig(dir, { buildId, encryptionKey
|
|
1702
1702
|
// - Next.js location on disk (some loaders use absolute paths and some resolve options depend on absolute paths)
|
1703
1703
|
// - Next.js version
|
1704
1704
|
// - next.config.js keys that affect compilation
|
1705
|
-
version: `${__dirname}|${"15.2.1-canary.
|
1705
|
+
version: `${__dirname}|${"15.2.1-canary.1"}|${configVars}`,
|
1706
1706
|
cacheDirectory: path.join(distDir, 'cache', 'webpack'),
|
1707
1707
|
// For production builds, it's more efficient to compress all cache files together instead of compression each one individually.
|
1708
1708
|
// So we disable compression here and allow the build runner to take care of compressing the cache as a whole.
|
@@ -12,6 +12,6 @@ export function ErrorOverlayDialog(param) {
|
|
12
12
|
children: children
|
13
13
|
});
|
14
14
|
}
|
15
|
-
export const DIALOG_STYLES = "\n .error-overlay-dialog {\n overflow-y: auto;\n -webkit-font-smoothing: antialiased;\n background: var(--color-background-100);\n background-clip: padding-box;\n border: 1px solid var(--color-gray-400);\n border-radius: var(--rounded-xl);\n box-shadow: var(--shadow-menu);\n position: relative;\n\n
|
15
|
+
export const DIALOG_STYLES = "\n .error-overlay-dialog {\n overflow-y: auto;\n -webkit-font-smoothing: antialiased;\n background: var(--color-background-100);\n background-clip: padding-box;\n border: 1px solid var(--color-gray-400);\n border-radius: var(--rounded-xl);\n box-shadow: var(--shadow-menu);\n position: relative;\n\n &:has(\n ~ [data-nextjs-error-overlay-nav] .error-overlay-notch[data-side='left']\n ) {\n border-top-left-radius: 0;\n }\n\n &:has(\n ~ [data-nextjs-error-overlay-nav]\n .error-overlay-notch[data-side='right']\n ) {\n border-top-right-radius: 0;\n }\n }\n";
|
16
16
|
|
17
17
|
//# sourceMappingURL=dialog.js.map
|
package/dist/esm/client/components/react-dev-overlay/ui/components/errors/dialog/dialog.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../src/client/components/react-dev-overlay/ui/components/errors/dialog/dialog.tsx"],"sourcesContent":["import { Dialog } from '../../dialog/dialog'\n\ntype ErrorOverlayDialogProps = {\n children?: React.ReactNode\n onClose?: () => void\n dialogResizerRef?: React.RefObject<HTMLDivElement | null>\n}\n\nexport function ErrorOverlayDialog({\n children,\n onClose,\n ...props\n}: ErrorOverlayDialogProps) {\n return (\n <Dialog\n type=\"error\"\n aria-labelledby=\"nextjs__container_errors_label\"\n aria-describedby=\"nextjs__container_errors_desc\"\n onClose={onClose}\n className=\"error-overlay-dialog\"\n {...props}\n >\n {children}\n </Dialog>\n )\n}\n\nexport const DIALOG_STYLES = `\n .error-overlay-dialog {\n overflow-y: auto;\n -webkit-font-smoothing: antialiased;\n background: var(--color-background-100);\n background-clip: padding-box;\n border: 1px solid var(--color-gray-400);\n border-radius: var(--rounded-xl);\n box-shadow: var(--shadow-menu);\n position: relative;\n\n
|
1
|
+
{"version":3,"sources":["../../../../../../../../src/client/components/react-dev-overlay/ui/components/errors/dialog/dialog.tsx"],"sourcesContent":["import { Dialog } from '../../dialog/dialog'\n\ntype ErrorOverlayDialogProps = {\n children?: React.ReactNode\n onClose?: () => void\n dialogResizerRef?: React.RefObject<HTMLDivElement | null>\n}\n\nexport function ErrorOverlayDialog({\n children,\n onClose,\n ...props\n}: ErrorOverlayDialogProps) {\n return (\n <Dialog\n type=\"error\"\n aria-labelledby=\"nextjs__container_errors_label\"\n aria-describedby=\"nextjs__container_errors_desc\"\n onClose={onClose}\n className=\"error-overlay-dialog\"\n {...props}\n >\n {children}\n </Dialog>\n )\n}\n\nexport const DIALOG_STYLES = `\n .error-overlay-dialog {\n overflow-y: auto;\n -webkit-font-smoothing: antialiased;\n background: var(--color-background-100);\n background-clip: padding-box;\n border: 1px solid var(--color-gray-400);\n border-radius: var(--rounded-xl);\n box-shadow: var(--shadow-menu);\n position: relative;\n\n &:has(\n ~ [data-nextjs-error-overlay-nav] .error-overlay-notch[data-side='left']\n ) {\n border-top-left-radius: 0;\n }\n\n &:has(\n ~ [data-nextjs-error-overlay-nav]\n .error-overlay-notch[data-side='right']\n ) {\n border-top-right-radius: 0;\n }\n }\n`\n"],"names":["Dialog","ErrorOverlayDialog","children","onClose","props","type","aria-labelledby","aria-describedby","className","DIALOG_STYLES"],"mappings":";AAAA,SAASA,MAAM,QAAQ,sBAAqB;AAQ5C,OAAO,SAASC,mBAAmB,KAIT;IAJS,IAAA,EACjCC,QAAQ,EACRC,OAAO,EACP,GAAGC,OACqB,GAJS;IAKjC,qBACE,KAACJ;QACCK,MAAK;QACLC,mBAAgB;QAChBC,oBAAiB;QACjBJ,SAASA;QACTK,WAAU;QACT,GAAGJ,KAAK;kBAERF;;AAGP;AAEA,OAAO,MAAMO,gBAAiB,+nBAwB7B"}
|
@@ -22,6 +22,6 @@ export function ErrorOverlayBottomStack(param) {
|
|
22
22
|
})
|
23
23
|
});
|
24
24
|
}
|
25
|
-
export const styles = "\n .error-overlay-bottom-stack-layer {\n width: 100%;\n height: var(--stack-layer-height);\n position: relative;\n border: 1px solid var(--color-gray-400);\n border-radius: var(--rounded-xl);\n background: var(--color-background-200);\n transition:\n translate 350ms var(--timing-swift),\n box-shadow 350ms var(--timing-swift);\n }\n\n .error-overlay-bottom-stack-layer-1 {\n width: calc(100% - var(--size-24));\n }\n\n .error-overlay-bottom-stack-layer-2 {\n width: calc(100% - var(--size-48));\n z-index: -1;\n }\n\n .error-overlay-bottom-stack {\n width: 100%;\n position: absolute;\n bottom: -1px;\n height: 0;\n overflow: visible;\n }\n\n .error-overlay-bottom-stack-stack {\n --stack-layer-height: 44px;\n --stack-layer-height-half: calc(var(--stack-layer-height) / 2);\n --stack-layer-trim: 13px;\n --shadow: 0px 0.925px 0.925px 0px rgba(0, 0, 0, 0.02),\n 0px 3.7px 7.4px -3.7px rgba(0, 0, 0, 0.04),\n 0px 14.8px 22.2px -7.4px rgba(0, 0, 0, 0.06);\n\n display: grid;\n place-items: center center;\n width: 100%;\n position: fixed;\n overflow: hidden;\n z-index: -1;\n max-width: var(--next-dialog-max-width);\n\n .error-overlay-bottom-stack-layer {\n grid-area: 1 / 1;\n /* Hide */\n translate: 0 calc(var(--stack-layer-height) * -1);\n }\n\n &[data-stack-count='1'],\n &[data-stack-count='2'] {\n .error-overlay-bottom-stack-layer-1 {\n translate: 0\n calc(var(--stack-layer-height-half) * -1 - var(--stack-layer-trim));\n }\n }\n\n &[data-stack-count='2'] {\n .error-overlay-bottom-stack-layer-2 {\n translate: 0 calc(var(--stack-layer-trim) * -1 * 2);\n }\n }\n\n /* Only the bottom stack should have the shadow */\n &[data-stack-count='1'] .error-overlay-bottom-stack-layer-1 {\n box-shadow: var(--shadow);\n }\n\n &[data-stack-count='2'] {\n .error-overlay-bottom-stack-layer-2 {\n box-shadow: var(--shadow);\n }\n }\n }\n
|
25
|
+
export const styles = "\n .error-overlay-bottom-stack-layer {\n width: 100%;\n height: var(--stack-layer-height);\n position: relative;\n border: 1px solid var(--color-gray-400);\n border-radius: var(--rounded-xl);\n background: var(--color-background-200);\n transition:\n translate 350ms var(--timing-swift),\n box-shadow 350ms var(--timing-swift);\n }\n\n .error-overlay-bottom-stack-layer-1 {\n width: calc(100% - var(--size-24));\n }\n\n .error-overlay-bottom-stack-layer-2 {\n width: calc(100% - var(--size-48));\n z-index: -1;\n }\n\n .error-overlay-bottom-stack {\n width: 100%;\n position: absolute;\n bottom: -1px;\n height: 0;\n overflow: visible;\n }\n\n .error-overlay-bottom-stack-stack {\n --stack-layer-height: 44px;\n --stack-layer-height-half: calc(var(--stack-layer-height) / 2);\n --stack-layer-trim: 13px;\n --shadow: 0px 0.925px 0.925px 0px rgba(0, 0, 0, 0.02),\n 0px 3.7px 7.4px -3.7px rgba(0, 0, 0, 0.04),\n 0px 14.8px 22.2px -7.4px rgba(0, 0, 0, 0.06);\n\n display: grid;\n place-items: center center;\n width: 100%;\n position: fixed;\n overflow: hidden;\n z-index: -1;\n max-width: var(--next-dialog-max-width);\n\n .error-overlay-bottom-stack-layer {\n grid-area: 1 / 1;\n /* Hide */\n translate: 0 calc(var(--stack-layer-height) * -1);\n }\n\n &[data-stack-count='1'],\n &[data-stack-count='2'] {\n .error-overlay-bottom-stack-layer-1 {\n translate: 0\n calc(var(--stack-layer-height-half) * -1 - var(--stack-layer-trim));\n }\n }\n\n &[data-stack-count='2'] {\n .error-overlay-bottom-stack-layer-2 {\n translate: 0 calc(var(--stack-layer-trim) * -1 * 2);\n }\n }\n\n /* Only the bottom stack should have the shadow */\n &[data-stack-count='1'] .error-overlay-bottom-stack-layer-1 {\n box-shadow: var(--shadow);\n }\n\n &[data-stack-count='2'] {\n .error-overlay-bottom-stack-layer-2 {\n box-shadow: var(--shadow);\n }\n }\n }\n";
|
26
26
|
|
27
27
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../src/client/components/react-dev-overlay/ui/components/errors/error-overlay-bottom-stack/index.tsx"],"sourcesContent":["export function ErrorOverlayBottomStack({\n errorCount,\n activeIdx,\n}: {\n errorCount: number\n activeIdx: number\n}) {\n // If there are more than 2 errors to navigate, the stack count should remain at 2.\n const stackCount = Math.min(errorCount - activeIdx - 1, 2)\n return (\n <div aria-hidden className=\"error-overlay-bottom-stack\">\n <div\n className=\"error-overlay-bottom-stack-stack\"\n data-stack-count={stackCount}\n >\n <div className=\"error-overlay-bottom-stack-layer error-overlay-bottom-stack-layer-1\">\n 1\n </div>\n <div className=\"error-overlay-bottom-stack-layer error-overlay-bottom-stack-layer-2\">\n 2\n </div>\n </div>\n </div>\n )\n}\n\nexport const styles = `\n .error-overlay-bottom-stack-layer {\n width: 100%;\n height: var(--stack-layer-height);\n position: relative;\n border: 1px solid var(--color-gray-400);\n border-radius: var(--rounded-xl);\n background: var(--color-background-200);\n transition:\n translate 350ms var(--timing-swift),\n box-shadow 350ms var(--timing-swift);\n }\n\n .error-overlay-bottom-stack-layer-1 {\n width: calc(100% - var(--size-24));\n }\n\n .error-overlay-bottom-stack-layer-2 {\n width: calc(100% - var(--size-48));\n z-index: -1;\n }\n\n .error-overlay-bottom-stack {\n width: 100%;\n position: absolute;\n bottom: -1px;\n height: 0;\n overflow: visible;\n }\n\n .error-overlay-bottom-stack-stack {\n --stack-layer-height: 44px;\n --stack-layer-height-half: calc(var(--stack-layer-height) / 2);\n --stack-layer-trim: 13px;\n --shadow: 0px 0.925px 0.925px 0px rgba(0, 0, 0, 0.02),\n 0px 3.7px 7.4px -3.7px rgba(0, 0, 0, 0.04),\n 0px 14.8px 22.2px -7.4px rgba(0, 0, 0, 0.06);\n\n display: grid;\n place-items: center center;\n width: 100%;\n position: fixed;\n overflow: hidden;\n z-index: -1;\n max-width: var(--next-dialog-max-width);\n\n .error-overlay-bottom-stack-layer {\n grid-area: 1 / 1;\n /* Hide */\n translate: 0 calc(var(--stack-layer-height) * -1);\n }\n\n &[data-stack-count='1'],\n &[data-stack-count='2'] {\n .error-overlay-bottom-stack-layer-1 {\n translate: 0\n calc(var(--stack-layer-height-half) * -1 - var(--stack-layer-trim));\n }\n }\n\n &[data-stack-count='2'] {\n .error-overlay-bottom-stack-layer-2 {\n translate: 0 calc(var(--stack-layer-trim) * -1 * 2);\n }\n }\n\n /* Only the bottom stack should have the shadow */\n &[data-stack-count='1'] .error-overlay-bottom-stack-layer-1 {\n box-shadow: var(--shadow);\n }\n\n &[data-stack-count='2'] {\n .error-overlay-bottom-stack-layer-2 {\n box-shadow: var(--shadow);\n }\n }\n }\n
|
1
|
+
{"version":3,"sources":["../../../../../../../../src/client/components/react-dev-overlay/ui/components/errors/error-overlay-bottom-stack/index.tsx"],"sourcesContent":["export function ErrorOverlayBottomStack({\n errorCount,\n activeIdx,\n}: {\n errorCount: number\n activeIdx: number\n}) {\n // If there are more than 2 errors to navigate, the stack count should remain at 2.\n const stackCount = Math.min(errorCount - activeIdx - 1, 2)\n return (\n <div aria-hidden className=\"error-overlay-bottom-stack\">\n <div\n className=\"error-overlay-bottom-stack-stack\"\n data-stack-count={stackCount}\n >\n <div className=\"error-overlay-bottom-stack-layer error-overlay-bottom-stack-layer-1\">\n 1\n </div>\n <div className=\"error-overlay-bottom-stack-layer error-overlay-bottom-stack-layer-2\">\n 2\n </div>\n </div>\n </div>\n )\n}\n\nexport const styles = `\n .error-overlay-bottom-stack-layer {\n width: 100%;\n height: var(--stack-layer-height);\n position: relative;\n border: 1px solid var(--color-gray-400);\n border-radius: var(--rounded-xl);\n background: var(--color-background-200);\n transition:\n translate 350ms var(--timing-swift),\n box-shadow 350ms var(--timing-swift);\n }\n\n .error-overlay-bottom-stack-layer-1 {\n width: calc(100% - var(--size-24));\n }\n\n .error-overlay-bottom-stack-layer-2 {\n width: calc(100% - var(--size-48));\n z-index: -1;\n }\n\n .error-overlay-bottom-stack {\n width: 100%;\n position: absolute;\n bottom: -1px;\n height: 0;\n overflow: visible;\n }\n\n .error-overlay-bottom-stack-stack {\n --stack-layer-height: 44px;\n --stack-layer-height-half: calc(var(--stack-layer-height) / 2);\n --stack-layer-trim: 13px;\n --shadow: 0px 0.925px 0.925px 0px rgba(0, 0, 0, 0.02),\n 0px 3.7px 7.4px -3.7px rgba(0, 0, 0, 0.04),\n 0px 14.8px 22.2px -7.4px rgba(0, 0, 0, 0.06);\n\n display: grid;\n place-items: center center;\n width: 100%;\n position: fixed;\n overflow: hidden;\n z-index: -1;\n max-width: var(--next-dialog-max-width);\n\n .error-overlay-bottom-stack-layer {\n grid-area: 1 / 1;\n /* Hide */\n translate: 0 calc(var(--stack-layer-height) * -1);\n }\n\n &[data-stack-count='1'],\n &[data-stack-count='2'] {\n .error-overlay-bottom-stack-layer-1 {\n translate: 0\n calc(var(--stack-layer-height-half) * -1 - var(--stack-layer-trim));\n }\n }\n\n &[data-stack-count='2'] {\n .error-overlay-bottom-stack-layer-2 {\n translate: 0 calc(var(--stack-layer-trim) * -1 * 2);\n }\n }\n\n /* Only the bottom stack should have the shadow */\n &[data-stack-count='1'] .error-overlay-bottom-stack-layer-1 {\n box-shadow: var(--shadow);\n }\n\n &[data-stack-count='2'] {\n .error-overlay-bottom-stack-layer-2 {\n box-shadow: var(--shadow);\n }\n }\n }\n`\n"],"names":["ErrorOverlayBottomStack","errorCount","activeIdx","stackCount","Math","min","div","aria-hidden","className","data-stack-count","styles"],"mappings":";AAAA,OAAO,SAASA,wBAAwB,KAMvC;IANuC,IAAA,EACtCC,UAAU,EACVC,SAAS,EAIV,GANuC;IAOtC,mFAAmF;IACnF,MAAMC,aAAaC,KAAKC,GAAG,CAACJ,aAAaC,YAAY,GAAG;IACxD,qBACE,KAACI;QAAIC,aAAW;QAACC,WAAU;kBACzB,cAAA,MAACF;YACCE,WAAU;YACVC,oBAAkBN;;8BAElB,KAACG;oBAAIE,WAAU;8BAAsE;;8BAGrF,KAACF;oBAAIE,WAAU;8BAAsE;;;;;AAM7F;AAEA,OAAO,MAAME,SAAU,6gEA6EtB"}
|
@@ -7,6 +7,7 @@ import { Colors } from './styles/colors';
|
|
7
7
|
import { ErrorOverlay } from './components/errors/error-overlay/error-overlay';
|
8
8
|
import { DevToolsIndicator } from './components/errors/dev-tools-indicator/dev-tools-indicator';
|
9
9
|
import { RenderError } from './container/runtime-error/render-error';
|
10
|
+
import { DarkTheme } from './styles/dark-theme';
|
10
11
|
export function DevOverlay(param) {
|
11
12
|
let { state, isErrorOverlayOpen, setIsErrorOverlayOpen } = param;
|
12
13
|
return /*#__PURE__*/ _jsxs(ShadowPortal, {
|
@@ -15,6 +16,7 @@ export function DevOverlay(param) {
|
|
15
16
|
/*#__PURE__*/ _jsx(Base, {}),
|
16
17
|
/*#__PURE__*/ _jsx(Colors, {}),
|
17
18
|
/*#__PURE__*/ _jsx(ComponentStyles, {}),
|
19
|
+
/*#__PURE__*/ _jsx(DarkTheme, {}),
|
18
20
|
/*#__PURE__*/ _jsx(RenderError, {
|
19
21
|
state: state,
|
20
22
|
isAppDir: true,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../../src/client/components/react-dev-overlay/ui/dev-overlay.tsx"],"sourcesContent":["import type { OverlayState } from '../shared'\n\nimport { ShadowPortal } from './components/shadow-portal'\nimport { Base } from './styles/base'\nimport { ComponentStyles } from './styles/component-styles'\nimport { CssReset } from './styles/css-reset'\nimport { Colors } from './styles/colors'\nimport { ErrorOverlay } from './components/errors/error-overlay/error-overlay'\nimport { DevToolsIndicator } from './components/errors/dev-tools-indicator/dev-tools-indicator'\nimport { RenderError } from './container/runtime-error/render-error'\n\nexport function DevOverlay({\n state,\n isErrorOverlayOpen,\n setIsErrorOverlayOpen,\n}: {\n state: OverlayState\n isErrorOverlayOpen: boolean\n setIsErrorOverlayOpen: (\n isErrorOverlayOpen: boolean | ((prev: boolean) => boolean)\n ) => void\n}) {\n return (\n <ShadowPortal>\n <CssReset />\n <Base />\n <Colors />\n <ComponentStyles />\n\n <RenderError state={state} isAppDir={true}>\n {({ runtimeErrors, totalErrorCount }) => {\n const isBuildError = runtimeErrors.length === 0\n return (\n <>\n <DevToolsIndicator\n state={state}\n errorCount={totalErrorCount}\n isBuildError={isBuildError}\n setIsErrorOverlayOpen={setIsErrorOverlayOpen}\n />\n\n <ErrorOverlay\n state={state}\n runtimeErrors={runtimeErrors}\n isErrorOverlayOpen={isErrorOverlayOpen}\n setIsErrorOverlayOpen={setIsErrorOverlayOpen}\n />\n </>\n )\n }}\n </RenderError>\n </ShadowPortal>\n )\n}\n"],"names":["ShadowPortal","Base","ComponentStyles","CssReset","Colors","ErrorOverlay","DevToolsIndicator","RenderError","DevOverlay","state","isErrorOverlayOpen","setIsErrorOverlayOpen","isAppDir","runtimeErrors","totalErrorCount","isBuildError","length","errorCount"],"mappings":";AAEA,SAASA,YAAY,QAAQ,6BAA4B;AACzD,SAASC,IAAI,QAAQ,gBAAe;AACpC,SAASC,eAAe,QAAQ,4BAA2B;AAC3D,SAASC,QAAQ,QAAQ,qBAAoB;AAC7C,SAASC,MAAM,QAAQ,kBAAiB;AACxC,SAASC,YAAY,QAAQ,kDAAiD;AAC9E,SAASC,iBAAiB,QAAQ,8DAA6D;AAC/F,SAASC,WAAW,QAAQ,yCAAwC;
|
1
|
+
{"version":3,"sources":["../../../../../src/client/components/react-dev-overlay/ui/dev-overlay.tsx"],"sourcesContent":["import type { OverlayState } from '../shared'\n\nimport { ShadowPortal } from './components/shadow-portal'\nimport { Base } from './styles/base'\nimport { ComponentStyles } from './styles/component-styles'\nimport { CssReset } from './styles/css-reset'\nimport { Colors } from './styles/colors'\nimport { ErrorOverlay } from './components/errors/error-overlay/error-overlay'\nimport { DevToolsIndicator } from './components/errors/dev-tools-indicator/dev-tools-indicator'\nimport { RenderError } from './container/runtime-error/render-error'\nimport { DarkTheme } from './styles/dark-theme'\n\nexport function DevOverlay({\n state,\n isErrorOverlayOpen,\n setIsErrorOverlayOpen,\n}: {\n state: OverlayState\n isErrorOverlayOpen: boolean\n setIsErrorOverlayOpen: (\n isErrorOverlayOpen: boolean | ((prev: boolean) => boolean)\n ) => void\n}) {\n return (\n <ShadowPortal>\n <CssReset />\n <Base />\n <Colors />\n <ComponentStyles />\n <DarkTheme />\n\n <RenderError state={state} isAppDir={true}>\n {({ runtimeErrors, totalErrorCount }) => {\n const isBuildError = runtimeErrors.length === 0\n return (\n <>\n <DevToolsIndicator\n state={state}\n errorCount={totalErrorCount}\n isBuildError={isBuildError}\n setIsErrorOverlayOpen={setIsErrorOverlayOpen}\n />\n\n <ErrorOverlay\n state={state}\n runtimeErrors={runtimeErrors}\n isErrorOverlayOpen={isErrorOverlayOpen}\n setIsErrorOverlayOpen={setIsErrorOverlayOpen}\n />\n </>\n )\n }}\n </RenderError>\n </ShadowPortal>\n )\n}\n"],"names":["ShadowPortal","Base","ComponentStyles","CssReset","Colors","ErrorOverlay","DevToolsIndicator","RenderError","DarkTheme","DevOverlay","state","isErrorOverlayOpen","setIsErrorOverlayOpen","isAppDir","runtimeErrors","totalErrorCount","isBuildError","length","errorCount"],"mappings":";AAEA,SAASA,YAAY,QAAQ,6BAA4B;AACzD,SAASC,IAAI,QAAQ,gBAAe;AACpC,SAASC,eAAe,QAAQ,4BAA2B;AAC3D,SAASC,QAAQ,QAAQ,qBAAoB;AAC7C,SAASC,MAAM,QAAQ,kBAAiB;AACxC,SAASC,YAAY,QAAQ,kDAAiD;AAC9E,SAASC,iBAAiB,QAAQ,8DAA6D;AAC/F,SAASC,WAAW,QAAQ,yCAAwC;AACpE,SAASC,SAAS,QAAQ,sBAAqB;AAE/C,OAAO,SAASC,WAAW,KAU1B;IAV0B,IAAA,EACzBC,KAAK,EACLC,kBAAkB,EAClBC,qBAAqB,EAOtB,GAV0B;IAWzB,qBACE,MAACZ;;0BACC,KAACG;0BACD,KAACF;0BACD,KAACG;0BACD,KAACF;0BACD,KAACM;0BAED,KAACD;gBAAYG,OAAOA;gBAAOG,UAAU;0BAClC;wBAAC,EAAEC,aAAa,EAAEC,eAAe,EAAE;oBAClC,MAAMC,eAAeF,cAAcG,MAAM,KAAK;oBAC9C,qBACE;;0CACE,KAACX;gCACCI,OAAOA;gCACPQ,YAAYH;gCACZC,cAAcA;gCACdJ,uBAAuBA;;0CAGzB,KAACP;gCACCK,OAAOA;gCACPI,eAAeA;gCACfH,oBAAoBA;gCACpBC,uBAAuBA;;;;gBAI/B;;;;AAIR"}
|
@@ -4,12 +4,14 @@ import { Colors } from '../styles/colors';
|
|
4
4
|
import { CssReset } from '../styles/css-reset';
|
5
5
|
import { ComponentStyles } from '../styles/component-styles';
|
6
6
|
import { ShadowPortal } from '../components/shadow-portal';
|
7
|
+
import { DarkTheme } from '../styles/dark-theme';
|
7
8
|
export const withShadowPortal = (Story)=>/*#__PURE__*/ _jsxs(ShadowPortal, {
|
8
9
|
children: [
|
9
10
|
/*#__PURE__*/ _jsx(CssReset, {}),
|
10
11
|
/*#__PURE__*/ _jsx(Base, {}),
|
11
12
|
/*#__PURE__*/ _jsx(Colors, {}),
|
12
13
|
/*#__PURE__*/ _jsx(ComponentStyles, {}),
|
14
|
+
/*#__PURE__*/ _jsx(DarkTheme, {}),
|
13
15
|
/*#__PURE__*/ _jsx(Story, {})
|
14
16
|
]
|
15
17
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/client/components/react-dev-overlay/ui/storybook/with-shadow-portal.tsx"],"sourcesContent":["import { Base } from '../styles/base'\nimport { Colors } from '../styles/colors'\nimport { CssReset } from '../styles/css-reset'\nimport { ComponentStyles } from '../styles/component-styles'\nimport { ShadowPortal } from '../components/shadow-portal'\n\nexport const withShadowPortal = (Story: any) => (\n <ShadowPortal>\n <CssReset />\n <Base />\n <Colors />\n <ComponentStyles />\n <Story />\n </ShadowPortal>\n)\n"],"names":["Base","Colors","CssReset","ComponentStyles","ShadowPortal","withShadowPortal","Story"],"mappings":";AAAA,SAASA,IAAI,QAAQ,iBAAgB;AACrC,SAASC,MAAM,QAAQ,mBAAkB;AACzC,SAASC,QAAQ,QAAQ,sBAAqB;AAC9C,SAASC,eAAe,QAAQ,6BAA4B;AAC5D,SAASC,YAAY,QAAQ,8BAA6B;
|
1
|
+
{"version":3,"sources":["../../../../../../src/client/components/react-dev-overlay/ui/storybook/with-shadow-portal.tsx"],"sourcesContent":["import { Base } from '../styles/base'\nimport { Colors } from '../styles/colors'\nimport { CssReset } from '../styles/css-reset'\nimport { ComponentStyles } from '../styles/component-styles'\nimport { ShadowPortal } from '../components/shadow-portal'\nimport { DarkTheme } from '../styles/dark-theme'\n\nexport const withShadowPortal = (Story: any) => (\n <ShadowPortal>\n <CssReset />\n <Base />\n <Colors />\n <ComponentStyles />\n <DarkTheme />\n <Story />\n </ShadowPortal>\n)\n"],"names":["Base","Colors","CssReset","ComponentStyles","ShadowPortal","DarkTheme","withShadowPortal","Story"],"mappings":";AAAA,SAASA,IAAI,QAAQ,iBAAgB;AACrC,SAASC,MAAM,QAAQ,mBAAkB;AACzC,SAASC,QAAQ,QAAQ,sBAAqB;AAC9C,SAASC,eAAe,QAAQ,6BAA4B;AAC5D,SAASC,YAAY,QAAQ,8BAA6B;AAC1D,SAASC,SAAS,QAAQ,uBAAsB;AAEhD,OAAO,MAAMC,mBAAmB,CAACC,sBAC/B,MAACH;;0BACC,KAACF;0BACD,KAACF;0BACD,KAACC;0BACD,KAACE;0BACD,KAACE;0BACD,KAACE;;OAEJ"}
|
@@ -1,30 +1,18 @@
|
|
1
1
|
import { _ as _tagged_template_literal_loose } from "@swc/helpers/_/_tagged_template_literal_loose";
|
2
2
|
function _templateObject() {
|
3
3
|
const data = _tagged_template_literal_loose([
|
4
|
-
"\n
|
4
|
+
"\n :host {\n /* \n * Although the style applied to the shadow host is isolated,\n * the element that attached the shadow host (i.e. \"nextjs-portal\")\n * is still affected by the parent's style (e.g. \"body\"). This may\n * occur style conflicts like \"display: flex\", with other children\n * elements therefore give the shadow host an absolute position.\n */\n position: absolute;\n\n --color-font: #757575;\n --color-backdrop: rgba(250, 250, 250, 0.8);\n --color-border-shadow: rgba(0, 0, 0, 0.145);\n\n --color-title-color: #1f1f1f;\n --color-stack-notes: #777;\n\n --color-accents-1: #808080;\n --color-accents-2: #222222;\n --color-accents-3: #404040;\n\n --font-stack-monospace: '__nextjs-Geist Mono', 'Geist Mono',\n 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier,\n monospace;\n --font-stack-sans: '__nextjs-Geist', 'Geist', -apple-system,\n 'Source Sans Pro', sans-serif;\n\n font-family: var(--font-stack-sans);\n\n /* TODO: Remove replaced ones. */\n --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1),\n 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1),\n 0 2px 4px -2px rgb(0 0 0 / 0.1);\n --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),\n 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1),\n 0 8px 10px -6px rgb(0 0 0 / 0.1);\n --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);\n --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);\n --shadow-none: 0 0 #0000;\n\n --shadow-small: 0px 2px 2px rgba(0, 0, 0, 0.04);\n --shadow-menu: 0px 1px 1px rgba(0, 0, 0, 0.02),\n 0px 4px 8px -4px rgba(0, 0, 0, 0.04),\n 0px 16px 24px -8px rgba(0, 0, 0, 0.06);\n\n --focus-color: var(--color-blue-800);\n --focus-ring: 2px solid var(--focus-color);\n\n --timing-swift: cubic-bezier(0.23, 0.88, 0.26, 0.92);\n --timing-overlay: cubic-bezier(0.175, 0.885, 0.32, 1.1);\n\n --rounded-none: 0px;\n --rounded-sm: 2px;\n --rounded-md: 4px;\n --rounded-md-2: 6px;\n --rounded-lg: 8px;\n --rounded-xl: 12px;\n --rounded-2xl: 16px;\n --rounded-3xl: 24px;\n --rounded-4xl: 32px;\n --rounded-full: 9999px;\n\n /* \n Suffix N of --size-N as px value when the base font size is 16px.\n Example: --size-1 is 1px, --size-2 is 2px, --size-3 is 3px, etc.\n */\n --size-1: 0.0625rem; /* 1px */\n --size-2: 0.125rem; /* 2px */\n --size-3: 0.1875rem; /* 3px */\n --size-4: 0.25rem; /* ...and more */\n --size-5: 0.3125rem;\n --size-6: 0.375rem;\n --size-7: 0.4375rem;\n --size-8: 0.5rem;\n --size-9: 0.5625rem;\n --size-10: 0.625rem;\n --size-11: 0.6875rem;\n --size-12: 0.75rem;\n --size-13: 0.8125rem;\n --size-14: 0.875rem;\n --size-15: 0.9375rem;\n /* If the base font size of the dev overlay changes e.g. 18px, \n just slide the window and make --size-18 as 1rem. */\n --size-16: 1rem;\n --size-17: 1.0625rem;\n --size-18: 1.125rem;\n --size-20: 1.25rem;\n --size-22: 1.375rem;\n --size-24: 1.5rem;\n --size-26: 1.625rem;\n --size-28: 1.75rem;\n --size-30: 1.875rem;\n --size-32: 2rem;\n --size-34: 2.125rem;\n --size-36: 2.25rem;\n --size-38: 2.375rem;\n --size-40: 2.5rem;\n --size-42: 2.625rem;\n --size-44: 2.75rem;\n --size-46: 2.875rem;\n --size-48: 3rem;\n\n @media print {\n display: none;\n }\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin-bottom: 8px;\n font-weight: 500;\n line-height: 1.5;\n }\n\n a {\n color: var(--color-blue-900);\n &:hover {\n color: var(--color-blue-900);\n }\n &:focus {\n outline: var(--focus-ring);\n }\n }\n "
|
5
5
|
]);
|
6
6
|
_templateObject = function() {
|
7
7
|
return data;
|
8
8
|
};
|
9
9
|
return data;
|
10
10
|
}
|
11
|
-
function _templateObject1() {
|
12
|
-
const data = _tagged_template_literal_loose([
|
13
|
-
"\n :host {\n /* \n Although the style applied to the shadow host is isolated,\n the element that attached the shadow host (i.e. \"nextjs-portal\")\n is still affected by the parent's style (e.g. \"body\"). This may\n occur style conflicts like \"display: flex\", with other children\n elements therefore give the shadow host an absolute position.\n */\n position: absolute;\n\n --color-font: #757575;\n --color-backdrop: rgba(250, 250, 250, 0.8);\n --color-border-shadow: rgba(0, 0, 0, 0.145);\n\n --color-title-color: #1f1f1f;\n --color-stack-notes: #777;\n\n --color-accents-1: #808080;\n --color-accents-2: #222222;\n --color-accents-3: #404040;\n\n --font-stack-monospace: '__nextjs-Geist Mono', 'Geist Mono',\n 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier,\n monospace;\n --font-stack-sans: '__nextjs-Geist', 'Geist', -apple-system,\n 'Source Sans Pro', sans-serif;\n\n font-family: var(--font-stack-sans);\n\n /* TODO: Remove replaced ones. */\n --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1),\n 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1),\n 0 2px 4px -2px rgb(0 0 0 / 0.1);\n --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),\n 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1),\n 0 8px 10px -6px rgb(0 0 0 / 0.1);\n --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);\n --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);\n --shadow-none: 0 0 #0000;\n\n --shadow-small: 0px 2px 2px rgba(0, 0, 0, 0.04);\n --shadow-menu: 0px 1px 1px rgba(0, 0, 0, 0.02),\n 0px 4px 8px -4px rgba(0, 0, 0, 0.04),\n 0px 16px 24px -8px rgba(0, 0, 0, 0.06);\n\n --focus-color: var(--color-blue-800);\n --focus-ring: 2px solid var(--focus-color);\n\n --timing-swift: cubic-bezier(0.23, 0.88, 0.26, 0.92);\n --timing-overlay: cubic-bezier(0.175, 0.885, 0.32, 1.1);\n\n --rounded-none: 0px;\n --rounded-sm: 2px;\n --rounded-md: 4px;\n --rounded-md-2: 6px;\n --rounded-lg: 8px;\n --rounded-xl: 12px;\n --rounded-2xl: 16px;\n --rounded-3xl: 24px;\n --rounded-4xl: 32px;\n --rounded-full: 9999px;\n\n /* \n Suffix N of --size-N as px value when the base font size is 16px.\n Example: --size-1 is 1px, --size-2 is 2px, --size-3 is 3px, etc.\n */\n --size-1: 0.0625rem; /* 1px */\n --size-2: 0.125rem; /* 2px */\n --size-3: 0.1875rem; /* 3px */\n --size-4: 0.25rem; /* ...and more */\n --size-5: 0.3125rem;\n --size-6: 0.375rem;\n --size-7: 0.4375rem;\n --size-8: 0.5rem;\n --size-9: 0.5625rem;\n --size-10: 0.625rem;\n --size-11: 0.6875rem;\n --size-12: 0.75rem;\n --size-13: 0.8125rem;\n --size-14: 0.875rem;\n --size-15: 0.9375rem;\n /* If the base font size of the dev overlay changes e.g. 18px, \n just slide the window and make --size-18 as 1rem. */\n --size-16: 1rem;\n --size-17: 1.0625rem;\n --size-18: 1.125rem;\n --size-20: 1.25rem;\n --size-22: 1.375rem;\n --size-24: 1.5rem;\n --size-26: 1.625rem;\n --size-28: 1.75rem;\n --size-30: 1.875rem;\n --size-32: 2rem;\n --size-34: 2.125rem;\n --size-36: 2.25rem;\n --size-38: 2.375rem;\n --size-40: 2.5rem;\n --size-42: 2.625rem;\n --size-44: 2.75rem;\n --size-46: 2.875rem;\n --size-48: 3rem;\n\n @media print {\n display: none;\n }\n }\n\n :host(.dark) {\n ",
|
14
|
-
"\n }\n\n @media (prefers-color-scheme: dark) {\n :host(:not(.light)) {\n ",
|
15
|
-
"\n }\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin-bottom: 8px;\n font-weight: 500;\n line-height: 1.5;\n }\n\n a {\n color: var(--color-blue-900);\n &:hover {\n color: var(--color-blue-900);\n }\n &:focus {\n outline: var(--focus-ring);\n }\n }\n "
|
16
|
-
]);
|
17
|
-
_templateObject1 = function() {
|
18
|
-
return data;
|
19
|
-
};
|
20
|
-
return data;
|
21
|
-
}
|
22
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
23
12
|
import { css } from '../../utils/css';
|
24
|
-
const darkTheme = css(_templateObject());
|
25
13
|
export function Base() {
|
26
14
|
return /*#__PURE__*/ _jsx("style", {
|
27
|
-
children: css(
|
15
|
+
children: css(_templateObject())
|
28
16
|
});
|
29
17
|
}
|
30
18
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/client/components/react-dev-overlay/ui/styles/base.tsx"],"sourcesContent":["import { css } from '../../utils/css'\n\
|
1
|
+
{"version":3,"sources":["../../../../../../src/client/components/react-dev-overlay/ui/styles/base.tsx"],"sourcesContent":["import { css } from '../../utils/css'\n\nexport function Base() {\n return (\n <style>\n {css`\n :host {\n /* \n * Although the style applied to the shadow host is isolated,\n * the element that attached the shadow host (i.e. \"nextjs-portal\")\n * is still affected by the parent's style (e.g. \"body\"). This may\n * occur style conflicts like \"display: flex\", with other children\n * elements therefore give the shadow host an absolute position.\n */\n position: absolute;\n\n --color-font: #757575;\n --color-backdrop: rgba(250, 250, 250, 0.8);\n --color-border-shadow: rgba(0, 0, 0, 0.145);\n\n --color-title-color: #1f1f1f;\n --color-stack-notes: #777;\n\n --color-accents-1: #808080;\n --color-accents-2: #222222;\n --color-accents-3: #404040;\n\n --font-stack-monospace: '__nextjs-Geist Mono', 'Geist Mono',\n 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier,\n monospace;\n --font-stack-sans: '__nextjs-Geist', 'Geist', -apple-system,\n 'Source Sans Pro', sans-serif;\n\n font-family: var(--font-stack-sans);\n\n /* TODO: Remove replaced ones. */\n --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1),\n 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1),\n 0 2px 4px -2px rgb(0 0 0 / 0.1);\n --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),\n 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1),\n 0 8px 10px -6px rgb(0 0 0 / 0.1);\n --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);\n --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);\n --shadow-none: 0 0 #0000;\n\n --shadow-small: 0px 2px 2px rgba(0, 0, 0, 0.04);\n --shadow-menu: 0px 1px 1px rgba(0, 0, 0, 0.02),\n 0px 4px 8px -4px rgba(0, 0, 0, 0.04),\n 0px 16px 24px -8px rgba(0, 0, 0, 0.06);\n\n --focus-color: var(--color-blue-800);\n --focus-ring: 2px solid var(--focus-color);\n\n --timing-swift: cubic-bezier(0.23, 0.88, 0.26, 0.92);\n --timing-overlay: cubic-bezier(0.175, 0.885, 0.32, 1.1);\n\n --rounded-none: 0px;\n --rounded-sm: 2px;\n --rounded-md: 4px;\n --rounded-md-2: 6px;\n --rounded-lg: 8px;\n --rounded-xl: 12px;\n --rounded-2xl: 16px;\n --rounded-3xl: 24px;\n --rounded-4xl: 32px;\n --rounded-full: 9999px;\n\n /* \n Suffix N of --size-N as px value when the base font size is 16px.\n Example: --size-1 is 1px, --size-2 is 2px, --size-3 is 3px, etc.\n */\n --size-1: 0.0625rem; /* 1px */\n --size-2: 0.125rem; /* 2px */\n --size-3: 0.1875rem; /* 3px */\n --size-4: 0.25rem; /* ...and more */\n --size-5: 0.3125rem;\n --size-6: 0.375rem;\n --size-7: 0.4375rem;\n --size-8: 0.5rem;\n --size-9: 0.5625rem;\n --size-10: 0.625rem;\n --size-11: 0.6875rem;\n --size-12: 0.75rem;\n --size-13: 0.8125rem;\n --size-14: 0.875rem;\n --size-15: 0.9375rem;\n /* If the base font size of the dev overlay changes e.g. 18px, \n just slide the window and make --size-18 as 1rem. */\n --size-16: 1rem;\n --size-17: 1.0625rem;\n --size-18: 1.125rem;\n --size-20: 1.25rem;\n --size-22: 1.375rem;\n --size-24: 1.5rem;\n --size-26: 1.625rem;\n --size-28: 1.75rem;\n --size-30: 1.875rem;\n --size-32: 2rem;\n --size-34: 2.125rem;\n --size-36: 2.25rem;\n --size-38: 2.375rem;\n --size-40: 2.5rem;\n --size-42: 2.625rem;\n --size-44: 2.75rem;\n --size-46: 2.875rem;\n --size-48: 3rem;\n\n @media print {\n display: none;\n }\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin-bottom: 8px;\n font-weight: 500;\n line-height: 1.5;\n }\n\n a {\n color: var(--color-blue-900);\n &:hover {\n color: var(--color-blue-900);\n }\n &:focus {\n outline: var(--focus-ring);\n }\n }\n `}\n </style>\n )\n}\n"],"names":["css","Base","style"],"mappings":";;;;;;;;;;;AAAA,SAASA,GAAG,QAAQ,kBAAiB;AAErC,OAAO,SAASC;IACd,qBACE,KAACC;kBACEF;;AAsIP"}
|
@@ -1,39 +1,18 @@
|
|
1
1
|
import { _ as _tagged_template_literal_loose } from "@swc/helpers/_/_tagged_template_literal_loose";
|
2
2
|
function _templateObject() {
|
3
3
|
const data = _tagged_template_literal_loose([
|
4
|
-
"\n
|
4
|
+
'\n :host {\n /* \n * CAUTION: THIS IS A WORKAROUND!\n * For now, we use @babel/code-frame to parse the code frame which does not support option to change the color.\n * x-ref: https://github.com/babel/babel/blob/efa52324ff835b794c48080f14877b6caf32cd15/packages/babel-code-frame/src/defs.ts#L40-L54\n * So, we do a workaround mapping to change the color matching the theme.\n *\n * For example, in @babel/code-frame, the "keyword" is mapped to ANSI "cyan".\n * We want the "keyword" to use the "syntax-keyword" color in the theme.\n * So, we map the "cyan" to the "syntax-keyword" in the theme.\n */\n /* cyan: keyword */\n --color-ansi-cyan: var(--color-syntax-keyword);\n /* yellow: capitalized, jsxIdentifier, punctuation */\n --color-ansi-yellow: var(--color-syntax-punctuation);\n /* magenta: number, regex */\n --color-ansi-magenta: var(--color-syntax-number);\n /* green: string */\n --color-ansi-green: var(--color-syntax-string);\n /* gray (bright black): comment, gutter */\n --color-ansi-bright-black: var(--color-syntax-comment);\n\n /* Ansi - Temporary */\n --color-ansi-selection: var(--color-gray-alpha-300);\n --color-ansi-bg: var(--color-background-200);\n --color-ansi-fg: var(--color-gray-1000);\n\n --color-ansi-white: var(--color-gray-700);\n --color-ansi-black: var(--color-gray-200);\n --color-ansi-blue: var(--color-blue-700);\n --color-ansi-red: var(--color-red-700);\n --color-ansi-bright-white: var(--color-gray-1000);\n --color-ansi-bright-blue: var(--color-blue-800);\n --color-ansi-bright-cyan: var(--color-blue-800);\n --color-ansi-bright-green: var(--color-green-800);\n --color-ansi-bright-magenta: var(--color-blue-800);\n --color-ansi-bright-red: var(--color-red-800);\n --color-ansi-bright-yellow: var(--color-amber-900);\n\n /* Background Light */\n --color-background-100: #ffffff;\n --color-background-200: #fafafa;\n\n /* Syntax Light */\n --color-syntax-comment: #545454;\n --color-syntax-constant: #171717;\n --color-syntax-function: #0054ad;\n --color-syntax-keyword: #a51850;\n --color-syntax-link: #066056;\n --color-syntax-parameter: #8f3e00;\n --color-syntax-punctuation: #171717;\n --color-syntax-string: #036157;\n --color-syntax-string-expression: #066056;\n\n /* Gray Scale Light */\n --color-gray-100: #f2f2f2;\n --color-gray-200: #ebebeb;\n --color-gray-300: #e6e6e6;\n --color-gray-400: #eaeaea;\n --color-gray-500: #c9c9c9;\n --color-gray-600: #a8a8a8;\n --color-gray-700: #8f8f8f;\n --color-gray-800: #7d7d7d;\n --color-gray-900: #666666;\n --color-gray-1000: #171717;\n\n /* Gray Alpha Scale Light */\n --color-gray-alpha-100: rgba(0, 0, 0, 0.05);\n --color-gray-alpha-200: rgba(0, 0, 0, 0.081);\n --color-gray-alpha-300: rgba(0, 0, 0, 0.1);\n --color-gray-alpha-400: rgba(0, 0, 0, 0.08);\n --color-gray-alpha-500: rgba(0, 0, 0, 0.21);\n --color-gray-alpha-600: rgba(0, 0, 0, 0.34);\n --color-gray-alpha-700: rgba(0, 0, 0, 0.44);\n --color-gray-alpha-800: rgba(0, 0, 0, 0.51);\n --color-gray-alpha-900: rgba(0, 0, 0, 0.605);\n --color-gray-alpha-1000: rgba(0, 0, 0, 0.91);\n\n /* Blue Scale Light */\n --color-blue-100: #f0f7ff;\n --color-blue-200: #edf6ff;\n --color-blue-300: #e1f0ff;\n --color-blue-400: #cde7ff;\n --color-blue-500: #99ceff;\n --color-blue-600: #52aeff;\n --color-blue-700: #0070f3;\n --color-blue-800: #0060d1;\n --color-blue-900: #0067d6;\n --color-blue-1000: #0025ad;\n\n /* Red Scale Light */\n --color-red-100: #fff0f0;\n --color-red-200: #ffebeb;\n --color-red-300: #ffe5e5;\n --color-red-400: #fdd8d8;\n --color-red-500: #f8baba;\n --color-red-600: #f87274;\n --color-red-700: #e5484d;\n --color-red-800: #da3036;\n --color-red-900: #ca2a30;\n --color-red-1000: #381316;\n\n /* Amber Scale Light */\n --color-amber-100: #fff6e5;\n --color-amber-200: #fff4d5;\n --color-amber-300: #fef0cd;\n --color-amber-400: #ffddbf;\n --color-amber-500: #ffc96b;\n --color-amber-600: #f5b047;\n --color-amber-700: #ffb224;\n --color-amber-800: #ff990a;\n --color-amber-900: #a35200;\n --color-amber-1000: #4e2009;\n\n /* Green Scale Light */\n --color-green-100: #effbef;\n --color-green-200: #eafaea;\n --color-green-300: #dcf6dc;\n --color-green-400: #c8f1c9;\n --color-green-500: #99e59f;\n --color-green-600: #6cda76;\n --color-green-700: #46a758;\n --color-green-800: #388e4a;\n --color-green-900: #297c3b;\n --color-green-1000: #18311e;\n\n /* Turbopack Light - Temporary */\n --color-turbopack-text-red: #ff1e56;\n --color-turbopack-text-blue: #0096ff;\n --color-turbopack-border-red: #f0adbe;\n --color-turbopack-border-blue: #adccea;\n --color-turbopack-background-red: #fff7f9;\n --color-turbopack-background-blue: #f6fbff;\n }\n '
|
5
5
|
]);
|
6
6
|
_templateObject = function() {
|
7
7
|
return data;
|
8
8
|
};
|
9
9
|
return data;
|
10
10
|
}
|
11
|
-
function _templateObject1() {
|
12
|
-
const data = _tagged_template_literal_loose([
|
13
|
-
"\n :host {\n ",
|
14
|
-
"\n /* cyan: keyword */\n --color-ansi-cyan: var(--color-syntax-keyword);\n /* yellow: capitalized, jsxIdentifier, punctuation */\n --color-ansi-yellow: var(--color-syntax-punctuation);\n /* magenta: number, regex */\n --color-ansi-magenta: var(--color-syntax-number);\n /* green: string */\n --color-ansi-green: var(--color-syntax-string);\n /* gray (bright black): comment, gutter */\n --color-ansi-bright-black: var(--color-syntax-comment);\n\n /* Ansi - Temporary */\n --color-ansi-selection: var(--color-gray-alpha-300);\n --color-ansi-bg: var(--color-background-200);\n --color-ansi-fg: var(--color-gray-1000);\n\n --color-ansi-white: var(--color-gray-700);\n --color-ansi-black: var(--color-gray-200);\n --color-ansi-blue: var(--color-blue-700);\n --color-ansi-red: var(--color-red-700);\n --color-ansi-bright-white: var(--color-gray-1000);\n --color-ansi-bright-blue: var(--color-blue-800);\n --color-ansi-bright-cyan: var(--color-blue-800);\n --color-ansi-bright-green: var(--color-green-800);\n --color-ansi-bright-magenta: var(--color-blue-800);\n --color-ansi-bright-red: var(--color-red-800);\n --color-ansi-bright-yellow: var(--color-amber-900);\n\n /* Background Light */\n --color-background-100: #ffffff;\n --color-background-200: #fafafa;\n\n /* Syntax Light */\n --color-syntax-comment: #545454;\n --color-syntax-constant: #171717;\n --color-syntax-function: #0054ad;\n --color-syntax-keyword: #a51850;\n --color-syntax-link: #066056;\n --color-syntax-parameter: #8f3e00;\n --color-syntax-punctuation: #171717;\n --color-syntax-string: #036157;\n --color-syntax-string-expression: #066056;\n\n /* Gray Scale Light */\n --color-gray-100: #f2f2f2;\n --color-gray-200: #ebebeb;\n --color-gray-300: #e6e6e6;\n --color-gray-400: #eaeaea;\n --color-gray-500: #c9c9c9;\n --color-gray-600: #a8a8a8;\n --color-gray-700: #8f8f8f;\n --color-gray-800: #7d7d7d;\n --color-gray-900: #666666;\n --color-gray-1000: #171717;\n\n /* Gray Alpha Scale Light */\n --color-gray-alpha-100: rgba(0, 0, 0, 0.05);\n --color-gray-alpha-200: rgba(0, 0, 0, 0.081);\n --color-gray-alpha-300: rgba(0, 0, 0, 0.1);\n --color-gray-alpha-400: rgba(0, 0, 0, 0.08);\n --color-gray-alpha-500: rgba(0, 0, 0, 0.21);\n --color-gray-alpha-600: rgba(0, 0, 0, 0.34);\n --color-gray-alpha-700: rgba(0, 0, 0, 0.44);\n --color-gray-alpha-800: rgba(0, 0, 0, 0.51);\n --color-gray-alpha-900: rgba(0, 0, 0, 0.605);\n --color-gray-alpha-1000: rgba(0, 0, 0, 0.91);\n\n /* Blue Scale Light */\n --color-blue-100: #f0f7ff;\n --color-blue-200: #edf6ff;\n --color-blue-300: #e1f0ff;\n --color-blue-400: #cde7ff;\n --color-blue-500: #99ceff;\n --color-blue-600: #52aeff;\n --color-blue-700: #0070f3;\n --color-blue-800: #0060d1;\n --color-blue-900: #0067d6;\n --color-blue-1000: #0025ad;\n\n /* Red Scale Light */\n --color-red-100: #fff0f0;\n --color-red-200: #ffebeb;\n --color-red-300: #ffe5e5;\n --color-red-400: #fdd8d8;\n --color-red-500: #f8baba;\n --color-red-600: #f87274;\n --color-red-700: #e5484d;\n --color-red-800: #da3036;\n --color-red-900: #ca2a30;\n --color-red-1000: #381316;\n\n /* Amber Scale Light */\n --color-amber-100: #fff6e5;\n --color-amber-200: #fff4d5;\n --color-amber-300: #fef0cd;\n --color-amber-400: #ffddbf;\n --color-amber-500: #ffc96b;\n --color-amber-600: #f5b047;\n --color-amber-700: #ffb224;\n --color-amber-800: #ff990a;\n --color-amber-900: #a35200;\n --color-amber-1000: #4e2009;\n\n /* Green Scale Light */\n --color-green-100: #effbef;\n --color-green-200: #eafaea;\n --color-green-300: #dcf6dc;\n --color-green-400: #c8f1c9;\n --color-green-500: #99e59f;\n --color-green-600: #6cda76;\n --color-green-700: #46a758;\n --color-green-800: #388e4a;\n --color-green-900: #297c3b;\n --color-green-1000: #18311e;\n\n /* Turbopack Light - Temporary */\n --color-turbopack-text-red: #ff1e56;\n --color-turbopack-text-blue: #0096ff;\n --color-turbopack-border-red: #f0adbe;\n --color-turbopack-border-blue: #adccea;\n --color-turbopack-background-red: #fff7f9;\n --color-turbopack-background-blue: #f6fbff;\n }\n\n :host(.dark) {\n ",
|
15
|
-
"\n }\n\n @media (prefers-color-scheme: dark) {\n :host(:not(.light)) {\n ",
|
16
|
-
"\n }\n }\n "
|
17
|
-
]);
|
18
|
-
_templateObject1 = function() {
|
19
|
-
return data;
|
20
|
-
};
|
21
|
-
return data;
|
22
|
-
}
|
23
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
24
12
|
import { css } from '../../utils/css';
|
25
|
-
const darkTheme = css(_templateObject());
|
26
|
-
// TODO: Replace the existing colors in Base.tsx.
|
27
13
|
export function Colors() {
|
28
14
|
return /*#__PURE__*/ _jsx("style", {
|
29
|
-
children: css(
|
30
|
-
// For now, we use @babel/code-frame to parse the code frame which does not support option to change the color.
|
31
|
-
// x-ref: https://github.com/babel/babel/blob/efa52324ff835b794c48080f14877b6caf32cd15/packages/babel-code-frame/src/defs.ts#L40-L54
|
32
|
-
// So, we do a workaround mapping to change the color matching the theme.
|
33
|
-
// For example, in @babel/code-frame, the `keyword` is mapped to ANSI "cyan".
|
34
|
-
// We want the `keyword` to use the `syntax-keyword` color in the theme.
|
35
|
-
// So, we map the "cyan" to the `syntax-keyword` in the theme.
|
36
|
-
'', darkTheme, darkTheme)
|
15
|
+
children: css(_templateObject())
|
37
16
|
});
|
38
17
|
}
|
39
18
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/client/components/react-dev-overlay/ui/styles/colors.tsx"],"sourcesContent":["import { css } from '../../utils/css'\n\
|
1
|
+
{"version":3,"sources":["../../../../../../src/client/components/react-dev-overlay/ui/styles/colors.tsx"],"sourcesContent":["import { css } from '../../utils/css'\n\nexport function Colors() {\n return (\n <style>\n {css`\n :host {\n /* \n * CAUTION: THIS IS A WORKAROUND!\n * For now, we use @babel/code-frame to parse the code frame which does not support option to change the color.\n * x-ref: https://github.com/babel/babel/blob/efa52324ff835b794c48080f14877b6caf32cd15/packages/babel-code-frame/src/defs.ts#L40-L54\n * So, we do a workaround mapping to change the color matching the theme.\n *\n * For example, in @babel/code-frame, the \"keyword\" is mapped to ANSI \"cyan\".\n * We want the \"keyword\" to use the \"syntax-keyword\" color in the theme.\n * So, we map the \"cyan\" to the \"syntax-keyword\" in the theme.\n */\n /* cyan: keyword */\n --color-ansi-cyan: var(--color-syntax-keyword);\n /* yellow: capitalized, jsxIdentifier, punctuation */\n --color-ansi-yellow: var(--color-syntax-punctuation);\n /* magenta: number, regex */\n --color-ansi-magenta: var(--color-syntax-number);\n /* green: string */\n --color-ansi-green: var(--color-syntax-string);\n /* gray (bright black): comment, gutter */\n --color-ansi-bright-black: var(--color-syntax-comment);\n\n /* Ansi - Temporary */\n --color-ansi-selection: var(--color-gray-alpha-300);\n --color-ansi-bg: var(--color-background-200);\n --color-ansi-fg: var(--color-gray-1000);\n\n --color-ansi-white: var(--color-gray-700);\n --color-ansi-black: var(--color-gray-200);\n --color-ansi-blue: var(--color-blue-700);\n --color-ansi-red: var(--color-red-700);\n --color-ansi-bright-white: var(--color-gray-1000);\n --color-ansi-bright-blue: var(--color-blue-800);\n --color-ansi-bright-cyan: var(--color-blue-800);\n --color-ansi-bright-green: var(--color-green-800);\n --color-ansi-bright-magenta: var(--color-blue-800);\n --color-ansi-bright-red: var(--color-red-800);\n --color-ansi-bright-yellow: var(--color-amber-900);\n\n /* Background Light */\n --color-background-100: #ffffff;\n --color-background-200: #fafafa;\n\n /* Syntax Light */\n --color-syntax-comment: #545454;\n --color-syntax-constant: #171717;\n --color-syntax-function: #0054ad;\n --color-syntax-keyword: #a51850;\n --color-syntax-link: #066056;\n --color-syntax-parameter: #8f3e00;\n --color-syntax-punctuation: #171717;\n --color-syntax-string: #036157;\n --color-syntax-string-expression: #066056;\n\n /* Gray Scale Light */\n --color-gray-100: #f2f2f2;\n --color-gray-200: #ebebeb;\n --color-gray-300: #e6e6e6;\n --color-gray-400: #eaeaea;\n --color-gray-500: #c9c9c9;\n --color-gray-600: #a8a8a8;\n --color-gray-700: #8f8f8f;\n --color-gray-800: #7d7d7d;\n --color-gray-900: #666666;\n --color-gray-1000: #171717;\n\n /* Gray Alpha Scale Light */\n --color-gray-alpha-100: rgba(0, 0, 0, 0.05);\n --color-gray-alpha-200: rgba(0, 0, 0, 0.081);\n --color-gray-alpha-300: rgba(0, 0, 0, 0.1);\n --color-gray-alpha-400: rgba(0, 0, 0, 0.08);\n --color-gray-alpha-500: rgba(0, 0, 0, 0.21);\n --color-gray-alpha-600: rgba(0, 0, 0, 0.34);\n --color-gray-alpha-700: rgba(0, 0, 0, 0.44);\n --color-gray-alpha-800: rgba(0, 0, 0, 0.51);\n --color-gray-alpha-900: rgba(0, 0, 0, 0.605);\n --color-gray-alpha-1000: rgba(0, 0, 0, 0.91);\n\n /* Blue Scale Light */\n --color-blue-100: #f0f7ff;\n --color-blue-200: #edf6ff;\n --color-blue-300: #e1f0ff;\n --color-blue-400: #cde7ff;\n --color-blue-500: #99ceff;\n --color-blue-600: #52aeff;\n --color-blue-700: #0070f3;\n --color-blue-800: #0060d1;\n --color-blue-900: #0067d6;\n --color-blue-1000: #0025ad;\n\n /* Red Scale Light */\n --color-red-100: #fff0f0;\n --color-red-200: #ffebeb;\n --color-red-300: #ffe5e5;\n --color-red-400: #fdd8d8;\n --color-red-500: #f8baba;\n --color-red-600: #f87274;\n --color-red-700: #e5484d;\n --color-red-800: #da3036;\n --color-red-900: #ca2a30;\n --color-red-1000: #381316;\n\n /* Amber Scale Light */\n --color-amber-100: #fff6e5;\n --color-amber-200: #fff4d5;\n --color-amber-300: #fef0cd;\n --color-amber-400: #ffddbf;\n --color-amber-500: #ffc96b;\n --color-amber-600: #f5b047;\n --color-amber-700: #ffb224;\n --color-amber-800: #ff990a;\n --color-amber-900: #a35200;\n --color-amber-1000: #4e2009;\n\n /* Green Scale Light */\n --color-green-100: #effbef;\n --color-green-200: #eafaea;\n --color-green-300: #dcf6dc;\n --color-green-400: #c8f1c9;\n --color-green-500: #99e59f;\n --color-green-600: #6cda76;\n --color-green-700: #46a758;\n --color-green-800: #388e4a;\n --color-green-900: #297c3b;\n --color-green-1000: #18311e;\n\n /* Turbopack Light - Temporary */\n --color-turbopack-text-red: #ff1e56;\n --color-turbopack-text-blue: #0096ff;\n --color-turbopack-border-red: #f0adbe;\n --color-turbopack-border-blue: #adccea;\n --color-turbopack-background-red: #fff7f9;\n --color-turbopack-background-blue: #f6fbff;\n }\n `}\n </style>\n )\n}\n"],"names":["css","Colors","style"],"mappings":";;;;;;;;;;;AAAA,SAASA,GAAG,QAAQ,kBAAiB;AAErC,OAAO,SAASC;IACd,qBACE,KAACC;kBACEF;;AA0IP"}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { _ as _tagged_template_literal_loose } from "@swc/helpers/_/_tagged_template_literal_loose";
|
2
|
+
function _templateObject() {
|
3
|
+
const data = _tagged_template_literal_loose([
|
4
|
+
"\n :host(.dark) {\n ",
|
5
|
+
"\n ",
|
6
|
+
"\n\n @media (prefers-color-scheme: dark) {\n :host(:not(.light)) {\n ",
|
7
|
+
"\n ",
|
8
|
+
"\n }\n "
|
9
|
+
]);
|
10
|
+
_templateObject = function() {
|
11
|
+
return data;
|
12
|
+
};
|
13
|
+
return data;
|
14
|
+
}
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
16
|
+
import { css } from '../../utils/css';
|
17
|
+
const colors = "\n /* Background Dark */\n --color-background-100: #0a0a0a;\n --color-background-200: #000000;\n\n /* Syntax Dark */\n --color-syntax-comment: #a0a0a0;\n --color-syntax-constant: #ededed;\n --color-syntax-function: #52a9ff;\n --color-syntax-keyword: #f76e99;\n --color-syntax-link: #0ac5b2;\n --color-syntax-parameter: #f1a10d;\n --color-syntax-punctuation: #ededed;\n --color-syntax-string: #0ac5b2;\n --color-syntax-string-expression: #0ac5b2;\n\n /* Gray Scale Dark */\n --color-gray-100: #1a1a1a;\n --color-gray-200: #1f1f1f;\n --color-gray-300: #292929;\n --color-gray-400: #2e2e2e;\n --color-gray-500: #454545;\n --color-gray-600: #878787;\n --color-gray-700: #8f8f8f;\n --color-gray-800: #7d7d7d;\n --color-gray-900: #a0a0a0;\n --color-gray-1000: #ededed;\n\n /* Gray Alpha Scale Dark */\n --color-gray-alpha-100: rgba(255, 255, 255, 0.066);\n --color-gray-alpha-200: rgba(255, 255, 255, 0.087);\n --color-gray-alpha-300: rgba(255, 255, 255, 0.125);\n --color-gray-alpha-400: rgba(255, 255, 255, 0.145);\n --color-gray-alpha-500: rgba(255, 255, 255, 0.239);\n --color-gray-alpha-600: rgba(255, 255, 255, 0.506);\n --color-gray-alpha-700: rgba(255, 255, 255, 0.54);\n --color-gray-alpha-800: rgba(255, 255, 255, 0.47);\n --color-gray-alpha-900: rgba(255, 255, 255, 0.61);\n --color-gray-alpha-1000: rgba(255, 255, 255, 0.923);\n\n /* Blue Scale Dark */\n --color-blue-100: #0f1b2d;\n --color-blue-200: #10243e;\n --color-blue-300: #0f3058;\n --color-blue-400: #0d3868;\n --color-blue-500: #0a4481;\n --color-blue-600: #0091ff;\n --color-blue-700: #0070f3;\n --color-blue-800: #0060d1;\n --color-blue-900: #52a9ff;\n --color-blue-1000: #eaf6ff;\n\n /* Red Scale Dark */\n --color-red-100: #2a1314;\n --color-red-200: #3d1719;\n --color-red-300: #551a1e;\n --color-red-400: #671e22;\n --color-red-500: #822025;\n --color-red-600: #e5484d;\n --color-red-700: #e5484d;\n --color-red-800: #da3036;\n --color-red-900: #ff6369;\n --color-red-1000: #ffecee;\n\n /* Amber Scale Dark */\n --color-amber-100: #271700;\n --color-amber-200: #341c00;\n --color-amber-300: #4a2900;\n --color-amber-400: #573300;\n --color-amber-500: #693f05;\n --color-amber-600: #e79c13;\n --color-amber-700: #ffb224;\n --color-amber-800: #ff990a;\n --color-amber-900: #f1a10d;\n --color-amber-1000: #fef3dd;\n\n /* Green Scale Dark */\n --color-green-100: #0b2211;\n --color-green-200: #0f2c17;\n --color-green-300: #11351b;\n --color-green-400: #0c461b;\n --color-green-500: #126427;\n --color-green-600: #1a9338;\n --color-green-700: #46a758;\n --color-green-800: #388e4a;\n --color-green-900: #63c174;\n --color-green-1000: #e5fbeb;\n\n /* Turbopack Dark - Temporary */\n --color-turbopack-text-red: #ff6d92;\n --color-turbopack-text-blue: #45b2ff;\n --color-turbopack-border-red: #6e293b;\n --color-turbopack-border-blue: #284f80;\n --color-turbopack-background-red: #250d12;\n --color-turbopack-background-blue: #0a1723;\n";
|
18
|
+
const base = "\n --color-font: white;\n --color-backdrop: rgba(0, 0, 0, 0.8);\n --color-border-shadow: rgba(255, 255, 255, 0.145);\n\n --color-title-color: #fafafa;\n --color-stack-notes: #a9a9a9;\n";
|
19
|
+
export function DarkTheme() {
|
20
|
+
return /*#__PURE__*/ _jsx("style", {
|
21
|
+
children: css(_templateObject(), base, colors, base, colors)
|
22
|
+
});
|
23
|
+
}
|
24
|
+
|
25
|
+
//# sourceMappingURL=dark-theme.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/client/components/react-dev-overlay/ui/styles/dark-theme.tsx"],"sourcesContent":["import { css } from '../../utils/css'\n\nconst colors = `\n /* Background Dark */\n --color-background-100: #0a0a0a;\n --color-background-200: #000000;\n\n /* Syntax Dark */\n --color-syntax-comment: #a0a0a0;\n --color-syntax-constant: #ededed;\n --color-syntax-function: #52a9ff;\n --color-syntax-keyword: #f76e99;\n --color-syntax-link: #0ac5b2;\n --color-syntax-parameter: #f1a10d;\n --color-syntax-punctuation: #ededed;\n --color-syntax-string: #0ac5b2;\n --color-syntax-string-expression: #0ac5b2;\n\n /* Gray Scale Dark */\n --color-gray-100: #1a1a1a;\n --color-gray-200: #1f1f1f;\n --color-gray-300: #292929;\n --color-gray-400: #2e2e2e;\n --color-gray-500: #454545;\n --color-gray-600: #878787;\n --color-gray-700: #8f8f8f;\n --color-gray-800: #7d7d7d;\n --color-gray-900: #a0a0a0;\n --color-gray-1000: #ededed;\n\n /* Gray Alpha Scale Dark */\n --color-gray-alpha-100: rgba(255, 255, 255, 0.066);\n --color-gray-alpha-200: rgba(255, 255, 255, 0.087);\n --color-gray-alpha-300: rgba(255, 255, 255, 0.125);\n --color-gray-alpha-400: rgba(255, 255, 255, 0.145);\n --color-gray-alpha-500: rgba(255, 255, 255, 0.239);\n --color-gray-alpha-600: rgba(255, 255, 255, 0.506);\n --color-gray-alpha-700: rgba(255, 255, 255, 0.54);\n --color-gray-alpha-800: rgba(255, 255, 255, 0.47);\n --color-gray-alpha-900: rgba(255, 255, 255, 0.61);\n --color-gray-alpha-1000: rgba(255, 255, 255, 0.923);\n\n /* Blue Scale Dark */\n --color-blue-100: #0f1b2d;\n --color-blue-200: #10243e;\n --color-blue-300: #0f3058;\n --color-blue-400: #0d3868;\n --color-blue-500: #0a4481;\n --color-blue-600: #0091ff;\n --color-blue-700: #0070f3;\n --color-blue-800: #0060d1;\n --color-blue-900: #52a9ff;\n --color-blue-1000: #eaf6ff;\n\n /* Red Scale Dark */\n --color-red-100: #2a1314;\n --color-red-200: #3d1719;\n --color-red-300: #551a1e;\n --color-red-400: #671e22;\n --color-red-500: #822025;\n --color-red-600: #e5484d;\n --color-red-700: #e5484d;\n --color-red-800: #da3036;\n --color-red-900: #ff6369;\n --color-red-1000: #ffecee;\n\n /* Amber Scale Dark */\n --color-amber-100: #271700;\n --color-amber-200: #341c00;\n --color-amber-300: #4a2900;\n --color-amber-400: #573300;\n --color-amber-500: #693f05;\n --color-amber-600: #e79c13;\n --color-amber-700: #ffb224;\n --color-amber-800: #ff990a;\n --color-amber-900: #f1a10d;\n --color-amber-1000: #fef3dd;\n\n /* Green Scale Dark */\n --color-green-100: #0b2211;\n --color-green-200: #0f2c17;\n --color-green-300: #11351b;\n --color-green-400: #0c461b;\n --color-green-500: #126427;\n --color-green-600: #1a9338;\n --color-green-700: #46a758;\n --color-green-800: #388e4a;\n --color-green-900: #63c174;\n --color-green-1000: #e5fbeb;\n\n /* Turbopack Dark - Temporary */\n --color-turbopack-text-red: #ff6d92;\n --color-turbopack-text-blue: #45b2ff;\n --color-turbopack-border-red: #6e293b;\n --color-turbopack-border-blue: #284f80;\n --color-turbopack-background-red: #250d12;\n --color-turbopack-background-blue: #0a1723;\n`\n\nconst base = `\n --color-font: white;\n --color-backdrop: rgba(0, 0, 0, 0.8);\n --color-border-shadow: rgba(255, 255, 255, 0.145);\n\n --color-title-color: #fafafa;\n --color-stack-notes: #a9a9a9;\n`\n\nexport function DarkTheme() {\n return (\n <style>{css`\n :host(.dark) {\n ${base}\n ${colors}\n\n @media (prefers-color-scheme: dark) {\n :host(:not(.light)) {\n ${base}\n ${colors}\n }\n `}</style>\n )\n}\n"],"names":["css","colors","base","DarkTheme","style"],"mappings":";;;;;;;;;;;;;;;AAAA,SAASA,GAAG,QAAQ,kBAAiB;AAErC,MAAMC,SAAU;AAiGhB,MAAMC,OAAQ;AASd,OAAO,SAASC;IACd,qBACE,KAACC;kBAAOJ,uBAEFE,MACAD,QAIEC,MACAD;;AAIZ"}
|
package/dist/esm/client/index.js
CHANGED
@@ -26,7 +26,7 @@ import { SearchParamsContext, PathParamsContext } from '../shared/lib/hooks-clie
|
|
26
26
|
import { onRecoverableError } from './react-client-callbacks/on-recoverable-error';
|
27
27
|
import tracer from './tracing/tracer';
|
28
28
|
import { isNextRouterError } from './components/is-next-router-error';
|
29
|
-
export const version = "15.2.1-canary.
|
29
|
+
export const version = "15.2.1-canary.1";
|
30
30
|
export let router;
|
31
31
|
export const emitter = mitt();
|
32
32
|
const looseToArray = (input)=>[].slice.call(input);
|