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,8 @@
import React from 'react';
import type { ErrorBaseProps } from '../components/errors/error-overlay/error-overlay';
interface BuildErrorProps extends ErrorBaseProps {
message: string;
}
export declare const BuildError: React.FC<BuildErrorProps>;
export declare const styles = "";
export {};

View File

@@ -0,0 +1,35 @@
import type { DebugInfo } from '../../shared/types';
import { type ErrorOverlayLayoutProps } from '../components/errors/error-overlay-layout/error-overlay-layout';
import type { ReadyRuntimeError } from '../utils/get-error-by-type';
import type { ErrorBaseProps } from '../components/errors/error-overlay/error-overlay';
import type { HydrationErrorState } from '../../shared/hydration-error';
interface ErrorsProps extends ErrorBaseProps {
getSquashedHydrationErrorDetails: (error: Error) => HydrationErrorState | null;
runtimeErrors: ReadyRuntimeError[];
debugInfo: DebugInfo;
onClose: () => void;
}
export declare function getErrorTypeLabel(error: Error, type: ReadyRuntimeError['type'], errorDetails: ErrorDetails): ErrorOverlayLayoutProps['errorType'];
type ErrorDetails = NoErrorDetails | HydrationErrorDetails | BlockingRouteErrorDetails | DynamicMetadataErrorDetails;
type NoErrorDetails = {
type: 'empty';
};
type HydrationErrorDetails = {
type: 'hydration';
warning: string | null;
notes: string | null;
reactOutputComponentDiff: string | null;
};
type BlockingRouteErrorDetails = {
type: 'blocking-route';
variant: 'navigation' | 'runtime';
refinement: '' | 'generateViewport';
};
type DynamicMetadataErrorDetails = {
type: 'dynamic-metadata';
variant: 'navigation' | 'runtime';
};
export declare function useErrorDetails(error: Error | undefined, getSquashedHydrationErrorDetails: (error: Error) => HydrationErrorState | null): ErrorDetails;
export declare function Errors({ getSquashedHydrationErrorDetails, runtimeErrors, debugInfo, onClose, ...props }: ErrorsProps): import("react/jsx-runtime").JSX.Element | null;
export declare const styles = "\n .nextjs-error-with-static {\n bottom: calc(16px * 4.5);\n }\n p.nextjs__container_errors__link {\n font-size: var(--size-14);\n }\n p.nextjs__container_errors__notes {\n color: var(--color-stack-notes);\n font-size: var(--size-14);\n line-height: 1.5;\n }\n .nextjs-container-errors-body > h2:not(:first-child) {\n margin-top: calc(16px + 8px);\n }\n .nextjs-container-errors-body > h2 {\n color: var(--color-title-color);\n margin-bottom: 8px;\n font-size: var(--size-20);\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: 8px;\n }\n .nextjs-toast-hide-button {\n margin-left: 24px;\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-hide-button:hover {\n opacity: 1;\n }\n .nextjs__container_errors__error_title {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 14px;\n }\n .error-overlay-notes-container {\n margin: 8px 2px;\n }\n .error-overlay-notes-container p {\n white-space: pre-wrap;\n }\n .nextjs__blocking_page_load_error_description {\n color: var(--color-stack-notes);\n }\n .nextjs__blocking_page_load_error_description_title {\n color: var(--color-title-color);\n }\n .nextjs__blocking_page_load_error_fix_option {\n background-color: var(--color-background-200);\n padding: 14px;\n border-radius: var(--rounded-md-2);\n border: 1px solid var(--color-gray-alpha-400);\n }\n .external-link, .external-link:hover {\n color:inherit;\n }\n";
export {};

View File

@@ -0,0 +1,2 @@
export { PseudoHtmlDiff } from '../../components/hydration-diff/diff-view';
export declare const PSEUDO_HTML_DIFF_STYLES = "\n [data-nextjs-container-errors-pseudo-html] {\n padding: 8px 0;\n margin: 8px 0;\n border: 1px solid var(--color-gray-400);\n background: var(--color-background-200);\n color: var(--color-syntax-constant);\n font-family: var(--font-stack-monospace);\n font-size: var(--size-12);\n line-height: 1.33em; /* 16px in 12px font size */\n border-radius: var(--rounded-md-2);\n }\n [data-nextjs-container-errors-pseudo-html-line] {\n display: inline-block;\n width: 100%;\n padding-left: 40px;\n line-height: calc(5 / 3);\n }\n [data-nextjs-container-errors-pseudo-html--diff='error'] {\n background: var(--color-amber-100);\n box-shadow: 2px 0 0 0 var(--color-amber-900) inset;\n font-weight: bold;\n }\n [data-nextjs-container-errors-pseudo-html-collapse-button] {\n all: unset;\n margin-left: 12px;\n &:focus {\n outline: none;\n }\n }\n [data-nextjs-container-errors-pseudo-html--diff='add'] {\n background: var(--color-green-300);\n }\n [data-nextjs-container-errors-pseudo-html-line-sign] {\n margin-left: calc(24px * -1);\n margin-right: 24px;\n }\n [data-nextjs-container-errors-pseudo-html--diff='add']\n [data-nextjs-container-errors-pseudo-html-line-sign] {\n color: var(--color-green-900);\n }\n [data-nextjs-container-errors-pseudo-html--diff='remove'] {\n background: var(--color-red-300);\n }\n [data-nextjs-container-errors-pseudo-html--diff='remove']\n [data-nextjs-container-errors-pseudo-html-line-sign] {\n color: var(--color-red-900);\n margin-left: calc(24px * -1);\n margin-right: 24px;\n }\n [data-nextjs-container-errors-pseudo-html--diff='error']\n [data-nextjs-container-errors-pseudo-html-line-sign] {\n color: var(--color-amber-900);\n }\n \n [data-nextjs-container-errors-pseudo-html--hint] {\n display: inline-block;\n font-size: 0;\n height: 0;\n }\n [data-nextjs-container-errors-pseudo-html--tag-adjacent='false'] {\n color: var(--color-accents-1);\n }\n .nextjs__container_errors__component-stack {\n margin: 0;\n }\n [data-nextjs-container-errors-pseudo-html-collapse='true']\n .nextjs__container_errors__component-stack\n code {\n max-height: 120px;\n mask-image: linear-gradient(to bottom,rgba(0,0,0,0) 0%,black 10%);\n padding-bottom: 40px;\n }\n .nextjs__container_errors__component-stack code {\n display: block;\n width: 100%;\n white-space: pre-wrap;\n scroll-snap-type: y mandatory;\n overflow-y: hidden;\n }\n [data-nextjs-container-errors-pseudo-html--diff] {\n scroll-snap-align: center;\n }\n .error-overlay-hydration-error-diff-plus-icon {\n color: var(--color-green-900);\n }\n .error-overlay-hydration-error-diff-minus-icon {\n color: var(--color-red-900);\n }\n";

View File

@@ -0,0 +1,8 @@
import { type ReadyRuntimeError } from '../../utils/get-error-by-type';
type RuntimeErrorProps = {
error: ReadyRuntimeError;
dialogResizerRef: React.RefObject<HTMLDivElement | null>;
};
export declare function RuntimeError({ error, dialogResizerRef }: RuntimeErrorProps): import("react/jsx-runtime").JSX.Element;
export declare const styles = "\n \n [data-nextjs-container-errors-pseudo-html] {\n padding: 8px 0;\n margin: 8px 0;\n border: 1px solid var(--color-gray-400);\n background: var(--color-background-200);\n color: var(--color-syntax-constant);\n font-family: var(--font-stack-monospace);\n font-size: var(--size-12);\n line-height: 1.33em; /* 16px in 12px font size */\n border-radius: var(--rounded-md-2);\n }\n [data-nextjs-container-errors-pseudo-html-line] {\n display: inline-block;\n width: 100%;\n padding-left: 40px;\n line-height: calc(5 / 3);\n }\n [data-nextjs-container-errors-pseudo-html--diff='error'] {\n background: var(--color-amber-100);\n box-shadow: 2px 0 0 0 var(--color-amber-900) inset;\n font-weight: bold;\n }\n [data-nextjs-container-errors-pseudo-html-collapse-button] {\n all: unset;\n margin-left: 12px;\n &:focus {\n outline: none;\n }\n }\n [data-nextjs-container-errors-pseudo-html--diff='add'] {\n background: var(--color-green-300);\n }\n [data-nextjs-container-errors-pseudo-html-line-sign] {\n margin-left: calc(24px * -1);\n margin-right: 24px;\n }\n [data-nextjs-container-errors-pseudo-html--diff='add']\n [data-nextjs-container-errors-pseudo-html-line-sign] {\n color: var(--color-green-900);\n }\n [data-nextjs-container-errors-pseudo-html--diff='remove'] {\n background: var(--color-red-300);\n }\n [data-nextjs-container-errors-pseudo-html--diff='remove']\n [data-nextjs-container-errors-pseudo-html-line-sign] {\n color: var(--color-red-900);\n margin-left: calc(24px * -1);\n margin-right: 24px;\n }\n [data-nextjs-container-errors-pseudo-html--diff='error']\n [data-nextjs-container-errors-pseudo-html-line-sign] {\n color: var(--color-amber-900);\n }\n \n [data-nextjs-container-errors-pseudo-html--hint] {\n display: inline-block;\n font-size: 0;\n height: 0;\n }\n [data-nextjs-container-errors-pseudo-html--tag-adjacent='false'] {\n color: var(--color-accents-1);\n }\n .nextjs__container_errors__component-stack {\n margin: 0;\n }\n [data-nextjs-container-errors-pseudo-html-collapse='true']\n .nextjs__container_errors__component-stack\n code {\n max-height: 120px;\n mask-image: linear-gradient(to bottom,rgba(0,0,0,0) 0%,black 10%);\n padding-bottom: 40px;\n }\n .nextjs__container_errors__component-stack code {\n display: block;\n width: 100%;\n white-space: pre-wrap;\n scroll-snap-type: y mandatory;\n overflow-y: hidden;\n }\n [data-nextjs-container-errors-pseudo-html--diff] {\n scroll-snap-align: center;\n }\n .error-overlay-hydration-error-diff-plus-icon {\n color: var(--color-green-900);\n }\n .error-overlay-hydration-error-diff-minus-icon {\n color: var(--color-red-900);\n }\n\n";
export {};

View File

@@ -0,0 +1,19 @@
import type { OverlayState } from '../../shared';
import type { StackFrame } from '../../../shared/stack-frame';
import { type ReadyRuntimeError } from '../../utils/get-error-by-type';
export type SupportedErrorEvent = {
id: number;
error: Error;
frames: readonly StackFrame[];
type: 'runtime' | 'recoverable' | 'console';
};
type Props = {
children: (params: {
runtimeErrors: ReadyRuntimeError[];
totalErrorCount: number;
}) => React.ReactNode;
state: OverlayState;
isAppDir: boolean;
};
export declare const RenderError: (props: Props) => import("react/jsx-runtime").JSX.Element;
export {};