next 15.2.2-canary.4 → 15.2.2-canary.5
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/webpack-config.js +2 -2
- package/dist/client/app-bootstrap.js +1 -1
- package/dist/client/components/react-dev-overlay/ui/components/call-stack-frame/call-stack-frame.d.ts +1 -2
- package/dist/client/components/react-dev-overlay/ui/components/call-stack-frame/call-stack-frame.js +4 -7
- package/dist/client/components/react-dev-overlay/ui/components/call-stack-frame/call-stack-frame.js.map +1 -1
- package/dist/client/components/react-dev-overlay/ui/components/errors/call-stack/call-stack.js +1 -2
- package/dist/client/components/react-dev-overlay/ui/components/errors/call-stack/call-stack.js.map +1 -1
- package/dist/client/index.js +1 -1
- package/dist/compiled/next-server/app-page-experimental.runtime.dev.js +2 -2
- package/dist/compiled/next-server/app-page-experimental.runtime.dev.js.map +1 -1
- package/dist/compiled/next-server/app-page.runtime.dev.js +2 -2
- 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/webpack-config.js +2 -2
- package/dist/esm/client/app-bootstrap.js +1 -1
- package/dist/esm/client/components/react-dev-overlay/ui/components/call-stack-frame/call-stack-frame.js +4 -7
- package/dist/esm/client/components/react-dev-overlay/ui/components/call-stack-frame/call-stack-frame.js.map +1 -1
- package/dist/esm/client/components/react-dev-overlay/ui/components/errors/call-stack/call-stack.js +1 -2
- package/dist/esm/client/components/react-dev-overlay/ui/components/errors/call-stack/call-stack.js.map +1 -1
- package/dist/esm/client/index.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/esm/shared/lib/canary-only.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/shared/lib/canary-only.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/bin/next
CHANGED
@@ -79,7 +79,7 @@ const program = new NextRootCommand();
|
|
79
79
|
program.name('next').description('The Next.js CLI allows you to develop, build, start your application, and more.').configureHelp({
|
80
80
|
formatHelp: (cmd, helper)=>(0, _formatclihelpoutput.formatCliHelpOutput)(cmd, helper),
|
81
81
|
subcommandTerm: (cmd)=>`${cmd.name()} ${cmd.usage()}`
|
82
|
-
}).helpCommand(false).helpOption('-h, --help', 'Displays this message.').version(`Next.js v${"15.2.2-canary.
|
82
|
+
}).helpCommand(false).helpOption('-h, --help', 'Displays this message.').version(`Next.js v${"15.2.2-canary.5"}`, '-v, --version', 'Outputs the Next.js version.');
|
83
83
|
program.command('build').description('Creates an optimized production build of your application. The output displays information about each route.').argument('[directory]', `A directory on which to build the application. ${(0, _picocolors.italic)('If no directory is provided, the current directory will be used.')}`).option('-d, --debug', 'Enables a more verbose build output.').option('--no-lint', 'Disables linting.').option('--no-mangling', 'Disables mangling.').option('--profile', 'Enables production profiling for React.').option('--experimental-app-only', 'Builds only App Router routes.').addOption(new _commander.Option('--experimental-turbo').hideHelp()).addOption(new _commander.Option('--experimental-build-mode [mode]', 'Uses an experimental build mode.').choices([
|
84
84
|
'compile',
|
85
85
|
'generate'
|
package/dist/build/index.js
CHANGED
@@ -364,7 +364,7 @@ async function build(dir, reactProductionProfiling = false, debugOutput = false,
|
|
364
364
|
const nextBuildSpan = (0, _trace.trace)('next-build', undefined, {
|
365
365
|
buildMode: experimentalBuildMode,
|
366
366
|
isTurboBuild: String(turboNextBuild),
|
367
|
-
version: "15.2.2-canary.
|
367
|
+
version: "15.2.2-canary.5"
|
368
368
|
});
|
369
369
|
_buildcontext.NextBuildContext.nextBuildSpan = nextBuildSpan;
|
370
370
|
_buildcontext.NextBuildContext.dir = dir;
|
@@ -723,7 +723,7 @@ async function build(dir, reactProductionProfiling = false, debugOutput = false,
|
|
723
723
|
// Files outside of the distDir can be "type": "module"
|
724
724
|
await writeFileUtf8(_path.default.join(distDir, 'package.json'), '{"type": "commonjs"}');
|
725
725
|
// These are written to distDir, so they need to come after creating and cleaning distDr.
|
726
|
-
await (0, _builddiagnostics.recordFrameworkVersion)("15.2.2-canary.
|
726
|
+
await (0, _builddiagnostics.recordFrameworkVersion)("15.2.2-canary.5");
|
727
727
|
await (0, _builddiagnostics.updateBuildDiagnostics)({
|
728
728
|
buildStage: 'start'
|
729
729
|
});
|
package/dist/build/swc/index.js
CHANGED
@@ -119,7 +119,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
119
119
|
}
|
120
120
|
return newObj;
|
121
121
|
}
|
122
|
-
const nextVersion = "15.2.2-canary.
|
122
|
+
const nextVersion = "15.2.2-canary.5";
|
123
123
|
const ArchName = (0, _os.arch)();
|
124
124
|
const PlatformName = (0, _os.platform)();
|
125
125
|
function infoLog(...args) {
|
@@ -1625,7 +1625,7 @@ async function getBaseWebpackConfig(dir, { buildId, encryptionKey, config, compi
|
|
1625
1625
|
isClient && new _copyfileplugin.CopyFilePlugin({
|
1626
1626
|
// file path to build output of `@next/polyfill-nomodule`
|
1627
1627
|
filePath: require.resolve('./polyfills/polyfill-nomodule'),
|
1628
|
-
cacheKey: "15.2.2-canary.
|
1628
|
+
cacheKey: "15.2.2-canary.5",
|
1629
1629
|
name: `static/chunks/polyfills${dev ? '' : '-[hash]'}.js`,
|
1630
1630
|
minimize: false,
|
1631
1631
|
info: {
|
@@ -1802,7 +1802,7 @@ async function getBaseWebpackConfig(dir, { buildId, encryptionKey, config, compi
|
|
1802
1802
|
// - Next.js location on disk (some loaders use absolute paths and some resolve options depend on absolute paths)
|
1803
1803
|
// - Next.js version
|
1804
1804
|
// - next.config.js keys that affect compilation
|
1805
|
-
version: `${__dirname}|${"15.2.2-canary.
|
1805
|
+
version: `${__dirname}|${"15.2.2-canary.5"}|${configVars}`,
|
1806
1806
|
cacheDirectory: _path.default.join(distDir, 'cache', 'webpack'),
|
1807
1807
|
// For production builds, it's more efficient to compress all cache files together instead of compression each one individually.
|
1808
1808
|
// So we disable compression here and allow the build runner to take care of compressing the cache as a whole.
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import type { OriginalStackFrame } from '../../../utils/stack-frame';
|
2
2
|
export declare const CallStackFrame: React.FC<{
|
3
3
|
frame: OriginalStackFrame;
|
4
|
-
index: number;
|
5
4
|
}>;
|
6
|
-
export declare const CALL_STACK_FRAME_STYLES = "\n [data-nextjs-call-stack-frame-
|
5
|
+
export declare const CALL_STACK_FRAME_STYLES = "\n [data-nextjs-call-stack-frame-no-source] {\n padding: 6px 8px;\n margin-bottom: 4px;\n\n border-radius: var(--rounded-lg);\n }\n\n [data-nextjs-call-stack-frame-no-source]:last-child {\n margin-bottom: 0;\n }\n\n [data-nextjs-call-stack-frame-ignored=\"true\"] {\n opacity: 0.6;\n }\n\n [data-nextjs-call-stack-frame] {\n user-select: text;\n display: block;\n box-sizing: border-box;\n\n user-select: text;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n\n padding: 6px 8px;\n\n border-radius: var(--rounded-lg);\n }\n\n .call-stack-frame-method-name {\n display: flex;\n align-items: center;\n gap: 4px;\n\n margin-bottom: 4px;\n font-family: var(--font-stack-monospace);\n\n color: var(--color-gray-1000);\n font-size: var(--size-14);\n font-weight: 500;\n line-height: var(--size-20);\n\n svg {\n width: var(--size-16px);\n height: var(--size-16px);\n }\n }\n\n .open-in-editor-button, .source-mapping-error-button {\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--rounded-full);\n padding: 4px;\n color: var(--color-font);\n\n svg {\n width: var(--size-16);\n height: var(--size-16);\n }\n\n &:focus-visible {\n outline: var(--focus-ring);\n outline-offset: -2px;\n }\n\n &:hover {\n background: var(--color-gray-100);\n }\n }\n\n .call-stack-frame-file-source {\n color: var(--color-gray-900);\n font-size: var(--size-14);\n line-height: var(--size-20);\n }\n";
|
package/dist/client/components/react-dev-overlay/ui/components/call-stack-frame/call-stack-frame.js
CHANGED
@@ -26,7 +26,7 @@ const _external = require("../../icons/external");
|
|
26
26
|
const _stackframe = require("../../../utils/stack-frame");
|
27
27
|
const _useopenineditor = require("../../utils/use-open-in-editor");
|
28
28
|
const CallStackFrame = function CallStackFrame(param) {
|
29
|
-
let { frame
|
29
|
+
let { frame } = param;
|
30
30
|
var _frame_originalStackFrame;
|
31
31
|
// TODO: ability to expand resolved frames
|
32
32
|
const f = (_frame_originalStackFrame = frame.originalStackFrame) != null ? _frame_originalStackFrame : frame.sourceStackFrame;
|
@@ -47,13 +47,10 @@ const CallStackFrame = function CallStackFrame(param) {
|
|
47
47
|
}
|
48
48
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
49
49
|
"data-nextjs-call-stack-frame": true,
|
50
|
-
"data-nextjs-call-stack-frame-
|
51
|
-
|
52
|
-
'--index': index
|
53
|
-
},
|
50
|
+
"data-nextjs-call-stack-frame-no-source": !hasSource,
|
51
|
+
"data-nextjs-call-stack-frame-ignored": frame.ignored,
|
54
52
|
children: [
|
55
53
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
56
|
-
"data-nextjs-frame-expanded": !frame.ignored,
|
57
54
|
className: "call-stack-frame-method-name",
|
58
55
|
children: [
|
59
56
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_hotlinkedtext.HotlinkedText, {
|
@@ -86,7 +83,7 @@ const CallStackFrame = function CallStackFrame(param) {
|
|
86
83
|
]
|
87
84
|
});
|
88
85
|
};
|
89
|
-
const CALL_STACK_FRAME_STYLES =
|
86
|
+
const CALL_STACK_FRAME_STYLES = '\n [data-nextjs-call-stack-frame-no-source] {\n padding: 6px 8px;\n margin-bottom: 4px;\n\n border-radius: var(--rounded-lg);\n }\n\n [data-nextjs-call-stack-frame-no-source]:last-child {\n margin-bottom: 0;\n }\n\n [data-nextjs-call-stack-frame-ignored="true"] {\n opacity: 0.6;\n }\n\n [data-nextjs-call-stack-frame] {\n user-select: text;\n display: block;\n box-sizing: border-box;\n\n user-select: text;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n\n padding: 6px 8px;\n\n border-radius: var(--rounded-lg);\n }\n\n .call-stack-frame-method-name {\n display: flex;\n align-items: center;\n gap: 4px;\n\n margin-bottom: 4px;\n font-family: var(--font-stack-monospace);\n\n color: var(--color-gray-1000);\n font-size: var(--size-14);\n font-weight: 500;\n line-height: var(--size-20);\n\n svg {\n width: var(--size-16px);\n height: var(--size-16px);\n }\n }\n\n .open-in-editor-button, .source-mapping-error-button {\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--rounded-full);\n padding: 4px;\n color: var(--color-font);\n\n svg {\n width: var(--size-16);\n height: var(--size-16);\n }\n\n &:focus-visible {\n outline: var(--focus-ring);\n outline-offset: -2px;\n }\n\n &:hover {\n background: var(--color-gray-100);\n }\n }\n\n .call-stack-frame-file-source {\n color: var(--color-gray-900);\n font-size: var(--size-14);\n line-height: var(--size-20);\n }\n';
|
90
87
|
|
91
88
|
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
92
89
|
Object.defineProperty(exports.default, '__esModule', { value: true });
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/ui/components/call-stack-frame/call-stack-frame.tsx"],"sourcesContent":["import type { StackFrame } from 'next/dist/compiled/stacktrace-parser'\nimport type { OriginalStackFrame } from '../../../utils/stack-frame'\n\nimport { HotlinkedText } from '../hot-linked-text'\nimport { ExternalIcon, SourceMappingErrorIcon } from '../../icons/external'\nimport { getFrameSource } from '../../../utils/stack-frame'\nimport { useOpenInEditor } from '../../utils/use-open-in-editor'\n\nexport const CallStackFrame: React.FC<{\n frame: OriginalStackFrame\n
|
1
|
+
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/ui/components/call-stack-frame/call-stack-frame.tsx"],"sourcesContent":["import type { StackFrame } from 'next/dist/compiled/stacktrace-parser'\nimport type { OriginalStackFrame } from '../../../utils/stack-frame'\n\nimport { HotlinkedText } from '../hot-linked-text'\nimport { ExternalIcon, SourceMappingErrorIcon } from '../../icons/external'\nimport { getFrameSource } from '../../../utils/stack-frame'\nimport { useOpenInEditor } from '../../utils/use-open-in-editor'\n\nexport const CallStackFrame: React.FC<{\n frame: OriginalStackFrame\n}> = function CallStackFrame({ frame }) {\n // TODO: ability to expand resolved frames\n\n const f: StackFrame = frame.originalStackFrame ?? frame.sourceStackFrame\n const hasSource = Boolean(frame.originalCodeFrame)\n const open = useOpenInEditor(\n hasSource\n ? {\n file: f.file,\n lineNumber: f.lineNumber,\n column: f.column,\n }\n : undefined\n )\n\n // Format method to strip out the webpack layer prefix.\n // e.g. (app-pages-browser)/./app/page.tsx -> ./app/page.tsx\n const formattedMethod = f.methodName.replace(/^\\([\\w-]+\\)\\//, '')\n\n // Formatted file source could be empty. e.g. <anonymous> will be formatted to empty string,\n // we'll skip rendering the frame in this case.\n const fileSource = getFrameSource(f)\n\n if (!fileSource) {\n return null\n }\n\n return (\n <div\n data-nextjs-call-stack-frame\n data-nextjs-call-stack-frame-no-source={!hasSource}\n data-nextjs-call-stack-frame-ignored={frame.ignored}\n >\n <div className=\"call-stack-frame-method-name\">\n <HotlinkedText text={formattedMethod} />\n {hasSource && (\n <button onClick={open} className=\"open-in-editor-button\">\n <ExternalIcon width={16} height={16} />\n </button>\n )}\n {frame.error ? (\n <button\n className=\"source-mapping-error-button\"\n onClick={() => console.error(frame.reason)}\n title=\"Sourcemapping failed. Click to log cause of error.\"\n >\n <SourceMappingErrorIcon width={16} height={16} />\n </button>\n ) : null}\n </div>\n <span\n className=\"call-stack-frame-file-source\"\n data-has-source={hasSource}\n >\n {fileSource}\n </span>\n </div>\n )\n}\n\nexport const CALL_STACK_FRAME_STYLES = `\n [data-nextjs-call-stack-frame-no-source] {\n padding: 6px 8px;\n margin-bottom: 4px;\n\n border-radius: var(--rounded-lg);\n }\n\n [data-nextjs-call-stack-frame-no-source]:last-child {\n margin-bottom: 0;\n }\n\n [data-nextjs-call-stack-frame-ignored=\"true\"] {\n opacity: 0.6;\n }\n\n [data-nextjs-call-stack-frame] {\n user-select: text;\n display: block;\n box-sizing: border-box;\n\n user-select: text;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n\n padding: 6px 8px;\n\n border-radius: var(--rounded-lg);\n }\n\n .call-stack-frame-method-name {\n display: flex;\n align-items: center;\n gap: 4px;\n\n margin-bottom: 4px;\n font-family: var(--font-stack-monospace);\n\n color: var(--color-gray-1000);\n font-size: var(--size-14);\n font-weight: 500;\n line-height: var(--size-20);\n\n svg {\n width: var(--size-16px);\n height: var(--size-16px);\n }\n }\n\n .open-in-editor-button, .source-mapping-error-button {\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--rounded-full);\n padding: 4px;\n color: var(--color-font);\n\n svg {\n width: var(--size-16);\n height: var(--size-16);\n }\n\n &:focus-visible {\n outline: var(--focus-ring);\n outline-offset: -2px;\n }\n\n &:hover {\n background: var(--color-gray-100);\n }\n }\n\n .call-stack-frame-file-source {\n color: var(--color-gray-900);\n font-size: var(--size-14);\n line-height: var(--size-20);\n }\n`\n"],"names":["CALL_STACK_FRAME_STYLES","CallStackFrame","frame","f","originalStackFrame","sourceStackFrame","hasSource","Boolean","originalCodeFrame","open","useOpenInEditor","file","lineNumber","column","undefined","formattedMethod","methodName","replace","fileSource","getFrameSource","div","data-nextjs-call-stack-frame","data-nextjs-call-stack-frame-no-source","data-nextjs-call-stack-frame-ignored","ignored","className","HotlinkedText","text","button","onClick","ExternalIcon","width","height","error","console","reason","title","SourceMappingErrorIcon","span","data-has-source"],"mappings":";;;;;;;;;;;;;;;IAsEaA,uBAAuB;eAAvBA;;IA9DAC,cAAc;eAAdA;;;;+BALiB;0BACuB;4BACtB;iCACC;AAEzB,MAAMA,iBAER,SAASA,eAAe,KAAS;IAAT,IAAA,EAAEC,KAAK,EAAE,GAAT;QAGLA;IAFtB,0CAA0C;IAE1C,MAAMC,IAAgBD,CAAAA,4BAAAA,MAAME,kBAAkB,YAAxBF,4BAA4BA,MAAMG,gBAAgB;IACxE,MAAMC,YAAYC,QAAQL,MAAMM,iBAAiB;IACjD,MAAMC,OAAOC,IAAAA,gCAAe,EAC1BJ,YACI;QACEK,MAAMR,EAAEQ,IAAI;QACZC,YAAYT,EAAES,UAAU;QACxBC,QAAQV,EAAEU,MAAM;IAClB,IACAC;IAGN,uDAAuD;IACvD,4DAA4D;IAC5D,MAAMC,kBAAkBZ,EAAEa,UAAU,CAACC,OAAO,CAAC,iBAAiB;IAE9D,4FAA4F;IAC5F,+CAA+C;IAC/C,MAAMC,aAAaC,IAAAA,0BAAc,EAAChB;IAElC,IAAI,CAACe,YAAY;QACf,OAAO;IACT;IAEA,qBACE,sBAACE;QACCC,8BAA4B;QAC5BC,0CAAwC,CAAChB;QACzCiB,wCAAsCrB,MAAMsB,OAAO;;0BAEnD,sBAACJ;gBAAIK,WAAU;;kCACb,qBAACC,4BAAa;wBAACC,MAAMZ;;oBACpBT,2BACC,qBAACsB;wBAAOC,SAASpB;wBAAMgB,WAAU;kCAC/B,cAAA,qBAACK,sBAAY;4BAACC,OAAO;4BAAIC,QAAQ;;;oBAGpC9B,MAAM+B,KAAK,iBACV,qBAACL;wBACCH,WAAU;wBACVI,SAAS,IAAMK,QAAQD,KAAK,CAAC/B,MAAMiC,MAAM;wBACzCC,OAAM;kCAEN,cAAA,qBAACC,gCAAsB;4BAACN,OAAO;4BAAIC,QAAQ;;yBAE3C;;;0BAEN,qBAACM;gBACCb,WAAU;gBACVc,mBAAiBjC;0BAEhBY;;;;AAIT;AAEO,MAAMlB,0BAA2B"}
|
package/dist/client/components/react-dev-overlay/ui/components/errors/call-stack/call-stack.js
CHANGED
@@ -82,8 +82,7 @@ function CallStack(param) {
|
|
82
82
|
}),
|
83
83
|
frames.map((frame, frameIndex)=>{
|
84
84
|
return !frame.ignored || isIgnoreListOpen ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_callstackframe.CallStackFrame, {
|
85
|
-
frame: frame
|
86
|
-
index: frameIndex
|
85
|
+
frame: frame
|
87
86
|
}, frameIndex) : null;
|
88
87
|
})
|
89
88
|
]
|
package/dist/client/components/react-dev-overlay/ui/components/errors/call-stack/call-stack.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../src/client/components/react-dev-overlay/ui/components/errors/call-stack/call-stack.tsx"],"sourcesContent":["import type { OriginalStackFrame } from '../../../../utils/stack-frame'\nimport { useMemo, useState, useRef } from 'react'\nimport { CallStackFrame } from '../../call-stack-frame/call-stack-frame'\n\ninterface CallStackProps {\n frames: OriginalStackFrame[]\n dialogResizerRef: React.RefObject<HTMLDivElement | null>\n}\n\nexport function CallStack({ frames, dialogResizerRef }: CallStackProps) {\n const initialDialogHeight = useRef<number>(NaN)\n const [isIgnoreListOpen, setIsIgnoreListOpen] = useState(false)\n\n const ignoredFramesTally = useMemo(() => {\n return frames.reduce((tally, frame) => tally + (frame.ignored ? 1 : 0), 0)\n }, [frames])\n\n function onToggleIgnoreList() {\n const dialog = dialogResizerRef?.current as HTMLElement\n\n if (!dialog) {\n return\n }\n\n const { height: currentHeight } = dialog?.getBoundingClientRect()\n\n if (!initialDialogHeight.current) {\n initialDialogHeight.current = currentHeight\n }\n\n if (isIgnoreListOpen) {\n function onTransitionEnd() {\n dialog.removeEventListener('transitionend', onTransitionEnd)\n setIsIgnoreListOpen(false)\n }\n dialog.style.height = `${initialDialogHeight.current}px`\n dialog.addEventListener('transitionend', onTransitionEnd)\n } else {\n setIsIgnoreListOpen(true)\n }\n }\n\n return (\n <div className=\"error-overlay-call-stack-container\">\n <div className=\"error-overlay-call-stack-header\">\n <p className=\"error-overlay-call-stack-title\">\n Call Stack{' '}\n <span className=\"error-overlay-call-stack-count\">\n {frames.length}\n </span>\n </p>\n {ignoredFramesTally > 0 && (\n <button\n data-expand-ignore-button={isIgnoreListOpen}\n className=\"error-overlay-call-stack-ignored-list-toggle-button\"\n onClick={onToggleIgnoreList}\n >\n {`${isIgnoreListOpen ? 'Hide' : 'Show'} ${ignoredFramesTally} ignore-listed frame(s)`}\n <ChevronUpDown />\n </button>\n )}\n </div>\n {frames.map((frame, frameIndex) => {\n return !frame.ignored || isIgnoreListOpen ? (\n <CallStackFrame key={frameIndex} frame={frame}
|
1
|
+
{"version":3,"sources":["../../../../../../../../src/client/components/react-dev-overlay/ui/components/errors/call-stack/call-stack.tsx"],"sourcesContent":["import type { OriginalStackFrame } from '../../../../utils/stack-frame'\nimport { useMemo, useState, useRef } from 'react'\nimport { CallStackFrame } from '../../call-stack-frame/call-stack-frame'\n\ninterface CallStackProps {\n frames: OriginalStackFrame[]\n dialogResizerRef: React.RefObject<HTMLDivElement | null>\n}\n\nexport function CallStack({ frames, dialogResizerRef }: CallStackProps) {\n const initialDialogHeight = useRef<number>(NaN)\n const [isIgnoreListOpen, setIsIgnoreListOpen] = useState(false)\n\n const ignoredFramesTally = useMemo(() => {\n return frames.reduce((tally, frame) => tally + (frame.ignored ? 1 : 0), 0)\n }, [frames])\n\n function onToggleIgnoreList() {\n const dialog = dialogResizerRef?.current as HTMLElement\n\n if (!dialog) {\n return\n }\n\n const { height: currentHeight } = dialog?.getBoundingClientRect()\n\n if (!initialDialogHeight.current) {\n initialDialogHeight.current = currentHeight\n }\n\n if (isIgnoreListOpen) {\n function onTransitionEnd() {\n dialog.removeEventListener('transitionend', onTransitionEnd)\n setIsIgnoreListOpen(false)\n }\n dialog.style.height = `${initialDialogHeight.current}px`\n dialog.addEventListener('transitionend', onTransitionEnd)\n } else {\n setIsIgnoreListOpen(true)\n }\n }\n\n return (\n <div className=\"error-overlay-call-stack-container\">\n <div className=\"error-overlay-call-stack-header\">\n <p className=\"error-overlay-call-stack-title\">\n Call Stack{' '}\n <span className=\"error-overlay-call-stack-count\">\n {frames.length}\n </span>\n </p>\n {ignoredFramesTally > 0 && (\n <button\n data-expand-ignore-button={isIgnoreListOpen}\n className=\"error-overlay-call-stack-ignored-list-toggle-button\"\n onClick={onToggleIgnoreList}\n >\n {`${isIgnoreListOpen ? 'Hide' : 'Show'} ${ignoredFramesTally} ignore-listed frame(s)`}\n <ChevronUpDown />\n </button>\n )}\n </div>\n {frames.map((frame, frameIndex) => {\n return !frame.ignored || isIgnoreListOpen ? (\n <CallStackFrame key={frameIndex} frame={frame} />\n ) : null\n })}\n </div>\n )\n}\n\nfunction ChevronUpDown() {\n return (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M8.70722 2.39641C8.3167 2.00588 7.68353 2.00588 7.29301 2.39641L4.46978 5.21963L3.93945 5.74996L5.00011 6.81062L5.53044 6.28029L8.00011 3.81062L10.4698 6.28029L11.0001 6.81062L12.0608 5.74996L11.5304 5.21963L8.70722 2.39641ZM5.53044 9.71963L5.00011 9.1893L3.93945 10.25L4.46978 10.7803L7.29301 13.6035C7.68353 13.994 8.3167 13.994 8.70722 13.6035L11.5304 10.7803L12.0608 10.25L11.0001 9.1893L10.4698 9.71963L8.00011 12.1893L5.53044 9.71963Z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n\nexport const CALL_STACK_STYLES = `\n .error-overlay-call-stack-container {\n position: relative;\n margin-top: 8px;\n }\n\n .error-overlay-call-stack-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n min-height: var(--size-28);\n padding: 8px 8px 12px 4px;\n width: 100%;\n }\n\n .error-overlay-call-stack-title {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 8px;\n\n margin: 0;\n\n color: var(--color-gray-1000);\n font-size: var(--size-16);\n font-weight: 500;\n }\n\n .error-overlay-call-stack-count {\n display: flex;\n justify-content: center;\n align-items: center;\n\n width: var(--size-20);\n height: var(--size-20);\n gap: 4px;\n\n color: var(--color-gray-1000);\n text-align: center;\n font-size: var(--size-11);\n font-weight: 500;\n line-height: var(--size-16);\n\n border-radius: var(--rounded-full);\n background: var(--color-gray-300);\n }\n\n .error-overlay-call-stack-ignored-list-toggle-button {\n all: unset;\n display: flex;\n align-items: center;\n gap: 6px;\n color: var(--color-gray-900);\n font-size: var(--size-14);\n line-height: var(--size-20);\n border-radius: 6px;\n padding: 4px 6px;\n margin-right: -6px;\n transition: background 150ms ease;\n\n &:hover {\n background: var(--color-gray-100);\n }\n\n &:focus {\n outline: var(--focus-ring);\n }\n\n svg {\n width: var(--size-16);\n height: var(--size-16);\n }\n }\n`\n"],"names":["CALL_STACK_STYLES","CallStack","frames","dialogResizerRef","initialDialogHeight","useRef","NaN","isIgnoreListOpen","setIsIgnoreListOpen","useState","ignoredFramesTally","useMemo","reduce","tally","frame","ignored","onToggleIgnoreList","dialog","current","height","currentHeight","getBoundingClientRect","onTransitionEnd","removeEventListener","style","addEventListener","div","className","p","span","length","button","data-expand-ignore-button","onClick","ChevronUpDown","map","frameIndex","CallStackFrame","svg","width","viewBox","fill","xmlns","path","fillRule","clipRule","d"],"mappings":";;;;;;;;;;;;;;;IA0FaA,iBAAiB;eAAjBA;;IAjFGC,SAAS;eAATA;;;;uBAR0B;gCACX;AAOxB,SAASA,UAAU,KAA4C;IAA5C,IAAA,EAAEC,MAAM,EAAEC,gBAAgB,EAAkB,GAA5C;IACxB,MAAMC,sBAAsBC,IAAAA,aAAM,EAASC;IAC3C,MAAM,CAACC,kBAAkBC,oBAAoB,GAAGC,IAAAA,eAAQ,EAAC;IAEzD,MAAMC,qBAAqBC,IAAAA,cAAO,EAAC;QACjC,OAAOT,OAAOU,MAAM,CAAC,CAACC,OAAOC,QAAUD,QAASC,CAAAA,MAAMC,OAAO,GAAG,IAAI,CAAA,GAAI;IAC1E,GAAG;QAACb;KAAO;IAEX,SAASc;QACP,MAAMC,SAASd,oCAAAA,iBAAkBe,OAAO;QAExC,IAAI,CAACD,QAAQ;YACX;QACF;QAEA,MAAM,EAAEE,QAAQC,aAAa,EAAE,GAAGH,0BAAAA,OAAQI,qBAAqB;QAE/D,IAAI,CAACjB,oBAAoBc,OAAO,EAAE;YAChCd,oBAAoBc,OAAO,GAAGE;QAChC;QAEA,IAAIb,kBAAkB;YACpB,SAASe;gBACPL,OAAOM,mBAAmB,CAAC,iBAAiBD;gBAC5Cd,oBAAoB;YACtB;YACAS,OAAOO,KAAK,CAACL,MAAM,GAAG,AAAC,KAAEf,oBAAoBc,OAAO,GAAC;YACrDD,OAAOQ,gBAAgB,CAAC,iBAAiBH;QAC3C,OAAO;YACLd,oBAAoB;QACtB;IACF;IAEA,qBACE,sBAACkB;QAAIC,WAAU;;0BACb,sBAACD;gBAAIC,WAAU;;kCACb,sBAACC;wBAAED,WAAU;;4BAAiC;4BACjC;0CACX,qBAACE;gCAAKF,WAAU;0CACbzB,OAAO4B,MAAM;;;;oBAGjBpB,qBAAqB,mBACpB,sBAACqB;wBACCC,6BAA2BzB;wBAC3BoB,WAAU;wBACVM,SAASjB;;4BAELT,CAAAA,mBAAmB,SAAS,MAAK,IAAE,MAAGG,qBAAmB;0CAC7D,qBAACwB;;;;;YAINhC,OAAOiC,GAAG,CAAC,CAACrB,OAAOsB;gBAClB,OAAO,CAACtB,MAAMC,OAAO,IAAIR,iCACvB,qBAAC8B,8BAAc;oBAAkBvB,OAAOA;mBAAnBsB,cACnB;YACN;;;AAGN;AAEA,SAASF;IACP,qBACE,qBAACI;QACCC,OAAM;QACNpB,QAAO;QACPqB,SAAQ;QACRC,MAAK;QACLC,OAAM;kBAEN,cAAA,qBAACC;YACCC,UAAS;YACTC,UAAS;YACTC,GAAE;YACFL,MAAK;;;AAIb;AAEO,MAAMzC,oBAAqB"}
|
package/dist/client/index.js
CHANGED
@@ -61,7 +61,7 @@ const _hooksclientcontextsharedruntime = require("../shared/lib/hooks-client-con
|
|
61
61
|
const _onrecoverableerror = require("./react-client-callbacks/on-recoverable-error");
|
62
62
|
const _tracer = /*#__PURE__*/ _interop_require_default._(require("./tracing/tracer"));
|
63
63
|
const _isnextroutererror = require("./components/is-next-router-error");
|
64
|
-
const version = "15.2.2-canary.
|
64
|
+
const version = "15.2.2-canary.5";
|
65
65
|
let router;
|
66
66
|
const emitter = (0, _mitt.default)();
|
67
67
|
const looseToArray = (input)=>[].slice.call(input);
|