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

11
node_modules/longest-streak/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,11 @@
/**
* Get the count of the longest repeating streak of `substring` in `value`.
*
* @param {string} value
* Content to search in.
* @param {string} substring
* Substring to look for, typically one character.
* @returns {number}
* Count of most frequent adjacent `substring`s in `value`.
*/
export function longestStreak(value: string, substring: string): number

36
node_modules/longest-streak/index.js generated vendored Normal file
View File

@@ -0,0 +1,36 @@
/**
* Get the count of the longest repeating streak of `substring` in `value`.
*
* @param {string} value
* Content to search in.
* @param {string} substring
* Substring to look for, typically one character.
* @returns {number}
* Count of most frequent adjacent `substring`s in `value`.
*/
export function longestStreak(value, substring) {
const source = String(value)
let index = source.indexOf(substring)
let expected = index
let count = 0
let max = 0
if (typeof substring !== 'string') {
throw new TypeError('Expected substring')
}
while (index !== -1) {
if (index === expected) {
if (++count > max) {
max = count
}
} else {
count = 1
}
expected = index + substring.length
index = source.indexOf(substring, expected)
}
return max
}

22
node_modules/longest-streak/license generated vendored Normal file
View File

@@ -0,0 +1,22 @@
(The MIT License)
Copyright (c) 2015 Titus Wormer <mailto:tituswormer@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

73
node_modules/longest-streak/package.json generated vendored Normal file
View File

@@ -0,0 +1,73 @@
{
"name": "longest-streak",
"version": "3.1.0",
"description": "Count the longest repeating streak of a substring",
"license": "MIT",
"keywords": [
"count",
"length",
"longest",
"repeating",
"streak",
"substring",
"character"
],
"repository": "wooorm/longest-streak",
"bugs": "https://github.com/wooorm/longest-streak/issues",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
},
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
"contributors": [
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"files": [
"index.d.ts",
"index.js"
],
"devDependencies": {
"@types/node": "^18.0.0",
"c8": "^7.0.0",
"prettier": "^2.0.0",
"remark-cli": "^11.0.0",
"remark-preset-wooorm": "^9.0.0",
"type-coverage": "^2.0.0",
"typescript": "^4.0.0",
"xo": "^0.52.0"
},
"scripts": {
"prepack": "npm run build && npm run format",
"build": "tsc --build --clean && tsc --build && type-coverage",
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
"test-api": "node --conditions development test.js",
"test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api",
"test": "npm run build && npm run format && npm run test-coverage"
},
"prettier": {
"tabWidth": 2,
"useTabs": false,
"singleQuote": true,
"bracketSpacing": false,
"semi": false,
"trailingComma": "none"
},
"xo": {
"prettier": true
},
"remarkConfig": {
"plugins": [
"preset-wooorm"
]
},
"typeCoverage": {
"atLeast": 100,
"detail": true,
"strict": true,
"ignoreCatch": true
}
}

150
node_modules/longest-streak/readme.md generated vendored Normal file
View File

@@ -0,0 +1,150 @@
# longest-streak
[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][size-badge]][size]
Get the count of the longest repeating streak of `substring` in `value`.
## Contents
* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`longestStreak(value, substring)`](#longeststreakvalue-substring)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Related](#related)
* [Contribute](#contribute)
* [License](#license)
## What is this?
This is a tiny package that finds the count of the longest adjacent repeating
substring.
## When should I use this?
This package is rather niche.
I use it for serializing markdown ASTs (particularly fenced code and math).
You can use [`ccount`][ccount] if you need the total count of substrings
occuring in a value.
## Install
This package is [ESM only][esm].
In Node.js (version 14.14+, 16.0+), install with [npm][]:
```sh
npm install longest-streak
```
In Deno with [`esm.sh`][esmsh]:
```js
import {longestStreak} from 'https://esm.sh/longest-streak@3'
```
In browsers with [`esm.sh`][esmsh]:
```html
<script type="module">
import {longestStreak} from 'https://esm.sh/longest-streak@3?bundle'
</script>
```
## Use
```js
import {longestStreak} from 'longest-streak'
longestStreak('` foo `` bar `', '`') // => 2
```
## API
This package exports the identifier `longestStreak`.
There is no default export.
### `longestStreak(value, substring)`
Get the count of the longest repeating streak of `substring` in `value`.
###### Parameters
* `value` (`string`) — content to search in
* `substring` (`string`) — substring to look for, typically one character
###### Returns
Count of most frequent adjacent `substring`s in `value` (`number`).
## Types
This package is fully typed with [TypeScript][].
It exports no additional types.
## Compatibility
This package is at least compatible with all maintained versions of Node.js.
As of now, that is Node.js 14.14+ and 16.0+.
It also works in Deno and modern browsers.
## Security
This package is safe.
## Related
* [`wooorm/ccount`](https://github.com/wooorm/ccount)
— count the total number of `substring`s in `value`
* [`wooorm/direction`](https://github.com/wooorm/direction)
— detect directionality: left-to-right, right-to-left, or neutral
## Contribute
Yes please!
See [How to Contribute to Open Source][contribute].
## License
[MIT][license] © [Titus Wormer][author]
<!-- Definitions -->
[build-badge]: https://github.com/wooorm/longest-streak/workflows/main/badge.svg
[build]: https://github.com/wooorm/longest-streak/actions
[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/longest-streak.svg
[coverage]: https://codecov.io/github/wooorm/longest-streak
[downloads-badge]: https://img.shields.io/npm/dm/longest-streak.svg
[downloads]: https://www.npmjs.com/package/longest-streak
[size-badge]: https://img.shields.io/bundlephobia/minzip/longest-streak.svg
[size]: https://bundlephobia.com/result?p=longest-streak
[npm]: https://docs.npmjs.com/cli/install
[esmsh]: https://esm.sh
[license]: license
[author]: https://wooorm.com
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
[typescript]: https://www.typescriptlang.org
[contribute]: https://opensource.guide/how-to-contribute/
[ccount]: https://github.com/wooorm/ccount