Refactor routing in App component to enhance navigation and improve error handling by integrating dynamic routes and updating the NotFound route.

This commit is contained in:
becarta
2025-05-23 12:43:00 +02:00
parent f40db0f5c9
commit a544759a3b
11127 changed files with 1647032 additions and 0 deletions

23
node_modules/mdast-util-from-markdown/dev/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,23 @@
export type {Encoding, Token, Value} from 'micromark-util-types'
export type {
CompileContext,
CompileData,
Extension,
Handles,
Handle,
OnEnterError,
OnExitError,
Options,
Transform
} from './lib/types.js'
export {fromMarkdown} from './lib/index.js'
declare module 'micromark-util-types' {
interface TokenTypeMap {
listItem: 'listItem'
}
interface Token {
_spread?: boolean
}
}

2
node_modules/mdast-util-from-markdown/dev/index.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
// Note: types exported from `index.d.ts`.
export {fromMarkdown} from './lib/index.js'

View File

@@ -0,0 +1,53 @@
/**
* Turn markdown into a syntax tree.
*
* @overload
* @param {Value} value
* @param {Encoding | null | undefined} [encoding]
* @param {Options | null | undefined} [options]
* @returns {Root}
*
* @overload
* @param {Value} value
* @param {Options | null | undefined} [options]
* @returns {Root}
*
* @param {Value} value
* Markdown to parse.
* @param {Encoding | Options | null | undefined} [encoding]
* Character encoding for when `value` is `Buffer`.
* @param {Options | null | undefined} [options]
* Configuration.
* @returns {Root}
* mdast tree.
*/
export function fromMarkdown(value: Value, encoding?: Encoding | null | undefined, options?: Options | null | undefined): Root;
/**
* Turn markdown into a syntax tree.
*
* @overload
* @param {Value} value
* @param {Encoding | null | undefined} [encoding]
* @param {Options | null | undefined} [options]
* @returns {Root}
*
* @overload
* @param {Value} value
* @param {Options | null | undefined} [options]
* @returns {Root}
*
* @param {Value} value
* Markdown to parse.
* @param {Encoding | Options | null | undefined} [encoding]
* Character encoding for when `value` is `Buffer`.
* @param {Options | null | undefined} [options]
* Configuration.
* @returns {Root}
* mdast tree.
*/
export function fromMarkdown(value: Value, options?: Options | null | undefined): Root;
import type { Value } from 'micromark-util-types';
import type { Encoding } from 'micromark-util-types';
import type { Options } from './types.js';
import type { Root } from 'mdast';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAwDG,oCACQ,KAAK,aACL,QAAQ,GAAG,IAAI,GAAG,SAAS,YAC3B,OAAO,GAAG,IAAI,GAAG,SAAS,GACxB,IAAI,CAEd;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oCACQ,KAAK,YACL,OAAO,GAAG,IAAI,GAAG,SAAS,GACxB,IAAI,CAEd;2BAvCO,sBAAsB;8BAAtB,sBAAsB;6BAUtB,YAAY;0BAhBZ,OAAO"}

1348
node_modules/mdast-util-from-markdown/dev/lib/index.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,295 @@
import type {Nodes, Parent, PhrasingContent, Root} from 'mdast'
import type {ParseOptions, Token} from 'micromark-util-types'
/**
* Compiler context.
*/
export interface CompileContext {
/**
* Configuration.
*/
config: Config
/**
* Info passed around;
* key/value store.
*/
data: CompileData
/**
* Stack of nodes.
*/
stack: Array<Fragment | Nodes>
/**
* Stack of tokens.
*/
tokenStack: Array<TokenTuple>
/**
* Capture some of the output data.
*
* @param this
* Context.
* @returns
* Nothing.
*/
buffer(this: CompileContext): undefined
/**
* Enter a node.
*
* @param this
* Context.
* @param node
* Node.
* @param token
* Token.
* @param onError
* Error handler.
* @returns
* Nothing.
*/
enter(
this: CompileContext,
node: Nodes,
token: Token,
onError?: OnEnterError | null | undefined
): undefined
/**
* Exit a node.
*
* @param this
* Context.
* @param token
* Token.
* @param onError
* Error handler.
* @returns
* Nothing.
*/
exit(
this: CompileContext,
token: Token,
onError?: OnExitError | null | undefined
): undefined
/**
* Stop capturing and access the output data.
*
* @param this
* Context.
* @returns
* Nothing.
*/
resume(this: CompileContext): string
/**
* Get the source text that spans a token (or location).
*
* @param token
* Start/end in stream.
* @param expandTabs
* Whether to expand tabs.
* @returns
* Serialized chunks.
*/
sliceSerialize(
token: Pick<Token, 'end' | 'start'>,
expandTabs?: boolean | undefined
): string
}
/**
* Interface of tracked data.
*
* When working on extensions that use more data, extend the corresponding
* interface to register their types:
*
* ```ts
* declare module 'mdast-util-from-markdown' {
* interface CompileData {
* // Register a new field.
* mathFlowInside?: boolean | undefined
* }
* }
* ```
*/
export interface CompileData {
/**
* Whether were inside a hard break.
*/
atHardBreak?: boolean | undefined
/**
* Current character reference type.
*/
characterReferenceType?:
| 'characterReferenceMarkerHexadecimal'
| 'characterReferenceMarkerNumeric'
| undefined
/**
* Whether a first list item value (`1` in `1. a`) is expected.
*/
expectingFirstListItemValue?: boolean | undefined
/**
* Whether were in flow code.
*/
flowCodeInside?: boolean | undefined
/**
* Whether were in a reference.
*/
inReference?: boolean | undefined
/**
* Whether were expecting a line ending from a setext heading, which can be slurped.
*/
setextHeadingSlurpLineEnding?: boolean | undefined
/**
* Current reference.
*/
referenceType?: 'collapsed' | 'full' | undefined
}
/**
* Configuration.
*
* We have our defaults, but extensions will add more.
*/
export interface Config {
/**
* Token types where line endings are used.
*/
canContainEols: Array<string>
/**
* Opening handles.
*/
enter: Handles
/**
* Closing handles.
*/
exit: Handles
/**
* Tree transforms.
*/
transforms: Array<Transform>
}
/**
* Change how markdown tokens from micromark are turned into mdast.
*/
export interface Extension {
/**
* Token types where line endings are used.
*/
canContainEols?: Array<string> | null | undefined
/**
* Opening handles.
*/
enter?: Handles | null | undefined
/**
* Closing handles.
*/
exit?: Handles | null | undefined
/**
* Tree transforms.
*/
transforms?: Array<Transform> | null | undefined
}
/**
* Internal fragment.
*/
export interface Fragment extends Parent {
/**
* Node type.
*/
type: 'fragment'
/**
* Children.
*/
children: Array<PhrasingContent>
}
/**
* Token types mapping to handles
*/
export type Handles = Record<string, Handle>
/**
* Handle a token.
*
* @param this
* Context.
* @param token
* Current token.
* @returns
* Nothing.
*/
export type Handle = (this: CompileContext, token: Token) => undefined | void
/**
* Handle the case where the `right` token is open, but it is closed (by the
* `left` token) or because we reached the end of the document.
*
* @param this
* Context.
* @param left
* Left token.
* @param right
* Right token.
* @returns
* Nothing.
*/
export type OnEnterError = (
this: Omit<CompileContext, 'sliceSerialize'>,
left: Token | undefined,
right: Token
) => undefined
/**
* Handle the case where the `right` token is open but it is closed by
* exiting the `left` token.
*
* @param this
* Context.
* @param left
* Left token.
* @param right
* Right token.
* @returns
* Nothing.
*/
export type OnExitError = (
this: Omit<CompileContext, 'sliceSerialize'>,
left: Token,
right: Token
) => undefined
/**
* Configuration.
*/
export interface Options extends ParseOptions {
/**
* Extensions for this utility to change how tokens are turned into a tree.
*/
mdastExtensions?: Array<Extension | Array<Extension>> | null | undefined
}
/**
* Open token on the stack,
* with an optional error handler for when that token isnt closed properly.
*/
export type TokenTuple = [token: Token, onError: OnEnterError | undefined]
/**
* Extra transform, to change the AST afterwards.
*
* @param tree
* Tree to transform.
* @returns
* New tree or nothing (in which case the current tree is used).
*/
export type Transform = (tree: Root) => Root | null | undefined | void

View File

@@ -0,0 +1,2 @@
// Note: types exposed from `types.d.ts`.
export {}