Initial boiler plate project
This commit is contained in:
19
node_modules/next/dist/client/components/react-dev-overlay/app/ReactDevOverlay.d.ts
generated
vendored
Normal file
19
node_modules/next/dist/client/components/react-dev-overlay/app/ReactDevOverlay.d.ts
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
import * as React from 'react';
|
||||
import { type OverlayState } from '../shared';
|
||||
import type { SupportedErrorEvent } from '../internal/container/Errors';
|
||||
interface ReactDevOverlayState {
|
||||
reactError: SupportedErrorEvent | null;
|
||||
}
|
||||
export default class ReactDevOverlay extends React.PureComponent<{
|
||||
state: OverlayState;
|
||||
children: React.ReactNode;
|
||||
onReactError: (error: Error) => void;
|
||||
}, ReactDevOverlayState> {
|
||||
state: {
|
||||
reactError: null;
|
||||
};
|
||||
static getDerivedStateFromError(error: Error): ReactDevOverlayState;
|
||||
componentDidCatch(componentErr: Error): void;
|
||||
render(): import("react/jsx-runtime").JSX.Element;
|
||||
}
|
||||
export {};
|
||||
100
node_modules/next/dist/client/components/react-dev-overlay/app/ReactDevOverlay.js
generated
vendored
Normal file
100
node_modules/next/dist/client/components/react-dev-overlay/app/ReactDevOverlay.js
generated
vendored
Normal file
@ -0,0 +1,100 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return ReactDevOverlay;
|
||||
}
|
||||
});
|
||||
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 _shared = require("../shared");
|
||||
const _ShadowPortal = require("../internal/components/ShadowPortal");
|
||||
const _BuildError = require("../internal/container/BuildError");
|
||||
const _Errors = require("../internal/container/Errors");
|
||||
const _parseStack = require("../internal/helpers/parseStack");
|
||||
const _Base = require("../internal/styles/Base");
|
||||
const _ComponentStyles = require("../internal/styles/ComponentStyles");
|
||||
const _CssReset = require("../internal/styles/CssReset");
|
||||
const _rootlayoutmissingtagserror = require("../internal/container/root-layout-missing-tags-error");
|
||||
class ReactDevOverlay extends _react.PureComponent {
|
||||
static getDerivedStateFromError(error) {
|
||||
if (!error.stack) return {
|
||||
reactError: null
|
||||
};
|
||||
return {
|
||||
reactError: {
|
||||
id: 0,
|
||||
event: {
|
||||
type: _shared.ACTION_UNHANDLED_ERROR,
|
||||
reason: error,
|
||||
frames: (0, _parseStack.parseStack)(error.stack)
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
componentDidCatch(componentErr) {
|
||||
this.props.onReactError(componentErr);
|
||||
}
|
||||
render() {
|
||||
var _state_rootLayoutMissingTags, _state_rootLayoutMissingTags1;
|
||||
const { state, children } = this.props;
|
||||
const { reactError } = this.state;
|
||||
const hasBuildError = state.buildError != null;
|
||||
const hasRuntimeErrors = Boolean(state.errors.length);
|
||||
const hasMissingTags = Boolean((_state_rootLayoutMissingTags = state.rootLayoutMissingTags) == null ? void 0 : _state_rootLayoutMissingTags.length);
|
||||
const isMounted = hasBuildError || hasRuntimeErrors || reactError || hasMissingTags;
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
||||
children: [
|
||||
reactError ? /*#__PURE__*/ (0, _jsxruntime.jsxs)("html", {
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("head", {}),
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("body", {})
|
||||
]
|
||||
}) : children,
|
||||
isMounted ? /*#__PURE__*/ (0, _jsxruntime.jsxs)(_ShadowPortal.ShadowPortal, {
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)(_CssReset.CssReset, {}),
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Base.Base, {}),
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)(_ComponentStyles.ComponentStyles, {}),
|
||||
((_state_rootLayoutMissingTags1 = state.rootLayoutMissingTags) == null ? void 0 : _state_rootLayoutMissingTags1.length) ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_rootlayoutmissingtagserror.RootLayoutMissingTagsError, {
|
||||
missingTags: state.rootLayoutMissingTags
|
||||
}) : hasBuildError ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_BuildError.BuildError, {
|
||||
message: state.buildError,
|
||||
versionInfo: state.versionInfo
|
||||
}) : reactError ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Errors.Errors, {
|
||||
isAppDir: true,
|
||||
versionInfo: state.versionInfo,
|
||||
initialDisplayState: "fullscreen",
|
||||
errors: [
|
||||
reactError
|
||||
]
|
||||
}) : hasRuntimeErrors ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Errors.Errors, {
|
||||
isAppDir: true,
|
||||
initialDisplayState: "minimized",
|
||||
errors: state.errors,
|
||||
versionInfo: state.versionInfo
|
||||
}) : undefined
|
||||
]
|
||||
}) : undefined
|
||||
]
|
||||
});
|
||||
}
|
||||
constructor(...args){
|
||||
super(...args);
|
||||
this.state = {
|
||||
reactError: null
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
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=ReactDevOverlay.js.map
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/app/ReactDevOverlay.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/app/ReactDevOverlay.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../src/client/components/react-dev-overlay/app/ReactDevOverlay.tsx"],"names":["ReactDevOverlay","React","PureComponent","getDerivedStateFromError","error","stack","reactError","id","event","type","ACTION_UNHANDLED_ERROR","reason","frames","parseStack","componentDidCatch","componentErr","props","onReactError","render","state","children","hasBuildError","buildError","hasRuntimeErrors","Boolean","errors","length","hasMissingTags","rootLayoutMissingTags","isMounted","html","head","body","ShadowPortal","CssReset","Base","ComponentStyles","RootLayoutMissingTagsError","missingTags","BuildError","message","versionInfo","Errors","isAppDir","initialDisplayState","undefined"],"mappings":";;;;;;;eAgBqBA;;;;;iEAhBE;wBACmC;8BAE7B;4BACF;wBACJ;4BAEI;sBACN;iCACW;0BACP;4CACkB;AAK5B,MAAMA,wBAAwBC,OAAMC,aAAa;IAU9D,OAAOC,yBAAyBC,KAAY,EAAwB;QAClE,IAAI,CAACA,MAAMC,KAAK,EAAE,OAAO;YAAEC,YAAY;QAAK;QAC5C,OAAO;YACLA,YAAY;gBACVC,IAAI;gBACJC,OAAO;oBACLC,MAAMC,8BAAsB;oBAC5BC,QAAQP;oBACRQ,QAAQC,IAAAA,sBAAU,EAACT,MAAMC,KAAK;gBAChC;YACF;QACF;IACF;IAEAS,kBAAkBC,YAAmB,EAAE;QACrC,IAAI,CAACC,KAAK,CAACC,YAAY,CAACF;IAC1B;IAEAG,SAAS;YAMwBC,8BAmBtBA;QAxBT,MAAM,EAAEA,KAAK,EAAEC,QAAQ,EAAE,GAAG,IAAI,CAACJ,KAAK;QACtC,MAAM,EAAEV,UAAU,EAAE,GAAG,IAAI,CAACa,KAAK;QAEjC,MAAME,gBAAgBF,MAAMG,UAAU,IAAI;QAC1C,MAAMC,mBAAmBC,QAAQL,MAAMM,MAAM,CAACC,MAAM;QACpD,MAAMC,iBAAiBH,SAAQL,+BAAAA,MAAMS,qBAAqB,qBAA3BT,6BAA6BO,MAAM;QAClE,MAAMG,YACJR,iBAAiBE,oBAAoBjB,cAAcqB;QAErD,qBACE;;gBACGrB,2BACC,sBAACwB;;sCACC,qBAACC;sCACD,qBAACC;;qBAGHZ;gBAEDS,0BACC,sBAACI,0BAAY;;sCACX,qBAACC,kBAAQ;sCACT,qBAACC,UAAI;sCACL,qBAACC,gCAAe;wBACfjB,EAAAA,gCAAAA,MAAMS,qBAAqB,qBAA3BT,8BAA6BO,MAAM,kBAClC,qBAACW,sDAA0B;4BACzBC,aAAanB,MAAMS,qBAAqB;6BAExCP,8BACF,qBAACkB,sBAAU;4BACTC,SAASrB,MAAMG,UAAU;4BACzBmB,aAAatB,MAAMsB,WAAW;6BAE9BnC,2BACF,qBAACoC,cAAM;4BACLC,UAAU;4BACVF,aAAatB,MAAMsB,WAAW;4BAC9BG,qBAAoB;4BACpBnB,QAAQ;gCAACnB;6BAAW;6BAEpBiB,iCACF,qBAACmB,cAAM;4BACLC,UAAU;4BACVC,qBAAoB;4BACpBnB,QAAQN,MAAMM,MAAM;4BACpBgB,aAAatB,MAAMsB,WAAW;6BAE9BI;;qBAEJA;;;IAGV;;;aAzEA1B,QAAQ;YAAEb,YAAY;QAAK;;AA0E7B"}
|
||||
5
node_modules/next/dist/client/components/react-dev-overlay/app/hot-reloader-client.d.ts
generated
vendored
Normal file
5
node_modules/next/dist/client/components/react-dev-overlay/app/hot-reloader-client.d.ts
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
import type { ReactNode } from 'react';
|
||||
export default function HotReload({ assetPrefix, children, }: {
|
||||
assetPrefix: string;
|
||||
children?: ReactNode;
|
||||
}): import("react/jsx-runtime").JSX.Element;
|
||||
444
node_modules/next/dist/client/components/react-dev-overlay/app/hot-reloader-client.js
generated
vendored
Normal file
444
node_modules/next/dist/client/components/react-dev-overlay/app/hot-reloader-client.js
generated
vendored
Normal file
@ -0,0 +1,444 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return HotReload;
|
||||
}
|
||||
});
|
||||
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
||||
const _jsxruntime = require("react/jsx-runtime");
|
||||
const _react = require("react");
|
||||
const _stripansi = /*#__PURE__*/ _interop_require_default._(require("next/dist/compiled/strip-ansi"));
|
||||
const _formatwebpackmessages = /*#__PURE__*/ _interop_require_default._(require("../internal/helpers/format-webpack-messages"));
|
||||
const _navigation = require("../../navigation");
|
||||
const _shared = require("../shared");
|
||||
const _parseStack = require("../internal/helpers/parseStack");
|
||||
const _ReactDevOverlay = /*#__PURE__*/ _interop_require_default._(require("./ReactDevOverlay"));
|
||||
const _useerrorhandler = require("../internal/helpers/use-error-handler");
|
||||
const _runtimeerrorhandler = require("../internal/helpers/runtime-error-handler");
|
||||
const _usewebsocket = require("../internal/helpers/use-websocket");
|
||||
const _parsecomponentstack = require("../internal/helpers/parse-component-stack");
|
||||
const _hotreloadertypes = require("../../../../server/dev/hot-reloader-types");
|
||||
const _extractmodulesfromturbopackmessage = require("../../../../server/dev/extract-modules-from-turbopack-message");
|
||||
let mostRecentCompilationHash = null;
|
||||
let __nextDevClientId = Math.round(Math.random() * 100 + Date.now());
|
||||
let reloading = false;
|
||||
let startLatency = null;
|
||||
function onBeforeFastRefresh(dispatcher, hasUpdates) {
|
||||
if (hasUpdates) {
|
||||
dispatcher.onBeforeRefresh();
|
||||
}
|
||||
}
|
||||
function onFastRefresh(dispatcher, sendMessage, updatedModules) {
|
||||
dispatcher.onBuildOk();
|
||||
reportHmrLatency(sendMessage, updatedModules);
|
||||
dispatcher.onRefresh();
|
||||
}
|
||||
function reportHmrLatency(sendMessage, updatedModules) {
|
||||
if (!startLatency) return;
|
||||
let endLatency = Date.now();
|
||||
const latency = endLatency - startLatency;
|
||||
console.log("[Fast Refresh] done in " + latency + "ms");
|
||||
sendMessage(JSON.stringify({
|
||||
event: "client-hmr-latency",
|
||||
id: window.__nextDevClientId,
|
||||
startTime: startLatency,
|
||||
endTime: endLatency,
|
||||
page: window.location.pathname,
|
||||
updatedModules,
|
||||
// Whether the page (tab) was hidden at the time the event occurred.
|
||||
// This can impact the accuracy of the event's timing.
|
||||
isPageHidden: document.visibilityState === "hidden"
|
||||
}));
|
||||
}
|
||||
// There is a newer version of the code available.
|
||||
function handleAvailableHash(hash) {
|
||||
// Update last known compilation hash.
|
||||
mostRecentCompilationHash = hash;
|
||||
}
|
||||
/**
|
||||
* Is there a newer version of this code available?
|
||||
* For webpack: Check if the hash changed compared to __webpack_hash__
|
||||
* For Turbopack: Always true because it doesn't have __webpack_hash__
|
||||
*/ function isUpdateAvailable() {
|
||||
if (process.env.TURBOPACK) {
|
||||
return true;
|
||||
}
|
||||
/* globals __webpack_hash__ */ // __webpack_hash__ is the hash of the current compilation.
|
||||
// It's a global variable injected by Webpack.
|
||||
return mostRecentCompilationHash !== __webpack_hash__;
|
||||
}
|
||||
// Webpack disallows updates in other states.
|
||||
function canApplyUpdates() {
|
||||
// @ts-expect-error module.hot exists
|
||||
return module.hot.status() === "idle";
|
||||
}
|
||||
function afterApplyUpdates(fn) {
|
||||
if (canApplyUpdates()) {
|
||||
fn();
|
||||
} else {
|
||||
function handler(status) {
|
||||
if (status === "idle") {
|
||||
// @ts-expect-error module.hot exists
|
||||
module.hot.removeStatusHandler(handler);
|
||||
fn();
|
||||
}
|
||||
}
|
||||
// @ts-expect-error module.hot exists
|
||||
module.hot.addStatusHandler(handler);
|
||||
}
|
||||
}
|
||||
function performFullReload(err, sendMessage) {
|
||||
const stackTrace = err && (err.stack && err.stack.split("\n").slice(0, 5).join("\n") || err.message || err + "");
|
||||
sendMessage(JSON.stringify({
|
||||
event: "client-full-reload",
|
||||
stackTrace,
|
||||
hadRuntimeError: !!_runtimeerrorhandler.RuntimeErrorHandler.hadRuntimeError,
|
||||
dependencyChain: err ? err.dependencyChain : undefined
|
||||
}));
|
||||
if (reloading) return;
|
||||
reloading = true;
|
||||
window.location.reload();
|
||||
}
|
||||
// Attempt to update code on the fly, fall back to a hard reload.
|
||||
function tryApplyUpdates(onBeforeUpdate, onHotUpdateSuccess, sendMessage, dispatcher) {
|
||||
if (!isUpdateAvailable() || !canApplyUpdates()) {
|
||||
dispatcher.onBuildOk();
|
||||
return;
|
||||
}
|
||||
function handleApplyUpdates(err, updatedModules) {
|
||||
if (err || _runtimeerrorhandler.RuntimeErrorHandler.hadRuntimeError || !updatedModules) {
|
||||
if (err) {
|
||||
console.warn("[Fast Refresh] performing full reload\n\n" + "Fast Refresh will perform a full reload when you edit a file that's imported by modules outside of the React rendering tree.\n" + "You might have a file which exports a React component but also exports a value that is imported by a non-React component file.\n" + "Consider migrating the non-React component export to a separate file and importing it into both files.\n\n" + "It is also possible the parent component of the component you edited is a class component, which disables Fast Refresh.\n" + "Fast Refresh requires at least one parent function component in your React tree.");
|
||||
} else if (_runtimeerrorhandler.RuntimeErrorHandler.hadRuntimeError) {
|
||||
console.warn(_shared.REACT_REFRESH_FULL_RELOAD_FROM_ERROR);
|
||||
}
|
||||
performFullReload(err, sendMessage);
|
||||
return;
|
||||
}
|
||||
const hasUpdates = Boolean(updatedModules.length);
|
||||
if (typeof onHotUpdateSuccess === "function") {
|
||||
// Maybe we want to do something.
|
||||
onHotUpdateSuccess(updatedModules);
|
||||
}
|
||||
if (isUpdateAvailable()) {
|
||||
// While we were updating, there was a new update! Do it again.
|
||||
tryApplyUpdates(hasUpdates ? ()=>{} : onBeforeUpdate, hasUpdates ? ()=>dispatcher.onBuildOk() : onHotUpdateSuccess, sendMessage, dispatcher);
|
||||
} else {
|
||||
dispatcher.onBuildOk();
|
||||
if (process.env.__NEXT_TEST_MODE) {
|
||||
afterApplyUpdates(()=>{
|
||||
if (self.__NEXT_HMR_CB) {
|
||||
self.__NEXT_HMR_CB();
|
||||
self.__NEXT_HMR_CB = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
// https://webpack.js.org/api/hot-module-replacement/#check
|
||||
// @ts-expect-error module.hot exists
|
||||
module.hot.check(/* autoApply */ false).then((updatedModules)=>{
|
||||
if (!updatedModules) {
|
||||
return null;
|
||||
}
|
||||
if (typeof onBeforeUpdate === "function") {
|
||||
const hasUpdates = Boolean(updatedModules.length);
|
||||
onBeforeUpdate(hasUpdates);
|
||||
}
|
||||
// https://webpack.js.org/api/hot-module-replacement/#apply
|
||||
// @ts-expect-error module.hot exists
|
||||
return module.hot.apply();
|
||||
}).then((updatedModules)=>{
|
||||
handleApplyUpdates(null, updatedModules);
|
||||
}, (err)=>{
|
||||
handleApplyUpdates(err, null);
|
||||
});
|
||||
}
|
||||
/** Handles messages from the sevrer for the App Router. */ function processMessage(obj, sendMessage, processTurbopackMessage, router, dispatcher) {
|
||||
if (!("action" in obj)) {
|
||||
return;
|
||||
}
|
||||
function handleErrors(errors) {
|
||||
// "Massage" webpack messages.
|
||||
const formatted = (0, _formatwebpackmessages.default)({
|
||||
errors: errors,
|
||||
warnings: []
|
||||
});
|
||||
// Only show the first error.
|
||||
dispatcher.onBuildError(formatted.errors[0]);
|
||||
// Also log them to the console.
|
||||
for(let i = 0; i < formatted.errors.length; i++){
|
||||
console.error((0, _stripansi.default)(formatted.errors[i]));
|
||||
}
|
||||
// Do not attempt to reload now.
|
||||
// We will reload on next success instead.
|
||||
if (process.env.__NEXT_TEST_MODE) {
|
||||
if (self.__NEXT_HMR_CB) {
|
||||
self.__NEXT_HMR_CB(formatted.errors[0]);
|
||||
self.__NEXT_HMR_CB = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
function handleHotUpdate() {
|
||||
if (process.env.TURBOPACK) {
|
||||
dispatcher.onBuildOk();
|
||||
} else {
|
||||
tryApplyUpdates(function onBeforeHotUpdate(hasUpdates) {
|
||||
onBeforeFastRefresh(dispatcher, hasUpdates);
|
||||
}, function onSuccessfulHotUpdate(webpackUpdatedModules) {
|
||||
// Only dismiss it when we're sure it's a hot update.
|
||||
// Otherwise it would flicker right before the reload.
|
||||
onFastRefresh(dispatcher, sendMessage, webpackUpdatedModules);
|
||||
}, sendMessage, dispatcher);
|
||||
}
|
||||
}
|
||||
switch(obj.action){
|
||||
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.BUILDING:
|
||||
{
|
||||
startLatency = Date.now();
|
||||
console.log("[Fast Refresh] rebuilding");
|
||||
break;
|
||||
}
|
||||
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.BUILT:
|
||||
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.SYNC:
|
||||
{
|
||||
if (obj.hash) {
|
||||
handleAvailableHash(obj.hash);
|
||||
}
|
||||
const { errors, warnings } = obj;
|
||||
// Is undefined when it's a 'built' event
|
||||
if ("versionInfo" in obj) dispatcher.onVersionInfo(obj.versionInfo);
|
||||
const hasErrors = Boolean(errors && errors.length);
|
||||
// Compilation with errors (e.g. syntax error or missing modules).
|
||||
if (hasErrors) {
|
||||
sendMessage(JSON.stringify({
|
||||
event: "client-error",
|
||||
errorCount: errors.length,
|
||||
clientId: __nextDevClientId
|
||||
}));
|
||||
handleErrors(errors);
|
||||
return;
|
||||
}
|
||||
const hasWarnings = Boolean(warnings && warnings.length);
|
||||
if (hasWarnings) {
|
||||
sendMessage(JSON.stringify({
|
||||
event: "client-warning",
|
||||
warningCount: warnings.length,
|
||||
clientId: __nextDevClientId
|
||||
}));
|
||||
// Print warnings to the console.
|
||||
const formattedMessages = (0, _formatwebpackmessages.default)({
|
||||
warnings: warnings,
|
||||
errors: []
|
||||
});
|
||||
for(let i = 0; i < formattedMessages.warnings.length; i++){
|
||||
if (i === 5) {
|
||||
console.warn("There were more warnings in other files.\n" + "You can find a complete log in the terminal.");
|
||||
break;
|
||||
}
|
||||
console.warn((0, _stripansi.default)(formattedMessages.warnings[i]));
|
||||
}
|
||||
// No early return here as we need to apply modules in the same way between warnings only and compiles without warnings
|
||||
}
|
||||
sendMessage(JSON.stringify({
|
||||
event: "client-success",
|
||||
clientId: __nextDevClientId
|
||||
}));
|
||||
if (obj.action === _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.BUILT) {
|
||||
// Handle hot updates
|
||||
handleHotUpdate();
|
||||
}
|
||||
return;
|
||||
}
|
||||
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.TURBOPACK_CONNECTED:
|
||||
{
|
||||
processTurbopackMessage({
|
||||
type: _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.TURBOPACK_CONNECTED
|
||||
});
|
||||
break;
|
||||
}
|
||||
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.TURBOPACK_MESSAGE:
|
||||
{
|
||||
const updatedModules = (0, _extractmodulesfromturbopackmessage.extractModulesFromTurbopackMessage)(obj.data);
|
||||
dispatcher.onBeforeRefresh();
|
||||
processTurbopackMessage({
|
||||
type: _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.TURBOPACK_MESSAGE,
|
||||
data: obj.data
|
||||
});
|
||||
dispatcher.onRefresh();
|
||||
if (_runtimeerrorhandler.RuntimeErrorHandler.hadRuntimeError) {
|
||||
console.warn(_shared.REACT_REFRESH_FULL_RELOAD_FROM_ERROR);
|
||||
performFullReload(null, sendMessage);
|
||||
}
|
||||
reportHmrLatency(sendMessage, updatedModules);
|
||||
break;
|
||||
}
|
||||
// TODO-APP: make server component change more granular
|
||||
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.SERVER_COMPONENT_CHANGES:
|
||||
{
|
||||
sendMessage(JSON.stringify({
|
||||
event: "server-component-reload-page",
|
||||
clientId: __nextDevClientId
|
||||
}));
|
||||
if (_runtimeerrorhandler.RuntimeErrorHandler.hadRuntimeError) {
|
||||
if (reloading) return;
|
||||
reloading = true;
|
||||
return window.location.reload();
|
||||
}
|
||||
(0, _react.startTransition)(()=>{
|
||||
router.fastRefresh();
|
||||
dispatcher.onRefresh();
|
||||
});
|
||||
if (process.env.__NEXT_TEST_MODE) {
|
||||
if (self.__NEXT_HMR_CB) {
|
||||
self.__NEXT_HMR_CB();
|
||||
self.__NEXT_HMR_CB = null;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.RELOAD_PAGE:
|
||||
{
|
||||
sendMessage(JSON.stringify({
|
||||
event: "client-reload-page",
|
||||
clientId: __nextDevClientId
|
||||
}));
|
||||
if (reloading) return;
|
||||
reloading = true;
|
||||
return window.location.reload();
|
||||
}
|
||||
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.ADDED_PAGE:
|
||||
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.REMOVED_PAGE:
|
||||
{
|
||||
// TODO-APP: potentially only refresh if the currently viewed page was added/removed.
|
||||
return router.fastRefresh();
|
||||
}
|
||||
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.SERVER_ERROR:
|
||||
{
|
||||
const { errorJSON } = obj;
|
||||
if (errorJSON) {
|
||||
const { message, stack } = JSON.parse(errorJSON);
|
||||
const error = new Error(message);
|
||||
error.stack = stack;
|
||||
handleErrors([
|
||||
error
|
||||
]);
|
||||
}
|
||||
return;
|
||||
}
|
||||
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.DEV_PAGES_MANIFEST_UPDATE:
|
||||
{
|
||||
return;
|
||||
}
|
||||
default:
|
||||
{}
|
||||
}
|
||||
}
|
||||
function HotReload(param) {
|
||||
let { assetPrefix, children } = param;
|
||||
const [state, dispatch] = (0, _shared.useErrorOverlayReducer)();
|
||||
const dispatcher = (0, _react.useMemo)(()=>{
|
||||
return {
|
||||
onBuildOk () {
|
||||
dispatch({
|
||||
type: _shared.ACTION_BUILD_OK
|
||||
});
|
||||
},
|
||||
onBuildError (message) {
|
||||
dispatch({
|
||||
type: _shared.ACTION_BUILD_ERROR,
|
||||
message
|
||||
});
|
||||
},
|
||||
onBeforeRefresh () {
|
||||
dispatch({
|
||||
type: _shared.ACTION_BEFORE_REFRESH
|
||||
});
|
||||
},
|
||||
onRefresh () {
|
||||
dispatch({
|
||||
type: _shared.ACTION_REFRESH
|
||||
});
|
||||
},
|
||||
onVersionInfo (versionInfo) {
|
||||
dispatch({
|
||||
type: _shared.ACTION_VERSION_INFO,
|
||||
versionInfo
|
||||
});
|
||||
}
|
||||
};
|
||||
}, [
|
||||
dispatch
|
||||
]);
|
||||
const handleOnUnhandledError = (0, _react.useCallback)((error)=>{
|
||||
const errorDetails = error.details;
|
||||
// Component stack is added to the error in use-error-handler in case there was a hydration errror
|
||||
const componentStack = errorDetails == null ? void 0 : errorDetails.componentStack;
|
||||
const warning = errorDetails == null ? void 0 : errorDetails.warning;
|
||||
dispatch({
|
||||
type: _shared.ACTION_UNHANDLED_ERROR,
|
||||
reason: error,
|
||||
frames: (0, _parseStack.parseStack)(error.stack),
|
||||
componentStackFrames: componentStack ? (0, _parsecomponentstack.parseComponentStack)(componentStack) : undefined,
|
||||
warning
|
||||
});
|
||||
}, [
|
||||
dispatch
|
||||
]);
|
||||
const handleOnUnhandledRejection = (0, _react.useCallback)((reason)=>{
|
||||
dispatch({
|
||||
type: _shared.ACTION_UNHANDLED_REJECTION,
|
||||
reason: reason,
|
||||
frames: (0, _parseStack.parseStack)(reason.stack)
|
||||
});
|
||||
}, [
|
||||
dispatch
|
||||
]);
|
||||
const handleOnReactError = (0, _react.useCallback)(()=>{
|
||||
_runtimeerrorhandler.RuntimeErrorHandler.hadRuntimeError = true;
|
||||
}, []);
|
||||
(0, _useerrorhandler.useErrorHandler)(handleOnUnhandledError, handleOnUnhandledRejection);
|
||||
const webSocketRef = (0, _usewebsocket.useWebsocket)(assetPrefix);
|
||||
(0, _usewebsocket.useWebsocketPing)(webSocketRef);
|
||||
const sendMessage = (0, _usewebsocket.useSendMessage)(webSocketRef);
|
||||
const processTurbopackMessage = (0, _usewebsocket.useTurbopack)(sendMessage, (err)=>performFullReload(err, sendMessage));
|
||||
const router = (0, _navigation.useRouter)();
|
||||
(0, _react.useEffect)(()=>{
|
||||
const websocket = webSocketRef.current;
|
||||
if (!websocket) return;
|
||||
const handler = (event)=>{
|
||||
try {
|
||||
const obj = JSON.parse(event.data);
|
||||
processMessage(obj, sendMessage, processTurbopackMessage, router, dispatcher);
|
||||
} catch (err) {
|
||||
var _err_stack;
|
||||
console.warn("[HMR] Invalid message: " + event.data + "\n" + ((_err_stack = err == null ? void 0 : err.stack) != null ? _err_stack : ""));
|
||||
}
|
||||
};
|
||||
websocket.addEventListener("message", handler);
|
||||
return ()=>websocket.removeEventListener("message", handler);
|
||||
}, [
|
||||
sendMessage,
|
||||
router,
|
||||
webSocketRef,
|
||||
dispatcher,
|
||||
processTurbopackMessage
|
||||
]);
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_ReactDevOverlay.default, {
|
||||
onReactError: handleOnReactError,
|
||||
state: state,
|
||||
children: children
|
||||
});
|
||||
}
|
||||
|
||||
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=hot-reloader-client.js.map
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/app/hot-reloader-client.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/app/hot-reloader-client.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
7
node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/CodeFrame.d.ts
generated
vendored
Normal file
7
node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/CodeFrame.d.ts
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import type { StackFrame } from 'next/dist/compiled/stacktrace-parser';
|
||||
export type CodeFrameProps = {
|
||||
stackFrame: StackFrame;
|
||||
codeFrame: string;
|
||||
};
|
||||
export declare const CodeFrame: React.FC<CodeFrameProps>;
|
||||
120
node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/CodeFrame.js
generated
vendored
Normal file
120
node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/CodeFrame.js
generated
vendored
Normal file
@ -0,0 +1,120 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "CodeFrame", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return CodeFrame;
|
||||
}
|
||||
});
|
||||
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
||||
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
||||
const _jsxruntime = require("react/jsx-runtime");
|
||||
const _anser = /*#__PURE__*/ _interop_require_default._(require("next/dist/compiled/anser"));
|
||||
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
||||
const _stripansi = /*#__PURE__*/ _interop_require_default._(require("next/dist/compiled/strip-ansi"));
|
||||
const _stackframe = require("../../helpers/stack-frame");
|
||||
const _useopenineditor = require("../../helpers/use-open-in-editor");
|
||||
const _hotlinkedtext = require("../hot-linked-text");
|
||||
const CodeFrame = function CodeFrame(param) {
|
||||
let { stackFrame, codeFrame } = param;
|
||||
// Strip leading spaces out of the code frame:
|
||||
const formattedFrame = _react.useMemo(()=>{
|
||||
const lines = codeFrame.split(/\r?\n/g);
|
||||
// Find the minimum length of leading spaces after `|` in the code frame
|
||||
const miniLeadingSpacesLength = lines.map((line)=>/^>? +\d+ +\| [ ]+/.exec((0, _stripansi.default)(line)) === null ? null : /^>? +\d+ +\| ( *)/.exec((0, _stripansi.default)(line))).filter(Boolean).map((v)=>v.pop()).reduce((c, n)=>isNaN(c) ? n.length : Math.min(c, n.length), NaN);
|
||||
// When the minimum length of leading spaces is greater than 1, remove them
|
||||
// from the code frame to help the indentation looks better when there's a lot leading spaces.
|
||||
if (miniLeadingSpacesLength > 1) {
|
||||
return lines.map((line, a)=>~(a = line.indexOf("|")) ? line.substring(0, a) + line.substring(a).replace("^\\ {" + miniLeadingSpacesLength + "}", "") : line).join("\n");
|
||||
}
|
||||
return lines.join("\n");
|
||||
}, [
|
||||
codeFrame
|
||||
]);
|
||||
const decoded = _react.useMemo(()=>{
|
||||
return _anser.default.ansiToJson(formattedFrame, {
|
||||
json: true,
|
||||
use_classes: true,
|
||||
remove_empty: true
|
||||
});
|
||||
}, [
|
||||
formattedFrame
|
||||
]);
|
||||
const open = (0, _useopenineditor.useOpenInEditor)({
|
||||
file: stackFrame.file,
|
||||
lineNumber: stackFrame.lineNumber,
|
||||
column: stackFrame.column
|
||||
});
|
||||
// TODO: make the caret absolute
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
||||
"data-nextjs-codeframe": true,
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("p", {
|
||||
role: "link",
|
||||
onClick: open,
|
||||
tabIndex: 1,
|
||||
title: "Click to open in your editor",
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsxs)("span", {
|
||||
children: [
|
||||
(0, _stackframe.getFrameSource)(stackFrame),
|
||||
" @",
|
||||
" ",
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)(_hotlinkedtext.HotlinkedText, {
|
||||
text: stackFrame.methodName
|
||||
})
|
||||
]
|
||||
}),
|
||||
/*#__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"
|
||||
})
|
||||
]
|
||||
})
|
||||
]
|
||||
})
|
||||
}),
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("pre", {
|
||||
children: decoded.map((entry, index)=>/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
|
||||
style: {
|
||||
color: entry.fg ? "var(--color-" + entry.fg + ")" : undefined,
|
||||
...entry.decoration === "bold" ? {
|
||||
fontWeight: 800
|
||||
} : entry.decoration === "italic" ? {
|
||||
fontStyle: "italic"
|
||||
} : undefined
|
||||
},
|
||||
children: entry.content
|
||||
}, "frame-" + index))
|
||||
})
|
||||
]
|
||||
});
|
||||
};
|
||||
|
||||
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=CodeFrame.js.map
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/CodeFrame.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/CodeFrame.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/CodeFrame/CodeFrame.tsx"],"names":["CodeFrame","stackFrame","codeFrame","formattedFrame","React","useMemo","lines","split","miniLeadingSpacesLength","map","line","exec","stripAnsi","filter","Boolean","v","pop","reduce","c","n","isNaN","length","Math","min","NaN","a","indexOf","substring","replace","join","decoded","Anser","ansiToJson","json","use_classes","remove_empty","open","useOpenInEditor","file","lineNumber","column","div","data-nextjs-codeframe","p","role","onClick","tabIndex","title","span","getFrameSource","HotlinkedText","text","methodName","svg","xmlns","viewBox","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin","path","d","polyline","points","x1","y1","x2","y2","pre","entry","index","style","color","fg","undefined","decoration","fontWeight","fontStyle","content"],"mappings":";;;;+BAUaA;;;eAAAA;;;;;;gEAVK;iEACK;oEAED;4BACS;iCACC;+BACF;AAIvB,MAAMA,YAAsC,SAASA,UAAU,KAGrE;IAHqE,IAAA,EACpEC,UAAU,EACVC,SAAS,EACV,GAHqE;IAIpE,8CAA8C;IAC9C,MAAMC,iBAAiBC,OAAMC,OAAO,CAAS;QAC3C,MAAMC,QAAQJ,UAAUK,KAAK,CAAC;QAE9B,wEAAwE;QACxE,MAAMC,0BAA0BF,MAC7BG,GAAG,CAAC,CAACC,OACJ,oBAAoBC,IAAI,CAACC,IAAAA,kBAAS,EAACF,WAAW,OAC1C,OACA,oBAAoBC,IAAI,CAACC,IAAAA,kBAAS,EAACF,QAExCG,MAAM,CAACC,SACPL,GAAG,CAAC,CAACM,IAAMA,EAAGC,GAAG,IACjBC,MAAM,CAAC,CAACC,GAAGC,IAAOC,MAAMF,KAAKC,EAAEE,MAAM,GAAGC,KAAKC,GAAG,CAACL,GAAGC,EAAEE,MAAM,GAAIG;QAEnE,2EAA2E;QAC3E,8FAA8F;QAC9F,IAAIhB,0BAA0B,GAAG;YAC/B,OAAOF,MACJG,GAAG,CAAC,CAACC,MAAMe,IACV,CAAEA,CAAAA,IAAIf,KAAKgB,OAAO,CAAC,IAAG,IAClBhB,KAAKiB,SAAS,CAAC,GAAGF,KAClBf,KAAKiB,SAAS,CAACF,GAAGG,OAAO,CAAC,AAAC,UAAOpB,0BAAwB,KAAI,MAC9DE,MAELmB,IAAI,CAAC;QACV;QACA,OAAOvB,MAAMuB,IAAI,CAAC;IACpB,GAAG;QAAC3B;KAAU;IAEd,MAAM4B,UAAU1B,OAAMC,OAAO,CAAC;QAC5B,OAAO0B,cAAK,CAACC,UAAU,CAAC7B,gBAAgB;YACtC8B,MAAM;YACNC,aAAa;YACbC,cAAc;QAChB;IACF,GAAG;QAAChC;KAAe;IAEnB,MAAMiC,OAAOC,IAAAA,gCAAe,EAAC;QAC3BC,MAAMrC,WAAWqC,IAAI;QACrBC,YAAYtC,WAAWsC,UAAU;QACjCC,QAAQvC,WAAWuC,MAAM;IAC3B;IAEA,gCAAgC;IAChC,qBACE,sBAACC;QAAIC,uBAAqB;;0BACxB,qBAACD;0BACC,cAAA,sBAACE;oBACCC,MAAK;oBACLC,SAAST;oBACTU,UAAU;oBACVC,OAAM;;sCAEN,sBAACC;;gCACEC,IAAAA,0BAAc,EAAChD;gCAAY;gCAAG;8CAC/B,qBAACiD,4BAAa;oCAACC,MAAMlD,WAAWmD,UAAU;;;;sCAE5C,sBAACC;4BACCC,OAAM;4BACNC,SAAQ;4BACRC,MAAK;4BACLC,QAAO;4BACPC,aAAY;4BACZC,eAAc;4BACdC,gBAAe;;8CAEf,qBAACC;oCAAKC,GAAE;;8CACR,qBAACC;oCAASC,QAAO;;8CACjB,qBAACtD;oCAAKuD,IAAG;oCAAKC,IAAG;oCAAKC,IAAG;oCAAKC,IAAG;;;;;;;0BAIvC,qBAACC;0BACEvC,QAAQrB,GAAG,CAAC,CAAC6D,OAAOC,sBACnB,qBAACvB;wBAECwB,OAAO;4BACLC,OAAOH,MAAMI,EAAE,GAAG,AAAC,iBAAcJ,MAAMI,EAAE,GAAC,MAAKC;4BAC/C,GAAIL,MAAMM,UAAU,KAAK,SACrB;gCAAEC,YAAY;4BAAI,IAClBP,MAAMM,UAAU,KAAK,WACrB;gCAAEE,WAAW;4BAAS,IACtBH,SAAS;wBACf;kCAECL,MAAMS,OAAO;uBAVT,AAAC,WAAQR;;;;AAgB1B"}
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/index.d.ts
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/index.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export { CodeFrame } from './CodeFrame';
|
||||
19
node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/index.js
generated
vendored
Normal file
19
node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/index.js
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "CodeFrame", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return _CodeFrame.CodeFrame;
|
||||
}
|
||||
});
|
||||
const _CodeFrame = require("./CodeFrame");
|
||||
|
||||
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
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/index.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/CodeFrame/index.tsx"],"names":["CodeFrame"],"mappings":";;;;+BAASA;;;eAAAA,oBAAS;;;2BAAQ"}
|
||||
2
node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/styles.d.ts
generated
vendored
Normal file
2
node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/styles.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
declare const styles: string;
|
||||
export { styles };
|
||||
30
node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/styles.js
generated
vendored
Normal file
30
node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/styles.js
generated
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "styles", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return styles;
|
||||
}
|
||||
});
|
||||
const _tagged_template_literal_loose = require("@swc/helpers/_/_tagged_template_literal_loose");
|
||||
const _nooptemplate = require("../../helpers/noop-template");
|
||||
function _templateObject() {
|
||||
const data = _tagged_template_literal_loose._([
|
||||
"\n [data-nextjs-codeframe] {\n overflow: auto;\n border-radius: var(--size-gap-half);\n background-color: var(--color-ansi-bg);\n color: var(--color-ansi-fg);\n }\n [data-nextjs-codeframe]::selection,\n [data-nextjs-codeframe] *::selection {\n background-color: var(--color-ansi-selection);\n }\n [data-nextjs-codeframe] * {\n color: inherit;\n background-color: transparent;\n font-family: var(--font-stack-monospace);\n }\n\n [data-nextjs-codeframe] > * {\n margin: 0;\n padding: calc(var(--size-gap) + var(--size-gap-half))\n calc(var(--size-gap-double) + var(--size-gap-half));\n }\n [data-nextjs-codeframe] > div {\n display: inline-block;\n width: auto;\n min-width: 100%;\n border-bottom: 1px solid var(--color-ansi-bright-black);\n }\n [data-nextjs-codeframe] > div > p {\n display: flex;\n align-items: center;\n justify-content: space-between;\n cursor: pointer;\n margin: 0;\n }\n [data-nextjs-codeframe] > div > p:hover {\n text-decoration: underline dotted;\n }\n [data-nextjs-codeframe] div > p > svg {\n width: auto;\n height: 1em;\n margin-left: 8px;\n }\n [data-nextjs-codeframe] div > pre {\n overflow: hidden;\n display: inline-block;\n }\n"
|
||||
]);
|
||||
_templateObject = function() {
|
||||
return data;
|
||||
};
|
||||
return data;
|
||||
}
|
||||
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=styles.js.map
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/styles.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/CodeFrame/styles.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/CodeFrame/styles.tsx"],"names":["styles","css"],"mappings":";;;;+BAmDSA;;;eAAAA;;;;8BAnDmB;;;;;;;;;;AAE5B,MAAMA,aAASC,kBAAG"}
|
||||
10
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/Dialog.d.ts
generated
vendored
Normal file
10
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/Dialog.d.ts
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import * as React from 'react';
|
||||
export type DialogProps = {
|
||||
children?: React.ReactNode;
|
||||
type: 'error' | 'warning';
|
||||
'aria-labelledby': string;
|
||||
'aria-describedby': string;
|
||||
onClose?: () => void;
|
||||
};
|
||||
declare const Dialog: React.FC<DialogProps>;
|
||||
export { Dialog };
|
||||
86
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/Dialog.js
generated
vendored
Normal file
86
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/Dialog.js
generated
vendored
Normal file
@ -0,0 +1,86 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "Dialog", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return Dialog;
|
||||
}
|
||||
});
|
||||
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 _useonclickoutside = require("../../hooks/use-on-click-outside");
|
||||
const Dialog = function Dialog(param) {
|
||||
let { children, type, onClose, ...props } = param;
|
||||
const [dialog, setDialog] = _react.useState(null);
|
||||
const [role, setRole] = _react.useState(typeof document !== "undefined" && document.hasFocus() ? "dialog" : undefined);
|
||||
const onDialog = _react.useCallback((node)=>{
|
||||
setDialog(node);
|
||||
}, []);
|
||||
(0, _useonclickoutside.useOnClickOutside)(dialog, (e)=>{
|
||||
e.preventDefault();
|
||||
return onClose == null ? void 0 : onClose();
|
||||
});
|
||||
// Make HTMLElements with `role=link` accessible to be triggered by the
|
||||
// keyboard, i.e. [Enter].
|
||||
_react.useEffect(()=>{
|
||||
if (dialog == null) {
|
||||
return;
|
||||
}
|
||||
const root = dialog.getRootNode();
|
||||
// Always true, but we do this for TypeScript:
|
||||
if (!(root instanceof ShadowRoot)) {
|
||||
return;
|
||||
}
|
||||
const shadowRoot = root;
|
||||
function handler(e) {
|
||||
const el = shadowRoot.activeElement;
|
||||
if (e.key === "Enter" && el instanceof HTMLElement && el.getAttribute("role") === "link") {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
el.click();
|
||||
}
|
||||
}
|
||||
function handleFocus() {
|
||||
// safari will force itself as the active application when a background page triggers any sort of autofocus
|
||||
// this is a workaround to only set the dialog role if the document has focus
|
||||
setRole(document.hasFocus() ? "dialog" : undefined);
|
||||
}
|
||||
shadowRoot.addEventListener("keydown", handler);
|
||||
window.addEventListener("focus", handleFocus);
|
||||
window.addEventListener("blur", handleFocus);
|
||||
return ()=>{
|
||||
shadowRoot.removeEventListener("keydown", handler);
|
||||
window.removeEventListener("focus", handleFocus);
|
||||
window.removeEventListener("blur", handleFocus);
|
||||
};
|
||||
}, [
|
||||
dialog
|
||||
]);
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
||||
ref: onDialog,
|
||||
"data-nextjs-dialog": true,
|
||||
tabIndex: -1,
|
||||
role: role,
|
||||
"aria-labelledby": props["aria-labelledby"],
|
||||
"aria-describedby": props["aria-describedby"],
|
||||
"aria-modal": "true",
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
||||
"data-nextjs-dialog-banner": true,
|
||||
className: "banner-" + type
|
||||
}),
|
||||
children
|
||||
]
|
||||
});
|
||||
};
|
||||
|
||||
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=Dialog.js.map
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/Dialog.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/Dialog.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/Dialog/Dialog.tsx"],"names":["Dialog","children","type","onClose","props","dialog","setDialog","React","useState","role","setRole","document","hasFocus","undefined","onDialog","useCallback","node","useOnClickOutside","e","preventDefault","useEffect","root","getRootNode","ShadowRoot","shadowRoot","handler","el","activeElement","key","HTMLElement","getAttribute","stopPropagation","click","handleFocus","addEventListener","window","removeEventListener","div","ref","data-nextjs-dialog","tabIndex","aria-labelledby","aria-describedby","aria-modal","data-nextjs-dialog-banner","className"],"mappings":";;;;+BA0FSA;;;eAAAA;;;;;iEA1Fc;mCACW;AAUlC,MAAMA,SAAgC,SAASA,OAAO,KAKrD;IALqD,IAAA,EACpDC,QAAQ,EACRC,IAAI,EACJC,OAAO,EACP,GAAGC,OACJ,GALqD;IAMpD,MAAM,CAACC,QAAQC,UAAU,GAAGC,OAAMC,QAAQ,CAAwB;IAClE,MAAM,CAACC,MAAMC,QAAQ,GAAGH,OAAMC,QAAQ,CACpC,OAAOG,aAAa,eAAeA,SAASC,QAAQ,KAChD,WACAC;IAEN,MAAMC,WAAWP,OAAMQ,WAAW,CAAC,CAACC;QAClCV,UAAUU;IACZ,GAAG,EAAE;IACLC,IAAAA,oCAAiB,EAACZ,QAAQ,CAACa;QACzBA,EAAEC,cAAc;QAChB,OAAOhB,2BAAAA;IACT;IAEA,uEAAuE;IACvE,0BAA0B;IAC1BI,OAAMa,SAAS,CAAC;QACd,IAAIf,UAAU,MAAM;YAClB;QACF;QAEA,MAAMgB,OAAOhB,OAAOiB,WAAW;QAC/B,8CAA8C;QAC9C,IAAI,CAAED,CAAAA,gBAAgBE,UAAS,GAAI;YACjC;QACF;QACA,MAAMC,aAAaH;QACnB,SAASI,QAAQP,CAAgB;YAC/B,MAAMQ,KAAKF,WAAWG,aAAa;YACnC,IACET,EAAEU,GAAG,KAAK,WACVF,cAAcG,eACdH,GAAGI,YAAY,CAAC,YAAY,QAC5B;gBACAZ,EAAEC,cAAc;gBAChBD,EAAEa,eAAe;gBAEjBL,GAAGM,KAAK;YACV;QACF;QAEA,SAASC;YACP,2GAA2G;YAC3G,6EAA6E;YAC7EvB,QAAQC,SAASC,QAAQ,KAAK,WAAWC;QAC3C;QAEAW,WAAWU,gBAAgB,CAAC,WAAWT;QACvCU,OAAOD,gBAAgB,CAAC,SAASD;QACjCE,OAAOD,gBAAgB,CAAC,QAAQD;QAChC,OAAO;YACLT,WAAWY,mBAAmB,CAAC,WAAWX;YAC1CU,OAAOC,mBAAmB,CAAC,SAASH;YACpCE,OAAOC,mBAAmB,CAAC,QAAQH;QACrC;IACF,GAAG;QAAC5B;KAAO;IAEX,qBACE,sBAACgC;QACCC,KAAKxB;QACLyB,oBAAkB;QAClBC,UAAU,CAAC;QACX/B,MAAMA;QACNgC,mBAAiBrC,KAAK,CAAC,kBAAkB;QACzCsC,oBAAkBtC,KAAK,CAAC,mBAAmB;QAC3CuC,cAAW;;0BAEX,qBAACN;gBAAIO,2BAAyB;gBAACC,WAAW,AAAC,YAAS3C;;YACnDD;;;AAGP"}
|
||||
7
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogBody.d.ts
generated
vendored
Normal file
7
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogBody.d.ts
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
import * as React from 'react';
|
||||
export type DialogBodyProps = {
|
||||
children?: React.ReactNode;
|
||||
className?: string;
|
||||
};
|
||||
declare const DialogBody: React.FC<DialogBodyProps>;
|
||||
export { DialogBody };
|
||||
29
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogBody.js
generated
vendored
Normal file
29
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogBody.js
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "DialogBody", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return DialogBody;
|
||||
}
|
||||
});
|
||||
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 DialogBody = function DialogBody(param) {
|
||||
let { children, className } = param;
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
||||
"data-nextjs-dialog-body": true,
|
||||
className: className,
|
||||
children: children
|
||||
});
|
||||
};
|
||||
|
||||
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=DialogBody.js.map
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogBody.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogBody.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/Dialog/DialogBody.tsx"],"names":["DialogBody","children","className","div","data-nextjs-dialog-body"],"mappings":";;;;+BAkBSA;;;eAAAA;;;;;iEAlBc;AAOvB,MAAMA,aAAwC,SAASA,WAAW,KAGjE;IAHiE,IAAA,EAChEC,QAAQ,EACRC,SAAS,EACV,GAHiE;IAIhE,qBACE,qBAACC;QAAIC,yBAAuB;QAACF,WAAWA;kBACrCD;;AAGP"}
|
||||
7
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogContent.d.ts
generated
vendored
Normal file
7
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogContent.d.ts
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
import * as React from 'react';
|
||||
export type DialogContentProps = {
|
||||
children?: React.ReactNode;
|
||||
className?: string;
|
||||
};
|
||||
declare const DialogContent: React.FC<DialogContentProps>;
|
||||
export { DialogContent };
|
||||
29
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogContent.js
generated
vendored
Normal file
29
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogContent.js
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "DialogContent", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return DialogContent;
|
||||
}
|
||||
});
|
||||
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 DialogContent = function DialogContent(param) {
|
||||
let { children, className } = param;
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
||||
"data-nextjs-dialog-content": true,
|
||||
className: className,
|
||||
children: children
|
||||
});
|
||||
};
|
||||
|
||||
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=DialogContent.js.map
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogContent.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogContent.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/Dialog/DialogContent.tsx"],"names":["DialogContent","children","className","div","data-nextjs-dialog-content"],"mappings":";;;;+BAkBSA;;;eAAAA;;;;;iEAlBc;AAOvB,MAAMA,gBAA8C,SAASA,cAAc,KAG1E;IAH0E,IAAA,EACzEC,QAAQ,EACRC,SAAS,EACV,GAH0E;IAIzE,qBACE,qBAACC;QAAIC,4BAA0B;QAACF,WAAWA;kBACxCD;;AAGP"}
|
||||
7
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogHeader.d.ts
generated
vendored
Normal file
7
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogHeader.d.ts
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
import * as React from 'react';
|
||||
export type DialogHeaderProps = {
|
||||
children?: React.ReactNode;
|
||||
className?: string;
|
||||
};
|
||||
declare const DialogHeader: React.FC<DialogHeaderProps>;
|
||||
export { DialogHeader };
|
||||
29
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogHeader.js
generated
vendored
Normal file
29
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogHeader.js
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "DialogHeader", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return DialogHeader;
|
||||
}
|
||||
});
|
||||
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 DialogHeader = function DialogHeader(param) {
|
||||
let { children, className } = param;
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
||||
"data-nextjs-dialog-header": true,
|
||||
className: className,
|
||||
children: children
|
||||
});
|
||||
};
|
||||
|
||||
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=DialogHeader.js.map
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogHeader.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/DialogHeader.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/Dialog/DialogHeader.tsx"],"names":["DialogHeader","children","className","div","data-nextjs-dialog-header"],"mappings":";;;;+BAkBSA;;;eAAAA;;;;;iEAlBc;AAOvB,MAAMA,eAA4C,SAASA,aAAa,KAGvE;IAHuE,IAAA,EACtEC,QAAQ,EACRC,SAAS,EACV,GAHuE;IAItE,qBACE,qBAACC;QAAIC,2BAAyB;QAACF,WAAWA;kBACvCD;;AAGP"}
|
||||
5
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/index.d.ts
generated
vendored
Normal file
5
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
export { Dialog } from './Dialog';
|
||||
export { DialogBody } from './DialogBody';
|
||||
export { DialogContent } from './DialogContent';
|
||||
export { DialogHeader } from './DialogHeader';
|
||||
export { styles } from './styles';
|
||||
47
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/index.js
generated
vendored
Normal file
47
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/index.js
generated
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
Dialog: null,
|
||||
DialogBody: null,
|
||||
DialogContent: null,
|
||||
DialogHeader: null,
|
||||
styles: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
Dialog: function() {
|
||||
return _Dialog.Dialog;
|
||||
},
|
||||
DialogBody: function() {
|
||||
return _DialogBody.DialogBody;
|
||||
},
|
||||
DialogContent: function() {
|
||||
return _DialogContent.DialogContent;
|
||||
},
|
||||
DialogHeader: function() {
|
||||
return _DialogHeader.DialogHeader;
|
||||
},
|
||||
styles: function() {
|
||||
return _styles.styles;
|
||||
}
|
||||
});
|
||||
const _Dialog = require("./Dialog");
|
||||
const _DialogBody = require("./DialogBody");
|
||||
const _DialogContent = require("./DialogContent");
|
||||
const _DialogHeader = require("./DialogHeader");
|
||||
const _styles = require("./styles");
|
||||
|
||||
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
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/index.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/Dialog/index.ts"],"names":["Dialog","DialogBody","DialogContent","DialogHeader","styles"],"mappings":";;;;;;;;;;;;;;;;;;IAASA,MAAM;eAANA,cAAM;;IACNC,UAAU;eAAVA,sBAAU;;IACVC,aAAa;eAAbA,4BAAa;;IACbC,YAAY;eAAZA,0BAAY;;IACZC,MAAM;eAANA,cAAM;;;wBAJQ;4BACI;+BACG;8BACD;wBACN"}
|
||||
2
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/styles.d.ts
generated
vendored
Normal file
2
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/styles.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
declare const styles: string;
|
||||
export { styles };
|
||||
30
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/styles.js
generated
vendored
Normal file
30
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/styles.js
generated
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "styles", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return styles;
|
||||
}
|
||||
});
|
||||
const _tagged_template_literal_loose = require("@swc/helpers/_/_tagged_template_literal_loose");
|
||||
const _nooptemplate = require("../../helpers/noop-template");
|
||||
function _templateObject() {
|
||||
const data = _tagged_template_literal_loose._([
|
||||
"\n [data-nextjs-dialog] {\n display: flex;\n flex-direction: column;\n width: 100%;\n margin-right: auto;\n margin-left: auto;\n outline: none;\n background: var(--color-background);\n border-radius: var(--size-gap);\n box-shadow: 0 var(--size-gap-half) var(--size-gap-double)\n rgba(0, 0, 0, 0.25);\n max-height: calc(100% - 56px);\n overflow-y: hidden;\n }\n\n @media (max-height: 812px) {\n [data-nextjs-dialog-overlay] {\n max-height: calc(100% - 15px);\n }\n }\n\n @media (min-width: 576px) {\n [data-nextjs-dialog] {\n max-width: 540px;\n box-shadow: 0 var(--size-gap) var(--size-gap-quad) rgba(0, 0, 0, 0.25);\n }\n }\n\n @media (min-width: 768px) {\n [data-nextjs-dialog] {\n max-width: 720px;\n }\n }\n\n @media (min-width: 992px) {\n [data-nextjs-dialog] {\n max-width: 960px;\n }\n }\n\n [data-nextjs-dialog-banner] {\n position: relative;\n }\n [data-nextjs-dialog-banner].banner-warning {\n border-color: var(--color-ansi-yellow);\n }\n [data-nextjs-dialog-banner].banner-error {\n border-color: var(--color-ansi-red);\n }\n\n [data-nextjs-dialog-banner]::after {\n z-index: 2;\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n width: 100%;\n /* banner width: */\n border-top-width: var(--size-gap-half);\n border-bottom-width: 0;\n border-top-style: solid;\n border-bottom-style: solid;\n border-top-color: inherit;\n border-bottom-color: transparent;\n }\n\n [data-nextjs-dialog-content] {\n overflow-y: auto;\n border: none;\n margin: 0;\n /* calc(padding + banner width offset) */\n padding: calc(var(--size-gap-double) + var(--size-gap-half))\n var(--size-gap-double);\n height: 100%;\n display: flex;\n flex-direction: column;\n }\n [data-nextjs-dialog-content] > [data-nextjs-dialog-header] {\n flex-shrink: 0;\n margin-bottom: var(--size-gap-double);\n }\n [data-nextjs-dialog-content] > [data-nextjs-dialog-body] {\n position: relative;\n flex: 1 1 auto;\n }\n"
|
||||
]);
|
||||
_templateObject = function() {
|
||||
return data;
|
||||
};
|
||||
return data;
|
||||
}
|
||||
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=styles.js.map
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/styles.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Dialog/styles.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/Dialog/styles.ts"],"names":["styles","css"],"mappings":";;;;+BA0FSA;;;eAAAA;;;;8BA1FmB;;;;;;;;;;AAE5B,MAAMA,aAASC,kBAAG"}
|
||||
10
node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/LeftRightDialogHeader.d.ts
generated
vendored
Normal file
10
node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/LeftRightDialogHeader.d.ts
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import * as React from 'react';
|
||||
export type LeftRightDialogHeaderProps = {
|
||||
children?: React.ReactNode;
|
||||
className?: string;
|
||||
previous: (() => void) | null;
|
||||
next: (() => void) | null;
|
||||
close?: () => void;
|
||||
};
|
||||
declare const LeftRightDialogHeader: React.FC<LeftRightDialogHeaderProps>;
|
||||
export { LeftRightDialogHeader };
|
||||
178
node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/LeftRightDialogHeader.js
generated
vendored
Normal file
178
node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/LeftRightDialogHeader.js
generated
vendored
Normal file
@ -0,0 +1,178 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "LeftRightDialogHeader", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return LeftRightDialogHeader;
|
||||
}
|
||||
});
|
||||
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 _CloseIcon = require("../../icons/CloseIcon");
|
||||
const LeftRightDialogHeader = function LeftRightDialogHeader(param) {
|
||||
let { children, className, previous, next, close } = param;
|
||||
const buttonLeft = _react.useRef(null);
|
||||
const buttonRight = _react.useRef(null);
|
||||
const buttonClose = _react.useRef(null);
|
||||
const [nav, setNav] = _react.useState(null);
|
||||
const onNav = _react.useCallback((el)=>{
|
||||
setNav(el);
|
||||
}, []);
|
||||
_react.useEffect(()=>{
|
||||
if (nav == null) {
|
||||
return;
|
||||
}
|
||||
const root = nav.getRootNode();
|
||||
const d = self.document;
|
||||
function handler(e) {
|
||||
if (e.key === "ArrowLeft") {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (buttonLeft.current) {
|
||||
buttonLeft.current.focus();
|
||||
}
|
||||
previous && previous();
|
||||
} else if (e.key === "ArrowRight") {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (buttonRight.current) {
|
||||
buttonRight.current.focus();
|
||||
}
|
||||
next && next();
|
||||
} else if (e.key === "Escape") {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (root instanceof ShadowRoot) {
|
||||
const a = root.activeElement;
|
||||
if (a && a !== buttonClose.current && a instanceof HTMLElement) {
|
||||
a.blur();
|
||||
return;
|
||||
}
|
||||
}
|
||||
close == null ? void 0 : close();
|
||||
}
|
||||
}
|
||||
root.addEventListener("keydown", handler);
|
||||
if (root !== d) {
|
||||
d.addEventListener("keydown", handler);
|
||||
}
|
||||
return function() {
|
||||
root.removeEventListener("keydown", handler);
|
||||
if (root !== d) {
|
||||
d.removeEventListener("keydown", handler);
|
||||
}
|
||||
};
|
||||
}, [
|
||||
close,
|
||||
nav,
|
||||
next,
|
||||
previous
|
||||
]);
|
||||
// Unlock focus for browsers like Firefox, that break all user focus if the
|
||||
// currently focused item becomes disabled.
|
||||
_react.useEffect(()=>{
|
||||
if (nav == null) {
|
||||
return;
|
||||
}
|
||||
const root = nav.getRootNode();
|
||||
// Always true, but we do this for TypeScript:
|
||||
if (root instanceof ShadowRoot) {
|
||||
const a = root.activeElement;
|
||||
if (previous == null) {
|
||||
if (buttonLeft.current && a === buttonLeft.current) {
|
||||
buttonLeft.current.blur();
|
||||
}
|
||||
} else if (next == null) {
|
||||
if (buttonRight.current && a === buttonRight.current) {
|
||||
buttonRight.current.blur();
|
||||
}
|
||||
}
|
||||
}
|
||||
}, [
|
||||
nav,
|
||||
next,
|
||||
previous
|
||||
]);
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
||||
"data-nextjs-dialog-left-right": true,
|
||||
className: className,
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsxs)("nav", {
|
||||
ref: onNav,
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
|
||||
ref: buttonLeft,
|
||||
type: "button",
|
||||
disabled: previous == null ? true : undefined,
|
||||
"aria-disabled": previous == null ? true : undefined,
|
||||
onClick: previous != null ? previous : undefined,
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("svg", {
|
||||
viewBox: "0 0 14 14",
|
||||
fill: "none",
|
||||
xmlns: "http://www.w3.org/2000/svg",
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("title", {
|
||||
children: "previous"
|
||||
}),
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
|
||||
d: "M6.99996 1.16666L1.16663 6.99999L6.99996 12.8333M12.8333 6.99999H1.99996H12.8333Z",
|
||||
stroke: "currentColor",
|
||||
strokeWidth: "2",
|
||||
strokeLinecap: "round",
|
||||
strokeLinejoin: "round"
|
||||
})
|
||||
]
|
||||
})
|
||||
}),
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
|
||||
ref: buttonRight,
|
||||
type: "button",
|
||||
disabled: next == null ? true : undefined,
|
||||
"aria-disabled": next == null ? true : undefined,
|
||||
onClick: next != null ? next : undefined,
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("svg", {
|
||||
viewBox: "0 0 14 14",
|
||||
fill: "none",
|
||||
xmlns: "http://www.w3.org/2000/svg",
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("title", {
|
||||
children: "next"
|
||||
}),
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("path", {
|
||||
d: "M6.99996 1.16666L12.8333 6.99999L6.99996 12.8333M1.16663 6.99999H12H1.16663Z",
|
||||
stroke: "currentColor",
|
||||
strokeWidth: "2",
|
||||
strokeLinecap: "round",
|
||||
strokeLinejoin: "round"
|
||||
})
|
||||
]
|
||||
})
|
||||
}),
|
||||
children
|
||||
]
|
||||
}),
|
||||
close ? /*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
|
||||
"data-nextjs-errors-dialog-left-right-close-button": true,
|
||||
ref: buttonClose,
|
||||
type: "button",
|
||||
onClick: close,
|
||||
"aria-label": "Close",
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
|
||||
"aria-hidden": "true",
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_CloseIcon.CloseIcon, {})
|
||||
})
|
||||
}) : null
|
||||
]
|
||||
});
|
||||
};
|
||||
|
||||
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=LeftRightDialogHeader.js.map
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/LeftRightDialogHeader.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/LeftRightDialogHeader.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/LeftRightDialogHeader.tsx"],"names":["LeftRightDialogHeader","children","className","previous","next","close","buttonLeft","React","useRef","buttonRight","buttonClose","nav","setNav","useState","onNav","useCallback","el","useEffect","root","getRootNode","d","self","document","handler","e","key","preventDefault","stopPropagation","current","focus","ShadowRoot","a","activeElement","HTMLElement","blur","addEventListener","removeEventListener","div","data-nextjs-dialog-left-right","ref","button","type","disabled","undefined","aria-disabled","onClick","svg","viewBox","fill","xmlns","title","path","stroke","strokeWidth","strokeLinecap","strokeLinejoin","data-nextjs-errors-dialog-left-right-close-button","aria-label","span","aria-hidden","CloseIcon"],"mappings":";;;;+BAwKSA;;;eAAAA;;;;;iEAxKc;2BACG;AAU1B,MAAMA,wBACJ,SAASA,sBAAsB,KAM9B;IAN8B,IAAA,EAC7BC,QAAQ,EACRC,SAAS,EACTC,QAAQ,EACRC,IAAI,EACJC,KAAK,EACN,GAN8B;IAO7B,MAAMC,aAAaC,OAAMC,MAAM,CAA2B;IAC1D,MAAMC,cAAcF,OAAMC,MAAM,CAA2B;IAC3D,MAAME,cAAcH,OAAMC,MAAM,CAA2B;IAE3D,MAAM,CAACG,KAAKC,OAAO,GAAGL,OAAMM,QAAQ,CAAqB;IACzD,MAAMC,QAAQP,OAAMQ,WAAW,CAAC,CAACC;QAC/BJ,OAAOI;IACT,GAAG,EAAE;IAELT,OAAMU,SAAS,CAAC;QACd,IAAIN,OAAO,MAAM;YACf;QACF;QAEA,MAAMO,OAAOP,IAAIQ,WAAW;QAC5B,MAAMC,IAAIC,KAAKC,QAAQ;QAEvB,SAASC,QAAQC,CAAgB;YAC/B,IAAIA,EAAEC,GAAG,KAAK,aAAa;gBACzBD,EAAEE,cAAc;gBAChBF,EAAEG,eAAe;gBACjB,IAAIrB,WAAWsB,OAAO,EAAE;oBACtBtB,WAAWsB,OAAO,CAACC,KAAK;gBAC1B;gBACA1B,YAAYA;YACd,OAAO,IAAIqB,EAAEC,GAAG,KAAK,cAAc;gBACjCD,EAAEE,cAAc;gBAChBF,EAAEG,eAAe;gBACjB,IAAIlB,YAAYmB,OAAO,EAAE;oBACvBnB,YAAYmB,OAAO,CAACC,KAAK;gBAC3B;gBACAzB,QAAQA;YACV,OAAO,IAAIoB,EAAEC,GAAG,KAAK,UAAU;gBAC7BD,EAAEE,cAAc;gBAChBF,EAAEG,eAAe;gBACjB,IAAIT,gBAAgBY,YAAY;oBAC9B,MAAMC,IAAIb,KAAKc,aAAa;oBAC5B,IAAID,KAAKA,MAAMrB,YAAYkB,OAAO,IAAIG,aAAaE,aAAa;wBAC9DF,EAAEG,IAAI;wBACN;oBACF;gBACF;gBAEA7B,yBAAAA;YACF;QACF;QAEAa,KAAKiB,gBAAgB,CAAC,WAAWZ;QACjC,IAAIL,SAASE,GAAG;YACdA,EAAEe,gBAAgB,CAAC,WAAWZ;QAChC;QACA,OAAO;YACLL,KAAKkB,mBAAmB,CAAC,WAAWb;YACpC,IAAIL,SAASE,GAAG;gBACdA,EAAEgB,mBAAmB,CAAC,WAAWb;YACnC;QACF;IACF,GAAG;QAAClB;QAAOM;QAAKP;QAAMD;KAAS;IAE/B,2EAA2E;IAC3E,2CAA2C;IAC3CI,OAAMU,SAAS,CAAC;QACd,IAAIN,OAAO,MAAM;YACf;QACF;QAEA,MAAMO,OAAOP,IAAIQ,WAAW;QAC5B,8CAA8C;QAC9C,IAAID,gBAAgBY,YAAY;YAC9B,MAAMC,IAAIb,KAAKc,aAAa;YAE5B,IAAI7B,YAAY,MAAM;gBACpB,IAAIG,WAAWsB,OAAO,IAAIG,MAAMzB,WAAWsB,OAAO,EAAE;oBAClDtB,WAAWsB,OAAO,CAACM,IAAI;gBACzB;YACF,OAAO,IAAI9B,QAAQ,MAAM;gBACvB,IAAIK,YAAYmB,OAAO,IAAIG,MAAMtB,YAAYmB,OAAO,EAAE;oBACpDnB,YAAYmB,OAAO,CAACM,IAAI;gBAC1B;YACF;QACF;IACF,GAAG;QAACvB;QAAKP;QAAMD;KAAS;IAExB,qBACE,sBAACkC;QAAIC,+BAA6B;QAACpC,WAAWA;;0BAC5C,sBAACS;gBAAI4B,KAAKzB;;kCACR,qBAAC0B;wBACCD,KAAKjC;wBACLmC,MAAK;wBACLC,UAAUvC,YAAY,OAAO,OAAOwC;wBACpCC,iBAAezC,YAAY,OAAO,OAAOwC;wBACzCE,SAAS1C,mBAAAA,WAAYwC;kCAErB,cAAA,sBAACG;4BACCC,SAAQ;4BACRC,MAAK;4BACLC,OAAM;;8CAEN,qBAACC;8CAAM;;8CACP,qBAACC;oCACC/B,GAAE;oCACFgC,QAAO;oCACPC,aAAY;oCACZC,eAAc;oCACdC,gBAAe;;;;;kCAIrB,qBAACf;wBACCD,KAAK9B;wBACLgC,MAAK;wBACLC,UAAUtC,QAAQ,OAAO,OAAOuC;wBAChCC,iBAAexC,QAAQ,OAAO,OAAOuC;wBACrCE,SAASzC,eAAAA,OAAQuC;kCAEjB,cAAA,sBAACG;4BACCC,SAAQ;4BACRC,MAAK;4BACLC,OAAM;;8CAEN,qBAACC;8CAAM;;8CACP,qBAACC;oCACC/B,GAAE;oCACFgC,QAAO;oCACPC,aAAY;oCACZC,eAAc;oCACdC,gBAAe;;;;;oBAIpBtD;;;YAEFI,sBACC,qBAACmC;gBACCgB,mDAAiD;gBACjDjB,KAAK7B;gBACL+B,MAAK;gBACLI,SAASxC;gBACToD,cAAW;0BAEX,cAAA,qBAACC;oBAAKC,eAAY;8BAChB,cAAA,qBAACC,oBAAS;;iBAGZ;;;AAGV"}
|
||||
2
node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/index.d.ts
generated
vendored
Normal file
2
node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
export { LeftRightDialogHeader } from './LeftRightDialogHeader';
|
||||
export { styles } from './styles';
|
||||
32
node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/index.js
generated
vendored
Normal file
32
node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/index.js
generated
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
LeftRightDialogHeader: null,
|
||||
styles: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
LeftRightDialogHeader: function() {
|
||||
return _LeftRightDialogHeader.LeftRightDialogHeader;
|
||||
},
|
||||
styles: function() {
|
||||
return _styles.styles;
|
||||
}
|
||||
});
|
||||
const _LeftRightDialogHeader = require("./LeftRightDialogHeader");
|
||||
const _styles = require("./styles");
|
||||
|
||||
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
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/index.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/index.ts"],"names":["LeftRightDialogHeader","styles"],"mappings":";;;;;;;;;;;;;;;IAASA,qBAAqB;eAArBA,4CAAqB;;IACrBC,MAAM;eAANA,cAAM;;;uCADuB;wBACf"}
|
||||
2
node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/styles.d.ts
generated
vendored
Normal file
2
node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/styles.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
declare const styles: string;
|
||||
export { styles };
|
||||
30
node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/styles.js
generated
vendored
Normal file
30
node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/styles.js
generated
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "styles", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return styles;
|
||||
}
|
||||
});
|
||||
const _tagged_template_literal_loose = require("@swc/helpers/_/_tagged_template_literal_loose");
|
||||
const _nooptemplate = require("../../helpers/noop-template");
|
||||
function _templateObject() {
|
||||
const data = _tagged_template_literal_loose._([
|
||||
"\n [data-nextjs-dialog-left-right] {\n display: flex;\n flex-direction: row;\n align-content: center;\n align-items: center;\n justify-content: space-between;\n }\n [data-nextjs-dialog-left-right] > nav {\n flex: 1;\n display: flex;\n align-items: center;\n margin-right: var(--size-gap);\n }\n [data-nextjs-dialog-left-right] > nav > button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n width: calc(var(--size-gap-double) + var(--size-gap));\n height: calc(var(--size-gap-double) + var(--size-gap));\n font-size: 0;\n border: none;\n background-color: rgba(255, 85, 85, 0.1);\n color: var(--color-ansi-red);\n cursor: pointer;\n transition: background-color 0.25s ease;\n }\n [data-nextjs-dialog-left-right] > nav > button > svg {\n width: auto;\n height: calc(var(--size-gap) + var(--size-gap-half));\n }\n [data-nextjs-dialog-left-right] > nav > button:hover {\n background-color: rgba(255, 85, 85, 0.2);\n }\n [data-nextjs-dialog-left-right] > nav > button:disabled {\n background-color: rgba(255, 85, 85, 0.1);\n color: rgba(255, 85, 85, 0.4);\n cursor: not-allowed;\n }\n\n [data-nextjs-dialog-left-right] > nav > button:first-of-type {\n border-radius: var(--size-gap-half) 0 0 var(--size-gap-half);\n margin-right: 1px;\n }\n [data-nextjs-dialog-left-right] > nav > button:last-of-type {\n border-radius: 0 var(--size-gap-half) var(--size-gap-half) 0;\n }\n\n [data-nextjs-dialog-left-right] > button:last-of-type {\n border: 0;\n padding: 0;\n\n background-color: transparent;\n appearance: none;\n\n opacity: 0.4;\n transition: opacity 0.25s ease;\n\n color: var(--color-font);\n }\n [data-nextjs-dialog-left-right] > button:last-of-type:hover {\n opacity: 0.7;\n }\n"
|
||||
]);
|
||||
_templateObject = function() {
|
||||
return data;
|
||||
};
|
||||
return data;
|
||||
}
|
||||
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=styles.js.map
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/styles.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/styles.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/LeftRightDialogHeader/styles.ts"],"names":["styles","css"],"mappings":";;;;+BAoESA;;;eAAAA;;;;8BApEmB;;;;;;;;;;AAE5B,MAAMA,aAASC,kBAAG"}
|
||||
8
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/Overlay.d.ts
generated
vendored
Normal file
8
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/Overlay.d.ts
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import * as React from 'react';
|
||||
export type OverlayProps = {
|
||||
children?: React.ReactNode;
|
||||
className?: string;
|
||||
fixed?: boolean;
|
||||
};
|
||||
declare const Overlay: React.FC<OverlayProps>;
|
||||
export { Overlay };
|
||||
62
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/Overlay.js
generated
vendored
Normal file
62
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/Overlay.js
generated
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "Overlay", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return Overlay;
|
||||
}
|
||||
});
|
||||
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
||||
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
||||
const _jsxruntime = require("react/jsx-runtime");
|
||||
const _maintaintabfocus = /*#__PURE__*/ _interop_require_default._(require("./maintain--tab-focus"));
|
||||
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
||||
const _bodylocker = require("./body-locker");
|
||||
const Overlay = function Overlay(param) {
|
||||
let { className, children, fixed } = param;
|
||||
_react.useEffect(()=>{
|
||||
(0, _bodylocker.lock)();
|
||||
return ()=>{
|
||||
(0, _bodylocker.unlock)();
|
||||
};
|
||||
}, []);
|
||||
const [overlay, setOverlay] = _react.useState(null);
|
||||
const onOverlay = _react.useCallback((el)=>{
|
||||
setOverlay(el);
|
||||
}, []);
|
||||
_react.useEffect(()=>{
|
||||
if (overlay == null) {
|
||||
return;
|
||||
}
|
||||
const handle2 = (0, _maintaintabfocus.default)({
|
||||
context: overlay
|
||||
});
|
||||
return ()=>{
|
||||
handle2.disengage();
|
||||
};
|
||||
}, [
|
||||
overlay
|
||||
]);
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
||||
"data-nextjs-dialog-overlay": true,
|
||||
className: className,
|
||||
ref: onOverlay,
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
||||
"data-nextjs-dialog-backdrop": true,
|
||||
"data-nextjs-dialog-backdrop-fixed": fixed ? true : undefined
|
||||
}),
|
||||
children
|
||||
]
|
||||
});
|
||||
};
|
||||
|
||||
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=Overlay.js.map
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/Overlay.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/Overlay.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/Overlay/Overlay.tsx"],"names":["Overlay","className","children","fixed","React","useEffect","lock","unlock","overlay","setOverlay","useState","onOverlay","useCallback","el","handle2","allyTrap","context","disengage","div","data-nextjs-dialog-overlay","ref","data-nextjs-dialog-backdrop","data-nextjs-dialog-backdrop-fixed","undefined"],"mappings":";;;;+BAiDSA;;;eAAAA;;;;;;2EAjDY;iEACE;4BACM;AAQ7B,MAAMA,UAAkC,SAASA,QAAQ,KAIxD;IAJwD,IAAA,EACvDC,SAAS,EACTC,QAAQ,EACRC,KAAK,EACN,GAJwD;IAKvDC,OAAMC,SAAS,CAAC;QACdC,IAAAA,gBAAI;QACJ,OAAO;YACLC,IAAAA,kBAAM;QACR;IACF,GAAG,EAAE;IAEL,MAAM,CAACC,SAASC,WAAW,GAAGL,OAAMM,QAAQ,CAAwB;IACpE,MAAMC,YAAYP,OAAMQ,WAAW,CAAC,CAACC;QACnCJ,WAAWI;IACb,GAAG,EAAE;IAELT,OAAMC,SAAS,CAAC;QACd,IAAIG,WAAW,MAAM;YACnB;QACF;QAEA,MAAMM,UAAUC,IAAAA,yBAAQ,EAAC;YAAEC,SAASR;QAAQ;QAC5C,OAAO;YACLM,QAAQG,SAAS;QACnB;IACF,GAAG;QAACT;KAAQ;IAEZ,qBACE,sBAACU;QAAIC,4BAA0B;QAAClB,WAAWA;QAAWmB,KAAKT;;0BACzD,qBAACO;gBACCG,6BAA2B;gBAC3BC,qCAAmCnB,QAAQ,OAAOoB;;YAEnDrB;;;AAGP"}
|
||||
2
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/body-locker.d.ts
generated
vendored
Normal file
2
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/body-locker.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
export declare function lock(): void;
|
||||
export declare function unlock(): void;
|
||||
62
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/body-locker.js
generated
vendored
Normal file
62
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/body-locker.js
generated
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
lock: null,
|
||||
unlock: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
lock: function() {
|
||||
return lock;
|
||||
},
|
||||
unlock: function() {
|
||||
return unlock;
|
||||
}
|
||||
});
|
||||
let previousBodyPaddingRight;
|
||||
let previousBodyOverflowSetting;
|
||||
let activeLocks = 0;
|
||||
function lock() {
|
||||
setTimeout(()=>{
|
||||
if (activeLocks++ > 0) {
|
||||
return;
|
||||
}
|
||||
const scrollBarGap = window.innerWidth - document.documentElement.clientWidth;
|
||||
if (scrollBarGap > 0) {
|
||||
previousBodyPaddingRight = document.body.style.paddingRight;
|
||||
document.body.style.paddingRight = "" + scrollBarGap + "px";
|
||||
}
|
||||
previousBodyOverflowSetting = document.body.style.overflow;
|
||||
document.body.style.overflow = "hidden";
|
||||
});
|
||||
}
|
||||
function unlock() {
|
||||
setTimeout(()=>{
|
||||
if (activeLocks === 0 || --activeLocks !== 0) {
|
||||
return;
|
||||
}
|
||||
if (previousBodyPaddingRight !== undefined) {
|
||||
document.body.style.paddingRight = previousBodyPaddingRight;
|
||||
previousBodyPaddingRight = undefined;
|
||||
}
|
||||
if (previousBodyOverflowSetting !== undefined) {
|
||||
document.body.style.overflow = previousBodyOverflowSetting;
|
||||
previousBodyOverflowSetting = undefined;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
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=body-locker.js.map
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/body-locker.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/body-locker.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/Overlay/body-locker.ts"],"names":["lock","unlock","previousBodyPaddingRight","previousBodyOverflowSetting","activeLocks","setTimeout","scrollBarGap","window","innerWidth","document","documentElement","clientWidth","body","style","paddingRight","overflow","undefined"],"mappings":";;;;;;;;;;;;;;;IAKgBA,IAAI;eAAJA;;IAmBAC,MAAM;eAANA;;;AAxBhB,IAAIC;AACJ,IAAIC;AAEJ,IAAIC,cAAc;AAEX,SAASJ;IACdK,WAAW;QACT,IAAID,gBAAgB,GAAG;YACrB;QACF;QAEA,MAAME,eACJC,OAAOC,UAAU,GAAGC,SAASC,eAAe,CAACC,WAAW;QAE1D,IAAIL,eAAe,GAAG;YACpBJ,2BAA2BO,SAASG,IAAI,CAACC,KAAK,CAACC,YAAY;YAC3DL,SAASG,IAAI,CAACC,KAAK,CAACC,YAAY,GAAG,AAAC,KAAER,eAAa;QACrD;QAEAH,8BAA8BM,SAASG,IAAI,CAACC,KAAK,CAACE,QAAQ;QAC1DN,SAASG,IAAI,CAACC,KAAK,CAACE,QAAQ,GAAG;IACjC;AACF;AAEO,SAASd;IACdI,WAAW;QACT,IAAID,gBAAgB,KAAK,EAAEA,gBAAgB,GAAG;YAC5C;QACF;QAEA,IAAIF,6BAA6Bc,WAAW;YAC1CP,SAASG,IAAI,CAACC,KAAK,CAACC,YAAY,GAAGZ;YACnCA,2BAA2Bc;QAC7B;QAEA,IAAIb,gCAAgCa,WAAW;YAC7CP,SAASG,IAAI,CAACC,KAAK,CAACE,QAAQ,GAAGZ;YAC/BA,8BAA8Ba;QAChC;IACF;AACF"}
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/index.d.ts
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/index.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export { Overlay } from './Overlay';
|
||||
19
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/index.js
generated
vendored
Normal file
19
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/index.js
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "Overlay", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return _Overlay.Overlay;
|
||||
}
|
||||
});
|
||||
const _Overlay = require("./Overlay");
|
||||
|
||||
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
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/index.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/Overlay/index.tsx"],"names":["Overlay"],"mappings":";;;;+BAASA;;;eAAAA,gBAAO;;;yBAAQ"}
|
||||
5
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/maintain--tab-focus.d.ts
generated
vendored
Normal file
5
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/maintain--tab-focus.d.ts
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
export default function ({ context }?: {
|
||||
context: any;
|
||||
}): {
|
||||
disengage: () => void;
|
||||
};
|
||||
2716
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/maintain--tab-focus.js
generated
vendored
Normal file
2716
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/maintain--tab-focus.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/maintain--tab-focus.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/maintain--tab-focus.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/styles.d.ts
generated
vendored
Normal file
2
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/styles.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
declare const styles: string;
|
||||
export { styles };
|
||||
30
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/styles.js
generated
vendored
Normal file
30
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/styles.js
generated
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "styles", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return styles;
|
||||
}
|
||||
});
|
||||
const _tagged_template_literal_loose = require("@swc/helpers/_/_tagged_template_literal_loose");
|
||||
const _nooptemplate = require("../../helpers/noop-template");
|
||||
function _templateObject() {
|
||||
const data = _tagged_template_literal_loose._([
|
||||
"\n [data-nextjs-dialog-overlay] {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n overflow: auto;\n z-index: 9000;\n\n display: flex;\n align-content: center;\n align-items: center;\n flex-direction: column;\n padding: 10vh 15px 0;\n }\n\n @media (max-height: 812px) {\n [data-nextjs-dialog-overlay] {\n padding: 15px 15px 0;\n }\n }\n\n [data-nextjs-dialog-backdrop] {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: var(--color-backdrop);\n pointer-events: all;\n z-index: -1;\n }\n\n [data-nextjs-dialog-backdrop-fixed] {\n cursor: not-allowed;\n -webkit-backdrop-filter: blur(8px);\n backdrop-filter: blur(8px);\n }\n"
|
||||
]);
|
||||
_templateObject = function() {
|
||||
return data;
|
||||
};
|
||||
return data;
|
||||
}
|
||||
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=styles.js.map
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/styles.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Overlay/styles.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/Overlay/styles.tsx"],"names":["styles","css"],"mappings":";;;;+BA2CSA;;;eAAAA;;;;8BA3CmB;;;;;;;;;;AAE5B,MAAMA,aAASC,kBAAG"}
|
||||
4
node_modules/next/dist/client/components/react-dev-overlay/internal/components/ShadowPortal.d.ts
generated
vendored
Normal file
4
node_modules/next/dist/client/components/react-dev-overlay/internal/components/ShadowPortal.d.ts
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
import * as React from 'react';
|
||||
export declare function ShadowPortal({ children }: {
|
||||
children: React.ReactNode;
|
||||
}): React.ReactPortal | null;
|
||||
42
node_modules/next/dist/client/components/react-dev-overlay/internal/components/ShadowPortal.js
generated
vendored
Normal file
42
node_modules/next/dist/client/components/react-dev-overlay/internal/components/ShadowPortal.js
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "ShadowPortal", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return ShadowPortal;
|
||||
}
|
||||
});
|
||||
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
||||
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
||||
const _reactdom = require("react-dom");
|
||||
function ShadowPortal(param) {
|
||||
let { children } = param;
|
||||
let portalNode = _react.useRef(null);
|
||||
let shadowNode = _react.useRef(null);
|
||||
let [, forceUpdate] = _react.useState();
|
||||
_react.useLayoutEffect(()=>{
|
||||
const ownerDocument = document;
|
||||
portalNode.current = ownerDocument.createElement("nextjs-portal");
|
||||
shadowNode.current = portalNode.current.attachShadow({
|
||||
mode: "open"
|
||||
});
|
||||
ownerDocument.body.appendChild(portalNode.current);
|
||||
forceUpdate({});
|
||||
return ()=>{
|
||||
if (portalNode.current && portalNode.current.ownerDocument) {
|
||||
portalNode.current.ownerDocument.body.removeChild(portalNode.current);
|
||||
}
|
||||
};
|
||||
}, []);
|
||||
return shadowNode.current ? /*#__PURE__*/ (0, _reactdom.createPortal)(children, shadowNode.current) : null;
|
||||
}
|
||||
|
||||
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=ShadowPortal.js.map
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/ShadowPortal.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/ShadowPortal.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../src/client/components/react-dev-overlay/internal/components/ShadowPortal.tsx"],"names":["ShadowPortal","children","portalNode","React","useRef","shadowNode","forceUpdate","useState","useLayoutEffect","ownerDocument","document","current","createElement","attachShadow","mode","body","appendChild","removeChild","createPortal"],"mappings":";;;;+BAGgBA;;;eAAAA;;;;iEAHO;0BACM;AAEtB,SAASA,aAAa,KAA2C;IAA3C,IAAA,EAAEC,QAAQ,EAAiC,GAA3C;IAC3B,IAAIC,aAAaC,OAAMC,MAAM,CAAqB;IAClD,IAAIC,aAAaF,OAAMC,MAAM,CAAoB;IACjD,IAAI,GAAGE,YAAY,GAAGH,OAAMI,QAAQ;IAEpCJ,OAAMK,eAAe,CAAC;QACpB,MAAMC,gBAAgBC;QACtBR,WAAWS,OAAO,GAAGF,cAAcG,aAAa,CAAC;QACjDP,WAAWM,OAAO,GAAGT,WAAWS,OAAO,CAACE,YAAY,CAAC;YAAEC,MAAM;QAAO;QACpEL,cAAcM,IAAI,CAACC,WAAW,CAACd,WAAWS,OAAO;QACjDL,YAAY,CAAC;QACb,OAAO;YACL,IAAIJ,WAAWS,OAAO,IAAIT,WAAWS,OAAO,CAACF,aAAa,EAAE;gBAC1DP,WAAWS,OAAO,CAACF,aAAa,CAACM,IAAI,CAACE,WAAW,CAACf,WAAWS,OAAO;YACtE;QACF;IACF,GAAG,EAAE;IAEL,OAAON,WAAWM,OAAO,iBACrBO,IAAAA,sBAAY,EAACjB,UAAUI,WAAWM,OAAO,IACzC;AACN"}
|
||||
10
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/EditorLink.d.ts
generated
vendored
Normal file
10
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/EditorLink.d.ts
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
type EditorLinkProps = {
|
||||
file: string;
|
||||
isSourceFile: boolean;
|
||||
location?: {
|
||||
line: number;
|
||||
column: number;
|
||||
};
|
||||
};
|
||||
export declare function EditorLink({ file, isSourceFile, location }: EditorLinkProps): import("react/jsx-runtime").JSX.Element;
|
||||
export {};
|
||||
67
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/EditorLink.js
generated
vendored
Normal file
67
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/EditorLink.js
generated
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "EditorLink", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return EditorLink;
|
||||
}
|
||||
});
|
||||
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");
|
||||
function EditorLink(param) {
|
||||
let { file, isSourceFile, location } = param;
|
||||
var _location_line, _location_column;
|
||||
const open = (0, _useopenineditor.useOpenInEditor)({
|
||||
file,
|
||||
lineNumber: (_location_line = location == null ? void 0 : location.line) != null ? _location_line : 1,
|
||||
column: (_location_column = location == null ? void 0 : location.column) != null ? _location_column : 0
|
||||
});
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
||||
"data-with-open-in-editor-link": true,
|
||||
"data-with-open-in-editor-link-source-file": isSourceFile ? true : undefined,
|
||||
"data-with-open-in-editor-link-import-trace": isSourceFile ? undefined : true,
|
||||
tabIndex: 10,
|
||||
role: "link",
|
||||
onClick: open,
|
||||
title: "Click to open in your editor",
|
||||
children: [
|
||||
file,
|
||||
location ? ":" + location.line + ":" + location.column : null,
|
||||
/*#__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=EditorLink.js.map
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/EditorLink.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/EditorLink.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/Terminal/EditorLink.tsx"],"names":["EditorLink","file","isSourceFile","location","open","useOpenInEditor","lineNumber","line","column","div","data-with-open-in-editor-link","data-with-open-in-editor-link-source-file","undefined","data-with-open-in-editor-link-import-trace","tabIndex","role","onClick","title","svg","xmlns","viewBox","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin","path","d","polyline","points","x1","y1","x2","y2"],"mappings":";;;;+BAWgBA;;;eAAAA;;;;;gEAXE;iCACc;AAUzB,SAASA,WAAW,KAAiD;IAAjD,IAAA,EAAEC,IAAI,EAAEC,YAAY,EAAEC,QAAQ,EAAmB,GAAjD;QAGXA,gBACJA;IAHV,MAAMC,OAAOC,IAAAA,gCAAe,EAAC;QAC3BJ;QACAK,YAAYH,CAAAA,iBAAAA,4BAAAA,SAAUI,IAAI,YAAdJ,iBAAkB;QAC9BK,QAAQL,CAAAA,mBAAAA,4BAAAA,SAAUK,MAAM,YAAhBL,mBAAoB;IAC9B;IAEA,qBACE,sBAACM;QACCC,+BAA6B;QAC7BC,6CACET,eAAe,OAAOU;QAExBC,8CACEX,eAAeU,YAAY;QAE7BE,UAAU;QACVC,MAAM;QACNC,SAASZ;QACTa,OAAO;;YAENhB;YACAE,WAAW,AAAC,MAAGA,SAASI,IAAI,GAAC,MAAGJ,SAASK,MAAM,GAAK;0BACrD,sBAACU;gBACCC,OAAM;gBACNC,SAAQ;gBACRC,MAAK;gBACLC,QAAO;gBACPC,aAAY;gBACZC,eAAc;gBACdC,gBAAe;;kCAEf,qBAACC;wBAAKC,GAAE;;kCACR,qBAACC;wBAASC,QAAO;;kCACjB,qBAACtB;wBAAKuB,IAAG;wBAAKC,IAAG;wBAAKC,IAAG;wBAAKC,IAAG;;;;;;AAIzC"}
|
||||
5
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/Terminal.d.ts
generated
vendored
Normal file
5
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/Terminal.d.ts
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
import * as React from 'react';
|
||||
export type TerminalProps = {
|
||||
content: string;
|
||||
};
|
||||
export declare const Terminal: React.FC<TerminalProps>;
|
||||
108
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/Terminal.js
generated
vendored
Normal file
108
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/Terminal.js
generated
vendored
Normal file
@ -0,0 +1,108 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "Terminal", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return Terminal;
|
||||
}
|
||||
});
|
||||
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
||||
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
||||
const _jsxruntime = require("react/jsx-runtime");
|
||||
const _anser = /*#__PURE__*/ _interop_require_default._(require("next/dist/compiled/anser"));
|
||||
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
||||
const _hotlinkedtext = require("../hot-linked-text");
|
||||
const _EditorLink = require("./EditorLink");
|
||||
function getFile(lines) {
|
||||
const contentFileName = lines.shift();
|
||||
if (!contentFileName) return null;
|
||||
const [fileName, line, column] = contentFileName.split(":", 3);
|
||||
const parsedLine = Number(line);
|
||||
const parsedColumn = Number(column);
|
||||
const hasLocation = !Number.isNaN(parsedLine) && !Number.isNaN(parsedColumn);
|
||||
return {
|
||||
fileName: hasLocation ? fileName : contentFileName,
|
||||
location: hasLocation ? {
|
||||
line: parsedLine,
|
||||
column: parsedColumn
|
||||
} : undefined
|
||||
};
|
||||
}
|
||||
function getImportTraceFiles(lines) {
|
||||
if (lines.some((line)=>/ReactServerComponentsError:/.test(line)) || lines.some((line)=>/Import trace for requested module:/.test(line))) {
|
||||
// Grab the lines at the end containing the files
|
||||
const files = [];
|
||||
while(/.+\..+/.test(lines[lines.length - 1]) && !lines[lines.length - 1].includes(":")){
|
||||
const file = lines.pop().trim();
|
||||
files.unshift(file);
|
||||
}
|
||||
return files;
|
||||
}
|
||||
return [];
|
||||
}
|
||||
function getEditorLinks(content) {
|
||||
const lines = content.split("\n");
|
||||
const file = getFile(lines);
|
||||
const importTraceFiles = getImportTraceFiles(lines);
|
||||
return {
|
||||
file,
|
||||
source: lines.join("\n"),
|
||||
importTraceFiles
|
||||
};
|
||||
}
|
||||
const Terminal = function Terminal(param) {
|
||||
let { content } = param;
|
||||
const { file, source, importTraceFiles } = _react.useMemo(()=>getEditorLinks(content), [
|
||||
content
|
||||
]);
|
||||
const decoded = _react.useMemo(()=>{
|
||||
return _anser.default.ansiToJson(source, {
|
||||
json: true,
|
||||
use_classes: true,
|
||||
remove_empty: true
|
||||
});
|
||||
}, [
|
||||
source
|
||||
]);
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
||||
"data-nextjs-terminal": true,
|
||||
children: [
|
||||
file && /*#__PURE__*/ (0, _jsxruntime.jsx)(_EditorLink.EditorLink, {
|
||||
isSourceFile: true,
|
||||
file: file.fileName,
|
||||
location: file.location
|
||||
}, file.fileName),
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsxs)("pre", {
|
||||
children: [
|
||||
decoded.map((entry, index)=>/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
|
||||
style: {
|
||||
color: entry.fg ? "var(--color-" + entry.fg + ")" : undefined,
|
||||
...entry.decoration === "bold" ? {
|
||||
fontWeight: 800
|
||||
} : entry.decoration === "italic" ? {
|
||||
fontStyle: "italic"
|
||||
} : undefined
|
||||
},
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_hotlinkedtext.HotlinkedText, {
|
||||
text: entry.content
|
||||
})
|
||||
}, "terminal-entry-" + index)),
|
||||
importTraceFiles.map((importTraceFile)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_EditorLink.EditorLink, {
|
||||
isSourceFile: false,
|
||||
file: importTraceFile
|
||||
}, importTraceFile))
|
||||
]
|
||||
})
|
||||
]
|
||||
});
|
||||
};
|
||||
|
||||
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=Terminal.js.map
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/Terminal.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/Terminal.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/Terminal/Terminal.tsx"],"names":["Terminal","getFile","lines","contentFileName","shift","fileName","line","column","split","parsedLine","Number","parsedColumn","hasLocation","isNaN","location","undefined","getImportTraceFiles","some","test","files","length","includes","file","pop","trim","unshift","getEditorLinks","content","importTraceFiles","source","join","React","useMemo","decoded","Anser","ansiToJson","json","use_classes","remove_empty","div","data-nextjs-terminal","EditorLink","isSourceFile","pre","map","entry","index","span","style","color","fg","decoration","fontWeight","fontStyle","HotlinkedText","text","importTraceFile"],"mappings":";;;;+BAwDaA;;;eAAAA;;;;;;gEAxDK;iEACK;+BACO;4BACH;AAI3B,SAASC,QAAQC,KAAe;IAC9B,MAAMC,kBAAkBD,MAAME,KAAK;IACnC,IAAI,CAACD,iBAAiB,OAAO;IAC7B,MAAM,CAACE,UAAUC,MAAMC,OAAO,GAAGJ,gBAAgBK,KAAK,CAAC,KAAK;IAE5D,MAAMC,aAAaC,OAAOJ;IAC1B,MAAMK,eAAeD,OAAOH;IAC5B,MAAMK,cAAc,CAACF,OAAOG,KAAK,CAACJ,eAAe,CAACC,OAAOG,KAAK,CAACF;IAE/D,OAAO;QACLN,UAAUO,cAAcP,WAAWF;QACnCW,UAAUF,cACN;YACEN,MAAMG;YACNF,QAAQI;QACV,IACAI;IACN;AACF;AAEA,SAASC,oBAAoBd,KAAe;IAC1C,IACEA,MAAMe,IAAI,CAAC,CAACX,OAAS,8BAA8BY,IAAI,CAACZ,UACxDJ,MAAMe,IAAI,CAAC,CAACX,OAAS,qCAAqCY,IAAI,CAACZ,QAC/D;QACA,iDAAiD;QACjD,MAAMa,QAAQ,EAAE;QAChB,MACE,SAASD,IAAI,CAAChB,KAAK,CAACA,MAAMkB,MAAM,GAAG,EAAE,KACrC,CAAClB,KAAK,CAACA,MAAMkB,MAAM,GAAG,EAAE,CAACC,QAAQ,CAAC,KAClC;YACA,MAAMC,OAAOpB,MAAMqB,GAAG,GAAIC,IAAI;YAC9BL,MAAMM,OAAO,CAACH;QAChB;QAEA,OAAOH;IACT;IAEA,OAAO,EAAE;AACX;AAEA,SAASO,eAAeC,OAAe;IACrC,MAAMzB,QAAQyB,QAAQnB,KAAK,CAAC;IAC5B,MAAMc,OAAOrB,QAAQC;IACrB,MAAM0B,mBAAmBZ,oBAAoBd;IAE7C,OAAO;QAAEoB;QAAMO,QAAQ3B,MAAM4B,IAAI,CAAC;QAAOF;IAAiB;AAC5D;AAEO,MAAM5B,WAAoC,SAASA,SAAS,KAElE;IAFkE,IAAA,EACjE2B,OAAO,EACR,GAFkE;IAGjE,MAAM,EAAEL,IAAI,EAAEO,MAAM,EAAED,gBAAgB,EAAE,GAAGG,OAAMC,OAAO,CACtD,IAAMN,eAAeC,UACrB;QAACA;KAAQ;IAGX,MAAMM,UAAUF,OAAMC,OAAO,CAAC;QAC5B,OAAOE,cAAK,CAACC,UAAU,CAACN,QAAQ;YAC9BO,MAAM;YACNC,aAAa;YACbC,cAAc;QAChB;IACF,GAAG;QAACT;KAAO;IAEX,qBACE,sBAACU;QAAIC,sBAAoB;;YACtBlB,sBACC,qBAACmB,sBAAU;gBACTC,YAAY;gBAEZpB,MAAMA,KAAKjB,QAAQ;gBACnBS,UAAUQ,KAAKR,QAAQ;eAFlBQ,KAAKjB,QAAQ;0BAKtB,sBAACsC;;oBACEV,QAAQW,GAAG,CAAC,CAACC,OAAOC,sBACnB,qBAACC;4BAECC,OAAO;gCACLC,OAAOJ,MAAMK,EAAE,GAAG,AAAC,iBAAcL,MAAMK,EAAE,GAAC,MAAKnC;gCAC/C,GAAI8B,MAAMM,UAAU,KAAK,SACrB;oCAAEC,YAAY;gCAAI,IAClBP,MAAMM,UAAU,KAAK,WACrB;oCAAEE,WAAW;gCAAS,IACtBtC,SAAS;4BACf;sCAEA,cAAA,qBAACuC,4BAAa;gCAACC,MAAMV,MAAMlB,OAAO;;2BAV7B,AAAC,oBAAiBmB;oBAa1BlB,iBAAiBgB,GAAG,CAAC,CAACY,gCACrB,qBAACf,sBAAU;4BACTC,cAAc;4BAEdpB,MAAMkC;2BADDA;;;;;AAOjB"}
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/index.d.ts
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/index.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export { Terminal } from './Terminal';
|
||||
19
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/index.js
generated
vendored
Normal file
19
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/index.js
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "Terminal", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return _Terminal.Terminal;
|
||||
}
|
||||
});
|
||||
const _Terminal = require("./Terminal");
|
||||
|
||||
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
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/index.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/Terminal/index.tsx"],"names":["Terminal"],"mappings":";;;;+BAASA;;;eAAAA,kBAAQ;;;0BAAQ"}
|
||||
2
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/styles.d.ts
generated
vendored
Normal file
2
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/styles.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
declare const styles: string;
|
||||
export { styles };
|
||||
30
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/styles.js
generated
vendored
Normal file
30
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/styles.js
generated
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "styles", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return styles;
|
||||
}
|
||||
});
|
||||
const _tagged_template_literal_loose = require("@swc/helpers/_/_tagged_template_literal_loose");
|
||||
const _nooptemplate = require("../../helpers/noop-template");
|
||||
function _templateObject() {
|
||||
const data = _tagged_template_literal_loose._([
|
||||
"\n [data-nextjs-terminal] {\n border-radius: var(--size-gap-half);\n background-color: var(--color-ansi-bg);\n color: var(--color-ansi-fg);\n }\n [data-nextjs-terminal]::selection,\n [data-nextjs-terminal] *::selection {\n background-color: var(--color-ansi-selection);\n }\n [data-nextjs-terminal] * {\n color: inherit;\n background-color: transparent;\n font-family: var(--font-stack-monospace);\n }\n [data-nextjs-terminal] > * {\n margin: 0;\n padding: calc(var(--size-gap) + var(--size-gap-half))\n calc(var(--size-gap-double) + var(--size-gap-half));\n }\n\n [data-nextjs-terminal] pre {\n white-space: pre-wrap;\n word-break: break-word;\n }\n\n [data-with-open-in-editor-link] svg {\n width: auto;\n height: var(--size-font-small);\n margin-left: var(--size-gap);\n }\n [data-with-open-in-editor-link] {\n cursor: pointer;\n }\n [data-with-open-in-editor-link]:hover {\n text-decoration: underline dotted;\n }\n [data-with-open-in-editor-link-source-file] {\n border-bottom: 1px solid var(--color-ansi-bright-black);\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n [data-with-open-in-editor-link-import-trace] {\n margin-left: var(--size-gap-double);\n }\n [data-nextjs-terminal] a {\n color: inherit;\n }\n"
|
||||
]);
|
||||
_templateObject = function() {
|
||||
return data;
|
||||
};
|
||||
return data;
|
||||
}
|
||||
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=styles.js.map
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/styles.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Terminal/styles.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/Terminal/styles.tsx"],"names":["styles","css"],"mappings":";;;;+BAqDSA;;;eAAAA;;;;8BArDmB;;;;;;;;;;AAE5B,MAAMA,aAASC,kBAAG"}
|
||||
7
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/Toast.d.ts
generated
vendored
Normal file
7
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/Toast.d.ts
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
import * as React from 'react';
|
||||
export type ToastProps = {
|
||||
children?: React.ReactNode;
|
||||
onClick?: () => void;
|
||||
className?: string;
|
||||
};
|
||||
export declare const Toast: React.FC<ToastProps>;
|
||||
36
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/Toast.js
generated
vendored
Normal file
36
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/Toast.js
generated
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "Toast", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return Toast;
|
||||
}
|
||||
});
|
||||
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 Toast = function Toast(param) {
|
||||
let { onClick, children, className } = param;
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
||||
"data-nextjs-toast": true,
|
||||
onClick: (e)=>{
|
||||
e.preventDefault();
|
||||
return onClick == null ? void 0 : onClick();
|
||||
},
|
||||
className: className,
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
||||
"data-nextjs-toast-wrapper": true,
|
||||
children: children
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
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=Toast.js.map
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/Toast.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/Toast.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/Toast/Toast.tsx"],"names":["Toast","onClick","children","className","div","data-nextjs-toast","e","preventDefault","data-nextjs-toast-wrapper"],"mappings":";;;;+BAQaA;;;eAAAA;;;;;iEARU;AAQhB,MAAMA,QAA8B,SAASA,MAAM,KAIzD;IAJyD,IAAA,EACxDC,OAAO,EACPC,QAAQ,EACRC,SAAS,EACV,GAJyD;IAKxD,qBACE,qBAACC;QACCC,mBAAiB;QACjBJ,SAAS,CAACK;YACRA,EAAEC,cAAc;YAChB,OAAON,2BAAAA;QACT;QACAE,WAAWA;kBAEX,cAAA,qBAACC;YAAII,2BAAyB;sBAAEN;;;AAGtC"}
|
||||
2
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/index.d.ts
generated
vendored
Normal file
2
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
export { styles } from './styles';
|
||||
export { Toast } from './Toast';
|
||||
32
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/index.js
generated
vendored
Normal file
32
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/index.js
generated
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
Toast: null,
|
||||
styles: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
Toast: function() {
|
||||
return _Toast.Toast;
|
||||
},
|
||||
styles: function() {
|
||||
return _styles.styles;
|
||||
}
|
||||
});
|
||||
const _styles = require("./styles");
|
||||
const _Toast = require("./Toast");
|
||||
|
||||
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
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/index.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/Toast/index.tsx"],"names":["Toast","styles"],"mappings":";;;;;;;;;;;;;;;IACSA,KAAK;eAALA,YAAK;;IADLC,MAAM;eAANA,cAAM;;;wBAAQ;uBACD"}
|
||||
2
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/styles.d.ts
generated
vendored
Normal file
2
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/styles.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
declare const styles: string;
|
||||
export { styles };
|
||||
30
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/styles.js
generated
vendored
Normal file
30
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/styles.js
generated
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "styles", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return styles;
|
||||
}
|
||||
});
|
||||
const _tagged_template_literal_loose = require("@swc/helpers/_/_tagged_template_literal_loose");
|
||||
const _nooptemplate = require("../../helpers/noop-template");
|
||||
function _templateObject() {
|
||||
const data = _tagged_template_literal_loose._([
|
||||
"\n [data-nextjs-toast] {\n position: fixed;\n bottom: var(--size-gap-double);\n left: var(--size-gap-double);\n max-width: 420px;\n z-index: 9000;\n }\n\n @media (max-width: 440px) {\n [data-nextjs-toast] {\n max-width: 90vw;\n left: 5vw;\n }\n }\n\n [data-nextjs-toast-wrapper] {\n padding: 16px;\n border-radius: var(--size-gap-half);\n font-weight: 500;\n color: var(--color-ansi-bright-white);\n background-color: var(--color-ansi-red);\n box-shadow: 0px var(--size-gap-double) var(--size-gap-quad)\n rgba(0, 0, 0, 0.25);\n }\n"
|
||||
]);
|
||||
_templateObject = function() {
|
||||
return data;
|
||||
};
|
||||
return data;
|
||||
}
|
||||
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=styles.js.map
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/styles.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/Toast/styles.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/Toast/styles.ts"],"names":["styles","css"],"mappings":";;;;+BA6BSA;;;eAAAA;;;;8BA7BmB;;;;;;;;;;AAE5B,MAAMA,aAASC,kBAAG"}
|
||||
7
node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/VersionStalenessInfo.d.ts
generated
vendored
Normal file
7
node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/VersionStalenessInfo.d.ts
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
import type { VersionInfo } from '../../../../../../server/dev/parse-version-info';
|
||||
export declare function VersionStalenessInfo(props: VersionInfo): import("react/jsx-runtime").JSX.Element | null;
|
||||
export declare function getStaleness({ installed, staleness, expected }: VersionInfo): {
|
||||
text: string;
|
||||
indicatorClass: string;
|
||||
title: string;
|
||||
};
|
||||
104
node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/VersionStalenessInfo.js
generated
vendored
Normal file
104
node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/VersionStalenessInfo.js
generated
vendored
Normal file
@ -0,0 +1,104 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
VersionStalenessInfo: null,
|
||||
getStaleness: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
VersionStalenessInfo: function() {
|
||||
return VersionStalenessInfo;
|
||||
},
|
||||
getStaleness: function() {
|
||||
return getStaleness;
|
||||
}
|
||||
});
|
||||
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
||||
const _jsxruntime = require("react/jsx-runtime");
|
||||
const _react = /*#__PURE__*/ _interop_require_default._(require("react"));
|
||||
function VersionStalenessInfo(props) {
|
||||
if (!props) return null;
|
||||
const { staleness } = props;
|
||||
let { text, indicatorClass, title } = getStaleness(props);
|
||||
if (!text) return null;
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("small", {
|
||||
className: "nextjs-container-build-error-version-status",
|
||||
children: [
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
|
||||
className: indicatorClass
|
||||
}),
|
||||
/*#__PURE__*/ (0, _jsxruntime.jsx)("small", {
|
||||
"data-nextjs-version-checker": true,
|
||||
title: title,
|
||||
children: text
|
||||
}),
|
||||
" ",
|
||||
staleness === "fresh" || staleness === "newer-than-npm" || staleness === "unknown" ? null : /*#__PURE__*/ (0, _jsxruntime.jsx)("a", {
|
||||
target: "_blank",
|
||||
rel: "noopener noreferrer",
|
||||
href: "https://nextjs.org/docs/messages/version-staleness",
|
||||
children: "(learn more)"
|
||||
}),
|
||||
process.env.TURBOPACK ? " (turbo)" : ""
|
||||
]
|
||||
});
|
||||
}
|
||||
function getStaleness(param) {
|
||||
let { installed, staleness, expected } = param;
|
||||
let text = "";
|
||||
let title = "";
|
||||
let indicatorClass = "";
|
||||
const versionLabel = "Next.js (" + installed + ")";
|
||||
switch(staleness){
|
||||
case "newer-than-npm":
|
||||
case "fresh":
|
||||
text = versionLabel;
|
||||
title = "Latest available version is detected (" + installed + ").";
|
||||
indicatorClass = "fresh";
|
||||
break;
|
||||
case "stale-patch":
|
||||
case "stale-minor":
|
||||
text = "" + versionLabel + " out of date";
|
||||
title = "There is a newer version (" + expected + ") available, upgrade recommended! ";
|
||||
indicatorClass = "stale";
|
||||
break;
|
||||
case "stale-major":
|
||||
{
|
||||
text = "" + versionLabel + " is outdated";
|
||||
title = "An outdated version detected (latest is " + expected + "), upgrade is highly recommended!";
|
||||
indicatorClass = "outdated";
|
||||
break;
|
||||
}
|
||||
case "stale-prerelease":
|
||||
{
|
||||
text = "" + versionLabel + " is outdated";
|
||||
title = "There is a newer canary version (" + expected + ") available, please upgrade! ";
|
||||
indicatorClass = "stale";
|
||||
break;
|
||||
}
|
||||
case "unknown":
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return {
|
||||
text,
|
||||
indicatorClass,
|
||||
title
|
||||
};
|
||||
}
|
||||
|
||||
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=VersionStalenessInfo.js.map
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/VersionStalenessInfo.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/VersionStalenessInfo.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/VersionStalenessInfo.tsx"],"names":["VersionStalenessInfo","getStaleness","props","staleness","text","indicatorClass","title","small","className","span","data-nextjs-version-checker","a","target","rel","href","process","env","TURBOPACK","installed","expected","versionLabel"],"mappings":";;;;;;;;;;;;;;;IAGgBA,oBAAoB;eAApBA;;IA6BAC,YAAY;eAAZA;;;;;gEAhCE;AAGX,SAASD,qBAAqBE,KAAkB;IACrD,IAAI,CAACA,OAAO,OAAO;IACnB,MAAM,EAAEC,SAAS,EAAE,GAAGD;IACtB,IAAI,EAAEE,IAAI,EAAEC,cAAc,EAAEC,KAAK,EAAE,GAAGL,aAAaC;IAEnD,IAAI,CAACE,MAAM,OAAO;IAElB,qBACE,sBAACG;QAAMC,WAAU;;0BACf,qBAACC;gBAAKD,WAAWH;;0BACjB,qBAACE;gBAAMG,6BAA2B;gBAACJ,OAAOA;0BACvCF;;YACM;YACRD,cAAc,WACfA,cAAc,oBACdA,cAAc,YAAY,qBACxB,qBAACQ;gBACCC,QAAO;gBACPC,KAAI;gBACJC,MAAK;0BACN;;YAIFC,QAAQC,GAAG,CAACC,SAAS,GAAG,aAAa;;;AAG5C;AAEO,SAAShB,aAAa,KAA+C;IAA/C,IAAA,EAAEiB,SAAS,EAAEf,SAAS,EAAEgB,QAAQ,EAAe,GAA/C;IAC3B,IAAIf,OAAO;IACX,IAAIE,QAAQ;IACZ,IAAID,iBAAiB;IACrB,MAAMe,eAAe,AAAC,cAAWF,YAAU;IAC3C,OAAQf;QACN,KAAK;QACL,KAAK;YACHC,OAAOgB;YACPd,QAAQ,AAAC,2CAAwCY,YAAU;YAC3Db,iBAAiB;YACjB;QACF,KAAK;QACL,KAAK;YACHD,OAAO,AAAC,KAAEgB,eAAa;YACvBd,QAAQ,AAAC,+BAA4Ba,WAAS;YAC9Cd,iBAAiB;YACjB;QACF,KAAK;YAAe;gBAClBD,OAAO,AAAC,KAAEgB,eAAa;gBACvBd,QAAQ,AAAC,6CAA0Ca,WAAS;gBAC5Dd,iBAAiB;gBACjB;YACF;QACA,KAAK;YAAoB;gBACvBD,OAAO,AAAC,KAAEgB,eAAa;gBACvBd,QAAQ,AAAC,sCAAmCa,WAAS;gBACrDd,iBAAiB;gBACjB;YACF;QACA,KAAK;YACH;QACF;YACE;IACJ;IACA,OAAO;QAAED;QAAMC;QAAgBC;IAAM;AACvC"}
|
||||
2
node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/index.d.ts
generated
vendored
Normal file
2
node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
export { styles } from './styles';
|
||||
export { VersionStalenessInfo } from './VersionStalenessInfo';
|
||||
32
node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/index.js
generated
vendored
Normal file
32
node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/index.js
generated
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
VersionStalenessInfo: null,
|
||||
styles: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
VersionStalenessInfo: function() {
|
||||
return _VersionStalenessInfo.VersionStalenessInfo;
|
||||
},
|
||||
styles: function() {
|
||||
return _styles.styles;
|
||||
}
|
||||
});
|
||||
const _styles = require("./styles");
|
||||
const _VersionStalenessInfo = require("./VersionStalenessInfo");
|
||||
|
||||
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
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/index.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/index.tsx"],"names":["VersionStalenessInfo","styles"],"mappings":";;;;;;;;;;;;;;;IACSA,oBAAoB;eAApBA,0CAAoB;;IADpBC,MAAM;eAANA,cAAM;;;wBAAQ;sCACc"}
|
||||
2
node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/styles.d.ts
generated
vendored
Normal file
2
node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/styles.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
declare const styles: string;
|
||||
export { styles };
|
||||
30
node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/styles.js
generated
vendored
Normal file
30
node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/styles.js
generated
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "styles", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return styles;
|
||||
}
|
||||
});
|
||||
const _tagged_template_literal_loose = require("@swc/helpers/_/_tagged_template_literal_loose");
|
||||
const _nooptemplate = require("../../helpers/noop-template");
|
||||
function _templateObject() {
|
||||
const data = _tagged_template_literal_loose._([
|
||||
"\n .nextjs-container-build-error-version-status {\n flex: 1;\n text-align: right;\n }\n .nextjs-container-build-error-version-status small {\n margin-left: var(--size-gap);\n font-size: var(--size-font-small);\n }\n .nextjs-container-build-error-version-status a {\n font-size: var(--size-font-small);\n }\n .nextjs-container-build-error-version-status span {\n display: inline-block;\n width: 10px;\n height: 10px;\n border-radius: 5px;\n background: var(--color-ansi-bright-black);\n }\n .nextjs-container-build-error-version-status span.fresh {\n background: var(--color-ansi-green);\n }\n .nextjs-container-build-error-version-status span.stale {\n background: var(--color-ansi-yellow);\n }\n .nextjs-container-build-error-version-status span.outdated {\n background: var(--color-ansi-red);\n }\n"
|
||||
]);
|
||||
_templateObject = function() {
|
||||
return data;
|
||||
};
|
||||
return data;
|
||||
}
|
||||
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=styles.js.map
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/styles.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/styles.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/VersionStalenessInfo/styles.ts"],"names":["styles","css"],"mappings":";;;;+BAgCSA;;;eAAAA;;;;8BAhCmB;;;;;;;;;;AAE5B,MAAMA,aAASC,kBAAG"}
|
||||
5
node_modules/next/dist/client/components/react-dev-overlay/internal/components/hot-linked-text/index.d.ts
generated
vendored
Normal file
5
node_modules/next/dist/client/components/react-dev-overlay/internal/components/hot-linked-text/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
import React from 'react';
|
||||
export declare const HotlinkedText: React.FC<{
|
||||
text: string;
|
||||
matcher?: (text: string) => boolean;
|
||||
}>;
|
||||
74
node_modules/next/dist/client/components/react-dev-overlay/internal/components/hot-linked-text/index.js
generated
vendored
Normal file
74
node_modules/next/dist/client/components/react-dev-overlay/internal/components/hot-linked-text/index.js
generated
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "HotlinkedText", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return HotlinkedText;
|
||||
}
|
||||
});
|
||||
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 _magicidentifier = require("../../../../../../shared/lib/magic-identifier");
|
||||
const linkRegex = /https?:\/\/[^\s/$.?#].[^\s)'"]*/i;
|
||||
const splitRegexp = new RegExp("(" + _magicidentifier.MAGIC_IDENTIFIER_REGEX.source + "|\\s+)");
|
||||
const HotlinkedText = function HotlinkedText(props) {
|
||||
const { text, matcher } = props;
|
||||
const wordsAndWhitespaces = text.split(splitRegexp);
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
|
||||
children: wordsAndWhitespaces.map((word, index)=>{
|
||||
if (linkRegex.test(word)) {
|
||||
const link = linkRegex.exec(word);
|
||||
const href = link[0];
|
||||
// If link matcher is present but the link doesn't match, don't turn it into a link
|
||||
if (typeof matcher === "function" && !matcher(href)) {
|
||||
return word;
|
||||
}
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_react.default.Fragment, {
|
||||
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("a", {
|
||||
href: href,
|
||||
target: "_blank",
|
||||
rel: "noreferrer noopener",
|
||||
children: word
|
||||
})
|
||||
}, "link-" + index);
|
||||
}
|
||||
try {
|
||||
const decodedWord = (0, _magicidentifier.decodeMagicIdentifier)(word);
|
||||
if (decodedWord !== word) {
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("i", {
|
||||
children: [
|
||||
"{",
|
||||
decodedWord,
|
||||
"}"
|
||||
]
|
||||
}, "ident-" + index);
|
||||
}
|
||||
} catch (e) {
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("i", {
|
||||
children: [
|
||||
"{",
|
||||
word,
|
||||
" (decoding failed: ",
|
||||
"" + e,
|
||||
")",
|
||||
"}"
|
||||
]
|
||||
}, "ident-" + index);
|
||||
}
|
||||
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_react.default.Fragment, {
|
||||
children: word
|
||||
}, "text-" + index);
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
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
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/hot-linked-text/index.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/components/hot-linked-text/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/client/components/react-dev-overlay/internal/components/hot-linked-text/index.tsx"],"names":["HotlinkedText","linkRegex","splitRegexp","RegExp","MAGIC_IDENTIFIER_REGEX","source","props","text","matcher","wordsAndWhitespaces","split","map","word","index","test","link","exec","href","React","Fragment","a","target","rel","decodedWord","decodeMagicIdentifier","i","e"],"mappings":";;;;+BAUaA;;;eAAAA;;;;;gEAVK;iCAIX;AAEP,MAAMC,YAAY;AAElB,MAAMC,cAAc,IAAIC,OAAO,AAAC,MAAGC,uCAAsB,CAACC,MAAM,GAAC;AAE1D,MAAML,gBAGR,SAASA,cAAcM,KAAK;IAC/B,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAE,GAAGF;IAE1B,MAAMG,sBAAsBF,KAAKG,KAAK,CAACR;IAEvC,qBACE;kBACGO,oBAAoBE,GAAG,CAAC,CAACC,MAAMC;YAC9B,IAAIZ,UAAUa,IAAI,CAACF,OAAO;gBACxB,MAAMG,OAAOd,UAAUe,IAAI,CAACJ;gBAC5B,MAAMK,OAAOF,IAAI,CAAC,EAAE;gBACpB,mFAAmF;gBACnF,IAAI,OAAOP,YAAY,cAAc,CAACA,QAAQS,OAAO;oBACnD,OAAOL;gBACT;gBACA,qBACE,qBAACM,cAAK,CAACC,QAAQ;8BACb,cAAA,qBAACC;wBAAEH,MAAMA;wBAAMI,QAAO;wBAASC,KAAI;kCAChCV;;mBAFgB,AAAC,UAAOC;YAMjC;YACA,IAAI;gBACF,MAAMU,cAAcC,IAAAA,sCAAqB,EAACZ;gBAC1C,IAAIW,gBAAgBX,MAAM;oBACxB,qBACE,sBAACa;;4BACE;4BACAF;4BACA;;uBAHK,AAAC,WAAQV;gBAMrB;YACF,EAAE,OAAOa,GAAG;gBACV,qBACE,sBAACD;;wBACE;wBACAb;wBAAK;wBAAoB,KAAKc;wBAAE;wBAAE;;mBAF7B,AAAC,WAAQb;YAKrB;YACA,qBAAO,qBAACK,cAAK,CAACC,QAAQ;0BAAwBP;eAAlB,AAAC,UAAOC;QACtC;;AAGN"}
|
||||
8
node_modules/next/dist/client/components/react-dev-overlay/internal/container/BuildError.d.ts
generated
vendored
Normal file
8
node_modules/next/dist/client/components/react-dev-overlay/internal/container/BuildError.d.ts
generated
vendored
Normal 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;
|
||||
99
node_modules/next/dist/client/components/react-dev-overlay/internal/container/BuildError.js
generated
vendored
Normal file
99
node_modules/next/dist/client/components/react-dev-overlay/internal/container/BuildError.js
generated
vendored
Normal 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
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/container/BuildError.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/container/BuildError.js.map
generated
vendored
Normal 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"}
|
||||
16
node_modules/next/dist/client/components/react-dev-overlay/internal/container/Errors.d.ts
generated
vendored
Normal file
16
node_modules/next/dist/client/components/react-dev-overlay/internal/container/Errors.d.ts
generated
vendored
Normal 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 {};
|
||||
339
node_modules/next/dist/client/components/react-dev-overlay/internal/container/Errors.js
generated
vendored
Normal file
339
node_modules/next/dist/client/components/react-dev-overlay/internal/container/Errors.js
generated
vendored
Normal 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
|
||||
1
node_modules/next/dist/client/components/react-dev-overlay/internal/container/Errors.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/components/react-dev-overlay/internal/container/Errors.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
5
node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/CallStackFrame.d.ts
generated
vendored
Normal file
5
node_modules/next/dist/client/components/react-dev-overlay/internal/container/RuntimeError/CallStackFrame.d.ts
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
/// <reference types="react" />
|
||||
import { type OriginalStackFrame } from '../../helpers/stack-frame';
|
||||
export declare const CallStackFrame: React.FC<{
|
||||
frame: OriginalStackFrame;
|
||||
}>;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user