unplugin-vue-router
Advanced tools
Comparing version
import * as esbuild from 'esbuild'; | ||
import { R as ResolvedOptions } from './options-19865e19.js'; | ||
import { R as ResolvedOptions } from './options-589a6004.js'; | ||
import 'vue-router'; | ||
@@ -4,0 +4,0 @@ |
@@ -310,2 +310,13 @@ var __create = Object.create; | ||
} | ||
get params() { | ||
const params = this.value.isParam() ? [...this.value.params] : []; | ||
let node = this.parent; | ||
while (node) { | ||
if (node.value.isParam()) { | ||
params.unshift(...node.value.params); | ||
} | ||
node = node.parent; | ||
} | ||
return params; | ||
} | ||
isRoot() { | ||
@@ -349,3 +360,4 @@ return this.value.path === "/" && !this.value.filePaths.size; | ||
function generateRouteParams(node, isRaw) { | ||
return node.value.isParam() ? `{ ${node.value.params.map((param) => `${param.paramName}${param.optional ? "?" : ""}: ` + (param.modifier === "+" ? `ParamValueOneOrMore<${isRaw}>` : param.modifier === "*" ? `ParamValueZeroOrMore<${isRaw}>` : param.modifier === "?" ? `ParamValueZeroOrOne<${isRaw}>` : `ParamValue<${isRaw}>`)).join(", ")} }` : "Record<never, never>"; | ||
const nodeParams = node.params; | ||
return node.params.length > 0 ? `{ ${node.params.map((param) => `${param.paramName}${param.optional ? "?" : ""}: ` + (param.modifier === "+" ? `ParamValueOneOrMore<${isRaw}>` : param.modifier === "*" ? `ParamValueZeroOrMore<${isRaw}>` : param.modifier === "?" ? `ParamValueZeroOrOne<${isRaw}>` : `ParamValue<${isRaw}>`)).join(", ")} }` : "Record<never, never>"; | ||
} | ||
@@ -352,0 +364,0 @@ |
import * as unplugin from 'unplugin'; | ||
import { R as ResolvedOptions, S as ServerContext, T as TreeLeaf } from './options-19865e19.js'; | ||
export { T as TreeLeaf, c as createPrefixTree } from './options-19865e19.js'; | ||
import { R as ResolvedOptions, S as ServerContext, T as TreeLeaf } from './options-589a6004.js'; | ||
export { T as TreeLeaf, c as createPrefixTree } from './options-589a6004.js'; | ||
import { RouteParamsRaw, RouteParams, RouteMeta, RouteLocationNormalized, RouteRecordName, RouteLocationNormalizedLoaded, RouteQueryAndHash, RouteLocationOptions, RouteLocation, NavigationGuardNext, NavigationFailure, Router, RouterLinkProps as RouterLinkProps$1 } from 'vue-router'; | ||
@@ -5,0 +5,0 @@ import { Ref, AllowedComponentProps, ComponentCustomProps, VNodeProps, VNode } from 'vue'; |
@@ -332,2 +332,13 @@ var __create = Object.create; | ||
} | ||
get params() { | ||
const params = this.value.isParam() ? [...this.value.params] : []; | ||
let node = this.parent; | ||
while (node) { | ||
if (node.value.isParam()) { | ||
params.unshift(...node.value.params); | ||
} | ||
node = node.parent; | ||
} | ||
return params; | ||
} | ||
isRoot() { | ||
@@ -371,3 +382,4 @@ return this.value.path === "/" && !this.value.filePaths.size; | ||
function generateRouteParams(node, isRaw) { | ||
return node.value.isParam() ? `{ ${node.value.params.map((param) => `${param.paramName}${param.optional ? "?" : ""}: ` + (param.modifier === "+" ? `ParamValueOneOrMore<${isRaw}>` : param.modifier === "*" ? `ParamValueZeroOrMore<${isRaw}>` : param.modifier === "?" ? `ParamValueZeroOrOne<${isRaw}>` : `ParamValue<${isRaw}>`)).join(", ")} }` : "Record<never, never>"; | ||
const nodeParams = node.params; | ||
return node.params.length > 0 ? `{ ${node.params.map((param) => `${param.paramName}${param.optional ? "?" : ""}: ` + (param.modifier === "+" ? `ParamValueOneOrMore<${isRaw}>` : param.modifier === "*" ? `ParamValueZeroOrMore<${isRaw}>` : param.modifier === "?" ? `ParamValueZeroOrOne<${isRaw}>` : `ParamValue<${isRaw}>`)).join(", ")} }` : "Record<never, never>"; | ||
} | ||
@@ -374,0 +386,0 @@ |
@@ -1,2 +0,2 @@ | ||
export { D as DEFAULT_OPTIONS, O as Options, R as ResolvedOptions, S as ServerContext } from './options-19865e19.js'; | ||
export { D as DEFAULT_OPTIONS, O as Options, R as ResolvedOptions, S as ServerContext } from './options-589a6004.js'; | ||
import 'vue-router'; |
import * as unplugin from 'unplugin'; | ||
import { R as ResolvedOptions } from './options-19865e19.js'; | ||
import { R as ResolvedOptions } from './options-589a6004.js'; | ||
import 'vue-router'; | ||
@@ -4,0 +4,0 @@ |
@@ -310,2 +310,13 @@ var __create = Object.create; | ||
} | ||
get params() { | ||
const params = this.value.isParam() ? [...this.value.params] : []; | ||
let node = this.parent; | ||
while (node) { | ||
if (node.value.isParam()) { | ||
params.unshift(...node.value.params); | ||
} | ||
node = node.parent; | ||
} | ||
return params; | ||
} | ||
isRoot() { | ||
@@ -349,3 +360,4 @@ return this.value.path === "/" && !this.value.filePaths.size; | ||
function generateRouteParams(node, isRaw) { | ||
return node.value.isParam() ? `{ ${node.value.params.map((param) => `${param.paramName}${param.optional ? "?" : ""}: ` + (param.modifier === "+" ? `ParamValueOneOrMore<${isRaw}>` : param.modifier === "*" ? `ParamValueZeroOrMore<${isRaw}>` : param.modifier === "?" ? `ParamValueZeroOrOne<${isRaw}>` : `ParamValue<${isRaw}>`)).join(", ")} }` : "Record<never, never>"; | ||
const nodeParams = node.params; | ||
return node.params.length > 0 ? `{ ${node.params.map((param) => `${param.paramName}${param.optional ? "?" : ""}: ` + (param.modifier === "+" ? `ParamValueOneOrMore<${isRaw}>` : param.modifier === "*" ? `ParamValueZeroOrMore<${isRaw}>` : param.modifier === "?" ? `ParamValueZeroOrOne<${isRaw}>` : `ParamValue<${isRaw}>`)).join(", ")} }` : "Record<never, never>"; | ||
} | ||
@@ -352,0 +364,0 @@ |
import * as vite from 'vite'; | ||
import { R as ResolvedOptions } from './options-19865e19.js'; | ||
import { R as ResolvedOptions } from './options-589a6004.js'; | ||
import 'vue-router'; | ||
@@ -4,0 +4,0 @@ |
@@ -310,2 +310,13 @@ var __create = Object.create; | ||
} | ||
get params() { | ||
const params = this.value.isParam() ? [...this.value.params] : []; | ||
let node = this.parent; | ||
while (node) { | ||
if (node.value.isParam()) { | ||
params.unshift(...node.value.params); | ||
} | ||
node = node.parent; | ||
} | ||
return params; | ||
} | ||
isRoot() { | ||
@@ -349,3 +360,4 @@ return this.value.path === "/" && !this.value.filePaths.size; | ||
function generateRouteParams(node, isRaw) { | ||
return node.value.isParam() ? `{ ${node.value.params.map((param) => `${param.paramName}${param.optional ? "?" : ""}: ` + (param.modifier === "+" ? `ParamValueOneOrMore<${isRaw}>` : param.modifier === "*" ? `ParamValueZeroOrMore<${isRaw}>` : param.modifier === "?" ? `ParamValueZeroOrOne<${isRaw}>` : `ParamValue<${isRaw}>`)).join(", ")} }` : "Record<never, never>"; | ||
const nodeParams = node.params; | ||
return node.params.length > 0 ? `{ ${node.params.map((param) => `${param.paramName}${param.optional ? "?" : ""}: ` + (param.modifier === "+" ? `ParamValueOneOrMore<${isRaw}>` : param.modifier === "*" ? `ParamValueZeroOrMore<${isRaw}>` : param.modifier === "?" ? `ParamValueZeroOrOne<${isRaw}>` : `ParamValue<${isRaw}>`)).join(", ")} }` : "Record<never, never>"; | ||
} | ||
@@ -352,0 +364,0 @@ |
import * as webpack from 'webpack'; | ||
import { R as ResolvedOptions } from './options-19865e19.js'; | ||
import { R as ResolvedOptions } from './options-589a6004.js'; | ||
import 'vue-router'; | ||
@@ -4,0 +4,0 @@ |
@@ -310,2 +310,13 @@ var __create = Object.create; | ||
} | ||
get params() { | ||
const params = this.value.isParam() ? [...this.value.params] : []; | ||
let node = this.parent; | ||
while (node) { | ||
if (node.value.isParam()) { | ||
params.unshift(...node.value.params); | ||
} | ||
node = node.parent; | ||
} | ||
return params; | ||
} | ||
isRoot() { | ||
@@ -349,3 +360,4 @@ return this.value.path === "/" && !this.value.filePaths.size; | ||
function generateRouteParams(node, isRaw) { | ||
return node.value.isParam() ? `{ ${node.value.params.map((param) => `${param.paramName}${param.optional ? "?" : ""}: ` + (param.modifier === "+" ? `ParamValueOneOrMore<${isRaw}>` : param.modifier === "*" ? `ParamValueZeroOrMore<${isRaw}>` : param.modifier === "?" ? `ParamValueZeroOrOne<${isRaw}>` : `ParamValue<${isRaw}>`)).join(", ")} }` : "Record<never, never>"; | ||
const nodeParams = node.params; | ||
return node.params.length > 0 ? `{ ${node.params.map((param) => `${param.paramName}${param.optional ? "?" : ""}: ` + (param.modifier === "+" ? `ParamValueOneOrMore<${isRaw}>` : param.modifier === "*" ? `ParamValueZeroOrMore<${isRaw}>` : param.modifier === "?" ? `ParamValueZeroOrOne<${isRaw}>` : `ParamValue<${isRaw}>`)).join(", ")} }` : "Record<never, never>"; | ||
} | ||
@@ -352,0 +364,0 @@ |
{ | ||
"name": "unplugin-vue-router", | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"packageManager": "pnpm@7.5.0", | ||
@@ -5,0 +5,0 @@ "description": "File based typed routing for Vue Router", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
183438
1.04%4819
1.54%