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:
106
node_modules/unified/index.d.ts
generated
vendored
Normal file
106
node_modules/unified/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
import type {Value} from 'vfile'
|
||||
import type {CompileResults} from './lib/index.js'
|
||||
|
||||
export type {
|
||||
// `CompileResultMap` is typed and exposed below.
|
||||
CompileResults,
|
||||
Compiler,
|
||||
// `Data` is typed and exposed below.
|
||||
Parser,
|
||||
Pluggable,
|
||||
PluggableList,
|
||||
Plugin,
|
||||
PluginTuple,
|
||||
Preset,
|
||||
ProcessCallback,
|
||||
Processor,
|
||||
RunCallback,
|
||||
// `Settings` is typed and exposed below.
|
||||
TransformCallback,
|
||||
Transformer
|
||||
} from './lib/index.js'
|
||||
|
||||
export {unified} from './lib/index.js'
|
||||
|
||||
// See: <https://github.com/sindresorhus/type-fest/blob/main/source/empty-object.d.ts>
|
||||
declare const emptyObjectSymbol: unique symbol
|
||||
|
||||
/**
|
||||
* Interface of known results from compilers.
|
||||
*
|
||||
* Normally, compilers result in text ({@linkcode Value} of `vfile`).
|
||||
* When you compile to something else, such as a React node (as in,
|
||||
* `rehype-react`), you can augment this interface to include that type.
|
||||
*
|
||||
* ```ts
|
||||
* import type {ReactNode} from 'somewhere'
|
||||
*
|
||||
* declare module 'unified' {
|
||||
* interface CompileResultMap {
|
||||
* // Register a new result (value is used, key should match it).
|
||||
* ReactNode: ReactNode
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* export {} // You may not need this, but it makes sure the file is a module.
|
||||
* ```
|
||||
*
|
||||
* Use {@linkcode CompileResults} to access the values.
|
||||
*/
|
||||
export interface CompileResultMap {
|
||||
// Note: if `Value` from `VFile` is changed, this should too.
|
||||
Uint8Array: Uint8Array
|
||||
string: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface of known data that can be supported by all plugins.
|
||||
*
|
||||
* Typically, options can be given to a specific plugin, but sometimes it makes
|
||||
* sense to have information shared with several plugins.
|
||||
* For example, a list of HTML elements that are self-closing, which is needed
|
||||
* during all phases.
|
||||
*
|
||||
* To type this, do something like:
|
||||
*
|
||||
* ```ts
|
||||
* declare module 'unified' {
|
||||
* interface Data {
|
||||
* htmlVoidElements?: Array<string> | undefined
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* export {} // You may not need this, but it makes sure the file is a module.
|
||||
* ```
|
||||
*/
|
||||
export interface Data {
|
||||
settings?: Settings | undefined
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface of known extra options, that can be supported by parser and
|
||||
* compilers.
|
||||
*
|
||||
* This exists so that users can use packages such as `remark`, which configure
|
||||
* both parsers and compilers (in this case `remark-parse` and
|
||||
* `remark-stringify`), and still provide options for them.
|
||||
*
|
||||
* When you make parsers or compilers, that could be packaged up together,
|
||||
* you should support `this.data('settings')` as input and merge it with
|
||||
* explicitly passed `options`.
|
||||
* Then, to type it, using `remark-stringify` as an example, do something like:
|
||||
*
|
||||
* ```ts
|
||||
* declare module 'unified' {
|
||||
* interface Settings {
|
||||
* bullet: '*' | '+' | '-'
|
||||
* // …
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* export {} // You may not need this, but it makes sure the file is a module.
|
||||
* ```
|
||||
*/
|
||||
export interface Settings {
|
||||
[emptyObjectSymbol]?: never
|
||||
}
|
2
node_modules/unified/index.js
generated
vendored
Normal file
2
node_modules/unified/index.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
// Note: types exposed from `index.d.ts`.
|
||||
export {unified} from './lib/index.js'
|
2
node_modules/unified/lib/callable-instance.d.ts
generated
vendored
Normal file
2
node_modules/unified/lib/callable-instance.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export const CallableInstance: new <Parameters extends unknown[], Result>(property: string | symbol) => (...parameters: Parameters) => Result;
|
||||
//# sourceMappingURL=callable-instance.d.ts.map
|
1
node_modules/unified/lib/callable-instance.d.ts.map
generated
vendored
Normal file
1
node_modules/unified/lib/callable-instance.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"callable-instance.d.ts","sourceRoot":"","sources":["callable-instance.js"],"names":[],"mappings":"AAAA,oFAEsE,MAAM,GAAG,MAAM,2CAyClF"}
|
44
node_modules/unified/lib/callable-instance.js
generated
vendored
Normal file
44
node_modules/unified/lib/callable-instance.js
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
export const CallableInstance =
|
||||
/**
|
||||
* @type {new <Parameters extends Array<unknown>, Result>(property: string | symbol) => (...parameters: Parameters) => Result}
|
||||
*/
|
||||
(
|
||||
/** @type {unknown} */
|
||||
(
|
||||
/**
|
||||
* @this {Function}
|
||||
* @param {string | symbol} property
|
||||
* @returns {(...parameters: Array<unknown>) => unknown}
|
||||
*/
|
||||
function (property) {
|
||||
const self = this
|
||||
const constr = self.constructor
|
||||
const proto = /** @type {Record<string | symbol, Function>} */ (
|
||||
// Prototypes do exist.
|
||||
// type-coverage:ignore-next-line
|
||||
constr.prototype
|
||||
)
|
||||
const value = proto[property]
|
||||
/** @type {(...parameters: Array<unknown>) => unknown} */
|
||||
const apply = function () {
|
||||
return value.apply(apply, arguments)
|
||||
}
|
||||
|
||||
Object.setPrototypeOf(apply, proto)
|
||||
|
||||
// Not needed for us in `unified`: we only call this on the `copy`
|
||||
// function,
|
||||
// and we don't need to add its fields (`length`, `name`)
|
||||
// over.
|
||||
// See also: GH-246.
|
||||
// const names = Object.getOwnPropertyNames(value)
|
||||
//
|
||||
// for (const p of names) {
|
||||
// const descriptor = Object.getOwnPropertyDescriptor(value, p)
|
||||
// if (descriptor) Object.defineProperty(apply, p, descriptor)
|
||||
// }
|
||||
|
||||
return apply
|
||||
}
|
||||
)
|
||||
)
|
1024
node_modules/unified/lib/index.d.ts
generated
vendored
Normal file
1024
node_modules/unified/lib/index.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/unified/lib/index.d.ts.map
generated
vendored
Normal file
1
node_modules/unified/lib/index.d.ts.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1323
node_modules/unified/lib/index.js
generated
vendored
Normal file
1323
node_modules/unified/lib/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
21
node_modules/unified/license
generated
vendored
Normal file
21
node_modules/unified/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2015 Titus Wormer <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.
|
120
node_modules/unified/package.json
generated
vendored
Normal file
120
node_modules/unified/package.json
generated
vendored
Normal file
@@ -0,0 +1,120 @@
|
||||
{
|
||||
"name": "unified",
|
||||
"version": "11.0.5",
|
||||
"description": "parse, inspect, transform, and serialize content through syntax trees",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"ast",
|
||||
"compile",
|
||||
"content",
|
||||
"cst",
|
||||
"parse",
|
||||
"process",
|
||||
"rehype",
|
||||
"remark",
|
||||
"retext",
|
||||
"serialize",
|
||||
"stringify",
|
||||
"syntax",
|
||||
"transform",
|
||||
"tree",
|
||||
"unified"
|
||||
],
|
||||
"homepage": "https://unifiedjs.com",
|
||||
"repository": "unifiedjs/unified",
|
||||
"bugs": "https://github.com/unifiedjs/unified/issues",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
},
|
||||
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
|
||||
"contributors": [
|
||||
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
|
||||
"Junyoung Choi <fluke8259@gmail.com>",
|
||||
"Hernan Rajchert <hrajchert@gmail.com>",
|
||||
"Christian Murphy <christian.murphy.42@gmail.com>",
|
||||
"Vse Mozhet Byt <vsemozhetbyt@gmail.com>",
|
||||
"Richard Littauer <richard.littauer@gmail.com>"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"exports": "./index.js",
|
||||
"files": [
|
||||
"lib/",
|
||||
"index.d.ts",
|
||||
"index.js"
|
||||
],
|
||||
"dependencies": {
|
||||
"@types/unist": "^3.0.0",
|
||||
"bail": "^2.0.0",
|
||||
"devlop": "^1.0.0",
|
||||
"extend": "^3.0.0",
|
||||
"is-plain-obj": "^4.0.0",
|
||||
"trough": "^2.0.0",
|
||||
"vfile": "^6.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/extend": "^3.0.0",
|
||||
"@types/hast": "^3.0.0",
|
||||
"@types/mdast": "^4.0.0",
|
||||
"@types/node": "^20.0.0",
|
||||
"c8": "^10.0.0",
|
||||
"prettier": "^3.0.0",
|
||||
"remark-cli": "^12.0.0",
|
||||
"remark-preset-wooorm": "^10.0.0",
|
||||
"tsd": "^0.31.0",
|
||||
"type-coverage": "^2.0.0",
|
||||
"typescript": "^5.0.0",
|
||||
"xo": "^0.58.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc --build --clean && tsc --build && node script/fix-types.js && type-coverage && tsd",
|
||||
"format": "remark . --frail --output --quiet && prettier . --log-level warn --write && xo --fix",
|
||||
"prepack": "npm run build && npm run format",
|
||||
"test": "npm run build && npm run format && npm run test-coverage",
|
||||
"test-api": "node --conditions development test/index.js",
|
||||
"test-coverage": "c8 --100 --check-coverage --reporter lcov npm run test-api"
|
||||
},
|
||||
"prettier": {
|
||||
"bracketSpacing": false,
|
||||
"singleQuote": true,
|
||||
"semi": false,
|
||||
"tabWidth": 2,
|
||||
"trailingComma": "none",
|
||||
"useTabs": false
|
||||
},
|
||||
"remarkConfig": {
|
||||
"plugins": [
|
||||
"remark-preset-wooorm",
|
||||
[
|
||||
"remark-lint-no-html",
|
||||
false
|
||||
]
|
||||
]
|
||||
},
|
||||
"typeCoverage": {
|
||||
"atLeast": 100,
|
||||
"detail": true,
|
||||
"ignoreCatch": true,
|
||||
"strict": true
|
||||
},
|
||||
"xo": {
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"**/*.ts"
|
||||
],
|
||||
"rules": {
|
||||
"@typescript-eslint/ban-types": "off",
|
||||
"@typescript-eslint/consistent-type-definitions": "off",
|
||||
"@typescript-eslint/naming-convention": "off",
|
||||
"import/no-duplicates": "off"
|
||||
}
|
||||
}
|
||||
],
|
||||
"prettier": true,
|
||||
"rules": {
|
||||
"unicorn/no-this-assignment": "off"
|
||||
}
|
||||
}
|
||||
}
|
1835
node_modules/unified/readme.md
generated
vendored
Normal file
1835
node_modules/unified/readme.md
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user