feat(blog): add file-based blog with dynamic slugs, MDX content and layout shell

- Introduced blog routing using Next.js App Router
- Implemented dynamic [slug] pages for blog posts
- Added MDX-based content loading via lib/posts
- Integrated shared TopBar layout with navigation
- Established clear content, lib and component separation
This commit is contained in:
PascalSchattenburg
2026-01-22 14:14:15 +01:00
parent b717952234
commit d147843c76
10412 changed files with 2475583 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
import type { OriginalStackFrame } from '../../../shared/stack-frame';
export declare const CallStackFrame: React.FC<{
frame: OriginalStackFrame;
}>;
export declare const CALL_STACK_FRAME_STYLES = "\n [data-nextjs-call-stack-frame-no-source] {\n padding: 6px 8px;\n margin-bottom: 4px;\n\n border-radius: var(--rounded-lg);\n }\n\n [data-nextjs-call-stack-frame-no-source]:last-child {\n margin-bottom: 0;\n }\n\n [data-nextjs-call-stack-frame-ignored=\"true\"] {\n opacity: 0.6;\n }\n\n [data-nextjs-call-stack-frame] {\n user-select: text;\n display: block;\n box-sizing: border-box;\n\n user-select: text;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n\n padding: 6px 8px;\n\n border-radius: var(--rounded-lg);\n }\n\n .call-stack-frame-method-name {\n display: flex;\n align-items: center;\n gap: 4px;\n\n margin-bottom: 4px;\n font-family: var(--font-stack-monospace);\n\n color: var(--color-gray-1000);\n font-size: var(--size-14);\n font-weight: 500;\n line-height: var(--size-20);\n\n svg {\n width: var(--size-16px);\n height: var(--size-16px);\n }\n }\n\n .open-in-editor-button, .source-mapping-error-button {\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--rounded-full);\n padding: 4px;\n color: var(--color-font);\n\n svg {\n width: var(--size-16);\n height: var(--size-16);\n }\n\n &:focus-visible {\n outline: var(--focus-ring);\n outline-offset: -2px;\n }\n\n &:hover {\n background: var(--color-gray-100);\n }\n }\n\n .call-stack-frame-file-source {\n color: var(--color-gray-900);\n font-size: var(--size-14);\n line-height: var(--size-20);\n }\n";

View File

@@ -0,0 +1,8 @@
import type { OriginalStackFrame } from '../../../shared/stack-frame';
export declare function CallStack({ frames, isIgnoreListOpen, ignoredFramesTally, onToggleIgnoreList, }: {
frames: readonly OriginalStackFrame[];
isIgnoreListOpen: boolean;
ignoredFramesTally: number;
onToggleIgnoreList: () => void;
}): import("react/jsx-runtime").JSX.Element;
export declare const CALL_STACK_STYLES: string;

View File

@@ -0,0 +1,8 @@
import { type StackFrame } from '../../../shared/stack-frame';
type CodeFrameProps = {
stackFrame: StackFrame;
codeFrame: string;
};
export declare function CodeFrame({ stackFrame, codeFrame }: CodeFrameProps): import("react/jsx-runtime").JSX.Element;
export declare const CODE_FRAME_STYLES = "\n [data-nextjs-codeframe] {\n --code-frame-padding: 12px;\n --code-frame-line-height: var(--size-16);\n background-color: var(--color-background-200);\n color: var(--color-gray-1000);\n text-overflow: ellipsis;\n border: 1px solid var(--color-gray-400);\n border-radius: 8px;\n font-family: var(--font-stack-monospace);\n font-size: var(--size-12);\n line-height: var(--code-frame-line-height);\n margin: 8px 0;\n\n svg {\n width: var(--size-16);\n height: var(--size-16);\n }\n }\n\n .code-frame-link,\n .code-frame-pre {\n padding: var(--code-frame-padding);\n }\n\n .code-frame-link svg {\n flex-shrink: 0;\n }\n\n .code-frame-lines {\n min-width: max-content;\n }\n\n .code-frame-link [data-text] {\n text-align: left;\n margin: auto 6px;\n }\n\n .code-frame-header {\n width: 100%;\n transition: background 100ms ease-out;\n border-radius: 8px 8px 0 0;\n border-bottom: 1px solid var(--color-gray-400);\n }\n\n [data-with-open-in-editor-link-source-file] {\n padding: 4px;\n margin: -4px 0 -4px auto;\n border-radius: var(--rounded-full);\n margin-left: auto;\n\n &:focus-visible {\n outline: var(--focus-ring);\n outline-offset: -2px;\n }\n\n &:hover {\n background: var(--color-gray-100);\n }\n }\n\n [data-nextjs-codeframe]::selection,\n [data-nextjs-codeframe] *::selection {\n background-color: var(--color-ansi-selection);\n }\n\n [data-nextjs-codeframe] *:not(a) {\n color: inherit;\n background-color: transparent;\n font-family: var(--font-stack-monospace);\n }\n\n [data-nextjs-codeframe-line][data-nextjs-codeframe-line--errored=\"true\"] {\n position: relative;\n isolation: isolate;\n\n > span { \n position: relative;\n z-index: 1;\n }\n\n &::after {\n content: \"\";\n width: calc(100% + var(--code-frame-padding) * 2);\n height: var(--code-frame-line-height);\n left: calc(-1 * var(--code-frame-padding));\n background: var(--color-red-200);\n box-shadow: 2px 0 0 0 var(--color-red-900) inset;\n position: absolute;\n }\n }\n\n\n [data-nextjs-codeframe] > * {\n margin: 0;\n }\n\n .code-frame-link {\n display: flex;\n margin: 0;\n outline: 0;\n }\n .code-frame-link [data-icon='right'] {\n margin-left: auto;\n }\n\n [data-nextjs-codeframe] div > pre {\n overflow: hidden;\n display: inline-block;\n }\n\n [data-nextjs-codeframe] svg {\n color: var(--color-gray-900);\n }\n";
export {};

View File

@@ -0,0 +1,8 @@
import { type AnserJsonEntry } from 'next/dist/compiled/anser';
import type { StackFrame } from '../../../shared/stack-frame';
export declare function formatCodeFrame(codeFrame: string): string;
export declare function groupCodeFrameLines(formattedFrame: string): AnserJsonEntry[][];
export declare function parseLineNumberFromCodeFrameLine(line: AnserJsonEntry[], stackFrame: StackFrame): {
lineNumber: string | undefined;
isErroredLine: boolean;
};

View File

@@ -0,0 +1,12 @@
import * as React from 'react';
type CopyButtonProps = React.HTMLProps<HTMLButtonElement> & {
actionLabel: string;
successLabel: string;
icon?: React.ReactNode;
};
export declare function CopyButton(props: CopyButtonProps & {
content?: string;
getContent?: () => string;
}): import("react/jsx-runtime").JSX.Element;
export declare const COPY_BUTTON_STYLES = "\n .nextjs-data-copy-button {\n color: inherit;\n\n svg {\n width: var(--size-16);\n height: var(--size-16);\n }\n }\n .nextjs-data-copy-button:disabled {\n background-color: var(--color-gray-100);\n cursor: not-allowed;\n }\n .nextjs-data-copy-button--initial:hover:not(:disabled) {\n cursor: pointer;\n }\n .nextjs-data-copy-button--error:not(:disabled),\n .nextjs-data-copy-button--error:hover:not(:disabled) {\n color: var(--color-ansi-red);\n }\n .nextjs-data-copy-button--success:not(:disabled) {\n color: var(--color-ansi-green);\n }\n";
export {};

View File

@@ -0,0 +1,11 @@
import './devtools-indicator.css';
import type { DevToolsIndicatorPosition } from '../../shared';
export declare const INDICATOR_PADDING = 20;
export declare function DevToolsIndicator(): import("react/jsx-runtime").JSX.Element;
/**
* makes sure we eventually sync the panel to the logo, otherwise
* it will be jarring if the panels start appearing on the other
* side of the logo. This wont teleport the panel because the indicator
* cannot be dragged when any panel is open
*/
export declare const useUpdateAllPanelPositions: () => (position: DevToolsIndicatorPosition) => void;

View File

@@ -0,0 +1 @@
export declare function useMeasureWidth(ref: React.RefObject<HTMLDivElement | null>): number;

View File

@@ -0,0 +1,12 @@
/**
* A React hook that ensures a loading state persists
* at least up to the next multiple of a given interval (default: 750ms).
*
* For example, if you're done loading at 1200ms, it forces you to wait
* until 1500ms. If its 1800ms, it waits until 2250ms, etc.
*
* @param isLoadingTrigger - Boolean that triggers the loading state
* @param interval - The time interval multiple in ms (default: 750ms)
* @returns Current loading state that respects multiples of the interval
*/
export declare function useMinimumLoadingTimeMultiple(isLoadingTrigger: boolean, interval?: number): boolean;

View File

@@ -0,0 +1 @@
export declare function useUpdateAnimation(issueCount: number, animationDurationMs?: number): boolean;

View File

@@ -0,0 +1,3 @@
export declare function NextLogo({ onTriggerClick, ...buttonProps }: {
onTriggerClick: () => void;
} & React.ComponentProps<'button'>): import("react/jsx-runtime").JSX.Element;

View File

@@ -0,0 +1,15 @@
import type { CacheIndicatorState } from '../../cache-indicator';
export declare enum Status {
None = "none",
Rendering = "rendering",
Compiling = "compiling",
Prerendering = "prerendering",
CacheBypassing = "cache-bypassing"
}
export declare function getCurrentStatus(buildingIndicator: boolean, renderingIndicator: boolean, cacheIndicator: CacheIndicatorState): Status;
interface StatusIndicatorProps {
status: Status;
onClick?: () => void;
}
export declare function StatusIndicator({ status, onClick }: StatusIndicatorProps): import("react/jsx-runtime").JSX.Element | null;
export {};

View File

@@ -0,0 +1,7 @@
import type { Corners } from '../../../shared';
import { type ResizeDirection } from './resize-provider';
import './resize-handle.css';
export declare const ResizeHandle: ({ direction, position, }: {
direction: ResizeDirection;
position: Corners;
}) => import("react/jsx-runtime").JSX.Element | null;

View File

@@ -0,0 +1,36 @@
import { type RefObject } from 'react';
import { type Corners } from '../../../shared';
export type ResizeDirection = 'top' | 'right' | 'bottom' | 'left' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
interface ResizeContextValue {
resizeRef: RefObject<HTMLElement | null>;
minWidth: number;
minHeight: number;
maxWidth?: number;
maxHeight?: number;
draggingDirection: ResizeDirection | null;
setDraggingDirection: (direction: ResizeDirection | null) => void;
storageKey: string;
}
interface ResizeProviderProps {
value: {
resizeRef: RefObject<HTMLElement | null>;
minWidth?: number;
minHeight?: number;
maxWidth?: number;
maxHeight?: number;
devToolsPosition: Corners;
devToolsPanelSize: Record<string, {
width: number;
height: number;
}>;
storageKey?: string;
initialSize?: {
height: number;
width: number;
};
};
children: React.ReactNode;
}
export declare const ResizeProvider: ({ value, children }: ResizeProviderProps) => import("react/jsx-runtime").JSX.Element;
export declare const useResize: () => ResizeContextValue;
export {};

View File

@@ -0,0 +1,7 @@
import * as React from 'react';
type DialogBodyProps = {
children?: React.ReactNode;
className?: string;
} & React.HTMLAttributes<HTMLDivElement>;
declare const DialogBody: React.FC<DialogBodyProps>;
export { DialogBody };

View File

@@ -0,0 +1,7 @@
import * as React from 'react';
type DialogContentProps = {
children?: React.ReactNode;
className?: string;
} & React.HTMLAttributes<HTMLDivElement>;
declare const DialogContent: React.FC<DialogContentProps>;
export { DialogContent };

View File

@@ -0,0 +1,3 @@
type DialogHeaderProps = React.HTMLAttributes<HTMLDivElement>;
export declare function DialogHeader(props: DialogHeaderProps): import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -0,0 +1,10 @@
import * as React from 'react';
type DialogProps = {
children?: React.ReactNode;
'aria-labelledby': string;
'aria-describedby': string;
className?: string;
onClose?: () => void;
} & React.HTMLAttributes<HTMLDivElement>;
declare const Dialog: React.FC<DialogProps>;
export { Dialog };

View File

@@ -0,0 +1,3 @@
export { DialogBody } from './dialog-body';
export { DialogContent } from './dialog-content';
export { styles } from './styles';

View File

@@ -0,0 +1 @@
export declare const styles: string;

View File

@@ -0,0 +1,9 @@
import React from 'react';
interface DevToolsHeaderProps {
title: React.ReactNode;
children?: React.ReactNode;
}
export declare function DevToolsHeader({ title, children, ref, }: DevToolsHeaderProps & {
ref?: React.Ref<HTMLDivElement>;
}): import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -0,0 +1,15 @@
import type { ComponentProps } from 'react';
export declare const learnMoreLink: {
readonly pages: {
readonly static: "https://nextjs.org/docs/pages/building-your-application/rendering/static-site-generation";
readonly dynamic: "https://nextjs.org/docs/pages/building-your-application/rendering/server-side-rendering";
};
readonly app: {
readonly static: "https://nextjs.org/docs/app/building-your-application/rendering/server-components#static-rendering-default";
readonly dynamic: "https://nextjs.org/docs/app/building-your-application/rendering/server-components#dynamic-rendering";
};
};
export declare function RouteInfoBody({ routerType, isStaticRoute, ...props }: {
routerType: 'pages' | 'app';
isStaticRoute: boolean;
} & ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;

View File

@@ -0,0 +1,5 @@
export declare function ShortcutRecorder({ value, onChange, }: {
value: string[] | null;
onChange: (value: string | null) => void;
}): import("react/jsx-runtime").JSX.Element;
export declare const SHORTCUT_RECORDER_STYLES: string;

View File

@@ -0,0 +1,12 @@
import type { DevToolsIndicatorPosition, DevToolsScale } from '../../../../shared';
export declare function UserPreferencesBody({ theme, hide, hideShortcut, setHideShortcut, scale, setPosition, setScale, position, }: {
theme: 'dark' | 'light' | 'system';
hide: () => void;
hideShortcut: string | null;
setHideShortcut: (value: string | null) => void;
setPosition: (position: DevToolsIndicatorPosition) => void;
position: DevToolsIndicatorPosition;
scale: DevToolsScale;
setScale: (value: DevToolsScale) => void;
}): import("react/jsx-runtime").JSX.Element;
export declare const DEV_TOOLS_INFO_USER_PREFERENCES_STYLES: string;

View File

@@ -0,0 +1,16 @@
import React, { type Ref } from 'react';
interface DragContextValue {
register: (el: HTMLElement) => void;
unregister: (el: HTMLElement) => void;
handles: Set<HTMLElement>;
disabled: boolean;
}
export declare function DragProvider({ children, disabled, }: {
children: React.ReactNode;
disabled?: boolean;
}): import("react/jsx-runtime").JSX.Element;
export declare function useDragContext(): DragContextValue | null;
export declare function DragHandle({ children, ref, ...props }: React.HTMLAttributes<HTMLDivElement> & {
ref?: Ref<HTMLDivElement>;
}): import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -0,0 +1,16 @@
import type { Corners } from '../../../shared';
export declare function Draggable({ children, padding, position: currentCorner, setPosition: setCurrentCorner, onDragStart, dragHandleSelector, disableDrag, avoidZone, ...props }: {
children: React.ReactElement;
position: Corners;
padding: number;
setPosition: (position: Corners) => void;
onDragStart?: () => void;
dragHandleSelector?: string;
disableDrag?: boolean;
style?: React.CSSProperties;
avoidZone?: {
square: number;
corner: Corners;
padding: number;
};
}): import("react/jsx-runtime").JSX.Element;

View File

@@ -0,0 +1,5 @@
export declare function useFocusTrap(rootRef: React.RefObject<HTMLElement | null>, triggerRef: React.RefObject<HTMLButtonElement | null> | null, active: boolean, onOpenFocus?: () => void): void;
export declare function getActiveElement(node: HTMLElement | null): HTMLElement | null;
export declare function useClickOutsideAndEscape(rootRef: React.RefObject<HTMLElement | null>, triggerRef: React.RefObject<HTMLButtonElement | null>, active: boolean, close: (reason: 'escape' | 'outside') => void, ownerDocument?: Document): void;
export declare const MENU_DURATION_MS = 200;
export declare const MENU_CURVE = "cubic-bezier(0.175, 0.885, 0.32, 1.1)";

View File

@@ -0,0 +1,7 @@
type ErrorOverlayDialogBodyProps = {
children?: React.ReactNode;
onClose?: () => void;
};
export declare function ErrorOverlayDialogBody({ children, }: ErrorOverlayDialogBodyProps): import("react/jsx-runtime").JSX.Element;
export declare const DIALOG_BODY_STYLES = "";
export {};

View File

@@ -0,0 +1,8 @@
type ErrorOverlayDialogProps = {
children?: React.ReactNode;
onClose?: () => void;
footer?: React.ReactNode;
} & React.HTMLAttributes<HTMLDivElement>;
export declare function ErrorOverlayDialog({ children, onClose, footer, ...props }: ErrorOverlayDialogProps): import("react/jsx-runtime").JSX.Element;
export declare const DIALOG_STYLES = "\n .error-overlay-dialog-container {\n display: flex;\n flex-direction: column;\n background: var(--color-background-100);\n background-clip: padding-box;\n border: var(--next-dialog-border-width) solid var(--color-gray-400);\n border-radius: 0 0 var(--next-dialog-radius) var(--next-dialog-radius);\n box-shadow: var(--shadow-menu);\n position: relative;\n overflow: hidden;\n }\n\n .error-overlay-dialog-scroll {\n overflow-y: auto;\n height: 100%;\n }\n";
export {};

View File

@@ -0,0 +1,6 @@
type ErrorOverlayDialogHeaderProps = {
children?: React.ReactNode;
};
export declare function ErrorOverlayDialogHeader({ children, }: ErrorOverlayDialogHeaderProps): import("react/jsx-runtime").JSX.Element;
export declare const DIALOG_HEADER_STYLES = "\n .nextjs-container-errors-header {\n position: relative;\n }\n .nextjs-container-errors-header > h1 {\n font-size: var(--size-20);\n line-height: var(--size-24);\n font-weight: bold;\n margin: calc(16px * 1.5) 0;\n color: var(--color-title-h1);\n }\n .nextjs-container-errors-header small {\n font-size: var(--size-14);\n color: var(--color-accents-1);\n margin-left: 16px;\n }\n .nextjs-container-errors-header small > span {\n font-family: var(--font-stack-monospace);\n }\n .nextjs-container-errors-header > div > small {\n margin: 0;\n margin-top: 4px;\n }\n .nextjs-container-errors-header > p > a {\n color: inherit;\n font-weight: bold;\n }\n .nextjs-container-errors-header\n > .nextjs-container-build-error-version-status {\n position: absolute;\n top: 16px;\n right: 16px;\n }\n";
export {};

View File

@@ -0,0 +1,4 @@
export declare function EnvironmentNameLabel({ environmentName, }: {
environmentName: string;
}): import("react/jsx-runtime").JSX.Element;
export declare const ENVIRONMENT_NAME_LABEL_STYLES = "\n [data-nextjs-environment-name-label] {\n padding: 2px 6px;\n margin: 0;\n border-radius: var(--rounded-md-2);\n background: var(--color-gray-100);\n font-weight: 600;\n font-size: var(--size-12);\n color: var(--color-gray-900);\n font-family: var(--font-stack-monospace);\n line-height: var(--size-20);\n }\n";

View File

@@ -0,0 +1,9 @@
import type { ErrorType } from '../error-type-label/error-type-label';
export type ErrorMessageType = React.ReactNode;
type ErrorMessageProps = {
errorMessage: ErrorMessageType;
errorType: ErrorType;
};
export declare function ErrorMessage({ errorMessage, errorType }: ErrorMessageProps): import("react/jsx-runtime").JSX.Element;
export declare const styles = "\n .nextjs__container_errors_wrapper {\n position: relative;\n }\n\n .nextjs__container_errors_desc {\n margin: 0;\n margin-left: 4px;\n color: var(--color-red-900);\n font-weight: 500;\n font-size: var(--size-16);\n letter-spacing: -0.32px;\n line-height: var(--size-24);\n overflow-wrap: break-word;\n white-space: pre-wrap;\n }\n\n .nextjs__container_errors_desc.truncated {\n max-height: 200px;\n overflow: hidden;\n }\n\n .nextjs__container_errors_gradient_overlay {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 85px;\n background: linear-gradient(\n 180deg,\n rgba(250, 250, 250, 0) 0%,\n var(--color-background-100) 100%\n );\n }\n\n .nextjs__container_errors_expand_button {\n position: absolute;\n bottom: 10px;\n left: 50%;\n transform: translateX(-50%);\n display: flex;\n align-items: center;\n padding: 6px 8px;\n background: var(--color-background-100);\n border: 1px solid var(--color-gray-alpha-400);\n border-radius: 999px;\n box-shadow:\n 0px 2px 2px var(--color-gray-alpha-100),\n 0px 8px 8px -8px var(--color-gray-alpha-100);\n font-size: var(--size-13);\n cursor: pointer;\n color: var(--color-gray-900);\n font-weight: 500;\n transition: background-color 0.2s ease;\n }\n\n .nextjs__container_errors_expand_button:hover {\n background: var(--color-gray-100);\n }\n";
export {};

View File

@@ -0,0 +1,5 @@
export declare function ErrorOverlayBottomStack({ errorCount, activeIdx, }: {
errorCount: number;
activeIdx: number;
}): import("react/jsx-runtime").JSX.Element;
export declare const styles = "\n .error-overlay-bottom-stack-layer {\n width: 100%;\n height: var(--stack-layer-height);\n position: relative;\n border: 1px solid var(--color-gray-400);\n border-radius: var(--rounded-xl);\n background: var(--color-background-200);\n transition:\n translate 350ms var(--timing-swift),\n box-shadow 350ms var(--timing-swift);\n }\n\n .error-overlay-bottom-stack-layer-1 {\n width: calc(100% - var(--size-24));\n }\n\n .error-overlay-bottom-stack-layer-2 {\n width: calc(100% - var(--size-48));\n z-index: -1;\n }\n\n .error-overlay-bottom-stack {\n width: 100%;\n position: absolute;\n bottom: -1px;\n height: 0;\n overflow: visible;\n }\n\n .error-overlay-bottom-stack-stack {\n --stack-layer-height: 44px;\n --stack-layer-height-half: calc(var(--stack-layer-height) / 2);\n --stack-layer-trim: 13px;\n --shadow: 0px 0.925px 0.925px 0px rgba(0, 0, 0, 0.02),\n 0px 3.7px 7.4px -3.7px rgba(0, 0, 0, 0.04),\n 0px 14.8px 22.2px -7.4px rgba(0, 0, 0, 0.06);\n\n display: grid;\n place-items: center center;\n width: 100%;\n position: fixed;\n height: 0;\n overflow: visible;\n z-index: -1;\n max-width: var(--next-dialog-max-width);\n\n .error-overlay-bottom-stack-layer {\n grid-area: 1 / 1;\n /* Hide */\n translate: 0 calc(var(--stack-layer-height) * -1);\n }\n\n &[data-stack-count='1'],\n &[data-stack-count='2'] {\n .error-overlay-bottom-stack-layer-1 {\n translate: 0\n calc(var(--stack-layer-height-half) * -1 - var(--stack-layer-trim));\n }\n }\n\n &[data-stack-count='2'] {\n .error-overlay-bottom-stack-layer-2 {\n translate: 0 calc(var(--stack-layer-trim) * -1 * 2);\n }\n }\n\n /* Only the bottom stack should have the shadow */\n &[data-stack-count='1'] .error-overlay-bottom-stack-layer-1 {\n box-shadow: var(--shadow);\n }\n\n &[data-stack-count='2'] {\n .error-overlay-bottom-stack-layer-2 {\n box-shadow: var(--shadow);\n }\n }\n }\n";

View File

@@ -0,0 +1,7 @@
import type { OriginalStackFrame } from '../../../../shared/stack-frame';
interface CallStackProps {
frames: readonly OriginalStackFrame[];
dialogResizerRef: React.RefObject<HTMLDivElement | null>;
}
export declare function ErrorOverlayCallStack({ frames, dialogResizerRef, }: CallStackProps): import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -0,0 +1,7 @@
interface ErrorFeedbackProps {
errorCode: string;
className?: string;
}
export declare function ErrorFeedback({ errorCode, className }: ErrorFeedbackProps): import("react/jsx-runtime").JSX.Element;
export declare const styles = "\n .error-feedback {\n display: flex;\n align-items: center;\n gap: 8px;\n white-space: nowrap;\n color: var(--color-gray-900);\n }\n\n .error-feedback-thanks {\n height: var(--size-24);\n display: flex;\n align-items: center;\n padding-right: 4px; /* To match the 4px inner padding of the thumbs up and down icons */\n }\n\n .feedback-button {\n background: none;\n border: none;\n border-radius: var(--rounded-md);\n width: var(--size-24);\n height: var(--size-24);\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n\n &:focus {\n outline: var(--focus-ring);\n }\n\n &:hover {\n background: var(--color-gray-alpha-100);\n }\n\n &:active {\n background: var(--color-gray-alpha-200);\n }\n }\n\n .feedback-button[aria-disabled='true'] {\n opacity: 0.7;\n cursor: not-allowed;\n }\n\n .feedback-button.voted {\n background: var(--color-gray-alpha-200);\n }\n\n .thumbs-up-icon,\n .thumbs-down-icon {\n color: var(--color-gray-900);\n width: var(--size-16);\n height: var(--size-16);\n }\n";
export {};

View File

@@ -0,0 +1,6 @@
type ErrorOverlayFooterProps = {
errorCode: string | undefined;
};
export declare function ErrorOverlayFooter({ errorCode }: ErrorOverlayFooterProps): import("react/jsx-runtime").JSX.Element;
export declare const styles = "\n .error-overlay-footer {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n\n gap: 8px;\n padding: 12px;\n background: var(--color-background-200);\n border-top: 1px solid var(--color-gray-400);\n }\n\n .error-feedback {\n margin-left: auto;\n\n p {\n font-size: var(--size-14);\n font-weight: 500;\n margin: 0;\n }\n }\n\n \n .error-feedback {\n display: flex;\n align-items: center;\n gap: 8px;\n white-space: nowrap;\n color: var(--color-gray-900);\n }\n\n .error-feedback-thanks {\n height: var(--size-24);\n display: flex;\n align-items: center;\n padding-right: 4px; /* To match the 4px inner padding of the thumbs up and down icons */\n }\n\n .feedback-button {\n background: none;\n border: none;\n border-radius: var(--rounded-md);\n width: var(--size-24);\n height: var(--size-24);\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n\n &:focus {\n outline: var(--focus-ring);\n }\n\n &:hover {\n background: var(--color-gray-alpha-100);\n }\n\n &:active {\n background: var(--color-gray-alpha-200);\n }\n }\n\n .feedback-button[aria-disabled='true'] {\n opacity: 0.7;\n cursor: not-allowed;\n }\n\n .feedback-button.voted {\n background: var(--color-gray-alpha-200);\n }\n\n .thumbs-up-icon,\n .thumbs-down-icon {\n color: var(--color-gray-900);\n width: var(--size-16);\n height: var(--size-16);\n }\n\n";
export {};

View File

@@ -0,0 +1,23 @@
import * as React from 'react';
import type { DebugInfo } from '../../../../shared/types';
import type { ErrorMessageType } from '../error-message/error-message';
import type { ErrorType } from '../error-type-label/error-type-label';
import type { ErrorBaseProps } from '../error-overlay/error-overlay';
import type { ReadyRuntimeError } from '../../../utils/get-error-by-type';
export interface ErrorOverlayLayoutProps extends ErrorBaseProps {
errorMessage: ErrorMessageType;
errorType: ErrorType;
children?: React.ReactNode;
errorCode?: string;
error: ReadyRuntimeError['error'];
debugInfo?: DebugInfo;
isBuildError?: boolean;
onClose?: () => void;
runtimeErrors?: ReadyRuntimeError[];
activeIdx?: number;
setActiveIndex?: (index: number) => void;
dialogResizerRef?: React.RefObject<HTMLDivElement | null>;
generateErrorInfo: () => string;
}
export declare function ErrorOverlayLayout({ errorMessage, errorType, children, errorCode, errorCount, error, debugInfo, isBuildError, onClose, versionInfo, runtimeErrors, activeIdx, setActiveIndex, isTurbopack, dialogResizerRef, generateErrorInfo, rendered, transitionDurationMs, }: ErrorOverlayLayoutProps): import("react/jsx-runtime").JSX.Element;
export declare const styles: string;

View File

@@ -0,0 +1,12 @@
import type { VersionInfo } from '../../../../../server/dev/parse-version-info';
import type { ReadyRuntimeError } from '../../../utils/get-error-by-type';
type ErrorOverlayNavProps = {
runtimeErrors?: ReadyRuntimeError[];
activeIdx?: number;
setActiveIndex?: (index: number) => void;
versionInfo?: VersionInfo;
isTurbopack?: boolean;
};
export declare function ErrorOverlayNav({ runtimeErrors, activeIdx, setActiveIndex, versionInfo, }: ErrorOverlayNavProps): import("react/jsx-runtime").JSX.Element;
export declare const styles = "\n [data-nextjs-error-overlay-nav] {\n --stroke-color: var(--color-gray-400);\n --background-color: var(--color-background-100);\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n width: 100%;\n\n position: relative;\n z-index: 2;\n outline: none;\n translate: var(--next-dialog-border-width) var(--next-dialog-border-width);\n max-width: var(--next-dialog-max-width);\n\n .error-overlay-notch {\n translate: calc(var(--next-dialog-border-width) * -1);\n width: auto;\n height: var(--next-dialog-notch-height);\n padding: 12px;\n background: var(--background-color);\n border: var(--next-dialog-border-width) solid var(--stroke-color);\n border-bottom: none;\n position: relative;\n\n &[data-side='left'] {\n padding-right: 0;\n border-radius: var(--next-dialog-radius) 0 0 0;\n\n .error-overlay-notch-tail {\n right: -54px;\n }\n\n > *:not(.error-overlay-notch-tail) {\n margin-right: -10px;\n }\n }\n\n &[data-side='right'] {\n padding-left: 0;\n border-radius: 0 var(--next-dialog-radius) 0 0;\n\n .error-overlay-notch-tail {\n left: -54px;\n transform: rotateY(180deg);\n }\n\n > *:not(.error-overlay-notch-tail) {\n margin-left: -12px;\n }\n }\n\n .error-overlay-notch-tail {\n position: absolute;\n top: calc(var(--next-dialog-border-width) * -1);\n pointer-events: none;\n z-index: -1;\n height: calc(100% + var(--next-dialog-border-width));\n }\n }\n }\n\n @media (max-width: 600px) {\n [data-nextjs-error-overlay-nav] {\n background: var(--background-color);\n border-radius: var(--next-dialog-radius) var(--next-dialog-radius) 0 0;\n border: var(--next-dialog-border-width) solid var(--stroke-color);\n border-bottom: none;\n overflow: hidden;\n translate: 0 var(--next-dialog-border-width);\n \n .error-overlay-notch {\n border-radius: 0;\n border: 0;\n\n &[data-side=\"left\"], &[data-side=\"right\"] {\n border-radius: 0;\n }\n\n .error-overlay-notch-tail {\n display: none;\n }\n }\n }\n }\n";
export {};

View File

@@ -0,0 +1,9 @@
import type { ReadyRuntimeError } from '../../../utils/get-error-by-type';
type ErrorPaginationProps = {
runtimeErrors: ReadyRuntimeError[];
activeIdx: number;
onActiveIndexChange: (index: number) => void;
};
export declare function ErrorOverlayPagination({ runtimeErrors, activeIdx, onActiveIndexChange, }: ErrorPaginationProps): import("react/jsx-runtime").JSX.Element;
export declare const styles = "\n .error-overlay-pagination {\n -webkit-font-smoothing: antialiased;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 8px;\n width: fit-content;\n }\n\n .error-overlay-pagination-count {\n color: var(--color-gray-900);\n text-align: center;\n font-size: var(--size-14);\n font-weight: 500;\n line-height: var(--size-16);\n font-variant-numeric: tabular-nums;\n }\n\n .error-overlay-pagination-button {\n display: flex;\n justify-content: center;\n align-items: center;\n\n width: var(--size-24);\n height: var(--size-24);\n background: var(--color-gray-300);\n flex-shrink: 0;\n\n border: none;\n border-radius: var(--rounded-full);\n\n svg {\n width: var(--size-16);\n height: var(--size-16);\n }\n\n &:focus-visible {\n outline: var(--focus-ring);\n }\n\n &:not(:disabled):active {\n background: var(--color-gray-500);\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n }\n\n .error-overlay-pagination-button-icon {\n color: var(--color-gray-1000);\n }\n";
export {};

View File

@@ -0,0 +1,4 @@
export declare function CopyErrorButton({ error, generateErrorInfo, }: {
error: Error;
generateErrorInfo: () => string;
}): import("react/jsx-runtime").JSX.Element;

View File

@@ -0,0 +1,3 @@
export declare function DocsLinkButton({ errorMessage }: {
errorMessage: string;
}): import("react/jsx-runtime").JSX.Element;

View File

@@ -0,0 +1,10 @@
import type { DebugInfo } from '../../../../shared/types';
type ErrorOverlayToolbarProps = {
error: Error;
debugInfo: DebugInfo | undefined;
feedbackButton?: React.ReactNode;
generateErrorInfo: () => string;
};
export declare function ErrorOverlayToolbar({ error, debugInfo, feedbackButton, generateErrorInfo, }: ErrorOverlayToolbarProps): import("react/jsx-runtime").JSX.Element;
export declare const styles = "\n .error-overlay-toolbar {\n display: flex;\n gap: 6px;\n }\n\n .nodejs-inspector-button,\n .copy-error-button,\n .docs-link-button {\n display: flex;\n justify-content: center;\n align-items: center;\n\n width: var(--size-28);\n height: var(--size-28);\n background: var(--color-background-100);\n background-clip: padding-box;\n border: 1px solid var(--color-gray-alpha-400);\n box-shadow: var(--shadow-small);\n border-radius: var(--rounded-full);\n\n svg {\n width: var(--size-14);\n height: var(--size-14);\n }\n\n &:focus {\n outline: var(--focus-ring);\n }\n\n &:not(:disabled):hover {\n background: var(--color-gray-alpha-100);\n }\n\n &:not(:disabled):active {\n background: var(--color-gray-alpha-200);\n }\n\n &:disabled {\n background-color: var(--color-gray-100);\n cursor: not-allowed;\n }\n }\n\n .nodejs-inspector-button[data-pending='true'] {\n cursor: wait;\n }\n\n .error-overlay-toolbar-button-icon {\n color: var(--color-gray-900);\n }\n";
export {};

View File

@@ -0,0 +1,3 @@
export declare function NodejsInspectorButton({ defaultDevtoolsFrontendUrl, }: {
defaultDevtoolsFrontendUrl: string | undefined;
}): import("react/jsx-runtime").JSX.Element;

View File

@@ -0,0 +1,6 @@
export declare function useRestartServer(): {
restartServer: ({ invalidateFileSystemCache, }: {
invalidateFileSystemCache: boolean;
}) => Promise<void>;
isPending: boolean;
};

View File

@@ -0,0 +1,17 @@
import { type OverlayDispatch, type OverlayState } from '../../../shared';
import type { ReadyRuntimeError } from '../../../utils/get-error-by-type';
import type { HydrationErrorState } from '../../../../shared/hydration-error';
export interface ErrorBaseProps {
rendered: boolean;
transitionDurationMs: number;
isTurbopack: boolean;
versionInfo: OverlayState['versionInfo'];
errorCount: number;
}
export declare function ErrorOverlay({ state, dispatch, getSquashedHydrationErrorDetails, runtimeErrors, errorCount, }: {
state: OverlayState;
dispatch: OverlayDispatch;
getSquashedHydrationErrorDetails: (error: Error) => HydrationErrorState | null;
runtimeErrors: ReadyRuntimeError[];
errorCount: number;
}): import("react/jsx-runtime").JSX.Element;

View File

@@ -0,0 +1,7 @@
export type ErrorType = 'Build Error' | `Runtime ${string}` | `Console ${string}` | `Recoverable ${string}` | 'Blocking Route' | 'Ambiguous Metadata';
type ErrorTypeLabelProps = {
errorType: ErrorType;
};
export declare function ErrorTypeLabel({ errorType }: ErrorTypeLabelProps): import("react/jsx-runtime").JSX.Element;
export declare const styles = "\n .nextjs__container_errors_label {\n padding: 2px 6px;\n margin: 0;\n border-radius: var(--rounded-md-2);\n background: var(--color-red-100);\n font-weight: 600;\n font-size: var(--size-12);\n color: var(--color-red-900);\n font-family: var(--font-stack-monospace);\n line-height: var(--size-20);\n }\n\n .nextjs__container_errors_label_blocking_page {\n background: var(--color-blue-100);\n color: var(--color-blue-900);\n }\n";
export {};

View File

@@ -0,0 +1,3 @@
import { type OverlayProps } from '../../overlay/overlay';
export declare function ErrorOverlayOverlay({ children, ...props }: OverlayProps): import("react/jsx-runtime").JSX.Element;
export declare const OVERLAY_STYLES: string;

View File

@@ -0,0 +1,10 @@
import { type CSSProperties } from 'react';
export declare const Fader: import("react").ForwardRefExoticComponent<{
stop?: string;
blur?: string;
height?: number;
side: "top" | "bottom" | "left" | "right";
className?: string;
style?: CSSProperties;
} & import("react").RefAttributes<HTMLDivElement>>;
export declare const FADER_STYLES = "\n .nextjs-scroll-fader {\n --blur: 1px;\n --stop: 25%;\n --height: 150px;\n --color-bg: var(--color-background-100);\n position: absolute;\n pointer-events: none;\n user-select: none;\n width: 100%;\n height: var(--height);\n left: 0;\n backdrop-filter: blur(var(--blur));\n\n &[data-side=\"top\"] {\n top: 0;\n background: linear-gradient(to top, transparent, var(--color-bg));\n mask-image: linear-gradient(to bottom, var(--color-bg) var(--stop), transparent);\n }\n }\n";

View File

@@ -0,0 +1,5 @@
import React from 'react';
export declare const HotlinkedText: React.FC<{
text: string;
matcher?: (text: string) => string | null;
}>;

View File

@@ -0,0 +1,51 @@
/**
*
* Format component stack into pseudo HTML
* component stack is an array of strings, e.g.: ['p', 'p', 'Page', ...]
*
* For html tags mismatch, it will render it for the code block
*
* ```
* <pre>
* <code>{`
* <Page>
* <p red>
* <p red>
* `}</code>
* </pre>
* ```
*
* For text mismatch, it will render it for the code block
*
* ```
* <pre>
* <code>{`
* <Page>
* <p>
* "Server Text" (green)
* "Client Text" (red)
* </p>
* </Page>
* `}</code>
* ```
*
* For bad text under a tag it will render it for the code block,
* e.g. "Mismatched Text" under <p>
*
* ```
* <pre>
* <code>{`
* <Page>
* <div>
* <p>
* "Mismatched Text" (red)
* </p>
* </div>
* </Page>
* `}</code>
* ```
*
*/
export declare function PseudoHtmlDiff({ reactOutputComponentDiff, }: {
reactOutputComponentDiff: string;
}): import("react/jsx-runtime").JSX.Element;

View File

@@ -0,0 +1,2 @@
export declare function lock(): void;
export declare function unlock(): void;

View File

@@ -0,0 +1,2 @@
export { Overlay } from './overlay';
export { OverlayBackdrop } from './overlay-backdrop';

View File

@@ -0,0 +1,5 @@
type OverlayBackdropProps = {
fixed?: boolean;
} & React.HTMLAttributes<HTMLDivElement>;
export declare function OverlayBackdrop({ fixed, ...props }: OverlayBackdropProps): import("react/jsx-runtime").JSX.Element;
export {};

View File

@@ -0,0 +1,7 @@
import * as React from 'react';
export type OverlayProps = React.HTMLAttributes<HTMLDivElement> & {
fixed?: boolean;
ref?: React.Ref<HTMLDivElement>;
};
declare const Overlay: React.FC<OverlayProps>;
export { Overlay };

View File

@@ -0,0 +1,2 @@
declare const styles: string;
export { styles };

View File

@@ -0,0 +1,6 @@
import './segment-boundary-trigger.css';
import type { SegmentBoundaryType, SegmentNodeState } from '../../../userspace/app/segment-explorer-node';
export declare function SegmentBoundaryTrigger({ nodeState, boundaries, }: {
nodeState: SegmentNodeState;
boundaries: Record<SegmentBoundaryType, string | null>;
}): import("react/jsx-runtime").JSX.Element;

View File

@@ -0,0 +1,5 @@
import './segment-explorer.css';
export declare function PageSegmentTree({ page }: {
page: string;
}): import("react/jsx-runtime").JSX.Element;
export declare function InfoIcon(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;

View File

@@ -0,0 +1,4 @@
export declare function SegmentSuggestion({ possibleExtension, missingGlobalError, }: {
possibleExtension: string;
missingGlobalError: boolean;
}): import("react/jsx-runtime").JSX.Element;

View File

@@ -0,0 +1,4 @@
export declare const Resizer: import("react").ForwardRefExoticComponent<Omit<{
children: React.ReactNode;
measure: boolean;
} & import("react").HTMLProps<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;

View File

@@ -0,0 +1,3 @@
export declare function ShadowPortal({ children }: {
children: React.ReactNode;
}): import("react").ReactPortal;

View File

@@ -0,0 +1,11 @@
type EditorLinkProps = {
file: string;
isSourceFile: boolean;
location?: {
line: number;
column: number;
};
};
export declare function EditorLink({ file, location }: EditorLinkProps): import("react/jsx-runtime").JSX.Element;
export declare const EDITOR_LINK_STYLES = "\n [data-with-open-in-editor-link] svg {\n width: auto;\n height: var(--size-14);\n margin-left: 8px;\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-import-trace] {\n margin-left: 16px;\n }\n";
export {};

View File

@@ -0,0 +1 @@
export { Terminal } from './terminal';

View File

@@ -0,0 +1,7 @@
import * as React from 'react';
type TerminalProps = {
content: string;
};
export declare const Terminal: React.FC<TerminalProps>;
export declare const TERMINAL_STYLES = "\n [data-nextjs-terminal]::selection,\n [data-nextjs-terminal] *::selection {\n background-color: var(--color-ansi-selection);\n }\n\n [data-nextjs-terminal] * {\n color: inherit;\n background-color: transparent;\n font-family: var(--font-stack-monospace);\n }\n\n [data-nextjs-terminal] > div > p {\n display: flex;\n align-items: center;\n justify-content: space-between;\n cursor: pointer;\n margin: 0;\n }\n [data-nextjs-terminal] > div > p:hover {\n text-decoration: underline dotted;\n }\n [data-nextjs-terminal] div > pre {\n overflow: hidden;\n display: inline-block;\n }\n";
export {};

View File

@@ -0,0 +1,2 @@
import './style.css';
export { Toast } from './toast';

View File

@@ -0,0 +1,8 @@
import * as React from 'react';
type ToastProps = React.HTMLProps<HTMLDivElement> & {
children?: React.ReactNode;
onClick?: () => void;
className?: string;
};
export declare const Toast: React.ForwardRefExoticComponent<Omit<ToastProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
export {};

View File

@@ -0,0 +1,12 @@
import './tooltip.css';
type TooltipDirection = 'top' | 'bottom' | 'left' | 'right';
interface TooltipProps {
children: React.ReactNode;
title: string | null;
direction?: TooltipDirection;
arrowSize?: number;
offset?: number;
className?: string;
}
export declare const Tooltip: import("react").ForwardRefExoticComponent<TooltipProps & import("react").RefAttributes<HTMLDivElement>>;
export {};

View File

@@ -0,0 +1,6 @@
import type { VersionInfo } from '../../../../server/dev/parse-version-info';
export declare function VersionStalenessInfo({ versionInfo, bundlerName, }: {
versionInfo: VersionInfo;
bundlerName: 'Webpack' | 'Turbopack' | 'Rspack';
}): import("react/jsx-runtime").JSX.Element;
export declare const styles = "\n .nextjs-container-build-error-version-status {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 4px;\n\n height: var(--size-26);\n padding: 6px 8px 6px 6px;\n background: var(--color-background-100);\n background-clip: padding-box;\n border: 1px solid var(--color-gray-alpha-400);\n box-shadow: var(--shadow-small);\n border-radius: var(--rounded-full);\n\n color: var(--color-gray-900);\n font-size: var(--size-12);\n font-weight: 500;\n line-height: var(--size-16);\n }\n\n a.nextjs-container-build-error-version-status {\n text-decoration: none;\n color: var(--color-gray-900);\n\n &:hover {\n background: var(--color-gray-100);\n }\n\n &:focus {\n outline: var(--focus-ring);\n }\n }\n\n .version-staleness-indicator.fresh {\n fill: var(--color-green-800);\n stroke: var(--color-green-300);\n }\n .version-staleness-indicator.stale {\n fill: var(--color-amber-800);\n stroke: var(--color-amber-300);\n }\n .version-staleness-indicator.outdated {\n fill: var(--color-red-800);\n stroke: var(--color-red-300);\n }\n .version-staleness-indicator.unknown {\n fill: var(--color-gray-800);\n stroke: var(--color-gray-300);\n }\n\n .nextjs-container-build-error-version-status > .turbopack-text {\n background: linear-gradient(\n to right,\n var(--color-turbopack-text-red) 0%,\n var(--color-turbopack-text-blue) 100%\n );\n background-clip: text;\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n }\n";