Initial boiler plate project

This commit is contained in:
2024-09-24 03:52:46 +00:00
parent 6120b2d6c3
commit 154b93e267
10034 changed files with 2079352 additions and 2 deletions

View File

@ -0,0 +1,8 @@
import * as React from 'react';
import type { VersionInfo } from '../../../../../server/dev/parse-version-info';
export type BuildErrorProps = {
message: string;
versionInfo?: VersionInfo;
};
export declare const BuildError: React.FC<BuildErrorProps>;
export declare const styles: string;

View File

@ -0,0 +1,99 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
BuildError: null,
styles: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
BuildError: function() {
return BuildError;
},
styles: function() {
return styles;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _tagged_template_literal_loose = require("@swc/helpers/_/_tagged_template_literal_loose");
const _jsxruntime = require("react/jsx-runtime");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _Dialog = require("../components/Dialog");
const _Overlay = require("../components/Overlay");
const _Terminal = require("../components/Terminal");
const _VersionStalenessInfo = require("../components/VersionStalenessInfo");
const _nooptemplate = require("../helpers/noop-template");
function _templateObject() {
const data = _tagged_template_literal_loose._([
"\n .nextjs-container-errors-header > h1 {\n font-size: var(--size-font-big);\n line-height: var(--size-font-bigger);\n font-weight: bold;\n margin: var(--size-gap-double) 0;\n }\n .nextjs-container-errors-header p {\n font-size: var(--size-font-small);\n line-height: var(--size-font-big);\n white-space: pre-wrap;\n }\n .nextjs-container-errors-body footer {\n margin-top: var(--size-gap);\n }\n .nextjs-container-errors-body footer p {\n margin: 0;\n }\n\n .nextjs-container-errors-body small {\n color: var(--color-font);\n }\n"
]);
_templateObject = function() {
return data;
};
return data;
}
const BuildError = function BuildError(param) {
let { message, versionInfo } = param;
const noop = _react.useCallback(()=>{}, []);
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_Overlay.Overlay, {
fixed: true,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Dialog.Dialog, {
type: "error",
"aria-labelledby": "nextjs__container_error_label",
"aria-describedby": "nextjs__container_error_desc",
onClose: noop,
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Dialog.DialogContent, {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_Dialog.DialogHeader, {
className: "nextjs-container-errors-header",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("h1", {
id: "nextjs__container_errors_label",
children: "Build Error"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("p", {
id: "nextjs__container_errors_desc",
className: "nextjs__container_errors_desc",
children: "Failed to compile"
}),
versionInfo ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_VersionStalenessInfo.VersionStalenessInfo, {
...versionInfo
}) : null
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_Dialog.DialogBody, {
className: "nextjs-container-errors-body",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Terminal.Terminal, {
content: message
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("footer", {
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("p", {
id: "nextjs__container_build_error_desc",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("small", {
children: "This error occurred during the build process and can only be dismissed by fixing the error."
})
})
})
]
})
]
})
})
});
};
const styles = (0, _nooptemplate.noop)(_templateObject());
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', { value: true });
Object.assign(exports.default, exports);
module.exports = exports.default;
}
//# sourceMappingURL=BuildError.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../../../../src/client/components/react-dev-overlay/internal/container/BuildError.tsx"],"names":["BuildError","styles","message","versionInfo","noop","React","useCallback","Overlay","fixed","Dialog","type","aria-labelledby","aria-describedby","onClose","DialogContent","DialogHeader","className","h1","id","p","VersionStalenessInfo","DialogBody","Terminal","content","footer","small","css"],"mappings":";;;;;;;;;;;;;;;IAeaA,UAAU;eAAVA;;IAyCAC,MAAM;eAANA;;;;;;iEAxDU;wBAOhB;yBACiB;0BACC;sCACY;8BACT;;;;;;;;;;AAIrB,MAAMD,aAAwC,SAASA,WAAW,KAGxE;IAHwE,IAAA,EACvEE,OAAO,EACPC,WAAW,EACZ,GAHwE;IAIvE,MAAMC,OAAOC,OAAMC,WAAW,CAAC,KAAO,GAAG,EAAE;IAC3C,qBACE,qBAACC,gBAAO;QAACC,KAAK;kBACZ,cAAA,qBAACC,cAAM;YACLC,MAAK;YACLC,mBAAgB;YAChBC,oBAAiB;YACjBC,SAAST;sBAET,cAAA,sBAACU,qBAAa;;kCACZ,sBAACC,oBAAY;wBAACC,WAAU;;0CACtB,qBAACC;gCAAGC,IAAG;0CAAkC;;0CACzC,qBAACC;gCACCD,IAAG;gCACHF,WAAU;0CACX;;4BAGAb,4BAAc,qBAACiB,0CAAoB;gCAAE,GAAGjB,WAAW;iCAAO;;;kCAE7D,sBAACkB,kBAAU;wBAACL,WAAU;;0CACpB,qBAACM,kBAAQ;gCAACC,SAASrB;;0CACnB,qBAACsB;0CACC,cAAA,qBAACL;oCAAED,IAAG;8CACJ,cAAA,qBAACO;kDAAM;;;;;;;;;;AAWvB;AAEO,MAAMxB,aAASyB,kBAAG"}

View File

@ -0,0 +1,16 @@
import { type UnhandledErrorAction, type UnhandledRejectionAction } from '../../shared';
import type { VersionInfo } from '../../../../../server/dev/parse-version-info';
export type SupportedErrorEvent = {
id: number;
event: UnhandledErrorAction | UnhandledRejectionAction;
};
export type ErrorsProps = {
isAppDir: boolean;
errors: SupportedErrorEvent[];
initialDisplayState: DisplayState;
versionInfo?: VersionInfo;
};
type DisplayState = 'minimized' | 'fullscreen' | 'hidden';
export declare function Errors({ isAppDir, errors, initialDisplayState, versionInfo, }: ErrorsProps): import("react/jsx-runtime").JSX.Element | null;
export declare const styles: string;
export {};

View File

@ -0,0 +1,339 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
Errors: null,
styles: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
Errors: function() {
return Errors;
},
styles: function() {
return styles;
}
});
const _tagged_template_literal_loose = require("@swc/helpers/_/_tagged_template_literal_loose");
const _jsxruntime = require("react/jsx-runtime");
const _react = require("react");
const _shared = require("../../shared");
const _Dialog = require("../components/Dialog");
const _LeftRightDialogHeader = require("../components/LeftRightDialogHeader");
const _Overlay = require("../components/Overlay");
const _Toast = require("../components/Toast");
const _getErrorByType = require("../helpers/getErrorByType");
const _nooptemplate = require("../helpers/noop-template");
const _CloseIcon = require("../icons/CloseIcon");
const _RuntimeError = require("./RuntimeError");
const _VersionStalenessInfo = require("../components/VersionStalenessInfo");
const _errorsource = require("../../../../../shared/lib/error-source");
const _hotlinkedtext = require("../components/hot-linked-text");
const _componentstackpseudohtml = require("./RuntimeError/component-stack-pseudo-html");
const _hydrationerrorinfo = require("../helpers/hydration-error-info");
function _templateObject() {
const data = _tagged_template_literal_loose._([
"\n .nextjs-container-errors-header > h1 {\n font-size: var(--size-font-big);\n line-height: var(--size-font-bigger);\n font-weight: bold;\n margin: calc(var(--size-gap-double) * 1.5) 0;\n color: var(--color-title-h1);\n }\n .nextjs-container-errors-header small {\n font-size: var(--size-font-small);\n color: var(--color-accents-1);\n margin-left: var(--size-gap-double);\n }\n .nextjs-container-errors-header small > span {\n font-family: var(--font-stack-monospace);\n }\n .nextjs-container-errors-header p {\n font-size: var(--size-font-small);\n line-height: var(--size-font-big);\n white-space: pre-wrap;\n }\n .nextjs__container_errors_desc {\n font-family: var(--font-stack-monospace);\n padding: var(--size-gap) var(--size-gap-double);\n border-left: 2px solid var(--color-text-color-red-1);\n margin-top: var(--size-gap);\n font-weight: bold;\n color: var(--color-text-color-red-1);\n background-color: var(--color-text-background-red-1);\n }\n p.nextjs__container_errors__notes {\n margin: var(--size-gap-double) auto;\n color: var(--color-stack-notes);\n font-weight: 600;\n font-size: 15px;\n }\n .nextjs-container-errors-header > div > small {\n margin: 0;\n margin-top: var(--size-gap-half);\n }\n .nextjs-container-errors-header > p > a {\n color: inherit;\n font-weight: bold;\n }\n .nextjs-container-errors-body > h2:not(:first-child) {\n margin-top: calc(var(--size-gap-double) + var(--size-gap));\n }\n .nextjs-container-errors-body > h2 {\n color: var(--color-title-color);\n margin-bottom: var(--size-gap);\n font-size: var(--size-font-big);\n }\n .nextjs__container_errors__component-stack {\n padding: 12px 32px;\n color: var(--color-ansi-fg);\n background: var(--color-ansi-bg);\n }\n .nextjs-toast-errors-parent {\n cursor: pointer;\n transition: transform 0.2s ease;\n }\n .nextjs-toast-errors-parent:hover {\n transform: scale(1.1);\n }\n .nextjs-toast-errors {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n }\n .nextjs-toast-errors > svg {\n margin-right: var(--size-gap);\n }\n .nextjs-toast-errors-hide-button {\n margin-left: var(--size-gap-triple);\n border: none;\n background: none;\n color: var(--color-ansi-bright-white);\n padding: 0;\n transition: opacity 0.25s ease;\n opacity: 0.7;\n }\n .nextjs-toast-errors-hide-button:hover {\n opacity: 1;\n }\n"
]);
_templateObject = function() {
return data;
};
return data;
}
function isNextjsLink(text) {
return text.startsWith("https://nextjs.org");
}
function getErrorSignature(ev) {
const { event } = ev;
switch(event.type){
case _shared.ACTION_UNHANDLED_ERROR:
case _shared.ACTION_UNHANDLED_REJECTION:
{
return event.reason.name + "::" + event.reason.message + "::" + event.reason.stack;
}
default:
{}
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const _ = event;
return "";
}
function Errors(param) {
let { isAppDir, errors, initialDisplayState, versionInfo } = param;
var _activeError_componentStackFrames;
const [lookups, setLookups] = (0, _react.useState)({});
const [readyErrors, nextError] = (0, _react.useMemo)(()=>{
let ready = [];
let next = null;
// Ensure errors are displayed in the order they occurred in:
for(let idx = 0; idx < errors.length; ++idx){
const e = errors[idx];
const { id } = e;
if (id in lookups) {
ready.push(lookups[id]);
continue;
}
// Check for duplicate errors
if (idx > 0) {
const prev = errors[idx - 1];
if (getErrorSignature(prev) === getErrorSignature(e)) {
continue;
}
}
next = e;
break;
}
return [
ready,
next
];
}, [
errors,
lookups
]);
const isLoading = (0, _react.useMemo)(()=>{
return readyErrors.length < 1 && Boolean(errors.length);
}, [
errors.length,
readyErrors.length
]);
(0, _react.useEffect)(()=>{
if (nextError == null) {
return;
}
let mounted = true;
(0, _getErrorByType.getErrorByType)(nextError, isAppDir).then((resolved)=>{
// We don't care if the desired error changed while we were resolving,
// thus we're not tracking it using a ref. Once the work has been done,
// we'll store it.
if (mounted) {
setLookups((m)=>({
...m,
[resolved.id]: resolved
}));
}
}, ()=>{
// TODO: handle this, though an edge case
});
return ()=>{
mounted = false;
};
}, [
nextError,
isAppDir
]);
const [displayState, setDisplayState] = (0, _react.useState)(initialDisplayState);
const [activeIdx, setActiveIndex] = (0, _react.useState)(0);
const previous = (0, _react.useCallback)(()=>setActiveIndex((v)=>Math.max(0, v - 1)), []);
const next = (0, _react.useCallback)(()=>setActiveIndex((v)=>Math.max(0, Math.min(readyErrors.length - 1, v + 1))), [
readyErrors.length
]);
const activeError = (0, _react.useMemo)(()=>{
var _readyErrors_activeIdx;
return (_readyErrors_activeIdx = readyErrors[activeIdx]) != null ? _readyErrors_activeIdx : null;
}, [
activeIdx,
readyErrors
]);
// Reset component state when there are no errors to be displayed.
// This should never happen, but lets handle it.
(0, _react.useEffect)(()=>{
if (errors.length < 1) {
setLookups({});
setDisplayState("hidden");
setActiveIndex(0);
}
}, [
errors.length
]);
const minimize = (0, _react.useCallback)(()=>setDisplayState("minimized"), []);
const hide = (0, _react.useCallback)(()=>setDisplayState("hidden"), []);
const fullscreen = (0, _react.useCallback)(()=>setDisplayState("fullscreen"), []);
// This component shouldn't be rendered with no errors, but if it is, let's
// handle it gracefully by rendering nothing.
if (errors.length < 1 || activeError == null) {
return null;
}
if (isLoading) {
// TODO: better loading state
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_Overlay.Overlay, {});
}
if (displayState === "hidden") {
return null;
}
if (displayState === "minimized") {
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_Toast.Toast, {
className: "nextjs-toast-errors-parent",
onClick: fullscreen,
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
className: "nextjs-toast-errors",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("svg", {
xmlns: "http://www.w3.org/2000/svg",
width: "24",
height: "24",
viewBox: "0 0 24 24",
fill: "none",
stroke: "currentColor",
strokeWidth: "2",
strokeLinecap: "round",
strokeLinejoin: "round",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("circle", {
cx: "12",
cy: "12",
r: "10"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("line", {
x1: "12",
y1: "8",
x2: "12",
y2: "12"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("line", {
x1: "12",
y1: "16",
x2: "12.01",
y2: "16"
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("span", {
children: [
readyErrors.length,
" error",
readyErrors.length > 1 ? "s" : ""
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
"data-nextjs-toast-errors-hide-button": true,
className: "nextjs-toast-errors-hide-button",
type: "button",
onClick: (e)=>{
e.stopPropagation();
hide();
},
"aria-label": "Hide Errors",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_CloseIcon.CloseIcon, {})
})
]
})
});
}
const error = activeError.error;
const isServerError = [
"server",
"edge-server"
].includes((0, _errorsource.getErrorSource)(error) || "");
const errorDetails = error.details || {};
const [warningTemplate, serverContent, clientContent] = errorDetails.warning || [
null,
"",
""
];
const hydrationErrorType = (0, _hydrationerrorinfo.getHydrationWarningType)(warningTemplate);
const hydrationWarning = warningTemplate ? warningTemplate.replace("%s", serverContent).replace("%s", clientContent).replace("%s", "") // remove the %s for stack
.replace(/%s$/, "") // If there's still a %s at the end, remove it
.replace(/^Warning: /, "") : null;
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_Overlay.Overlay, {
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Dialog.Dialog, {
type: "error",
"aria-labelledby": "nextjs__container_errors_label",
"aria-describedby": "nextjs__container_errors_desc",
onClose: isServerError ? undefined : minimize,
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Dialog.DialogContent, {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_Dialog.DialogHeader, {
className: "nextjs-container-errors-header",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_LeftRightDialogHeader.LeftRightDialogHeader, {
previous: activeIdx > 0 ? previous : null,
next: activeIdx < readyErrors.length - 1 ? next : null,
close: isServerError ? undefined : minimize,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("small", {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
children: activeIdx + 1
}),
" of",
" ",
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
"data-nextjs-dialog-header-total-count": true,
children: readyErrors.length
}),
" error",
readyErrors.length < 2 ? "" : "s"
]
}),
versionInfo ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_VersionStalenessInfo.VersionStalenessInfo, {
...versionInfo
}) : null
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("h1", {
id: "nextjs__container_errors_label",
children: isServerError ? "Server Error" : "Unhandled Runtime Error"
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("p", {
id: "nextjs__container_errors_desc",
className: "nextjs__container_errors_desc",
children: [
error.name,
":",
" ",
/*#__PURE__*/ (0, _jsxruntime.jsx)(_hotlinkedtext.HotlinkedText, {
text: error.message,
matcher: isNextjsLink
})
]
}),
hydrationWarning && /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("p", {
id: "nextjs__container_errors__notes",
className: "nextjs__container_errors__notes",
children: hydrationWarning
}),
((_activeError_componentStackFrames = activeError.componentStackFrames) == null ? void 0 : _activeError_componentStackFrames.length) ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_componentstackpseudohtml.PseudoHtmlDiff, {
className: "nextjs__container_errors__component-stack",
hydrationMismatchType: hydrationErrorType,
componentStackFrames: activeError.componentStackFrames,
firstContent: serverContent,
secondContent: clientContent
}) : null
]
}),
isServerError ? /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("small", {
children: "This error happened while generating the page. Any console logs will be displayed in the terminal window."
})
}) : undefined
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Dialog.DialogBody, {
className: "nextjs-container-errors-body",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_RuntimeError.RuntimeError, {
error: activeError
}, activeError.id.toString())
})
]
})
})
});
}
const styles = (0, _nooptemplate.noop)(_templateObject());
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', { value: true });
Object.assign(exports.default, exports);
module.exports = exports.default;
}
//# sourceMappingURL=Errors.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,5 @@
/// <reference types="react" />
import { type OriginalStackFrame } from '../../helpers/stack-frame';
export declare const CallStackFrame: React.FC<{
frame: OriginalStackFrame;
}>;

View File

@ -0,0 +1,81 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "CallStackFrame", {
enumerable: true,
get: function() {
return CallStackFrame;
}
});
const _jsxruntime = require("react/jsx-runtime");
const _stackframe = require("../../helpers/stack-frame");
const _useopenineditor = require("../../helpers/use-open-in-editor");
const _hotlinkedtext = require("../../components/hot-linked-text");
const CallStackFrame = function CallStackFrame(param) {
let { frame } = param;
var _frame_originalStackFrame;
// TODO: ability to expand resolved frames
// TODO: render error or external indicator
const f = (_frame_originalStackFrame = frame.originalStackFrame) != null ? _frame_originalStackFrame : frame.sourceStackFrame;
const hasSource = Boolean(frame.originalCodeFrame);
const open = (0, _useopenineditor.useOpenInEditor)(hasSource ? {
file: f.file,
lineNumber: f.lineNumber,
column: f.column
} : undefined);
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
"data-nextjs-call-stack-frame": true,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("h3", {
"data-nextjs-frame-expanded": Boolean(frame.expanded),
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_hotlinkedtext.HotlinkedText, {
text: f.methodName
})
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
"data-has-source": hasSource ? "true" : undefined,
tabIndex: hasSource ? 10 : undefined,
role: hasSource ? "link" : undefined,
onClick: open,
title: hasSource ? "Click to open in your editor" : undefined,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
children: (0, _stackframe.getFrameSource)(f)
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
fill: "none",
stroke: "currentColor",
strokeWidth: "2",
strokeLinecap: "round",
strokeLinejoin: "round",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("polyline", {
points: "15 3 21 3 21 9"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("line", {
x1: "10",
y1: "14",
x2: "21",
y2: "3"
})
]
})
]
})
]
});
};
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', { value: true });
Object.assign(exports.default, exports);
module.exports = exports.default;
}
//# sourceMappingURL=CallStackFrame.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/container/RuntimeError/CallStackFrame.tsx"],"names":["CallStackFrame","frame","f","originalStackFrame","sourceStackFrame","hasSource","Boolean","originalCodeFrame","open","useOpenInEditor","file","lineNumber","column","undefined","div","data-nextjs-call-stack-frame","h3","data-nextjs-frame-expanded","expanded","HotlinkedText","text","methodName","data-has-source","tabIndex","role","onClick","title","span","getFrameSource","svg","xmlns","viewBox","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin","path","d","polyline","points","line","x1","y1","x2","y2"],"mappings":";;;;+BAQaA;;;eAAAA;;;;4BAJN;iCACyB;+BACF;AAEvB,MAAMA,iBAER,SAASA,eAAe,KAAS;IAAT,IAAA,EAAEC,KAAK,EAAE,GAAT;QAILA;IAHtB,0CAA0C;IAC1C,2CAA2C;IAE3C,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,qBACE,sBAACC;QAAIC,8BAA4B;;0BAC/B,qBAACC;gBAAGC,8BAA4BX,QAAQL,MAAMiB,QAAQ;0BACpD,cAAA,qBAACC,4BAAa;oBAACC,MAAMlB,EAAEmB,UAAU;;;0BAEnC,sBAACP;gBACCQ,mBAAiBjB,YAAY,SAASQ;gBACtCU,UAAUlB,YAAY,KAAKQ;gBAC3BW,MAAMnB,YAAY,SAASQ;gBAC3BY,SAASjB;gBACTkB,OAAOrB,YAAY,iCAAiCQ;;kCAEpD,qBAACc;kCAAMC,IAAAA,0BAAc,EAAC1B;;kCACtB,sBAAC2B;wBACCC,OAAM;wBACNC,SAAQ;wBACRC,MAAK;wBACLC,QAAO;wBACPC,aAAY;wBACZC,eAAc;wBACdC,gBAAe;;0CAEf,qBAACC;gCAAKC,GAAE;;0CACR,qBAACC;gCAASC,QAAO;;0CACjB,qBAACC;gCAAKC,IAAG;gCAAKC,IAAG;gCAAKC,IAAG;gCAAKC,IAAG;;;;;;;;AAK3C"}

View File

@ -0,0 +1,4 @@
import type { ComponentStackFrame } from '../../helpers/parse-component-stack';
export declare function ComponentStackFrameRow({ componentStackFrame, }: {
componentStackFrame: ComponentStackFrame;
}): import("react/jsx-runtime").JSX.Element;

View File

@ -0,0 +1,116 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "ComponentStackFrameRow", {
enumerable: true,
get: function() {
return ComponentStackFrameRow;
}
});
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
const _jsxruntime = require("react/jsx-runtime");
const _react = /*#__PURE__*/ _interop_require_default._(require("react"));
const _useopenineditor = require("../../helpers/use-open-in-editor");
const _hotlinkedtext = require("../../components/hot-linked-text");
function EditorLink(param) {
let { children, componentStackFrame: { file, column, lineNumber } } = param;
const open = (0, _useopenineditor.useOpenInEditor)({
file,
column,
lineNumber
});
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
tabIndex: 10,
role: "link",
onClick: open,
title: "Click to open in your editor",
children: [
children,
/*#__PURE__*/ (0, _jsxruntime.jsxs)("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
fill: "none",
stroke: "currentColor",
strokeWidth: "2",
strokeLinecap: "round",
strokeLinejoin: "round",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("polyline", {
points: "15 3 21 3 21 9"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("line", {
x1: "10",
y1: "14",
x2: "21",
y2: "3"
})
]
})
]
});
}
function formatLineNumber(lineNumber, column) {
if (!column) {
return lineNumber;
}
return lineNumber + ":" + column;
}
function LocationLine(param) {
let { componentStackFrame } = param;
const { file, lineNumber, column } = componentStackFrame;
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
children: [
file,
" ",
lineNumber ? "(" + formatLineNumber(lineNumber, column) + ")" : ""
]
});
}
function SourceLocation(param) {
let { componentStackFrame } = param;
const { file, canOpenInEditor } = componentStackFrame;
if (file && canOpenInEditor) {
return /*#__PURE__*/ (0, _jsxruntime.jsx)(EditorLink, {
componentStackFrame: componentStackFrame,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(LocationLine, {
componentStackFrame: componentStackFrame
})
})
});
}
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(LocationLine, {
componentStackFrame: componentStackFrame
})
});
}
function ComponentStackFrameRow(param) {
let { componentStackFrame } = param;
const { component } = componentStackFrame;
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
"data-nextjs-component-stack-frame": true,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("h3", {
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_hotlinkedtext.HotlinkedText, {
text: component
})
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(SourceLocation, {
componentStackFrame: componentStackFrame
})
]
});
}
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', { value: true });
Object.assign(exports.default, exports);
module.exports = exports.default;
}
//# sourceMappingURL=ComponentStackFrameRow.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/container/RuntimeError/ComponentStackFrameRow.tsx"],"names":["ComponentStackFrameRow","EditorLink","children","componentStackFrame","file","column","lineNumber","open","useOpenInEditor","div","tabIndex","role","onClick","title","svg","xmlns","viewBox","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin","path","d","polyline","points","line","x1","y1","x2","y2","formatLineNumber","LocationLine","SourceLocation","canOpenInEditor","span","component","data-nextjs-component-stack-frame","h3","HotlinkedText","text"],"mappings":";;;;+BAwFgBA;;;eAAAA;;;;;gEAxFE;iCAEc;+BACF;AAE9B,SAASC,WAAW,KAMnB;IANmB,IAAA,EAClBC,QAAQ,EACRC,qBAAqB,EAAEC,IAAI,EAAEC,MAAM,EAAEC,UAAU,EAAE,EAIlD,GANmB;IAOlB,MAAMC,OAAOC,IAAAA,gCAAe,EAAC;QAC3BJ;QACAC;QACAC;IACF;IAEA,qBACE,sBAACG;QACCC,UAAU;QACVC,MAAM;QACNC,SAASL;QACTM,OAAO;;YAENX;0BACD,sBAACY;gBACCC,OAAM;gBACNC,SAAQ;gBACRC,MAAK;gBACLC,QAAO;gBACPC,aAAY;gBACZC,eAAc;gBACdC,gBAAe;;kCAEf,qBAACC;wBAAKC,GAAE;;kCACR,qBAACC;wBAASC,QAAO;;kCACjB,qBAACC;wBAAKC,IAAG;wBAAKC,IAAG;wBAAKC,IAAG;wBAAKC,IAAG;;;;;;AAIzC;AAEA,SAASC,iBAAiBzB,UAAkB,EAAED,MAA0B;IACtE,IAAI,CAACA,QAAQ;QACX,OAAOC;IACT;IAEA,OAAO,AAAGA,aAAW,MAAGD;AAC1B;AAEA,SAAS2B,aAAa,KAIrB;IAJqB,IAAA,EACpB7B,mBAAmB,EAGpB,GAJqB;IAKpB,MAAM,EAAEC,IAAI,EAAEE,UAAU,EAAED,MAAM,EAAE,GAAGF;IACrC,qBACE;;YACGC;YAAK;YAAEE,aAAa,AAAC,MAAGyB,iBAAiBzB,YAAYD,UAAQ,MAAK;;;AAGzE;AAEA,SAAS4B,eAAe,KAIvB;IAJuB,IAAA,EACtB9B,mBAAmB,EAGpB,GAJuB;IAKtB,MAAM,EAAEC,IAAI,EAAE8B,eAAe,EAAE,GAAG/B;IAElC,IAAIC,QAAQ8B,iBAAiB;QAC3B,qBACE,qBAACjC;YAAWE,qBAAqBA;sBAC/B,cAAA,qBAACgC;0BACC,cAAA,qBAACH;oBAAa7B,qBAAqBA;;;;IAI3C;IAEA,qBACE,qBAACM;kBACC,cAAA,qBAACuB;YAAa7B,qBAAqBA;;;AAGzC;AAEO,SAASH,uBAAuB,KAItC;IAJsC,IAAA,EACrCG,mBAAmB,EAGpB,GAJsC;IAKrC,MAAM,EAAEiC,SAAS,EAAE,GAAGjC;IAEtB,qBACE,sBAACM;QAAI4B,mCAAiC;;0BACpC,qBAACC;0BACC,cAAA,qBAACC,4BAAa;oBAACC,MAAMJ;;;0BAEvB,qBAACH;gBAAe9B,qBAAqBA;;;;AAG3C"}

View File

@ -0,0 +1,5 @@
import type { StackFramesGroup } from '../../helpers/group-stack-frames-by-framework';
export declare function GroupedStackFrames({ groupedStackFrames, show, }: {
groupedStackFrames: StackFramesGroup[];
show: boolean;
}): import("react/jsx-runtime").JSX.Element | undefined;

View File

@ -0,0 +1,62 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "GroupedStackFrames", {
enumerable: true,
get: function() {
return GroupedStackFrames;
}
});
const _jsxruntime = require("react/jsx-runtime");
const _CallStackFrame = require("./CallStackFrame");
const _CollapseIcon = require("../../icons/CollapseIcon");
const _FrameworkIcon = require("../../icons/FrameworkIcon");
function FrameworkGroup(param) {
let { framework, stackFrames } = param;
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("details", {
"data-nextjs-collapsed-call-stack-details": true,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)("summary", {
tabIndex: 10,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)(_CollapseIcon.CollapseIcon, {}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_FrameworkIcon.FrameworkIcon, {
framework: framework
}),
framework === "react" ? "React" : "Next.js"
]
}),
stackFrames.map((frame, index)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_CallStackFrame.CallStackFrame, {
frame: frame
}, "call-stack-" + index))
]
});
}
function GroupedStackFrames(param) {
let { groupedStackFrames, show } = param;
if (!show) return;
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
children: groupedStackFrames.map((stackFramesGroup, groupIndex)=>{
// Collapse React and Next.js frames
if (stackFramesGroup.framework) {
return /*#__PURE__*/ (0, _jsxruntime.jsx)(FrameworkGroup, {
framework: stackFramesGroup.framework,
stackFrames: stackFramesGroup.stackFrames
}, "call-stack-framework-group-" + groupIndex);
}
return(// Don't group non React and Next.js frames
stackFramesGroup.stackFrames.map((frame, frameIndex)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_CallStackFrame.CallStackFrame, {
frame: frame
}, "call-stack-" + groupIndex + "-" + frameIndex)));
})
});
}
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', { value: true });
Object.assign(exports.default, exports);
module.exports = exports.default;
}
//# sourceMappingURL=GroupedStackFrames.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/container/RuntimeError/GroupedStackFrames.tsx"],"names":["GroupedStackFrames","FrameworkGroup","framework","stackFrames","details","data-nextjs-collapsed-call-stack-details","summary","tabIndex","CollapseIcon","FrameworkIcon","map","frame","index","CallStackFrame","groupedStackFrames","show","stackFramesGroup","groupIndex","frameIndex"],"mappings":";;;;+BA2BgBA;;;eAAAA;;;;gCA1Be;8BACF;+BACC;AAE9B,SAASC,eAAe,KAMvB;IANuB,IAAA,EACtBC,SAAS,EACTC,WAAW,EAIZ,GANuB;IAOtB,qBACE,sBAACC;QAAQC,0CAAwC;;0BAE/C,sBAACC;gBAAQC,UAAU;;kCACjB,qBAACC,0BAAY;kCACb,qBAACC,4BAAa;wBAACP,WAAWA;;oBACzBA,cAAc,UAAU,UAAU;;;YAEpCC,YAAYO,GAAG,CAAC,CAACC,OAAOC,sBACvB,qBAACC,8BAAc;oBAA6BF,OAAOA;mBAA9B,AAAC,gBAAaC;;;AAI3C;AAEO,SAASZ,mBAAmB,KAMlC;IANkC,IAAA,EACjCc,kBAAkB,EAClBC,IAAI,EAIL,GANkC;IAOjC,IAAI,CAACA,MAAM;IACX,qBACE;kBACGD,mBAAmBJ,GAAG,CAAC,CAACM,kBAAkBC;YACzC,oCAAoC;YACpC,IAAID,iBAAiBd,SAAS,EAAE;gBAC9B,qBACE,qBAACD;oBAECC,WAAWc,iBAAiBd,SAAS;oBACrCC,aAAaa,iBAAiBb,WAAW;mBAFpC,AAAC,gCAA6Bc;YAKzC;YAEA,OACE,2CAA2C;YAC3CD,iBAAiBb,WAAW,CAACO,GAAG,CAAC,CAACC,OAAOO,2BACvC,qBAACL,8BAAc;oBAEbF,OAAOA;mBADF,AAAC,gBAAaM,aAAW,MAAGC;QAKzC;;AAGN"}

View File

@ -0,0 +1,55 @@
import type { ComponentStackFrame } from '../../helpers/parse-component-stack';
/**
*
* Format component stack into pseudo HTML
* component stack is an array of strings, e.g.: ['p', 'p', 'Page', ...]
*
* For html tags mismatch, it will render it for the code block
*
* ```
* <pre>
* <code>{`
* <Page>
* <p red>
* <p red>
* `}</code>
* </pre>
* ```
*
* For text mismatch, it will render it for the code block
*
* ```
* <pre>
* <code>{`
* <Page>
* <p>
* "Server Text" (green)
* "Client Text" (red)
* </p>
* </Page>
* `}</code>
* ```
*
* For bad text under a tag it will render it for the code block,
* e.g. "Mismatched Text" under <p>
*
* ```
* <pre>
* <code>{`
* <Page>
* <div>
* <p>
* "Mismatched Text" (red)
* </p>
* </div>
* </Page>
* `}</code>
* ```
*
*/
export declare function PseudoHtmlDiff({ componentStackFrames, firstContent, secondContent, hydrationMismatchType, ...props }: {
componentStackFrames: ComponentStackFrame[];
firstContent: string;
secondContent: string;
hydrationMismatchType: 'tag' | 'text' | 'text-in-tag';
} & React.HTMLAttributes<HTMLPreElement>): import("react/jsx-runtime").JSX.Element;

View File

@ -0,0 +1,186 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "PseudoHtmlDiff", {
enumerable: true,
get: function() {
return PseudoHtmlDiff;
}
});
const _jsxruntime = require("react/jsx-runtime");
const _react = require("react");
const _CollapseIcon = require("../../icons/CollapseIcon");
function getAdjacentProps(isAdj) {
return {
"data-nextjs-container-errors-pseudo-html--tag-adjacent": isAdj
};
}
function PseudoHtmlDiff(param) {
let { componentStackFrames, firstContent, secondContent, hydrationMismatchType, ...props } = param;
const isHtmlTagsWarning = hydrationMismatchType === "tag";
// For text mismatch, mismatched text will take 2 rows, so we display 4 rows of component stack
const MAX_NON_COLLAPSED_FRAMES = isHtmlTagsWarning ? 6 : 4;
const shouldCollapse = componentStackFrames.length > MAX_NON_COLLAPSED_FRAMES;
const [isHtmlCollapsed, toggleCollapseHtml] = (0, _react.useState)(shouldCollapse);
const htmlComponents = (0, _react.useMemo)(()=>{
const tagNames = isHtmlTagsWarning ? [
firstContent.replace(/<|>/g, ""),
secondContent.replace(/<|>/g, "")
] : [];
const nestedHtmlStack = [];
let lastText = "";
const componentStack = componentStackFrames.map((frame)=>frame.component).reverse();
// [child index, parent index]
const matchedIndex = [
-1,
-1
];
if (isHtmlTagsWarning) {
// Reverse search for the child tag
for(let i = componentStack.length - 1; i >= 0; i--){
if (componentStack[i] === tagNames[0]) {
matchedIndex[0] = i;
break;
}
}
// Start searching parent tag from child tag above
for(let i = matchedIndex[0] - 1; i >= 0; i--){
if (componentStack[i] === tagNames[1]) {
matchedIndex[1] = i;
break;
}
}
}
componentStack.forEach((component, index, componentList)=>{
const spaces = " ".repeat(nestedHtmlStack.length * 2);
// const prevComponent = componentList[index - 1]
// const nextComponent = componentList[index + 1]
// When component is the server or client tag name, highlight it
const isHighlightedTag = isHtmlTagsWarning ? index === matchedIndex[0] || index === matchedIndex[1] : tagNames.includes(component);
const isAdjacentTag = isHighlightedTag || Math.abs(index - matchedIndex[0]) <= 1 || Math.abs(index - matchedIndex[1]) <= 1;
const isLastFewFrames = !isHtmlTagsWarning && index >= componentList.length - 6;
const adjProps = getAdjacentProps(isAdjacentTag);
if (isHtmlTagsWarning && isAdjacentTag || isLastFewFrames) {
const codeLine = /*#__PURE__*/ (0, _jsxruntime.jsxs)("span", {
children: [
spaces,
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
...adjProps,
...isHighlightedTag ? {
"data-nextjs-container-errors-pseudo-html--tag-error": true
} : undefined,
children: "<" + component + ">\n"
})
]
});
lastText = component;
const wrappedCodeLine = /*#__PURE__*/ (0, _jsxruntime.jsxs)(_react.Fragment, {
children: [
codeLine,
isHighlightedTag && /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
"data-nextjs-container-errors-pseudo-html--hint": true,
children: spaces + "^".repeat(component.length + 2) + "\n"
})
]
}, nestedHtmlStack.length);
nestedHtmlStack.push(wrappedCodeLine);
} else {
if (nestedHtmlStack.length >= MAX_NON_COLLAPSED_FRAMES && isHtmlCollapsed) {
return;
}
if (!isHtmlCollapsed || isLastFewFrames) {
nestedHtmlStack.push(/*#__PURE__*/ (0, _react.createElement)("span", {
...adjProps,
key: nestedHtmlStack.length,
children: [
spaces,
"<" + component + ">\n"
]
}));
} else if (isHtmlCollapsed && lastText !== "...") {
lastText = "...";
nestedHtmlStack.push(/*#__PURE__*/ (0, _react.createElement)("span", {
...adjProps,
key: nestedHtmlStack.length,
children: [
spaces,
"...\n"
]
}));
}
}
});
// Hydration mismatch: text or text-tag
if (!isHtmlTagsWarning) {
const spaces = " ".repeat(nestedHtmlStack.length * 2);
let wrappedCodeLine;
if (hydrationMismatchType === "text") {
// hydration type is "text", represent [server content, client content]
wrappedCodeLine = /*#__PURE__*/ (0, _jsxruntime.jsxs)(_react.Fragment, {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
"data-nextjs-container-errors-pseudo-html--diff-remove": true,
children: spaces + ('"' + firstContent + '"\n')
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
"data-nextjs-container-errors-pseudo-html--diff-add": true,
children: spaces + ('"' + secondContent + '"\n')
})
]
}, nestedHtmlStack.length);
} else {
// hydration type is "text-in-tag", represent [parent tag, mismatch content]
wrappedCodeLine = /*#__PURE__*/ (0, _jsxruntime.jsxs)(_react.Fragment, {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
"data-nextjs-container-errors-pseudo-html--tag-adjacent": true,
children: spaces + ("<" + secondContent + ">\n")
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
"data-nextjs-container-errors-pseudo-html--diff-remove": true,
children: spaces + (' "' + firstContent + '"\n')
})
]
}, nestedHtmlStack.length);
}
nestedHtmlStack.push(wrappedCodeLine);
}
return nestedHtmlStack;
}, [
componentStackFrames,
isHtmlCollapsed,
firstContent,
secondContent,
isHtmlTagsWarning,
hydrationMismatchType,
MAX_NON_COLLAPSED_FRAMES
]);
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
"data-nextjs-container-errors-pseudo-html": true,
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
tabIndex: 10,
"data-nextjs-container-errors-pseudo-html-collapse": true,
onClick: ()=>toggleCollapseHtml(!isHtmlCollapsed),
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_CollapseIcon.CollapseIcon, {
collapsed: isHtmlCollapsed
})
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)("pre", {
...props,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("code", {
children: htmlComponents
})
})
]
});
}
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', { value: true });
Object.assign(exports.default, exports);
module.exports = exports.default;
}
//# sourceMappingURL=component-stack-pseudo-html.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/container/RuntimeError/component-stack-pseudo-html.tsx"],"names":["PseudoHtmlDiff","getAdjacentProps","isAdj","componentStackFrames","firstContent","secondContent","hydrationMismatchType","props","isHtmlTagsWarning","MAX_NON_COLLAPSED_FRAMES","shouldCollapse","length","isHtmlCollapsed","toggleCollapseHtml","useState","htmlComponents","useMemo","tagNames","replace","nestedHtmlStack","lastText","componentStack","map","frame","component","reverse","matchedIndex","i","forEach","index","componentList","spaces","repeat","isHighlightedTag","includes","isAdjacentTag","Math","abs","isLastFewFrames","adjProps","codeLine","span","undefined","wrappedCodeLine","Fragment","data-nextjs-container-errors-pseudo-html--hint","push","key","data-nextjs-container-errors-pseudo-html--diff-remove","data-nextjs-container-errors-pseudo-html--diff-add","data-nextjs-container-errors-pseudo-html--tag-adjacent","div","data-nextjs-container-errors-pseudo-html","button","tabIndex","data-nextjs-container-errors-pseudo-html-collapse","onClick","CollapseIcon","collapsed","pre","code"],"mappings":"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"}

View File

@ -0,0 +1,6 @@
import type { ReadyRuntimeError } from '../../helpers/getErrorByType';
export type RuntimeErrorProps = {
error: ReadyRuntimeError;
};
export declare function RuntimeError({ error }: RuntimeErrorProps): import("react/jsx-runtime").JSX.Element;
export declare const styles: string;

View File

@ -0,0 +1,126 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
RuntimeError: null,
styles: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
RuntimeError: function() {
return RuntimeError;
},
styles: function() {
return styles;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _tagged_template_literal_loose = require("@swc/helpers/_/_tagged_template_literal_loose");
const _jsxruntime = require("react/jsx-runtime");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _CodeFrame = require("../../components/CodeFrame");
const _nooptemplate = require("../../helpers/noop-template");
const _groupstackframesbyframework = require("../../helpers/group-stack-frames-by-framework");
const _GroupedStackFrames = require("./GroupedStackFrames");
function _templateObject() {
const data = _tagged_template_literal_loose._([
"\n button[data-nextjs-data-runtime-error-collapsed-action] {\n background: none;\n border: none;\n padding: 0;\n font-size: var(--size-font-small);\n line-height: var(--size-font-bigger);\n color: var(--color-accents-3);\n }\n\n [data-nextjs-call-stack-frame]:not(:last-child),\n [data-nextjs-component-stack-frame]:not(:last-child) {\n margin-bottom: var(--size-gap-double);\n }\n\n [data-nextjs-call-stack-frame] > h3,\n [data-nextjs-component-stack-frame] > h3 {\n margin-top: 0;\n margin-bottom: var(--size-gap);\n font-family: var(--font-stack-monospace);\n font-size: var(--size-font);\n color: #222;\n }\n [data-nextjs-call-stack-frame] > h3[data-nextjs-frame-expanded='false'] {\n color: #666;\n }\n [data-nextjs-call-stack-frame] > div,\n [data-nextjs-component-stack-frame] > div {\n display: flex;\n align-items: center;\n padding-left: calc(var(--size-gap) + var(--size-gap-half));\n font-size: var(--size-font-small);\n color: #999;\n }\n [data-nextjs-call-stack-frame] > div > svg,\n [data-nextjs-component-stack-frame] > [role='link'] > svg {\n width: auto;\n height: var(--size-font-small);\n margin-left: var(--size-gap);\n flex-shrink: 0;\n\n display: none;\n }\n\n [data-nextjs-call-stack-frame] > div[data-has-source],\n [data-nextjs-component-stack-frame] > [role='link'] {\n cursor: pointer;\n }\n [data-nextjs-call-stack-frame] > div[data-has-source]:hover,\n [data-nextjs-component-stack-frame] > [role='link']:hover {\n text-decoration: underline dotted;\n }\n [data-nextjs-call-stack-frame] > div[data-has-source] > svg,\n [data-nextjs-component-stack-frame] > [role='link'] > svg {\n display: unset;\n }\n\n [data-nextjs-call-stack-framework-icon] {\n margin-right: var(--size-gap);\n }\n [data-nextjs-call-stack-framework-icon='next'] > mask {\n mask-type: alpha;\n }\n [data-nextjs-call-stack-framework-icon='react'] {\n color: rgb(20, 158, 202);\n }\n [data-nextjs-collapsed-call-stack-details][open]\n [data-nextjs-call-stack-chevron-icon] {\n transform: rotate(90deg);\n }\n [data-nextjs-collapsed-call-stack-details] summary {\n display: flex;\n align-items: center;\n margin-bottom: var(--size-gap);\n list-style: none;\n }\n [data-nextjs-collapsed-call-stack-details] summary::-webkit-details-marker {\n display: none;\n }\n\n [data-nextjs-collapsed-call-stack-details] h3 {\n color: #666;\n }\n [data-nextjs-collapsed-call-stack-details] [data-nextjs-call-stack-frame] {\n margin-bottom: var(--size-gap-double);\n }\n\n [data-nextjs-container-errors-pseudo-html] {\n position: relative;\n }\n [data-nextjs-container-errors-pseudo-html-collapse] {\n position: absolute;\n left: 10px;\n top: 10px;\n color: inherit;\n background: none;\n border: none;\n padding: 0;\n }\n [data-nextjs-container-errors-pseudo-html--diff-add] {\n color: var(--color-ansi-green);\n }\n [data-nextjs-container-errors-pseudo-html--diff-remove] {\n color: var(--color-ansi-red);\n }\n [data-nextjs-container-errors-pseudo-html--tag-error] {\n color: var(--color-ansi-red);\n font-weight: bold;\n }\n /* hide but text are still accessible in DOM */\n [data-nextjs-container-errors-pseudo-html--hint] {\n display: inline-block;\n font-size: 0;\n }\n [data-nextjs-container-errors-pseudo-html--tag-adjacent='false'] {\n color: var(--color-accents-1);\n }\n"
]);
_templateObject = function() {
return data;
};
return data;
}
function RuntimeError(param) {
let { error } = param;
const { firstFrame, allLeadingFrames, allCallStackFrames } = _react.useMemo(()=>{
const filteredFrames = error.frames.filter((f)=>{
var _f_sourceStackFrame_file;
return !(f.sourceStackFrame.file === "<anonymous>" && [
"stringify",
"<unknown>"
].includes(f.sourceStackFrame.methodName)) && !((_f_sourceStackFrame_file = f.sourceStackFrame.file) == null ? void 0 : _f_sourceStackFrame_file.startsWith("node:internal"));
});
const firstFirstPartyFrameIndex = filteredFrames.findIndex((entry)=>entry.expanded && Boolean(entry.originalCodeFrame) && Boolean(entry.originalStackFrame));
var _filteredFrames_firstFirstPartyFrameIndex;
return {
firstFrame: (_filteredFrames_firstFirstPartyFrameIndex = filteredFrames[firstFirstPartyFrameIndex]) != null ? _filteredFrames_firstFirstPartyFrameIndex : null,
allLeadingFrames: firstFirstPartyFrameIndex < 0 ? [] : filteredFrames.slice(0, firstFirstPartyFrameIndex),
allCallStackFrames: filteredFrames.slice(firstFirstPartyFrameIndex + 1)
};
}, [
error.frames
]);
const [all, setAll] = _react.useState(firstFrame == null);
const { canShowMore, leadingFramesGroupedByFramework, stackFramesGroupedByFramework } = _react.useMemo(()=>{
const leadingFrames = allLeadingFrames.filter((f)=>f.expanded || all);
const visibleCallStackFrames = allCallStackFrames.filter((f)=>f.expanded || all);
return {
canShowMore: allCallStackFrames.length !== visibleCallStackFrames.length || all && firstFrame != null,
stackFramesGroupedByFramework: (0, _groupstackframesbyframework.groupStackFramesByFramework)(allCallStackFrames),
leadingFramesGroupedByFramework: (0, _groupstackframesbyframework.groupStackFramesByFramework)(leadingFrames)
};
}, [
all,
allCallStackFrames,
allLeadingFrames,
firstFrame
]);
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_react.Fragment, {
children: [
firstFrame ? /*#__PURE__*/ (0, _jsxruntime.jsxs)(_react.Fragment, {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("h2", {
children: "Source"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_GroupedStackFrames.GroupedStackFrames, {
groupedStackFrames: leadingFramesGroupedByFramework,
show: all
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_CodeFrame.CodeFrame, {
stackFrame: firstFrame.originalStackFrame,
codeFrame: firstFrame.originalCodeFrame
})
]
}) : undefined,
stackFramesGroupedByFramework.length ? /*#__PURE__*/ (0, _jsxruntime.jsxs)(_react.Fragment, {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("h2", {
children: "Call Stack"
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_GroupedStackFrames.GroupedStackFrames, {
groupedStackFrames: stackFramesGroupedByFramework,
show: all
})
]
}) : undefined,
canShowMore ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_react.Fragment, {
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("button", {
tabIndex: 10,
"data-nextjs-data-runtime-error-collapsed-action": true,
type: "button",
onClick: ()=>setAll(!all),
children: [
all ? "Hide" : "Show",
" collapsed frames"
]
})
}) : undefined
]
});
}
const styles = (0, _nooptemplate.noop)(_templateObject());
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', { value: true });
Object.assign(exports.default, exports);
module.exports = exports.default;
}
//# sourceMappingURL=index.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/container/RuntimeError/index.tsx"],"names":["RuntimeError","styles","error","firstFrame","allLeadingFrames","allCallStackFrames","React","useMemo","filteredFrames","frames","filter","f","sourceStackFrame","file","includes","methodName","startsWith","firstFirstPartyFrameIndex","findIndex","entry","expanded","Boolean","originalCodeFrame","originalStackFrame","slice","all","setAll","useState","canShowMore","leadingFramesGroupedByFramework","stackFramesGroupedByFramework","leadingFrames","visibleCallStackFrames","length","groupStackFramesByFramework","Fragment","h2","GroupedStackFrames","groupedStackFrames","show","CodeFrame","stackFrame","codeFrame","undefined","button","tabIndex","data-nextjs-data-runtime-error-collapsed-action","type","onClick","css"],"mappings":";;;;;;;;;;;;;;;IASgBA,YAAY;eAAZA;;IA8FHC,MAAM;eAANA;;;;;;iEAvGU;2BACG;8BAEE;6CACgB;oCACT;;;;;;;;;;AAI5B,SAASD,aAAa,KAA4B;IAA5B,IAAA,EAAEE,KAAK,EAAqB,GAA5B;IAC3B,MAAM,EAAEC,UAAU,EAAEC,gBAAgB,EAAEC,kBAAkB,EAAE,GACxDC,OAAMC,OAAO,CAAC;QACZ,MAAMC,iBAAiBN,MAAMO,MAAM,CAACC,MAAM,CACxC,CAACC;gBAIOA;mBAHN,CACEA,CAAAA,EAAEC,gBAAgB,CAACC,IAAI,KAAK,iBAC5B;gBAAC;gBAAa;aAAY,CAACC,QAAQ,CAACH,EAAEC,gBAAgB,CAACG,UAAU,CAAA,KAC9D,GAACJ,2BAAAA,EAAEC,gBAAgB,CAACC,IAAI,qBAAvBF,yBAAyBK,UAAU,CAAC;;QAG9C,MAAMC,4BAA4BT,eAAeU,SAAS,CACxD,CAACC,QACCA,MAAMC,QAAQ,IACdC,QAAQF,MAAMG,iBAAiB,KAC/BD,QAAQF,MAAMI,kBAAkB;YAItBf;QADd,OAAO;YACLL,YAAYK,CAAAA,4CAAAA,cAAc,CAACS,0BAA0B,YAAzCT,4CAA6C;YACzDJ,kBACEa,4BAA4B,IACxB,EAAE,GACFT,eAAegB,KAAK,CAAC,GAAGP;YAC9BZ,oBAAoBG,eAAegB,KAAK,CAACP,4BAA4B;QACvE;IACF,GAAG;QAACf,MAAMO,MAAM;KAAC;IAEnB,MAAM,CAACgB,KAAKC,OAAO,GAAGpB,OAAMqB,QAAQ,CAACxB,cAAc;IAEnD,MAAM,EACJyB,WAAW,EACXC,+BAA+B,EAC/BC,6BAA6B,EAC9B,GAAGxB,OAAMC,OAAO,CAAC;QAChB,MAAMwB,gBAAgB3B,iBAAiBM,MAAM,CAAC,CAACC,IAAMA,EAAES,QAAQ,IAAIK;QACnE,MAAMO,yBAAyB3B,mBAAmBK,MAAM,CACtD,CAACC,IAAMA,EAAES,QAAQ,IAAIK;QAGvB,OAAO;YACLG,aACEvB,mBAAmB4B,MAAM,KAAKD,uBAAuBC,MAAM,IAC1DR,OAAOtB,cAAc;YAExB2B,+BACEI,IAAAA,wDAA2B,EAAC7B;YAE9BwB,iCACEK,IAAAA,wDAA2B,EAACH;QAChC;IACF,GAAG;QAACN;QAAKpB;QAAoBD;QAAkBD;KAAW;IAE1D,qBACE,sBAACG,OAAM6B,QAAQ;;YACZhC,2BACC,sBAACG,OAAM6B,QAAQ;;kCACb,qBAACC;kCAAG;;kCACJ,qBAACC,sCAAkB;wBACjBC,oBAAoBT;wBACpBU,MAAMd;;kCAER,qBAACe,oBAAS;wBACRC,YAAYtC,WAAWoB,kBAAkB;wBACzCmB,WAAWvC,WAAWmB,iBAAiB;;;iBAGzCqB;YAEHb,8BAA8BG,MAAM,iBACnC,sBAAC3B,OAAM6B,QAAQ;;kCACb,qBAACC;kCAAG;;kCACJ,qBAACC,sCAAkB;wBACjBC,oBAAoBR;wBACpBS,MAAMd;;;iBAGRkB;YACHf,4BACC,qBAACtB,OAAM6B,QAAQ;0BACb,cAAA,sBAACS;oBACCC,UAAU;oBACVC,iDAA+C;oBAC/CC,MAAK;oBACLC,SAAS,IAAMtB,OAAO,CAACD;;wBAEtBA,MAAM,SAAS;wBAAO;;;iBAGzBkB;;;AAGV;AAEO,MAAM1C,aAASgD,kBAAG"}

View File

@ -0,0 +1,8 @@
import * as React from 'react';
import type { VersionInfo } from '../../../../../server/dev/parse-version-info';
type RootLayoutMissingTagsErrorProps = {
missingTags: string[];
versionInfo?: VersionInfo;
};
export declare const RootLayoutMissingTagsError: React.FC<RootLayoutMissingTagsErrorProps>;
export {};

View File

@ -0,0 +1,58 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "RootLayoutMissingTagsError", {
enumerable: true,
get: function() {
return RootLayoutMissingTagsError;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _jsxruntime = require("react/jsx-runtime");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _Dialog = require("../components/Dialog");
const _Overlay = require("../components/Overlay");
const _VersionStalenessInfo = require("../components/VersionStalenessInfo");
const _hotlinkedtext = require("../components/hot-linked-text");
const RootLayoutMissingTagsError = function RootLayoutMissingTagsError(param) {
let { missingTags, versionInfo } = param;
const noop = _react.useCallback(()=>{}, []);
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_Overlay.Overlay, {
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Dialog.Dialog, {
type: "error",
"aria-labelledby": "nextjs__container_errors_label",
"aria-describedby": "nextjs__container_errors_desc",
onClose: noop,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Dialog.DialogContent, {
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Dialog.DialogHeader, {
className: "nextjs-container-errors-header",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("h3", {
id: "nextjs__container_errors_label",
children: "Missing required html tags"
}),
versionInfo ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_VersionStalenessInfo.VersionStalenessInfo, {
...versionInfo
}) : null,
/*#__PURE__*/ (0, _jsxruntime.jsx)("p", {
id: "nextjs__container_errors_desc",
className: "nextjs__container_errors_desc",
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_hotlinkedtext.HotlinkedText, {
text: "The following tags are missing in the Root Layout: " + missingTags.map((tagName)=>"<" + tagName + ">").join(", ") + ".\nRead more at https://nextjs.org/docs/messages/missing-root-layout-tags"
})
})
]
})
})
})
});
};
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', { value: true });
Object.assign(exports.default, exports);
module.exports = exports.default;
}
//# sourceMappingURL=root-layout-missing-tags-error.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../../../../src/client/components/react-dev-overlay/internal/container/root-layout-missing-tags-error.tsx"],"names":["RootLayoutMissingTagsError","missingTags","versionInfo","noop","React","useCallback","Overlay","Dialog","type","aria-labelledby","aria-describedby","onClose","DialogContent","DialogHeader","className","h3","id","VersionStalenessInfo","p","HotlinkedText","text","map","tagName","join"],"mappings":";;;;+BAYaA;;;eAAAA;;;;;iEAZU;wBAE6B;yBAC5B;sCACa;+BACP;AAOvB,MAAMA,6BACX,SAASA,2BAA2B,KAA4B;IAA5B,IAAA,EAAEC,WAAW,EAAEC,WAAW,EAAE,GAA5B;IAClC,MAAMC,OAAOC,OAAMC,WAAW,CAAC,KAAO,GAAG,EAAE;IAC3C,qBACE,qBAACC,gBAAO;kBACN,cAAA,qBAACC,cAAM;YACLC,MAAK;YACLC,mBAAgB;YAChBC,oBAAiB;YACjBC,SAASR;sBAET,cAAA,qBAACS,qBAAa;0BACZ,cAAA,sBAACC,oBAAY;oBAACC,WAAU;;sCACtB,qBAACC;4BAAGC,IAAG;sCAAiC;;wBAGvCd,4BAAc,qBAACe,0CAAoB;4BAAE,GAAGf,WAAW;6BAAO;sCAC3D,qBAACgB;4BACCF,IAAG;4BACHF,WAAU;sCAEV,cAAA,qBAACK,4BAAa;gCACZC,MAAM,AAAC,wDAAqDnB,YACzDoB,GAAG,CAAC,CAACC,UAAY,AAAC,MAAGA,UAAQ,KAC7BC,IAAI,CACH,QACA;;;;;;;;AAQpB"}