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

49
node_modules/parse-latin/lib/plugin/patch-position.js generated vendored Normal file
View File

@@ -0,0 +1,49 @@
/**
* @typedef {import('unist').Node} Node
* @typedef {import('nlcst').Paragraph} Paragraph
* @typedef {import('unist').Position} Position
* @typedef {import('nlcst').Root} Root
* @typedef {import('nlcst').Sentence} Sentence
*/
import {visitChildren} from 'unist-util-visit-children'
// Patch the position on a parent node based on its first and last child.
export const patchPosition = visitChildren(
/**
* @type {import('unist-util-visit-children').Visitor<Paragraph | Root | Sentence>}
*/
function (child, index, node) {
const siblings = node.children
if (
child.position &&
index < 1 &&
/* c8 ignore next */
(!node.position || !node.position.start)
) {
patch(node)
node.position.start = child.position.start
}
if (
child.position &&
index === siblings.length - 1 &&
(!node.position || !node.position.end)
) {
patch(node)
node.position.end = child.position.end
}
}
)
/**
* @param {Node} node
* @returns {asserts node is Node & {position: Position}}
*/
function patch(node) {
if (!node.position) {
// @ts-expect-error: fine, well fill it later.
node.position = {}
}
}