update
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# @babel/helper-module-transforms
|
||||
|
||||
> Babel helper functions for implementing ES6 module transformations
|
||||
|
||||
See our website [@babel/helper-module-transforms](https://babeljs.io/docs/babel-helper-module-transforms) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save @babel/helper-module-transforms
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/helper-module-transforms
|
||||
```
|
||||
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = _classStaticPrivateMethodGet;
|
||||
var _assertClassBrand = require("./assertClassBrand.js");
|
||||
function _classStaticPrivateMethodGet(receiver, classConstructor, method) {
|
||||
(0, _assertClassBrand.default)(classConstructor, receiver);
|
||||
return method;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=classStaticPrivateMethodGet.js.map
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={C:{"52":0.01551,"54":0.00388,"78":0.00388,"101":0.00388,"113":0.00388,"115":0.21329,"122":0.00776,"123":0.01939,"125":0.02327,"127":0.00388,"128":0.0349,"129":0.00388,"130":0.00388,"131":0.00388,"132":0.00388,"133":0.01551,"134":0.02327,"135":0.30248,"136":0.86092,"137":0.00388,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 53 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 102 103 104 105 106 107 108 109 110 111 112 114 116 117 118 119 120 121 124 126 138 139 140 3.5 3.6"},D:{"11":0.00388,"38":0.00388,"39":0.00388,"40":0.00388,"41":0.00388,"42":0.00388,"43":0.00776,"44":0.00388,"45":0.00388,"46":0.00388,"47":0.01163,"48":0.00388,"49":0.02327,"50":0.01163,"51":0.00388,"52":0.00388,"53":0.00388,"54":0.00388,"55":0.00388,"56":0.02715,"57":0.00776,"58":0.08144,"59":0.00776,"60":0.00388,"65":0.01551,"66":0.00388,"68":0.00388,"69":0.00776,"70":0.00388,"72":0.00388,"73":0.01551,"74":0.00388,"75":0.00388,"77":0.00388,"78":0.00388,"79":0.01939,"80":0.00388,"81":0.00776,"83":0.01163,"84":0.00776,"85":0.01163,"86":0.01551,"87":0.03102,"88":0.01163,"89":0.00388,"90":0.00776,"91":0.02715,"92":0.00388,"93":0.00388,"94":0.02715,"95":0.00776,"96":0.00388,"97":0.00388,"98":0.00776,"99":0.00388,"100":0.00776,"101":0.00388,"102":0.05041,"103":0.02715,"104":0.35678,"105":0.00776,"106":0.02715,"107":0.05041,"108":0.03102,"109":2.65643,"110":0.03102,"111":0.01939,"112":0.02715,"113":0.00388,"114":0.01551,"115":0.00388,"116":0.04654,"117":0.00388,"118":0.01551,"119":0.06593,"120":0.01939,"121":0.04266,"122":0.08532,"123":0.02327,"124":0.20553,"125":0.06593,"126":0.09695,"127":0.03102,"128":0.09695,"129":0.04654,"130":0.08144,"131":0.31024,"132":0.3529,"133":6.51116,"134":13.55749,"135":0.01163,"136":0.00388,_:"4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 61 62 63 64 67 71 76 137 138"},F:{"36":0.00388,"40":0.00388,"46":0.00776,"79":0.01939,"82":0.00776,"83":0.00388,"85":0.00388,"87":0.00776,"88":0.00388,"94":0.00388,"95":0.06205,"107":0.00388,"109":0.03878,"112":0.00388,"113":0.00388,"114":0.00776,"116":0.82989,"117":2.6448,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 37 38 39 41 42 43 44 45 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 84 86 89 90 91 92 93 96 97 98 99 100 101 102 103 104 105 106 108 110 111 115 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"14":0.00388,"18":0.00388,"84":0.00388,"89":0.00776,"90":0.00388,"92":0.02327,"100":0.00388,"102":0.00776,"105":0.00388,"106":0.00388,"107":0.00388,"109":0.03102,"114":0.00776,"115":0.00388,"116":0.00388,"121":0.00388,"122":0.01163,"124":0.00388,"125":0.01939,"126":0.00776,"127":0.00388,"128":0.00776,"129":0.01163,"130":0.01163,"131":0.04654,"132":0.0698,"133":1.00052,"134":2.37334,_:"12 13 15 16 17 79 80 81 83 85 86 87 88 91 93 94 95 96 97 98 99 101 103 104 108 110 111 112 113 117 118 119 120 123"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.1 15.2-15.3 15.5 16.2 16.4","13.1":0.00776,"14.1":0.01551,"15.4":0.00776,"15.6":0.05041,"16.0":0.00776,"16.1":0.01163,"16.3":0.00388,"16.5":0.00388,"16.6":0.03102,"17.0":0.00388,"17.1":0.01163,"17.2":0.00388,"17.3":0.01163,"17.4":0.09307,"17.5":0.02327,"17.6":0.08532,"18.0":0.00776,"18.1":0.01939,"18.2":0.02327,"18.3":0.20941,"18.4":0.00776},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00126,"5.0-5.1":0,"6.0-6.1":0.00377,"7.0-7.1":0.00251,"8.1-8.4":0,"9.0-9.2":0.00189,"9.3":0.0088,"10.0-10.2":0.00063,"10.3":0.01446,"11.0-11.2":0.06665,"11.3-11.4":0.0044,"12.0-12.1":0.00251,"12.2-12.5":0.06224,"13.0-13.1":0.00126,"13.2":0.00189,"13.3":0.00251,"13.4-13.7":0.0088,"14.0-14.4":0.02201,"14.5-14.8":0.02641,"15.0-15.1":0.01446,"15.2-15.3":0.01446,"15.4":0.0176,"15.5":0.02012,"15.6-15.8":0.24772,"16.0":0.03521,"16.1":0.0723,"16.2":0.03772,"16.3":0.06539,"16.4":0.01446,"16.5":0.02704,"16.6-16.7":0.29362,"17.0":0.0176,"17.1":0.03144,"17.2":0.02389,"17.3":0.03332,"17.4":0.06665,"17.5":0.14838,"17.6-17.7":0.43068,"18.0":0.12072,"18.1":0.39484,"18.2":0.17667,"18.3":3.69253,"18.4":0.0547},P:{"4":0.08203,"20":0.01025,"21":0.01025,"22":0.04101,"23":0.05127,"24":0.03076,"25":0.03076,"26":0.07177,"27":0.98433,_:"5.0-5.4 8.2 9.2 10.1 11.1-11.2 12.0 15.0 16.0 18.0","6.2-6.4":0.01025,"7.2-7.4":0.26659,"13.0":0.02051,"14.0":0.01025,"17.0":0.03076,"19.0":0.01025},I:{"0":0.07942,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00002,"4.4":0,"4.4.3-4.4.4":0.00009},K:{"0":0.24712,_:"10 11 12 11.1 11.5 12.1"},A:{"8":0.00397,"11":0.15502,_:"6 7 9 10 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.1102},Q:{_:"14.9"},O:{"0":0.12856},H:{"0":0.01},L:{"0":55.34018}};
|
||||
@@ -0,0 +1,254 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
||||
const jsxRuntime = require("react/jsx-runtime");
|
||||
const React = require("react");
|
||||
const invariant = require("tiny-invariant");
|
||||
const warning = require("tiny-warning");
|
||||
const routerCore = require("@tanstack/router-core");
|
||||
const CatchBoundary = require("./CatchBoundary.cjs");
|
||||
const useRouterState = require("./useRouterState.cjs");
|
||||
const useRouter = require("./useRouter.cjs");
|
||||
const notFound = require("./not-found.cjs");
|
||||
const matchContext = require("./matchContext.cjs");
|
||||
const SafeFragment = require("./SafeFragment.cjs");
|
||||
const renderRouteNotFound = require("./renderRouteNotFound.cjs");
|
||||
const scrollRestoration = require("./scroll-restoration.cjs");
|
||||
function _interopNamespaceDefault(e) {
|
||||
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
||||
if (e) {
|
||||
for (const k in e) {
|
||||
if (k !== "default") {
|
||||
const d = Object.getOwnPropertyDescriptor(e, k);
|
||||
Object.defineProperty(n, k, d.get ? d : {
|
||||
enumerable: true,
|
||||
get: () => e[k]
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
n.default = e;
|
||||
return Object.freeze(n);
|
||||
}
|
||||
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
||||
const Match = React__namespace.memo(function MatchImpl({
|
||||
matchId
|
||||
}) {
|
||||
var _a, _b;
|
||||
const router = useRouter.useRouter();
|
||||
const routeId = useRouterState.useRouterState({
|
||||
select: (s) => {
|
||||
var _a2;
|
||||
return (_a2 = s.matches.find((d) => d.id === matchId)) == null ? void 0 : _a2.routeId;
|
||||
}
|
||||
});
|
||||
invariant(
|
||||
routeId,
|
||||
`Could not find routeId for matchId "${matchId}". Please file an issue!`
|
||||
);
|
||||
const route = router.routesById[routeId];
|
||||
const PendingComponent = route.options.pendingComponent ?? router.options.defaultPendingComponent;
|
||||
const pendingElement = PendingComponent ? /* @__PURE__ */ jsxRuntime.jsx(PendingComponent, {}) : null;
|
||||
const routeErrorComponent = route.options.errorComponent ?? router.options.defaultErrorComponent;
|
||||
const routeOnCatch = route.options.onCatch ?? router.options.defaultOnCatch;
|
||||
const routeNotFoundComponent = route.isRoot ? (
|
||||
// If it's the root route, use the globalNotFound option, with fallback to the notFoundRoute's component
|
||||
route.options.notFoundComponent ?? ((_a = router.options.notFoundRoute) == null ? void 0 : _a.options.component)
|
||||
) : route.options.notFoundComponent;
|
||||
const ResolvedSuspenseBoundary = (
|
||||
// If we're on the root route, allow forcefully wrapping in suspense
|
||||
(!route.isRoot || route.options.wrapInSuspense) && (route.options.wrapInSuspense ?? PendingComponent ?? ((_b = route.options.errorComponent) == null ? void 0 : _b.preload)) ? React__namespace.Suspense : SafeFragment.SafeFragment
|
||||
);
|
||||
const ResolvedCatchBoundary = routeErrorComponent ? CatchBoundary.CatchBoundary : SafeFragment.SafeFragment;
|
||||
const ResolvedNotFoundBoundary = routeNotFoundComponent ? notFound.CatchNotFound : SafeFragment.SafeFragment;
|
||||
const resetKey = useRouterState.useRouterState({
|
||||
select: (s) => s.loadedAt
|
||||
});
|
||||
const parentRouteId = useRouterState.useRouterState({
|
||||
select: (s) => {
|
||||
var _a2;
|
||||
const index = s.matches.findIndex((d) => d.id === matchId);
|
||||
return (_a2 = s.matches[index - 1]) == null ? void 0 : _a2.routeId;
|
||||
}
|
||||
});
|
||||
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
||||
/* @__PURE__ */ jsxRuntime.jsx(matchContext.matchContext.Provider, { value: matchId, children: /* @__PURE__ */ jsxRuntime.jsx(ResolvedSuspenseBoundary, { fallback: pendingElement, children: /* @__PURE__ */ jsxRuntime.jsx(
|
||||
ResolvedCatchBoundary,
|
||||
{
|
||||
getResetKey: () => resetKey,
|
||||
errorComponent: routeErrorComponent || CatchBoundary.ErrorComponent,
|
||||
onCatch: (error, errorInfo) => {
|
||||
if (routerCore.isNotFound(error)) throw error;
|
||||
warning(false, `Error in route match: ${matchId}`);
|
||||
routeOnCatch == null ? void 0 : routeOnCatch(error, errorInfo);
|
||||
},
|
||||
children: /* @__PURE__ */ jsxRuntime.jsx(
|
||||
ResolvedNotFoundBoundary,
|
||||
{
|
||||
fallback: (error) => {
|
||||
if (!routeNotFoundComponent || error.routeId && error.routeId !== routeId || !error.routeId && !route.isRoot)
|
||||
throw error;
|
||||
return React__namespace.createElement(routeNotFoundComponent, error);
|
||||
},
|
||||
children: /* @__PURE__ */ jsxRuntime.jsx(MatchInner, { matchId })
|
||||
}
|
||||
)
|
||||
}
|
||||
) }) }),
|
||||
parentRouteId === routerCore.rootRouteId && router.options.scrollRestoration ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
||||
/* @__PURE__ */ jsxRuntime.jsx(OnRendered, {}),
|
||||
/* @__PURE__ */ jsxRuntime.jsx(scrollRestoration.ScrollRestoration, {})
|
||||
] }) : null
|
||||
] });
|
||||
});
|
||||
function OnRendered() {
|
||||
var _a;
|
||||
const router = useRouter.useRouter();
|
||||
const prevLocationRef = React__namespace.useRef(
|
||||
void 0
|
||||
);
|
||||
return /* @__PURE__ */ jsxRuntime.jsx(
|
||||
"script",
|
||||
{
|
||||
suppressHydrationWarning: true,
|
||||
ref: (el) => {
|
||||
var _a2;
|
||||
if (el && (prevLocationRef.current === void 0 || prevLocationRef.current.href !== ((_a2 = router.state.resolvedLocation) == null ? void 0 : _a2.href))) {
|
||||
router.emit({
|
||||
type: "onRendered",
|
||||
...routerCore.getLocationChangeInfo(router.state)
|
||||
});
|
||||
prevLocationRef.current = router.state.resolvedLocation;
|
||||
}
|
||||
}
|
||||
},
|
||||
(_a = router.state.resolvedLocation) == null ? void 0 : _a.state.key
|
||||
);
|
||||
}
|
||||
const MatchInner = React__namespace.memo(function MatchInnerImpl({
|
||||
matchId
|
||||
}) {
|
||||
var _a, _b, _c;
|
||||
const router = useRouter.useRouter();
|
||||
const { match, key, routeId } = useRouterState.useRouterState({
|
||||
select: (s) => {
|
||||
const matchIndex = s.matches.findIndex((d) => d.id === matchId);
|
||||
const match2 = s.matches[matchIndex];
|
||||
const routeId2 = match2.routeId;
|
||||
const remountFn = router.routesById[routeId2].options.remountDeps ?? router.options.defaultRemountDeps;
|
||||
const remountDeps = remountFn == null ? void 0 : remountFn({
|
||||
routeId: routeId2,
|
||||
loaderDeps: match2.loaderDeps,
|
||||
params: match2._strictParams,
|
||||
search: match2._strictSearch
|
||||
});
|
||||
const key2 = remountDeps ? JSON.stringify(remountDeps) : void 0;
|
||||
return {
|
||||
key: key2,
|
||||
routeId: routeId2,
|
||||
match: routerCore.pick(match2, ["id", "status", "error"])
|
||||
};
|
||||
},
|
||||
structuralSharing: true
|
||||
});
|
||||
const route = router.routesById[routeId];
|
||||
const out = React__namespace.useMemo(() => {
|
||||
const Comp = route.options.component ?? router.options.defaultComponent;
|
||||
if (Comp) {
|
||||
return /* @__PURE__ */ jsxRuntime.jsx(Comp, {}, key);
|
||||
}
|
||||
return /* @__PURE__ */ jsxRuntime.jsx(Outlet, {});
|
||||
}, [key, route.options.component, router.options.defaultComponent]);
|
||||
const RouteErrorComponent = (route.options.errorComponent ?? router.options.defaultErrorComponent) || CatchBoundary.ErrorComponent;
|
||||
if (match.status === "notFound") {
|
||||
invariant(routerCore.isNotFound(match.error), "Expected a notFound error");
|
||||
return renderRouteNotFound.renderRouteNotFound(router, route, match.error);
|
||||
}
|
||||
if (match.status === "redirected") {
|
||||
invariant(routerCore.isRedirect(match.error), "Expected a redirect error");
|
||||
throw (_a = router.getMatch(match.id)) == null ? void 0 : _a.loadPromise;
|
||||
}
|
||||
if (match.status === "error") {
|
||||
if (router.isServer) {
|
||||
return /* @__PURE__ */ jsxRuntime.jsx(
|
||||
RouteErrorComponent,
|
||||
{
|
||||
error: match.error,
|
||||
reset: void 0,
|
||||
info: {
|
||||
componentStack: ""
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
throw match.error;
|
||||
}
|
||||
if (match.status === "pending") {
|
||||
const pendingMinMs = route.options.pendingMinMs ?? router.options.defaultPendingMinMs;
|
||||
if (pendingMinMs && !((_b = router.getMatch(match.id)) == null ? void 0 : _b.minPendingPromise)) {
|
||||
if (!router.isServer) {
|
||||
const minPendingPromise = routerCore.createControlledPromise();
|
||||
Promise.resolve().then(() => {
|
||||
router.updateMatch(match.id, (prev) => ({
|
||||
...prev,
|
||||
minPendingPromise
|
||||
}));
|
||||
});
|
||||
setTimeout(() => {
|
||||
minPendingPromise.resolve();
|
||||
router.updateMatch(match.id, (prev) => ({
|
||||
...prev,
|
||||
minPendingPromise: void 0
|
||||
}));
|
||||
}, pendingMinMs);
|
||||
}
|
||||
}
|
||||
throw (_c = router.getMatch(match.id)) == null ? void 0 : _c.loadPromise;
|
||||
}
|
||||
return out;
|
||||
});
|
||||
const Outlet = React__namespace.memo(function OutletImpl() {
|
||||
const router = useRouter.useRouter();
|
||||
const matchId = React__namespace.useContext(matchContext.matchContext);
|
||||
const routeId = useRouterState.useRouterState({
|
||||
select: (s) => {
|
||||
var _a;
|
||||
return (_a = s.matches.find((d) => d.id === matchId)) == null ? void 0 : _a.routeId;
|
||||
}
|
||||
});
|
||||
const route = router.routesById[routeId];
|
||||
const parentGlobalNotFound = useRouterState.useRouterState({
|
||||
select: (s) => {
|
||||
const matches = s.matches;
|
||||
const parentMatch = matches.find((d) => d.id === matchId);
|
||||
invariant(
|
||||
parentMatch,
|
||||
`Could not find parent match for matchId "${matchId}"`
|
||||
);
|
||||
return parentMatch.globalNotFound;
|
||||
}
|
||||
});
|
||||
const childMatchId = useRouterState.useRouterState({
|
||||
select: (s) => {
|
||||
var _a;
|
||||
const matches = s.matches;
|
||||
const index = matches.findIndex((d) => d.id === matchId);
|
||||
return (_a = matches[index + 1]) == null ? void 0 : _a.id;
|
||||
}
|
||||
});
|
||||
if (parentGlobalNotFound) {
|
||||
return renderRouteNotFound.renderRouteNotFound(router, route, void 0);
|
||||
}
|
||||
if (!childMatchId) {
|
||||
return null;
|
||||
}
|
||||
const nextMatch = /* @__PURE__ */ jsxRuntime.jsx(Match, { matchId: childMatchId });
|
||||
const pendingElement = router.options.defaultPendingComponent ? /* @__PURE__ */ jsxRuntime.jsx(router.options.defaultPendingComponent, {}) : null;
|
||||
if (matchId === routerCore.rootRouteId) {
|
||||
return /* @__PURE__ */ jsxRuntime.jsx(React__namespace.Suspense, { fallback: pendingElement, children: nextMatch });
|
||||
}
|
||||
return nextMatch;
|
||||
});
|
||||
exports.Match = Match;
|
||||
exports.MatchInner = MatchInner;
|
||||
exports.Outlet = Outlet;
|
||||
//# sourceMappingURL=Match.cjs.map
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"name": "debug",
|
||||
"version": "4.4.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/debug-js/debug.git"
|
||||
},
|
||||
"description": "Lightweight debugging utility for Node.js and the browser",
|
||||
"keywords": [
|
||||
"debug",
|
||||
"log",
|
||||
"debugger"
|
||||
],
|
||||
"files": [
|
||||
"src",
|
||||
"LICENSE",
|
||||
"README.md"
|
||||
],
|
||||
"author": "Josh Junon (https://github.com/qix-)",
|
||||
"contributors": [
|
||||
"TJ Holowaychuk <tj@vision-media.ca>",
|
||||
"Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
|
||||
"Andrew Rhyne <rhyneandrew@gmail.com>"
|
||||
],
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"lint": "xo",
|
||||
"test": "npm run test:node && npm run test:browser && npm run lint",
|
||||
"test:node": "istanbul cover _mocha -- test.js test.node.js",
|
||||
"test:browser": "karma start --single-run",
|
||||
"test:coverage": "cat ./coverage/lcov.info | coveralls"
|
||||
},
|
||||
"dependencies": {
|
||||
"ms": "^2.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"brfs": "^2.0.1",
|
||||
"browserify": "^16.2.3",
|
||||
"coveralls": "^3.0.2",
|
||||
"istanbul": "^0.4.5",
|
||||
"karma": "^3.1.4",
|
||||
"karma-browserify": "^6.0.0",
|
||||
"karma-chrome-launcher": "^2.2.0",
|
||||
"karma-mocha": "^1.3.0",
|
||||
"mocha": "^5.2.0",
|
||||
"mocha-lcov-reporter": "^1.2.0",
|
||||
"sinon": "^14.0.0",
|
||||
"xo": "^0.23.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"supports-color": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"main": "./src/index.js",
|
||||
"browser": "./src/browser.js",
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
},
|
||||
"xo": {
|
||||
"rules": {
|
||||
"import/extensions": "off"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
@license
|
||||
Rollup.js v4.39.0
|
||||
Wed, 02 Apr 2025 04:49:00 GMT - commit 5c001245779063abac3899aa9d25294ab003581b
|
||||
|
||||
https://github.com/rollup/rollup
|
||||
|
||||
Released under the MIT License.
|
||||
*/
|
||||
import '../native.js';
|
||||
export { parseAst, parseAstAsync } from './shared/parseAst.js';
|
||||
import 'node:path';
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ScriptOnce.cjs","sources":["../../src/ScriptOnce.tsx"],"sourcesContent":["import jsesc from 'jsesc'\n\nexport function ScriptOnce({\n children,\n log,\n}: {\n children: string\n log?: boolean\n sync?: boolean\n}) {\n if (typeof document !== 'undefined') {\n return null\n }\n\n return (\n <script\n className=\"tsr-once\"\n dangerouslySetInnerHTML={{\n __html: [\n children,\n (log ?? true) && process.env.NODE_ENV === 'development'\n ? `console.info(\\`Injected From Server:\n${jsesc(children.toString(), { quotes: 'backtick' })}\\`)`\n : '',\n 'if (typeof __TSR_SSR__ !== \"undefined\") __TSR_SSR__.cleanScripts()',\n ]\n .filter(Boolean)\n .join('\\n'),\n }}\n />\n )\n}\n"],"names":["jsx"],"mappings":";;;;AAEO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AACF,GAIG;AACG,MAAA,OAAO,aAAa,aAAa;AAC5B,WAAA;AAAA,EAAA;AAIP,SAAAA,2BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,yBAAyB;AAAA,QACvB,QAAQ;AAAA,UACN;AAAA,WACC,OAAO,SAAS,QAAQ,IAAI,aAAa,gBACtC;AAAA,EACZ,MAAM,SAAS,YAAY,EAAE,QAAQ,WAAY,CAAA,CAAC,QACtC;AAAA,UACJ;AAAA,QAEC,EAAA,OAAO,OAAO,EACd,KAAK,IAAI;AAAA,MAAA;AAAA,IACd;AAAA,EACF;AAEJ;;"}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"set-array.umd.js","sources":["../src/set-array.ts"],"sourcesContent":["type Key = string | number | symbol;\n\n/**\n * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the\n * index of the `key` in the backing array.\n *\n * This is designed to allow synchronizing a second array with the contents of the backing array,\n * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`,\n * and there are never duplicates.\n */\nexport class SetArray<T extends Key = Key> {\n private declare _indexes: Record<T, number | undefined>;\n declare array: readonly T[];\n\n constructor() {\n this._indexes = { __proto__: null } as any;\n this.array = [];\n }\n}\n\ninterface PublicSet<T extends Key> {\n array: T[];\n _indexes: SetArray<T>['_indexes'];\n}\n\n/**\n * Typescript doesn't allow friend access to private fields, so this just casts the set into a type\n * with public access modifiers.\n */\nfunction cast<T extends Key>(set: SetArray<T>): PublicSet<T> {\n return set as any;\n}\n\n/**\n * Gets the index associated with `key` in the backing array, if it is already present.\n */\nexport function get<T extends Key>(setarr: SetArray<T>, key: T): number | undefined {\n return cast(setarr)._indexes[key];\n}\n\n/**\n * Puts `key` into the backing array, if it is not already present. Returns\n * the index of the `key` in the backing array.\n */\nexport function put<T extends Key>(setarr: SetArray<T>, key: T): number {\n // The key may or may not be present. If it is present, it's a number.\n const index = get(setarr, key);\n if (index !== undefined) return index;\n\n const { array, _indexes: indexes } = cast(setarr);\n\n const length = array.push(key);\n return (indexes[key] = length - 1);\n}\n\n/**\n * Pops the last added item out of the SetArray.\n */\nexport function pop<T extends Key>(setarr: SetArray<T>): void {\n const { array, _indexes: indexes } = cast(setarr);\n if (array.length === 0) return;\n\n const last = array.pop()!;\n indexes[last] = undefined;\n}\n\n/**\n * Removes the key, if it exists in the set.\n */\nexport function remove<T extends Key>(setarr: SetArray<T>, key: T): void {\n const index = get(setarr, key);\n if (index === undefined) return;\n\n const { array, _indexes: indexes } = cast(setarr);\n for (let i = index + 1; i < array.length; i++) {\n const k = array[i];\n array[i - 1] = k;\n indexes[k]!--;\n }\n indexes[key] = undefined;\n array.pop();\n}\n"],"names":[],"mappings":";;;;;;IAEA;;;;;;;;UAQa,QAAQ;QAInB;YACE,IAAI,CAAC,QAAQ,GAAG,EAAE,SAAS,EAAE,IAAI,EAAS,CAAC;YAC3C,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;SACjB;KACF;IAOD;;;;IAIA,SAAS,IAAI,CAAgB,GAAgB;QAC3C,OAAO,GAAU,CAAC;IACpB,CAAC;IAED;;;aAGgB,GAAG,CAAgB,MAAmB,EAAE,GAAM;QAC5D,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IACpC,CAAC;IAED;;;;aAIgB,GAAG,CAAgB,MAAmB,EAAE,GAAM;;QAE5D,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC/B,IAAI,KAAK,KAAK,SAAS;YAAE,OAAO,KAAK,CAAC;QAEtC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;QAElD,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/B,QAAQ,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,CAAC,EAAE;IACrC,CAAC;IAED;;;aAGgB,GAAG,CAAgB,MAAmB;QACpD,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;QAClD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO;QAE/B,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,EAAG,CAAC;QAC1B,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;IAC5B,CAAC;IAED;;;aAGgB,MAAM,CAAgB,MAAmB,EAAE,GAAM;QAC/D,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC/B,IAAI,KAAK,KAAK,SAAS;YAAE,OAAO;QAEhC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;QAClD,KAAK,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC7C,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACnB,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;YACjB,OAAO,CAAC,CAAC,CAAE,EAAE,CAAC;SACf;QACD,OAAO,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;QACzB,KAAK,CAAC,GAAG,EAAE,CAAC;IACd;;;;;;;;;;;;;;"}
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -0,0 +1,12 @@
|
||||
import { ErrorRouteComponent } from './route.js';
|
||||
import { ErrorInfo } from 'react';
|
||||
import * as React from 'react';
|
||||
export declare function CatchBoundary(props: {
|
||||
getResetKey: () => number | string;
|
||||
children: React.ReactNode;
|
||||
errorComponent?: ErrorRouteComponent;
|
||||
onCatch?: (error: Error, errorInfo: ErrorInfo) => void;
|
||||
}): import("react/jsx-runtime").JSX.Element;
|
||||
export declare function ErrorComponent({ error }: {
|
||||
error: any;
|
||||
}): import("react/jsx-runtime").JSX.Element;
|
||||
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _buildMatchMemberExpression = require("../buildMatchMemberExpression.js");
|
||||
const isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component");
|
||||
var _default = exports.default = isReactComponent;
|
||||
|
||||
//# sourceMappingURL=isReactComponent.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"useLocation.js","sources":["../../src/useLocation.tsx"],"sourcesContent":["import { useRouterState } from './useRouterState'\nimport type {\n StructuralSharingOption,\n ValidateSelected,\n} from './structuralSharing'\nimport type {\n AnyRouter,\n RegisteredRouter,\n RouterState,\n} from '@tanstack/router-core'\n\nexport interface UseLocationBaseOptions<\n TRouter extends AnyRouter,\n TSelected,\n TStructuralSharing extends boolean = boolean,\n> {\n select?: (\n state: RouterState<TRouter['routeTree']>['location'],\n ) => ValidateSelected<TRouter, TSelected, TStructuralSharing>\n}\n\nexport type UseLocationResult<\n TRouter extends AnyRouter,\n TSelected,\n> = unknown extends TSelected\n ? RouterState<TRouter['routeTree']>['location']\n : TSelected\n\nexport function useLocation<\n TRouter extends AnyRouter = RegisteredRouter,\n TSelected = unknown,\n TStructuralSharing extends boolean = boolean,\n>(\n opts?: UseLocationBaseOptions<TRouter, TSelected, TStructuralSharing> &\n StructuralSharingOption<TRouter, TSelected, TStructuralSharing>,\n): UseLocationResult<TRouter, TSelected> {\n return useRouterState({\n select: (state: any) =>\n opts?.select ? opts.select(state.location) : state.location,\n } as any) as UseLocationResult<TRouter, TSelected>\n}\n"],"names":[],"mappings":";AA4BO,SAAS,YAKd,MAEuC;AACvC,SAAO,eAAe;AAAA,IACpB,QAAQ,CAAC,WACP,6BAAM,UAAS,KAAK,OAAO,MAAM,QAAQ,IAAI,MAAM;AAAA,EAAA,CAC/C;AACV;"}
|
||||
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
Like `chown -R`.
|
||||
|
||||
Takes the same arguments as `fs.chown()`
|
||||
@@ -0,0 +1,145 @@
|
||||
import * as React from "react";
|
||||
import { useRouter } from "./useRouter.js";
|
||||
function _resolveBlockerOpts(opts, condition) {
|
||||
if (opts === void 0) {
|
||||
return {
|
||||
shouldBlockFn: () => true,
|
||||
withResolver: false
|
||||
};
|
||||
}
|
||||
if ("shouldBlockFn" in opts) {
|
||||
return opts;
|
||||
}
|
||||
if (typeof opts === "function") {
|
||||
const shouldBlock2 = Boolean(condition ?? true);
|
||||
const _customBlockerFn2 = async () => {
|
||||
if (shouldBlock2) return await opts();
|
||||
return false;
|
||||
};
|
||||
return {
|
||||
shouldBlockFn: _customBlockerFn2,
|
||||
enableBeforeUnload: shouldBlock2,
|
||||
withResolver: false
|
||||
};
|
||||
}
|
||||
const shouldBlock = Boolean(opts.condition ?? true);
|
||||
const fn = opts.blockerFn;
|
||||
const _customBlockerFn = async () => {
|
||||
if (shouldBlock && fn !== void 0) {
|
||||
return await fn();
|
||||
}
|
||||
return shouldBlock;
|
||||
};
|
||||
return {
|
||||
shouldBlockFn: _customBlockerFn,
|
||||
enableBeforeUnload: shouldBlock,
|
||||
withResolver: fn === void 0
|
||||
};
|
||||
}
|
||||
function useBlocker(opts, condition) {
|
||||
const {
|
||||
shouldBlockFn,
|
||||
enableBeforeUnload = true,
|
||||
disabled = false,
|
||||
withResolver = false
|
||||
} = _resolveBlockerOpts(opts, condition);
|
||||
const router = useRouter();
|
||||
const { history } = router;
|
||||
const [resolver, setResolver] = React.useState({
|
||||
status: "idle",
|
||||
current: void 0,
|
||||
next: void 0,
|
||||
action: void 0,
|
||||
proceed: void 0,
|
||||
reset: void 0
|
||||
});
|
||||
React.useEffect(() => {
|
||||
const blockerFnComposed = async (blockerFnArgs) => {
|
||||
function getLocation(location) {
|
||||
const parsedLocation = router.parseLocation(void 0, location);
|
||||
const matchedRoutes = router.getMatchedRoutes(parsedLocation);
|
||||
if (matchedRoutes.foundRoute === void 0) {
|
||||
throw new Error(`No route found for location ${location.href}`);
|
||||
}
|
||||
return {
|
||||
routeId: matchedRoutes.foundRoute.id,
|
||||
fullPath: matchedRoutes.foundRoute.fullPath,
|
||||
pathname: parsedLocation.pathname,
|
||||
params: matchedRoutes.routeParams,
|
||||
search: parsedLocation.search
|
||||
};
|
||||
}
|
||||
const current = getLocation(blockerFnArgs.currentLocation);
|
||||
const next = getLocation(blockerFnArgs.nextLocation);
|
||||
const shouldBlock = await shouldBlockFn({
|
||||
action: blockerFnArgs.action,
|
||||
current,
|
||||
next
|
||||
});
|
||||
if (!withResolver) {
|
||||
return shouldBlock;
|
||||
}
|
||||
if (!shouldBlock) {
|
||||
return false;
|
||||
}
|
||||
const promise = new Promise((resolve) => {
|
||||
setResolver({
|
||||
status: "blocked",
|
||||
current,
|
||||
next,
|
||||
action: blockerFnArgs.action,
|
||||
proceed: () => resolve(false),
|
||||
reset: () => resolve(true)
|
||||
});
|
||||
});
|
||||
const canNavigateAsync = await promise;
|
||||
setResolver({
|
||||
status: "idle",
|
||||
current: void 0,
|
||||
next: void 0,
|
||||
action: void 0,
|
||||
proceed: void 0,
|
||||
reset: void 0
|
||||
});
|
||||
return canNavigateAsync;
|
||||
};
|
||||
return disabled ? void 0 : history.block({ blockerFn: blockerFnComposed, enableBeforeUnload });
|
||||
}, [
|
||||
shouldBlockFn,
|
||||
enableBeforeUnload,
|
||||
disabled,
|
||||
withResolver,
|
||||
history,
|
||||
router
|
||||
]);
|
||||
return resolver;
|
||||
}
|
||||
const _resolvePromptBlockerArgs = (props) => {
|
||||
if ("shouldBlockFn" in props) {
|
||||
return { ...props };
|
||||
}
|
||||
const shouldBlock = Boolean(props.condition ?? true);
|
||||
const fn = props.blockerFn;
|
||||
const _customBlockerFn = async () => {
|
||||
if (shouldBlock && fn !== void 0) {
|
||||
return await fn();
|
||||
}
|
||||
return shouldBlock;
|
||||
};
|
||||
return {
|
||||
shouldBlockFn: _customBlockerFn,
|
||||
enableBeforeUnload: shouldBlock,
|
||||
withResolver: fn === void 0
|
||||
};
|
||||
};
|
||||
function Block(opts) {
|
||||
const { children, ...rest } = opts;
|
||||
const args = _resolvePromptBlockerArgs(rest);
|
||||
const resolver = useBlocker(args);
|
||||
return children ? typeof children === "function" ? children(resolver) : children : null;
|
||||
}
|
||||
export {
|
||||
Block,
|
||||
useBlocker
|
||||
};
|
||||
//# sourceMappingURL=useBlocker.js.map
|
||||
@@ -0,0 +1,2 @@
|
||||
// Todo (Babel 8): remove this file as Babel 8 drop support of core-js 2
|
||||
module.exports = require("./data/corejs2-built-ins.json");
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.78182 2.63903C8.58882 2.28803 8.25782 2.25003 8.12482 2.25003C7.99019 2.24847 7.85771 2.28393 7.74185 2.35253C7.62599 2.42113 7.5312 2.52023 7.46782 2.63903L1.97082 12.639C1.90673 12.7528 1.87406 12.8816 1.87617 13.0122C1.87828 13.1427 1.91509 13.2704 1.98282 13.382C2.04798 13.4951 2.14207 13.5888 2.25543 13.6535C2.36879 13.7182 2.49732 13.7515 2.62782 13.75H13.6218C13.7523 13.7515 13.8809 13.7182 13.9942 13.6535C14.1076 13.5888 14.2017 13.4951 14.2668 13.382C14.3346 13.2704 14.3714 13.1427 14.3735 13.0122C14.3756 12.8816 14.3429 12.7528 14.2788 12.639L8.78182 2.63903ZM6.37282 2.03703C6.75182 1.34603 7.43882 1.00003 8.12482 1.00003C8.48341 0.997985 8.83583 1.09326 9.14454 1.2757C9.45325 1.45814 9.70668 1.72092 9.87782 2.03603L15.3748 12.036C16.1078 13.369 15.1438 15 13.6228 15H2.62782C1.10682 15 0.141823 13.37 0.875823 12.037L6.37282 2.03703ZM8.74982 9.06203C8.74982 9.22779 8.68397 9.38676 8.56676 9.50397C8.44955 9.62118 8.29058 9.68703 8.12482 9.68703C7.95906 9.68703 7.80009 9.62118 7.68288 9.50397C7.56566 9.38676 7.49982 9.22779 7.49982 9.06203V5.62503C7.49982 5.45927 7.56566 5.3003 7.68288 5.18309C7.80009 5.06588 7.95906 5.00003 8.12482 5.00003C8.29058 5.00003 8.44955 5.06588 8.56676 5.18309C8.68397 5.3003 8.74982 5.45927 8.74982 5.62503V9.06203ZM7.74982 12L7.49982 11.75V11L7.74982 10.75H8.49982L8.74982 11V11.75L8.49982 12H7.74982Z" fill="black"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"K D E F A B mC"},B:{"1":"NB OB I","2":"0 9 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB FB GB HB IB","322":"JB KB LB MB"},C:{"2":"0 1 2 3 4 5 6 7 8 9 nC LC J PB K D E F A B C L M G N O P QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB MC wB NC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC Q H R OC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I PC EC QC RC oC pC qC rC"},D:{"1":"OB I PC EC QC RC","2":"0 1 2 3 4 5 6 7 8 9 J PB K D E F A B C L M G N O P QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB MC wB NC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB FB GB HB IB","322":"JB KB LB MB NB"},E:{"1":"hC iC jC 3C","2":"J PB K D E F A B C L M G sC SC tC uC vC wC TC FC GC xC yC zC UC VC HC 0C IC WC XC YC","194":"ZC aC 1C JC bC cC dC eC fC 2C KC gC"},F:{"2":"1 2 3 4 5 6 7 8 F B C G N O P QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC Q H R OC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 4C 5C 6C 7C FC kC 8C GC","322":"0"},G:{"1":"hC iC jC","2":"E SC 9C lC AD BD CD DD ED FD GD HD ID JD KD LD MD ND OD PD QD RD SD UC VC HC TD IC WC XC YC","194":"ZC aC UD JC bC cC dC eC fC VD KC gC"},H:{"2":"WD"},I:{"1":"I","2":"LC J XD YD ZD aD lC bD cD"},J:{"2":"D A"},K:{"2":"A B C H FC kC GC"},L:{"1":"I"},M:{"2":"EC"},N:{"2":"A B"},O:{"2":"HC"},P:{"2":"1 2 3 4 5 6 7 8 J dD eD fD gD hD TC iD jD kD lD mD IC JC KC nD"},Q:{"2":"oD"},R:{"2":"pD"},S:{"2":"qD rD"}},B:5,C:"CSS Text Box",D:true};
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
MIT License http://www.opensource.org/licenses/mit-license.php
|
||||
Author Tobias Koppers @sokra
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
/** @typedef {import("./Resolver")} Resolver */
|
||||
/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */
|
||||
/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */
|
||||
|
||||
module.exports = class ModulesInRootPlugin {
|
||||
/**
|
||||
* @param {string | ResolveStepHook} source source
|
||||
* @param {string} path path
|
||||
* @param {string | ResolveStepHook} target target
|
||||
*/
|
||||
constructor(source, path, target) {
|
||||
this.source = source;
|
||||
this.path = path;
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Resolver} resolver the resolver
|
||||
* @returns {void}
|
||||
*/
|
||||
apply(resolver) {
|
||||
const target = resolver.ensureHook(this.target);
|
||||
resolver
|
||||
.getHook(this.source)
|
||||
.tapAsync("ModulesInRootPlugin", (request, resolveContext, callback) => {
|
||||
/** @type {ResolveRequest} */
|
||||
const obj = {
|
||||
...request,
|
||||
path: this.path,
|
||||
request: "./" + request.request,
|
||||
module: false
|
||||
};
|
||||
resolver.doResolve(
|
||||
target,
|
||||
obj,
|
||||
"looking for modules in " + this.path,
|
||||
resolveContext,
|
||||
callback
|
||||
);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,22 @@
|
||||
export type Config = import("eslint").Linter.Config;
|
||||
export type LegacyConfig = import("eslint").Linter.LegacyConfig;
|
||||
export type Plugin = import("eslint").ESLint.Plugin;
|
||||
export type RuleEntry = import("eslint").Linter.RuleEntry;
|
||||
export type ExtendsElement = import("./types.cts").ExtendsElement;
|
||||
export type SimpleExtendsElement = import("./types.cts").SimpleExtendsElement;
|
||||
export type ConfigWithExtends = import("./types.cts").ConfigWithExtends;
|
||||
export type InfiniteConfigArray = import("./types.cts").InfiniteArray<Config>;
|
||||
export type ConfigWithExtendsArray = import("./types.cts").ConfigWithExtendsArray;
|
||||
/**
|
||||
* Helper function to define a config array.
|
||||
* @param {ConfigWithExtendsArray} args The arguments to the function.
|
||||
* @returns {Config[]} The config array.
|
||||
*/
|
||||
export function defineConfig(...args: ConfigWithExtendsArray): Config[];
|
||||
/**
|
||||
* Creates a global ignores config with the given patterns.
|
||||
* @param {string[]} ignorePatterns The ignore patterns.
|
||||
* @param {string} [name] The name of the global ignores config.
|
||||
* @returns {Config} The global ignores config.
|
||||
*/
|
||||
export function globalIgnores(ignorePatterns: string[], name?: string): Config;
|
||||
Reference in New Issue
Block a user