Добавлена возможность подключаться из вне
This commit is contained in:
120
frontend/node_modules/.package-lock.json
generated
vendored
120
frontend/node_modules/.package-lock.json
generated
vendored
@@ -48,6 +48,7 @@
|
||||
"integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.29.0",
|
||||
"@babel/generator": "^7.29.0",
|
||||
@@ -299,10 +300,10 @@
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/win32-x64": {
|
||||
"node_modules/@esbuild/linux-x64": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz",
|
||||
"integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz",
|
||||
"integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -310,7 +311,7 @@
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
@@ -404,6 +405,15 @@
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/@remix-run/router": {
|
||||
"version": "1.23.2",
|
||||
"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.23.2.tgz",
|
||||
"integrity": "sha512-Ic6m2U/rMjTkhERIa/0ZtXJP17QUi2CbWE7cqx4J58M8aA3QTfW+2UlQ4psvTX9IO1RfNVhK3pcpdjej7L+t2w==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/pluginutils": {
|
||||
"version": "1.0.0-beta.27",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz",
|
||||
@@ -411,10 +421,10 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-x64-gnu": {
|
||||
"node_modules/@rollup/rollup-linux-x64-gnu": {
|
||||
"version": "4.57.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.57.1.tgz",
|
||||
"integrity": "sha512-VMBH2eOOaKGtIJYleXsi2B8CPVADrh+TyNxJ4mWPnKfLB/DBUmzW+5m1xUrcwWoMfSLagIRpjUFeW5CO5hyciQ==",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.57.1.tgz",
|
||||
"integrity": "sha512-ABca4ceT4N+Tv/GtotnWAeXZUZuM/9AQyCyKYyKnpk4yoA7QIAuBt6Hkgpw8kActYlew2mvckXkvx0FfoInnLg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -422,13 +432,13 @@
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-x64-msvc": {
|
||||
"node_modules/@rollup/rollup-linux-x64-musl": {
|
||||
"version": "4.57.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.57.1.tgz",
|
||||
"integrity": "sha512-mxRFDdHIWRxg3UfIIAwCm6NzvxG0jDX/wBN6KsQFTvKFqqg9vTrWUE68qEjHt19A5wwx5X5aUi2zuZT7YR0jrA==",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.57.1.tgz",
|
||||
"integrity": "sha512-HFps0JeGtuOR2convgRRkHCekD7j+gdAuXM+/i6kGzQtFhlCtQkpwtNzkNj6QhCDp7DRJ7+qC/1Vg2jt5iSOFw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -436,7 +446,7 @@
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@types/babel__core": {
|
||||
@@ -504,6 +514,7 @@
|
||||
"integrity": "sha512-cisd7gxkzjBKU2GgdYrTdtQx1SORymWyaAFhaxQPK9bYO9ot3Y5OikQRvY0VYQtvwjeQnizCINJAenh/V7MK2w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/prop-types": "*",
|
||||
"csstype": "^3.2.2"
|
||||
@@ -661,6 +672,7 @@
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"baseline-browser-mapping": "^2.9.0",
|
||||
"caniuse-lite": "^1.0.30001759",
|
||||
@@ -936,6 +948,16 @@
|
||||
"url": "https://github.com/sponsors/rawify"
|
||||
}
|
||||
},
|
||||
"node_modules/function-bind": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
||||
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/gensync": {
|
||||
"version": "1.0.0-beta.2",
|
||||
"resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
|
||||
@@ -959,6 +981,19 @@
|
||||
"node": ">=10.13.0"
|
||||
}
|
||||
},
|
||||
"node_modules/hasown": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
||||
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/is-binary-path": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
|
||||
@@ -972,6 +1007,22 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/is-core-module": {
|
||||
"version": "2.16.1",
|
||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz",
|
||||
"integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"hasown": "^2.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/is-extglob": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
||||
@@ -1011,6 +1062,7 @@
|
||||
"integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"jiti": "bin/jiti.js"
|
||||
}
|
||||
@@ -1197,6 +1249,13 @@
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/path-parse": {
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
|
||||
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/picocolors": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
|
||||
@@ -1257,6 +1316,7 @@
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"nanoid": "^3.3.11",
|
||||
"picocolors": "^1.1.1",
|
||||
@@ -1426,6 +1486,7 @@
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz",
|
||||
"integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.1.0"
|
||||
},
|
||||
@@ -1438,6 +1499,7 @@
|
||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",
|
||||
"integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.1.0",
|
||||
"scheduler": "^0.23.2"
|
||||
@@ -1456,6 +1518,38 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/react-router": {
|
||||
"version": "6.30.3",
|
||||
"resolved": "https://registry.npmjs.org/react-router/-/react-router-6.30.3.tgz",
|
||||
"integrity": "sha512-XRnlbKMTmktBkjCLE8/XcZFlnHvr2Ltdr1eJX4idL55/9BbORzyZEaIkBFDhFGCEWBBItsVrDxwx3gnisMitdw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@remix-run/router": "1.23.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": ">=16.8"
|
||||
}
|
||||
},
|
||||
"node_modules/react-router-dom": {
|
||||
"version": "6.30.3",
|
||||
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.30.3.tgz",
|
||||
"integrity": "sha512-pxPcv1AczD4vso7G4Z3TKcvlxK7g7TNt3/FNGMhfqyntocvYKj+GCatfigGDjbLozC4baguJ0ReCigoDJXb0ag==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@remix-run/router": "1.23.2",
|
||||
"react-router": "6.30.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": ">=16.8",
|
||||
"react-dom": ">=16.8"
|
||||
}
|
||||
},
|
||||
"node_modules/read-cache": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz",
|
||||
@@ -1743,6 +1837,7 @@
|
||||
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
@@ -1828,6 +1923,7 @@
|
||||
"integrity": "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"esbuild": "^0.21.3",
|
||||
"postcss": "^8.4.43",
|
||||
|
||||
24
frontend/node_modules/.vite/deps/_metadata.json
generated
vendored
Executable file → Normal file
24
frontend/node_modules/.vite/deps/_metadata.json
generated
vendored
Executable file → Normal file
@@ -1,49 +1,49 @@
|
||||
{
|
||||
"hash": "c1bbfbdd",
|
||||
"configHash": "4a35db48",
|
||||
"lockfileHash": "c802426c",
|
||||
"browserHash": "d470bdcf",
|
||||
"hash": "5ea83bb3",
|
||||
"configHash": "a2aedfee",
|
||||
"lockfileHash": "d6030971",
|
||||
"browserHash": "d90fac4b",
|
||||
"optimized": {
|
||||
"react": {
|
||||
"src": "../../react/index.js",
|
||||
"file": "react.js",
|
||||
"fileHash": "4708aafc",
|
||||
"fileHash": "9d34d1a6",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react-dom": {
|
||||
"src": "../../react-dom/index.js",
|
||||
"file": "react-dom.js",
|
||||
"fileHash": "3f02e152",
|
||||
"fileHash": "0fc1ade4",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react/jsx-dev-runtime": {
|
||||
"src": "../../react/jsx-dev-runtime.js",
|
||||
"file": "react_jsx-dev-runtime.js",
|
||||
"fileHash": "1e3133f9",
|
||||
"fileHash": "c1765a80",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react/jsx-runtime": {
|
||||
"src": "../../react/jsx-runtime.js",
|
||||
"file": "react_jsx-runtime.js",
|
||||
"fileHash": "fb9b101d",
|
||||
"fileHash": "5ac499cf",
|
||||
"needsInterop": true
|
||||
},
|
||||
"lucide-react": {
|
||||
"src": "../../lucide-react/dist/esm/lucide-react.js",
|
||||
"file": "lucide-react.js",
|
||||
"fileHash": "c7552fe5",
|
||||
"fileHash": "50beb2bb",
|
||||
"needsInterop": false
|
||||
},
|
||||
"react-dom/client": {
|
||||
"src": "../../react-dom/client.js",
|
||||
"file": "react-dom_client.js",
|
||||
"fileHash": "b5517757",
|
||||
"fileHash": "27671ab9",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react-router-dom": {
|
||||
"src": "../../../../node_modules/react-router-dom/dist/index.mjs",
|
||||
"src": "../../react-router-dom/dist/index.js",
|
||||
"file": "react-router-dom.js",
|
||||
"fileHash": "d740f0c2",
|
||||
"fileHash": "bc33182c",
|
||||
"needsInterop": false
|
||||
}
|
||||
},
|
||||
|
||||
0
frontend/node_modules/.vite/deps/chunk-2YIMICFJ.js
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/chunk-2YIMICFJ.js
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/chunk-2YIMICFJ.js.map
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/chunk-2YIMICFJ.js.map
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/chunk-BCXODTBQ.js
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/chunk-BCXODTBQ.js
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/chunk-BCXODTBQ.js.map
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/chunk-BCXODTBQ.js.map
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/lucide-react.js
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/lucide-react.js
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/lucide-react.js.map
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/lucide-react.js.map
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/package.json
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/package.json
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/react-dom.js
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/react-dom.js
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/react-dom.js.map
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/react-dom.js.map
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/react-dom_client.js
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/react-dom_client.js
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/react-dom_client.js.map
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/react-dom_client.js.map
generated
vendored
Executable file → Normal file
14438
frontend/node_modules/.vite/deps/react-router-dom.js
generated
vendored
Executable file → Normal file
14438
frontend/node_modules/.vite/deps/react-router-dom.js
generated
vendored
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
8
frontend/node_modules/.vite/deps/react-router-dom.js.map
generated
vendored
Executable file → Normal file
8
frontend/node_modules/.vite/deps/react-router-dom.js.map
generated
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
0
frontend/node_modules/.vite/deps/react.js
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/react.js
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/react.js.map
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/react.js.map
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/react_jsx-dev-runtime.js
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/react_jsx-dev-runtime.js
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/react_jsx-dev-runtime.js.map
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/react_jsx-dev-runtime.js.map
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/react_jsx-runtime.js
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/react_jsx-runtime.js
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/react_jsx-runtime.js.map
generated
vendored
Executable file → Normal file
0
frontend/node_modules/.vite/deps/react_jsx-runtime.js.map
generated
vendored
Executable file → Normal file
3
frontend/node_modules/@esbuild/linux-x64/README.md
generated
vendored
Normal file
3
frontend/node_modules/@esbuild/linux-x64/README.md
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# esbuild
|
||||
|
||||
This is the Linux 64-bit binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details.
|
||||
Binary file not shown.
6
frontend/node_modules/@esbuild/win32-x64/package.json → frontend/node_modules/@esbuild/linux-x64/package.json
generated
vendored
Executable file → Normal file
6
frontend/node_modules/@esbuild/win32-x64/package.json → frontend/node_modules/@esbuild/linux-x64/package.json
generated
vendored
Executable file → Normal file
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@esbuild/win32-x64",
|
||||
"name": "@esbuild/linux-x64",
|
||||
"version": "0.21.5",
|
||||
"description": "The Windows 64-bit binary for esbuild, a JavaScript bundler.",
|
||||
"description": "The Linux 64-bit binary for esbuild, a JavaScript bundler.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/evanw/esbuild.git"
|
||||
@@ -12,7 +12,7 @@
|
||||
"node": ">=12"
|
||||
},
|
||||
"os": [
|
||||
"win32"
|
||||
"linux"
|
||||
],
|
||||
"cpu": [
|
||||
"x64"
|
||||
3
frontend/node_modules/@esbuild/win32-x64/README.md
generated
vendored
3
frontend/node_modules/@esbuild/win32-x64/README.md
generated
vendored
@@ -1,3 +0,0 @@
|
||||
# esbuild
|
||||
|
||||
This is the Windows 64-bit binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details.
|
||||
900
frontend/node_modules/@remix-run/router/CHANGELOG.md
generated
vendored
Normal file
900
frontend/node_modules/@remix-run/router/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,900 @@
|
||||
# `@remix-run/router`
|
||||
|
||||
## 1.23.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Validate redirect locations ([#14707](https://github.com/remix-run/react-router/pull/14707))
|
||||
|
||||
## 1.23.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Normalize double-slashes in `resolvePath` ([#14537](https://github.com/remix-run/react-router/pull/14537))
|
||||
|
||||
## 1.23.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Add `fetcherKey` as a parameter to `patchRoutesOnNavigation` ([#13109](https://github.com/remix-run/react-router/pull/13109))
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fix regression introduced in `6.29.0` via [#12169](https://github.com/remix-run/react-router/pull/12169) that caused issues navigating to hash routes inside splat routes for applications using Lazy Route Discovery (`patchRoutesOnNavigation`) ([#13108](https://github.com/remix-run/react-router/pull/13108))
|
||||
|
||||
## 1.22.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Provide the request `signal` as a parameter to `patchRoutesOnNavigation` ([#12900](https://github.com/remix-run/react-router/pull/12900))
|
||||
|
||||
- This can be used to abort any manifest fetches if the in-flight navigation/fetcher is aborted
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Do not log v7 deprecation warnings in production builds ([#12794](https://github.com/remix-run/react-router/pull/12794))
|
||||
- Strip search parameters from `patchRoutesOnNavigation` `path` param for fetcher calls ([#12899](https://github.com/remix-run/react-router/pull/12899))
|
||||
- Properly bubble headers when throwing a `data()` result ([#12845](https://github.com/remix-run/react-router/pull/12845))
|
||||
- Optimize route matching by skipping redundant `matchRoutes` calls when possible ([#12169](https://github.com/remix-run/react-router/pull/12169))
|
||||
|
||||
## 1.21.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- - Fix issue with fetcher data cleanup in the data layer on fetcher unmount ([#12674](https://github.com/remix-run/react-router/pull/12674))
|
||||
- Fix behavior of manual fetcher keys when not opted into `future.v7_fetcherPersist`
|
||||
|
||||
## 1.21.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- - Log deprecation warnings for v7 flags ([#11750](https://github.com/remix-run/react-router/pull/11750))
|
||||
- Add deprecation warnings to `json`/`defer` in favor of returning raw objects
|
||||
- These methods will be removed in React Router v7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Update JSDoc URLs for new website structure (add /v6/ segment) ([#12141](https://github.com/remix-run/react-router/pull/12141))
|
||||
|
||||
## 1.20.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Stabilize `unstable_patchRoutesOnNavigation` ([#11973](https://github.com/remix-run/react-router/pull/11973))
|
||||
- Add new `PatchRoutesOnNavigationFunctionArgs` type for convenience ([#11967](https://github.com/remix-run/react-router/pull/11967))
|
||||
- Stabilize `unstable_dataStrategy` ([#11974](https://github.com/remix-run/react-router/pull/11974))
|
||||
- Stabilize the `unstable_flushSync` option for navigations and fetchers ([#11989](https://github.com/remix-run/react-router/pull/11989))
|
||||
- Stabilize the `unstable_viewTransition` option for navigations and the corresponding `unstable_useViewTransitionState` hook ([#11989](https://github.com/remix-run/react-router/pull/11989))
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fix bug when submitting to the current contextual route (parent route with an index child) when an `?index` param already exists from a prior submission ([#12003](https://github.com/remix-run/react-router/pull/12003))
|
||||
- Fix `useFormAction` bug - when removing `?index` param it would not keep other non-Remix `index` params ([#12003](https://github.com/remix-run/react-router/pull/12003))
|
||||
- Fix bug with fetchers not persisting `preventScrollReset` through redirects during concurrent fetches ([#11999](https://github.com/remix-run/react-router/pull/11999))
|
||||
- Remove internal cache to fix issues with interrupted `patchRoutesOnNavigation` calls ([#12055](https://github.com/remix-run/react-router/pull/12055))
|
||||
- We used to cache in-progress calls to `patchRoutesOnNavigation` internally so that multiple navigations with the same start/end would only execute the function once and use the same promise
|
||||
- However, this approach was at odds with `patch` short circuiting if a navigation was interrupted (and the `request.signal` aborted) since the first invocation's `patch` would no-op
|
||||
- This cache also made some assumptions as to what a valid cache key might be - and is oblivious to any other application-state changes that may have occurred
|
||||
- So, the cache has been removed because in _most_ cases, repeated calls to something like `import()` for async routes will already be cached automatically - and if not it's easy enough for users to implement this cache in userland
|
||||
- Avoid unnecessary `console.error` on fetcher abort due to back-to-back revalidation calls ([#12050](https://github.com/remix-run/react-router/pull/12050))
|
||||
- Expose errors thrown from `patchRoutesOnNavigation` directly to `useRouteError` instead of wrapping them in a 400 `ErrorResponse` instance ([#12111](https://github.com/remix-run/react-router/pull/12111))
|
||||
- Fix types for `RouteObject` within `PatchRoutesOnNavigationFunction`'s `patch` method so it doesn't expect agnostic route objects passed to `patch` ([#11967](https://github.com/remix-run/react-router/pull/11967))
|
||||
- Fix bugs with `partialHydration` when hydrating with errors ([#12070](https://github.com/remix-run/react-router/pull/12070))
|
||||
- Remove internal `discoveredRoutes` FIFO queue from `unstable_patchRoutesOnNavigation` ([#11977](https://github.com/remix-run/react-router/pull/11977))
|
||||
|
||||
## 1.19.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Update the `unstable_dataStrategy` API to allow for more advanced implementations ([#11943](https://github.com/remix-run/react-router/pull/11943))
|
||||
- Rename `unstable_HandlerResult` to `unstable_DataStrategyResult`
|
||||
- The return signature has changed from a parallel array of `unstable_DataStrategyResult[]` (parallel to `matches`) to a key/value object of `routeId => unstable_DataStrategyResult`
|
||||
- This allows you to more easily decide to opt-into or out-of revalidating data that may not have been revalidated by default (via `match.shouldLoad`)
|
||||
- ⚠️ This is a breaking change if you've currently adopted `unstable_dataStrategy`
|
||||
- Added a new `fetcherKey` parameter to `unstable_dataStrategy` to allow differentiation from navigational and fetcher calls
|
||||
- You should now return/throw a result from your `handlerOverride` instead of returning a `DataStrategyResult`
|
||||
- If you are aggregating the results of `match.resolve()` into a final results object you should not need to think about the `DataStrategyResult` type
|
||||
- If you are manually filling your results object from within your `handlerOverride`, then you will need to assign a `DataStrategyResult` as the value so React Router knows if it's a successful execution or an error.
|
||||
- Preserve view transition through redirects ([#11925](https://github.com/remix-run/react-router/pull/11925))
|
||||
- Fix blocker usage when `blocker.proceed` is called quickly/synchronously ([#11930](https://github.com/remix-run/react-router/pull/11930))
|
||||
- Preserve pending view transitions through a router revalidation call ([#11917](https://github.com/remix-run/react-router/pull/11917))
|
||||
|
||||
## 1.19.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fog of War: Update `unstable_patchRoutesOnMiss` logic so that we call the method when we match routes with dynamic param or splat segments in case there exists a higher-scoring static route that we've not yet discovered. ([#11883](https://github.com/remix-run/react-router/pull/11883))
|
||||
|
||||
- We also now leverage an internal FIFO queue of previous paths we've already called `unstable_patchRouteOnMiss` against so that we don't re-call on subsequent navigations to the same path
|
||||
|
||||
- Rename `unstable_patchRoutesOnMiss` to `unstable_patchRoutesOnNavigation` to match new behavior ([#11888](https://github.com/remix-run/react-router/pull/11888))
|
||||
|
||||
## 1.19.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Add a new `replace(url, init?)` alternative to `redirect(url, init?)` that performs a `history.replaceState` instead of a `history.pushState` on client-side navigation redirects ([#11811](https://github.com/remix-run/react-router/pull/11811))
|
||||
- Add a new `unstable_data()` API for usage with Remix Single Fetch ([#11836](https://github.com/remix-run/react-router/pull/11836))
|
||||
- This API is not intended for direct usage in React Router SPA applications
|
||||
- It is primarily intended for usage with `createStaticHandler.query()` to allow loaders/actions to return arbitrary data + `status`/`headers` without forcing the serialization of data into a `Response` instance
|
||||
- This allows for more advanced serialization tactics via `unstable_dataStrategy` such as serializing via `turbo-stream` in Remix Single Fetch
|
||||
- ⚠️ This removes the `status` field from `HandlerResult`
|
||||
- If you need to return a specific `status` from `unstable_dataStrategy` you should instead do so via `unstable_data()`
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fix internal cleanup of interrupted fetchers to avoid invalid revalidations on navigations ([#11839](https://github.com/remix-run/react-router/pull/11839))
|
||||
- When a `fetcher.load` is interrupted by an `action` submission, we track it internally and force revalidation once the `action` completes
|
||||
- We previously only cleared out this internal tracking info on a successful _navigation_ submission
|
||||
- Therefore, if the `fetcher.load` was interrupted by a `fetcher.submit`, then we wouldn't remove it from this internal tracking info on successful load (incorrectly)
|
||||
- And then on the next navigation it's presence in the internal tracking would automatically trigger execution of the `fetcher.load` again, ignoring any `shouldRevalidate` logic
|
||||
- This fix cleans up the internal tracking so it applies to both navigation submission and fetcher submissions
|
||||
- Fix initial hydration behavior when using `future.v7_partialHydration` along with `unstable_patchRoutesOnMiss` ([#11838](https://github.com/remix-run/react-router/pull/11838))
|
||||
- During initial hydration, `router.state.matches` will now include any partial matches so that we can render ancestor `HydrateFallback` components
|
||||
|
||||
## 1.18.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Stabilize `future.unstable_skipActionErrorRevalidation` as `future.v7_skipActionErrorRevalidation` ([#11769](https://github.com/remix-run/react-router/pull/11769))
|
||||
- When this flag is enabled, actions will not automatically trigger a revalidation if they return/throw a `Response` with a `4xx`/`5xx` status code
|
||||
- You may still opt-into revalidation via `shouldRevalidate`
|
||||
- This also changes `shouldRevalidate`'s `unstable_actionStatus` parameter to `actionStatus`
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fix bubbling of errors thrown from `unstable_patchRoutesOnMiss` ([#11786](https://github.com/remix-run/react-router/pull/11786))
|
||||
- Fix hydration in SSR apps using `unstable_patchRoutesOnMiss` that matched a splat route on the server ([#11790](https://github.com/remix-run/react-router/pull/11790))
|
||||
|
||||
## 1.17.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fog of War (unstable): Trigger a new `router.routes` identity/reflow during route patching ([#11740](https://github.com/remix-run/react-router/pull/11740))
|
||||
- Fog of War (unstable): Fix initial matching when a splat route matches ([#11759](https://github.com/remix-run/react-router/pull/11759))
|
||||
|
||||
## 1.17.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Add support for Lazy Route Discovery (a.k.a. Fog of War) ([#11626](https://github.com/remix-run/react-router/pull/11626))
|
||||
|
||||
- RFC: <https://github.com/remix-run/react-router/discussions/11113>
|
||||
- `unstable_patchRoutesOnMiss` docs: <https://reactrouter.com/v6/routers/create-browser-router>
|
||||
|
||||
## 1.16.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Support `unstable_dataStrategy` on `staticHandler.queryRoute` ([#11515](https://github.com/remix-run/react-router/pull/11515))
|
||||
|
||||
## 1.16.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Add a new `unstable_dataStrategy` configuration option ([#11098](https://github.com/remix-run/react-router/pull/11098))
|
||||
- This option allows Data Router applications to take control over the approach for executing route loaders and actions
|
||||
- The default implementation is today's behavior, to fetch all loaders in parallel, but this option allows users to implement more advanced data flows including Remix single-fetch, middleware/context APIs, automatic loader caching, and more
|
||||
- Move `unstable_dataStrategy` from `createStaticHandler` to `staticHandler.query` so it can be request-specific for use with the `ResponseStub` approach in Remix. It's not really applicable to `queryRoute` for now since that's a singular handler call anyway so any pre-processing/post/processing could be done there manually. ([#11377](https://github.com/remix-run/react-router/pull/11377))
|
||||
- Add a new `future.unstable_skipActionRevalidation` future flag ([#11098](https://github.com/remix-run/react-router/pull/11098))
|
||||
- Currently, active loaders revalidate after any action, regardless of the result
|
||||
- With this flag enabled, actions that return/throw a 4xx/5xx response status will no longer automatically revalidate
|
||||
- This should reduce load on your server since it's rare that a 4xx/5xx should actually mutate any data
|
||||
- If you need to revalidate after a 4xx/5xx result with this flag enabled, you can still do that via returning `true` from `shouldRevalidate`
|
||||
- `shouldRevalidate` now also receives a new `unstable_actionStatus` argument alongside `actionResult` so you can make decision based on the status of the `action` response without having to encode it into the action data
|
||||
- Added a `skipLoaderErrorBubbling` flag to `staticHandler.query` to disable error bubbling on loader executions for single-fetch scenarios where the client-side router will handle the bubbling ([#11098](https://github.com/remix-run/react-router/pull/11098))
|
||||
|
||||
## 1.15.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fix a `future.v7_partialHydration` bug that would re-run loaders below the boundary on hydration if SSR loader errors bubbled to a parent boundary ([#11324](https://github.com/remix-run/react-router/pull/11324))
|
||||
- Fix a `future.v7_partialHydration` bug that would consider the router uninitialized if a route did not have a loader ([#11325](https://github.com/remix-run/react-router/pull/11325))
|
||||
|
||||
## 1.15.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Preserve hydrated errors during partial hydration runs ([#11305](https://github.com/remix-run/react-router/pull/11305))
|
||||
|
||||
## 1.15.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fix encoding/decoding issues with pre-encoded dynamic parameter values ([#11199](https://github.com/remix-run/react-router/pull/11199))
|
||||
|
||||
## 1.15.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Add a `createStaticHandler` `future.v7_throwAbortReason` flag to throw `request.signal.reason` (defaults to a `DOMException`) when a request is aborted instead of an `Error` such as `new Error("query() call aborted: GET /path")` ([#11104](https://github.com/remix-run/react-router/pull/11104))
|
||||
|
||||
- Please note that `DOMException` was added in Node v17 so you will not get a `DOMException` on Node 16 and below.
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Respect the `ErrorResponse` status code if passed to `getStaticContextFormError` ([#11213](https://github.com/remix-run/react-router/pull/11213))
|
||||
|
||||
## 1.14.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fix bug where dashes were not picked up in dynamic parameter names ([#11160](https://github.com/remix-run/react-router/pull/11160))
|
||||
- Do not attempt to deserialize empty JSON responses ([#11164](https://github.com/remix-run/react-router/pull/11164))
|
||||
|
||||
## 1.14.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fix bug with `route.lazy` not working correctly on initial SPA load when `v7_partialHydration` is specified ([#11121](https://github.com/remix-run/react-router/pull/11121))
|
||||
- Fix bug preventing revalidation from occurring for persisted fetchers unmounted during the `submitting` phase ([#11102](https://github.com/remix-run/react-router/pull/11102))
|
||||
- De-dup relative path logic in `resolveTo` ([#11097](https://github.com/remix-run/react-router/pull/11097))
|
||||
|
||||
## 1.14.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Added a new `future.v7_partialHydration` future flag that enables partial hydration of a data router when Server-Side Rendering. This allows you to provide `hydrationData.loaderData` that has values for _some_ initially matched route loaders, but not all. When this flag is enabled, the router will call `loader` functions for routes that do not have hydration loader data during `router.initialize()`, and it will render down to the deepest provided `HydrateFallback` (up to the first route without hydration data) while it executes the unhydrated routes. ([#11033](https://github.com/remix-run/react-router/pull/11033))
|
||||
|
||||
For example, the following router has a `root` and `index` route, but only provided `hydrationData.loaderData` for the `root` route. Because the `index` route has a `loader`, we need to run that during initialization. With `future.v7_partialHydration` specified, `<RouterProvider>` will render the `RootComponent` (because it has data) and then the `IndexFallback` (since it does not have data). Once `indexLoader` finishes, application will update and display `IndexComponent`.
|
||||
|
||||
```jsx
|
||||
let router = createBrowserRouter(
|
||||
[
|
||||
{
|
||||
id: "root",
|
||||
path: "/",
|
||||
loader: rootLoader,
|
||||
Component: RootComponent,
|
||||
Fallback: RootFallback,
|
||||
children: [
|
||||
{
|
||||
id: "index",
|
||||
index: true,
|
||||
loader: indexLoader,
|
||||
Component: IndexComponent,
|
||||
HydrateFallback: IndexFallback,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
{
|
||||
future: {
|
||||
v7_partialHydration: true,
|
||||
},
|
||||
hydrationData: {
|
||||
loaderData: {
|
||||
root: { message: "Hydrated from Root!" },
|
||||
},
|
||||
},
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
If the above example did not have an `IndexFallback`, then `RouterProvider` would instead render the `RootFallback` while it executed the `indexLoader`.
|
||||
|
||||
**Note:** When `future.v7_partialHydration` is provided, the `<RouterProvider fallbackElement>` prop is ignored since you can move it to a `Fallback` on your top-most route. The `fallbackElement` prop will be removed in React Router v7 when `v7_partialHydration` behavior becomes the standard behavior.
|
||||
|
||||
- Add a new `future.v7_relativeSplatPath` flag to implement a breaking bug fix to relative routing when inside a splat route. ([#11087](https://github.com/remix-run/react-router/pull/11087))
|
||||
|
||||
This fix was originally added in [#10983](https://github.com/remix-run/react-router/issues/10983) and was later reverted in [#11078](https://github.com/remix-run/react-router/pull/11078) because it was determined that a large number of existing applications were relying on the buggy behavior (see [#11052](https://github.com/remix-run/react-router/issues/11052))
|
||||
|
||||
**The Bug**
|
||||
The buggy behavior is that without this flag, the default behavior when resolving relative paths is to _ignore_ any splat (`*`) portion of the current route path.
|
||||
|
||||
**The Background**
|
||||
This decision was originally made thinking that it would make the concept of nested different sections of your apps in `<Routes>` easier if relative routing would _replace_ the current splat:
|
||||
|
||||
```jsx
|
||||
<BrowserRouter>
|
||||
<Routes>
|
||||
<Route path="/" element={<Home />} />
|
||||
<Route path="dashboard/*" element={<Dashboard />} />
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
```
|
||||
|
||||
Any paths like `/dashboard`, `/dashboard/team`, `/dashboard/projects` will match the `Dashboard` route. The dashboard component itself can then render nested `<Routes>`:
|
||||
|
||||
```jsx
|
||||
function Dashboard() {
|
||||
return (
|
||||
<div>
|
||||
<h2>Dashboard</h2>
|
||||
<nav>
|
||||
<Link to="/">Dashboard Home</Link>
|
||||
<Link to="team">Team</Link>
|
||||
<Link to="projects">Projects</Link>
|
||||
</nav>
|
||||
|
||||
<Routes>
|
||||
<Route path="/" element={<DashboardHome />} />
|
||||
<Route path="team" element={<DashboardTeam />} />
|
||||
<Route path="projects" element={<DashboardProjects />} />
|
||||
</Routes>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
Now, all links and route paths are relative to the router above them. This makes code splitting and compartmentalizing your app really easy. You could render the `Dashboard` as its own independent app, or embed it into your large app without making any changes to it.
|
||||
|
||||
**The Problem**
|
||||
|
||||
The problem is that this concept of ignoring part of a path breaks a lot of other assumptions in React Router - namely that `"."` always means the current location pathname for that route. When we ignore the splat portion, we start getting invalid paths when using `"."`:
|
||||
|
||||
```jsx
|
||||
// If we are on URL /dashboard/team, and we want to link to /dashboard/team:
|
||||
function DashboardTeam() {
|
||||
// ❌ This is broken and results in <a href="/dashboard">
|
||||
return <Link to=".">A broken link to the Current URL</Link>;
|
||||
|
||||
// ✅ This is fixed but super unintuitive since we're already at /dashboard/team!
|
||||
return <Link to="./team">A broken link to the Current URL</Link>;
|
||||
}
|
||||
```
|
||||
|
||||
We've also introduced an issue that we can no longer move our `DashboardTeam` component around our route hierarchy easily - since it behaves differently if we're underneath a non-splat route, such as `/dashboard/:widget`. Now, our `"."` links will, properly point to ourself _inclusive of the dynamic param value_ so behavior will break from it's corresponding usage in a `/dashboard/*` route.
|
||||
|
||||
Even worse, consider a nested splat route configuration:
|
||||
|
||||
```jsx
|
||||
<BrowserRouter>
|
||||
<Routes>
|
||||
<Route path="dashboard">
|
||||
<Route path="*" element={<Dashboard />} />
|
||||
</Route>
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
```
|
||||
|
||||
Now, a `<Link to=".">` and a `<Link to="..">` inside the `Dashboard` component go to the same place! That is definitely not correct!
|
||||
|
||||
Another common issue arose in Data Routers (and Remix) where any `<Form>` should post to it's own route `action` if you the user doesn't specify a form action:
|
||||
|
||||
```jsx
|
||||
let router = createBrowserRouter({
|
||||
path: "/dashboard",
|
||||
children: [
|
||||
{
|
||||
path: "*",
|
||||
action: dashboardAction,
|
||||
Component() {
|
||||
// ❌ This form is broken! It throws a 405 error when it submits because
|
||||
// it tries to submit to /dashboard (without the splat value) and the parent
|
||||
// `/dashboard` route doesn't have an action
|
||||
return <Form method="post">...</Form>;
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
```
|
||||
|
||||
This is just a compounded issue from the above because the default location for a `Form` to submit to is itself (`"."`) - and if we ignore the splat portion, that now resolves to the parent route.
|
||||
|
||||
**The Solution**
|
||||
If you are leveraging this behavior, it's recommended to enable the future flag, move your splat to it's own route, and leverage `../` for any links to "sibling" pages:
|
||||
|
||||
```jsx
|
||||
<BrowserRouter>
|
||||
<Routes>
|
||||
<Route path="dashboard">
|
||||
<Route index path="*" element={<Dashboard />} />
|
||||
</Route>
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
|
||||
function Dashboard() {
|
||||
return (
|
||||
<div>
|
||||
<h2>Dashboard</h2>
|
||||
<nav>
|
||||
<Link to="..">Dashboard Home</Link>
|
||||
<Link to="../team">Team</Link>
|
||||
<Link to="../projects">Projects</Link>
|
||||
</nav>
|
||||
|
||||
<Routes>
|
||||
<Route path="/" element={<DashboardHome />} />
|
||||
<Route path="team" element={<DashboardTeam />} />
|
||||
<Route path="projects" element={<DashboardProjects />} />
|
||||
</Router>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
This way, `.` means "the full current pathname for my route" in all cases (including static, dynamic, and splat routes) and `..` always means "my parents pathname".
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Catch and bubble errors thrown when trying to unwrap responses from `loader`/`action` functions ([#11061](https://github.com/remix-run/react-router/pull/11061))
|
||||
- Fix `relative="path"` issue when rendering `Link`/`NavLink` outside of matched routes ([#11062](https://github.com/remix-run/react-router/pull/11062))
|
||||
|
||||
## 1.13.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Revert the `useResolvedPath` fix for splat routes due to a large number of applications that were relying on the buggy behavior (see <https://github.com/remix-run/react-router/issues/11052#issuecomment-1836589329>). We plan to re-introduce this fix behind a future flag in the next minor version. ([#11078](https://github.com/remix-run/react-router/pull/11078))
|
||||
|
||||
## 1.13.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Export the `PathParam` type from the public API ([#10719](https://github.com/remix-run/react-router/pull/10719))
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fix bug with `resolveTo` in splat routes ([#11045](https://github.com/remix-run/react-router/pull/11045))
|
||||
- This is a follow up to [#10983](https://github.com/remix-run/react-router/pull/10983) to handle the few other code paths using `getPathContributingMatches`
|
||||
- This removes the `UNSAFE_getPathContributingMatches` export from `@remix-run/router` since we no longer need this in the `react-router`/`react-router-dom` layers
|
||||
- Do not revalidate unmounted fetchers when `v7_fetcherPersist` is enabled ([#11044](https://github.com/remix-run/react-router/pull/11044))
|
||||
|
||||
## 1.12.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Add `unstable_flushSync` option to `router.navigate` and `router.fetch` to tell the React Router layer to opt-out of `React.startTransition` and into `ReactDOM.flushSync` for state updates ([#11005](https://github.com/remix-run/react-router/pull/11005))
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fix `relative="path"` bug where relative path calculations started from the full location pathname, instead of from the current contextual route pathname. ([#11006](https://github.com/remix-run/react-router/pull/11006))
|
||||
|
||||
```jsx
|
||||
<Route path="/a">
|
||||
<Route path="/b" element={<Component />}>
|
||||
<Route path="/c" />
|
||||
</Route>
|
||||
</Route>;
|
||||
|
||||
function Component() {
|
||||
return (
|
||||
<>
|
||||
{/* This is now correctly relative to /a/b, not /a/b/c */}
|
||||
<Link to=".." relative="path" />
|
||||
<Outlet />
|
||||
</>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
## 1.11.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Add a new `future.v7_fetcherPersist` flag to the `@remix-run/router` to change the persistence behavior of fetchers when `router.deleteFetcher` is called. Instead of being immediately cleaned up, fetchers will persist until they return to an `idle` state ([RFC](https://github.com/remix-run/remix/discussions/7698)) ([#10962](https://github.com/remix-run/react-router/pull/10962))
|
||||
|
||||
- This is sort of a long-standing bug fix as the `useFetchers()` API was always supposed to only reflect **in-flight** fetcher information for pending/optimistic UI -- it was not intended to reflect fetcher data or hang onto fetchers after they returned to an `idle` state
|
||||
- Keep an eye out for the following specific behavioral changes when opting into this flag and check your app for compatibility:
|
||||
- Fetchers that complete _while still mounted_ will no longer appear in `useFetchers()`. They served effectively no purpose in there since you can access the data via `useFetcher().data`).
|
||||
- Fetchers that previously unmounted _while in-flight_ will not be immediately aborted and will instead be cleaned up once they return to an `idle` state. They will remain exposed via `useFetchers` while in-flight so you can still access pending/optimistic data after unmount.
|
||||
|
||||
- When `v7_fetcherPersist` is enabled, the router now performs ref-counting on fetcher keys via `getFetcher`/`deleteFetcher` so it knows when a given fetcher is totally unmounted from the UI ([#10977](https://github.com/remix-run/react-router/pull/10977))
|
||||
|
||||
- Once a fetcher has been totally unmounted, we can ignore post-processing of a persisted fetcher result such as a redirect or an error
|
||||
- The router will also pass a new `deletedFetchers` array to the subscriber callbacks so that the UI layer can remove associated fetcher data
|
||||
|
||||
- Add support for optional path segments in `matchPath` ([#10768](https://github.com/remix-run/react-router/pull/10768))
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fix `router.getFetcher`/`router.deleteFetcher` type definitions which incorrectly specified `key` as an optional parameter ([#10960](https://github.com/remix-run/react-router/pull/10960))
|
||||
|
||||
## 1.10.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Add experimental support for the [View Transitions API](https://developer.mozilla.org/en-US/docs/Web/API/ViewTransition) by allowing users to opt-into view transitions on navigations via the new `unstable_viewTransition` option to `router.navigate` ([#10916](https://github.com/remix-run/react-router/pull/10916))
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Allow 404 detection to leverage root route error boundary if path contains a URL segment ([#10852](https://github.com/remix-run/react-router/pull/10852))
|
||||
- Fix `ErrorResponse` type to avoid leaking internal field ([#10876](https://github.com/remix-run/react-router/pull/10876))
|
||||
|
||||
## 1.9.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- In order to move towards stricter TypeScript support in the future, we're aiming to replace current usages of `any` with `unknown` on exposed typings for user-provided data. To do this in Remix v2 without introducing breaking changes in React Router v6, we have added generics to a number of shared types. These continue to default to `any` in React Router and are overridden with `unknown` in Remix. In React Router v7 we plan to move these to `unknown` as a breaking change. ([#10843](https://github.com/remix-run/react-router/pull/10843))
|
||||
- `Location` now accepts a generic for the `location.state` value
|
||||
- `ActionFunctionArgs`/`ActionFunction`/`LoaderFunctionArgs`/`LoaderFunction` now accept a generic for the `context` parameter (only used in SSR usages via `createStaticHandler`)
|
||||
- The return type of `useMatches` (now exported as `UIMatch`) accepts generics for `match.data` and `match.handle` - both of which were already set to `unknown`
|
||||
- Move the `@private` class export `ErrorResponse` to an `UNSAFE_ErrorResponseImpl` export since it is an implementation detail and there should be no construction of `ErrorResponse` instances in userland. This frees us up to export a `type ErrorResponse` which correlates to an instance of the class via `InstanceType`. Userland code should only ever be using `ErrorResponse` as a type and should be type-narrowing via `isRouteErrorResponse`. ([#10811](https://github.com/remix-run/react-router/pull/10811))
|
||||
- Export `ShouldRevalidateFunctionArgs` interface ([#10797](https://github.com/remix-run/react-router/pull/10797))
|
||||
- Removed private/internal APIs only required for the Remix v1 backwards compatibility layer and no longer needed in Remix v2 (`_isFetchActionRedirect`, `_hasFetcherDoneAnything`) ([#10715](https://github.com/remix-run/react-router/pull/10715))
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Add method/url to error message on aborted `query`/`queryRoute` calls ([#10793](https://github.com/remix-run/react-router/pull/10793))
|
||||
- Fix a race-condition with loader/action-thrown errors on `route.lazy` routes ([#10778](https://github.com/remix-run/react-router/pull/10778))
|
||||
- Fix type for `actionResult` on the arguments object passed to `shouldRevalidate` ([#10779](https://github.com/remix-run/react-router/pull/10779))
|
||||
|
||||
## 1.8.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Add's a new `redirectDocument()` function which allows users to specify that a redirect from a `loader`/`action` should trigger a document reload (via `window.location`) instead of attempting to navigate to the redirected location via React Router ([#10705](https://github.com/remix-run/react-router/pull/10705))
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fix an issue in `queryRoute` that was not always identifying thrown `Response` instances ([#10717](https://github.com/remix-run/react-router/pull/10717))
|
||||
- Ensure hash history always includes a leading slash on hash pathnames ([#10753](https://github.com/remix-run/react-router/pull/10753))
|
||||
|
||||
## 1.7.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Trigger an error if a `defer` promise resolves/rejects with `undefined` in order to match the behavior of loaders and actions which must return a value or `null` ([#10690](https://github.com/remix-run/react-router/pull/10690))
|
||||
- Properly handle fetcher redirects interrupted by normal navigations ([#10674](https://github.com/remix-run/react-router/pull/10674), [#10709](https://github.com/remix-run/react-router/pull/10709))
|
||||
- Initial-load fetchers should not automatically revalidate on GET navigations ([#10688](https://github.com/remix-run/react-router/pull/10688))
|
||||
- Enhance the return type of `Route.lazy` to prohibit returning an empty object ([#10634](https://github.com/remix-run/react-router/pull/10634))
|
||||
|
||||
## 1.7.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fix issues with reused blockers on subsequent navigations ([#10656](https://github.com/remix-run/react-router/pull/10656))
|
||||
|
||||
## 1.7.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Add support for `application/json` and `text/plain` encodings for `router.navigate`/`router.fetch` submissions. To leverage these encodings, pass your data in a `body` parameter and specify the desired `formEncType`: ([#10413](https://github.com/remix-run/react-router/pull/10413))
|
||||
|
||||
```js
|
||||
// By default, the encoding is "application/x-www-form-urlencoded"
|
||||
router.navigate("/", {
|
||||
formMethod: "post",
|
||||
body: { key: "value" },
|
||||
});
|
||||
|
||||
async function action({ request }) {
|
||||
// await request.formData() => FormData instance with entry [key=value]
|
||||
}
|
||||
```
|
||||
|
||||
```js
|
||||
// Pass `formEncType` to opt-into a different encoding (json)
|
||||
router.navigate("/", {
|
||||
formMethod: "post",
|
||||
formEncType: "application/json",
|
||||
body: { key: "value" },
|
||||
});
|
||||
|
||||
async function action({ request }) {
|
||||
// await request.json() => { key: "value" }
|
||||
}
|
||||
```
|
||||
|
||||
```js
|
||||
// Pass `formEncType` to opt-into a different encoding (text)
|
||||
router.navigate("/", {
|
||||
formMethod: "post",
|
||||
formEncType: "text/plain",
|
||||
body: "Text submission",
|
||||
});
|
||||
|
||||
async function action({ request }) {
|
||||
// await request.text() => "Text submission"
|
||||
}
|
||||
```
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Call `window.history.pushState/replaceState` before updating React Router state (instead of after) so that `window.location` matches `useLocation` during synchronous React 17 rendering ([#10448](https://github.com/remix-run/react-router/pull/10448))
|
||||
- ⚠️ However, generally apps should not be relying on `window.location` and should always reference `useLocation` when possible, as `window.location` will not be in sync 100% of the time (due to `popstate` events, concurrent mode, etc.)
|
||||
- Strip `basename` from the `location` provided to `<ScrollRestoration getKey>` to match the `useLocation` behavior ([#10550](https://github.com/remix-run/react-router/pull/10550))
|
||||
- Avoid calling `shouldRevalidate` for fetchers that have not yet completed a data load ([#10623](https://github.com/remix-run/react-router/pull/10623))
|
||||
- Fix `unstable_useBlocker` key issues in `StrictMode` ([#10573](https://github.com/remix-run/react-router/pull/10573))
|
||||
- Upgrade `typescript` to 5.1 ([#10581](https://github.com/remix-run/react-router/pull/10581))
|
||||
|
||||
## 1.6.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Allow fetcher revalidations to complete if submitting fetcher is deleted ([#10535](https://github.com/remix-run/react-router/pull/10535))
|
||||
- Re-throw `DOMException` (`DataCloneError`) when attempting to perform a `PUSH` navigation with non-serializable state. ([#10427](https://github.com/remix-run/react-router/pull/10427))
|
||||
- Ensure revalidations happen when hash is present ([#10516](https://github.com/remix-run/react-router/pull/10516))
|
||||
- upgrade jest and jsdom ([#10453](https://github.com/remix-run/react-router/pull/10453))
|
||||
|
||||
## 1.6.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fix HMR-driven error boundaries by properly reconstructing new routes and `manifest` in `\_internalSetRoutes` ([#10437](https://github.com/remix-run/react-router/pull/10437))
|
||||
- Fix bug where initial data load would not kick off when hash is present ([#10493](https://github.com/remix-run/react-router/pull/10493))
|
||||
|
||||
## 1.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fix `basename` handling when navigating without a path ([#10433](https://github.com/remix-run/react-router/pull/10433))
|
||||
- "Same hash" navigations no longer re-run loaders to match browser behavior (i.e. `/path#hash -> /path#hash`) ([#10408](https://github.com/remix-run/react-router/pull/10408))
|
||||
|
||||
## 1.6.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Enable relative routing in the `@remix-run/router` when providing a source route ID from which the path is relative to: ([#10336](https://github.com/remix-run/react-router/pull/10336))
|
||||
|
||||
- Example: `router.navigate("../path", { fromRouteId: "some-route" })`.
|
||||
- This also applies to `router.fetch` which already receives a source route ID
|
||||
|
||||
- Introduce a new `@remix-run/router` `future.v7_prependBasename` flag to enable `basename` prefixing to all paths coming into `router.navigate` and `router.fetch`.
|
||||
|
||||
- Previously the `basename` was prepended in the React Router layer, but now that relative routing is being handled by the router we need prepend the `basename` _after_ resolving any relative paths
|
||||
- This also enables `basename` support in `useFetcher` as well
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Enhance `LoaderFunction`/`ActionFunction` return type to prevent `undefined` from being a valid return value ([#10267](https://github.com/remix-run/react-router/pull/10267))
|
||||
- Ensure proper 404 error on `fetcher.load` call to a route without a `loader` ([#10345](https://github.com/remix-run/react-router/pull/10345))
|
||||
- Deprecate the `createRouter` `detectErrorBoundary` option in favor of the new `mapRouteProperties` option for converting a framework-agnostic route to a framework-aware route. This allows us to set more than just the `hasErrorBoundary` property during route pre-processing, and is now used for mapping `Component -> element` and `ErrorBoundary -> errorElement` in `react-router`. ([#10287](https://github.com/remix-run/react-router/pull/10287))
|
||||
- Fixed a bug where fetchers were incorrectly attempting to revalidate on search params changes or routing to the same URL (using the same logic for route `loader` revalidations). However, since fetchers have a static href, they should only revalidate on `action` submissions or `router.revalidate` calls. ([#10344](https://github.com/remix-run/react-router/pull/10344))
|
||||
- Decouple `AbortController` usage between revalidating fetchers and the thing that triggered them such that the unmount/deletion of a revalidating fetcher doesn't impact the ongoing triggering navigation/revalidation ([#10271](https://github.com/remix-run/react-router/pull/10271))
|
||||
|
||||
## 1.5.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Added support for [**Future Flags**](https://reactrouter.com/v6/guides/api-development-strategy) in React Router. The first flag being introduced is `future.v7_normalizeFormMethod` which will normalize the exposed `useNavigation()/useFetcher()` `formMethod` fields as uppercase HTTP methods to align with the `fetch()` behavior. ([#10207](https://github.com/remix-run/react-router/pull/10207))
|
||||
|
||||
- When `future.v7_normalizeFormMethod === false` (default v6 behavior),
|
||||
- `useNavigation().formMethod` is lowercase
|
||||
- `useFetcher().formMethod` is lowercase
|
||||
- When `future.v7_normalizeFormMethod === true`:
|
||||
- `useNavigation().formMethod` is uppercase
|
||||
- `useFetcher().formMethod` is uppercase
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Provide fetcher submission to `shouldRevalidate` if the fetcher action redirects ([#10208](https://github.com/remix-run/react-router/pull/10208))
|
||||
- Properly handle `lazy()` errors during router initialization ([#10201](https://github.com/remix-run/react-router/pull/10201))
|
||||
- Remove `instanceof` check for `DeferredData` to be resilient to ESM/CJS boundaries in SSR bundling scenarios ([#10247](https://github.com/remix-run/react-router/pull/10247))
|
||||
- Update to latest `@remix-run/web-fetch@4.3.3` ([#10216](https://github.com/remix-run/react-router/pull/10216))
|
||||
|
||||
## 1.4.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- **Introducing Lazy Route Modules!** ([#10045](https://github.com/remix-run/react-router/pull/10045))
|
||||
|
||||
In order to keep your application bundles small and support code-splitting of your routes, we've introduced a new `lazy()` route property. This is an async function that resolves the non-route-matching portions of your route definition (`loader`, `action`, `element`/`Component`, `errorElement`/`ErrorBoundary`, `shouldRevalidate`, `handle`).
|
||||
|
||||
Lazy routes are resolved on initial load and during the `loading` or `submitting` phase of a navigation or fetcher call. You cannot lazily define route-matching properties (`path`, `index`, `children`) since we only execute your lazy route functions after we've matched known routes.
|
||||
|
||||
Your `lazy` functions will typically return the result of a dynamic import.
|
||||
|
||||
```jsx
|
||||
// In this example, we assume most folks land on the homepage so we include that
|
||||
// in our critical-path bundle, but then we lazily load modules for /a and /b so
|
||||
// they don't load until the user navigates to those routes
|
||||
let routes = createRoutesFromElements(
|
||||
<Route path="/" element={<Layout />}>
|
||||
<Route index element={<Home />} />
|
||||
<Route path="a" lazy={() => import("./a")} />
|
||||
<Route path="b" lazy={() => import("./b")} />
|
||||
</Route>
|
||||
);
|
||||
```
|
||||
|
||||
Then in your lazy route modules, export the properties you want defined for the route:
|
||||
|
||||
```jsx
|
||||
export async function loader({ request }) {
|
||||
let data = await fetchData(request);
|
||||
return json(data);
|
||||
}
|
||||
|
||||
// Export a `Component` directly instead of needing to create a React Element from it
|
||||
export function Component() {
|
||||
let data = useLoaderData();
|
||||
|
||||
return (
|
||||
<>
|
||||
<h1>You made it!</h1>
|
||||
<p>{data}</p>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
// Export an `ErrorBoundary` directly instead of needing to create a React Element from it
|
||||
export function ErrorBoundary() {
|
||||
let error = useRouteError();
|
||||
return isRouteErrorResponse(error) ? (
|
||||
<h1>
|
||||
{error.status} {error.statusText}
|
||||
</h1>
|
||||
) : (
|
||||
<h1>{error.message || error}</h1>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
An example of this in action can be found in the [`examples/lazy-loading-router-provider`](https://github.com/remix-run/react-router/tree/main/examples/lazy-loading-router-provider) directory of the repository.
|
||||
|
||||
🙌 Huge thanks to @rossipedia for the [Initial Proposal](https://github.com/remix-run/react-router/discussions/9826) and [POC Implementation](https://github.com/remix-run/react-router/pull/9830).
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fix `generatePath` incorrectly applying parameters in some cases ([#10078](https://github.com/remix-run/react-router/pull/10078))
|
||||
|
||||
## 1.3.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Correctly perform a hard redirect for same-origin absolute URLs outside of the router `basename` ([#10076](https://github.com/remix-run/react-router/pull/10076))
|
||||
- Ensure status code and headers are maintained for `defer` loader responses in `createStaticHandler`'s `query()` method ([#10077](https://github.com/remix-run/react-router/pull/10077))
|
||||
- Change `invariant` to an `UNSAFE_invariant` export since it's only intended for internal use ([#10066](https://github.com/remix-run/react-router/pull/10066))
|
||||
- Add internal API for custom HMR implementations ([#9996](https://github.com/remix-run/react-router/pull/9996))
|
||||
|
||||
## 1.3.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Remove inaccurate console warning for POP navigations and update active blocker logic ([#10030](https://github.com/remix-run/react-router/pull/10030))
|
||||
- Only check for differing origin on absolute URL redirects ([#10033](https://github.com/remix-run/react-router/pull/10033))
|
||||
|
||||
## 1.3.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fixes 2 separate issues for revalidating fetcher `shouldRevalidate` calls ([#9948](https://github.com/remix-run/react-router/pull/9948))
|
||||
- The `shouldRevalidate` function was only being called for _explicit_ revalidation scenarios (after a mutation, manual `useRevalidator` call, or an `X-Remix-Revalidate` header used for cookie setting in Remix). It was not properly being called on _implicit_ revalidation scenarios that also apply to navigation `loader` revalidation, such as a change in search params or clicking a link for the page we're already on. It's now correctly called in those additional scenarios.
|
||||
- The parameters being passed were incorrect and inconsistent with one another since the `current*`/`next*` parameters reflected the static `fetcher.load` URL (and thus were identical). Instead, they should have reflected the the navigation that triggered the revalidation (as the `form*` parameters did). These parameters now correctly reflect the triggering navigation.
|
||||
- Respect `preventScrollReset` on `<fetcher.Form>` ([#9963](https://github.com/remix-run/react-router/pull/9963))
|
||||
- Do not short circuit on hash change only mutation submissions ([#9944](https://github.com/remix-run/react-router/pull/9944))
|
||||
- Remove `instanceof` check from `isRouteErrorResponse` to avoid bundling issues on the server ([#9930](https://github.com/remix-run/react-router/pull/9930))
|
||||
- Fix navigation for hash routers on manual URL changes ([#9980](https://github.com/remix-run/react-router/pull/9980))
|
||||
- Detect when a `defer` call only contains critical data and remove the `AbortController` ([#9965](https://github.com/remix-run/react-router/pull/9965))
|
||||
- Send the name as the value when url-encoding `File` `FormData` entries ([#9867](https://github.com/remix-run/react-router/pull/9867))
|
||||
|
||||
## 1.3.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Added support for navigation blocking APIs ([#9709](https://github.com/remix-run/react-router/pull/9709))
|
||||
- Expose deferred information from `createStaticHandler` ([#9760](https://github.com/remix-run/react-router/pull/9760))
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Improved absolute redirect url detection in actions/loaders ([#9829](https://github.com/remix-run/react-router/pull/9829))
|
||||
- Fix URL creation with memory histories ([#9814](https://github.com/remix-run/react-router/pull/9814))
|
||||
- Fix `generatePath` when optional params are present ([#9764](https://github.com/remix-run/react-router/pull/9764))
|
||||
- Fix scroll reset if a submission redirects ([#9886](https://github.com/remix-run/react-router/pull/9886))
|
||||
- Fix 404 bug with same-origin absolute redirects ([#9913](https://github.com/remix-run/react-router/pull/9913))
|
||||
- Support `OPTIONS` requests in `staticHandler.queryRoute` ([#9914](https://github.com/remix-run/react-router/pull/9914))
|
||||
|
||||
## 1.2.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Include submission info in `shouldRevalidate` on action redirects ([#9777](https://github.com/remix-run/react-router/pull/9777), [#9782](https://github.com/remix-run/react-router/pull/9782))
|
||||
- Reset `actionData` on action redirect to current location ([#9772](https://github.com/remix-run/react-router/pull/9772))
|
||||
|
||||
## 1.2.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Remove `unstable_` prefix from `createStaticHandler`/`createStaticRouter`/`StaticRouterProvider` ([#9738](https://github.com/remix-run/react-router/pull/9738))
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fix explicit `replace` on submissions and `PUSH` on submission to new paths ([#9734](https://github.com/remix-run/react-router/pull/9734))
|
||||
- Fix a few bugs where loader/action data wasn't properly cleared on errors ([#9735](https://github.com/remix-run/react-router/pull/9735))
|
||||
- Prevent `useLoaderData` usage in `errorElement` ([#9735](https://github.com/remix-run/react-router/pull/9735))
|
||||
- Skip initial scroll restoration for SSR apps with `hydrationData` ([#9664](https://github.com/remix-run/react-router/pull/9664))
|
||||
|
||||
## 1.1.0
|
||||
|
||||
This release introduces support for [Optional Route Segments](https://github.com/remix-run/react-router/issues/9546). Now, adding a `?` to the end of any path segment will make that entire segment optional. This works for both static segments and dynamic parameters.
|
||||
|
||||
**Optional Params Examples**
|
||||
|
||||
- Path `lang?/about` will match:
|
||||
- `/:lang/about`
|
||||
- `/about`
|
||||
- Path `/multistep/:widget1?/widget2?/widget3?` will match:
|
||||
- `/multistep`
|
||||
- `/multistep/:widget1`
|
||||
- `/multistep/:widget1/:widget2`
|
||||
- `/multistep/:widget1/:widget2/:widget3`
|
||||
|
||||
**Optional Static Segment Example**
|
||||
|
||||
- Path `/home?` will match:
|
||||
- `/`
|
||||
- `/home`
|
||||
- Path `/fr?/about` will match:
|
||||
- `/about`
|
||||
- `/fr/about`
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Allows optional routes and optional static segments ([#9650](https://github.com/remix-run/react-router/pull/9650))
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Stop incorrectly matching on partial named parameters, i.e. `<Route path="prefix-:param">`, to align with how splat parameters work. If you were previously relying on this behavior then it's recommended to extract the static portion of the path at the `useParams` call site: ([#9506](https://github.com/remix-run/react-router/pull/9506))
|
||||
|
||||
```jsx
|
||||
// Old behavior at URL /prefix-123
|
||||
<Route path="prefix-:id" element={<Comp /> }>
|
||||
|
||||
function Comp() {
|
||||
let params = useParams(); // { id: '123' }
|
||||
let id = params.id; // "123"
|
||||
...
|
||||
}
|
||||
|
||||
// New behavior at URL /prefix-123
|
||||
<Route path=":id" element={<Comp /> }>
|
||||
|
||||
function Comp() {
|
||||
let params = useParams(); // { id: 'prefix-123' }
|
||||
let id = params.id.replace(/^prefix-/, ''); // "123"
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
- Persist `headers` on `loader` `request`'s after SSR document `action` request ([#9721](https://github.com/remix-run/react-router/pull/9721))
|
||||
- Fix requests sent to revalidating loaders so they reflect a GET request ([#9660](https://github.com/remix-run/react-router/pull/9660))
|
||||
- Fix issue with deeply nested optional segments ([#9727](https://github.com/remix-run/react-router/pull/9727))
|
||||
- GET forms now expose a submission on the loading navigation ([#9695](https://github.com/remix-run/react-router/pull/9695))
|
||||
- Fix error boundary tracking for multiple errors bubbling to the same boundary ([#9702](https://github.com/remix-run/react-router/pull/9702))
|
||||
|
||||
## 1.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fix requests sent to revalidating loaders so they reflect a `GET` request ([#9680](https://github.com/remix-run/react-router/pull/9680))
|
||||
- Remove `instanceof Response` checks in favor of `isResponse` ([#9690](https://github.com/remix-run/react-router/pull/9690))
|
||||
- Fix `URL` creation in Cloudflare Pages or other non-browser-environments ([#9682](https://github.com/remix-run/react-router/pull/9682), [#9689](https://github.com/remix-run/react-router/pull/9689))
|
||||
- Add `requestContext` support to static handler `query`/`queryRoute` ([#9696](https://github.com/remix-run/react-router/pull/9696))
|
||||
- Note that the unstable API of `queryRoute(path, routeId)` has been changed to `queryRoute(path, { routeId, requestContext })`
|
||||
|
||||
## 1.0.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Throw an error if an `action`/`loader` function returns `undefined` as revalidations need to know whether the loader has previously been executed. `undefined` also causes issues during SSR stringification for hydration. You should always ensure you `loader`/`action` returns a value, and you may return `null` if you don't wish to return anything. ([#9511](https://github.com/remix-run/react-router/pull/9511))
|
||||
- Properly handle redirects to external domains ([#9590](https://github.com/remix-run/react-router/pull/9590), [#9654](https://github.com/remix-run/react-router/pull/9654))
|
||||
- Preserve the HTTP method on 307/308 redirects ([#9597](https://github.com/remix-run/react-router/pull/9597))
|
||||
- Support `basename` in static data routers ([#9591](https://github.com/remix-run/react-router/pull/9591))
|
||||
- Enhanced `ErrorResponse` bodies to contain more descriptive text in internal 403/404/405 scenarios
|
||||
|
||||
## 1.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fix hrefs generated when using `createHashRouter` ([#9409](https://github.com/remix-run/react-router/pull/9409))
|
||||
- fix encoding/matching issues with special chars ([#9477](https://github.com/remix-run/react-router/pull/9477), [#9496](https://github.com/remix-run/react-router/pull/9496))
|
||||
- Support `basename` and relative routing in `loader`/`action` redirects ([#9447](https://github.com/remix-run/react-router/pull/9447))
|
||||
- Ignore pathless layout routes when looking for proper submission `action` function ([#9455](https://github.com/remix-run/react-router/pull/9455))
|
||||
- properly support `index` routes with a `path` in `useResolvedPath` ([#9486](https://github.com/remix-run/react-router/pull/9486))
|
||||
- Add UMD build for `@remix-run/router` ([#9446](https://github.com/remix-run/react-router/pull/9446))
|
||||
- fix `createURL` in local file execution in Firefox ([#9464](https://github.com/remix-run/react-router/pull/9464))
|
||||
- Updates to `unstable_createStaticHandler` for incorporating into Remix ([#9482](https://github.com/remix-run/react-router/pull/9482), [#9465](https://github.com/remix-run/react-router/pull/9465))
|
||||
|
||||
## 1.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Reset `actionData` after a successful action redirect ([#9334](https://github.com/remix-run/react-router/pull/9334))
|
||||
- Update `matchPath` to avoid false positives on dash-separated segments ([#9300](https://github.com/remix-run/react-router/pull/9300))
|
||||
- If an index route has children, it will result in a runtime error. We have strengthened our `RouteObject`/`RouteProps` types to surface the error in TypeScript. ([#9366](https://github.com/remix-run/react-router/pull/9366))
|
||||
|
||||
## 1.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Preserve state from `initialEntries` ([#9288](https://github.com/remix-run/react-router/pull/9288))
|
||||
- Preserve `?index` for fetcher get submissions to index routes ([#9312](https://github.com/remix-run/react-router/pull/9312))
|
||||
|
||||
## 1.0.0
|
||||
|
||||
This is the first stable release of `@remix-run/router`, which provides all the underlying routing and data loading/mutation logic for `react-router`. You should _not_ be using this package directly unless you are authoring a routing library similar to `react-router`.
|
||||
|
||||
For an overview of the features provided by `react-router`, we recommend you go check out the [docs](https://reactrouter.com), especially the [feature overview](https://reactrouter.com/en/6.4.0/start/overview) and the [tutorial](https://reactrouter.com/en/6.4.0/start/tutorial).
|
||||
|
||||
For an overview of the features provided by `@remix-run/router`, please check out the [`README`](./README.md).
|
||||
23
frontend/node_modules/@remix-run/router/LICENSE.md
generated
vendored
Normal file
23
frontend/node_modules/@remix-run/router/LICENSE.md
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) React Training LLC 2015-2019
|
||||
Copyright (c) Remix Software Inc. 2020-2021
|
||||
Copyright (c) Shopify Inc. 2022-2023
|
||||
|
||||
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.
|
||||
135
frontend/node_modules/@remix-run/router/README.md
generated
vendored
Normal file
135
frontend/node_modules/@remix-run/router/README.md
generated
vendored
Normal file
@@ -0,0 +1,135 @@
|
||||
# Remix Router
|
||||
|
||||
The `@remix-run/router` package is a framework-agnostic routing package (sometimes referred to as a browser-emulator) that serves as the heart of [React Router][react-router] and [Remix][remix] and provides all the core functionality for routing coupled with data loading and data mutations. It comes with built-in handling of errors, race-conditions, interruptions, cancellations, lazy-loading data, and much, much more.
|
||||
|
||||
If you're using React Router, you should never `import` anything directly from the `@remix-run/router` - you should have everything you need in `react-router-dom` (or `react-router`/`react-router-native` if you're not rendering in the browser). All of those packages should re-export everything you would otherwise need from `@remix-run/router`.
|
||||
|
||||
> [!WARNING]
|
||||
>
|
||||
> This router is a low-level package intended to be consumed by UI layer routing libraries. You should very likely not be using this package directly unless you are authoring a routing library such as [`react-router-dom`][react-router-repo] or one of it's other [UI ports][remix-routers-repo].
|
||||
|
||||
## API
|
||||
|
||||
A Router instance can be created using `createRouter`:
|
||||
|
||||
```js
|
||||
// Create and initialize a router. "initialize" contains all side effects
|
||||
// including history listeners and kicking off the initial data fetch
|
||||
let router = createRouter({
|
||||
// Required properties
|
||||
routes: [{
|
||||
path: '/',
|
||||
loader: ({ request, params }) => { /* ... */ },
|
||||
children: [{
|
||||
path: 'home',
|
||||
loader: ({ request, params }) => { /* ... */ },
|
||||
}]
|
||||
},
|
||||
history: createBrowserHistory(),
|
||||
|
||||
// Optional properties
|
||||
basename, // Base path
|
||||
mapRouteProperties, // Map framework-agnostic routes to framework-aware routes
|
||||
future, // Future flags
|
||||
hydrationData, // Hydration data if using server-side-rendering
|
||||
}).initialize();
|
||||
```
|
||||
|
||||
Internally, the Router represents the state in an object of the following format, which is available through `router.state`. You can also register a subscriber of the signature `(state: RouterState) => void` to execute when the state updates via `router.subscribe()`;
|
||||
|
||||
```ts
|
||||
interface RouterState {
|
||||
// False during the initial data load, true once we have our initial data
|
||||
initialized: boolean;
|
||||
// The `history` action of the most recently completed navigation
|
||||
historyAction: Action;
|
||||
// The current location of the router. During a navigation this reflects
|
||||
// the "old" location and is updated upon completion of the navigation
|
||||
location: Location;
|
||||
// The current set of route matches
|
||||
matches: DataRouteMatch[];
|
||||
// The state of the current navigation
|
||||
navigation: Navigation;
|
||||
// The state of any in-progress router.revalidate() calls
|
||||
revalidation: RevalidationState;
|
||||
// Data from the loaders for the current matches
|
||||
loaderData: RouteData;
|
||||
// Data from the action for the current matches
|
||||
actionData: RouteData | null;
|
||||
// Errors thrown from loaders/actions for the current matches
|
||||
errors: RouteData | null;
|
||||
// Map of all active fetchers
|
||||
fetchers: Map<string, Fetcher>;
|
||||
// Scroll position to restore to for the active Location, false if we
|
||||
// should not restore, or null if we don't have a saved position
|
||||
// Note: must be enabled via router.enableScrollRestoration()
|
||||
restoreScrollPosition: number | false | null;
|
||||
// Proxied `preventScrollReset` value passed to router.navigate()
|
||||
preventScrollReset: boolean;
|
||||
}
|
||||
```
|
||||
|
||||
### Navigations
|
||||
|
||||
All navigations are done through the `router.navigate` API which is overloaded to support different types of navigations:
|
||||
|
||||
```js
|
||||
// Link navigation (pushes onto the history stack by default)
|
||||
router.navigate("/page");
|
||||
|
||||
// Link navigation (replacing the history stack)
|
||||
router.navigate("/page", { replace: true });
|
||||
|
||||
// Pop navigation (moving backward/forward in the history stack)
|
||||
router.navigate(-1);
|
||||
|
||||
// Form submission navigation
|
||||
let formData = new FormData();
|
||||
formData.append(key, value);
|
||||
router.navigate("/page", {
|
||||
formMethod: "post",
|
||||
formData,
|
||||
});
|
||||
|
||||
// Relative routing from a source routeId
|
||||
router.navigate("../../somewhere", {
|
||||
fromRouteId: "active-route-id",
|
||||
});
|
||||
```
|
||||
|
||||
### Fetchers
|
||||
|
||||
Fetchers are a mechanism to call loaders/actions without triggering a navigation, and are done through the `router.fetch()` API. All fetch calls require a unique key to identify the fetcher.
|
||||
|
||||
```js
|
||||
// Execute the loader for /page
|
||||
router.fetch("key", "/page");
|
||||
|
||||
// Submit to the action for /page
|
||||
let formData = new FormData();
|
||||
formData.append(key, value);
|
||||
router.fetch("key", "/page", {
|
||||
formMethod: "post",
|
||||
formData,
|
||||
});
|
||||
```
|
||||
|
||||
### Revalidation
|
||||
|
||||
By default, active loaders will revalidate after any navigation or fetcher mutation. If you need to kick off a revalidation for other use-cases, you can use `router.revalidate()` to re-execute all active loaders.
|
||||
|
||||
### Future Flags
|
||||
|
||||
We use _Future Flags_ in the router to help us introduce breaking changes in an opt-in fashion ahead of major releases. Please check out the [blog post][future-flags-post] and [React Router Docs][api-development-strategy] for more information on this process. The currently available future flags in `@remix-run/router` are:
|
||||
|
||||
| Flag | Description |
|
||||
| ------------------------ | ------------------------------------------------------------------------- |
|
||||
| `v7_normalizeFormMethod` | Normalize `useNavigation().formMethod` to be an uppercase HTTP Method |
|
||||
| `v7_prependBasename` | Prepend the `basename` to incoming `router.navigate`/`router.fetch` paths |
|
||||
|
||||
[react-router]: https://reactrouter.com
|
||||
[remix]: https://remix.run
|
||||
[react-router-repo]: https://github.com/remix-run/react-router
|
||||
[remix-routers-repo]: https://github.com/brophdawg11/remix-routers
|
||||
[api-development-strategy]: https://reactrouter.com/v6/guides/api-development-strategy
|
||||
[future-flags-post]: https://remix.run/blog/future-flags
|
||||
250
frontend/node_modules/@remix-run/router/dist/history.d.ts
generated
vendored
Normal file
250
frontend/node_modules/@remix-run/router/dist/history.d.ts
generated
vendored
Normal file
@@ -0,0 +1,250 @@
|
||||
/**
|
||||
* Actions represent the type of change to a location value.
|
||||
*/
|
||||
export declare enum Action {
|
||||
/**
|
||||
* A POP indicates a change to an arbitrary index in the history stack, such
|
||||
* as a back or forward navigation. It does not describe the direction of the
|
||||
* navigation, only that the current index changed.
|
||||
*
|
||||
* Note: This is the default action for newly created history objects.
|
||||
*/
|
||||
Pop = "POP",
|
||||
/**
|
||||
* A PUSH indicates a new entry being added to the history stack, such as when
|
||||
* a link is clicked and a new page loads. When this happens, all subsequent
|
||||
* entries in the stack are lost.
|
||||
*/
|
||||
Push = "PUSH",
|
||||
/**
|
||||
* A REPLACE indicates the entry at the current index in the history stack
|
||||
* being replaced by a new one.
|
||||
*/
|
||||
Replace = "REPLACE"
|
||||
}
|
||||
/**
|
||||
* The pathname, search, and hash values of a URL.
|
||||
*/
|
||||
export interface Path {
|
||||
/**
|
||||
* A URL pathname, beginning with a /.
|
||||
*/
|
||||
pathname: string;
|
||||
/**
|
||||
* A URL search string, beginning with a ?.
|
||||
*/
|
||||
search: string;
|
||||
/**
|
||||
* A URL fragment identifier, beginning with a #.
|
||||
*/
|
||||
hash: string;
|
||||
}
|
||||
/**
|
||||
* An entry in a history stack. A location contains information about the
|
||||
* URL path, as well as possibly some arbitrary state and a key.
|
||||
*/
|
||||
export interface Location<State = any> extends Path {
|
||||
/**
|
||||
* A value of arbitrary data associated with this location.
|
||||
*/
|
||||
state: State;
|
||||
/**
|
||||
* A unique string associated with this location. May be used to safely store
|
||||
* and retrieve data in some other storage API, like `localStorage`.
|
||||
*
|
||||
* Note: This value is always "default" on the initial location.
|
||||
*/
|
||||
key: string;
|
||||
}
|
||||
/**
|
||||
* A change to the current location.
|
||||
*/
|
||||
export interface Update {
|
||||
/**
|
||||
* The action that triggered the change.
|
||||
*/
|
||||
action: Action;
|
||||
/**
|
||||
* The new location.
|
||||
*/
|
||||
location: Location;
|
||||
/**
|
||||
* The delta between this location and the former location in the history stack
|
||||
*/
|
||||
delta: number | null;
|
||||
}
|
||||
/**
|
||||
* A function that receives notifications about location changes.
|
||||
*/
|
||||
export interface Listener {
|
||||
(update: Update): void;
|
||||
}
|
||||
/**
|
||||
* Describes a location that is the destination of some navigation, either via
|
||||
* `history.push` or `history.replace`. This may be either a URL or the pieces
|
||||
* of a URL path.
|
||||
*/
|
||||
export type To = string | Partial<Path>;
|
||||
/**
|
||||
* A history is an interface to the navigation stack. The history serves as the
|
||||
* source of truth for the current location, as well as provides a set of
|
||||
* methods that may be used to change it.
|
||||
*
|
||||
* It is similar to the DOM's `window.history` object, but with a smaller, more
|
||||
* focused API.
|
||||
*/
|
||||
export interface History {
|
||||
/**
|
||||
* The last action that modified the current location. This will always be
|
||||
* Action.Pop when a history instance is first created. This value is mutable.
|
||||
*/
|
||||
readonly action: Action;
|
||||
/**
|
||||
* The current location. This value is mutable.
|
||||
*/
|
||||
readonly location: Location;
|
||||
/**
|
||||
* Returns a valid href for the given `to` value that may be used as
|
||||
* the value of an <a href> attribute.
|
||||
*
|
||||
* @param to - The destination URL
|
||||
*/
|
||||
createHref(to: To): string;
|
||||
/**
|
||||
* Returns a URL for the given `to` value
|
||||
*
|
||||
* @param to - The destination URL
|
||||
*/
|
||||
createURL(to: To): URL;
|
||||
/**
|
||||
* Encode a location the same way window.history would do (no-op for memory
|
||||
* history) so we ensure our PUSH/REPLACE navigations for data routers
|
||||
* behave the same as POP
|
||||
*
|
||||
* @param to Unencoded path
|
||||
*/
|
||||
encodeLocation(to: To): Path;
|
||||
/**
|
||||
* Pushes a new location onto the history stack, increasing its length by one.
|
||||
* If there were any entries in the stack after the current one, they are
|
||||
* lost.
|
||||
*
|
||||
* @param to - The new URL
|
||||
* @param state - Data to associate with the new location
|
||||
*/
|
||||
push(to: To, state?: any): void;
|
||||
/**
|
||||
* Replaces the current location in the history stack with a new one. The
|
||||
* location that was replaced will no longer be available.
|
||||
*
|
||||
* @param to - The new URL
|
||||
* @param state - Data to associate with the new location
|
||||
*/
|
||||
replace(to: To, state?: any): void;
|
||||
/**
|
||||
* Navigates `n` entries backward/forward in the history stack relative to the
|
||||
* current index. For example, a "back" navigation would use go(-1).
|
||||
*
|
||||
* @param delta - The delta in the stack index
|
||||
*/
|
||||
go(delta: number): void;
|
||||
/**
|
||||
* Sets up a listener that will be called whenever the current location
|
||||
* changes.
|
||||
*
|
||||
* @param listener - A function that will be called when the location changes
|
||||
* @returns unlisten - A function that may be used to stop listening
|
||||
*/
|
||||
listen(listener: Listener): () => void;
|
||||
}
|
||||
/**
|
||||
* A user-supplied object that describes a location. Used when providing
|
||||
* entries to `createMemoryHistory` via its `initialEntries` option.
|
||||
*/
|
||||
export type InitialEntry = string | Partial<Location>;
|
||||
export type MemoryHistoryOptions = {
|
||||
initialEntries?: InitialEntry[];
|
||||
initialIndex?: number;
|
||||
v5Compat?: boolean;
|
||||
};
|
||||
/**
|
||||
* A memory history stores locations in memory. This is useful in stateful
|
||||
* environments where there is no web browser, such as node tests or React
|
||||
* Native.
|
||||
*/
|
||||
export interface MemoryHistory extends History {
|
||||
/**
|
||||
* The current index in the history stack.
|
||||
*/
|
||||
readonly index: number;
|
||||
}
|
||||
/**
|
||||
* Memory history stores the current location in memory. It is designed for use
|
||||
* in stateful non-browser environments like tests and React Native.
|
||||
*/
|
||||
export declare function createMemoryHistory(options?: MemoryHistoryOptions): MemoryHistory;
|
||||
/**
|
||||
* A browser history stores the current location in regular URLs in a web
|
||||
* browser environment. This is the standard for most web apps and provides the
|
||||
* cleanest URLs the browser's address bar.
|
||||
*
|
||||
* @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#browserhistory
|
||||
*/
|
||||
export interface BrowserHistory extends UrlHistory {
|
||||
}
|
||||
export type BrowserHistoryOptions = UrlHistoryOptions;
|
||||
/**
|
||||
* Browser history stores the location in regular URLs. This is the standard for
|
||||
* most web apps, but it requires some configuration on the server to ensure you
|
||||
* serve the same app at multiple URLs.
|
||||
*
|
||||
* @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory
|
||||
*/
|
||||
export declare function createBrowserHistory(options?: BrowserHistoryOptions): BrowserHistory;
|
||||
/**
|
||||
* A hash history stores the current location in the fragment identifier portion
|
||||
* of the URL in a web browser environment.
|
||||
*
|
||||
* This is ideal for apps that do not control the server for some reason
|
||||
* (because the fragment identifier is never sent to the server), including some
|
||||
* shared hosting environments that do not provide fine-grained controls over
|
||||
* which pages are served at which URLs.
|
||||
*
|
||||
* @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#hashhistory
|
||||
*/
|
||||
export interface HashHistory extends UrlHistory {
|
||||
}
|
||||
export type HashHistoryOptions = UrlHistoryOptions;
|
||||
/**
|
||||
* Hash history stores the location in window.location.hash. This makes it ideal
|
||||
* for situations where you don't want to send the location to the server for
|
||||
* some reason, either because you do cannot configure it or the URL space is
|
||||
* reserved for something else.
|
||||
*
|
||||
* @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory
|
||||
*/
|
||||
export declare function createHashHistory(options?: HashHistoryOptions): HashHistory;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export declare function invariant(value: boolean, message?: string): asserts value;
|
||||
export declare function invariant<T>(value: T | null | undefined, message?: string): asserts value is T;
|
||||
export declare function warning(cond: any, message: string): void;
|
||||
/**
|
||||
* Creates a Location object with a unique key from the given Path
|
||||
*/
|
||||
export declare function createLocation(current: string | Location, to: To, state?: any, key?: string): Readonly<Location>;
|
||||
/**
|
||||
* Creates a string URL path from the given pathname, search, and hash components.
|
||||
*/
|
||||
export declare function createPath({ pathname, search, hash, }: Partial<Path>): string;
|
||||
/**
|
||||
* Parses a string URL path into its separate pathname, search, and hash components.
|
||||
*/
|
||||
export declare function parsePath(path: string): Partial<Path>;
|
||||
export interface UrlHistory extends History {
|
||||
}
|
||||
export type UrlHistoryOptions = {
|
||||
window?: Window;
|
||||
v5Compat?: boolean;
|
||||
};
|
||||
9
frontend/node_modules/@remix-run/router/dist/index.d.ts
generated
vendored
Normal file
9
frontend/node_modules/@remix-run/router/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
export type { ActionFunction, ActionFunctionArgs, AgnosticDataIndexRouteObject, AgnosticDataNonIndexRouteObject, AgnosticDataRouteMatch, AgnosticDataRouteObject, AgnosticIndexRouteObject, AgnosticNonIndexRouteObject, AgnosticPatchRoutesOnNavigationFunction, AgnosticPatchRoutesOnNavigationFunctionArgs, AgnosticRouteMatch, AgnosticRouteObject, DataStrategyFunction, DataStrategyFunctionArgs, DataStrategyMatch, DataStrategyResult, ErrorResponse, FormEncType, FormMethod, HTMLFormMethod, JsonFunction, LazyRouteFunction, LoaderFunction, LoaderFunctionArgs, ParamParseKey, Params, PathMatch, PathParam, PathPattern, RedirectFunction, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, TrackedPromise, UIMatch, V7_FormMethod, DataWithResponseInit as UNSAFE_DataWithResponseInit, } from "./utils";
|
||||
export { AbortedDeferredError, data, defer, generatePath, getToPathname, isRouteErrorResponse, joinPaths, json, matchPath, matchRoutes, normalizePathname, redirect, redirectDocument, replace, resolvePath, resolveTo, stripBasename, } from "./utils";
|
||||
export type { BrowserHistory, BrowserHistoryOptions, HashHistory, HashHistoryOptions, History, InitialEntry, Location, MemoryHistory, MemoryHistoryOptions, Path, To, } from "./history";
|
||||
export { Action, createBrowserHistory, createHashHistory, createMemoryHistory, createPath, parsePath, } from "./history";
|
||||
export * from "./router";
|
||||
/** @internal */
|
||||
export type { RouteManifest as UNSAFE_RouteManifest } from "./utils";
|
||||
export { DeferredData as UNSAFE_DeferredData, ErrorResponseImpl as UNSAFE_ErrorResponseImpl, convertRoutesToDataRoutes as UNSAFE_convertRoutesToDataRoutes, convertRouteMatchToUiMatch as UNSAFE_convertRouteMatchToUiMatch, decodePath as UNSAFE_decodePath, getResolveToMatches as UNSAFE_getResolveToMatches, } from "./utils";
|
||||
export { invariant as UNSAFE_invariant, warning as UNSAFE_warning, } from "./history";
|
||||
5641
frontend/node_modules/@remix-run/router/dist/router.cjs.js
generated
vendored
Normal file
5641
frontend/node_modules/@remix-run/router/dist/router.cjs.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
frontend/node_modules/@remix-run/router/dist/router.cjs.js.map
generated
vendored
Normal file
1
frontend/node_modules/@remix-run/router/dist/router.cjs.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
525
frontend/node_modules/@remix-run/router/dist/router.d.ts
generated
vendored
Normal file
525
frontend/node_modules/@remix-run/router/dist/router.d.ts
generated
vendored
Normal file
@@ -0,0 +1,525 @@
|
||||
import type { History, Location, Path, To } from "./history";
|
||||
import { Action as HistoryAction } from "./history";
|
||||
import type { AgnosticDataRouteMatch, AgnosticDataRouteObject, AgnosticRouteObject, DataStrategyFunction, DeferredData, DetectErrorBoundaryFunction, FormEncType, HTMLFormMethod, MapRoutePropertiesFunction, RouteData, Submission, UIMatch, AgnosticPatchRoutesOnNavigationFunction, DataWithResponseInit } from "./utils";
|
||||
/**
|
||||
* A Router instance manages all navigation and data loading/mutations
|
||||
*/
|
||||
export interface Router {
|
||||
/**
|
||||
* @internal
|
||||
* PRIVATE - DO NOT USE
|
||||
*
|
||||
* Return the basename for the router
|
||||
*/
|
||||
get basename(): RouterInit["basename"];
|
||||
/**
|
||||
* @internal
|
||||
* PRIVATE - DO NOT USE
|
||||
*
|
||||
* Return the future config for the router
|
||||
*/
|
||||
get future(): FutureConfig;
|
||||
/**
|
||||
* @internal
|
||||
* PRIVATE - DO NOT USE
|
||||
*
|
||||
* Return the current state of the router
|
||||
*/
|
||||
get state(): RouterState;
|
||||
/**
|
||||
* @internal
|
||||
* PRIVATE - DO NOT USE
|
||||
*
|
||||
* Return the routes for this router instance
|
||||
*/
|
||||
get routes(): AgnosticDataRouteObject[];
|
||||
/**
|
||||
* @internal
|
||||
* PRIVATE - DO NOT USE
|
||||
*
|
||||
* Return the window associated with the router
|
||||
*/
|
||||
get window(): RouterInit["window"];
|
||||
/**
|
||||
* @internal
|
||||
* PRIVATE - DO NOT USE
|
||||
*
|
||||
* Initialize the router, including adding history listeners and kicking off
|
||||
* initial data fetches. Returns a function to cleanup listeners and abort
|
||||
* any in-progress loads
|
||||
*/
|
||||
initialize(): Router;
|
||||
/**
|
||||
* @internal
|
||||
* PRIVATE - DO NOT USE
|
||||
*
|
||||
* Subscribe to router.state updates
|
||||
*
|
||||
* @param fn function to call with the new state
|
||||
*/
|
||||
subscribe(fn: RouterSubscriber): () => void;
|
||||
/**
|
||||
* @internal
|
||||
* PRIVATE - DO NOT USE
|
||||
*
|
||||
* Enable scroll restoration behavior in the router
|
||||
*
|
||||
* @param savedScrollPositions Object that will manage positions, in case
|
||||
* it's being restored from sessionStorage
|
||||
* @param getScrollPosition Function to get the active Y scroll position
|
||||
* @param getKey Function to get the key to use for restoration
|
||||
*/
|
||||
enableScrollRestoration(savedScrollPositions: Record<string, number>, getScrollPosition: GetScrollPositionFunction, getKey?: GetScrollRestorationKeyFunction): () => void;
|
||||
/**
|
||||
* @internal
|
||||
* PRIVATE - DO NOT USE
|
||||
*
|
||||
* Navigate forward/backward in the history stack
|
||||
* @param to Delta to move in the history stack
|
||||
*/
|
||||
navigate(to: number): Promise<void>;
|
||||
/**
|
||||
* Navigate to the given path
|
||||
* @param to Path to navigate to
|
||||
* @param opts Navigation options (method, submission, etc.)
|
||||
*/
|
||||
navigate(to: To | null, opts?: RouterNavigateOptions): Promise<void>;
|
||||
/**
|
||||
* @internal
|
||||
* PRIVATE - DO NOT USE
|
||||
*
|
||||
* Trigger a fetcher load/submission
|
||||
*
|
||||
* @param key Fetcher key
|
||||
* @param routeId Route that owns the fetcher
|
||||
* @param href href to fetch
|
||||
* @param opts Fetcher options, (method, submission, etc.)
|
||||
*/
|
||||
fetch(key: string, routeId: string, href: string | null, opts?: RouterFetchOptions): void;
|
||||
/**
|
||||
* @internal
|
||||
* PRIVATE - DO NOT USE
|
||||
*
|
||||
* Trigger a revalidation of all current route loaders and fetcher loads
|
||||
*/
|
||||
revalidate(): void;
|
||||
/**
|
||||
* @internal
|
||||
* PRIVATE - DO NOT USE
|
||||
*
|
||||
* Utility function to create an href for the given location
|
||||
* @param location
|
||||
*/
|
||||
createHref(location: Location | URL): string;
|
||||
/**
|
||||
* @internal
|
||||
* PRIVATE - DO NOT USE
|
||||
*
|
||||
* Utility function to URL encode a destination path according to the internal
|
||||
* history implementation
|
||||
* @param to
|
||||
*/
|
||||
encodeLocation(to: To): Path;
|
||||
/**
|
||||
* @internal
|
||||
* PRIVATE - DO NOT USE
|
||||
*
|
||||
* Get/create a fetcher for the given key
|
||||
* @param key
|
||||
*/
|
||||
getFetcher<TData = any>(key: string): Fetcher<TData>;
|
||||
/**
|
||||
* @internal
|
||||
* PRIVATE - DO NOT USE
|
||||
*
|
||||
* Delete the fetcher for a given key
|
||||
* @param key
|
||||
*/
|
||||
deleteFetcher(key: string): void;
|
||||
/**
|
||||
* @internal
|
||||
* PRIVATE - DO NOT USE
|
||||
*
|
||||
* Cleanup listeners and abort any in-progress loads
|
||||
*/
|
||||
dispose(): void;
|
||||
/**
|
||||
* @internal
|
||||
* PRIVATE - DO NOT USE
|
||||
*
|
||||
* Get a navigation blocker
|
||||
* @param key The identifier for the blocker
|
||||
* @param fn The blocker function implementation
|
||||
*/
|
||||
getBlocker(key: string, fn: BlockerFunction): Blocker;
|
||||
/**
|
||||
* @internal
|
||||
* PRIVATE - DO NOT USE
|
||||
*
|
||||
* Delete a navigation blocker
|
||||
* @param key The identifier for the blocker
|
||||
*/
|
||||
deleteBlocker(key: string): void;
|
||||
/**
|
||||
* @internal
|
||||
* PRIVATE DO NOT USE
|
||||
*
|
||||
* Patch additional children routes into an existing parent route
|
||||
* @param routeId The parent route id or a callback function accepting `patch`
|
||||
* to perform batch patching
|
||||
* @param children The additional children routes
|
||||
*/
|
||||
patchRoutes(routeId: string | null, children: AgnosticRouteObject[]): void;
|
||||
/**
|
||||
* @internal
|
||||
* PRIVATE - DO NOT USE
|
||||
*
|
||||
* HMR needs to pass in-flight route updates to React Router
|
||||
* TODO: Replace this with granular route update APIs (addRoute, updateRoute, deleteRoute)
|
||||
*/
|
||||
_internalSetRoutes(routes: AgnosticRouteObject[]): void;
|
||||
/**
|
||||
* @internal
|
||||
* PRIVATE - DO NOT USE
|
||||
*
|
||||
* Internal fetch AbortControllers accessed by unit tests
|
||||
*/
|
||||
_internalFetchControllers: Map<string, AbortController>;
|
||||
/**
|
||||
* @internal
|
||||
* PRIVATE - DO NOT USE
|
||||
*
|
||||
* Internal pending DeferredData instances accessed by unit tests
|
||||
*/
|
||||
_internalActiveDeferreds: Map<string, DeferredData>;
|
||||
}
|
||||
/**
|
||||
* State maintained internally by the router. During a navigation, all states
|
||||
* reflect the the "old" location unless otherwise noted.
|
||||
*/
|
||||
export interface RouterState {
|
||||
/**
|
||||
* The action of the most recent navigation
|
||||
*/
|
||||
historyAction: HistoryAction;
|
||||
/**
|
||||
* The current location reflected by the router
|
||||
*/
|
||||
location: Location;
|
||||
/**
|
||||
* The current set of route matches
|
||||
*/
|
||||
matches: AgnosticDataRouteMatch[];
|
||||
/**
|
||||
* Tracks whether we've completed our initial data load
|
||||
*/
|
||||
initialized: boolean;
|
||||
/**
|
||||
* Current scroll position we should start at for a new view
|
||||
* - number -> scroll position to restore to
|
||||
* - false -> do not restore scroll at all (used during submissions)
|
||||
* - null -> don't have a saved position, scroll to hash or top of page
|
||||
*/
|
||||
restoreScrollPosition: number | false | null;
|
||||
/**
|
||||
* Indicate whether this navigation should skip resetting the scroll position
|
||||
* if we are unable to restore the scroll position
|
||||
*/
|
||||
preventScrollReset: boolean;
|
||||
/**
|
||||
* Tracks the state of the current navigation
|
||||
*/
|
||||
navigation: Navigation;
|
||||
/**
|
||||
* Tracks any in-progress revalidations
|
||||
*/
|
||||
revalidation: RevalidationState;
|
||||
/**
|
||||
* Data from the loaders for the current matches
|
||||
*/
|
||||
loaderData: RouteData;
|
||||
/**
|
||||
* Data from the action for the current matches
|
||||
*/
|
||||
actionData: RouteData | null;
|
||||
/**
|
||||
* Errors caught from loaders for the current matches
|
||||
*/
|
||||
errors: RouteData | null;
|
||||
/**
|
||||
* Map of current fetchers
|
||||
*/
|
||||
fetchers: Map<string, Fetcher>;
|
||||
/**
|
||||
* Map of current blockers
|
||||
*/
|
||||
blockers: Map<string, Blocker>;
|
||||
}
|
||||
/**
|
||||
* Data that can be passed into hydrate a Router from SSR
|
||||
*/
|
||||
export type HydrationState = Partial<Pick<RouterState, "loaderData" | "actionData" | "errors">>;
|
||||
/**
|
||||
* Future flags to toggle new feature behavior
|
||||
*/
|
||||
export interface FutureConfig {
|
||||
v7_fetcherPersist: boolean;
|
||||
v7_normalizeFormMethod: boolean;
|
||||
v7_partialHydration: boolean;
|
||||
v7_prependBasename: boolean;
|
||||
v7_relativeSplatPath: boolean;
|
||||
v7_skipActionErrorRevalidation: boolean;
|
||||
}
|
||||
/**
|
||||
* Initialization options for createRouter
|
||||
*/
|
||||
export interface RouterInit {
|
||||
routes: AgnosticRouteObject[];
|
||||
history: History;
|
||||
basename?: string;
|
||||
/**
|
||||
* @deprecated Use `mapRouteProperties` instead
|
||||
*/
|
||||
detectErrorBoundary?: DetectErrorBoundaryFunction;
|
||||
mapRouteProperties?: MapRoutePropertiesFunction;
|
||||
future?: Partial<FutureConfig>;
|
||||
hydrationData?: HydrationState;
|
||||
window?: Window;
|
||||
dataStrategy?: DataStrategyFunction;
|
||||
patchRoutesOnNavigation?: AgnosticPatchRoutesOnNavigationFunction;
|
||||
}
|
||||
/**
|
||||
* State returned from a server-side query() call
|
||||
*/
|
||||
export interface StaticHandlerContext {
|
||||
basename: Router["basename"];
|
||||
location: RouterState["location"];
|
||||
matches: RouterState["matches"];
|
||||
loaderData: RouterState["loaderData"];
|
||||
actionData: RouterState["actionData"];
|
||||
errors: RouterState["errors"];
|
||||
statusCode: number;
|
||||
loaderHeaders: Record<string, Headers>;
|
||||
actionHeaders: Record<string, Headers>;
|
||||
activeDeferreds: Record<string, DeferredData> | null;
|
||||
_deepestRenderedBoundaryId?: string | null;
|
||||
}
|
||||
/**
|
||||
* A StaticHandler instance manages a singular SSR navigation/fetch event
|
||||
*/
|
||||
export interface StaticHandler {
|
||||
dataRoutes: AgnosticDataRouteObject[];
|
||||
query(request: Request, opts?: {
|
||||
requestContext?: unknown;
|
||||
skipLoaderErrorBubbling?: boolean;
|
||||
dataStrategy?: DataStrategyFunction;
|
||||
}): Promise<StaticHandlerContext | Response>;
|
||||
queryRoute(request: Request, opts?: {
|
||||
routeId?: string;
|
||||
requestContext?: unknown;
|
||||
dataStrategy?: DataStrategyFunction;
|
||||
}): Promise<any>;
|
||||
}
|
||||
type ViewTransitionOpts = {
|
||||
currentLocation: Location;
|
||||
nextLocation: Location;
|
||||
};
|
||||
/**
|
||||
* Subscriber function signature for changes to router state
|
||||
*/
|
||||
export interface RouterSubscriber {
|
||||
(state: RouterState, opts: {
|
||||
deletedFetchers: string[];
|
||||
viewTransitionOpts?: ViewTransitionOpts;
|
||||
flushSync: boolean;
|
||||
}): void;
|
||||
}
|
||||
/**
|
||||
* Function signature for determining the key to be used in scroll restoration
|
||||
* for a given location
|
||||
*/
|
||||
export interface GetScrollRestorationKeyFunction {
|
||||
(location: Location, matches: UIMatch[]): string | null;
|
||||
}
|
||||
/**
|
||||
* Function signature for determining the current scroll position
|
||||
*/
|
||||
export interface GetScrollPositionFunction {
|
||||
(): number;
|
||||
}
|
||||
export type RelativeRoutingType = "route" | "path";
|
||||
type BaseNavigateOrFetchOptions = {
|
||||
preventScrollReset?: boolean;
|
||||
relative?: RelativeRoutingType;
|
||||
flushSync?: boolean;
|
||||
};
|
||||
type BaseNavigateOptions = BaseNavigateOrFetchOptions & {
|
||||
replace?: boolean;
|
||||
state?: any;
|
||||
fromRouteId?: string;
|
||||
viewTransition?: boolean;
|
||||
};
|
||||
type BaseSubmissionOptions = {
|
||||
formMethod?: HTMLFormMethod;
|
||||
formEncType?: FormEncType;
|
||||
} & ({
|
||||
formData: FormData;
|
||||
body?: undefined;
|
||||
} | {
|
||||
formData?: undefined;
|
||||
body: any;
|
||||
});
|
||||
/**
|
||||
* Options for a navigate() call for a normal (non-submission) navigation
|
||||
*/
|
||||
type LinkNavigateOptions = BaseNavigateOptions;
|
||||
/**
|
||||
* Options for a navigate() call for a submission navigation
|
||||
*/
|
||||
type SubmissionNavigateOptions = BaseNavigateOptions & BaseSubmissionOptions;
|
||||
/**
|
||||
* Options to pass to navigate() for a navigation
|
||||
*/
|
||||
export type RouterNavigateOptions = LinkNavigateOptions | SubmissionNavigateOptions;
|
||||
/**
|
||||
* Options for a fetch() load
|
||||
*/
|
||||
type LoadFetchOptions = BaseNavigateOrFetchOptions;
|
||||
/**
|
||||
* Options for a fetch() submission
|
||||
*/
|
||||
type SubmitFetchOptions = BaseNavigateOrFetchOptions & BaseSubmissionOptions;
|
||||
/**
|
||||
* Options to pass to fetch()
|
||||
*/
|
||||
export type RouterFetchOptions = LoadFetchOptions | SubmitFetchOptions;
|
||||
/**
|
||||
* Potential states for state.navigation
|
||||
*/
|
||||
export type NavigationStates = {
|
||||
Idle: {
|
||||
state: "idle";
|
||||
location: undefined;
|
||||
formMethod: undefined;
|
||||
formAction: undefined;
|
||||
formEncType: undefined;
|
||||
formData: undefined;
|
||||
json: undefined;
|
||||
text: undefined;
|
||||
};
|
||||
Loading: {
|
||||
state: "loading";
|
||||
location: Location;
|
||||
formMethod: Submission["formMethod"] | undefined;
|
||||
formAction: Submission["formAction"] | undefined;
|
||||
formEncType: Submission["formEncType"] | undefined;
|
||||
formData: Submission["formData"] | undefined;
|
||||
json: Submission["json"] | undefined;
|
||||
text: Submission["text"] | undefined;
|
||||
};
|
||||
Submitting: {
|
||||
state: "submitting";
|
||||
location: Location;
|
||||
formMethod: Submission["formMethod"];
|
||||
formAction: Submission["formAction"];
|
||||
formEncType: Submission["formEncType"];
|
||||
formData: Submission["formData"];
|
||||
json: Submission["json"];
|
||||
text: Submission["text"];
|
||||
};
|
||||
};
|
||||
export type Navigation = NavigationStates[keyof NavigationStates];
|
||||
export type RevalidationState = "idle" | "loading";
|
||||
/**
|
||||
* Potential states for fetchers
|
||||
*/
|
||||
type FetcherStates<TData = any> = {
|
||||
Idle: {
|
||||
state: "idle";
|
||||
formMethod: undefined;
|
||||
formAction: undefined;
|
||||
formEncType: undefined;
|
||||
text: undefined;
|
||||
formData: undefined;
|
||||
json: undefined;
|
||||
data: TData | undefined;
|
||||
};
|
||||
Loading: {
|
||||
state: "loading";
|
||||
formMethod: Submission["formMethod"] | undefined;
|
||||
formAction: Submission["formAction"] | undefined;
|
||||
formEncType: Submission["formEncType"] | undefined;
|
||||
text: Submission["text"] | undefined;
|
||||
formData: Submission["formData"] | undefined;
|
||||
json: Submission["json"] | undefined;
|
||||
data: TData | undefined;
|
||||
};
|
||||
Submitting: {
|
||||
state: "submitting";
|
||||
formMethod: Submission["formMethod"];
|
||||
formAction: Submission["formAction"];
|
||||
formEncType: Submission["formEncType"];
|
||||
text: Submission["text"];
|
||||
formData: Submission["formData"];
|
||||
json: Submission["json"];
|
||||
data: TData | undefined;
|
||||
};
|
||||
};
|
||||
export type Fetcher<TData = any> = FetcherStates<TData>[keyof FetcherStates<TData>];
|
||||
interface BlockerBlocked {
|
||||
state: "blocked";
|
||||
reset(): void;
|
||||
proceed(): void;
|
||||
location: Location;
|
||||
}
|
||||
interface BlockerUnblocked {
|
||||
state: "unblocked";
|
||||
reset: undefined;
|
||||
proceed: undefined;
|
||||
location: undefined;
|
||||
}
|
||||
interface BlockerProceeding {
|
||||
state: "proceeding";
|
||||
reset: undefined;
|
||||
proceed: undefined;
|
||||
location: Location;
|
||||
}
|
||||
export type Blocker = BlockerUnblocked | BlockerBlocked | BlockerProceeding;
|
||||
export type BlockerFunction = (args: {
|
||||
currentLocation: Location;
|
||||
nextLocation: Location;
|
||||
historyAction: HistoryAction;
|
||||
}) => boolean;
|
||||
export declare const IDLE_NAVIGATION: NavigationStates["Idle"];
|
||||
export declare const IDLE_FETCHER: FetcherStates["Idle"];
|
||||
export declare const IDLE_BLOCKER: BlockerUnblocked;
|
||||
/**
|
||||
* Create a router and listen to history POP navigations
|
||||
*/
|
||||
export declare function createRouter(init: RouterInit): Router;
|
||||
export declare const UNSAFE_DEFERRED_SYMBOL: unique symbol;
|
||||
/**
|
||||
* Future flags to toggle new feature behavior
|
||||
*/
|
||||
export interface StaticHandlerFutureConfig {
|
||||
v7_relativeSplatPath: boolean;
|
||||
v7_throwAbortReason: boolean;
|
||||
}
|
||||
export interface CreateStaticHandlerOptions {
|
||||
basename?: string;
|
||||
/**
|
||||
* @deprecated Use `mapRouteProperties` instead
|
||||
*/
|
||||
detectErrorBoundary?: DetectErrorBoundaryFunction;
|
||||
mapRouteProperties?: MapRoutePropertiesFunction;
|
||||
future?: Partial<StaticHandlerFutureConfig>;
|
||||
}
|
||||
export declare function createStaticHandler(routes: AgnosticRouteObject[], opts?: CreateStaticHandlerOptions): StaticHandler;
|
||||
/**
|
||||
* Given an existing StaticHandlerContext and an error thrown at render time,
|
||||
* provide an updated StaticHandlerContext suitable for a second SSR render
|
||||
*/
|
||||
export declare function getStaticContextFromError(routes: AgnosticDataRouteObject[], context: StaticHandlerContext, error: any): StaticHandlerContext;
|
||||
export declare function isDataWithResponseInit(value: any): value is DataWithResponseInit<unknown>;
|
||||
export declare function isDeferredData(value: any): value is DeferredData;
|
||||
export {};
|
||||
5072
frontend/node_modules/@remix-run/router/dist/router.js
generated
vendored
Normal file
5072
frontend/node_modules/@remix-run/router/dist/router.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
frontend/node_modules/@remix-run/router/dist/router.js.map
generated
vendored
Normal file
1
frontend/node_modules/@remix-run/router/dist/router.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
5647
frontend/node_modules/@remix-run/router/dist/router.umd.js
generated
vendored
Normal file
5647
frontend/node_modules/@remix-run/router/dist/router.umd.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
frontend/node_modules/@remix-run/router/dist/router.umd.js.map
generated
vendored
Normal file
1
frontend/node_modules/@remix-run/router/dist/router.umd.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
12
frontend/node_modules/@remix-run/router/dist/router.umd.min.js
generated
vendored
Normal file
12
frontend/node_modules/@remix-run/router/dist/router.umd.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
frontend/node_modules/@remix-run/router/dist/router.umd.min.js.map
generated
vendored
Normal file
1
frontend/node_modules/@remix-run/router/dist/router.umd.min.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
556
frontend/node_modules/@remix-run/router/dist/utils.d.ts
generated
vendored
Normal file
556
frontend/node_modules/@remix-run/router/dist/utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,556 @@
|
||||
import type { Location, Path, To } from "./history";
|
||||
/**
|
||||
* Map of routeId -> data returned from a loader/action/error
|
||||
*/
|
||||
export interface RouteData {
|
||||
[routeId: string]: any;
|
||||
}
|
||||
export declare enum ResultType {
|
||||
data = "data",
|
||||
deferred = "deferred",
|
||||
redirect = "redirect",
|
||||
error = "error"
|
||||
}
|
||||
/**
|
||||
* Successful result from a loader or action
|
||||
*/
|
||||
export interface SuccessResult {
|
||||
type: ResultType.data;
|
||||
data: unknown;
|
||||
statusCode?: number;
|
||||
headers?: Headers;
|
||||
}
|
||||
/**
|
||||
* Successful defer() result from a loader or action
|
||||
*/
|
||||
export interface DeferredResult {
|
||||
type: ResultType.deferred;
|
||||
deferredData: DeferredData;
|
||||
statusCode?: number;
|
||||
headers?: Headers;
|
||||
}
|
||||
/**
|
||||
* Redirect result from a loader or action
|
||||
*/
|
||||
export interface RedirectResult {
|
||||
type: ResultType.redirect;
|
||||
response: Response;
|
||||
}
|
||||
/**
|
||||
* Unsuccessful result from a loader or action
|
||||
*/
|
||||
export interface ErrorResult {
|
||||
type: ResultType.error;
|
||||
error: unknown;
|
||||
statusCode?: number;
|
||||
headers?: Headers;
|
||||
}
|
||||
/**
|
||||
* Result from a loader or action - potentially successful or unsuccessful
|
||||
*/
|
||||
export type DataResult = SuccessResult | DeferredResult | RedirectResult | ErrorResult;
|
||||
type LowerCaseFormMethod = "get" | "post" | "put" | "patch" | "delete";
|
||||
type UpperCaseFormMethod = Uppercase<LowerCaseFormMethod>;
|
||||
/**
|
||||
* Users can specify either lowercase or uppercase form methods on `<Form>`,
|
||||
* useSubmit(), `<fetcher.Form>`, etc.
|
||||
*/
|
||||
export type HTMLFormMethod = LowerCaseFormMethod | UpperCaseFormMethod;
|
||||
/**
|
||||
* Active navigation/fetcher form methods are exposed in lowercase on the
|
||||
* RouterState
|
||||
*/
|
||||
export type FormMethod = LowerCaseFormMethod;
|
||||
export type MutationFormMethod = Exclude<FormMethod, "get">;
|
||||
/**
|
||||
* In v7, active navigation/fetcher form methods are exposed in uppercase on the
|
||||
* RouterState. This is to align with the normalization done via fetch().
|
||||
*/
|
||||
export type V7_FormMethod = UpperCaseFormMethod;
|
||||
export type V7_MutationFormMethod = Exclude<V7_FormMethod, "GET">;
|
||||
export type FormEncType = "application/x-www-form-urlencoded" | "multipart/form-data" | "application/json" | "text/plain";
|
||||
type JsonObject = {
|
||||
[Key in string]: JsonValue;
|
||||
} & {
|
||||
[Key in string]?: JsonValue | undefined;
|
||||
};
|
||||
type JsonArray = JsonValue[] | readonly JsonValue[];
|
||||
type JsonPrimitive = string | number | boolean | null;
|
||||
type JsonValue = JsonPrimitive | JsonObject | JsonArray;
|
||||
/**
|
||||
* @private
|
||||
* Internal interface to pass around for action submissions, not intended for
|
||||
* external consumption
|
||||
*/
|
||||
export type Submission = {
|
||||
formMethod: FormMethod | V7_FormMethod;
|
||||
formAction: string;
|
||||
formEncType: FormEncType;
|
||||
formData: FormData;
|
||||
json: undefined;
|
||||
text: undefined;
|
||||
} | {
|
||||
formMethod: FormMethod | V7_FormMethod;
|
||||
formAction: string;
|
||||
formEncType: FormEncType;
|
||||
formData: undefined;
|
||||
json: JsonValue;
|
||||
text: undefined;
|
||||
} | {
|
||||
formMethod: FormMethod | V7_FormMethod;
|
||||
formAction: string;
|
||||
formEncType: FormEncType;
|
||||
formData: undefined;
|
||||
json: undefined;
|
||||
text: string;
|
||||
};
|
||||
/**
|
||||
* @private
|
||||
* Arguments passed to route loader/action functions. Same for now but we keep
|
||||
* this as a private implementation detail in case they diverge in the future.
|
||||
*/
|
||||
interface DataFunctionArgs<Context> {
|
||||
request: Request;
|
||||
params: Params;
|
||||
context?: Context;
|
||||
}
|
||||
/**
|
||||
* Arguments passed to loader functions
|
||||
*/
|
||||
export interface LoaderFunctionArgs<Context = any> extends DataFunctionArgs<Context> {
|
||||
}
|
||||
/**
|
||||
* Arguments passed to action functions
|
||||
*/
|
||||
export interface ActionFunctionArgs<Context = any> extends DataFunctionArgs<Context> {
|
||||
}
|
||||
/**
|
||||
* Loaders and actions can return anything except `undefined` (`null` is a
|
||||
* valid return value if there is no data to return). Responses are preferred
|
||||
* and will ease any future migration to Remix
|
||||
*/
|
||||
type DataFunctionValue = Response | NonNullable<unknown> | null;
|
||||
type DataFunctionReturnValue = Promise<DataFunctionValue> | DataFunctionValue;
|
||||
/**
|
||||
* Route loader function signature
|
||||
*/
|
||||
export type LoaderFunction<Context = any> = {
|
||||
(args: LoaderFunctionArgs<Context>, handlerCtx?: unknown): DataFunctionReturnValue;
|
||||
} & {
|
||||
hydrate?: boolean;
|
||||
};
|
||||
/**
|
||||
* Route action function signature
|
||||
*/
|
||||
export interface ActionFunction<Context = any> {
|
||||
(args: ActionFunctionArgs<Context>, handlerCtx?: unknown): DataFunctionReturnValue;
|
||||
}
|
||||
/**
|
||||
* Arguments passed to shouldRevalidate function
|
||||
*/
|
||||
export interface ShouldRevalidateFunctionArgs {
|
||||
currentUrl: URL;
|
||||
currentParams: AgnosticDataRouteMatch["params"];
|
||||
nextUrl: URL;
|
||||
nextParams: AgnosticDataRouteMatch["params"];
|
||||
formMethod?: Submission["formMethod"];
|
||||
formAction?: Submission["formAction"];
|
||||
formEncType?: Submission["formEncType"];
|
||||
text?: Submission["text"];
|
||||
formData?: Submission["formData"];
|
||||
json?: Submission["json"];
|
||||
actionStatus?: number;
|
||||
actionResult?: any;
|
||||
defaultShouldRevalidate: boolean;
|
||||
}
|
||||
/**
|
||||
* Route shouldRevalidate function signature. This runs after any submission
|
||||
* (navigation or fetcher), so we flatten the navigation/fetcher submission
|
||||
* onto the arguments. It shouldn't matter whether it came from a navigation
|
||||
* or a fetcher, what really matters is the URLs and the formData since loaders
|
||||
* have to re-run based on the data models that were potentially mutated.
|
||||
*/
|
||||
export interface ShouldRevalidateFunction {
|
||||
(args: ShouldRevalidateFunctionArgs): boolean;
|
||||
}
|
||||
/**
|
||||
* Function provided by the framework-aware layers to set `hasErrorBoundary`
|
||||
* from the framework-aware `errorElement` prop
|
||||
*
|
||||
* @deprecated Use `mapRouteProperties` instead
|
||||
*/
|
||||
export interface DetectErrorBoundaryFunction {
|
||||
(route: AgnosticRouteObject): boolean;
|
||||
}
|
||||
export interface DataStrategyMatch extends AgnosticRouteMatch<string, AgnosticDataRouteObject> {
|
||||
shouldLoad: boolean;
|
||||
resolve: (handlerOverride?: (handler: (ctx?: unknown) => DataFunctionReturnValue) => DataFunctionReturnValue) => Promise<DataStrategyResult>;
|
||||
}
|
||||
export interface DataStrategyFunctionArgs<Context = any> extends DataFunctionArgs<Context> {
|
||||
matches: DataStrategyMatch[];
|
||||
fetcherKey: string | null;
|
||||
}
|
||||
/**
|
||||
* Result from a loader or action called via dataStrategy
|
||||
*/
|
||||
export interface DataStrategyResult {
|
||||
type: "data" | "error";
|
||||
result: unknown;
|
||||
}
|
||||
export interface DataStrategyFunction {
|
||||
(args: DataStrategyFunctionArgs): Promise<Record<string, DataStrategyResult>>;
|
||||
}
|
||||
export type AgnosticPatchRoutesOnNavigationFunctionArgs<O extends AgnosticRouteObject = AgnosticRouteObject, M extends AgnosticRouteMatch = AgnosticRouteMatch> = {
|
||||
signal: AbortSignal;
|
||||
path: string;
|
||||
matches: M[];
|
||||
fetcherKey: string | undefined;
|
||||
patch: (routeId: string | null, children: O[]) => void;
|
||||
};
|
||||
export type AgnosticPatchRoutesOnNavigationFunction<O extends AgnosticRouteObject = AgnosticRouteObject, M extends AgnosticRouteMatch = AgnosticRouteMatch> = (opts: AgnosticPatchRoutesOnNavigationFunctionArgs<O, M>) => void | Promise<void>;
|
||||
/**
|
||||
* Function provided by the framework-aware layers to set any framework-specific
|
||||
* properties from framework-agnostic properties
|
||||
*/
|
||||
export interface MapRoutePropertiesFunction {
|
||||
(route: AgnosticRouteObject): {
|
||||
hasErrorBoundary: boolean;
|
||||
} & Record<string, any>;
|
||||
}
|
||||
/**
|
||||
* Keys we cannot change from within a lazy() function. We spread all other keys
|
||||
* onto the route. Either they're meaningful to the router, or they'll get
|
||||
* ignored.
|
||||
*/
|
||||
export type ImmutableRouteKey = "lazy" | "caseSensitive" | "path" | "id" | "index" | "children";
|
||||
export declare const immutableRouteKeys: Set<ImmutableRouteKey>;
|
||||
type RequireOne<T, Key = keyof T> = Exclude<{
|
||||
[K in keyof T]: K extends Key ? Omit<T, K> & Required<Pick<T, K>> : never;
|
||||
}[keyof T], undefined>;
|
||||
/**
|
||||
* lazy() function to load a route definition, which can add non-matching
|
||||
* related properties to a route
|
||||
*/
|
||||
export interface LazyRouteFunction<R extends AgnosticRouteObject> {
|
||||
(): Promise<RequireOne<Omit<R, ImmutableRouteKey>>>;
|
||||
}
|
||||
/**
|
||||
* Base RouteObject with common props shared by all types of routes
|
||||
*/
|
||||
type AgnosticBaseRouteObject = {
|
||||
caseSensitive?: boolean;
|
||||
path?: string;
|
||||
id?: string;
|
||||
loader?: LoaderFunction | boolean;
|
||||
action?: ActionFunction | boolean;
|
||||
hasErrorBoundary?: boolean;
|
||||
shouldRevalidate?: ShouldRevalidateFunction;
|
||||
handle?: any;
|
||||
lazy?: LazyRouteFunction<AgnosticBaseRouteObject>;
|
||||
};
|
||||
/**
|
||||
* Index routes must not have children
|
||||
*/
|
||||
export type AgnosticIndexRouteObject = AgnosticBaseRouteObject & {
|
||||
children?: undefined;
|
||||
index: true;
|
||||
};
|
||||
/**
|
||||
* Non-index routes may have children, but cannot have index
|
||||
*/
|
||||
export type AgnosticNonIndexRouteObject = AgnosticBaseRouteObject & {
|
||||
children?: AgnosticRouteObject[];
|
||||
index?: false;
|
||||
};
|
||||
/**
|
||||
* A route object represents a logical route, with (optionally) its child
|
||||
* routes organized in a tree-like structure.
|
||||
*/
|
||||
export type AgnosticRouteObject = AgnosticIndexRouteObject | AgnosticNonIndexRouteObject;
|
||||
export type AgnosticDataIndexRouteObject = AgnosticIndexRouteObject & {
|
||||
id: string;
|
||||
};
|
||||
export type AgnosticDataNonIndexRouteObject = AgnosticNonIndexRouteObject & {
|
||||
children?: AgnosticDataRouteObject[];
|
||||
id: string;
|
||||
};
|
||||
/**
|
||||
* A data route object, which is just a RouteObject with a required unique ID
|
||||
*/
|
||||
export type AgnosticDataRouteObject = AgnosticDataIndexRouteObject | AgnosticDataNonIndexRouteObject;
|
||||
export type RouteManifest = Record<string, AgnosticDataRouteObject | undefined>;
|
||||
type _PathParam<Path extends string> = Path extends `${infer L}/${infer R}` ? _PathParam<L> | _PathParam<R> : Path extends `:${infer Param}` ? Param extends `${infer Optional}?` ? Optional : Param : never;
|
||||
/**
|
||||
* Examples:
|
||||
* "/a/b/*" -> "*"
|
||||
* ":a" -> "a"
|
||||
* "/a/:b" -> "b"
|
||||
* "/a/blahblahblah:b" -> "b"
|
||||
* "/:a/:b" -> "a" | "b"
|
||||
* "/:a/b/:c/*" -> "a" | "c" | "*"
|
||||
*/
|
||||
export type PathParam<Path extends string> = Path extends "*" | "/*" ? "*" : Path extends `${infer Rest}/*` ? "*" | _PathParam<Rest> : _PathParam<Path>;
|
||||
export type ParamParseKey<Segment extends string> = [
|
||||
PathParam<Segment>
|
||||
] extends [never] ? string : PathParam<Segment>;
|
||||
/**
|
||||
* The parameters that were parsed from the URL path.
|
||||
*/
|
||||
export type Params<Key extends string = string> = {
|
||||
readonly [key in Key]: string | undefined;
|
||||
};
|
||||
/**
|
||||
* A RouteMatch contains info about how a route matched a URL.
|
||||
*/
|
||||
export interface AgnosticRouteMatch<ParamKey extends string = string, RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject> {
|
||||
/**
|
||||
* The names and values of dynamic parameters in the URL.
|
||||
*/
|
||||
params: Params<ParamKey>;
|
||||
/**
|
||||
* The portion of the URL pathname that was matched.
|
||||
*/
|
||||
pathname: string;
|
||||
/**
|
||||
* The portion of the URL pathname that was matched before child routes.
|
||||
*/
|
||||
pathnameBase: string;
|
||||
/**
|
||||
* The route object that was used to match.
|
||||
*/
|
||||
route: RouteObjectType;
|
||||
}
|
||||
export interface AgnosticDataRouteMatch extends AgnosticRouteMatch<string, AgnosticDataRouteObject> {
|
||||
}
|
||||
export declare function convertRoutesToDataRoutes(routes: AgnosticRouteObject[], mapRouteProperties: MapRoutePropertiesFunction, parentPath?: string[], manifest?: RouteManifest): AgnosticDataRouteObject[];
|
||||
/**
|
||||
* Matches the given routes to a location and returns the match data.
|
||||
*
|
||||
* @see https://reactrouter.com/v6/utils/match-routes
|
||||
*/
|
||||
export declare function matchRoutes<RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject>(routes: RouteObjectType[], locationArg: Partial<Location> | string, basename?: string): AgnosticRouteMatch<string, RouteObjectType>[] | null;
|
||||
export declare function matchRoutesImpl<RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject>(routes: RouteObjectType[], locationArg: Partial<Location> | string, basename: string, allowPartial: boolean): AgnosticRouteMatch<string, RouteObjectType>[] | null;
|
||||
export interface UIMatch<Data = unknown, Handle = unknown> {
|
||||
id: string;
|
||||
pathname: string;
|
||||
params: AgnosticRouteMatch["params"];
|
||||
data: Data;
|
||||
handle: Handle;
|
||||
}
|
||||
export declare function convertRouteMatchToUiMatch(match: AgnosticDataRouteMatch, loaderData: RouteData): UIMatch;
|
||||
/**
|
||||
* Returns a path with params interpolated.
|
||||
*
|
||||
* @see https://reactrouter.com/v6/utils/generate-path
|
||||
*/
|
||||
export declare function generatePath<Path extends string>(originalPath: Path, params?: {
|
||||
[key in PathParam<Path>]: string | null;
|
||||
}): string;
|
||||
/**
|
||||
* A PathPattern is used to match on some portion of a URL pathname.
|
||||
*/
|
||||
export interface PathPattern<Path extends string = string> {
|
||||
/**
|
||||
* A string to match against a URL pathname. May contain `:id`-style segments
|
||||
* to indicate placeholders for dynamic parameters. May also end with `/*` to
|
||||
* indicate matching the rest of the URL pathname.
|
||||
*/
|
||||
path: Path;
|
||||
/**
|
||||
* Should be `true` if the static portions of the `path` should be matched in
|
||||
* the same case.
|
||||
*/
|
||||
caseSensitive?: boolean;
|
||||
/**
|
||||
* Should be `true` if this pattern should match the entire URL pathname.
|
||||
*/
|
||||
end?: boolean;
|
||||
}
|
||||
/**
|
||||
* A PathMatch contains info about how a PathPattern matched on a URL pathname.
|
||||
*/
|
||||
export interface PathMatch<ParamKey extends string = string> {
|
||||
/**
|
||||
* The names and values of dynamic parameters in the URL.
|
||||
*/
|
||||
params: Params<ParamKey>;
|
||||
/**
|
||||
* The portion of the URL pathname that was matched.
|
||||
*/
|
||||
pathname: string;
|
||||
/**
|
||||
* The portion of the URL pathname that was matched before child routes.
|
||||
*/
|
||||
pathnameBase: string;
|
||||
/**
|
||||
* The pattern that was used to match.
|
||||
*/
|
||||
pattern: PathPattern;
|
||||
}
|
||||
/**
|
||||
* Performs pattern matching on a URL pathname and returns information about
|
||||
* the match.
|
||||
*
|
||||
* @see https://reactrouter.com/v6/utils/match-path
|
||||
*/
|
||||
export declare function matchPath<ParamKey extends ParamParseKey<Path>, Path extends string>(pattern: PathPattern<Path> | Path, pathname: string): PathMatch<ParamKey> | null;
|
||||
export declare function decodePath(value: string): string;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export declare function stripBasename(pathname: string, basename: string): string | null;
|
||||
export declare const isAbsoluteUrl: (url: string) => boolean;
|
||||
/**
|
||||
* Returns a resolved path object relative to the given pathname.
|
||||
*
|
||||
* @see https://reactrouter.com/v6/utils/resolve-path
|
||||
*/
|
||||
export declare function resolvePath(to: To, fromPathname?: string): Path;
|
||||
/**
|
||||
* @private
|
||||
*
|
||||
* When processing relative navigation we want to ignore ancestor routes that
|
||||
* do not contribute to the path, such that index/pathless layout routes don't
|
||||
* interfere.
|
||||
*
|
||||
* For example, when moving a route element into an index route and/or a
|
||||
* pathless layout route, relative link behavior contained within should stay
|
||||
* the same. Both of the following examples should link back to the root:
|
||||
*
|
||||
* <Route path="/">
|
||||
* <Route path="accounts" element={<Link to=".."}>
|
||||
* </Route>
|
||||
*
|
||||
* <Route path="/">
|
||||
* <Route path="accounts">
|
||||
* <Route element={<AccountsLayout />}> // <-- Does not contribute
|
||||
* <Route index element={<Link to=".."} /> // <-- Does not contribute
|
||||
* </Route
|
||||
* </Route>
|
||||
* </Route>
|
||||
*/
|
||||
export declare function getPathContributingMatches<T extends AgnosticRouteMatch = AgnosticRouteMatch>(matches: T[]): T[];
|
||||
export declare function getResolveToMatches<T extends AgnosticRouteMatch = AgnosticRouteMatch>(matches: T[], v7_relativeSplatPath: boolean): string[];
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export declare function resolveTo(toArg: To, routePathnames: string[], locationPathname: string, isPathRelative?: boolean): Path;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export declare function getToPathname(to: To): string | undefined;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export declare const joinPaths: (paths: string[]) => string;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export declare const normalizePathname: (pathname: string) => string;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export declare const normalizeSearch: (search: string) => string;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export declare const normalizeHash: (hash: string) => string;
|
||||
export type JsonFunction = <Data>(data: Data, init?: number | ResponseInit) => Response;
|
||||
/**
|
||||
* This is a shortcut for creating `application/json` responses. Converts `data`
|
||||
* to JSON and sets the `Content-Type` header.
|
||||
*
|
||||
* @deprecated The `json` method is deprecated in favor of returning raw objects.
|
||||
* This method will be removed in v7.
|
||||
*/
|
||||
export declare const json: JsonFunction;
|
||||
export declare class DataWithResponseInit<D> {
|
||||
type: string;
|
||||
data: D;
|
||||
init: ResponseInit | null;
|
||||
constructor(data: D, init?: ResponseInit);
|
||||
}
|
||||
/**
|
||||
* Create "responses" that contain `status`/`headers` without forcing
|
||||
* serialization into an actual `Response` - used by Remix single fetch
|
||||
*/
|
||||
export declare function data<D>(data: D, init?: number | ResponseInit): DataWithResponseInit<D>;
|
||||
export interface TrackedPromise extends Promise<any> {
|
||||
_tracked?: boolean;
|
||||
_data?: any;
|
||||
_error?: any;
|
||||
}
|
||||
export declare class AbortedDeferredError extends Error {
|
||||
}
|
||||
export declare class DeferredData {
|
||||
private pendingKeysSet;
|
||||
private controller;
|
||||
private abortPromise;
|
||||
private unlistenAbortSignal;
|
||||
private subscribers;
|
||||
data: Record<string, unknown>;
|
||||
init?: ResponseInit;
|
||||
deferredKeys: string[];
|
||||
constructor(data: Record<string, unknown>, responseInit?: ResponseInit);
|
||||
private trackPromise;
|
||||
private onSettle;
|
||||
private emit;
|
||||
subscribe(fn: (aborted: boolean, settledKey?: string) => void): () => boolean;
|
||||
cancel(): void;
|
||||
resolveData(signal: AbortSignal): Promise<boolean>;
|
||||
get done(): boolean;
|
||||
get unwrappedData(): {};
|
||||
get pendingKeys(): string[];
|
||||
}
|
||||
export type DeferFunction = (data: Record<string, unknown>, init?: number | ResponseInit) => DeferredData;
|
||||
/**
|
||||
* @deprecated The `defer` method is deprecated in favor of returning raw
|
||||
* objects. This method will be removed in v7.
|
||||
*/
|
||||
export declare const defer: DeferFunction;
|
||||
export type RedirectFunction = (url: string, init?: number | ResponseInit) => Response;
|
||||
/**
|
||||
* A redirect response. Sets the status code and the `Location` header.
|
||||
* Defaults to "302 Found".
|
||||
*/
|
||||
export declare const redirect: RedirectFunction;
|
||||
/**
|
||||
* A redirect response that will force a document reload to the new location.
|
||||
* Sets the status code and the `Location` header.
|
||||
* Defaults to "302 Found".
|
||||
*/
|
||||
export declare const redirectDocument: RedirectFunction;
|
||||
/**
|
||||
* A redirect response that will perform a `history.replaceState` instead of a
|
||||
* `history.pushState` for client-side navigation redirects.
|
||||
* Sets the status code and the `Location` header.
|
||||
* Defaults to "302 Found".
|
||||
*/
|
||||
export declare const replace: RedirectFunction;
|
||||
export type ErrorResponse = {
|
||||
status: number;
|
||||
statusText: string;
|
||||
data: any;
|
||||
};
|
||||
/**
|
||||
* @private
|
||||
* Utility class we use to hold auto-unwrapped 4xx/5xx Response bodies
|
||||
*
|
||||
* We don't export the class for public use since it's an implementation
|
||||
* detail, but we export the interface above so folks can build their own
|
||||
* abstractions around instances via isRouteErrorResponse()
|
||||
*/
|
||||
export declare class ErrorResponseImpl implements ErrorResponse {
|
||||
status: number;
|
||||
statusText: string;
|
||||
data: any;
|
||||
private error?;
|
||||
private internal;
|
||||
constructor(status: number, statusText: string | undefined, data: any, internal?: boolean);
|
||||
}
|
||||
/**
|
||||
* Check if the given error is an ErrorResponse generated from a 4xx/5xx
|
||||
* Response thrown from an action/loader
|
||||
*/
|
||||
export declare function isRouteErrorResponse(error: any): error is ErrorResponse;
|
||||
export {};
|
||||
746
frontend/node_modules/@remix-run/router/history.ts
generated
vendored
Normal file
746
frontend/node_modules/@remix-run/router/history.ts
generated
vendored
Normal file
@@ -0,0 +1,746 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//#region Types and Constants
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* Actions represent the type of change to a location value.
|
||||
*/
|
||||
export enum Action {
|
||||
/**
|
||||
* A POP indicates a change to an arbitrary index in the history stack, such
|
||||
* as a back or forward navigation. It does not describe the direction of the
|
||||
* navigation, only that the current index changed.
|
||||
*
|
||||
* Note: This is the default action for newly created history objects.
|
||||
*/
|
||||
Pop = "POP",
|
||||
|
||||
/**
|
||||
* A PUSH indicates a new entry being added to the history stack, such as when
|
||||
* a link is clicked and a new page loads. When this happens, all subsequent
|
||||
* entries in the stack are lost.
|
||||
*/
|
||||
Push = "PUSH",
|
||||
|
||||
/**
|
||||
* A REPLACE indicates the entry at the current index in the history stack
|
||||
* being replaced by a new one.
|
||||
*/
|
||||
Replace = "REPLACE",
|
||||
}
|
||||
|
||||
/**
|
||||
* The pathname, search, and hash values of a URL.
|
||||
*/
|
||||
export interface Path {
|
||||
/**
|
||||
* A URL pathname, beginning with a /.
|
||||
*/
|
||||
pathname: string;
|
||||
|
||||
/**
|
||||
* A URL search string, beginning with a ?.
|
||||
*/
|
||||
search: string;
|
||||
|
||||
/**
|
||||
* A URL fragment identifier, beginning with a #.
|
||||
*/
|
||||
hash: string;
|
||||
}
|
||||
|
||||
// TODO: (v7) Change the Location generic default from `any` to `unknown` and
|
||||
// remove Remix `useLocation` wrapper.
|
||||
|
||||
/**
|
||||
* An entry in a history stack. A location contains information about the
|
||||
* URL path, as well as possibly some arbitrary state and a key.
|
||||
*/
|
||||
export interface Location<State = any> extends Path {
|
||||
/**
|
||||
* A value of arbitrary data associated with this location.
|
||||
*/
|
||||
state: State;
|
||||
|
||||
/**
|
||||
* A unique string associated with this location. May be used to safely store
|
||||
* and retrieve data in some other storage API, like `localStorage`.
|
||||
*
|
||||
* Note: This value is always "default" on the initial location.
|
||||
*/
|
||||
key: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* A change to the current location.
|
||||
*/
|
||||
export interface Update {
|
||||
/**
|
||||
* The action that triggered the change.
|
||||
*/
|
||||
action: Action;
|
||||
|
||||
/**
|
||||
* The new location.
|
||||
*/
|
||||
location: Location;
|
||||
|
||||
/**
|
||||
* The delta between this location and the former location in the history stack
|
||||
*/
|
||||
delta: number | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A function that receives notifications about location changes.
|
||||
*/
|
||||
export interface Listener {
|
||||
(update: Update): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes a location that is the destination of some navigation, either via
|
||||
* `history.push` or `history.replace`. This may be either a URL or the pieces
|
||||
* of a URL path.
|
||||
*/
|
||||
export type To = string | Partial<Path>;
|
||||
|
||||
/**
|
||||
* A history is an interface to the navigation stack. The history serves as the
|
||||
* source of truth for the current location, as well as provides a set of
|
||||
* methods that may be used to change it.
|
||||
*
|
||||
* It is similar to the DOM's `window.history` object, but with a smaller, more
|
||||
* focused API.
|
||||
*/
|
||||
export interface History {
|
||||
/**
|
||||
* The last action that modified the current location. This will always be
|
||||
* Action.Pop when a history instance is first created. This value is mutable.
|
||||
*/
|
||||
readonly action: Action;
|
||||
|
||||
/**
|
||||
* The current location. This value is mutable.
|
||||
*/
|
||||
readonly location: Location;
|
||||
|
||||
/**
|
||||
* Returns a valid href for the given `to` value that may be used as
|
||||
* the value of an <a href> attribute.
|
||||
*
|
||||
* @param to - The destination URL
|
||||
*/
|
||||
createHref(to: To): string;
|
||||
|
||||
/**
|
||||
* Returns a URL for the given `to` value
|
||||
*
|
||||
* @param to - The destination URL
|
||||
*/
|
||||
createURL(to: To): URL;
|
||||
|
||||
/**
|
||||
* Encode a location the same way window.history would do (no-op for memory
|
||||
* history) so we ensure our PUSH/REPLACE navigations for data routers
|
||||
* behave the same as POP
|
||||
*
|
||||
* @param to Unencoded path
|
||||
*/
|
||||
encodeLocation(to: To): Path;
|
||||
|
||||
/**
|
||||
* Pushes a new location onto the history stack, increasing its length by one.
|
||||
* If there were any entries in the stack after the current one, they are
|
||||
* lost.
|
||||
*
|
||||
* @param to - The new URL
|
||||
* @param state - Data to associate with the new location
|
||||
*/
|
||||
push(to: To, state?: any): void;
|
||||
|
||||
/**
|
||||
* Replaces the current location in the history stack with a new one. The
|
||||
* location that was replaced will no longer be available.
|
||||
*
|
||||
* @param to - The new URL
|
||||
* @param state - Data to associate with the new location
|
||||
*/
|
||||
replace(to: To, state?: any): void;
|
||||
|
||||
/**
|
||||
* Navigates `n` entries backward/forward in the history stack relative to the
|
||||
* current index. For example, a "back" navigation would use go(-1).
|
||||
*
|
||||
* @param delta - The delta in the stack index
|
||||
*/
|
||||
go(delta: number): void;
|
||||
|
||||
/**
|
||||
* Sets up a listener that will be called whenever the current location
|
||||
* changes.
|
||||
*
|
||||
* @param listener - A function that will be called when the location changes
|
||||
* @returns unlisten - A function that may be used to stop listening
|
||||
*/
|
||||
listen(listener: Listener): () => void;
|
||||
}
|
||||
|
||||
type HistoryState = {
|
||||
usr: any;
|
||||
key?: string;
|
||||
idx: number;
|
||||
};
|
||||
|
||||
const PopStateEventType = "popstate";
|
||||
//#endregion
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//#region Memory History
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* A user-supplied object that describes a location. Used when providing
|
||||
* entries to `createMemoryHistory` via its `initialEntries` option.
|
||||
*/
|
||||
export type InitialEntry = string | Partial<Location>;
|
||||
|
||||
export type MemoryHistoryOptions = {
|
||||
initialEntries?: InitialEntry[];
|
||||
initialIndex?: number;
|
||||
v5Compat?: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* A memory history stores locations in memory. This is useful in stateful
|
||||
* environments where there is no web browser, such as node tests or React
|
||||
* Native.
|
||||
*/
|
||||
export interface MemoryHistory extends History {
|
||||
/**
|
||||
* The current index in the history stack.
|
||||
*/
|
||||
readonly index: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Memory history stores the current location in memory. It is designed for use
|
||||
* in stateful non-browser environments like tests and React Native.
|
||||
*/
|
||||
export function createMemoryHistory(
|
||||
options: MemoryHistoryOptions = {}
|
||||
): MemoryHistory {
|
||||
let { initialEntries = ["/"], initialIndex, v5Compat = false } = options;
|
||||
let entries: Location[]; // Declare so we can access from createMemoryLocation
|
||||
entries = initialEntries.map((entry, index) =>
|
||||
createMemoryLocation(
|
||||
entry,
|
||||
typeof entry === "string" ? null : entry.state,
|
||||
index === 0 ? "default" : undefined
|
||||
)
|
||||
);
|
||||
let index = clampIndex(
|
||||
initialIndex == null ? entries.length - 1 : initialIndex
|
||||
);
|
||||
let action = Action.Pop;
|
||||
let listener: Listener | null = null;
|
||||
|
||||
function clampIndex(n: number): number {
|
||||
return Math.min(Math.max(n, 0), entries.length - 1);
|
||||
}
|
||||
function getCurrentLocation(): Location {
|
||||
return entries[index];
|
||||
}
|
||||
function createMemoryLocation(
|
||||
to: To,
|
||||
state: any = null,
|
||||
key?: string
|
||||
): Location {
|
||||
let location = createLocation(
|
||||
entries ? getCurrentLocation().pathname : "/",
|
||||
to,
|
||||
state,
|
||||
key
|
||||
);
|
||||
warning(
|
||||
location.pathname.charAt(0) === "/",
|
||||
`relative pathnames are not supported in memory history: ${JSON.stringify(
|
||||
to
|
||||
)}`
|
||||
);
|
||||
return location;
|
||||
}
|
||||
|
||||
function createHref(to: To) {
|
||||
return typeof to === "string" ? to : createPath(to);
|
||||
}
|
||||
|
||||
let history: MemoryHistory = {
|
||||
get index() {
|
||||
return index;
|
||||
},
|
||||
get action() {
|
||||
return action;
|
||||
},
|
||||
get location() {
|
||||
return getCurrentLocation();
|
||||
},
|
||||
createHref,
|
||||
createURL(to) {
|
||||
return new URL(createHref(to), "http://localhost");
|
||||
},
|
||||
encodeLocation(to: To) {
|
||||
let path = typeof to === "string" ? parsePath(to) : to;
|
||||
return {
|
||||
pathname: path.pathname || "",
|
||||
search: path.search || "",
|
||||
hash: path.hash || "",
|
||||
};
|
||||
},
|
||||
push(to, state) {
|
||||
action = Action.Push;
|
||||
let nextLocation = createMemoryLocation(to, state);
|
||||
index += 1;
|
||||
entries.splice(index, entries.length, nextLocation);
|
||||
if (v5Compat && listener) {
|
||||
listener({ action, location: nextLocation, delta: 1 });
|
||||
}
|
||||
},
|
||||
replace(to, state) {
|
||||
action = Action.Replace;
|
||||
let nextLocation = createMemoryLocation(to, state);
|
||||
entries[index] = nextLocation;
|
||||
if (v5Compat && listener) {
|
||||
listener({ action, location: nextLocation, delta: 0 });
|
||||
}
|
||||
},
|
||||
go(delta) {
|
||||
action = Action.Pop;
|
||||
let nextIndex = clampIndex(index + delta);
|
||||
let nextLocation = entries[nextIndex];
|
||||
index = nextIndex;
|
||||
if (listener) {
|
||||
listener({ action, location: nextLocation, delta });
|
||||
}
|
||||
},
|
||||
listen(fn: Listener) {
|
||||
listener = fn;
|
||||
return () => {
|
||||
listener = null;
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
return history;
|
||||
}
|
||||
//#endregion
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//#region Browser History
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* A browser history stores the current location in regular URLs in a web
|
||||
* browser environment. This is the standard for most web apps and provides the
|
||||
* cleanest URLs the browser's address bar.
|
||||
*
|
||||
* @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#browserhistory
|
||||
*/
|
||||
export interface BrowserHistory extends UrlHistory {}
|
||||
|
||||
export type BrowserHistoryOptions = UrlHistoryOptions;
|
||||
|
||||
/**
|
||||
* Browser history stores the location in regular URLs. This is the standard for
|
||||
* most web apps, but it requires some configuration on the server to ensure you
|
||||
* serve the same app at multiple URLs.
|
||||
*
|
||||
* @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory
|
||||
*/
|
||||
export function createBrowserHistory(
|
||||
options: BrowserHistoryOptions = {}
|
||||
): BrowserHistory {
|
||||
function createBrowserLocation(
|
||||
window: Window,
|
||||
globalHistory: Window["history"]
|
||||
) {
|
||||
let { pathname, search, hash } = window.location;
|
||||
return createLocation(
|
||||
"",
|
||||
{ pathname, search, hash },
|
||||
// state defaults to `null` because `window.history.state` does
|
||||
(globalHistory.state && globalHistory.state.usr) || null,
|
||||
(globalHistory.state && globalHistory.state.key) || "default"
|
||||
);
|
||||
}
|
||||
|
||||
function createBrowserHref(window: Window, to: To) {
|
||||
return typeof to === "string" ? to : createPath(to);
|
||||
}
|
||||
|
||||
return getUrlBasedHistory(
|
||||
createBrowserLocation,
|
||||
createBrowserHref,
|
||||
null,
|
||||
options
|
||||
);
|
||||
}
|
||||
//#endregion
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//#region Hash History
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* A hash history stores the current location in the fragment identifier portion
|
||||
* of the URL in a web browser environment.
|
||||
*
|
||||
* This is ideal for apps that do not control the server for some reason
|
||||
* (because the fragment identifier is never sent to the server), including some
|
||||
* shared hosting environments that do not provide fine-grained controls over
|
||||
* which pages are served at which URLs.
|
||||
*
|
||||
* @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#hashhistory
|
||||
*/
|
||||
export interface HashHistory extends UrlHistory {}
|
||||
|
||||
export type HashHistoryOptions = UrlHistoryOptions;
|
||||
|
||||
/**
|
||||
* Hash history stores the location in window.location.hash. This makes it ideal
|
||||
* for situations where you don't want to send the location to the server for
|
||||
* some reason, either because you do cannot configure it or the URL space is
|
||||
* reserved for something else.
|
||||
*
|
||||
* @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory
|
||||
*/
|
||||
export function createHashHistory(
|
||||
options: HashHistoryOptions = {}
|
||||
): HashHistory {
|
||||
function createHashLocation(
|
||||
window: Window,
|
||||
globalHistory: Window["history"]
|
||||
) {
|
||||
let {
|
||||
pathname = "/",
|
||||
search = "",
|
||||
hash = "",
|
||||
} = parsePath(window.location.hash.substr(1));
|
||||
|
||||
// Hash URL should always have a leading / just like window.location.pathname
|
||||
// does, so if an app ends up at a route like /#something then we add a
|
||||
// leading slash so all of our path-matching behaves the same as if it would
|
||||
// in a browser router. This is particularly important when there exists a
|
||||
// root splat route (<Route path="*">) since that matches internally against
|
||||
// "/*" and we'd expect /#something to 404 in a hash router app.
|
||||
if (!pathname.startsWith("/") && !pathname.startsWith(".")) {
|
||||
pathname = "/" + pathname;
|
||||
}
|
||||
|
||||
return createLocation(
|
||||
"",
|
||||
{ pathname, search, hash },
|
||||
// state defaults to `null` because `window.history.state` does
|
||||
(globalHistory.state && globalHistory.state.usr) || null,
|
||||
(globalHistory.state && globalHistory.state.key) || "default"
|
||||
);
|
||||
}
|
||||
|
||||
function createHashHref(window: Window, to: To) {
|
||||
let base = window.document.querySelector("base");
|
||||
let href = "";
|
||||
|
||||
if (base && base.getAttribute("href")) {
|
||||
let url = window.location.href;
|
||||
let hashIndex = url.indexOf("#");
|
||||
href = hashIndex === -1 ? url : url.slice(0, hashIndex);
|
||||
}
|
||||
|
||||
return href + "#" + (typeof to === "string" ? to : createPath(to));
|
||||
}
|
||||
|
||||
function validateHashLocation(location: Location, to: To) {
|
||||
warning(
|
||||
location.pathname.charAt(0) === "/",
|
||||
`relative pathnames are not supported in hash history.push(${JSON.stringify(
|
||||
to
|
||||
)})`
|
||||
);
|
||||
}
|
||||
|
||||
return getUrlBasedHistory(
|
||||
createHashLocation,
|
||||
createHashHref,
|
||||
validateHashLocation,
|
||||
options
|
||||
);
|
||||
}
|
||||
//#endregion
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//#region UTILS
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export function invariant(value: boolean, message?: string): asserts value;
|
||||
export function invariant<T>(
|
||||
value: T | null | undefined,
|
||||
message?: string
|
||||
): asserts value is T;
|
||||
export function invariant(value: any, message?: string) {
|
||||
if (value === false || value === null || typeof value === "undefined") {
|
||||
throw new Error(message);
|
||||
}
|
||||
}
|
||||
|
||||
export function warning(cond: any, message: string) {
|
||||
if (!cond) {
|
||||
// eslint-disable-next-line no-console
|
||||
if (typeof console !== "undefined") console.warn(message);
|
||||
|
||||
try {
|
||||
// Welcome to debugging history!
|
||||
//
|
||||
// This error is thrown as a convenience, so you can more easily
|
||||
// find the source for a warning that appears in the console by
|
||||
// enabling "pause on exceptions" in your JavaScript debugger.
|
||||
throw new Error(message);
|
||||
// eslint-disable-next-line no-empty
|
||||
} catch (e) {}
|
||||
}
|
||||
}
|
||||
|
||||
function createKey() {
|
||||
return Math.random().toString(36).substr(2, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* For browser-based histories, we combine the state and key into an object
|
||||
*/
|
||||
function getHistoryState(location: Location, index: number): HistoryState {
|
||||
return {
|
||||
usr: location.state,
|
||||
key: location.key,
|
||||
idx: index,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Location object with a unique key from the given Path
|
||||
*/
|
||||
export function createLocation(
|
||||
current: string | Location,
|
||||
to: To,
|
||||
state: any = null,
|
||||
key?: string
|
||||
): Readonly<Location> {
|
||||
let location: Readonly<Location> = {
|
||||
pathname: typeof current === "string" ? current : current.pathname,
|
||||
search: "",
|
||||
hash: "",
|
||||
...(typeof to === "string" ? parsePath(to) : to),
|
||||
state,
|
||||
// TODO: This could be cleaned up. push/replace should probably just take
|
||||
// full Locations now and avoid the need to run through this flow at all
|
||||
// But that's a pretty big refactor to the current test suite so going to
|
||||
// keep as is for the time being and just let any incoming keys take precedence
|
||||
key: (to && (to as Location).key) || key || createKey(),
|
||||
};
|
||||
return location;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a string URL path from the given pathname, search, and hash components.
|
||||
*/
|
||||
export function createPath({
|
||||
pathname = "/",
|
||||
search = "",
|
||||
hash = "",
|
||||
}: Partial<Path>) {
|
||||
if (search && search !== "?")
|
||||
pathname += search.charAt(0) === "?" ? search : "?" + search;
|
||||
if (hash && hash !== "#")
|
||||
pathname += hash.charAt(0) === "#" ? hash : "#" + hash;
|
||||
return pathname;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a string URL path into its separate pathname, search, and hash components.
|
||||
*/
|
||||
export function parsePath(path: string): Partial<Path> {
|
||||
let parsedPath: Partial<Path> = {};
|
||||
|
||||
if (path) {
|
||||
let hashIndex = path.indexOf("#");
|
||||
if (hashIndex >= 0) {
|
||||
parsedPath.hash = path.substr(hashIndex);
|
||||
path = path.substr(0, hashIndex);
|
||||
}
|
||||
|
||||
let searchIndex = path.indexOf("?");
|
||||
if (searchIndex >= 0) {
|
||||
parsedPath.search = path.substr(searchIndex);
|
||||
path = path.substr(0, searchIndex);
|
||||
}
|
||||
|
||||
if (path) {
|
||||
parsedPath.pathname = path;
|
||||
}
|
||||
}
|
||||
|
||||
return parsedPath;
|
||||
}
|
||||
|
||||
export interface UrlHistory extends History {}
|
||||
|
||||
export type UrlHistoryOptions = {
|
||||
window?: Window;
|
||||
v5Compat?: boolean;
|
||||
};
|
||||
|
||||
function getUrlBasedHistory(
|
||||
getLocation: (window: Window, globalHistory: Window["history"]) => Location,
|
||||
createHref: (window: Window, to: To) => string,
|
||||
validateLocation: ((location: Location, to: To) => void) | null,
|
||||
options: UrlHistoryOptions = {}
|
||||
): UrlHistory {
|
||||
let { window = document.defaultView!, v5Compat = false } = options;
|
||||
let globalHistory = window.history;
|
||||
let action = Action.Pop;
|
||||
let listener: Listener | null = null;
|
||||
|
||||
let index = getIndex()!;
|
||||
// Index should only be null when we initialize. If not, it's because the
|
||||
// user called history.pushState or history.replaceState directly, in which
|
||||
// case we should log a warning as it will result in bugs.
|
||||
if (index == null) {
|
||||
index = 0;
|
||||
globalHistory.replaceState({ ...globalHistory.state, idx: index }, "");
|
||||
}
|
||||
|
||||
function getIndex(): number {
|
||||
let state = globalHistory.state || { idx: null };
|
||||
return state.idx;
|
||||
}
|
||||
|
||||
function handlePop() {
|
||||
action = Action.Pop;
|
||||
let nextIndex = getIndex();
|
||||
let delta = nextIndex == null ? null : nextIndex - index;
|
||||
index = nextIndex;
|
||||
if (listener) {
|
||||
listener({ action, location: history.location, delta });
|
||||
}
|
||||
}
|
||||
|
||||
function push(to: To, state?: any) {
|
||||
action = Action.Push;
|
||||
let location = createLocation(history.location, to, state);
|
||||
if (validateLocation) validateLocation(location, to);
|
||||
|
||||
index = getIndex() + 1;
|
||||
let historyState = getHistoryState(location, index);
|
||||
let url = history.createHref(location);
|
||||
|
||||
// try...catch because iOS limits us to 100 pushState calls :/
|
||||
try {
|
||||
globalHistory.pushState(historyState, "", url);
|
||||
} catch (error) {
|
||||
// If the exception is because `state` can't be serialized, let that throw
|
||||
// outwards just like a replace call would so the dev knows the cause
|
||||
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#shared-history-push/replace-state-steps
|
||||
// https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeinternal
|
||||
if (error instanceof DOMException && error.name === "DataCloneError") {
|
||||
throw error;
|
||||
}
|
||||
// They are going to lose state here, but there is no real
|
||||
// way to warn them about it since the page will refresh...
|
||||
window.location.assign(url);
|
||||
}
|
||||
|
||||
if (v5Compat && listener) {
|
||||
listener({ action, location: history.location, delta: 1 });
|
||||
}
|
||||
}
|
||||
|
||||
function replace(to: To, state?: any) {
|
||||
action = Action.Replace;
|
||||
let location = createLocation(history.location, to, state);
|
||||
if (validateLocation) validateLocation(location, to);
|
||||
|
||||
index = getIndex();
|
||||
let historyState = getHistoryState(location, index);
|
||||
let url = history.createHref(location);
|
||||
globalHistory.replaceState(historyState, "", url);
|
||||
|
||||
if (v5Compat && listener) {
|
||||
listener({ action, location: history.location, delta: 0 });
|
||||
}
|
||||
}
|
||||
|
||||
function createURL(to: To): URL {
|
||||
// window.location.origin is "null" (the literal string value) in Firefox
|
||||
// under certain conditions, notably when serving from a local HTML file
|
||||
// See https://bugzilla.mozilla.org/show_bug.cgi?id=878297
|
||||
let base =
|
||||
window.location.origin !== "null"
|
||||
? window.location.origin
|
||||
: window.location.href;
|
||||
|
||||
let href = typeof to === "string" ? to : createPath(to);
|
||||
// Treating this as a full URL will strip any trailing spaces so we need to
|
||||
// pre-encode them since they might be part of a matching splat param from
|
||||
// an ancestor route
|
||||
href = href.replace(/ $/, "%20");
|
||||
invariant(
|
||||
base,
|
||||
`No window.location.(origin|href) available to create URL for href: ${href}`
|
||||
);
|
||||
return new URL(href, base);
|
||||
}
|
||||
|
||||
let history: History = {
|
||||
get action() {
|
||||
return action;
|
||||
},
|
||||
get location() {
|
||||
return getLocation(window, globalHistory);
|
||||
},
|
||||
listen(fn: Listener) {
|
||||
if (listener) {
|
||||
throw new Error("A history only accepts one active listener");
|
||||
}
|
||||
window.addEventListener(PopStateEventType, handlePop);
|
||||
listener = fn;
|
||||
|
||||
return () => {
|
||||
window.removeEventListener(PopStateEventType, handlePop);
|
||||
listener = null;
|
||||
};
|
||||
},
|
||||
createHref(to) {
|
||||
return createHref(window, to);
|
||||
},
|
||||
createURL,
|
||||
encodeLocation(to) {
|
||||
// Encode a Location the same way window.location would
|
||||
let url = createURL(to);
|
||||
return {
|
||||
pathname: url.pathname,
|
||||
search: url.search,
|
||||
hash: url.hash,
|
||||
};
|
||||
},
|
||||
push,
|
||||
replace,
|
||||
go(n) {
|
||||
return globalHistory.go(n);
|
||||
},
|
||||
};
|
||||
|
||||
return history;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
106
frontend/node_modules/@remix-run/router/index.ts
generated
vendored
Normal file
106
frontend/node_modules/@remix-run/router/index.ts
generated
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
export type {
|
||||
ActionFunction,
|
||||
ActionFunctionArgs,
|
||||
AgnosticDataIndexRouteObject,
|
||||
AgnosticDataNonIndexRouteObject,
|
||||
AgnosticDataRouteMatch,
|
||||
AgnosticDataRouteObject,
|
||||
AgnosticIndexRouteObject,
|
||||
AgnosticNonIndexRouteObject,
|
||||
AgnosticPatchRoutesOnNavigationFunction,
|
||||
AgnosticPatchRoutesOnNavigationFunctionArgs,
|
||||
AgnosticRouteMatch,
|
||||
AgnosticRouteObject,
|
||||
DataStrategyFunction,
|
||||
DataStrategyFunctionArgs,
|
||||
DataStrategyMatch,
|
||||
DataStrategyResult,
|
||||
ErrorResponse,
|
||||
FormEncType,
|
||||
FormMethod,
|
||||
HTMLFormMethod,
|
||||
JsonFunction,
|
||||
LazyRouteFunction,
|
||||
LoaderFunction,
|
||||
LoaderFunctionArgs,
|
||||
ParamParseKey,
|
||||
Params,
|
||||
PathMatch,
|
||||
PathParam,
|
||||
PathPattern,
|
||||
RedirectFunction,
|
||||
ShouldRevalidateFunction,
|
||||
ShouldRevalidateFunctionArgs,
|
||||
TrackedPromise,
|
||||
UIMatch,
|
||||
V7_FormMethod,
|
||||
DataWithResponseInit as UNSAFE_DataWithResponseInit,
|
||||
} from "./utils";
|
||||
|
||||
export {
|
||||
AbortedDeferredError,
|
||||
data,
|
||||
defer,
|
||||
generatePath,
|
||||
getToPathname,
|
||||
isRouteErrorResponse,
|
||||
joinPaths,
|
||||
json,
|
||||
matchPath,
|
||||
matchRoutes,
|
||||
normalizePathname,
|
||||
redirect,
|
||||
redirectDocument,
|
||||
replace,
|
||||
resolvePath,
|
||||
resolveTo,
|
||||
stripBasename,
|
||||
} from "./utils";
|
||||
|
||||
export type {
|
||||
BrowserHistory,
|
||||
BrowserHistoryOptions,
|
||||
HashHistory,
|
||||
HashHistoryOptions,
|
||||
History,
|
||||
InitialEntry,
|
||||
Location,
|
||||
MemoryHistory,
|
||||
MemoryHistoryOptions,
|
||||
Path,
|
||||
To,
|
||||
} from "./history";
|
||||
|
||||
export {
|
||||
Action,
|
||||
createBrowserHistory,
|
||||
createHashHistory,
|
||||
createMemoryHistory,
|
||||
createPath,
|
||||
parsePath,
|
||||
} from "./history";
|
||||
|
||||
export * from "./router";
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// DANGER! PLEASE READ ME!
|
||||
// We consider these exports an implementation detail and do not guarantee
|
||||
// against any breaking changes, regardless of the semver release. Use with
|
||||
// extreme caution and only if you understand the consequences. Godspeed.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/** @internal */
|
||||
export type { RouteManifest as UNSAFE_RouteManifest } from "./utils";
|
||||
export {
|
||||
DeferredData as UNSAFE_DeferredData,
|
||||
ErrorResponseImpl as UNSAFE_ErrorResponseImpl,
|
||||
convertRoutesToDataRoutes as UNSAFE_convertRoutesToDataRoutes,
|
||||
convertRouteMatchToUiMatch as UNSAFE_convertRouteMatchToUiMatch,
|
||||
decodePath as UNSAFE_decodePath,
|
||||
getResolveToMatches as UNSAFE_getResolveToMatches,
|
||||
} from "./utils";
|
||||
|
||||
export {
|
||||
invariant as UNSAFE_invariant,
|
||||
warning as UNSAFE_warning,
|
||||
} from "./history";
|
||||
33
frontend/node_modules/@remix-run/router/package.json
generated
vendored
Normal file
33
frontend/node_modules/@remix-run/router/package.json
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "@remix-run/router",
|
||||
"version": "1.23.2",
|
||||
"description": "Nested/Data-driven/Framework-agnostic Routing",
|
||||
"keywords": [
|
||||
"remix",
|
||||
"router",
|
||||
"location"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/remix-run/react-router",
|
||||
"directory": "packages/router"
|
||||
},
|
||||
"license": "MIT",
|
||||
"author": "Remix Software <hello@remix.run>",
|
||||
"sideEffects": false,
|
||||
"main": "./dist/router.cjs.js",
|
||||
"unpkg": "./dist/router.umd.min.js",
|
||||
"module": "./dist/router.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"files": [
|
||||
"dist/",
|
||||
"*.ts",
|
||||
"CHANGELOG.md"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
||||
6031
frontend/node_modules/@remix-run/router/router.ts
generated
vendored
Normal file
6031
frontend/node_modules/@remix-run/router/router.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1743
frontend/node_modules/@remix-run/router/utils.ts
generated
vendored
Normal file
1743
frontend/node_modules/@remix-run/router/utils.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3
frontend/node_modules/@rollup/rollup-linux-x64-gnu/README.md
generated
vendored
Normal file
3
frontend/node_modules/@rollup/rollup-linux-x64-gnu/README.md
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# `@rollup/rollup-linux-x64-gnu`
|
||||
|
||||
This is the **x86_64-unknown-linux-gnu** binary for `rollup`
|
||||
11
frontend/node_modules/@rollup/rollup-win32-x64-gnu/package.json → frontend/node_modules/@rollup/rollup-linux-x64-gnu/package.json
generated
vendored
Executable file → Normal file
11
frontend/node_modules/@rollup/rollup-win32-x64-gnu/package.json → frontend/node_modules/@rollup/rollup-linux-x64-gnu/package.json
generated
vendored
Executable file → Normal file
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"name": "@rollup/rollup-win32-x64-gnu",
|
||||
"name": "@rollup/rollup-linux-x64-gnu",
|
||||
"version": "4.57.1",
|
||||
"os": [
|
||||
"win32"
|
||||
"linux"
|
||||
],
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"files": [
|
||||
"rollup.win32-x64-gnu.node"
|
||||
"rollup.linux-x64-gnu.node"
|
||||
],
|
||||
"description": "Native bindings for Rollup",
|
||||
"author": "Lukas Taegert-Atkinson",
|
||||
@@ -18,5 +18,8 @@
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/rollup/rollup.git"
|
||||
},
|
||||
"main": "./rollup.win32-x64-gnu.node"
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"main": "./rollup.linux-x64-gnu.node"
|
||||
}
|
||||
BIN
frontend/node_modules/@rollup/rollup-linux-x64-gnu/rollup.linux-x64-gnu.node
generated
vendored
Normal file
BIN
frontend/node_modules/@rollup/rollup-linux-x64-gnu/rollup.linux-x64-gnu.node
generated
vendored
Normal file
Binary file not shown.
3
frontend/node_modules/@rollup/rollup-linux-x64-musl/README.md
generated
vendored
Normal file
3
frontend/node_modules/@rollup/rollup-linux-x64-musl/README.md
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# `@rollup/rollup-linux-x64-musl`
|
||||
|
||||
This is the **x86_64-unknown-linux-musl** binary for `rollup`
|
||||
11
frontend/node_modules/@rollup/rollup-win32-x64-msvc/package.json → frontend/node_modules/@rollup/rollup-linux-x64-musl/package.json
generated
vendored
Executable file → Normal file
11
frontend/node_modules/@rollup/rollup-win32-x64-msvc/package.json → frontend/node_modules/@rollup/rollup-linux-x64-musl/package.json
generated
vendored
Executable file → Normal file
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"name": "@rollup/rollup-win32-x64-msvc",
|
||||
"name": "@rollup/rollup-linux-x64-musl",
|
||||
"version": "4.57.1",
|
||||
"os": [
|
||||
"win32"
|
||||
"linux"
|
||||
],
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"files": [
|
||||
"rollup.win32-x64-msvc.node"
|
||||
"rollup.linux-x64-musl.node"
|
||||
],
|
||||
"description": "Native bindings for Rollup",
|
||||
"author": "Lukas Taegert-Atkinson",
|
||||
@@ -18,5 +18,8 @@
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/rollup/rollup.git"
|
||||
},
|
||||
"main": "./rollup.win32-x64-msvc.node"
|
||||
"libc": [
|
||||
"musl"
|
||||
],
|
||||
"main": "./rollup.linux-x64-musl.node"
|
||||
}
|
||||
BIN
frontend/node_modules/@rollup/rollup-linux-x64-musl/rollup.linux-x64-musl.node
generated
vendored
Normal file
BIN
frontend/node_modules/@rollup/rollup-linux-x64-musl/rollup.linux-x64-musl.node
generated
vendored
Normal file
Binary file not shown.
3
frontend/node_modules/@rollup/rollup-win32-x64-gnu/README.md
generated
vendored
3
frontend/node_modules/@rollup/rollup-win32-x64-gnu/README.md
generated
vendored
@@ -1,3 +0,0 @@
|
||||
# `@rollup/rollup-win32-x64-gnu`
|
||||
|
||||
This is the **x86_64-pc-windows-gnu** binary for `rollup`
|
||||
BIN
frontend/node_modules/@rollup/rollup-win32-x64-gnu/rollup.win32-x64-gnu.node
generated
vendored
BIN
frontend/node_modules/@rollup/rollup-win32-x64-gnu/rollup.win32-x64-gnu.node
generated
vendored
Binary file not shown.
3
frontend/node_modules/@rollup/rollup-win32-x64-msvc/README.md
generated
vendored
3
frontend/node_modules/@rollup/rollup-win32-x64-msvc/README.md
generated
vendored
@@ -1,3 +0,0 @@
|
||||
# `@rollup/rollup-win32-x64-msvc`
|
||||
|
||||
This is the **x86_64-pc-windows-msvc** binary for `rollup`
|
||||
BIN
frontend/node_modules/@rollup/rollup-win32-x64-msvc/rollup.win32-x64-msvc.node
generated
vendored
BIN
frontend/node_modules/@rollup/rollup-win32-x64-msvc/rollup.win32-x64-msvc.node
generated
vendored
Binary file not shown.
21
frontend/node_modules/function-bind/.eslintrc
generated
vendored
Normal file
21
frontend/node_modules/function-bind/.eslintrc
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
|
||||
"rules": {
|
||||
"func-name-matching": 0,
|
||||
"indent": [2, 4],
|
||||
"no-new-func": [1],
|
||||
},
|
||||
|
||||
"overrides": [
|
||||
{
|
||||
"files": "test/**",
|
||||
"rules": {
|
||||
"max-lines-per-function": 0,
|
||||
"strict": [0]
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
12
frontend/node_modules/function-bind/.github/FUNDING.yml
generated
vendored
Normal file
12
frontend/node_modules/function-bind/.github/FUNDING.yml
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [ljharb]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: npm/function-bind
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
3
frontend/node_modules/function-bind/.github/SECURITY.md
generated
vendored
Normal file
3
frontend/node_modules/function-bind/.github/SECURITY.md
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# Security
|
||||
|
||||
Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.
|
||||
13
frontend/node_modules/function-bind/.nycrc
generated
vendored
Normal file
13
frontend/node_modules/function-bind/.nycrc
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"all": true,
|
||||
"check-coverage": false,
|
||||
"reporter": ["text-summary", "text", "html", "json"],
|
||||
"lines": 86,
|
||||
"statements": 85.93,
|
||||
"functions": 82.43,
|
||||
"branches": 76.06,
|
||||
"exclude": [
|
||||
"coverage",
|
||||
"test"
|
||||
]
|
||||
}
|
||||
136
frontend/node_modules/function-bind/CHANGELOG.md
generated
vendored
Normal file
136
frontend/node_modules/function-bind/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,136 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [v1.1.2](https://github.com/ljharb/function-bind/compare/v1.1.1...v1.1.2) - 2023-10-12
|
||||
|
||||
### Merged
|
||||
|
||||
- Point to the correct file [`#16`](https://github.com/ljharb/function-bind/pull/16)
|
||||
|
||||
### Commits
|
||||
|
||||
- [Tests] migrate tests to Github Actions [`4f8b57c`](https://github.com/ljharb/function-bind/commit/4f8b57c02f2011fe9ae353d5e74e8745f0988af8)
|
||||
- [Tests] remove `jscs` [`90eb2ed`](https://github.com/ljharb/function-bind/commit/90eb2edbeefd5b76cd6c3a482ea3454db169b31f)
|
||||
- [meta] update `.gitignore` [`53fcdc3`](https://github.com/ljharb/function-bind/commit/53fcdc371cd66634d6e9b71c836a50f437e89fed)
|
||||
- [Tests] up to `node` `v11.10`, `v10.15`, `v9.11`, `v8.15`, `v6.16`, `v4.9`; use `nvm install-latest-npm`; run audit script in tests [`1fe8f6e`](https://github.com/ljharb/function-bind/commit/1fe8f6e9aed0dfa8d8b3cdbd00c7f5ea0cd2b36e)
|
||||
- [meta] add `auto-changelog` [`1921fcb`](https://github.com/ljharb/function-bind/commit/1921fcb5b416b63ffc4acad051b6aad5722f777d)
|
||||
- [Robustness] remove runtime dependency on all builtins except `.apply` [`f743e61`](https://github.com/ljharb/function-bind/commit/f743e61aa6bb2360358c04d4884c9db853d118b7)
|
||||
- Docs: enable badges; update wording [`503cb12`](https://github.com/ljharb/function-bind/commit/503cb12d998b5f91822776c73332c7adcd6355dd)
|
||||
- [readme] update badges [`290c5db`](https://github.com/ljharb/function-bind/commit/290c5dbbbda7264efaeb886552a374b869a4bb48)
|
||||
- [Tests] switch to nyc for coverage [`ea360ba`](https://github.com/ljharb/function-bind/commit/ea360ba907fc2601ed18d01a3827fa2d3533cdf8)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`cae5e9e`](https://github.com/ljharb/function-bind/commit/cae5e9e07a5578dc6df26c03ee22851ce05b943c)
|
||||
- [meta] add `funding` field; create FUNDING.yml [`c9f4274`](https://github.com/ljharb/function-bind/commit/c9f4274aa80ea3aae9657a3938fdba41a3b04ca6)
|
||||
- [Tests] fix eslint errors from #15 [`f69aaa2`](https://github.com/ljharb/function-bind/commit/f69aaa2beb2fdab4415bfb885760a699d0b9c964)
|
||||
- [actions] fix permissions [`99a0cd9`](https://github.com/ljharb/function-bind/commit/99a0cd9f3b5bac223a0d572f081834cd73314be7)
|
||||
- [meta] use `npmignore` to autogenerate an npmignore file [`f03b524`](https://github.com/ljharb/function-bind/commit/f03b524ca91f75a109a5d062f029122c86ecd1ae)
|
||||
- [Dev Deps] update `@ljharb/eslint‑config`, `eslint`, `tape` [`7af9300`](https://github.com/ljharb/function-bind/commit/7af930023ae2ce7645489532821e4fbbcd7a2280)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape` [`64a9127`](https://github.com/ljharb/function-bind/commit/64a9127ab0bd331b93d6572eaf6e9971967fc08c)
|
||||
- [Tests] use `aud` instead of `npm audit` [`e75069c`](https://github.com/ljharb/function-bind/commit/e75069c50010a8fcce2a9ce2324934c35fdb4386)
|
||||
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`d03555c`](https://github.com/ljharb/function-bind/commit/d03555ca59dea3b71ce710045e4303b9e2619e28)
|
||||
- [meta] add `safe-publish-latest` [`9c8f809`](https://github.com/ljharb/function-bind/commit/9c8f8092aed027d7e80c94f517aa892385b64f09)
|
||||
- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`baf6893`](https://github.com/ljharb/function-bind/commit/baf6893e27f5b59abe88bc1995e6f6ed1e527397)
|
||||
- [meta] create SECURITY.md [`4db1779`](https://github.com/ljharb/function-bind/commit/4db17799f1f28ae294cb95e0081ca2b591c3911b)
|
||||
- [Tests] add `npm run audit` [`c8b38ec`](https://github.com/ljharb/function-bind/commit/c8b38ec40ed3f85dabdee40ed4148f1748375bc2)
|
||||
- Revert "Point to the correct file" [`05cdf0f`](https://github.com/ljharb/function-bind/commit/05cdf0fa205c6a3c5ba40bbedd1dfa9874f915c9)
|
||||
|
||||
## [v1.1.1](https://github.com/ljharb/function-bind/compare/v1.1.0...v1.1.1) - 2017-08-28
|
||||
|
||||
### Commits
|
||||
|
||||
- [Tests] up to `node` `v8`; newer npm breaks on older node; fix scripts [`817f7d2`](https://github.com/ljharb/function-bind/commit/817f7d28470fdbff8ef608d4d565dd4d1430bc5e)
|
||||
- [Dev Deps] update `eslint`, `jscs`, `tape`, `@ljharb/eslint-config` [`854288b`](https://github.com/ljharb/function-bind/commit/854288b1b6f5c555f89aceb9eff1152510262084)
|
||||
- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`83e639f`](https://github.com/ljharb/function-bind/commit/83e639ff74e6cd6921285bccec22c1bcf72311bd)
|
||||
- Only apps should have lockfiles [`5ed97f5`](https://github.com/ljharb/function-bind/commit/5ed97f51235c17774e0832e122abda0f3229c908)
|
||||
- Use a SPDX-compliant “license” field. [`5feefea`](https://github.com/ljharb/function-bind/commit/5feefea0dc0193993e83e5df01ded424403a5381)
|
||||
|
||||
## [v1.1.0](https://github.com/ljharb/function-bind/compare/v1.0.2...v1.1.0) - 2016-02-14
|
||||
|
||||
### Commits
|
||||
|
||||
- Update `eslint`, `tape`; use my personal shared `eslint` config [`9c9062a`](https://github.com/ljharb/function-bind/commit/9c9062abbe9dd70b59ea2c3a3c3a81f29b457097)
|
||||
- Add `npm run eslint` [`dd96c56`](https://github.com/ljharb/function-bind/commit/dd96c56720034a3c1ffee10b8a59a6f7c53e24ad)
|
||||
- [New] return the native `bind` when available. [`82186e0`](https://github.com/ljharb/function-bind/commit/82186e03d73e580f95ff167e03f3582bed90ed72)
|
||||
- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`a3dd767`](https://github.com/ljharb/function-bind/commit/a3dd76720c795cb7f4586b0544efabf8aa107b8b)
|
||||
- Update `eslint` [`3dae2f7`](https://github.com/ljharb/function-bind/commit/3dae2f7423de30a2d20313ddb1edc19660142fe9)
|
||||
- Update `tape`, `covert`, `jscs` [`a181eee`](https://github.com/ljharb/function-bind/commit/a181eee0cfa24eb229c6e843a971f36e060a2f6a)
|
||||
- [Tests] up to `node` `v5.6`, `v4.3` [`964929a`](https://github.com/ljharb/function-bind/commit/964929a6a4ddb36fb128de2bcc20af5e4f22e1ed)
|
||||
- Test up to `io.js` `v2.1` [`2be7310`](https://github.com/ljharb/function-bind/commit/2be7310f2f74886a7124ca925be411117d41d5ea)
|
||||
- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`45f3d68`](https://github.com/ljharb/function-bind/commit/45f3d6865c6ca93726abcef54febe009087af101)
|
||||
- [Dev Deps] update `tape`, `jscs` [`6e1340d`](https://github.com/ljharb/function-bind/commit/6e1340d94642deaecad3e717825db641af4f8b1f)
|
||||
- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`d9bad2b`](https://github.com/ljharb/function-bind/commit/d9bad2b778b1b3a6dd2876087b88b3acf319f8cc)
|
||||
- Update `eslint` [`935590c`](https://github.com/ljharb/function-bind/commit/935590caa024ab356102e4858e8fc315b2ccc446)
|
||||
- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`8c9a1ef`](https://github.com/ljharb/function-bind/commit/8c9a1efd848e5167887aa8501857a0940a480c57)
|
||||
- Test on `io.js` `v2.2` [`9a3a38c`](https://github.com/ljharb/function-bind/commit/9a3a38c92013aed6e108666e7bd40969b84ac86e)
|
||||
- Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures. [`69afc26`](https://github.com/ljharb/function-bind/commit/69afc2617405b147dd2a8d8ae73ca9e9283f18b4)
|
||||
- [Dev Deps] Update `tape`, `eslint` [`36c1be0`](https://github.com/ljharb/function-bind/commit/36c1be0ab12b45fe5df6b0fdb01a5d5137fd0115)
|
||||
- Update `tape`, `jscs` [`98d8303`](https://github.com/ljharb/function-bind/commit/98d8303cd5ca1c6b8f985469f86b0d44d7d45f6e)
|
||||
- Update `jscs` [`9633a4e`](https://github.com/ljharb/function-bind/commit/9633a4e9fbf82051c240855166e468ba8ba0846f)
|
||||
- Update `tape`, `jscs` [`c80ef0f`](https://github.com/ljharb/function-bind/commit/c80ef0f46efc9791e76fa50de4414092ac147831)
|
||||
- Test up to `io.js` `v3.0` [`7e2c853`](https://github.com/ljharb/function-bind/commit/7e2c8537d52ab9cf5a655755561d8917684c0df4)
|
||||
- Test on `io.js` `v2.4` [`5a199a2`](https://github.com/ljharb/function-bind/commit/5a199a27ba46795ba5eaf0845d07d4b8232895c9)
|
||||
- Test on `io.js` `v2.3` [`a511b88`](https://github.com/ljharb/function-bind/commit/a511b8896de0bddf3b56862daa416c701f4d0453)
|
||||
- Fixing a typo from 822b4e1938db02dc9584aa434fd3a45cb20caf43 [`732d6b6`](https://github.com/ljharb/function-bind/commit/732d6b63a9b33b45230e630dbcac7a10855d3266)
|
||||
- Update `jscs` [`da52a48`](https://github.com/ljharb/function-bind/commit/da52a4886c06d6490f46ae30b15e4163ba08905d)
|
||||
- Lock covert to v1.0.0. [`d6150fd`](https://github.com/ljharb/function-bind/commit/d6150fda1e6f486718ebdeff823333d9e48e7430)
|
||||
|
||||
## [v1.0.2](https://github.com/ljharb/function-bind/compare/v1.0.1...v1.0.2) - 2014-10-04
|
||||
|
||||
## [v1.0.1](https://github.com/ljharb/function-bind/compare/v1.0.0...v1.0.1) - 2014-10-03
|
||||
|
||||
### Merged
|
||||
|
||||
- make CI build faster [`#3`](https://github.com/ljharb/function-bind/pull/3)
|
||||
|
||||
### Commits
|
||||
|
||||
- Using my standard jscs.json [`d8ee94c`](https://github.com/ljharb/function-bind/commit/d8ee94c993eff0a84cf5744fe6a29627f5cffa1a)
|
||||
- Adding `npm run lint` [`7571ab7`](https://github.com/ljharb/function-bind/commit/7571ab7dfdbd99b25a1dbb2d232622bd6f4f9c10)
|
||||
- Using consistent indentation [`e91a1b1`](https://github.com/ljharb/function-bind/commit/e91a1b13a61e99ec1e530e299b55508f74218a95)
|
||||
- Updating jscs [`7e17892`](https://github.com/ljharb/function-bind/commit/7e1789284bc629bc9c1547a61c9b227bbd8c7a65)
|
||||
- Using consistent quotes [`c50b57f`](https://github.com/ljharb/function-bind/commit/c50b57fcd1c5ec38320979c837006069ebe02b77)
|
||||
- Adding keywords [`cb94631`](https://github.com/ljharb/function-bind/commit/cb946314eed35f21186a25fb42fc118772f9ee00)
|
||||
- Directly export a function expression instead of using a declaration, and relying on hoisting. [`5a33c5f`](https://github.com/ljharb/function-bind/commit/5a33c5f45642de180e0d207110bf7d1843ceb87c)
|
||||
- Naming npm URL and badge in README; use SVG [`2aef8fc`](https://github.com/ljharb/function-bind/commit/2aef8fcb79d54e63a58ae557c4e60949e05d5e16)
|
||||
- Naming deps URLs in README [`04228d7`](https://github.com/ljharb/function-bind/commit/04228d766670ee45ca24e98345c1f6a7621065b5)
|
||||
- Naming travis-ci URLs in README; using SVG [`62c810c`](https://github.com/ljharb/function-bind/commit/62c810c2f54ced956cd4d4ab7b793055addfe36e)
|
||||
- Make sure functions are invoked correctly (also passing coverage tests) [`2b289b4`](https://github.com/ljharb/function-bind/commit/2b289b4dfbf037ffcfa4dc95eb540f6165e9e43a)
|
||||
- Removing the strict mode pragmas; they make tests fail. [`1aa701d`](https://github.com/ljharb/function-bind/commit/1aa701d199ddc3782476e8f7eef82679be97b845)
|
||||
- Adding myself as a contributor [`85fd57b`](https://github.com/ljharb/function-bind/commit/85fd57b0860e5a7af42de9a287f3f265fc6d72fc)
|
||||
- Adding strict mode pragmas [`915b08e`](https://github.com/ljharb/function-bind/commit/915b08e084c86a722eafe7245e21db74aa21ca4c)
|
||||
- Adding devDeps URLs to README [`4ccc731`](https://github.com/ljharb/function-bind/commit/4ccc73112c1769859e4ca3076caf4086b3cba2cd)
|
||||
- Fixing the description. [`a7a472c`](https://github.com/ljharb/function-bind/commit/a7a472cf649af515c635cf560fc478fbe48999c8)
|
||||
- Using a function expression instead of a function declaration. [`b5d3e4e`](https://github.com/ljharb/function-bind/commit/b5d3e4ea6aaffc63888953eeb1fbc7ff45f1fa14)
|
||||
- Updating tape [`f086be6`](https://github.com/ljharb/function-bind/commit/f086be6029fb56dde61a258c1340600fa174d1e0)
|
||||
- Updating jscs [`5f9bdb3`](https://github.com/ljharb/function-bind/commit/5f9bdb375ab13ba48f30852aab94029520c54d71)
|
||||
- Updating jscs [`9b409ba`](https://github.com/ljharb/function-bind/commit/9b409ba6118e23395a4e5d83ef39152aab9d3bfc)
|
||||
- Run coverage as part of tests. [`8e1b6d4`](https://github.com/ljharb/function-bind/commit/8e1b6d459f047d1bd4fee814e01247c984c80bd0)
|
||||
- Run linter as part of tests [`c1ca83f`](https://github.com/ljharb/function-bind/commit/c1ca83f832df94587d09e621beba682fabfaa987)
|
||||
- Updating covert [`701e837`](https://github.com/ljharb/function-bind/commit/701e83774b57b4d3ef631e1948143f43a72f4bb9)
|
||||
|
||||
## [v1.0.0](https://github.com/ljharb/function-bind/compare/v0.2.0...v1.0.0) - 2014-08-09
|
||||
|
||||
### Commits
|
||||
|
||||
- Make sure old and unstable nodes don't fail Travis [`27adca3`](https://github.com/ljharb/function-bind/commit/27adca34a4ab6ad67b6dfde43942a1b103ce4d75)
|
||||
- Fixing an issue when the bound function is called as a constructor in ES3. [`e20122d`](https://github.com/ljharb/function-bind/commit/e20122d267d92ce553859b280cbbea5d27c07731)
|
||||
- Adding `npm run coverage` [`a2e29c4`](https://github.com/ljharb/function-bind/commit/a2e29c4ecaef9e2f6cd1603e868c139073375502)
|
||||
- Updating tape [`b741168`](https://github.com/ljharb/function-bind/commit/b741168b12b235b1717ff696087645526b69213c)
|
||||
- Upgrading tape [`63631a0`](https://github.com/ljharb/function-bind/commit/63631a04c7fbe97cc2fa61829cc27246d6986f74)
|
||||
- Updating tape [`363cb46`](https://github.com/ljharb/function-bind/commit/363cb46dafb23cb3e347729a22f9448051d78464)
|
||||
|
||||
## v0.2.0 - 2014-03-23
|
||||
|
||||
### Commits
|
||||
|
||||
- Updating test coverage to match es5-shim. [`aa94d44`](https://github.com/ljharb/function-bind/commit/aa94d44b8f9d7f69f10e060db7709aa7a694e5d4)
|
||||
- initial [`942ee07`](https://github.com/ljharb/function-bind/commit/942ee07e94e542d91798137bc4b80b926137e066)
|
||||
- Setting the bound function's length properly. [`079f46a`](https://github.com/ljharb/function-bind/commit/079f46a2d3515b7c0b308c2c13fceb641f97ca25)
|
||||
- Ensuring that some older browsers will throw when given a regex. [`36ac55b`](https://github.com/ljharb/function-bind/commit/36ac55b87f460d4330253c92870aa26fbfe8227f)
|
||||
- Removing npm scripts that don't have dependencies [`9d2be60`](https://github.com/ljharb/function-bind/commit/9d2be600002cb8bc8606f8f3585ad3e05868c750)
|
||||
- Updating tape [`297a4ac`](https://github.com/ljharb/function-bind/commit/297a4acc5464db381940aafb194d1c88f4e678f3)
|
||||
- Skipping length tests for now. [`d9891ea`](https://github.com/ljharb/function-bind/commit/d9891ea4d2aaffa69f408339cdd61ff740f70565)
|
||||
- don't take my tea [`dccd930`](https://github.com/ljharb/function-bind/commit/dccd930bfd60ea10cb178d28c97550c3bc8c1e07)
|
||||
20
frontend/node_modules/function-bind/LICENSE
generated
vendored
Normal file
20
frontend/node_modules/function-bind/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
Copyright (c) 2013 Raynos.
|
||||
|
||||
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.
|
||||
|
||||
46
frontend/node_modules/function-bind/README.md
generated
vendored
Normal file
46
frontend/node_modules/function-bind/README.md
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
# function-bind <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
||||
|
||||
[![github actions][actions-image]][actions-url]
|
||||
<!--[![coverage][codecov-image]][codecov-url]-->
|
||||
[![dependency status][deps-svg]][deps-url]
|
||||
[![dev dependency status][dev-deps-svg]][dev-deps-url]
|
||||
[![License][license-image]][license-url]
|
||||
[![Downloads][downloads-image]][downloads-url]
|
||||
|
||||
[![npm badge][npm-badge-png]][package-url]
|
||||
|
||||
Implementation of function.prototype.bind
|
||||
|
||||
Old versions of phantomjs, Internet Explorer < 9, and node < 0.6 don't support `Function.prototype.bind`.
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
Function.prototype.bind = require("function-bind")
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
`npm install function-bind`
|
||||
|
||||
## Contributors
|
||||
|
||||
- Raynos
|
||||
|
||||
## MIT Licenced
|
||||
|
||||
[package-url]: https://npmjs.org/package/function-bind
|
||||
[npm-version-svg]: https://versionbadg.es/Raynos/function-bind.svg
|
||||
[deps-svg]: https://david-dm.org/Raynos/function-bind.svg
|
||||
[deps-url]: https://david-dm.org/Raynos/function-bind
|
||||
[dev-deps-svg]: https://david-dm.org/Raynos/function-bind/dev-status.svg
|
||||
[dev-deps-url]: https://david-dm.org/Raynos/function-bind#info=devDependencies
|
||||
[npm-badge-png]: https://nodei.co/npm/function-bind.png?downloads=true&stars=true
|
||||
[license-image]: https://img.shields.io/npm/l/function-bind.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: https://img.shields.io/npm/dm/function-bind.svg
|
||||
[downloads-url]: https://npm-stat.com/charts.html?package=function-bind
|
||||
[codecov-image]: https://codecov.io/gh/Raynos/function-bind/branch/main/graphs/badge.svg
|
||||
[codecov-url]: https://app.codecov.io/gh/Raynos/function-bind/
|
||||
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/Raynos/function-bind
|
||||
[actions-url]: https://github.com/Raynos/function-bind/actions
|
||||
84
frontend/node_modules/function-bind/implementation.js
generated
vendored
Normal file
84
frontend/node_modules/function-bind/implementation.js
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
'use strict';
|
||||
|
||||
/* eslint no-invalid-this: 1 */
|
||||
|
||||
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
||||
var toStr = Object.prototype.toString;
|
||||
var max = Math.max;
|
||||
var funcType = '[object Function]';
|
||||
|
||||
var concatty = function concatty(a, b) {
|
||||
var arr = [];
|
||||
|
||||
for (var i = 0; i < a.length; i += 1) {
|
||||
arr[i] = a[i];
|
||||
}
|
||||
for (var j = 0; j < b.length; j += 1) {
|
||||
arr[j + a.length] = b[j];
|
||||
}
|
||||
|
||||
return arr;
|
||||
};
|
||||
|
||||
var slicy = function slicy(arrLike, offset) {
|
||||
var arr = [];
|
||||
for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
|
||||
arr[j] = arrLike[i];
|
||||
}
|
||||
return arr;
|
||||
};
|
||||
|
||||
var joiny = function (arr, joiner) {
|
||||
var str = '';
|
||||
for (var i = 0; i < arr.length; i += 1) {
|
||||
str += arr[i];
|
||||
if (i + 1 < arr.length) {
|
||||
str += joiner;
|
||||
}
|
||||
}
|
||||
return str;
|
||||
};
|
||||
|
||||
module.exports = function bind(that) {
|
||||
var target = this;
|
||||
if (typeof target !== 'function' || toStr.apply(target) !== funcType) {
|
||||
throw new TypeError(ERROR_MESSAGE + target);
|
||||
}
|
||||
var args = slicy(arguments, 1);
|
||||
|
||||
var bound;
|
||||
var binder = function () {
|
||||
if (this instanceof bound) {
|
||||
var result = target.apply(
|
||||
this,
|
||||
concatty(args, arguments)
|
||||
);
|
||||
if (Object(result) === result) {
|
||||
return result;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
return target.apply(
|
||||
that,
|
||||
concatty(args, arguments)
|
||||
);
|
||||
|
||||
};
|
||||
|
||||
var boundLength = max(0, target.length - args.length);
|
||||
var boundArgs = [];
|
||||
for (var i = 0; i < boundLength; i++) {
|
||||
boundArgs[i] = '$' + i;
|
||||
}
|
||||
|
||||
bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
|
||||
|
||||
if (target.prototype) {
|
||||
var Empty = function Empty() {};
|
||||
Empty.prototype = target.prototype;
|
||||
bound.prototype = new Empty();
|
||||
Empty.prototype = null;
|
||||
}
|
||||
|
||||
return bound;
|
||||
};
|
||||
5
frontend/node_modules/function-bind/index.js
generated
vendored
Normal file
5
frontend/node_modules/function-bind/index.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
var implementation = require('./implementation');
|
||||
|
||||
module.exports = Function.prototype.bind || implementation;
|
||||
87
frontend/node_modules/function-bind/package.json
generated
vendored
Normal file
87
frontend/node_modules/function-bind/package.json
generated
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
{
|
||||
"name": "function-bind",
|
||||
"version": "1.1.2",
|
||||
"description": "Implementation of Function.prototype.bind",
|
||||
"keywords": [
|
||||
"function",
|
||||
"bind",
|
||||
"shim",
|
||||
"es5"
|
||||
],
|
||||
"author": "Raynos <raynos2@gmail.com>",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Raynos/function-bind.git"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
},
|
||||
"main": "index",
|
||||
"homepage": "https://github.com/Raynos/function-bind",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Raynos"
|
||||
},
|
||||
{
|
||||
"name": "Jordan Harband",
|
||||
"url": "https://github.com/ljharb"
|
||||
}
|
||||
],
|
||||
"bugs": {
|
||||
"url": "https://github.com/Raynos/function-bind/issues",
|
||||
"email": "raynos2@gmail.com"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ljharb/eslint-config": "^21.1.0",
|
||||
"aud": "^2.0.3",
|
||||
"auto-changelog": "^2.4.0",
|
||||
"eslint": "=8.8.0",
|
||||
"in-publish": "^2.0.1",
|
||||
"npmignore": "^0.3.0",
|
||||
"nyc": "^10.3.2",
|
||||
"safe-publish-latest": "^2.0.0",
|
||||
"tape": "^5.7.1"
|
||||
},
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"prepublishOnly": "safe-publish-latest",
|
||||
"prepublish": "not-in-publish || npm run prepublishOnly",
|
||||
"prepack": "npmignore --auto --commentLines=autogenerated",
|
||||
"pretest": "npm run lint",
|
||||
"test": "npm run tests-only",
|
||||
"posttest": "aud --production",
|
||||
"tests-only": "nyc tape 'test/**/*.js'",
|
||||
"lint": "eslint --ext=js,mjs .",
|
||||
"version": "auto-changelog && git add CHANGELOG.md",
|
||||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/index.js",
|
||||
"browsers": [
|
||||
"ie/8..latest",
|
||||
"firefox/16..latest",
|
||||
"firefox/nightly",
|
||||
"chrome/22..latest",
|
||||
"chrome/canary",
|
||||
"opera/12..latest",
|
||||
"opera/next",
|
||||
"safari/5.1..latest",
|
||||
"ipad/6.0..latest",
|
||||
"iphone/6.0..latest",
|
||||
"android-browser/4.2..latest"
|
||||
]
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false,
|
||||
"hideCredit": true
|
||||
},
|
||||
"publishConfig": {
|
||||
"ignore": [
|
||||
".github/workflows"
|
||||
]
|
||||
}
|
||||
}
|
||||
9
frontend/node_modules/function-bind/test/.eslintrc
generated
vendored
Normal file
9
frontend/node_modules/function-bind/test/.eslintrc
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"rules": {
|
||||
"array-bracket-newline": 0,
|
||||
"array-element-newline": 0,
|
||||
"max-statements-per-line": [2, { "max": 2 }],
|
||||
"no-invalid-this": 0,
|
||||
"no-magic-numbers": 0,
|
||||
}
|
||||
}
|
||||
252
frontend/node_modules/function-bind/test/index.js
generated
vendored
Normal file
252
frontend/node_modules/function-bind/test/index.js
generated
vendored
Normal file
@@ -0,0 +1,252 @@
|
||||
// jscs:disable requireUseStrict
|
||||
|
||||
var test = require('tape');
|
||||
|
||||
var functionBind = require('../implementation');
|
||||
var getCurrentContext = function () { return this; };
|
||||
|
||||
test('functionBind is a function', function (t) {
|
||||
t.equal(typeof functionBind, 'function');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('non-functions', function (t) {
|
||||
var nonFunctions = [true, false, [], {}, 42, 'foo', NaN, /a/g];
|
||||
t.plan(nonFunctions.length);
|
||||
for (var i = 0; i < nonFunctions.length; ++i) {
|
||||
try { functionBind.call(nonFunctions[i]); } catch (ex) {
|
||||
t.ok(ex instanceof TypeError, 'throws when given ' + String(nonFunctions[i]));
|
||||
}
|
||||
}
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('without a context', function (t) {
|
||||
t.test('binds properly', function (st) {
|
||||
var args, context;
|
||||
var namespace = {
|
||||
func: functionBind.call(function () {
|
||||
args = Array.prototype.slice.call(arguments);
|
||||
context = this;
|
||||
})
|
||||
};
|
||||
namespace.func(1, 2, 3);
|
||||
st.deepEqual(args, [1, 2, 3]);
|
||||
st.equal(context, getCurrentContext.call());
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('binds properly, and still supplies bound arguments', function (st) {
|
||||
var args, context;
|
||||
var namespace = {
|
||||
func: functionBind.call(function () {
|
||||
args = Array.prototype.slice.call(arguments);
|
||||
context = this;
|
||||
}, undefined, 1, 2, 3)
|
||||
};
|
||||
namespace.func(4, 5, 6);
|
||||
st.deepEqual(args, [1, 2, 3, 4, 5, 6]);
|
||||
st.equal(context, getCurrentContext.call());
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('returns properly', function (st) {
|
||||
var args;
|
||||
var namespace = {
|
||||
func: functionBind.call(function () {
|
||||
args = Array.prototype.slice.call(arguments);
|
||||
return this;
|
||||
}, null)
|
||||
};
|
||||
var context = namespace.func(1, 2, 3);
|
||||
st.equal(context, getCurrentContext.call(), 'returned context is namespaced context');
|
||||
st.deepEqual(args, [1, 2, 3], 'passed arguments are correct');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('returns properly with bound arguments', function (st) {
|
||||
var args;
|
||||
var namespace = {
|
||||
func: functionBind.call(function () {
|
||||
args = Array.prototype.slice.call(arguments);
|
||||
return this;
|
||||
}, null, 1, 2, 3)
|
||||
};
|
||||
var context = namespace.func(4, 5, 6);
|
||||
st.equal(context, getCurrentContext.call(), 'returned context is namespaced context');
|
||||
st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('called as a constructor', function (st) {
|
||||
var thunkify = function (value) {
|
||||
return function () { return value; };
|
||||
};
|
||||
st.test('returns object value', function (sst) {
|
||||
var expectedReturnValue = [1, 2, 3];
|
||||
var Constructor = functionBind.call(thunkify(expectedReturnValue), null);
|
||||
var result = new Constructor();
|
||||
sst.equal(result, expectedReturnValue);
|
||||
sst.end();
|
||||
});
|
||||
|
||||
st.test('does not return primitive value', function (sst) {
|
||||
var Constructor = functionBind.call(thunkify(42), null);
|
||||
var result = new Constructor();
|
||||
sst.notEqual(result, 42);
|
||||
sst.end();
|
||||
});
|
||||
|
||||
st.test('object from bound constructor is instance of original and bound constructor', function (sst) {
|
||||
var A = function (x) {
|
||||
this.name = x || 'A';
|
||||
};
|
||||
var B = functionBind.call(A, null, 'B');
|
||||
|
||||
var result = new B();
|
||||
sst.ok(result instanceof B, 'result is instance of bound constructor');
|
||||
sst.ok(result instanceof A, 'result is instance of original constructor');
|
||||
sst.end();
|
||||
});
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('with a context', function (t) {
|
||||
t.test('with no bound arguments', function (st) {
|
||||
var args, context;
|
||||
var boundContext = {};
|
||||
var namespace = {
|
||||
func: functionBind.call(function () {
|
||||
args = Array.prototype.slice.call(arguments);
|
||||
context = this;
|
||||
}, boundContext)
|
||||
};
|
||||
namespace.func(1, 2, 3);
|
||||
st.equal(context, boundContext, 'binds a context properly');
|
||||
st.deepEqual(args, [1, 2, 3], 'supplies passed arguments');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('with bound arguments', function (st) {
|
||||
var args, context;
|
||||
var boundContext = {};
|
||||
var namespace = {
|
||||
func: functionBind.call(function () {
|
||||
args = Array.prototype.slice.call(arguments);
|
||||
context = this;
|
||||
}, boundContext, 1, 2, 3)
|
||||
};
|
||||
namespace.func(4, 5, 6);
|
||||
st.equal(context, boundContext, 'binds a context properly');
|
||||
st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'supplies bound and passed arguments');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('returns properly', function (st) {
|
||||
var boundContext = {};
|
||||
var args;
|
||||
var namespace = {
|
||||
func: functionBind.call(function () {
|
||||
args = Array.prototype.slice.call(arguments);
|
||||
return this;
|
||||
}, boundContext)
|
||||
};
|
||||
var context = namespace.func(1, 2, 3);
|
||||
st.equal(context, boundContext, 'returned context is bound context');
|
||||
st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context');
|
||||
st.deepEqual(args, [1, 2, 3], 'passed arguments are correct');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('returns properly with bound arguments', function (st) {
|
||||
var boundContext = {};
|
||||
var args;
|
||||
var namespace = {
|
||||
func: functionBind.call(function () {
|
||||
args = Array.prototype.slice.call(arguments);
|
||||
return this;
|
||||
}, boundContext, 1, 2, 3)
|
||||
};
|
||||
var context = namespace.func(4, 5, 6);
|
||||
st.equal(context, boundContext, 'returned context is bound context');
|
||||
st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context');
|
||||
st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('passes the correct arguments when called as a constructor', function (st) {
|
||||
var expected = { name: 'Correct' };
|
||||
var namespace = {
|
||||
Func: functionBind.call(function (arg) {
|
||||
return arg;
|
||||
}, { name: 'Incorrect' })
|
||||
};
|
||||
var returned = new namespace.Func(expected);
|
||||
st.equal(returned, expected, 'returns the right arg when called as a constructor');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('has the new instance\'s context when called as a constructor', function (st) {
|
||||
var actualContext;
|
||||
var expectedContext = { foo: 'bar' };
|
||||
var namespace = {
|
||||
Func: functionBind.call(function () {
|
||||
actualContext = this;
|
||||
}, expectedContext)
|
||||
};
|
||||
var result = new namespace.Func();
|
||||
st.equal(result instanceof namespace.Func, true);
|
||||
st.notEqual(actualContext, expectedContext);
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('bound function length', function (t) {
|
||||
t.test('sets a correct length without thisArg', function (st) {
|
||||
var subject = functionBind.call(function (a, b, c) { return a + b + c; });
|
||||
st.equal(subject.length, 3);
|
||||
st.equal(subject(1, 2, 3), 6);
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('sets a correct length with thisArg', function (st) {
|
||||
var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {});
|
||||
st.equal(subject.length, 3);
|
||||
st.equal(subject(1, 2, 3), 6);
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('sets a correct length without thisArg and first argument', function (st) {
|
||||
var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1);
|
||||
st.equal(subject.length, 2);
|
||||
st.equal(subject(2, 3), 6);
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('sets a correct length with thisArg and first argument', function (st) {
|
||||
var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1);
|
||||
st.equal(subject.length, 2);
|
||||
st.equal(subject(2, 3), 6);
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('sets a correct length without thisArg and too many arguments', function (st) {
|
||||
var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1, 2, 3, 4);
|
||||
st.equal(subject.length, 0);
|
||||
st.equal(subject(), 6);
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('sets a correct length with thisArg and too many arguments', function (st) {
|
||||
var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1, 2, 3, 4);
|
||||
st.equal(subject.length, 0);
|
||||
st.equal(subject(), 6);
|
||||
st.end();
|
||||
});
|
||||
});
|
||||
5
frontend/node_modules/hasown/.eslintrc
generated
vendored
Normal file
5
frontend/node_modules/hasown/.eslintrc
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
}
|
||||
12
frontend/node_modules/hasown/.github/FUNDING.yml
generated
vendored
Normal file
12
frontend/node_modules/hasown/.github/FUNDING.yml
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [ljharb]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: npm/hasown
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # Replace with a single custom sponsorship URL
|
||||
13
frontend/node_modules/hasown/.nycrc
generated
vendored
Normal file
13
frontend/node_modules/hasown/.nycrc
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"all": true,
|
||||
"check-coverage": false,
|
||||
"reporter": ["text-summary", "text", "html", "json"],
|
||||
"lines": 86,
|
||||
"statements": 85.93,
|
||||
"functions": 82.43,
|
||||
"branches": 76.06,
|
||||
"exclude": [
|
||||
"coverage",
|
||||
"test"
|
||||
]
|
||||
}
|
||||
40
frontend/node_modules/hasown/CHANGELOG.md
generated
vendored
Normal file
40
frontend/node_modules/hasown/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [v2.0.2](https://github.com/inspect-js/hasOwn/compare/v2.0.1...v2.0.2) - 2024-03-10
|
||||
|
||||
### Commits
|
||||
|
||||
- [types] use shared config [`68e9d4d`](https://github.com/inspect-js/hasOwn/commit/68e9d4dab6facb4f05f02c6baea94a3f2a4e44b2)
|
||||
- [actions] remove redundant finisher; use reusable workflow [`241a68e`](https://github.com/inspect-js/hasOwn/commit/241a68e13ea1fe52bec5ba7f74144befc31fae7b)
|
||||
- [Tests] increase coverage [`4125c0d`](https://github.com/inspect-js/hasOwn/commit/4125c0d6121db56ae30e38346dfb0c000b04f0a7)
|
||||
- [Tests] skip `npm ls` in old node due to TS [`01b9282`](https://github.com/inspect-js/hasOwn/commit/01b92822f9971dea031eafdd14767df41d61c202)
|
||||
- [types] improve predicate type [`d340f85`](https://github.com/inspect-js/hasOwn/commit/d340f85ce02e286ef61096cbbb6697081d40a12b)
|
||||
- [Dev Deps] update `tape` [`70089fc`](https://github.com/inspect-js/hasOwn/commit/70089fcf544e64acc024cbe60f5a9b00acad86de)
|
||||
- [Tests] use `@arethetypeswrong/cli` [`50b272c`](https://github.com/inspect-js/hasOwn/commit/50b272c829f40d053a3dd91c9796e0ac0b2af084)
|
||||
|
||||
## [v2.0.1](https://github.com/inspect-js/hasOwn/compare/v2.0.0...v2.0.1) - 2024-02-10
|
||||
|
||||
### Commits
|
||||
|
||||
- [types] use a handwritten d.ts file; fix exported type [`012b989`](https://github.com/inspect-js/hasOwn/commit/012b9898ccf91dc441e2ebf594ff70270a5fda58)
|
||||
- [Dev Deps] update `@types/function-bind`, `@types/mock-property`, `@types/tape`, `aud`, `mock-property`, `npmignore`, `tape`, `typescript` [`977a56f`](https://github.com/inspect-js/hasOwn/commit/977a56f51a1f8b20566f3c471612137894644025)
|
||||
- [meta] add `sideEffects` flag [`3a60b7b`](https://github.com/inspect-js/hasOwn/commit/3a60b7bf42fccd8c605e5f145a6fcc83b13cb46f)
|
||||
|
||||
## [v2.0.0](https://github.com/inspect-js/hasOwn/compare/v1.0.1...v2.0.0) - 2023-10-19
|
||||
|
||||
### Commits
|
||||
|
||||
- revamped implementation, tests, readme [`72bf8b3`](https://github.com/inspect-js/hasOwn/commit/72bf8b338e77a638f0a290c63ffaed18339c36b4)
|
||||
- [meta] revamp package.json [`079775f`](https://github.com/inspect-js/hasOwn/commit/079775fb1ec72c1c6334069593617a0be3847458)
|
||||
- Only apps should have lockfiles [`6640e23`](https://github.com/inspect-js/hasOwn/commit/6640e233d1bb8b65260880f90787637db157d215)
|
||||
|
||||
## v1.0.1 - 2023-10-10
|
||||
|
||||
### Commits
|
||||
|
||||
- Initial commit [`8dbfde6`](https://github.com/inspect-js/hasOwn/commit/8dbfde6e8fb0ebb076fab38d138f2984eb340a62)
|
||||
21
frontend/node_modules/hasown/LICENSE
generated
vendored
Normal file
21
frontend/node_modules/hasown/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Jordan Harband and contributors
|
||||
|
||||
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.
|
||||
40
frontend/node_modules/hasown/README.md
generated
vendored
Normal file
40
frontend/node_modules/hasown/README.md
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
# hasown <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
||||
|
||||
[![github actions][actions-image]][actions-url]
|
||||
[![coverage][codecov-image]][codecov-url]
|
||||
[![License][license-image]][license-url]
|
||||
[![Downloads][downloads-image]][downloads-url]
|
||||
|
||||
[![npm badge][npm-badge-png]][package-url]
|
||||
|
||||
A robust, ES3 compatible, "has own property" predicate.
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
const assert = require('assert');
|
||||
const hasOwn = require('hasown');
|
||||
|
||||
assert.equal(hasOwn({}, 'toString'), false);
|
||||
assert.equal(hasOwn([], 'length'), true);
|
||||
assert.equal(hasOwn({ a: 42 }, 'a'), true);
|
||||
```
|
||||
|
||||
## Tests
|
||||
Simply clone the repo, `npm install`, and run `npm test`
|
||||
|
||||
[package-url]: https://npmjs.org/package/hasown
|
||||
[npm-version-svg]: https://versionbadg.es/inspect-js/hasown.svg
|
||||
[deps-svg]: https://david-dm.org/inspect-js/hasOwn.svg
|
||||
[deps-url]: https://david-dm.org/inspect-js/hasOwn
|
||||
[dev-deps-svg]: https://david-dm.org/inspect-js/hasOwn/dev-status.svg
|
||||
[dev-deps-url]: https://david-dm.org/inspect-js/hasOwn#info=devDependencies
|
||||
[npm-badge-png]: https://nodei.co/npm/hasown.png?downloads=true&stars=true
|
||||
[license-image]: https://img.shields.io/npm/l/hasown.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: https://img.shields.io/npm/dm/hasown.svg
|
||||
[downloads-url]: https://npm-stat.com/charts.html?package=hasown
|
||||
[codecov-image]: https://codecov.io/gh/inspect-js/hasOwn/branch/main/graphs/badge.svg
|
||||
[codecov-url]: https://app.codecov.io/gh/inspect-js/hasOwn/
|
||||
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/hasOwn
|
||||
[actions-url]: https://github.com/inspect-js/hasOwn/actions
|
||||
3
frontend/node_modules/hasown/index.d.ts
generated
vendored
Normal file
3
frontend/node_modules/hasown/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
declare function hasOwn<O, K extends PropertyKey, V = unknown>(o: O, p: K): o is O & Record<K, V>;
|
||||
|
||||
export = hasOwn;
|
||||
8
frontend/node_modules/hasown/index.js
generated
vendored
Normal file
8
frontend/node_modules/hasown/index.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
var call = Function.prototype.call;
|
||||
var $hasOwn = Object.prototype.hasOwnProperty;
|
||||
var bind = require('function-bind');
|
||||
|
||||
/** @type {import('.')} */
|
||||
module.exports = bind.call(call, $hasOwn);
|
||||
92
frontend/node_modules/hasown/package.json
generated
vendored
Normal file
92
frontend/node_modules/hasown/package.json
generated
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
{
|
||||
"name": "hasown",
|
||||
"version": "2.0.2",
|
||||
"description": "A robust, ES3 compatible, \"has own property\" predicate.",
|
||||
"main": "index.js",
|
||||
"exports": {
|
||||
".": "./index.js",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"types": "index.d.ts",
|
||||
"sideEffects": false,
|
||||
"scripts": {
|
||||
"prepack": "npmignore --auto --commentLines=autogenerated",
|
||||
"prepublish": "not-in-publish || npm run prepublishOnly",
|
||||
"prepublishOnly": "safe-publish-latest",
|
||||
"prelint": "evalmd README.md",
|
||||
"lint": "eslint --ext=js,mjs .",
|
||||
"postlint": "npm run tsc",
|
||||
"pretest": "npm run lint",
|
||||
"tsc": "tsc -p .",
|
||||
"posttsc": "attw -P",
|
||||
"tests-only": "nyc tape 'test/**/*.js'",
|
||||
"test": "npm run tests-only",
|
||||
"posttest": "aud --production",
|
||||
"version": "auto-changelog && git add CHANGELOG.md",
|
||||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/inspect-js/hasOwn.git"
|
||||
},
|
||||
"keywords": [
|
||||
"has",
|
||||
"hasOwnProperty",
|
||||
"hasOwn",
|
||||
"has-own",
|
||||
"own",
|
||||
"has",
|
||||
"property",
|
||||
"in",
|
||||
"javascript",
|
||||
"ecmascript"
|
||||
],
|
||||
"author": "Jordan Harband <ljharb@gmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/inspect-js/hasOwn/issues"
|
||||
},
|
||||
"homepage": "https://github.com/inspect-js/hasOwn#readme",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@arethetypeswrong/cli": "^0.15.1",
|
||||
"@ljharb/eslint-config": "^21.1.0",
|
||||
"@ljharb/tsconfig": "^0.2.0",
|
||||
"@types/function-bind": "^1.1.10",
|
||||
"@types/mock-property": "^1.0.2",
|
||||
"@types/tape": "^5.6.4",
|
||||
"aud": "^2.0.4",
|
||||
"auto-changelog": "^2.4.0",
|
||||
"eslint": "=8.8.0",
|
||||
"evalmd": "^0.0.19",
|
||||
"in-publish": "^2.0.1",
|
||||
"mock-property": "^1.0.3",
|
||||
"npmignore": "^0.3.1",
|
||||
"nyc": "^10.3.2",
|
||||
"safe-publish-latest": "^2.0.0",
|
||||
"tape": "^5.7.5",
|
||||
"typescript": "next"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/index.js"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false,
|
||||
"hideCredit": true
|
||||
},
|
||||
"publishConfig": {
|
||||
"ignore": [
|
||||
".github/workflows",
|
||||
"test"
|
||||
]
|
||||
}
|
||||
}
|
||||
6
frontend/node_modules/hasown/tsconfig.json
generated
vendored
Normal file
6
frontend/node_modules/hasown/tsconfig.json
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"extends": "@ljharb/tsconfig",
|
||||
"exclude": [
|
||||
"coverage",
|
||||
],
|
||||
}
|
||||
18
frontend/node_modules/is-core-module/.eslintrc
generated
vendored
Normal file
18
frontend/node_modules/is-core-module/.eslintrc
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"extends": "@ljharb",
|
||||
"root": true,
|
||||
"rules": {
|
||||
"func-style": 1,
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": "test/**",
|
||||
"rules": {
|
||||
"global-require": 0,
|
||||
"max-depth": 0,
|
||||
"max-lines-per-function": 0,
|
||||
"no-negated-condition": 0,
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
9
frontend/node_modules/is-core-module/.nycrc
generated
vendored
Normal file
9
frontend/node_modules/is-core-module/.nycrc
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"all": true,
|
||||
"check-coverage": false,
|
||||
"reporter": ["text-summary", "text", "html", "json"],
|
||||
"exclude": [
|
||||
"coverage",
|
||||
"test"
|
||||
]
|
||||
}
|
||||
218
frontend/node_modules/is-core-module/CHANGELOG.md
generated
vendored
Normal file
218
frontend/node_modules/is-core-module/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,218 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [v2.16.1](https://github.com/inspect-js/is-core-module/compare/v2.16.0...v2.16.1) - 2024-12-21
|
||||
|
||||
### Fixed
|
||||
|
||||
- [Fix] `node:sqlite` is available in node ^22.13 [`#17`](https://github.com/inspect-js/is-core-module/issues/17)
|
||||
|
||||
## [v2.16.0](https://github.com/inspect-js/is-core-module/compare/v2.15.1...v2.16.0) - 2024-12-13
|
||||
|
||||
### Commits
|
||||
|
||||
- [New] add `node:sqlite` [`1ee94d2`](https://github.com/inspect-js/is-core-module/commit/1ee94d20857e22cdb24e9b4bb1a2097f2e03e26f)
|
||||
- [Dev Deps] update `auto-changelog`, `tape` [`aa84aa3`](https://github.com/inspect-js/is-core-module/commit/aa84aa34face677f14e08ec1c737f0c4bba27260)
|
||||
|
||||
## [v2.15.1](https://github.com/inspect-js/is-core-module/compare/v2.15.0...v2.15.1) - 2024-08-21
|
||||
|
||||
### Commits
|
||||
|
||||
- [Tests] add `process.getBuiltinModule` tests [`28c7791`](https://github.com/inspect-js/is-core-module/commit/28c7791c196d58c64cfdf638b7e68ed1b62a4da0)
|
||||
- [Fix] `test/mock_loader` is no longer exposed as of v22.7 [`68b08b0`](https://github.com/inspect-js/is-core-module/commit/68b08b0d7963447dbffa5142e8810dca550383af)
|
||||
- [Tests] replace `aud` with `npm audit` [`32f8060`](https://github.com/inspect-js/is-core-module/commit/32f806026dac14f9016be4401a643851240c76b9)
|
||||
- [Dev Deps] update `mock-property` [`f7d3c8f`](https://github.com/inspect-js/is-core-module/commit/f7d3c8f01e922be49621683eb41477c4f50522e1)
|
||||
- [Dev Deps] add missing peer dep [`eaee885`](https://github.com/inspect-js/is-core-module/commit/eaee885b67238819e9c8ed5bd2098766e1d05331)
|
||||
|
||||
## [v2.15.0](https://github.com/inspect-js/is-core-module/compare/v2.14.0...v2.15.0) - 2024-07-17
|
||||
|
||||
### Commits
|
||||
|
||||
- [New] add `node:sea` [`2819fb3`](https://github.com/inspect-js/is-core-module/commit/2819fb3eae312fa64643bc5430ebd06ec0f3fb88)
|
||||
|
||||
## [v2.14.0](https://github.com/inspect-js/is-core-module/compare/v2.13.1...v2.14.0) - 2024-06-20
|
||||
|
||||
### Commits
|
||||
|
||||
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `mock-property`, `npmignore`, `tape` [`0e43200`](https://github.com/inspect-js/is-core-module/commit/0e432006d97237cc082d41e6a593e87c81068364)
|
||||
- [meta] add missing `engines.node` [`4ea3af8`](https://github.com/inspect-js/is-core-module/commit/4ea3af88891a1d4f96026f0ec0ef08c67cd1bd24)
|
||||
- [New] add `test/mock_loader` [`e9fbd29`](https://github.com/inspect-js/is-core-module/commit/e9fbd2951383be070aeffb9ebbf3715237282610)
|
||||
- [Deps] update `hasown` [`57f1940`](https://github.com/inspect-js/is-core-module/commit/57f1940947b3e368abdf529232d2f17d88909358)
|
||||
|
||||
## [v2.13.1](https://github.com/inspect-js/is-core-module/compare/v2.13.0...v2.13.1) - 2023-10-20
|
||||
|
||||
### Commits
|
||||
|
||||
- [Refactor] use `hasown` instead of `has` [`0e52096`](https://github.com/inspect-js/is-core-module/commit/0e520968b0a725276b67420ab4b877486b243ae0)
|
||||
- [Dev Deps] update `mock-property`, `tape` [`8736b35`](https://github.com/inspect-js/is-core-module/commit/8736b35464d0f297b55da2c6b30deee04b8303c5)
|
||||
|
||||
## [v2.13.0](https://github.com/inspect-js/is-core-module/compare/v2.12.1...v2.13.0) - 2023-08-05
|
||||
|
||||
### Commits
|
||||
|
||||
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `semver`, `tape` [`c75b263`](https://github.com/inspect-js/is-core-module/commit/c75b263d047cb53430c3970107e5eb64d6cd6c0c)
|
||||
- [New] `node:test/reporters` and `wasi`/`node:wasi` are in v18.17 [`d76cbf8`](https://github.com/inspect-js/is-core-module/commit/d76cbf8e9b208acfd98913fed5a5f45cb15fe5dc)
|
||||
|
||||
## [v2.12.1](https://github.com/inspect-js/is-core-module/compare/v2.12.0...v2.12.1) - 2023-05-16
|
||||
|
||||
### Commits
|
||||
|
||||
- [Fix] `test/reporters` now requires the `node:` prefix as of v20.2 [`12183d0`](https://github.com/inspect-js/is-core-module/commit/12183d0d8e4edf56b6ce18a1b3be54bfce10175b)
|
||||
|
||||
## [v2.12.0](https://github.com/inspect-js/is-core-module/compare/v2.11.0...v2.12.0) - 2023-04-10
|
||||
|
||||
### Commits
|
||||
|
||||
- [actions] update rebase action to use reusable workflow [`c0a7251`](https://github.com/inspect-js/is-core-module/commit/c0a7251f734f3c621932c5fcdfd1bf966b42ca32)
|
||||
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`9ae8b7f`](https://github.com/inspect-js/is-core-module/commit/9ae8b7fac03c369861d0991b4a2ce8d4848e6a7d)
|
||||
- [New] `test/reporters` added in v19.9, `wasi` added in v20 [`9d5341a`](https://github.com/inspect-js/is-core-module/commit/9d5341ab32053f25b7fa7db3c0e18461db24a79c)
|
||||
- [Dev Deps] add missing `in-publish` dep [`5980245`](https://github.com/inspect-js/is-core-module/commit/59802456e9ac919fa748f53be9d8fbf304a197df)
|
||||
|
||||
## [v2.11.0](https://github.com/inspect-js/is-core-module/compare/v2.10.0...v2.11.0) - 2022-10-18
|
||||
|
||||
### Commits
|
||||
|
||||
- [meta] use `npmignore` to autogenerate an npmignore file [`3360011`](https://github.com/inspect-js/is-core-module/commit/33600118857b46177178072fba2affcdeb009d12)
|
||||
- [Dev Deps] update `aud`, `tape` [`651c6b0`](https://github.com/inspect-js/is-core-module/commit/651c6b0cc2799d4130866cf43ad333dcade3d26c)
|
||||
- [New] `inspector/promises` and `node:inspector/promises` is now available in node 19 [`22d332f`](https://github.com/inspect-js/is-core-module/commit/22d332fe22ac050305444e0781ff85af819abcb0)
|
||||
|
||||
## [v2.10.0](https://github.com/inspect-js/is-core-module/compare/v2.9.0...v2.10.0) - 2022-08-03
|
||||
|
||||
### Commits
|
||||
|
||||
- [New] `node:test` is now available in node ^16.17 [`e8fd36e`](https://github.com/inspect-js/is-core-module/commit/e8fd36e9b86c917775a07cc473b62a3294f459f2)
|
||||
- [Tests] improve skip message [`c014a4c`](https://github.com/inspect-js/is-core-module/commit/c014a4c0cd6eb15fff573ae4709191775e70cab4)
|
||||
|
||||
## [v2.9.0](https://github.com/inspect-js/is-core-module/compare/v2.8.1...v2.9.0) - 2022-04-19
|
||||
|
||||
### Commits
|
||||
|
||||
- [New] add `node:test`, in node 18+ [`f853eca`](https://github.com/inspect-js/is-core-module/commit/f853eca801d0a7d4e1dbb670f1b6d9837d9533c5)
|
||||
- [Tests] use `mock-property` [`03b3644`](https://github.com/inspect-js/is-core-module/commit/03b3644dff4417f4ba5a7d0aa0138f5f6b3e5c46)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`7c0e2d0`](https://github.com/inspect-js/is-core-module/commit/7c0e2d06ed2a89acf53abe2ab34d703ed5b03455)
|
||||
- [meta] simplify "exports" [`d6ed201`](https://github.com/inspect-js/is-core-module/commit/d6ed201eba7fbba0e59814a9050fc49a6e9878c8)
|
||||
|
||||
## [v2.8.1](https://github.com/inspect-js/is-core-module/compare/v2.8.0...v2.8.1) - 2022-01-05
|
||||
|
||||
### Commits
|
||||
|
||||
- [actions] reuse common workflows [`cd2cf9b`](https://github.com/inspect-js/is-core-module/commit/cd2cf9b3b66c8d328f65610efe41e9325db7716d)
|
||||
- [Fix] update node 0.4 results [`062195d`](https://github.com/inspect-js/is-core-module/commit/062195d89f0876a88b95d378b43f7fcc1205bc5b)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`0790b62`](https://github.com/inspect-js/is-core-module/commit/0790b6222848c6167132f9f73acc3520fa8d1298)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`7d139a6`](https://github.com/inspect-js/is-core-module/commit/7d139a6d767709eabf0a0251e074ec1fb230c06e)
|
||||
- [Tests] run `nyc` in `tests-only`, not `test` [`780e8a0`](https://github.com/inspect-js/is-core-module/commit/780e8a049951c71cf78b1707f0871c48a28bde14)
|
||||
|
||||
## [v2.8.0](https://github.com/inspect-js/is-core-module/compare/v2.7.0...v2.8.0) - 2021-10-14
|
||||
|
||||
### Commits
|
||||
|
||||
- [actions] update codecov uploader [`0cfe94e`](https://github.com/inspect-js/is-core-module/commit/0cfe94e106a7d005ea03e008c0a21dec13a77904)
|
||||
- [New] add `readline/promises` to node v17+ [`4f78c30`](https://github.com/inspect-js/is-core-module/commit/4f78c3008b1b58b4db6dc91d99610b1bc859da7e)
|
||||
- [Tests] node ^14.18 supports `node:` prefixes for CJS [`43e2f17`](https://github.com/inspect-js/is-core-module/commit/43e2f177452cea2f0eaf34f61b5407217bbdb6f4)
|
||||
|
||||
## [v2.7.0](https://github.com/inspect-js/is-core-module/compare/v2.6.0...v2.7.0) - 2021-09-27
|
||||
|
||||
### Commits
|
||||
|
||||
- [New] node `v14.18` added `node:`-prefixed core modules to `require` [`6d943ab`](https://github.com/inspect-js/is-core-module/commit/6d943abe81382b9bbe344384d80fbfebe1cc0526)
|
||||
- [Tests] add coverage for Object.prototype pollution [`c6baf5f`](https://github.com/inspect-js/is-core-module/commit/c6baf5f942311a1945c1af41167bb80b84df2af7)
|
||||
- [Dev Deps] update `@ljharb/eslint-config` [`6717f00`](https://github.com/inspect-js/is-core-module/commit/6717f000d063ea57beb772bded36c2f056ac404c)
|
||||
- [eslint] fix linter warning [`594c10b`](https://github.com/inspect-js/is-core-module/commit/594c10bb7d39d7eb00925c90924199ff596184b2)
|
||||
- [meta] add `sideEffects` flag [`c32cfa5`](https://github.com/inspect-js/is-core-module/commit/c32cfa5195632944c4dd4284a142b8476e75be13)
|
||||
|
||||
## [v2.6.0](https://github.com/inspect-js/is-core-module/compare/v2.5.0...v2.6.0) - 2021-08-17
|
||||
|
||||
### Commits
|
||||
|
||||
- [Dev Deps] update `eslint`, `tape` [`6cc928f`](https://github.com/inspect-js/is-core-module/commit/6cc928f8a4bba66aeeccc4f6beeac736d4bd3081)
|
||||
- [New] add `stream/consumers` to node `>= 16.7` [`a1a423e`](https://github.com/inspect-js/is-core-module/commit/a1a423e467e4cc27df180234fad5bab45943e67d)
|
||||
- [Refactor] Remove duplicated `&&` operand [`86faea7`](https://github.com/inspect-js/is-core-module/commit/86faea738213a2433c62d1098488dc9314dca832)
|
||||
- [Tests] include prereleases [`a4da7a6`](https://github.com/inspect-js/is-core-module/commit/a4da7a6abf7568e2aa4fd98e69452179f1850963)
|
||||
|
||||
## [v2.5.0](https://github.com/inspect-js/is-core-module/compare/v2.4.0...v2.5.0) - 2021-07-12
|
||||
|
||||
### Commits
|
||||
|
||||
- [Dev Deps] update `auto-changelog`, `eslint` [`6334cc9`](https://github.com/inspect-js/is-core-module/commit/6334cc94f3af7469685bd8f236740991baaf2705)
|
||||
- [New] add `stream/web` to node v16.5+ [`17ac59b`](https://github.com/inspect-js/is-core-module/commit/17ac59b662d63e220a2e5728625f005c24f177b2)
|
||||
|
||||
## [v2.4.0](https://github.com/inspect-js/is-core-module/compare/v2.3.0...v2.4.0) - 2021-05-09
|
||||
|
||||
### Commits
|
||||
|
||||
- [readme] add actions and codecov badges [`82b7faa`](https://github.com/inspect-js/is-core-module/commit/82b7faa12b56dbe47fbea67e1a5b9e447027ba40)
|
||||
- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`8096868`](https://github.com/inspect-js/is-core-module/commit/8096868c024a161ccd4d44110b136763e92eace8)
|
||||
- [Dev Deps] update `eslint` [`6726824`](https://github.com/inspect-js/is-core-module/commit/67268249b88230018c510f6532a8046d7326346f)
|
||||
- [New] add `diagnostics_channel` to node `^14.17` [`86c6563`](https://github.com/inspect-js/is-core-module/commit/86c65634201b8ff9b3e48a9a782594579c7f5c3c)
|
||||
- [meta] fix prepublish script [`697a01e`](https://github.com/inspect-js/is-core-module/commit/697a01e3c9c0be074066520954f30fb28532ec57)
|
||||
|
||||
## [v2.3.0](https://github.com/inspect-js/is-core-module/compare/v2.2.0...v2.3.0) - 2021-04-24
|
||||
|
||||
### Commits
|
||||
|
||||
- [meta] do not publish github action workflow files [`060d4bb`](https://github.com/inspect-js/is-core-module/commit/060d4bb971a29451c19ff336eb56bee27f9fa95a)
|
||||
- [New] add support for `node:` prefix, in node 16+ [`7341223`](https://github.com/inspect-js/is-core-module/commit/73412230a769f6e81c05eea50b6520cebf54ed2f)
|
||||
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`016269a`](https://github.com/inspect-js/is-core-module/commit/016269abae9f6657a5254adfbb813f09a05067f9)
|
||||
- [patch] remove unneeded `.0` in version ranges [`cb466a6`](https://github.com/inspect-js/is-core-module/commit/cb466a6d89e52b8389e5c12715efcd550c41cea3)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`c9f9c39`](https://github.com/inspect-js/is-core-module/commit/c9f9c396ace60ef81906f98059c064e6452473ed)
|
||||
- [actions] update workflows [`3ee4a89`](https://github.com/inspect-js/is-core-module/commit/3ee4a89fd5a02fccd43882d905448ea6a98e9a3c)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`dee4fed`](https://github.com/inspect-js/is-core-module/commit/dee4fed79690c1d43a22f7fa9426abebdc6d727f)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`7d046ba`](https://github.com/inspect-js/is-core-module/commit/7d046ba07ae8c9292e43652694ca808d7b309de8)
|
||||
- [meta] use `prepublishOnly` script for npm 7+ [`149e677`](https://github.com/inspect-js/is-core-module/commit/149e6771a5ede6d097e71785b467a9c4b4977cc7)
|
||||
- [readme] remove travis badge [`903b51d`](https://github.com/inspect-js/is-core-module/commit/903b51d6b69b98abeabfbc3695c345b02646f19c)
|
||||
|
||||
## [v2.2.0](https://github.com/inspect-js/is-core-module/compare/v2.1.0...v2.2.0) - 2020-11-26
|
||||
|
||||
### Commits
|
||||
|
||||
- [Tests] migrate tests to Github Actions [`c919f57`](https://github.com/inspect-js/is-core-module/commit/c919f573c0a92d10a0acad0b650b5aecb033d426)
|
||||
- [patch] `core.json`: %s/ /\t/g [`db3f685`](https://github.com/inspect-js/is-core-module/commit/db3f68581f53e73cc09cd675955eb1bdd6a5a39b)
|
||||
- [Tests] run `nyc` on all tests [`b2f925f`](https://github.com/inspect-js/is-core-module/commit/b2f925f8866f210ef441f39fcc8cc42692ab89b1)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`; add `safe-publish-latest` [`89f02a2`](https://github.com/inspect-js/is-core-module/commit/89f02a2b4162246dea303a6ee31bb9a550b05c72)
|
||||
- [New] add `path/posix`, `path/win32`, `util/types` [`77f94f1`](https://github.com/inspect-js/is-core-module/commit/77f94f1e90ffd7c0be2a3f1aa8574ebf7fd981b3)
|
||||
|
||||
## [v2.1.0](https://github.com/inspect-js/is-core-module/compare/v2.0.0...v2.1.0) - 2020-11-04
|
||||
|
||||
### Commits
|
||||
|
||||
- [Dev Deps] update `eslint` [`5e0034e`](https://github.com/inspect-js/is-core-module/commit/5e0034eae57c09c8f1bd769f502486a00f56c6e4)
|
||||
- [New] Add `diagnostics_channel` [`c2d83d0`](https://github.com/inspect-js/is-core-module/commit/c2d83d0a0225a1a658945d9bab7036ea347d29ec)
|
||||
|
||||
## [v2.0.0](https://github.com/inspect-js/is-core-module/compare/v1.0.2...v2.0.0) - 2020-09-29
|
||||
|
||||
### Commits
|
||||
|
||||
- v2 implementation [`865aeb5`](https://github.com/inspect-js/is-core-module/commit/865aeb5ca0e90248a3dfff5d7622e4751fdeb9cd)
|
||||
- Only apps should have lockfiles [`5a5e660`](https://github.com/inspect-js/is-core-module/commit/5a5e660d568e37eb44e17fb1ebb12a105205fc2b)
|
||||
- Initial commit for v2 [`5a51524`](https://github.com/inspect-js/is-core-module/commit/5a51524e06f92adece5fbb138c69b7b9748a2348)
|
||||
- Tests [`116eae4`](https://github.com/inspect-js/is-core-module/commit/116eae4fccd01bc72c1fd3cc4b7561c387afc496)
|
||||
- [meta] add `auto-changelog` [`c24388b`](https://github.com/inspect-js/is-core-module/commit/c24388bee828d223040519d1f5b226ca35beee63)
|
||||
- [actions] add "Automatic Rebase" and "require allow edits" actions [`34292db`](https://github.com/inspect-js/is-core-module/commit/34292dbcbadae0868aff03c22dbd8b7b8a11558a)
|
||||
- [Tests] add `npm run lint` [`4f9eeee`](https://github.com/inspect-js/is-core-module/commit/4f9eeee7ddff10698bbf528620f4dc8d4fa3e697)
|
||||
- [readme] fix travis badges, https all URLs [`e516a73`](https://github.com/inspect-js/is-core-module/commit/e516a73b0dccce20938c432b1ba512eae8eff9e9)
|
||||
- [meta] create FUNDING.yml [`1aabebc`](https://github.com/inspect-js/is-core-module/commit/1aabebca98d01f8a04e46bc2e2520fa93cf21ac6)
|
||||
- [Fix] `domain`: domain landed sometime > v0.7.7 and <= v0.7.12 [`2df7d37`](https://github.com/inspect-js/is-core-module/commit/2df7d37595d41b15eeada732b706b926c2771655)
|
||||
- [Fix] `sys`: worked in 0.6, not 0.7, and 0.8+ [`a75c134`](https://github.com/inspect-js/is-core-module/commit/a75c134229e1e9441801f6b73f6a52489346eb65)
|
||||
|
||||
## [v1.0.2](https://github.com/inspect-js/is-core-module/compare/v1.0.1...v1.0.2) - 2014-09-28
|
||||
|
||||
### Commits
|
||||
|
||||
- simpler [`66fe90f`](https://github.com/inspect-js/is-core-module/commit/66fe90f9771581b9adc0c3900baa52c21b5baea2)
|
||||
|
||||
## [v1.0.1](https://github.com/inspect-js/is-core-module/compare/v1.0.0...v1.0.1) - 2014-09-28
|
||||
|
||||
### Commits
|
||||
|
||||
- remove stupid [`f21f906`](https://github.com/inspect-js/is-core-module/commit/f21f906f882c2bd656a5fc5ed6fbe48ddaffb2ac)
|
||||
- update readme [`1eff0ec`](https://github.com/inspect-js/is-core-module/commit/1eff0ec69798d1ec65771552d1562911e90a8027)
|
||||
|
||||
## v1.0.0 - 2014-09-28
|
||||
|
||||
### Commits
|
||||
|
||||
- init [`48e5e76`](https://github.com/inspect-js/is-core-module/commit/48e5e76cac378fddb8c1f7d4055b8dfc943d6b96)
|
||||
20
frontend/node_modules/is-core-module/LICENSE
generated
vendored
Normal file
20
frontend/node_modules/is-core-module/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Dave Justice
|
||||
|
||||
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.
|
||||
40
frontend/node_modules/is-core-module/README.md
generated
vendored
Normal file
40
frontend/node_modules/is-core-module/README.md
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
# is-core-module <sup>[![Version Badge][2]][1]</sup>
|
||||
|
||||
[![github actions][actions-image]][actions-url]
|
||||
[![coverage][codecov-image]][codecov-url]
|
||||
[![dependency status][5]][6]
|
||||
[![dev dependency status][7]][8]
|
||||
[![License][license-image]][license-url]
|
||||
[![Downloads][downloads-image]][downloads-url]
|
||||
|
||||
[![npm badge][11]][1]
|
||||
|
||||
Is this specifier a node.js core module? Optionally provide a node version to check; defaults to the current node version.
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
var isCore = require('is-core-module');
|
||||
var assert = require('assert');
|
||||
assert(isCore('fs'));
|
||||
assert(!isCore('butts'));
|
||||
```
|
||||
|
||||
## Tests
|
||||
Clone the repo, `npm install`, and run `npm test`
|
||||
|
||||
[1]: https://npmjs.org/package/is-core-module
|
||||
[2]: https://versionbadg.es/inspect-js/is-core-module.svg
|
||||
[5]: https://david-dm.org/inspect-js/is-core-module.svg
|
||||
[6]: https://david-dm.org/inspect-js/is-core-module
|
||||
[7]: https://david-dm.org/inspect-js/is-core-module/dev-status.svg
|
||||
[8]: https://david-dm.org/inspect-js/is-core-module#info=devDependencies
|
||||
[11]: https://nodei.co/npm/is-core-module.png?downloads=true&stars=true
|
||||
[license-image]: https://img.shields.io/npm/l/is-core-module.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: https://img.shields.io/npm/dm/is-core-module.svg
|
||||
[downloads-url]: https://npm-stat.com/charts.html?package=is-core-module
|
||||
[codecov-image]: https://codecov.io/gh/inspect-js/is-core-module/branch/main/graphs/badge.svg
|
||||
[codecov-url]: https://app.codecov.io/gh/inspect-js/is-core-module/
|
||||
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-core-module
|
||||
[actions-url]: https://github.com/inspect-js/is-core-module/actions
|
||||
162
frontend/node_modules/is-core-module/core.json
generated
vendored
Normal file
162
frontend/node_modules/is-core-module/core.json
generated
vendored
Normal file
@@ -0,0 +1,162 @@
|
||||
{
|
||||
"assert": true,
|
||||
"node:assert": [">= 14.18 && < 15", ">= 16"],
|
||||
"assert/strict": ">= 15",
|
||||
"node:assert/strict": ">= 16",
|
||||
"async_hooks": ">= 8",
|
||||
"node:async_hooks": [">= 14.18 && < 15", ">= 16"],
|
||||
"buffer_ieee754": ">= 0.5 && < 0.9.7",
|
||||
"buffer": true,
|
||||
"node:buffer": [">= 14.18 && < 15", ">= 16"],
|
||||
"child_process": true,
|
||||
"node:child_process": [">= 14.18 && < 15", ">= 16"],
|
||||
"cluster": ">= 0.5",
|
||||
"node:cluster": [">= 14.18 && < 15", ">= 16"],
|
||||
"console": true,
|
||||
"node:console": [">= 14.18 && < 15", ">= 16"],
|
||||
"constants": true,
|
||||
"node:constants": [">= 14.18 && < 15", ">= 16"],
|
||||
"crypto": true,
|
||||
"node:crypto": [">= 14.18 && < 15", ">= 16"],
|
||||
"_debug_agent": ">= 1 && < 8",
|
||||
"_debugger": "< 8",
|
||||
"dgram": true,
|
||||
"node:dgram": [">= 14.18 && < 15", ">= 16"],
|
||||
"diagnostics_channel": [">= 14.17 && < 15", ">= 15.1"],
|
||||
"node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"],
|
||||
"dns": true,
|
||||
"node:dns": [">= 14.18 && < 15", ">= 16"],
|
||||
"dns/promises": ">= 15",
|
||||
"node:dns/promises": ">= 16",
|
||||
"domain": ">= 0.7.12",
|
||||
"node:domain": [">= 14.18 && < 15", ">= 16"],
|
||||
"events": true,
|
||||
"node:events": [">= 14.18 && < 15", ">= 16"],
|
||||
"freelist": "< 6",
|
||||
"fs": true,
|
||||
"node:fs": [">= 14.18 && < 15", ">= 16"],
|
||||
"fs/promises": [">= 10 && < 10.1", ">= 14"],
|
||||
"node:fs/promises": [">= 14.18 && < 15", ">= 16"],
|
||||
"_http_agent": ">= 0.11.1",
|
||||
"node:_http_agent": [">= 14.18 && < 15", ">= 16"],
|
||||
"_http_client": ">= 0.11.1",
|
||||
"node:_http_client": [">= 14.18 && < 15", ">= 16"],
|
||||
"_http_common": ">= 0.11.1",
|
||||
"node:_http_common": [">= 14.18 && < 15", ">= 16"],
|
||||
"_http_incoming": ">= 0.11.1",
|
||||
"node:_http_incoming": [">= 14.18 && < 15", ">= 16"],
|
||||
"_http_outgoing": ">= 0.11.1",
|
||||
"node:_http_outgoing": [">= 14.18 && < 15", ">= 16"],
|
||||
"_http_server": ">= 0.11.1",
|
||||
"node:_http_server": [">= 14.18 && < 15", ">= 16"],
|
||||
"http": true,
|
||||
"node:http": [">= 14.18 && < 15", ">= 16"],
|
||||
"http2": ">= 8.8",
|
||||
"node:http2": [">= 14.18 && < 15", ">= 16"],
|
||||
"https": true,
|
||||
"node:https": [">= 14.18 && < 15", ">= 16"],
|
||||
"inspector": ">= 8",
|
||||
"node:inspector": [">= 14.18 && < 15", ">= 16"],
|
||||
"inspector/promises": [">= 19"],
|
||||
"node:inspector/promises": [">= 19"],
|
||||
"_linklist": "< 8",
|
||||
"module": true,
|
||||
"node:module": [">= 14.18 && < 15", ">= 16"],
|
||||
"net": true,
|
||||
"node:net": [">= 14.18 && < 15", ">= 16"],
|
||||
"node-inspect/lib/_inspect": ">= 7.6 && < 12",
|
||||
"node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12",
|
||||
"node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12",
|
||||
"os": true,
|
||||
"node:os": [">= 14.18 && < 15", ">= 16"],
|
||||
"path": true,
|
||||
"node:path": [">= 14.18 && < 15", ">= 16"],
|
||||
"path/posix": ">= 15.3",
|
||||
"node:path/posix": ">= 16",
|
||||
"path/win32": ">= 15.3",
|
||||
"node:path/win32": ">= 16",
|
||||
"perf_hooks": ">= 8.5",
|
||||
"node:perf_hooks": [">= 14.18 && < 15", ">= 16"],
|
||||
"process": ">= 1",
|
||||
"node:process": [">= 14.18 && < 15", ">= 16"],
|
||||
"punycode": ">= 0.5",
|
||||
"node:punycode": [">= 14.18 && < 15", ">= 16"],
|
||||
"querystring": true,
|
||||
"node:querystring": [">= 14.18 && < 15", ">= 16"],
|
||||
"readline": true,
|
||||
"node:readline": [">= 14.18 && < 15", ">= 16"],
|
||||
"readline/promises": ">= 17",
|
||||
"node:readline/promises": ">= 17",
|
||||
"repl": true,
|
||||
"node:repl": [">= 14.18 && < 15", ">= 16"],
|
||||
"node:sea": [">= 20.12 && < 21", ">= 21.7"],
|
||||
"smalloc": ">= 0.11.5 && < 3",
|
||||
"node:sqlite": [">= 22.13 && < 23", ">= 23.4"],
|
||||
"_stream_duplex": ">= 0.9.4",
|
||||
"node:_stream_duplex": [">= 14.18 && < 15", ">= 16"],
|
||||
"_stream_transform": ">= 0.9.4",
|
||||
"node:_stream_transform": [">= 14.18 && < 15", ">= 16"],
|
||||
"_stream_wrap": ">= 1.4.1",
|
||||
"node:_stream_wrap": [">= 14.18 && < 15", ">= 16"],
|
||||
"_stream_passthrough": ">= 0.9.4",
|
||||
"node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"],
|
||||
"_stream_readable": ">= 0.9.4",
|
||||
"node:_stream_readable": [">= 14.18 && < 15", ">= 16"],
|
||||
"_stream_writable": ">= 0.9.4",
|
||||
"node:_stream_writable": [">= 14.18 && < 15", ">= 16"],
|
||||
"stream": true,
|
||||
"node:stream": [">= 14.18 && < 15", ">= 16"],
|
||||
"stream/consumers": ">= 16.7",
|
||||
"node:stream/consumers": ">= 16.7",
|
||||
"stream/promises": ">= 15",
|
||||
"node:stream/promises": ">= 16",
|
||||
"stream/web": ">= 16.5",
|
||||
"node:stream/web": ">= 16.5",
|
||||
"string_decoder": true,
|
||||
"node:string_decoder": [">= 14.18 && < 15", ">= 16"],
|
||||
"sys": [">= 0.4 && < 0.7", ">= 0.8"],
|
||||
"node:sys": [">= 14.18 && < 15", ">= 16"],
|
||||
"test/reporters": ">= 19.9 && < 20.2",
|
||||
"node:test/reporters": [">= 18.17 && < 19", ">= 19.9", ">= 20"],
|
||||
"test/mock_loader": ">= 22.3 && < 22.7",
|
||||
"node:test/mock_loader": ">= 22.3 && < 22.7",
|
||||
"node:test": [">= 16.17 && < 17", ">= 18"],
|
||||
"timers": true,
|
||||
"node:timers": [">= 14.18 && < 15", ">= 16"],
|
||||
"timers/promises": ">= 15",
|
||||
"node:timers/promises": ">= 16",
|
||||
"_tls_common": ">= 0.11.13",
|
||||
"node:_tls_common": [">= 14.18 && < 15", ">= 16"],
|
||||
"_tls_legacy": ">= 0.11.3 && < 10",
|
||||
"_tls_wrap": ">= 0.11.3",
|
||||
"node:_tls_wrap": [">= 14.18 && < 15", ">= 16"],
|
||||
"tls": true,
|
||||
"node:tls": [">= 14.18 && < 15", ">= 16"],
|
||||
"trace_events": ">= 10",
|
||||
"node:trace_events": [">= 14.18 && < 15", ">= 16"],
|
||||
"tty": true,
|
||||
"node:tty": [">= 14.18 && < 15", ">= 16"],
|
||||
"url": true,
|
||||
"node:url": [">= 14.18 && < 15", ">= 16"],
|
||||
"util": true,
|
||||
"node:util": [">= 14.18 && < 15", ">= 16"],
|
||||
"util/types": ">= 15.3",
|
||||
"node:util/types": ">= 16",
|
||||
"v8/tools/arguments": ">= 10 && < 12",
|
||||
"v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"],
|
||||
"v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"],
|
||||
"v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"],
|
||||
"v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"],
|
||||
"v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"],
|
||||
"v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"],
|
||||
"v8": ">= 1",
|
||||
"node:v8": [">= 14.18 && < 15", ">= 16"],
|
||||
"vm": true,
|
||||
"node:vm": [">= 14.18 && < 15", ">= 16"],
|
||||
"wasi": [">= 13.4 && < 13.5", ">= 18.17 && < 19", ">= 20"],
|
||||
"node:wasi": [">= 18.17 && < 19", ">= 20"],
|
||||
"worker_threads": ">= 11.7",
|
||||
"node:worker_threads": [">= 14.18 && < 15", ">= 16"],
|
||||
"zlib": ">= 0.5",
|
||||
"node:zlib": [">= 14.18 && < 15", ">= 16"]
|
||||
}
|
||||
69
frontend/node_modules/is-core-module/index.js
generated
vendored
Normal file
69
frontend/node_modules/is-core-module/index.js
generated
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
'use strict';
|
||||
|
||||
var hasOwn = require('hasown');
|
||||
|
||||
function specifierIncluded(current, specifier) {
|
||||
var nodeParts = current.split('.');
|
||||
var parts = specifier.split(' ');
|
||||
var op = parts.length > 1 ? parts[0] : '=';
|
||||
var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.');
|
||||
|
||||
for (var i = 0; i < 3; ++i) {
|
||||
var cur = parseInt(nodeParts[i] || 0, 10);
|
||||
var ver = parseInt(versionParts[i] || 0, 10);
|
||||
if (cur === ver) {
|
||||
continue; // eslint-disable-line no-restricted-syntax, no-continue
|
||||
}
|
||||
if (op === '<') {
|
||||
return cur < ver;
|
||||
}
|
||||
if (op === '>=') {
|
||||
return cur >= ver;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return op === '>=';
|
||||
}
|
||||
|
||||
function matchesRange(current, range) {
|
||||
var specifiers = range.split(/ ?&& ?/);
|
||||
if (specifiers.length === 0) {
|
||||
return false;
|
||||
}
|
||||
for (var i = 0; i < specifiers.length; ++i) {
|
||||
if (!specifierIncluded(current, specifiers[i])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function versionIncluded(nodeVersion, specifierValue) {
|
||||
if (typeof specifierValue === 'boolean') {
|
||||
return specifierValue;
|
||||
}
|
||||
|
||||
var current = typeof nodeVersion === 'undefined'
|
||||
? process.versions && process.versions.node
|
||||
: nodeVersion;
|
||||
|
||||
if (typeof current !== 'string') {
|
||||
throw new TypeError(typeof nodeVersion === 'undefined' ? 'Unable to determine current node version' : 'If provided, a valid node version is required');
|
||||
}
|
||||
|
||||
if (specifierValue && typeof specifierValue === 'object') {
|
||||
for (var i = 0; i < specifierValue.length; ++i) {
|
||||
if (matchesRange(current, specifierValue[i])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return matchesRange(current, specifierValue);
|
||||
}
|
||||
|
||||
var data = require('./core.json');
|
||||
|
||||
module.exports = function isCore(x, nodeVersion) {
|
||||
return hasOwn(data, x) && versionIncluded(nodeVersion, data[x]);
|
||||
};
|
||||
76
frontend/node_modules/is-core-module/package.json
generated
vendored
Normal file
76
frontend/node_modules/is-core-module/package.json
generated
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"name": "is-core-module",
|
||||
"version": "2.16.1",
|
||||
"description": "Is this specifier a node.js core module?",
|
||||
"main": "index.js",
|
||||
"sideEffects": false,
|
||||
"exports": {
|
||||
".": "./index.js",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"scripts": {
|
||||
"prepack": "npmignore --auto --commentLines=autogenerated",
|
||||
"prepublish": "not-in-publish || npm run prepublishOnly",
|
||||
"prepublishOnly": "safe-publish-latest",
|
||||
"lint": "eslint .",
|
||||
"pretest": "npm run lint",
|
||||
"tests-only": "nyc tape 'test/**/*.js'",
|
||||
"test": "npm run tests-only",
|
||||
"posttest": "npx npm@'>=10.2' audit --production",
|
||||
"version": "auto-changelog && git add CHANGELOG.md",
|
||||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/inspect-js/is-core-module.git"
|
||||
},
|
||||
"keywords": [
|
||||
"core",
|
||||
"modules",
|
||||
"module",
|
||||
"npm",
|
||||
"node",
|
||||
"dependencies"
|
||||
],
|
||||
"author": "Jordan Harband <ljharb@gmail.com>",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
},
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/inspect-js/is-core-module/issues"
|
||||
},
|
||||
"homepage": "https://github.com/inspect-js/is-core-module",
|
||||
"dependencies": {
|
||||
"hasown": "^2.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ljharb/eslint-config": "^21.1.1",
|
||||
"auto-changelog": "^2.5.0",
|
||||
"encoding": "^0.1.13",
|
||||
"eslint": "=8.8.0",
|
||||
"in-publish": "^2.0.1",
|
||||
"mock-property": "^1.1.0",
|
||||
"npmignore": "^0.3.1",
|
||||
"nyc": "^10.3.2",
|
||||
"safe-publish-latest": "^2.0.0",
|
||||
"semver": "^6.3.1",
|
||||
"tape": "^5.9.0"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false,
|
||||
"hideCredit": true
|
||||
},
|
||||
"publishConfig": {
|
||||
"ignore": [
|
||||
".github"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
}
|
||||
157
frontend/node_modules/is-core-module/test/index.js
generated
vendored
Normal file
157
frontend/node_modules/is-core-module/test/index.js
generated
vendored
Normal file
@@ -0,0 +1,157 @@
|
||||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
var keys = require('object-keys');
|
||||
var semver = require('semver');
|
||||
var mockProperty = require('mock-property');
|
||||
|
||||
var isCore = require('../');
|
||||
var data = require('../core.json');
|
||||
|
||||
var supportsNodePrefix = semver.satisfies(process.versions.node, '^14.18 || >= 16', { includePrerelease: true });
|
||||
|
||||
test('core modules', function (t) {
|
||||
t.test('isCore()', function (st) {
|
||||
st.ok(isCore('fs'));
|
||||
st.ok(isCore('net'));
|
||||
st.ok(isCore('http'));
|
||||
|
||||
st.ok(!isCore('seq'));
|
||||
st.ok(!isCore('../'));
|
||||
|
||||
st.ok(!isCore('toString'));
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('core list', function (st) {
|
||||
var cores = keys(data);
|
||||
st.plan(cores.length);
|
||||
|
||||
for (var i = 0; i < cores.length; ++i) {
|
||||
var mod = cores[i];
|
||||
var requireFunc = function () { require(mod); }; // eslint-disable-line no-loop-func
|
||||
if (isCore(mod)) {
|
||||
st.doesNotThrow(requireFunc, mod + ' supported; requiring does not throw');
|
||||
} else {
|
||||
st['throws'](requireFunc, mod + ' not supported; requiring throws');
|
||||
}
|
||||
}
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('core via repl module', { skip: !data.repl }, function (st) {
|
||||
var libs = require('repl')._builtinLibs; // eslint-disable-line no-underscore-dangle
|
||||
if (!libs) {
|
||||
st.skip('repl._builtinLibs does not exist');
|
||||
} else {
|
||||
for (var i = 0; i < libs.length; ++i) {
|
||||
var mod = libs[i];
|
||||
st.ok(data[mod], mod + ' is a core module');
|
||||
st.doesNotThrow(
|
||||
function () { require(mod); }, // eslint-disable-line no-loop-func
|
||||
'requiring ' + mod + ' does not throw'
|
||||
);
|
||||
if (mod.slice(0, 5) !== 'node:') {
|
||||
if (supportsNodePrefix) {
|
||||
st.doesNotThrow(
|
||||
function () { require('node:' + mod); }, // eslint-disable-line no-loop-func
|
||||
'requiring node:' + mod + ' does not throw'
|
||||
);
|
||||
} else {
|
||||
st['throws'](
|
||||
function () { require('node:' + mod); }, // eslint-disable-line no-loop-func
|
||||
'requiring node:' + mod + ' throws'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('core via builtinModules list', { skip: !data.module }, function (st) {
|
||||
var Module = require('module');
|
||||
var libs = Module.builtinModules;
|
||||
if (!libs) {
|
||||
st.skip('module.builtinModules does not exist');
|
||||
} else {
|
||||
var excludeList = [
|
||||
'_debug_agent',
|
||||
'v8/tools/tickprocessor-driver',
|
||||
'v8/tools/SourceMap',
|
||||
'v8/tools/tickprocessor',
|
||||
'v8/tools/profile'
|
||||
];
|
||||
|
||||
// see https://github.com/nodejs/node/issues/42785
|
||||
if (semver.satisfies(process.version, '>= 18')) {
|
||||
libs = libs.concat('node:test');
|
||||
}
|
||||
if (semver.satisfies(process.version, '^20.12 || >= 21.7')) {
|
||||
libs = libs.concat('node:sea');
|
||||
}
|
||||
if (semver.satisfies(process.version, '>= 23.4')) {
|
||||
libs = libs.concat('node:sqlite');
|
||||
}
|
||||
|
||||
for (var i = 0; i < libs.length; ++i) {
|
||||
var mod = libs[i];
|
||||
if (excludeList.indexOf(mod) === -1) {
|
||||
st.ok(data[mod], mod + ' is a core module');
|
||||
|
||||
if (Module.isBuiltin) {
|
||||
st.ok(Module.isBuiltin(mod), 'module.isBuiltin(' + mod + ') is true');
|
||||
}
|
||||
|
||||
st.doesNotThrow(
|
||||
function () { require(mod); }, // eslint-disable-line no-loop-func
|
||||
'requiring ' + mod + ' does not throw'
|
||||
);
|
||||
|
||||
if (process.getBuiltinModule) {
|
||||
st.equal(
|
||||
process.getBuiltinModule(mod),
|
||||
require(mod),
|
||||
'process.getBuiltinModule(' + mod + ') === require(' + mod + ')'
|
||||
);
|
||||
}
|
||||
|
||||
if (mod.slice(0, 5) !== 'node:') {
|
||||
if (supportsNodePrefix) {
|
||||
st.doesNotThrow(
|
||||
function () { require('node:' + mod); }, // eslint-disable-line no-loop-func
|
||||
'requiring node:' + mod + ' does not throw'
|
||||
);
|
||||
} else {
|
||||
st['throws'](
|
||||
function () { require('node:' + mod); }, // eslint-disable-line no-loop-func
|
||||
'requiring node:' + mod + ' throws'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('Object.prototype pollution', function (st) {
|
||||
var nonKey = 'not a core module';
|
||||
st.teardown(mockProperty(Object.prototype, 'fs', { value: false }));
|
||||
st.teardown(mockProperty(Object.prototype, 'path', { value: '>= 999999999' }));
|
||||
st.teardown(mockProperty(Object.prototype, 'http', { value: data.http }));
|
||||
st.teardown(mockProperty(Object.prototype, nonKey, { value: true }));
|
||||
|
||||
st.equal(isCore('fs'), true, 'fs is a core module even if Object.prototype lies');
|
||||
st.equal(isCore('path'), true, 'path is a core module even if Object.prototype lies');
|
||||
st.equal(isCore('http'), true, 'path is a core module even if Object.prototype matches data');
|
||||
st.equal(isCore(nonKey), false, '"' + nonKey + '" is not a core module even if Object.prototype lies');
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
||||
21
frontend/node_modules/path-parse/LICENSE
generated
vendored
Normal file
21
frontend/node_modules/path-parse/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Javier Blanco
|
||||
|
||||
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.
|
||||
42
frontend/node_modules/path-parse/README.md
generated
vendored
Normal file
42
frontend/node_modules/path-parse/README.md
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
# path-parse [](https://travis-ci.org/jbgutierrez/path-parse)
|
||||
|
||||
> Node.js [`path.parse(pathString)`](https://nodejs.org/api/path.html#path_path_parse_pathstring) [ponyfill](https://ponyfill.com).
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save path-parse
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var pathParse = require('path-parse');
|
||||
|
||||
pathParse('/home/user/dir/file.txt');
|
||||
//=> {
|
||||
// root : "/",
|
||||
// dir : "/home/user/dir",
|
||||
// base : "file.txt",
|
||||
// ext : ".txt",
|
||||
// name : "file"
|
||||
// }
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
See [`path.parse(pathString)`](https://nodejs.org/api/path.html#path_path_parse_pathstring) docs.
|
||||
|
||||
### pathParse(path)
|
||||
|
||||
### pathParse.posix(path)
|
||||
|
||||
The Posix specific version.
|
||||
|
||||
### pathParse.win32(path)
|
||||
|
||||
The Windows specific version.
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Javier Blanco](http://jbgutierrez.info)
|
||||
75
frontend/node_modules/path-parse/index.js
generated
vendored
Normal file
75
frontend/node_modules/path-parse/index.js
generated
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
'use strict';
|
||||
|
||||
var isWindows = process.platform === 'win32';
|
||||
|
||||
// Regex to split a windows path into into [dir, root, basename, name, ext]
|
||||
var splitWindowsRe =
|
||||
/^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/;
|
||||
|
||||
var win32 = {};
|
||||
|
||||
function win32SplitPath(filename) {
|
||||
return splitWindowsRe.exec(filename).slice(1);
|
||||
}
|
||||
|
||||
win32.parse = function(pathString) {
|
||||
if (typeof pathString !== 'string') {
|
||||
throw new TypeError(
|
||||
"Parameter 'pathString' must be a string, not " + typeof pathString
|
||||
);
|
||||
}
|
||||
var allParts = win32SplitPath(pathString);
|
||||
if (!allParts || allParts.length !== 5) {
|
||||
throw new TypeError("Invalid path '" + pathString + "'");
|
||||
}
|
||||
return {
|
||||
root: allParts[1],
|
||||
dir: allParts[0] === allParts[1] ? allParts[0] : allParts[0].slice(0, -1),
|
||||
base: allParts[2],
|
||||
ext: allParts[4],
|
||||
name: allParts[3]
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Split a filename into [dir, root, basename, name, ext], unix version
|
||||
// 'root' is just a slash, or nothing.
|
||||
var splitPathRe =
|
||||
/^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/;
|
||||
var posix = {};
|
||||
|
||||
|
||||
function posixSplitPath(filename) {
|
||||
return splitPathRe.exec(filename).slice(1);
|
||||
}
|
||||
|
||||
|
||||
posix.parse = function(pathString) {
|
||||
if (typeof pathString !== 'string') {
|
||||
throw new TypeError(
|
||||
"Parameter 'pathString' must be a string, not " + typeof pathString
|
||||
);
|
||||
}
|
||||
var allParts = posixSplitPath(pathString);
|
||||
if (!allParts || allParts.length !== 5) {
|
||||
throw new TypeError("Invalid path '" + pathString + "'");
|
||||
}
|
||||
|
||||
return {
|
||||
root: allParts[1],
|
||||
dir: allParts[0].slice(0, -1),
|
||||
base: allParts[2],
|
||||
ext: allParts[4],
|
||||
name: allParts[3],
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
if (isWindows)
|
||||
module.exports = win32.parse;
|
||||
else /* posix */
|
||||
module.exports = posix.parse;
|
||||
|
||||
module.exports.posix = posix.parse;
|
||||
module.exports.win32 = win32.parse;
|
||||
33
frontend/node_modules/path-parse/package.json
generated
vendored
Normal file
33
frontend/node_modules/path-parse/package.json
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "path-parse",
|
||||
"version": "1.0.7",
|
||||
"description": "Node.js path.parse() ponyfill",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "node test.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jbgutierrez/path-parse.git"
|
||||
},
|
||||
"keywords": [
|
||||
"path",
|
||||
"paths",
|
||||
"file",
|
||||
"dir",
|
||||
"parse",
|
||||
"built-in",
|
||||
"util",
|
||||
"utils",
|
||||
"core",
|
||||
"ponyfill",
|
||||
"polyfill",
|
||||
"shim"
|
||||
],
|
||||
"author": "Javier Blanco <http://jbgutierrez.info>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jbgutierrez/path-parse/issues"
|
||||
},
|
||||
"homepage": "https://github.com/jbgutierrez/path-parse#readme"
|
||||
}
|
||||
1032
frontend/node_modules/react-router-dom/CHANGELOG.md
generated
vendored
Normal file
1032
frontend/node_modules/react-router-dom/CHANGELOG.md
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
23
frontend/node_modules/react-router-dom/LICENSE.md
generated
vendored
Normal file
23
frontend/node_modules/react-router-dom/LICENSE.md
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) React Training LLC 2015-2019
|
||||
Copyright (c) Remix Software Inc. 2020-2021
|
||||
Copyright (c) Shopify Inc. 2022-2023
|
||||
|
||||
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.
|
||||
5
frontend/node_modules/react-router-dom/README.md
generated
vendored
Normal file
5
frontend/node_modules/react-router-dom/README.md
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# React Router DOM
|
||||
|
||||
The `react-router-dom` package contains bindings for using [React
|
||||
Router](https://github.com/remix-run/react-router) in web applications.
|
||||
Please see [the Getting Started guide](https://reactrouter.com/v6/start/tutorial) for more information on how to get started with React Router.
|
||||
117
frontend/node_modules/react-router-dom/dist/dom.d.ts
generated
vendored
Normal file
117
frontend/node_modules/react-router-dom/dist/dom.d.ts
generated
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
import type { FormEncType, HTMLFormMethod, RelativeRoutingType } from "@remix-run/router";
|
||||
export declare const defaultMethod: HTMLFormMethod;
|
||||
export declare function isHtmlElement(object: any): object is HTMLElement;
|
||||
export declare function isButtonElement(object: any): object is HTMLButtonElement;
|
||||
export declare function isFormElement(object: any): object is HTMLFormElement;
|
||||
export declare function isInputElement(object: any): object is HTMLInputElement;
|
||||
type LimitedMouseEvent = Pick<MouseEvent, "button" | "metaKey" | "altKey" | "ctrlKey" | "shiftKey">;
|
||||
export declare function shouldProcessLinkClick(event: LimitedMouseEvent, target?: string): boolean;
|
||||
export type ParamKeyValuePair = [string, string];
|
||||
export type URLSearchParamsInit = string | ParamKeyValuePair[] | Record<string, string | string[]> | URLSearchParams;
|
||||
/**
|
||||
* Creates a URLSearchParams object using the given initializer.
|
||||
*
|
||||
* This is identical to `new URLSearchParams(init)` except it also
|
||||
* supports arrays as values in the object form of the initializer
|
||||
* instead of just strings. This is convenient when you need multiple
|
||||
* values for a given key, but don't want to use an array initializer.
|
||||
*
|
||||
* For example, instead of:
|
||||
*
|
||||
* let searchParams = new URLSearchParams([
|
||||
* ['sort', 'name'],
|
||||
* ['sort', 'price']
|
||||
* ]);
|
||||
*
|
||||
* you can do:
|
||||
*
|
||||
* let searchParams = createSearchParams({
|
||||
* sort: ['name', 'price']
|
||||
* });
|
||||
*/
|
||||
export declare function createSearchParams(init?: URLSearchParamsInit): URLSearchParams;
|
||||
export declare function getSearchParamsForLocation(locationSearch: string, defaultSearchParams: URLSearchParams | null): URLSearchParams;
|
||||
type JsonObject = {
|
||||
[Key in string]: JsonValue;
|
||||
} & {
|
||||
[Key in string]?: JsonValue | undefined;
|
||||
};
|
||||
type JsonArray = JsonValue[] | readonly JsonValue[];
|
||||
type JsonPrimitive = string | number | boolean | null;
|
||||
type JsonValue = JsonPrimitive | JsonObject | JsonArray;
|
||||
export type SubmitTarget = HTMLFormElement | HTMLButtonElement | HTMLInputElement | FormData | URLSearchParams | JsonValue | null;
|
||||
/**
|
||||
* Submit options shared by both navigations and fetchers
|
||||
*/
|
||||
interface SharedSubmitOptions {
|
||||
/**
|
||||
* The HTTP method used to submit the form. Overrides `<form method>`.
|
||||
* Defaults to "GET".
|
||||
*/
|
||||
method?: HTMLFormMethod;
|
||||
/**
|
||||
* The action URL path used to submit the form. Overrides `<form action>`.
|
||||
* Defaults to the path of the current route.
|
||||
*/
|
||||
action?: string;
|
||||
/**
|
||||
* The encoding used to submit the form. Overrides `<form encType>`.
|
||||
* Defaults to "application/x-www-form-urlencoded".
|
||||
*/
|
||||
encType?: FormEncType;
|
||||
/**
|
||||
* Determines whether the form action is relative to the route hierarchy or
|
||||
* the pathname. Use this if you want to opt out of navigating the route
|
||||
* hierarchy and want to instead route based on /-delimited URL segments
|
||||
*/
|
||||
relative?: RelativeRoutingType;
|
||||
/**
|
||||
* In browser-based environments, prevent resetting scroll after this
|
||||
* navigation when using the <ScrollRestoration> component
|
||||
*/
|
||||
preventScrollReset?: boolean;
|
||||
/**
|
||||
* Enable flushSync for this submission's state updates
|
||||
*/
|
||||
flushSync?: boolean;
|
||||
}
|
||||
/**
|
||||
* Submit options available to fetchers
|
||||
*/
|
||||
export interface FetcherSubmitOptions extends SharedSubmitOptions {
|
||||
}
|
||||
/**
|
||||
* Submit options available to navigations
|
||||
*/
|
||||
export interface SubmitOptions extends FetcherSubmitOptions {
|
||||
/**
|
||||
* Set `true` to replace the current entry in the browser's history stack
|
||||
* instead of creating a new one (i.e. stay on "the same page"). Defaults
|
||||
* to `false`.
|
||||
*/
|
||||
replace?: boolean;
|
||||
/**
|
||||
* State object to add to the history stack entry for this navigation
|
||||
*/
|
||||
state?: any;
|
||||
/**
|
||||
* Indicate a specific fetcherKey to use when using navigate=false
|
||||
*/
|
||||
fetcherKey?: string;
|
||||
/**
|
||||
* navigate=false will use a fetcher instead of a navigation
|
||||
*/
|
||||
navigate?: boolean;
|
||||
/**
|
||||
* Enable view transitions on this submission navigation
|
||||
*/
|
||||
viewTransition?: boolean;
|
||||
}
|
||||
export declare function getFormSubmissionInfo(target: SubmitTarget, basename: string): {
|
||||
action: string | null;
|
||||
method: string;
|
||||
encType: string;
|
||||
formData: FormData | undefined;
|
||||
body: any;
|
||||
};
|
||||
export {};
|
||||
331
frontend/node_modules/react-router-dom/dist/index.d.ts
generated
vendored
Normal file
331
frontend/node_modules/react-router-dom/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,331 @@
|
||||
/**
|
||||
* NOTE: If you refactor this to split up the modules into separate files,
|
||||
* you'll need to update the rollup config for react-router-dom-v5-compat.
|
||||
*/
|
||||
import * as React from "react";
|
||||
import type { FutureConfig, Location, NavigateOptions, RelativeRoutingType, RouteObject, RouterProviderProps, To, DataStrategyFunction, PatchRoutesOnNavigationFunction } from "react-router";
|
||||
import type { Fetcher, FormEncType, FormMethod, FutureConfig as RouterFutureConfig, GetScrollRestorationKeyFunction, History, HTMLFormMethod, HydrationState, Router as RemixRouter, V7_FormMethod, BlockerFunction } from "@remix-run/router";
|
||||
import { UNSAFE_ErrorResponseImpl as ErrorResponseImpl } from "@remix-run/router";
|
||||
import type { SubmitOptions, ParamKeyValuePair, URLSearchParamsInit, SubmitTarget, FetcherSubmitOptions } from "./dom";
|
||||
import { createSearchParams } from "./dom";
|
||||
export type { FormEncType, FormMethod, GetScrollRestorationKeyFunction, ParamKeyValuePair, SubmitOptions, URLSearchParamsInit, V7_FormMethod, };
|
||||
export { createSearchParams, ErrorResponseImpl as UNSAFE_ErrorResponseImpl };
|
||||
export type { ActionFunction, ActionFunctionArgs, AwaitProps, Blocker, BlockerFunction, DataRouteMatch, DataRouteObject, DataStrategyFunction, DataStrategyFunctionArgs, DataStrategyMatch, DataStrategyResult, ErrorResponse, Fetcher, FutureConfig, Hash, IndexRouteObject, IndexRouteProps, JsonFunction, LazyRouteFunction, LayoutRouteProps, LoaderFunction, LoaderFunctionArgs, Location, MemoryRouterProps, NavigateFunction, NavigateOptions, NavigateProps, Navigation, Navigator, NonIndexRouteObject, OutletProps, Params, ParamParseKey, PatchRoutesOnNavigationFunction, PatchRoutesOnNavigationFunctionArgs, Path, PathMatch, Pathname, PathParam, PathPattern, PathRouteProps, RedirectFunction, RelativeRoutingType, RouteMatch, RouteObject, RouteProps, RouterProps, RouterProviderProps, RoutesProps, Search, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, To, UIMatch, } from "react-router";
|
||||
export { AbortedDeferredError, Await, MemoryRouter, Navigate, NavigationType, Outlet, Route, Router, Routes, createMemoryRouter, createPath, createRoutesFromChildren, createRoutesFromElements, defer, isRouteErrorResponse, generatePath, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, replace, renderMatches, resolvePath, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes, } from "react-router";
|
||||
/** @internal */
|
||||
export { UNSAFE_DataRouterContext, UNSAFE_DataRouterStateContext, UNSAFE_NavigationContext, UNSAFE_LocationContext, UNSAFE_RouteContext, UNSAFE_useRouteId, } from "react-router";
|
||||
declare global {
|
||||
var __staticRouterHydrationData: HydrationState | undefined;
|
||||
var __reactRouterVersion: string;
|
||||
interface Document {
|
||||
startViewTransition(cb: () => Promise<void> | void): ViewTransition;
|
||||
}
|
||||
}
|
||||
interface DOMRouterOpts {
|
||||
basename?: string;
|
||||
future?: Partial<Omit<RouterFutureConfig, "v7_prependBasename">>;
|
||||
hydrationData?: HydrationState;
|
||||
dataStrategy?: DataStrategyFunction;
|
||||
patchRoutesOnNavigation?: PatchRoutesOnNavigationFunction;
|
||||
window?: Window;
|
||||
}
|
||||
export declare function createBrowserRouter(routes: RouteObject[], opts?: DOMRouterOpts): RemixRouter;
|
||||
export declare function createHashRouter(routes: RouteObject[], opts?: DOMRouterOpts): RemixRouter;
|
||||
type ViewTransitionContextObject = {
|
||||
isTransitioning: false;
|
||||
} | {
|
||||
isTransitioning: true;
|
||||
flushSync: boolean;
|
||||
currentLocation: Location;
|
||||
nextLocation: Location;
|
||||
};
|
||||
declare const ViewTransitionContext: React.Context<ViewTransitionContextObject>;
|
||||
export { ViewTransitionContext as UNSAFE_ViewTransitionContext };
|
||||
type FetchersContextObject = Map<string, any>;
|
||||
declare const FetchersContext: React.Context<FetchersContextObject>;
|
||||
export { FetchersContext as UNSAFE_FetchersContext };
|
||||
interface ViewTransition {
|
||||
finished: Promise<void>;
|
||||
ready: Promise<void>;
|
||||
updateCallbackDone: Promise<void>;
|
||||
skipTransition(): void;
|
||||
}
|
||||
/**
|
||||
* Given a Remix Router instance, render the appropriate UI
|
||||
*/
|
||||
export declare function RouterProvider({ fallbackElement, router, future, }: RouterProviderProps): React.ReactElement;
|
||||
export interface BrowserRouterProps {
|
||||
basename?: string;
|
||||
children?: React.ReactNode;
|
||||
future?: Partial<FutureConfig>;
|
||||
window?: Window;
|
||||
}
|
||||
/**
|
||||
* A `<Router>` for use in web browsers. Provides the cleanest URLs.
|
||||
*/
|
||||
export declare function BrowserRouter({ basename, children, future, window, }: BrowserRouterProps): React.JSX.Element;
|
||||
export interface HashRouterProps {
|
||||
basename?: string;
|
||||
children?: React.ReactNode;
|
||||
future?: Partial<FutureConfig>;
|
||||
window?: Window;
|
||||
}
|
||||
/**
|
||||
* A `<Router>` for use in web browsers. Stores the location in the hash
|
||||
* portion of the URL so it is not sent to the server.
|
||||
*/
|
||||
export declare function HashRouter({ basename, children, future, window, }: HashRouterProps): React.JSX.Element;
|
||||
export interface HistoryRouterProps {
|
||||
basename?: string;
|
||||
children?: React.ReactNode;
|
||||
future?: FutureConfig;
|
||||
history: History;
|
||||
}
|
||||
/**
|
||||
* A `<Router>` that accepts a pre-instantiated history object. It's important
|
||||
* to note that using your own history object is highly discouraged and may add
|
||||
* two versions of the history library to your bundles unless you use the same
|
||||
* version of the history library that React Router uses internally.
|
||||
*/
|
||||
declare function HistoryRouter({ basename, children, future, history, }: HistoryRouterProps): React.JSX.Element;
|
||||
declare namespace HistoryRouter {
|
||||
var displayName: string;
|
||||
}
|
||||
export { HistoryRouter as unstable_HistoryRouter };
|
||||
export interface LinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "href"> {
|
||||
reloadDocument?: boolean;
|
||||
replace?: boolean;
|
||||
state?: any;
|
||||
preventScrollReset?: boolean;
|
||||
relative?: RelativeRoutingType;
|
||||
to: To;
|
||||
viewTransition?: boolean;
|
||||
}
|
||||
/**
|
||||
* The public API for rendering a history-aware `<a>`.
|
||||
*/
|
||||
export declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
||||
export type NavLinkRenderProps = {
|
||||
isActive: boolean;
|
||||
isPending: boolean;
|
||||
isTransitioning: boolean;
|
||||
};
|
||||
export interface NavLinkProps extends Omit<LinkProps, "className" | "style" | "children"> {
|
||||
children?: React.ReactNode | ((props: NavLinkRenderProps) => React.ReactNode);
|
||||
caseSensitive?: boolean;
|
||||
className?: string | ((props: NavLinkRenderProps) => string | undefined);
|
||||
end?: boolean;
|
||||
style?: React.CSSProperties | ((props: NavLinkRenderProps) => React.CSSProperties | undefined);
|
||||
}
|
||||
/**
|
||||
* A `<Link>` wrapper that knows if it's "active" or not.
|
||||
*/
|
||||
export declare const NavLink: React.ForwardRefExoticComponent<NavLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
||||
/**
|
||||
* Form props shared by navigations and fetchers
|
||||
*/
|
||||
interface SharedFormProps extends React.FormHTMLAttributes<HTMLFormElement> {
|
||||
/**
|
||||
* The HTTP verb to use when the form is submit. Supports "get", "post",
|
||||
* "put", "delete", "patch".
|
||||
*/
|
||||
method?: HTMLFormMethod;
|
||||
/**
|
||||
* `<form encType>` - enhancing beyond the normal string type and limiting
|
||||
* to the built-in browser supported values
|
||||
*/
|
||||
encType?: "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain";
|
||||
/**
|
||||
* Normal `<form action>` but supports React Router's relative paths.
|
||||
*/
|
||||
action?: string;
|
||||
/**
|
||||
* Determines whether the form action is relative to the route hierarchy or
|
||||
* the pathname. Use this if you want to opt out of navigating the route
|
||||
* hierarchy and want to instead route based on /-delimited URL segments
|
||||
*/
|
||||
relative?: RelativeRoutingType;
|
||||
/**
|
||||
* Prevent the scroll position from resetting to the top of the viewport on
|
||||
* completion of the navigation when using the <ScrollRestoration> component
|
||||
*/
|
||||
preventScrollReset?: boolean;
|
||||
/**
|
||||
* A function to call when the form is submitted. If you call
|
||||
* `event.preventDefault()` then this form will not do anything.
|
||||
*/
|
||||
onSubmit?: React.FormEventHandler<HTMLFormElement>;
|
||||
}
|
||||
/**
|
||||
* Form props available to fetchers
|
||||
*/
|
||||
export interface FetcherFormProps extends SharedFormProps {
|
||||
}
|
||||
/**
|
||||
* Form props available to navigations
|
||||
*/
|
||||
export interface FormProps extends SharedFormProps {
|
||||
/**
|
||||
* Indicate a specific fetcherKey to use when using navigate=false
|
||||
*/
|
||||
fetcherKey?: string;
|
||||
/**
|
||||
* navigate=false will use a fetcher instead of a navigation
|
||||
*/
|
||||
navigate?: boolean;
|
||||
/**
|
||||
* Forces a full document navigation instead of a fetch.
|
||||
*/
|
||||
reloadDocument?: boolean;
|
||||
/**
|
||||
* Replaces the current entry in the browser history stack when the form
|
||||
* navigates. Use this if you don't want the user to be able to click "back"
|
||||
* to the page with the form on it.
|
||||
*/
|
||||
replace?: boolean;
|
||||
/**
|
||||
* State object to add to the history stack entry for this navigation
|
||||
*/
|
||||
state?: any;
|
||||
/**
|
||||
* Enable view transitions on this Form navigation
|
||||
*/
|
||||
viewTransition?: boolean;
|
||||
}
|
||||
/**
|
||||
* A `@remix-run/router`-aware `<form>`. It behaves like a normal form except
|
||||
* that the interaction with the server is with `fetch` instead of new document
|
||||
* requests, allowing components to add nicer UX to the page as the form is
|
||||
* submitted and returns with data.
|
||||
*/
|
||||
export declare const Form: React.ForwardRefExoticComponent<FormProps & React.RefAttributes<HTMLFormElement>>;
|
||||
export interface ScrollRestorationProps {
|
||||
getKey?: GetScrollRestorationKeyFunction;
|
||||
storageKey?: string;
|
||||
}
|
||||
/**
|
||||
* This component will emulate the browser's scroll restoration on location
|
||||
* changes.
|
||||
*/
|
||||
export declare function ScrollRestoration({ getKey, storageKey, }: ScrollRestorationProps): null;
|
||||
export declare namespace ScrollRestoration {
|
||||
var displayName: string;
|
||||
}
|
||||
/**
|
||||
* Handles the click behavior for router `<Link>` components. This is useful if
|
||||
* you need to create custom `<Link>` components with the same click behavior we
|
||||
* use in our exported `<Link>`.
|
||||
*/
|
||||
export declare function useLinkClickHandler<E extends Element = HTMLAnchorElement>(to: To, { target, replace: replaceProp, state, preventScrollReset, relative, viewTransition, }?: {
|
||||
target?: React.HTMLAttributeAnchorTarget;
|
||||
replace?: boolean;
|
||||
state?: any;
|
||||
preventScrollReset?: boolean;
|
||||
relative?: RelativeRoutingType;
|
||||
viewTransition?: boolean;
|
||||
}): (event: React.MouseEvent<E, MouseEvent>) => void;
|
||||
/**
|
||||
* A convenient wrapper for reading and writing search parameters via the
|
||||
* URLSearchParams interface.
|
||||
*/
|
||||
export declare function useSearchParams(defaultInit?: URLSearchParamsInit): [URLSearchParams, SetURLSearchParams];
|
||||
export type SetURLSearchParams = (nextInit?: URLSearchParamsInit | ((prev: URLSearchParams) => URLSearchParamsInit), navigateOpts?: NavigateOptions) => void;
|
||||
/**
|
||||
* Submits a HTML `<form>` to the server without reloading the page.
|
||||
*/
|
||||
export interface SubmitFunction {
|
||||
(
|
||||
/**
|
||||
* Specifies the `<form>` to be submitted to the server, a specific
|
||||
* `<button>` or `<input type="submit">` to use to submit the form, or some
|
||||
* arbitrary data to submit.
|
||||
*
|
||||
* Note: When using a `<button>` its `name` and `value` will also be
|
||||
* included in the form data that is submitted.
|
||||
*/
|
||||
target: SubmitTarget,
|
||||
/**
|
||||
* Options that override the `<form>`'s own attributes. Required when
|
||||
* submitting arbitrary data without a backing `<form>`.
|
||||
*/
|
||||
options?: SubmitOptions): void;
|
||||
}
|
||||
/**
|
||||
* Submits a fetcher `<form>` to the server without reloading the page.
|
||||
*/
|
||||
export interface FetcherSubmitFunction {
|
||||
(target: SubmitTarget, options?: FetcherSubmitOptions): void;
|
||||
}
|
||||
/**
|
||||
* Returns a function that may be used to programmatically submit a form (or
|
||||
* some arbitrary data) to the server.
|
||||
*/
|
||||
export declare function useSubmit(): SubmitFunction;
|
||||
export declare function useFormAction(action?: string, { relative }?: {
|
||||
relative?: RelativeRoutingType;
|
||||
}): string;
|
||||
export type FetcherWithComponents<TData> = Fetcher<TData> & {
|
||||
Form: React.ForwardRefExoticComponent<FetcherFormProps & React.RefAttributes<HTMLFormElement>>;
|
||||
submit: FetcherSubmitFunction;
|
||||
load: (href: string, opts?: {
|
||||
flushSync?: boolean;
|
||||
}) => void;
|
||||
};
|
||||
/**
|
||||
* Interacts with route loaders and actions without causing a navigation. Great
|
||||
* for any interaction that stays on the same page.
|
||||
*/
|
||||
export declare function useFetcher<TData = any>({ key, }?: {
|
||||
key?: string;
|
||||
}): FetcherWithComponents<TData>;
|
||||
/**
|
||||
* Provides all fetchers currently on the page. Useful for layouts and parent
|
||||
* routes that need to provide pending/optimistic UI regarding the fetch.
|
||||
*/
|
||||
export declare function useFetchers(): (Fetcher & {
|
||||
key: string;
|
||||
})[];
|
||||
/**
|
||||
* When rendered inside a RouterProvider, will restore scroll positions on navigations
|
||||
*/
|
||||
declare function useScrollRestoration({ getKey, storageKey, }?: {
|
||||
getKey?: GetScrollRestorationKeyFunction;
|
||||
storageKey?: string;
|
||||
}): void;
|
||||
export { useScrollRestoration as UNSAFE_useScrollRestoration };
|
||||
/**
|
||||
* Setup a callback to be fired on the window's `beforeunload` event. This is
|
||||
* useful for saving some data to `window.localStorage` just before the page
|
||||
* refreshes.
|
||||
*
|
||||
* Note: The `callback` argument should be a function created with
|
||||
* `React.useCallback()`.
|
||||
*/
|
||||
export declare function useBeforeUnload(callback: (event: BeforeUnloadEvent) => any, options?: {
|
||||
capture?: boolean;
|
||||
}): void;
|
||||
/**
|
||||
* Wrapper around useBlocker to show a window.confirm prompt to users instead
|
||||
* of building a custom UI with useBlocker.
|
||||
*
|
||||
* Warning: This has *a lot of rough edges* and behaves very differently (and
|
||||
* very incorrectly in some cases) across browsers if user click addition
|
||||
* back/forward navigations while the confirm is open. Use at your own risk.
|
||||
*/
|
||||
declare function usePrompt({ when, message, }: {
|
||||
when: boolean | BlockerFunction;
|
||||
message: string;
|
||||
}): void;
|
||||
export { usePrompt as unstable_usePrompt };
|
||||
/**
|
||||
* Return a boolean indicating if there is an active view transition to the
|
||||
* given href. You can use this value to render CSS classes or viewTransitionName
|
||||
* styles onto your elements
|
||||
*
|
||||
* @param href The destination href
|
||||
* @param [opts.relative] Relative routing type ("route" | "path")
|
||||
*/
|
||||
declare function useViewTransitionState(to: To, opts?: {
|
||||
relative?: RelativeRoutingType;
|
||||
}): boolean;
|
||||
export { useViewTransitionState as useViewTransitionState };
|
||||
1458
frontend/node_modules/react-router-dom/dist/index.js
generated
vendored
Normal file
1458
frontend/node_modules/react-router-dom/dist/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
frontend/node_modules/react-router-dom/dist/index.js.map
generated
vendored
Normal file
1
frontend/node_modules/react-router-dom/dist/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
19
frontend/node_modules/react-router-dom/dist/main.js
generated
vendored
Normal file
19
frontend/node_modules/react-router-dom/dist/main.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* React Router DOM v6.30.3
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
/* eslint-env node */
|
||||
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
module.exports = require("./umd/react-router-dom.production.min.js");
|
||||
} else {
|
||||
module.exports = require("./umd/react-router-dom.development.js");
|
||||
}
|
||||
1526
frontend/node_modules/react-router-dom/dist/react-router-dom.development.js
generated
vendored
Normal file
1526
frontend/node_modules/react-router-dom/dist/react-router-dom.development.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
frontend/node_modules/react-router-dom/dist/react-router-dom.development.js.map
generated
vendored
Normal file
1
frontend/node_modules/react-router-dom/dist/react-router-dom.development.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user