@poveste/vendors 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/LICENSE +22 -0
  2. package/dist/client/b-floating-vue.d.ts +3 -0
  3. package/dist/client/b-floating-vue.js +3377 -0
  4. package/dist/client/b-iconify.d.ts +1 -0
  5. package/dist/client/b-iconify.js +1883 -0
  6. package/dist/client/b-pinia.d.ts +1 -0
  7. package/dist/client/b-pinia.js +2069 -0
  8. package/dist/client/b-scroll.d.ts +2 -0
  9. package/dist/client/b-scroll.js +7 -0
  10. package/dist/client/b-vue-router.d.ts +1 -0
  11. package/dist/client/b-vue-router.js +2773 -0
  12. package/dist/client/b-vue-use.d.ts +1 -0
  13. package/dist/client/b-vue-use.js +9626 -0
  14. package/dist/client/b-vue.d.ts +1 -0
  15. package/dist/client/b-vue.js +1 -0
  16. package/dist/client/index.js +169 -0
  17. package/dist/client/node_modules/@babel/helper-string-parser/package.json +31 -0
  18. package/dist/client/node_modules/@babel/helper-validator-identifier/package.json +31 -0
  19. package/dist/client/node_modules/@babel/parser/package.json +50 -0
  20. package/dist/client/node_modules/@babel/parser/typings/babel-parser.d.ts +262 -0
  21. package/dist/client/node_modules/@babel/types/lib/index-legacy.d.ts +2796 -0
  22. package/dist/client/node_modules/@babel/types/lib/index.d.ts +3616 -0
  23. package/dist/client/node_modules/@babel/types/package.json +39 -0
  24. package/dist/client/node_modules/@floating-ui/core/dist/floating-ui.core.d.mts +535 -0
  25. package/dist/client/node_modules/@floating-ui/core/dist/floating-ui.core.d.ts +535 -0
  26. package/dist/client/node_modules/@floating-ui/core/package.json +63 -0
  27. package/dist/client/node_modules/@floating-ui/dom/index.d.ts +1 -0
  28. package/dist/client/node_modules/@floating-ui/dom/package.json +74 -0
  29. package/dist/client/node_modules/@floating-ui/dom/src/autoUpdate.d.ts +31 -0
  30. package/dist/client/node_modules/@floating-ui/dom/src/index.d.ts +11 -0
  31. package/dist/client/node_modules/@floating-ui/dom/src/platform.d.ts +2 -0
  32. package/dist/client/node_modules/@floating-ui/dom/src/types.d.ts +128 -0
  33. package/dist/client/node_modules/@floating-ui/dom/src/utils/convertOffsetParentRelativeRectToViewportRelativeRect.d.ts +6 -0
  34. package/dist/client/node_modules/@floating-ui/dom/src/utils/getBoundingClientRect.d.ts +2 -0
  35. package/dist/client/node_modules/@floating-ui/dom/src/utils/getClippingRect.d.ts +12 -0
  36. package/dist/client/node_modules/@floating-ui/dom/src/utils/getComputedStyle.d.ts +1 -0
  37. package/dist/client/node_modules/@floating-ui/dom/src/utils/getCssDimensions.d.ts +4 -0
  38. package/dist/client/node_modules/@floating-ui/dom/src/utils/getDimensions.d.ts +2 -0
  39. package/dist/client/node_modules/@floating-ui/dom/src/utils/getDocumentElement.d.ts +1 -0
  40. package/dist/client/node_modules/@floating-ui/dom/src/utils/getDocumentRect.d.ts +2 -0
  41. package/dist/client/node_modules/@floating-ui/dom/src/utils/getNearestOverflowAncestor.d.ts +1 -0
  42. package/dist/client/node_modules/@floating-ui/dom/src/utils/getNodeName.d.ts +1 -0
  43. package/dist/client/node_modules/@floating-ui/dom/src/utils/getNodeScroll.d.ts +2 -0
  44. package/dist/client/node_modules/@floating-ui/dom/src/utils/getOffsetParent.d.ts +1 -0
  45. package/dist/client/node_modules/@floating-ui/dom/src/utils/getOverflowAncestors.d.ts +3 -0
  46. package/dist/client/node_modules/@floating-ui/dom/src/utils/getParentNode.d.ts +1 -0
  47. package/dist/client/node_modules/@floating-ui/dom/src/utils/getRectRelativeToOffsetParent.d.ts +2 -0
  48. package/dist/client/node_modules/@floating-ui/dom/src/utils/getScale.d.ts +7 -0
  49. package/dist/client/node_modules/@floating-ui/dom/src/utils/getViewportRect.d.ts +2 -0
  50. package/dist/client/node_modules/@floating-ui/dom/src/utils/getWindowScrollBarX.d.ts +1 -0
  51. package/dist/client/node_modules/@floating-ui/dom/src/utils/is.d.ts +17 -0
  52. package/dist/client/node_modules/@floating-ui/dom/src/utils/math.d.ts +3 -0
  53. package/dist/client/node_modules/@floating-ui/dom/src/utils/unwrapElement.d.ts +2 -0
  54. package/dist/client/node_modules/@floating-ui/dom/src/utils/userAgent.d.ts +1 -0
  55. package/dist/client/node_modules/@floating-ui/dom/src/utils/window.d.ts +1 -0
  56. package/dist/client/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.mts +105 -0
  57. package/dist/client/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.ts +105 -0
  58. package/dist/client/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.mts +47 -0
  59. package/dist/client/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.ts +47 -0
  60. package/dist/client/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.d.ts +47 -0
  61. package/dist/client/node_modules/@floating-ui/utils/dom/package.json +6 -0
  62. package/dist/client/node_modules/@floating-ui/utils/package.json +70 -0
  63. package/dist/client/node_modules/@iconify/types/package.json +23 -0
  64. package/dist/client/node_modules/@iconify/types/provider.d.ts +44 -0
  65. package/dist/client/node_modules/@iconify/types/types.d.ts +272 -0
  66. package/dist/client/node_modules/@iconify/vue/dist/iconify.d.ts +475 -0
  67. package/dist/client/node_modules/@iconify/vue/dist/offline.d.ts +114 -0
  68. package/dist/client/node_modules/@iconify/vue/offline/package.json +14 -0
  69. package/dist/client/node_modules/@iconify/vue/package.json +65 -0
  70. package/dist/client/node_modules/@jridgewell/sourcemap-codec/package.json +63 -0
  71. package/dist/client/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts +50 -0
  72. package/dist/client/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts +9 -0
  73. package/dist/client/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts +16 -0
  74. package/dist/client/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts +7 -0
  75. package/dist/client/node_modules/@types/web-bluetooth/index.d.ts +265 -0
  76. package/dist/client/node_modules/@types/web-bluetooth/package.json +46 -0
  77. package/dist/client/node_modules/@vue/compiler-core/dist/compiler-core.d.ts +1100 -0
  78. package/dist/client/node_modules/@vue/compiler-core/package.json +58 -0
  79. package/dist/client/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts +45 -0
  80. package/dist/client/node_modules/@vue/compiler-dom/package.json +57 -0
  81. package/dist/client/node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts +485 -0
  82. package/dist/client/node_modules/@vue/compiler-sfc/package.json +67 -0
  83. package/dist/client/node_modules/@vue/compiler-ssr/dist/compiler-ssr.d.ts +4 -0
  84. package/dist/client/node_modules/@vue/compiler-ssr/package.json +34 -0
  85. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/api.d.ts +108 -0
  86. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/app.d.ts +1 -0
  87. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/component.d.ts +78 -0
  88. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/context.d.ts +5 -0
  89. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/hooks.d.ts +180 -0
  90. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/index.d.ts +6 -0
  91. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/util.d.ts +4 -0
  92. package/dist/client/node_modules/@vue/devtools-api/lib/esm/const.d.ts +2 -0
  93. package/dist/client/node_modules/@vue/devtools-api/lib/esm/env.d.ts +15 -0
  94. package/dist/client/node_modules/@vue/devtools-api/lib/esm/index.d.ts +18 -0
  95. package/dist/client/node_modules/@vue/devtools-api/lib/esm/plugin.d.ts +47 -0
  96. package/dist/client/node_modules/@vue/devtools-api/lib/esm/proxy.d.ts +20 -0
  97. package/dist/client/node_modules/@vue/devtools-api/lib/esm/time.d.ts +2 -0
  98. package/dist/client/node_modules/@vue/devtools-api/package.json +37 -0
  99. package/dist/client/node_modules/@vue/reactivity/dist/reactivity.d.ts +753 -0
  100. package/dist/client/node_modules/@vue/reactivity/package.json +55 -0
  101. package/dist/client/node_modules/@vue/runtime-core/dist/runtime-core.d.ts +1839 -0
  102. package/dist/client/node_modules/@vue/runtime-core/package.json +52 -0
  103. package/dist/client/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts +1430 -0
  104. package/dist/client/node_modules/@vue/runtime-dom/package.json +60 -0
  105. package/dist/client/node_modules/@vue/server-renderer/dist/server-renderer.d.ts +65 -0
  106. package/dist/client/node_modules/@vue/server-renderer/package.json +55 -0
  107. package/dist/client/node_modules/@vue/shared/dist/shared.d.ts +334 -0
  108. package/dist/client/node_modules/@vue/shared/package.json +47 -0
  109. package/dist/client/node_modules/@vueuse/core/index.d.mts +6221 -0
  110. package/dist/client/node_modules/@vueuse/core/index.d.ts +6221 -0
  111. package/dist/client/node_modules/@vueuse/core/metadata.d.mts +1 -0
  112. package/dist/client/node_modules/@vueuse/core/metadata.d.ts +1 -0
  113. package/dist/client/node_modules/@vueuse/core/package.json +57 -0
  114. package/dist/client/node_modules/@vueuse/metadata/index.d.mts +78 -0
  115. package/dist/client/node_modules/@vueuse/metadata/index.d.ts +78 -0
  116. package/dist/client/node_modules/@vueuse/metadata/package.json +46 -0
  117. package/dist/client/node_modules/@vueuse/shared/index.d.mts +1260 -0
  118. package/dist/client/node_modules/@vueuse/shared/index.d.ts +1260 -0
  119. package/dist/client/node_modules/@vueuse/shared/package.json +49 -0
  120. package/dist/client/node_modules/compute-scroll-into-view/dist/index.d.ts +75 -0
  121. package/dist/client/node_modules/compute-scroll-into-view/package.json +82 -0
  122. package/dist/client/node_modules/csstype/index.d.ts +22569 -0
  123. package/dist/client/node_modules/csstype/package.json +70 -0
  124. package/dist/client/node_modules/entities/decode.d.ts +3 -0
  125. package/dist/client/node_modules/entities/dist/commonjs/decode-codepoint.d.ts +19 -0
  126. package/dist/client/node_modules/entities/dist/commonjs/decode.d.ts +205 -0
  127. package/dist/client/node_modules/entities/dist/commonjs/encode.d.ts +22 -0
  128. package/dist/client/node_modules/entities/dist/commonjs/escape.d.ts +46 -0
  129. package/dist/client/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts +2 -0
  130. package/dist/client/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts +2 -0
  131. package/dist/client/node_modules/entities/dist/commonjs/generated/encode-html.d.ts +3 -0
  132. package/dist/client/node_modules/entities/dist/commonjs/index.d.ts +96 -0
  133. package/dist/client/node_modules/entities/dist/commonjs/internal/bin-trie-flags.d.ts +17 -0
  134. package/dist/client/node_modules/entities/dist/commonjs/internal/decode-shared.d.ts +2 -0
  135. package/dist/client/node_modules/entities/dist/commonjs/internal/encode-shared.d.ts +32 -0
  136. package/dist/client/node_modules/entities/dist/commonjs/package.json +3 -0
  137. package/dist/client/node_modules/entities/dist/esm/decode-codepoint.d.ts +19 -0
  138. package/dist/client/node_modules/entities/dist/esm/decode.d.ts +205 -0
  139. package/dist/client/node_modules/entities/dist/esm/encode.d.ts +22 -0
  140. package/dist/client/node_modules/entities/dist/esm/escape.d.ts +46 -0
  141. package/dist/client/node_modules/entities/dist/esm/generated/decode-data-html.d.ts +2 -0
  142. package/dist/client/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts +2 -0
  143. package/dist/client/node_modules/entities/dist/esm/generated/encode-html.d.ts +3 -0
  144. package/dist/client/node_modules/entities/dist/esm/index.d.ts +96 -0
  145. package/dist/client/node_modules/entities/dist/esm/internal/bin-trie-flags.d.ts +17 -0
  146. package/dist/client/node_modules/entities/dist/esm/internal/decode-shared.d.ts +2 -0
  147. package/dist/client/node_modules/entities/dist/esm/internal/encode-shared.d.ts +32 -0
  148. package/dist/client/node_modules/entities/dist/esm/package.json +3 -0
  149. package/dist/client/node_modules/entities/escape.d.ts +3 -0
  150. package/dist/client/node_modules/entities/package.json +120 -0
  151. package/dist/client/node_modules/estree-walker/dist/esm/package.json +1 -0
  152. package/dist/client/node_modules/estree-walker/package.json +37 -0
  153. package/dist/client/node_modules/estree-walker/src/package.json +1 -0
  154. package/dist/client/node_modules/estree-walker/types/async.d.ts +53 -0
  155. package/dist/client/node_modules/estree-walker/types/index.d.ts +56 -0
  156. package/dist/client/node_modules/estree-walker/types/sync.d.ts +53 -0
  157. package/dist/client/node_modules/estree-walker/types/walker.d.ts +37 -0
  158. package/dist/client/node_modules/floating-vue/dist/components/Dropdown.d.ts +398 -0
  159. package/dist/client/node_modules/floating-vue/dist/components/Menu.d.ts +398 -0
  160. package/dist/client/node_modules/floating-vue/dist/components/Popper.d.ts +495 -0
  161. package/dist/client/node_modules/floating-vue/dist/components/Popper.vue.d.ts +474 -0
  162. package/dist/client/node_modules/floating-vue/dist/components/PopperContent.vue.d.ts +37 -0
  163. package/dist/client/node_modules/floating-vue/dist/components/PopperMethods.d.ts +9 -0
  164. package/dist/client/node_modules/floating-vue/dist/components/PopperWrapper.vue.d.ts +414 -0
  165. package/dist/client/node_modules/floating-vue/dist/components/ThemeClass.d.ts +6 -0
  166. package/dist/client/node_modules/floating-vue/dist/components/Tooltip.d.ts +398 -0
  167. package/dist/client/node_modules/floating-vue/dist/components/TooltipDirective.vue.d.ts +67 -0
  168. package/dist/client/node_modules/floating-vue/dist/config.d.ts +11 -0
  169. package/dist/client/node_modules/floating-vue/dist/directives/v-close-popper.d.ts +13 -0
  170. package/dist/client/node_modules/floating-vue/dist/directives/v-tooltip.d.ts +27 -0
  171. package/dist/client/node_modules/floating-vue/dist/directives/v-tooltip.spec.d.ts +1 -0
  172. package/dist/client/node_modules/floating-vue/dist/index.d.ts +2239 -0
  173. package/dist/client/node_modules/floating-vue/dist/util/assign-deep.d.ts +1 -0
  174. package/dist/client/node_modules/floating-vue/dist/util/env.d.ts +2 -0
  175. package/dist/client/node_modules/floating-vue/dist/util/events.d.ts +14 -0
  176. package/dist/client/node_modules/floating-vue/dist/util/frame.d.ts +1 -0
  177. package/dist/client/node_modules/floating-vue/dist/util/lang.d.ts +1 -0
  178. package/dist/client/node_modules/floating-vue/dist/util/popper.d.ts +3 -0
  179. package/dist/client/node_modules/floating-vue/package.json +80 -0
  180. package/dist/client/node_modules/magic-string/dist/magic-string.cjs.d.ts +289 -0
  181. package/dist/client/node_modules/magic-string/dist/magic-string.es.d.mts +289 -0
  182. package/dist/client/node_modules/magic-string/package.json +67 -0
  183. package/dist/client/node_modules/nanoid/async/index.d.ts +56 -0
  184. package/dist/client/node_modules/nanoid/async/package.json +12 -0
  185. package/dist/client/node_modules/nanoid/index.d.ts +91 -0
  186. package/dist/client/node_modules/nanoid/non-secure/index.d.ts +33 -0
  187. package/dist/client/node_modules/nanoid/non-secure/package.json +6 -0
  188. package/dist/client/node_modules/nanoid/package.json +89 -0
  189. package/dist/client/node_modules/nanoid/url-alphabet/package.json +6 -0
  190. package/dist/client/node_modules/picocolors/package.json +25 -0
  191. package/dist/client/node_modules/picocolors/picocolors.d.ts +5 -0
  192. package/dist/client/node_modules/picocolors/types.d.ts +51 -0
  193. package/dist/client/node_modules/pinia/dist/pinia.d.ts +1074 -0
  194. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/index.d.ts +22 -0
  195. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v2/index.d.ts +33 -0
  196. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v2.7/index.d.ts +38 -0
  197. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v3/index.d.ts +22 -0
  198. package/dist/client/node_modules/pinia/node_modules/vue-demi/package.json +47 -0
  199. package/dist/client/node_modules/pinia/package.json +96 -0
  200. package/dist/client/node_modules/postcss/lib/at-rule.d.ts +139 -0
  201. package/dist/client/node_modules/postcss/lib/comment.d.ts +67 -0
  202. package/dist/client/node_modules/postcss/lib/container.d.ts +478 -0
  203. package/dist/client/node_modules/postcss/lib/css-syntax-error.d.ts +247 -0
  204. package/dist/client/node_modules/postcss/lib/declaration.d.ts +150 -0
  205. package/dist/client/node_modules/postcss/lib/document.d.ts +68 -0
  206. package/dist/client/node_modules/postcss/lib/fromJSON.d.ts +9 -0
  207. package/dist/client/node_modules/postcss/lib/input.d.ts +226 -0
  208. package/dist/client/node_modules/postcss/lib/lazy-result.d.ts +189 -0
  209. package/dist/client/node_modules/postcss/lib/list.d.ts +60 -0
  210. package/dist/client/node_modules/postcss/lib/no-work-result.d.ts +45 -0
  211. package/dist/client/node_modules/postcss/lib/node.d.ts +555 -0
  212. package/dist/client/node_modules/postcss/lib/parse.d.ts +9 -0
  213. package/dist/client/node_modules/postcss/lib/postcss.d.mts +66 -0
  214. package/dist/client/node_modules/postcss/lib/postcss.d.ts +464 -0
  215. package/dist/client/node_modules/postcss/lib/previous-map.d.ts +80 -0
  216. package/dist/client/node_modules/postcss/lib/processor.d.ts +114 -0
  217. package/dist/client/node_modules/postcss/lib/result.d.ts +204 -0
  218. package/dist/client/node_modules/postcss/lib/root.d.ts +86 -0
  219. package/dist/client/node_modules/postcss/lib/rule.d.ts +126 -0
  220. package/dist/client/node_modules/postcss/lib/stringifier.d.ts +45 -0
  221. package/dist/client/node_modules/postcss/lib/stringify.d.ts +9 -0
  222. package/dist/client/node_modules/postcss/lib/warning.d.ts +146 -0
  223. package/dist/client/node_modules/postcss/package.json +88 -0
  224. package/dist/client/node_modules/scroll-into-view-if-needed/dist/index.d.ts +79 -0
  225. package/dist/client/node_modules/scroll-into-view-if-needed/package.json +80 -0
  226. package/dist/client/node_modules/source-map-js/lib/source-map-consumer.d.ts +1 -0
  227. package/dist/client/node_modules/source-map-js/lib/source-map-generator.d.ts +1 -0
  228. package/dist/client/node_modules/source-map-js/lib/source-node.d.ts +1 -0
  229. package/dist/client/node_modules/source-map-js/package.json +71 -0
  230. package/dist/client/node_modules/source-map-js/source-map.d.ts +104 -0
  231. package/dist/client/node_modules/vue/compiler-sfc/index.d.mts +1 -0
  232. package/dist/client/node_modules/vue/compiler-sfc/index.d.ts +1 -0
  233. package/dist/client/node_modules/vue/compiler-sfc/package.json +4 -0
  234. package/dist/client/node_modules/vue/dist/vue.d.mts +7 -0
  235. package/dist/client/node_modules/vue/dist/vue.d.ts +7 -0
  236. package/dist/client/node_modules/vue/jsx-runtime/index.d.ts +25 -0
  237. package/dist/client/node_modules/vue/jsx-runtime/package.json +5 -0
  238. package/dist/client/node_modules/vue/jsx.d.ts +22 -0
  239. package/dist/client/node_modules/vue/package.json +112 -0
  240. package/dist/client/node_modules/vue/server-renderer/index.d.mts +1 -0
  241. package/dist/client/node_modules/vue/server-renderer/index.d.ts +1 -0
  242. package/dist/client/node_modules/vue/server-renderer/package.json +4 -0
  243. package/dist/client/node_modules/vue-resize/package.json +77 -0
  244. package/dist/client/node_modules/vue-router/dist/experimental/index.d.mts +38 -0
  245. package/dist/client/node_modules/vue-router/dist/router-CWoNjPRp.d.mts +1973 -0
  246. package/dist/client/node_modules/vue-router/dist/vue-router.d.mts +361 -0
  247. package/dist/client/node_modules/vue-router/package.json +153 -0
  248. package/dist/client/node_modules/vue-router/vue-router-auto-resolver.d.mts +22 -0
  249. package/dist/client/node_modules/vue-router/vue-router-auto-routes.d.ts +4 -0
  250. package/dist/client/node_modules/vue-router/vue-router-auto.d.ts +1 -0
  251. package/dist/client/vue.runtime.esm-bundler.js +13167 -0
  252. package/entries.js +9 -0
  253. package/floating-vue.d.ts +4 -0
  254. package/iconify.d.ts +4 -0
  255. package/package.json +50 -0
  256. package/pinia.d.ts +4 -0
  257. package/rollup.config.mjs +119 -0
  258. package/scroll.d.ts +4 -0
  259. package/src/client/b-floating-vue.ts +5 -0
  260. package/src/client/b-iconify.ts +1 -0
  261. package/src/client/b-pinia.ts +1 -0
  262. package/src/client/b-scroll.ts +4 -0
  263. package/src/client/b-vue-router.ts +1 -0
  264. package/src/client/b-vue-use.ts +1 -0
  265. package/src/client/b-vue.ts +1 -0
  266. package/tsconfig.json +34 -0
  267. package/vue-router.d.ts +4 -0
  268. package/vue-use.d.ts +4 -0
  269. package/vue.d.ts +4 -0
@@ -0,0 +1,1973 @@
1
+ /*!
2
+ * vue-router v4.6.4
3
+ * (c) 2025 Eduardo San Martin Morote
4
+ * @license MIT
5
+ */
6
+ import { App, Component, ComponentPublicInstance, DefineComponent, Ref, ShallowRef } from "vue";
7
+
8
+ //#region src/query.d.ts
9
+
10
+ /**
11
+ * Possible values in normalized {@link LocationQuery}. `null` renders the query
12
+ * param but without an `=`.
13
+ *
14
+ * @example
15
+ * ```
16
+ * ?isNull&isEmpty=&other=other
17
+ * gives
18
+ * `{ isNull: null, isEmpty: '', other: 'other' }`.
19
+ * ```
20
+ *
21
+ * @internal
22
+ */
23
+ type LocationQueryValue = string | null;
24
+ /**
25
+ * Possible values when defining a query. `undefined` allows to remove a value.
26
+ *
27
+ * @internal
28
+ */
29
+ type LocationQueryValueRaw = LocationQueryValue | number | undefined;
30
+ /**
31
+ * Normalized query object that appears in {@link RouteLocationNormalized}
32
+ *
33
+ * @public
34
+ */
35
+ type LocationQuery = Record<string, LocationQueryValue | LocationQueryValue[]>;
36
+ /**
37
+ * Loose {@link LocationQuery} object that can be passed to functions like
38
+ * {@link Router.push} and {@link Router.replace} or anywhere when creating a
39
+ * {@link RouteLocationRaw}
40
+ *
41
+ * @public
42
+ */
43
+ type LocationQueryRaw = Record<string | number, LocationQueryValueRaw | LocationQueryValueRaw[]>;
44
+ /**
45
+ * Transforms a queryString into a {@link LocationQuery} object. Accept both, a
46
+ * version with the leading `?` and without Should work as URLSearchParams
47
+
48
+ * @internal
49
+ *
50
+ * @param search - search string to parse
51
+ * @returns a query object
52
+ */
53
+ declare function parseQuery(search: string): LocationQuery;
54
+ /**
55
+ * Stringifies a {@link LocationQueryRaw} object. Like `URLSearchParams`, it
56
+ * doesn't prepend a `?`
57
+ *
58
+ * @internal
59
+ *
60
+ * @param query - query object to stringify
61
+ * @returns string version of the query without the leading `?`
62
+ */
63
+ declare function stringifyQuery(query: LocationQueryRaw | undefined): string;
64
+ //#endregion
65
+ //#region src/config.d.ts
66
+ /**
67
+ * Allows customizing existing types of the router that are used globally like `$router`, `<RouterLink>`, etc. **ONLY FOR INTERNAL USAGE**.
68
+ *
69
+ * - `$router` - the router instance
70
+ * - `$route` - the current route location
71
+ * - `beforeRouteEnter` - Page component option
72
+ * - `beforeRouteUpdate` - Page component option
73
+ * - `beforeRouteLeave` - Page component option
74
+ * - `RouterLink` - RouterLink Component
75
+ * - `RouterView` - RouterView Component
76
+ *
77
+ * @internal
78
+ */
79
+ interface TypesConfig {}
80
+ //#endregion
81
+ //#region src/typed-routes/route-map.d.ts
82
+ /**
83
+ * Helper type to define a Typed `RouteRecord`
84
+ * @see {@link RouteRecord}
85
+ */
86
+ interface RouteRecordInfo<Name extends string | symbol = string, Path extends string = string, ParamsRaw extends RouteParamsRawGeneric = RouteParamsRawGeneric, Params extends RouteParamsGeneric = RouteParamsGeneric, ChildrenNames extends string | symbol = never> {
87
+ name: Name;
88
+ path: Path;
89
+ paramsRaw: ParamsRaw;
90
+ params: Params;
91
+ childrenNames: ChildrenNames;
92
+ }
93
+ type RouteRecordInfoGeneric = RouteRecordInfo<string | symbol, string, RouteParamsRawGeneric, RouteParamsGeneric, string | symbol>;
94
+ /**
95
+ * Convenience type to get the typed RouteMap or a generic one if not provided. It is extracted from the {@link TypesConfig} if it exists, it becomes {@link RouteMapGeneric} otherwise.
96
+ */
97
+ type RouteMap = TypesConfig extends Record<'RouteNamedMap', infer RouteNamedMap> ? RouteNamedMap : RouteMapGeneric;
98
+ /**
99
+ * Generic version of the `RouteMap`.
100
+ */
101
+ type RouteMapGeneric = Record<string | symbol, RouteRecordInfoGeneric>;
102
+ //#endregion
103
+ //#region src/typed-routes/params.d.ts
104
+ /**
105
+ * Utility type for raw and non raw params like :id+
106
+ *
107
+ */
108
+ type ParamValueOneOrMore<isRaw extends boolean> = [ParamValue<isRaw>, ...ParamValue<isRaw>[]];
109
+ /**
110
+ * Utility type for raw and non raw params like :id*
111
+ *
112
+ */
113
+ type ParamValueZeroOrMore<isRaw extends boolean> = true extends isRaw ? ParamValue<isRaw>[] | undefined | null : ParamValue<isRaw>[] | undefined;
114
+ /**
115
+ * Utility type for raw and non raw params like :id?
116
+ *
117
+ */
118
+ type ParamValueZeroOrOne<isRaw extends boolean> = true extends isRaw ? string | number | null | undefined : string;
119
+ /**
120
+ * Utility type for raw and non raw params like :id
121
+ *
122
+ */
123
+ type ParamValue<isRaw extends boolean> = true extends isRaw ? string | number : string;
124
+ /**
125
+ * Generate a type safe params for a route location. Requires the name of the route to be passed as a generic.
126
+ * @see {@link RouteParamsGeneric}
127
+ */
128
+ type RouteParams<Name extends keyof RouteMap = keyof RouteMap> = RouteMap[Name]['params'];
129
+ /**
130
+ * Generate a type safe raw params for a route location. Requires the name of the route to be passed as a generic.
131
+ * @see {@link RouteParamsRaw}
132
+ */
133
+ type RouteParamsRaw<Name extends keyof RouteMap = keyof RouteMap> = RouteMap[Name]['paramsRaw'];
134
+ //#endregion
135
+ //#region src/types/utils.d.ts
136
+ /**
137
+ * Creates a union type that still allows autocompletion for strings.
138
+ * @internal
139
+ */
140
+ type _LiteralUnion<LiteralType, BaseType extends string = string> = LiteralType | (BaseType & Record<never, never>);
141
+ /**
142
+ * Maybe a promise maybe not
143
+ * @internal
144
+ */
145
+ type _Awaitable<T> = T | PromiseLike<T>;
146
+ /**
147
+ * @internal
148
+ */
149
+ type Simplify<T> = { [K in keyof T]: T[K] } & {};
150
+ //#endregion
151
+ //#region src/typed-routes/route-records.d.ts
152
+ /**
153
+ * @internal
154
+ */
155
+ type RouteRecordRedirectOption = RouteLocationRaw | ((to: RouteLocation, from: RouteLocationNormalizedLoaded) => RouteLocationRaw);
156
+ /**
157
+ * Generic version of {@link RouteRecordName}.
158
+ */
159
+ type RouteRecordNameGeneric = string | symbol | undefined;
160
+ /**
161
+ * Possible values for a route record **after normalization**
162
+ *
163
+ * NOTE: since `RouteRecordName` is a type, it evaluates too early and it's often the generic version {@link RouteRecordNameGeneric}. If you need a typed version of all of the names of routes, use {@link RouteMap | `keyof RouteMap`}
164
+ */
165
+ type RouteRecordName = RouteMapGeneric extends RouteMap ? RouteRecordNameGeneric : keyof RouteMap;
166
+ /**
167
+ * @internal
168
+ */
169
+ type _RouteRecordProps<Name extends keyof RouteMap = keyof RouteMap> = boolean | Record<string, any> | ((to: RouteLocationNormalized<Name>) => Record<string, any>);
170
+ //#endregion
171
+ //#region src/typed-routes/route-location.d.ts
172
+ /**
173
+ * Generic version of {@link RouteLocation}. It is used when no {@link RouteMap} is provided.
174
+ */
175
+ interface RouteLocationGeneric extends _RouteLocationBase, RouteLocationOptions {
176
+ /**
177
+ * Array of {@link RouteRecord} containing components as they were
178
+ * passed when adding records. It can also contain redirect records. This
179
+ * can't be used directly. **This property is non-enumerable**.
180
+ */
181
+ matched: RouteRecord[];
182
+ }
183
+ /**
184
+ * Helper to generate a type safe version of the {@link RouteLocation} type.
185
+ */
186
+ interface RouteLocationTyped<RouteMap$1 extends RouteMapGeneric, Name extends keyof RouteMap$1> extends RouteLocationGeneric {
187
+ name: Extract<Name, string | symbol>;
188
+ params: RouteMap$1[Name]['params'];
189
+ }
190
+ /**
191
+ * List of all possible {@link RouteLocation} indexed by the route name.
192
+ * @internal
193
+ */
194
+ type RouteLocationTypedList<RouteMap$1 extends RouteMapGeneric = RouteMapGeneric> = { [N in keyof RouteMap$1]: RouteLocationTyped<RouteMap$1, N> };
195
+ /**
196
+ * Generic version of {@link RouteLocationNormalized} that is used when no {@link RouteMap} is provided.
197
+ */
198
+ interface RouteLocationNormalizedGeneric extends _RouteLocationBase {
199
+ name: RouteRecordNameGeneric;
200
+ /**
201
+ * Array of {@link RouteRecordNormalized}
202
+ */
203
+ matched: RouteRecordNormalized[];
204
+ }
205
+ /**
206
+ * Helper to generate a type safe version of the {@link RouteLocationNormalized} type.
207
+ */
208
+ interface RouteLocationNormalizedTyped<RouteMap$1 extends RouteMapGeneric = RouteMapGeneric, Name extends keyof RouteMap$1 = keyof RouteMap$1> extends RouteLocationNormalizedGeneric {
209
+ name: Extract<Name, string | symbol>;
210
+ params: RouteMap$1[Name]['params'];
211
+ /**
212
+ * Array of {@link RouteRecordNormalized}
213
+ */
214
+ matched: RouteRecordNormalized[];
215
+ }
216
+ /**
217
+ * List of all possible {@link RouteLocationNormalized} indexed by the route name.
218
+ * @internal
219
+ */
220
+ type RouteLocationNormalizedTypedList<RouteMap$1 extends RouteMapGeneric = RouteMapGeneric> = { [N in keyof RouteMap$1]: RouteLocationNormalizedTyped<RouteMap$1, N> };
221
+ /**
222
+ * Generic version of {@link RouteLocationNormalizedLoaded} that is used when no {@link RouteMap} is provided.
223
+ */
224
+ interface RouteLocationNormalizedLoadedGeneric extends RouteLocationNormalizedGeneric {
225
+ /**
226
+ * Array of {@link RouteLocationMatched} containing only plain components (any
227
+ * lazy-loaded components have been loaded and were replaced inside the
228
+ * `components` object) so it can be directly used to display routes. It
229
+ * cannot contain redirect records either. **This property is non-enumerable**.
230
+ */
231
+ matched: RouteLocationMatched[];
232
+ }
233
+ /**
234
+ * Helper to generate a type safe version of the {@link RouteLocationNormalizedLoaded} type.
235
+ */
236
+ interface RouteLocationNormalizedLoadedTyped<RouteMap$1 extends RouteMapGeneric = RouteMapGeneric, Name extends keyof RouteMap$1 = keyof RouteMap$1> extends RouteLocationNormalizedLoadedGeneric {
237
+ name: Extract<Name, string | symbol>;
238
+ params: RouteMap$1[Name]['params'];
239
+ }
240
+ /**
241
+ * List of all possible {@link RouteLocationNormalizedLoaded} indexed by the route name.
242
+ * @internal
243
+ */
244
+ type RouteLocationNormalizedLoadedTypedList<RouteMap$1 extends RouteMapGeneric = RouteMapGeneric> = { [N in keyof RouteMap$1]: RouteLocationNormalizedLoadedTyped<RouteMap$1, N> };
245
+ /**
246
+ * Generic version of {@link RouteLocationAsRelative}. It is used when no {@link RouteMap} is provided.
247
+ */
248
+ interface RouteLocationAsRelativeGeneric extends RouteQueryAndHash, RouteLocationOptions {
249
+ name?: RouteRecordNameGeneric;
250
+ params?: RouteParamsRawGeneric;
251
+ /**
252
+ * A relative path to the current location. This property should be removed
253
+ */
254
+ path?: undefined;
255
+ }
256
+ /**
257
+ * Helper to generate a type safe version of the {@link RouteLocationAsRelative} type.
258
+ */
259
+ interface RouteLocationAsRelativeTyped<RouteMap$1 extends RouteMapGeneric = RouteMapGeneric, Name extends keyof RouteMap$1 = keyof RouteMap$1> extends RouteLocationAsRelativeGeneric {
260
+ name?: Extract<Name, string | symbol>;
261
+ params?: RouteMap$1[Name]['paramsRaw'];
262
+ }
263
+ /**
264
+ * List of all possible {@link RouteLocationAsRelative} indexed by the route name.
265
+ * @internal
266
+ */
267
+ type RouteLocationAsRelativeTypedList<RouteMap$1 extends RouteMapGeneric = RouteMapGeneric> = { [N in keyof RouteMap$1]: RouteLocationAsRelativeTyped<RouteMap$1, N> };
268
+ /**
269
+ * Generic version of {@link RouteLocationAsPath}. It is used when no {@link RouteMap} is provided.
270
+ */
271
+ interface RouteLocationAsPathGeneric extends RouteQueryAndHash, RouteLocationOptions {
272
+ /**
273
+ * Percentage encoded pathname section of the URL.
274
+ */
275
+ path: string;
276
+ }
277
+ /**
278
+ * Helper to generate a type safe version of the {@link RouteLocationAsPath} type.
279
+ */
280
+ interface RouteLocationAsPathTyped<RouteMap$1 extends RouteMapGeneric = RouteMapGeneric, Name extends keyof RouteMap$1 = keyof RouteMap$1> extends RouteLocationAsPathGeneric {
281
+ path: _LiteralUnion<RouteMap$1[Name]['path']>;
282
+ }
283
+ /**
284
+ * List of all possible {@link RouteLocationAsPath} indexed by the route name.
285
+ * @internal
286
+ */
287
+ type RouteLocationAsPathTypedList<RouteMap$1 extends RouteMapGeneric = RouteMapGeneric> = { [N in keyof RouteMap$1]: RouteLocationAsPathTyped<RouteMap$1, N> };
288
+ /**
289
+ * Helper to generate a type safe version of the {@link RouteLocationAsString} type.
290
+ */
291
+ type RouteLocationAsStringTyped<RouteMap$1 extends RouteMapGeneric = RouteMapGeneric, Name extends keyof RouteMap$1 = keyof RouteMap$1> = RouteMap$1[Name]['path'];
292
+ /**
293
+ * List of all possible {@link RouteLocationAsString} indexed by the route name.
294
+ * @internal
295
+ */
296
+ type RouteLocationAsStringTypedList<RouteMap$1 extends RouteMapGeneric = RouteMapGeneric> = { [N in keyof RouteMap$1]: RouteLocationAsStringTyped<RouteMap$1, N> };
297
+ /**
298
+ * Generic version of {@link RouteLocationResolved}. It is used when no {@link RouteMap} is provided.
299
+ */
300
+ interface RouteLocationResolvedGeneric extends RouteLocationGeneric {
301
+ /**
302
+ * Resolved `href` for the route location that will be set on the `<a href="...">`.
303
+ */
304
+ href: string;
305
+ }
306
+ /**
307
+ * Helper to generate a type safe version of the {@link RouteLocationResolved} type.
308
+ */
309
+ interface RouteLocationResolvedTyped<RouteMap$1 extends RouteMapGeneric, Name extends keyof RouteMap$1> extends RouteLocationTyped<RouteMap$1, Name> {
310
+ /**
311
+ * Resolved `href` for the route location that will be set on the `<a href="...">`.
312
+ */
313
+ href: string;
314
+ }
315
+ /**
316
+ * List of all possible {@link RouteLocationResolved} indexed by the route name.
317
+ * @internal
318
+ */
319
+ type RouteLocationResolvedTypedList<RouteMap$1 extends RouteMapGeneric = RouteMapGeneric> = { [N in keyof RouteMap$1]: RouteLocationResolvedTyped<RouteMap$1, N> };
320
+ /**
321
+ * Type safe versions of types that are exposed by vue-router. We have to use a generic check to allow for names to be `undefined` when no `RouteMap` is provided.
322
+ */
323
+ /**
324
+ * {@link RouteLocationRaw} resolved using the matcher
325
+ */
326
+ type RouteLocation<Name extends keyof RouteMap = keyof RouteMap> = RouteMapGeneric extends RouteMap ? RouteLocationGeneric : RouteLocationTypedList<RouteMap>[Name];
327
+ /**
328
+ * Similar to {@link RouteLocation} but its
329
+ * {@link RouteLocationNormalizedTyped.matched | `matched` property} cannot contain redirect records
330
+ */
331
+ type RouteLocationNormalized<Name extends keyof RouteMap = keyof RouteMap> = RouteMapGeneric extends RouteMap ? RouteLocationNormalizedGeneric : RouteLocationNormalizedTypedList<RouteMap>[Name];
332
+ /**
333
+ * Similar to {@link RouteLocationNormalized} but its `components` do not contain any function to lazy load components.
334
+ * In other words, it's ready to be rendered by `<RouterView>`.
335
+ */
336
+ type RouteLocationNormalizedLoaded<Name extends keyof RouteMap = keyof RouteMap> = RouteMapGeneric extends RouteMap ? RouteLocationNormalizedLoadedGeneric : RouteLocationNormalizedLoadedTypedList<RouteMap>[Name];
337
+ /**
338
+ * Route location relative to the current location. It accepts other properties than `path` like `params`, `query` and
339
+ * `hash` to conveniently change them.
340
+ */
341
+ type RouteLocationAsRelative<Name extends keyof RouteMap = keyof RouteMap> = RouteMapGeneric extends RouteMap ? RouteLocationAsRelativeGeneric : RouteLocationAsRelativeTypedList<RouteMap>[Name];
342
+ /**
343
+ * Route location resolved with {@link Router | `router.resolve()`}.
344
+ */
345
+ type RouteLocationResolved<Name extends keyof RouteMap = keyof RouteMap> = RouteMapGeneric extends RouteMap ? RouteLocationResolvedGeneric : RouteLocationResolvedTypedList<RouteMap>[Name];
346
+ /**
347
+ * Same as {@link RouteLocationAsPath} but as a string literal.
348
+ */
349
+ type RouteLocationAsString<Name extends keyof RouteMap = keyof RouteMap> = RouteMapGeneric extends RouteMap ? string : _LiteralUnion<RouteLocationAsStringTypedList<RouteMap>[Name], string>;
350
+ /**
351
+ * Route location as an object with a `path` property.
352
+ */
353
+ type RouteLocationAsPath<Name extends keyof RouteMap = keyof RouteMap> = RouteMapGeneric extends RouteMap ? RouteLocationAsPathGeneric : RouteLocationAsPathTypedList<RouteMap>[Name];
354
+ /**
355
+ * Route location that can be passed to `router.push()` and other user-facing APIs.
356
+ */
357
+ type RouteLocationRaw<Name extends keyof RouteMap = keyof RouteMap> = RouteMapGeneric extends RouteMap ? RouteLocationAsString | RouteLocationAsRelativeGeneric | RouteLocationAsPathGeneric : _LiteralUnion<RouteLocationAsStringTypedList<RouteMap>[Name], string> | RouteLocationAsRelativeTypedList<RouteMap>[Name] | RouteLocationAsPathTypedList<RouteMap>[Name];
358
+ //#endregion
359
+ //#region src/typed-routes/navigation-guards.d.ts
360
+ /**
361
+ * Return types for a Navigation Guard. Based on `TypesConfig`
362
+ *
363
+ * @see {@link TypesConfig}
364
+ */
365
+ type NavigationGuardReturn = void | Error | boolean | RouteLocationRaw;
366
+ /**
367
+ * Navigation Guard with a type parameter for `this`.
368
+ * @see {@link TypesConfig}
369
+ */
370
+ interface NavigationGuardWithThis<T> {
371
+ (this: T, to: RouteLocationNormalized, from: RouteLocationNormalizedLoaded, next: NavigationGuardNext): _Awaitable<NavigationGuardReturn>;
372
+ }
373
+ /**
374
+ * Navigation Guard.
375
+ */
376
+ interface NavigationGuard {
377
+ (to: RouteLocationNormalized, from: RouteLocationNormalizedLoaded, next: NavigationGuardNext): _Awaitable<NavigationGuardReturn>;
378
+ }
379
+ /**
380
+ * Navigation hook triggered after a navigation is settled.
381
+ */
382
+ interface NavigationHookAfter {
383
+ (to: RouteLocationNormalized, from: RouteLocationNormalizedLoaded, failure?: NavigationFailure | void): unknown;
384
+ }
385
+ /**
386
+ * `next()` callback passed to navigation guards.
387
+ */
388
+ interface NavigationGuardNext {
389
+ (): void;
390
+ (error: Error): void;
391
+ (location: RouteLocationRaw): void;
392
+ (valid: boolean | undefined): void;
393
+ (cb: NavigationGuardNextCallback): void;
394
+ }
395
+ /**
396
+ * Callback that can be passed to `next()` in `beforeRouteEnter()` guards.
397
+ */
398
+ type NavigationGuardNextCallback = (vm: ComponentPublicInstance) => unknown;
399
+ //#endregion
400
+ //#region src/matcher/types.d.ts
401
+ /**
402
+ * Normalized version of a {@link RouteRecord | route record}.
403
+ */
404
+ interface RouteRecordNormalized {
405
+ /**
406
+ * {@inheritDoc _RouteRecordBase.path}
407
+ */
408
+ path: _RouteRecordBase['path'];
409
+ /**
410
+ * {@inheritDoc _RouteRecordBase.redirect}
411
+ */
412
+ redirect: _RouteRecordBase['redirect'] | undefined;
413
+ /**
414
+ * {@inheritDoc _RouteRecordBase.name}
415
+ */
416
+ name: _RouteRecordBase['name'];
417
+ /**
418
+ * {@inheritDoc RouteRecordMultipleViews.components}
419
+ */
420
+ components: RouteRecordMultipleViews['components'] | null | undefined;
421
+ /**
422
+ * Contains the original modules for lazy loaded components.
423
+ * @internal
424
+ */
425
+ mods: Record<string, unknown>;
426
+ /**
427
+ * Nested route records.
428
+ */
429
+ children: RouteRecordRaw[];
430
+ /**
431
+ * {@inheritDoc _RouteRecordBase.meta}
432
+ */
433
+ meta: Exclude<_RouteRecordBase['meta'], void>;
434
+ /**
435
+ * {@inheritDoc RouteRecordMultipleViews.props}
436
+ */
437
+ props: Record<string, _RouteRecordProps>;
438
+ /**
439
+ * Registered beforeEnter guards
440
+ */
441
+ beforeEnter: _RouteRecordBase['beforeEnter'];
442
+ /**
443
+ * Registered leave guards
444
+ *
445
+ * @internal
446
+ */
447
+ leaveGuards: Set<NavigationGuard>;
448
+ /**
449
+ * Registered update guards
450
+ *
451
+ * @internal
452
+ */
453
+ updateGuards: Set<NavigationGuard>;
454
+ /**
455
+ * Registered beforeRouteEnter callbacks passed to `next` or returned in guards
456
+ *
457
+ * @internal
458
+ */
459
+ enterCallbacks: Record<string, NavigationGuardNextCallback[]>;
460
+ /**
461
+ * Mounted route component instances
462
+ * Having the instances on the record mean beforeRouteUpdate and
463
+ * beforeRouteLeave guards can only be invoked with the latest mounted app
464
+ * instance if there are multiple application instances rendering the same
465
+ * view, basically duplicating the content on the page, which shouldn't happen
466
+ * in practice. It will work if multiple apps are rendering different named
467
+ * views.
468
+ */
469
+ instances: Record<string, ComponentPublicInstance | undefined | null>;
470
+ /**
471
+ * Defines if this record is the alias of another one. This property is
472
+ * `undefined` if the record is the original one.
473
+ */
474
+ aliasOf: RouteRecordNormalized | undefined;
475
+ }
476
+ /**
477
+ * {@inheritDoc RouteRecordNormalized}
478
+ */
479
+ type RouteRecord = RouteRecordNormalized;
480
+ //#endregion
481
+ //#region src/matcher/pathParserRanker.d.ts
482
+ type PathParams = Record<string, string | string[]>;
483
+ /**
484
+ * A param in a url like `/users/:id`
485
+ */
486
+ interface PathParserParamKey {
487
+ name: string;
488
+ repeatable: boolean;
489
+ optional: boolean;
490
+ }
491
+ interface PathParser {
492
+ /**
493
+ * The regexp used to match a url
494
+ */
495
+ re: RegExp;
496
+ /**
497
+ * The score of the parser
498
+ */
499
+ score: Array<number[]>;
500
+ /**
501
+ * Keys that appeared in the path
502
+ */
503
+ keys: PathParserParamKey[];
504
+ /**
505
+ * Parses a url and returns the matched params or null if it doesn't match. An
506
+ * optional param that isn't preset will be an empty string. A repeatable
507
+ * param will be an array if there is at least one value.
508
+ *
509
+ * @param path - url to parse
510
+ * @returns a Params object, empty if there are no params. `null` if there is
511
+ * no match
512
+ */
513
+ parse(path: string): PathParams | null;
514
+ /**
515
+ * Creates a string version of the url
516
+ *
517
+ * @param params - object of params
518
+ * @returns a url
519
+ */
520
+ stringify(params: PathParams): string;
521
+ }
522
+ /**
523
+ * @internal
524
+ */
525
+ interface _PathParserOptions {
526
+ /**
527
+ * Makes the RegExp case-sensitive.
528
+ *
529
+ * @defaultValue `false`
530
+ */
531
+ sensitive?: boolean;
532
+ /**
533
+ * Whether to disallow a trailing slash or not.
534
+ *
535
+ * @defaultValue `false`
536
+ */
537
+ strict?: boolean;
538
+ /**
539
+ * Should the RegExp match from the beginning by prepending a `^` to it.
540
+ * @internal
541
+ *
542
+ * @defaultValue `true`
543
+ */
544
+ start?: boolean;
545
+ /**
546
+ * Should the RegExp match until the end by appending a `$` to it.
547
+ *
548
+ * @deprecated this option will alsways be `true` in the future. Open a discussion in vuejs/router if you need this to be `false`
549
+ *
550
+ * @defaultValue `true`
551
+ */
552
+ end?: boolean;
553
+ }
554
+ type PathParserOptions = Pick<_PathParserOptions, 'end' | 'sensitive' | 'strict'>;
555
+ //#endregion
556
+ //#region src/matcher/pathMatcher.d.ts
557
+ interface RouteRecordMatcher extends PathParser {
558
+ record: RouteRecord;
559
+ parent: RouteRecordMatcher | undefined;
560
+ children: RouteRecordMatcher[];
561
+ alias: RouteRecordMatcher[];
562
+ }
563
+ //#endregion
564
+ //#region src/matcher/index.d.ts
565
+ /**
566
+ * Internal RouterMatcher
567
+ *
568
+ * @internal
569
+ */
570
+ interface RouterMatcher {
571
+ addRoute: (record: RouteRecordRaw, parent?: RouteRecordMatcher) => () => void;
572
+ removeRoute(matcher: RouteRecordMatcher): void;
573
+ removeRoute(name: NonNullable<RouteRecordNameGeneric>): void;
574
+ clearRoutes: () => void;
575
+ getRoutes: () => RouteRecordMatcher[];
576
+ getRecordMatcher: (name: NonNullable<RouteRecordNameGeneric>) => RouteRecordMatcher | undefined;
577
+ /**
578
+ * Resolves a location. Gives access to the route record that corresponds to the actual path as well as filling the corresponding params objects
579
+ *
580
+ * @param location - MatcherLocationRaw to resolve to a url
581
+ * @param currentLocation - MatcherLocation of the current location
582
+ */
583
+ resolve: (location: MatcherLocationRaw, currentLocation: MatcherLocation) => MatcherLocation;
584
+ }
585
+ /**
586
+ * Creates a Router Matcher.
587
+ *
588
+ * @internal
589
+ * @param routes - array of initial routes
590
+ * @param globalOptions - global route options
591
+ */
592
+ declare function createRouterMatcher(routes: Readonly<RouteRecordRaw[]>, globalOptions: PathParserOptions): RouterMatcher;
593
+ //#endregion
594
+ //#region src/history/common.d.ts
595
+ type HistoryLocation = string;
596
+ /**
597
+ * Allowed variables in HTML5 history state. Note that pushState clones the state
598
+ * passed and does not accept everything: e.g.: it doesn't accept symbols, nor
599
+ * functions as values. It also ignores Symbols as keys.
600
+ *
601
+ * @internal
602
+ */
603
+ type HistoryStateValue = string | number | boolean | null | undefined | HistoryState | HistoryStateArray;
604
+ /**
605
+ * Allowed HTML history.state
606
+ */
607
+ interface HistoryState {
608
+ [x: number]: HistoryStateValue;
609
+ [x: string]: HistoryStateValue;
610
+ }
611
+ /**
612
+ * Allowed arrays for history.state.
613
+ *
614
+ * @internal
615
+ */
616
+ interface HistoryStateArray extends Array<HistoryStateValue> {}
617
+ declare enum NavigationType {
618
+ pop = "pop",
619
+ push = "push",
620
+ }
621
+ declare enum NavigationDirection {
622
+ back = "back",
623
+ forward = "forward",
624
+ unknown = "",
625
+ }
626
+ interface NavigationInformation {
627
+ type: NavigationType;
628
+ direction: NavigationDirection;
629
+ delta: number;
630
+ }
631
+ interface NavigationCallback {
632
+ (to: HistoryLocation, from: HistoryLocation, information: NavigationInformation): void;
633
+ }
634
+ /**
635
+ * Interface implemented by History implementations that can be passed to the
636
+ * router as {@link Router.history}
637
+ *
638
+ * @alpha
639
+ */
640
+ interface RouterHistory {
641
+ /**
642
+ * Base path that is prepended to every url. This allows hosting an SPA at a
643
+ * sub-folder of a domain like `example.com/sub-folder` by having a `base` of
644
+ * `/sub-folder`
645
+ */
646
+ readonly base: string;
647
+ /**
648
+ * Current History location
649
+ */
650
+ readonly location: HistoryLocation;
651
+ /**
652
+ * Current History state
653
+ */
654
+ readonly state: HistoryState;
655
+ /**
656
+ * Navigates to a location. In the case of an HTML5 History implementation,
657
+ * this will call `history.pushState` to effectively change the URL.
658
+ *
659
+ * @param to - location to push
660
+ * @param data - optional {@link HistoryState} to be associated with the
661
+ * navigation entry
662
+ */
663
+ push(to: HistoryLocation, data?: HistoryState): void;
664
+ /**
665
+ * Same as {@link RouterHistory.push} but performs a `history.replaceState`
666
+ * instead of `history.pushState`
667
+ *
668
+ * @param to - location to set
669
+ * @param data - optional {@link HistoryState} to be associated with the
670
+ * navigation entry
671
+ */
672
+ replace(to: HistoryLocation, data?: HistoryState): void;
673
+ /**
674
+ * Traverses history in a given direction.
675
+ *
676
+ * @example
677
+ * ```js
678
+ * myHistory.go(-1) // equivalent to window.history.back()
679
+ * myHistory.go(1) // equivalent to window.history.forward()
680
+ * ```
681
+ *
682
+ * @param delta - distance to travel. If delta is \< 0, it will go back,
683
+ * if it's \> 0, it will go forward by that amount of entries.
684
+ * @param triggerListeners - whether this should trigger listeners attached to
685
+ * the history
686
+ */
687
+ go(delta: number, triggerListeners?: boolean): void;
688
+ /**
689
+ * Attach a listener to the History implementation that is triggered when the
690
+ * navigation is triggered from outside (like the Browser back and forward
691
+ * buttons) or when passing `true` to {@link RouterHistory.back} and
692
+ * {@link RouterHistory.forward}
693
+ *
694
+ * @param callback - listener to attach
695
+ * @returns a callback to remove the listener
696
+ */
697
+ listen(callback: NavigationCallback): () => void;
698
+ /**
699
+ * Generates the corresponding href to be used in an anchor tag.
700
+ *
701
+ * @param location - history location that should create an href
702
+ */
703
+ createHref(location: HistoryLocation): string;
704
+ /**
705
+ * Clears any event listener attached by the history implementation.
706
+ */
707
+ destroy(): void;
708
+ }
709
+ //#endregion
710
+ //#region src/types/index.d.ts
711
+ type Lazy<T> = () => Promise<T>;
712
+ /**
713
+ * @internal
714
+ */
715
+ type RouteParamValue = string;
716
+ /**
717
+ * @internal
718
+ */
719
+ type RouteParamValueRaw = RouteParamValue | number | null | undefined;
720
+ type RouteParamsGeneric = Record<string, RouteParamValue | RouteParamValue[]>;
721
+ type RouteParamsRawGeneric = Record<string, RouteParamValueRaw | Exclude<RouteParamValueRaw, null | undefined>[]>;
722
+ /**
723
+ * @internal
724
+ */
725
+ interface RouteQueryAndHash {
726
+ query?: LocationQueryRaw;
727
+ hash?: string;
728
+ }
729
+ /**
730
+ * @internal
731
+ */
732
+ interface MatcherLocationAsPath {
733
+ path: string;
734
+ }
735
+ /**
736
+ * @internal
737
+ */
738
+ interface MatcherLocationAsName {
739
+ name: RouteRecordNameGeneric;
740
+ /**
741
+ * Ignored path property since we are dealing with a relative location. Only `undefined` is allowed.
742
+ */
743
+ path?: undefined;
744
+ params?: RouteParamsGeneric;
745
+ }
746
+ /**
747
+ * @internal
748
+ */
749
+ interface MatcherLocationAsRelative {
750
+ /**
751
+ * Ignored path property since we are dealing with a relative location. Only `undefined` is allowed.
752
+ */
753
+ path?: undefined;
754
+ params?: RouteParamsGeneric;
755
+ }
756
+ /**
757
+ * @internal
758
+ */
759
+ interface LocationAsRelativeRaw {
760
+ name?: RouteRecordNameGeneric;
761
+ /**
762
+ * Ignored path property since we are dealing with a relative location. Only `undefined` is allowed.
763
+ */
764
+ path?: undefined;
765
+ params?: RouteParamsRawGeneric;
766
+ }
767
+ /**
768
+ * Common options for all navigation methods.
769
+ */
770
+ interface RouteLocationOptions {
771
+ /**
772
+ * Replace the entry in the history instead of pushing a new entry
773
+ */
774
+ replace?: boolean;
775
+ /**
776
+ * Triggers the navigation even if the location is the same as the current one.
777
+ * Note this will also add a new entry to the history unless `replace: true`
778
+ * is passed.
779
+ */
780
+ force?: boolean;
781
+ /**
782
+ * State to save using the History API. This cannot contain any reactive
783
+ * values and some primitives like Symbols are forbidden. More info at
784
+ * https://developer.mozilla.org/en-US/docs/Web/API/History/state
785
+ */
786
+ state?: HistoryState;
787
+ }
788
+ /**
789
+ * Route Location that can infer the necessary params based on the name.
790
+ *
791
+ * @internal
792
+ */
793
+ interface RouteLocationNamedRaw extends RouteQueryAndHash, LocationAsRelativeRaw, RouteLocationOptions {}
794
+ /**
795
+ * Route Location that can infer the possible paths.
796
+ *
797
+ * @internal
798
+ */
799
+ interface RouteLocationPathRaw extends RouteQueryAndHash, MatcherLocationAsPath, RouteLocationOptions {}
800
+ interface RouteLocationMatched extends RouteRecordNormalized {
801
+ components: Record<string, RouteComponent> | null | undefined;
802
+ }
803
+ /**
804
+ * Base properties for a normalized route location.
805
+ *
806
+ * @internal
807
+ */
808
+ interface _RouteLocationBase extends Pick<MatcherLocation, 'name' | 'path' | 'params' | 'meta'> {
809
+ /**
810
+ * The whole location including the `search` and `hash`. This string is
811
+ * percentage encoded.
812
+ */
813
+ fullPath: string;
814
+ /**
815
+ * Object representation of the `search` property of the current location.
816
+ */
817
+ query: LocationQuery;
818
+ /**
819
+ * Hash of the current location. If present, starts with a `#`.
820
+ */
821
+ hash: string;
822
+ /**
823
+ * Contains the location we were initially trying to access before ending up
824
+ * on the current location.
825
+ */
826
+ redirectedFrom: RouteLocation | undefined;
827
+ }
828
+ /**
829
+ * Allowed Component in {@link RouteLocationMatched}
830
+ */
831
+ type RouteComponent = Component | DefineComponent;
832
+ /**
833
+ * Allowed Component definitions in route records provided by the user
834
+ */
835
+ type RawRouteComponent = RouteComponent | Lazy<RouteComponent>;
836
+ /**
837
+ * Internal type for common properties among all kind of {@link RouteRecordRaw}.
838
+ */
839
+ interface _RouteRecordBase extends PathParserOptions {
840
+ /**
841
+ * Path of the record. Should start with `/` unless the record is the child of
842
+ * another record.
843
+ *
844
+ * @example `/users/:id` matches `/users/1` as well as `/users/posva`.
845
+ */
846
+ path: string;
847
+ /**
848
+ * Where to redirect if the route is directly matched. The redirection happens
849
+ * before any navigation guard and triggers a new navigation with the new
850
+ * target location.
851
+ */
852
+ redirect?: RouteRecordRedirectOption;
853
+ /**
854
+ * Aliases for the record. Allows defining extra paths that will behave like a
855
+ * copy of the record. Allows having paths shorthands like `/users/:id` and
856
+ * `/u/:id`. All `alias` and `path` values must share the same params.
857
+ */
858
+ alias?: string | string[];
859
+ /**
860
+ * Name for the route record. Must be unique.
861
+ */
862
+ name?: RouteRecordNameGeneric;
863
+ /**
864
+ * Before Enter guard specific to this record. Note `beforeEnter` has no
865
+ * effect if the record has a `redirect` property.
866
+ */
867
+ beforeEnter?: NavigationGuardWithThis<undefined> | NavigationGuardWithThis<undefined>[];
868
+ /**
869
+ * Arbitrary data attached to the record.
870
+ */
871
+ meta?: RouteMeta;
872
+ /**
873
+ * Array of nested routes.
874
+ */
875
+ children?: RouteRecordRaw[];
876
+ /**
877
+ * Allow passing down params as props to the component rendered by `router-view`.
878
+ */
879
+ props?: _RouteRecordProps | Record<string, _RouteRecordProps>;
880
+ }
881
+ /**
882
+ * Interface to type `meta` fields in route records.
883
+ *
884
+ * @example
885
+ *
886
+ * ```ts
887
+ * // typings.d.ts or router.ts
888
+ * import 'vue-router';
889
+ *
890
+ * declare module 'vue-router' {
891
+ * interface RouteMeta {
892
+ * requiresAuth?: boolean
893
+ * }
894
+ * }
895
+ * ```
896
+ */
897
+ interface RouteMeta extends Record<PropertyKey, unknown> {}
898
+ /**
899
+ * Route Record defining one single component with the `component` option.
900
+ */
901
+ interface RouteRecordSingleView extends _RouteRecordBase {
902
+ /**
903
+ * Component to display when the URL matches this route.
904
+ */
905
+ component: RawRouteComponent;
906
+ components?: never;
907
+ children?: never;
908
+ redirect?: never;
909
+ /**
910
+ * Allow passing down params as props to the component rendered by `router-view`.
911
+ */
912
+ props?: _RouteRecordProps;
913
+ }
914
+ /**
915
+ * Route Record defining one single component with a nested view. Differently
916
+ * from {@link RouteRecordSingleView}, this record has children and allows a
917
+ * `redirect` option.
918
+ */
919
+ interface RouteRecordSingleViewWithChildren extends _RouteRecordBase {
920
+ /**
921
+ * Component to display when the URL matches this route.
922
+ */
923
+ component?: RawRouteComponent | null | undefined;
924
+ components?: never;
925
+ children: RouteRecordRaw[];
926
+ /**
927
+ * Allow passing down params as props to the component rendered by `router-view`.
928
+ */
929
+ props?: _RouteRecordProps;
930
+ }
931
+ /**
932
+ * Route Record defining multiple named components with the `components` option.
933
+ */
934
+ interface RouteRecordMultipleViews extends _RouteRecordBase {
935
+ /**
936
+ * Components to display when the URL matches this route. Allow using named views.
937
+ */
938
+ components: Record<string, RawRouteComponent>;
939
+ component?: never;
940
+ children?: never;
941
+ redirect?: never;
942
+ /**
943
+ * Allow passing down params as props to the component rendered by
944
+ * `router-view`. Should be an object with the same keys as `components` or a
945
+ * boolean to be applied to every component.
946
+ */
947
+ props?: Record<string, _RouteRecordProps> | boolean;
948
+ }
949
+ /**
950
+ * Route Record defining multiple named components with the `components` option and children.
951
+ */
952
+ interface RouteRecordMultipleViewsWithChildren extends _RouteRecordBase {
953
+ /**
954
+ * Components to display when the URL matches this route. Allow using named views.
955
+ */
956
+ components?: Record<string, RawRouteComponent> | null | undefined;
957
+ component?: never;
958
+ children: RouteRecordRaw[];
959
+ /**
960
+ * Allow passing down params as props to the component rendered by
961
+ * `router-view`. Should be an object with the same keys as `components` or a
962
+ * boolean to be applied to every component.
963
+ */
964
+ props?: Record<string, _RouteRecordProps> | boolean;
965
+ }
966
+ /**
967
+ * Route Record that defines a redirect. Cannot have `component` or `components`
968
+ * as it is never rendered.
969
+ */
970
+ interface RouteRecordRedirect extends _RouteRecordBase {
971
+ redirect: RouteRecordRedirectOption;
972
+ component?: never;
973
+ components?: never;
974
+ props?: never;
975
+ }
976
+ type RouteRecordRaw = RouteRecordSingleView | RouteRecordSingleViewWithChildren | RouteRecordMultipleViews | RouteRecordMultipleViewsWithChildren | RouteRecordRedirect;
977
+ /**
978
+ * Route location that can be passed to the matcher.
979
+ */
980
+ type MatcherLocationRaw = MatcherLocationAsPath | MatcherLocationAsName | MatcherLocationAsRelative;
981
+ /**
982
+ * Normalized/resolved Route location that returned by the matcher.
983
+ */
984
+ interface MatcherLocation {
985
+ /**
986
+ * Name of the matched record
987
+ */
988
+ name: RouteRecordNameGeneric | null | undefined;
989
+ /**
990
+ * Percentage encoded pathname section of the URL.
991
+ */
992
+ path: string;
993
+ /**
994
+ * Object of decoded params extracted from the `path`.
995
+ */
996
+ params: RouteParamsGeneric;
997
+ /**
998
+ * Merged `meta` properties from all the matched route records.
999
+ */
1000
+ meta: RouteMeta;
1001
+ /**
1002
+ * Array of {@link RouteRecord} containing components as they were
1003
+ * passed when adding records. It can also contain redirect records. This
1004
+ * can't be used directly
1005
+ */
1006
+ matched: RouteRecord[];
1007
+ }
1008
+ //#endregion
1009
+ //#region src/errors.d.ts
1010
+ /**
1011
+ * Flags so we can combine them when checking for multiple errors. This is the internal version of
1012
+ * {@link NavigationFailureType}.
1013
+ *
1014
+ * @internal
1015
+ */
1016
+ declare const enum ErrorTypes {
1017
+ MATCHER_NOT_FOUND = 1,
1018
+ NAVIGATION_GUARD_REDIRECT = 2,
1019
+ NAVIGATION_ABORTED = 4,
1020
+ NAVIGATION_CANCELLED = 8,
1021
+ NAVIGATION_DUPLICATED = 16,
1022
+ }
1023
+ /**
1024
+ * Enumeration with all possible types for navigation failures. Can be passed to
1025
+ * {@link isNavigationFailure} to check for specific failures.
1026
+ */
1027
+ declare enum NavigationFailureType {
1028
+ /**
1029
+ * An aborted navigation is a navigation that failed because a navigation
1030
+ * guard returned `false` or called `next(false)`
1031
+ */
1032
+ aborted = 4,
1033
+ /**
1034
+ * A cancelled navigation is a navigation that failed because a more recent
1035
+ * navigation finished started (not necessarily finished).
1036
+ */
1037
+ cancelled = 8,
1038
+ /**
1039
+ * A duplicated navigation is a navigation that failed because it was
1040
+ * initiated while already being at the exact same location.
1041
+ */
1042
+ duplicated = 16,
1043
+ }
1044
+ /**
1045
+ * Extended Error that contains extra information regarding a failed navigation.
1046
+ */
1047
+ interface NavigationFailure extends Error {
1048
+ /**
1049
+ * Type of the navigation. One of {@link NavigationFailureType}
1050
+ */
1051
+ type: ErrorTypes.NAVIGATION_CANCELLED | ErrorTypes.NAVIGATION_ABORTED | ErrorTypes.NAVIGATION_DUPLICATED;
1052
+ /**
1053
+ * Route location we were navigating from
1054
+ */
1055
+ from: RouteLocationNormalized;
1056
+ /**
1057
+ * Route location we were navigating to
1058
+ */
1059
+ to: RouteLocationNormalized;
1060
+ }
1061
+ /**
1062
+ * Internal error used to detect a redirection.
1063
+ *
1064
+ * @internal
1065
+ */
1066
+ interface NavigationRedirectError extends Omit<NavigationFailure, 'to' | 'type'> {
1067
+ type: ErrorTypes.NAVIGATION_GUARD_REDIRECT;
1068
+ to: RouteLocationRaw;
1069
+ }
1070
+ /**
1071
+ * Check if an object is a {@link NavigationFailure}.
1072
+ *
1073
+ * @param error - possible {@link NavigationFailure}
1074
+ * @param type - optional types to check for
1075
+ *
1076
+ * @example
1077
+ * ```js
1078
+ * import { isNavigationFailure, NavigationFailureType } from 'vue-router'
1079
+ *
1080
+ * router.afterEach((to, from, failure) => {
1081
+ * // Any kind of navigation failure
1082
+ * if (isNavigationFailure(failure)) {
1083
+ * // ...
1084
+ * }
1085
+ * // Only duplicated navigations
1086
+ * if (isNavigationFailure(failure, NavigationFailureType.duplicated)) {
1087
+ * // ...
1088
+ * }
1089
+ * // Aborted or canceled navigations
1090
+ * if (isNavigationFailure(failure, NavigationFailureType.aborted | NavigationFailureType.cancelled )) {
1091
+ * // ...
1092
+ * }
1093
+ * })
1094
+ * ```
1095
+ */
1096
+ declare function isNavigationFailure(error: any, type?: ErrorTypes.NAVIGATION_GUARD_REDIRECT): error is NavigationRedirectError;
1097
+ declare function isNavigationFailure(error: any, type?: ErrorTypes | NavigationFailureType): error is NavigationFailure;
1098
+ /**
1099
+ * Internal type to define an ErrorHandler
1100
+ *
1101
+ * @param error - error thrown
1102
+ * @param to - location we were navigating to when the error happened
1103
+ * @param from - location we were navigating from when the error happened
1104
+ * @internal
1105
+ */
1106
+ interface _ErrorListener {
1107
+ (error: any, to: RouteLocationNormalized, from: RouteLocationNormalizedLoaded): any;
1108
+ }
1109
+ //#endregion
1110
+ //#region src/scrollBehavior.d.ts
1111
+ /**
1112
+ * Scroll position similar to
1113
+ * {@link https://developer.mozilla.org/en-US/docs/Web/API/ScrollToOptions | `ScrollToOptions`}.
1114
+ * Note that not all browsers support `behavior`.
1115
+ */
1116
+ type ScrollPositionCoordinates = {
1117
+ behavior?: ScrollOptions['behavior'];
1118
+ left?: number;
1119
+ top?: number;
1120
+ };
1121
+ /**
1122
+ * Internal normalized version of {@link ScrollPositionCoordinates} that always
1123
+ * has `left` and `top` coordinates. Must be a type to be assignable to HistoryStateValue.
1124
+ *
1125
+ * @internal
1126
+ */
1127
+ type _ScrollPositionNormalized = {
1128
+ behavior?: ScrollOptions['behavior'];
1129
+ left: number;
1130
+ top: number;
1131
+ };
1132
+ /**
1133
+ * Type of the `scrollBehavior` option that can be passed to `createRouter`.
1134
+ */
1135
+ interface RouterScrollBehavior {
1136
+ /**
1137
+ * @param to - Route location where we are navigating to
1138
+ * @param from - Route location where we are navigating from
1139
+ * @param savedPosition - saved position if it exists, `null` otherwise
1140
+ */
1141
+ (to: RouteLocationNormalized, from: RouteLocationNormalizedLoaded, savedPosition: _ScrollPositionNormalized | null): Awaitable<ScrollPosition | false | void>;
1142
+ }
1143
+ interface ScrollPositionElement extends ScrollToOptions {
1144
+ /**
1145
+ * A valid CSS selector. Note some characters must be escaped in id selectors (https://mathiasbynens.be/notes/css-escapes).
1146
+ * @example
1147
+ * Here are a few examples:
1148
+ *
1149
+ * - `.title`
1150
+ * - `.content:first-child`
1151
+ * - `#marker`
1152
+ * - `#marker\~with\~symbols`
1153
+ * - `#marker.with.dot`: selects `class="with dot" id="marker"`, not `id="marker.with.dot"`
1154
+ *
1155
+ */
1156
+ el: string | Element;
1157
+ }
1158
+ type ScrollPosition = ScrollPositionCoordinates | ScrollPositionElement;
1159
+ type Awaitable<T> = T | PromiseLike<T>;
1160
+ //#endregion
1161
+ //#region src/experimental/route-resolver/matchers/param-parsers/types.d.ts
1162
+ /**
1163
+ * Defines a parser that can read a param from the url (string-based) and
1164
+ * transform it into a more complex type, or vice versa.
1165
+ *
1166
+ * @see MatcherPattern
1167
+ */
1168
+ interface ParamParser<TParam = MatcherQueryParamsValue, TUrlParam = MatcherQueryParamsValue, TParamRaw = TParam> {
1169
+ get?: (value: NoInfer<TUrlParam>) => TParam;
1170
+ set?: (value: TParamRaw) => TUrlParam;
1171
+ }
1172
+ //#endregion
1173
+ //#region src/experimental/route-resolver/matchers/matcher-pattern.d.ts
1174
+ /**
1175
+ * Base interface for matcher patterns that extract params from a URL.
1176
+ *
1177
+ * @template TIn - type of the input value to match against the pattern
1178
+ * @template TParams - type of the output value after matching
1179
+ * @template TParamsRaw - type of the input value to build the input from
1180
+ *
1181
+ * In the case of the `path`, the `TIn` is a `string`, but in the case of the
1182
+ * query, it's the object of query params. `TParamsRaw` allows for a more permissive
1183
+ * type when building the value, for example allowing numbers and strings like
1184
+ * the old params.
1185
+ *
1186
+ * @internal this is the base interface for all matcher patterns, it shouldn't
1187
+ * be used directly
1188
+ */
1189
+ interface MatcherPattern<TIn = string, TParams extends MatcherParamsFormatted = MatcherParamsFormatted, TParamsRaw extends MatcherParamsFormatted = TParams> {
1190
+ /**
1191
+ * Matches a serialized params value against the pattern.
1192
+ *
1193
+ * @param value - params value to parse
1194
+ * @throws {MatchMiss} if the value doesn't match
1195
+ * @returns parsed params object
1196
+ */
1197
+ match(value: TIn): TParams;
1198
+ /**
1199
+ * Build a serializable value from parsed params. Should apply encoding if the
1200
+ * returned value is a string (e.g path and hash should be encoded but query
1201
+ * shouldn't).
1202
+ *
1203
+ * @param value - params value to parse
1204
+ * @returns serialized params value
1205
+ */
1206
+ build(params: TParamsRaw): TIn;
1207
+ }
1208
+ /**
1209
+ * Handles the `path` part of a URL. It can transform a path string into an
1210
+ * object of params and vice versa.
1211
+ */
1212
+ interface MatcherPatternPath<TParams extends MatcherParamsFormatted = MatcherParamsFormatted,
1213
+ // | null // | undefined // | void // so it might be a bit more convenient
1214
+ TParamsRaw extends MatcherParamsFormatted = TParams> extends MatcherPattern<string, TParams, TParamsRaw> {}
1215
+ /**
1216
+ * Allows matching a static path.
1217
+ *
1218
+ * @example
1219
+ * ```ts
1220
+ * const matcher = new MatcherPatternPathStatic('/team')
1221
+ * matcher.match('/team') // {}
1222
+ * matcher.match('/team/123') // throws MatchMiss
1223
+ * matcher.build() // '/team'
1224
+ * ```
1225
+ */
1226
+ declare class MatcherPatternPathStatic implements MatcherPatternPath<EmptyParams> {
1227
+ readonly path: string;
1228
+ /**
1229
+ * lowercase version of the path to match against.
1230
+ * This is used to make the matching case insensitive.
1231
+ */
1232
+ private pathi;
1233
+ constructor(path: string);
1234
+ match(path: string): EmptyParams;
1235
+ build(): string;
1236
+ }
1237
+ /**
1238
+ * Options for param parsers in {@link MatcherPatternPathDynamic}.
1239
+ */
1240
+ type MatcherPatternPathDynamic_ParamOptions<TUrlParam extends string | string[] | null = string | string[] | null, TParam = string | string[] | null, TParamRaw = TParam> = readonly [
1241
+ /**
1242
+ * Param parser to use for this param.
1243
+ */
1244
+ parser?: ParamParser<TParam, TUrlParam, TParamRaw>,
1245
+ /**
1246
+ * Is tha param a repeatable param and should be converted to an array
1247
+ */
1248
+ repeatable?: boolean,
1249
+ /**
1250
+ * Can this parameter be omitted or empty (for repeatable params, an empty array).
1251
+ */
1252
+ optional?: boolean];
1253
+ /**
1254
+ * Helper type to extract the params from the options object.
1255
+ *
1256
+ * @internal
1257
+ */
1258
+ type ExtractParamTypeFromOptions<TParamsOptions> = { [K in keyof TParamsOptions]: TParamsOptions[K] extends MatcherPatternPathDynamic_ParamOptions<any, infer TParam, any> ? TParam : never };
1259
+ /**
1260
+ * Helper type to extract the raw params from the options object.
1261
+ *
1262
+ * @internal
1263
+ */
1264
+ type ExtractLocationParamTypeFromOptions<TParamsOptions> = { [K in keyof TParamsOptions]: TParamsOptions[K] extends MatcherPatternPathDynamic_ParamOptions<any, any, infer TParamRaw> ? TParamRaw : never };
1265
+ /**
1266
+ * Handles the `path` part of a URL with dynamic parameters.
1267
+ */
1268
+ declare class MatcherPatternPathDynamic<TParamsOptions> implements MatcherPatternPath<ExtractParamTypeFromOptions<TParamsOptions>, ExtractLocationParamTypeFromOptions<TParamsOptions>> {
1269
+ readonly re: RegExp;
1270
+ readonly params: TParamsOptions & Record<string, MatcherPatternPathDynamic_ParamOptions<any, any>>;
1271
+ readonly pathParts: Array<string | number | Array<string | number>>;
1272
+ readonly trailingSlash: boolean | null;
1273
+ /**
1274
+ * Cached keys of the {@link params} object.
1275
+ */
1276
+ private paramsKeys;
1277
+ /**
1278
+ * Creates a new dynamic path matcher.
1279
+ *
1280
+ * @param re - regex to match the path against
1281
+ * @param params - object of param parsers as {@link MatcherPatternPathDynamic_ParamOptions}
1282
+ * @param pathParts - array of path parts, where strings are static parts, 1 are regular params, and 0 are splat params (not encode slash)
1283
+ * @param trailingSlash - whether the path should end with a trailing slash, null means "do not care" (for trailing splat params)
1284
+ */
1285
+ constructor(re: RegExp, params: TParamsOptions & Record<string, MatcherPatternPathDynamic_ParamOptions<any, any>>, pathParts: Array<string | number | Array<string | number>>, trailingSlash?: boolean | null);
1286
+ match(path: string): Simplify<ExtractParamTypeFromOptions<TParamsOptions>>;
1287
+ build(params: Simplify<ExtractLocationParamTypeFromOptions<TParamsOptions>>): string;
1288
+ }
1289
+ /**
1290
+ * Handles the `hash` part of a URL. It can transform a hash string into an
1291
+ * object of params and vice versa.
1292
+ */
1293
+ interface MatcherPatternHash<TParams extends MatcherParamsFormatted = MatcherParamsFormatted> extends MatcherPattern<string, TParams> {}
1294
+ /**
1295
+ * Generic object of params that can be passed to a matcher.
1296
+ */
1297
+ type MatcherParamsFormatted = Record<string, unknown>;
1298
+ /**
1299
+ * Empty object in TS.
1300
+ */
1301
+ type EmptyParams = Record<PropertyKey, never>;
1302
+ /**
1303
+ * Possible values for query params in a matcher.
1304
+ */
1305
+ type MatcherQueryParamsValue = string | null | undefined | Array<string | null>;
1306
+ type MatcherQueryParams = Record<string, MatcherQueryParamsValue>;
1307
+ //#endregion
1308
+ //#region src/location.d.ts
1309
+ /**
1310
+ * Location object returned by {@link `parseURL`}.
1311
+ * @internal
1312
+ */
1313
+ interface LocationNormalized {
1314
+ path: string;
1315
+ fullPath: string;
1316
+ hash: string;
1317
+ query: LocationQuery;
1318
+ }
1319
+ /**
1320
+ * Initial route location where the router is. Can be used in navigation guards
1321
+ * to differentiate the initial navigation.
1322
+ *
1323
+ * @example
1324
+ * ```js
1325
+ * import { START_LOCATION } from 'vue-router'
1326
+ *
1327
+ * router.beforeEach((to, from) => {
1328
+ * if (from === START_LOCATION) {
1329
+ * // initial navigation
1330
+ * }
1331
+ * })
1332
+ * ```
1333
+ */
1334
+ declare const START_LOCATION_NORMALIZED: RouteLocationNormalizedLoaded;
1335
+ //#endregion
1336
+ //#region src/experimental/route-resolver/resolver-abstract.d.ts
1337
+ /**
1338
+ * Allowed types for a matcher name.
1339
+ */
1340
+ type RecordName = string | symbol;
1341
+ /**
1342
+ * Manage and resolve routes. Also handles the encoding, decoding, parsing and
1343
+ * serialization of params, query, and hash.
1344
+ *
1345
+ * - `TMatcherRecordRaw` represents the raw record type passed to {@link addMatcher}.
1346
+ * - `TMatcherRecord` represents the normalized record type returned by {@link getRoutes}.
1347
+ */
1348
+ interface EXPERIMENTAL_Resolver_Base<TRecord> {
1349
+ /**
1350
+ * Resolves an absolute location (like `/path/to/somewhere`).
1351
+ *
1352
+ * @param absoluteLocation - The absolute location to resolve.
1353
+ * @param currentLocation - This value is ignored and should not be passed if the location is absolute.
1354
+ */
1355
+ resolve(absoluteLocation: `/${string}`, currentLocation?: undefined): ResolverLocationResolved<TRecord>;
1356
+ /**
1357
+ * Resolves a string location relative to another location. A relative
1358
+ * location can be `./same-folder`, `../parent-folder`, `same-folder`, or
1359
+ * even `?page=2`.
1360
+ */
1361
+ resolve(relativeLocation: string, currentLocation: ResolverLocationResolved<TRecord>): ResolverLocationResolved<TRecord>;
1362
+ /**
1363
+ * Resolves a location by its name. Any required params or query must be
1364
+ * passed in the `options` argument.
1365
+ */
1366
+ resolve(location: ResolverLocationAsNamed, currentLocation?: undefined): ResolverLocationResolved<TRecord>;
1367
+ /**
1368
+ * Resolves a location by its absolute path (starts with `/`). Any required query must be passed.
1369
+ *
1370
+ * @param location - The location to resolve.
1371
+ */
1372
+ resolve(location: ResolverLocationAsPathAbsolute, currentLocation?: undefined): ResolverLocationResolved<TRecord>;
1373
+ resolve(location: ResolverLocationAsPathRelative, currentLocation: ResolverLocationResolved<TRecord>): ResolverLocationResolved<TRecord>;
1374
+ /**
1375
+ * Resolves a location relative to another location. It reuses existing
1376
+ * properties in the `currentLocation` like `params`, `query`, and `hash`.
1377
+ */
1378
+ resolve(relativeLocation: ResolverLocationAsRelative, currentLocation: ResolverLocationResolved<TRecord>): ResolverLocationResolved<TRecord>;
1379
+ /**
1380
+ * Get a list of all resolver route records.
1381
+ */
1382
+ getRoutes(): TRecord[];
1383
+ /**
1384
+ * Get a resolver record by its name.
1385
+ * Previously named `getRecordMatcher()`
1386
+ */
1387
+ getRoute(name: RecordName): TRecord | undefined;
1388
+ }
1389
+ /**
1390
+ * Returned location object by {@link EXPERIMENTAL_Resolver_Base['resolve']}.
1391
+ * It contains the resolved name, params, query, hash, and matched records.
1392
+ */
1393
+ interface ResolverLocationResolved<TMatched> extends LocationNormalized {
1394
+ /**
1395
+ * Name of the route record. A symbol if no name is provided.
1396
+ */
1397
+ name: RecordName;
1398
+ /**
1399
+ * Parsed params. Already decoded and formatted.
1400
+ */
1401
+ params: MatcherParamsFormatted;
1402
+ /**
1403
+ * Chain of route records that lead to the matched one. The last record is
1404
+ * the the one that matched the location. Each previous record is the parent
1405
+ * of the next one.
1406
+ */
1407
+ matched: TMatched[];
1408
+ }
1409
+ /**
1410
+ * Location object that can be passed to {@link
1411
+ * EXPERIMENTAL_Resolver_Base['resolve']} and is recognized as a `name`.
1412
+ *
1413
+ * @example
1414
+ * ```ts
1415
+ * resolver.resolve({ name: 'user', params: { id: 123 } })
1416
+ * resolver.resolve({ name: 'user-search', params: {}, query: { page: 2 } })
1417
+ * ```
1418
+ */
1419
+ interface ResolverLocationAsNamed {
1420
+ name: RecordName;
1421
+ params: MatcherParamsFormatted;
1422
+ query?: LocationQueryRaw;
1423
+ hash?: string;
1424
+ /**
1425
+ * @deprecated This is ignored when `name` is provided
1426
+ */
1427
+ path?: undefined;
1428
+ }
1429
+ /**
1430
+ * Location object that can be passed to {@link EXPERIMENTAL_Resolver_Base['resolve']}
1431
+ * and is recognized as a relative path.
1432
+ *
1433
+ * @example
1434
+ * ```ts
1435
+ * resolver.resolve({ path: './123' }, currentLocation)
1436
+ * resolver.resolve({ path: '..' }, currentLocation)
1437
+ * ```
1438
+ */
1439
+ interface ResolverLocationAsPathRelative {
1440
+ path: string;
1441
+ query?: LocationQueryRaw;
1442
+ hash?: string;
1443
+ /**
1444
+ * @deprecated This is ignored when `path` is provided
1445
+ */
1446
+ name?: undefined;
1447
+ /**
1448
+ * @deprecated This is ignored when `path` (instead of `name`) is provided
1449
+ */
1450
+ params?: undefined;
1451
+ }
1452
+ /**
1453
+ * Location object that can be passed to {@link EXPERIMENTAL_Resolver_Base['resolve']}
1454
+ * and is recognized as an absolute path.
1455
+ *
1456
+ * @example
1457
+ * ```ts
1458
+ * resolver.resolve({ path: '/team/123' })
1459
+ * ```
1460
+ */
1461
+ interface ResolverLocationAsPathAbsolute extends ResolverLocationAsPathRelative {
1462
+ path: `/${string}`;
1463
+ }
1464
+ /**
1465
+ * Relative location object that can be passed to {@link EXPERIMENTAL_Resolver_Base['resolve']}
1466
+ * and is recognized as a relative location, copying the `params`, `query`, and
1467
+ * `hash` if not provided.
1468
+ *
1469
+ * @example
1470
+ * ```ts
1471
+ * resolver.resolve({ params: { id: 123 } }, currentLocation)
1472
+ * resolver.resolve({ hash: '#bottom' }, currentLocation)
1473
+ * ```
1474
+ */
1475
+ interface ResolverLocationAsRelative {
1476
+ params?: MatcherParamsFormatted;
1477
+ query?: LocationQueryRaw;
1478
+ hash?: string;
1479
+ /**
1480
+ * @deprecated This location is relative to the next parameter. This `name` will be ignored.
1481
+ */
1482
+ name?: undefined;
1483
+ /**
1484
+ * @deprecated This location is relative to the next parameter. This `path` will be ignored.
1485
+ */
1486
+ path?: undefined;
1487
+ }
1488
+ //#endregion
1489
+ //#region src/experimental/route-resolver/matchers/param-parsers/booleans.d.ts
1490
+ /**
1491
+ * Native Param parser for booleans.
1492
+ *
1493
+ * @internal
1494
+ */
1495
+ declare const PARAM_PARSER_BOOL: {
1496
+ get: (value: NoInfer<MatcherQueryParamsValue>) => boolean | boolean[] | undefined;
1497
+ set: (value: boolean | boolean[] | null | undefined) => string | string[] | null | undefined;
1498
+ };
1499
+ //#endregion
1500
+ //#region src/experimental/route-resolver/matchers/param-parsers/integers.d.ts
1501
+ /**
1502
+ * Native Param parser for integers.
1503
+ *
1504
+ * @internal
1505
+ */
1506
+ declare const PARAM_PARSER_INT: {
1507
+ get: (value: NoInfer<MatcherQueryParamsValue>) => number | number[] | null;
1508
+ set: (value: number | number[] | null) => string | string[] | null;
1509
+ };
1510
+ //#endregion
1511
+ //#region src/experimental/route-resolver/matchers/param-parsers/index.d.ts
1512
+ /**
1513
+ * Defines a path param parser.
1514
+ *
1515
+ * @param parser - the parser to define. Will be returned as is.
1516
+ *
1517
+ * @see {@link defineQueryParamParser}
1518
+ * @see {@link defineParamParser}
1519
+ */
1520
+ /*! #__NO_SIDE_EFFECTS__ */
1521
+ declare function definePathParamParser<TParam, TUrlParam extends string | string[] | null, TParamRaw>(parser: Required<ParamParser<TParam, TUrlParam, TParamRaw>>): Required<ParamParser<TParam, TUrlParam, TParamRaw>>;
1522
+ /**
1523
+ * Defines a query param parser. Note that query params can also be used as
1524
+ * path param parsers.
1525
+ *
1526
+ * @param parser - the parser to define. Will be returned as is.
1527
+ *
1528
+ * @see {@link definePathParamParser}
1529
+ * @see {@link defineParamParser}
1530
+ */
1531
+ /*! #__NO_SIDE_EFFECTS__ */
1532
+ declare function defineQueryParamParser<TParam, TParamRaw = TParam>(parser: Required<ParamParser<TParam, MatcherQueryParamsValue, TParamRaw>>): Required<ParamParser<TParam, MatcherQueryParamsValue, TParamRaw>>;
1533
+ /**
1534
+ * Alias for {@link defineQueryParamParser}. Implementing a param parser like this
1535
+ * works for path, query, and hash params.
1536
+ *
1537
+ * @see {@link defineQueryParamParser}
1538
+ * @see {@link definePathParamParser}
1539
+ */
1540
+ declare const defineParamParser: typeof defineQueryParamParser;
1541
+ //#endregion
1542
+ //#region src/experimental/route-resolver/matchers/matcher-pattern-query.d.ts
1543
+ /**
1544
+ * Handles the `query` part of a URL. It can transform a query object into an
1545
+ * object of params and vice versa.
1546
+ */
1547
+ interface MatcherPatternQuery<TParams extends MatcherParamsFormatted = MatcherParamsFormatted> extends MatcherPattern<MatcherQueryParams, TParams> {}
1548
+ /**
1549
+ * Matcher for a specific query parameter. It will read and write the parameter
1550
+ */
1551
+ declare class MatcherPatternQueryParam<T, ParamName extends string> implements MatcherPatternQuery<Record<ParamName, T>> {
1552
+ private paramName;
1553
+ private queryKey;
1554
+ private format;
1555
+ private parser;
1556
+ private defaultValue?;
1557
+ constructor(paramName: ParamName, queryKey: string, format: 'value' | 'array', parser?: ParamParser<T>, defaultValue?: ((() => T) | T) | undefined);
1558
+ match(query: MatcherQueryParams): Record<ParamName, T>;
1559
+ build(params: Record<ParamName, T>): MatcherQueryParams;
1560
+ }
1561
+ //#endregion
1562
+ //#region src/experimental/route-resolver/resolver-fixed.d.ts
1563
+ /**
1564
+ * Base interface for a resolver record that can be extended.
1565
+ */
1566
+ interface EXPERIMENTAL_ResolverRecord_Base {
1567
+ /**
1568
+ * Name of the matcher. Unique across all matchers. If missing, this record
1569
+ * cannot be matched. This is useful for grouping records.
1570
+ */
1571
+ name?: RecordName;
1572
+ /**
1573
+ * {@link MatcherPattern} for the path section of the URI.
1574
+ */
1575
+ path?: MatcherPatternPath;
1576
+ /**
1577
+ * {@link MatcherPattern} for the query section of the URI.
1578
+ */
1579
+ query?: MatcherPatternQuery[];
1580
+ /**
1581
+ * {@link MatcherPattern} for the hash section of the URI.
1582
+ */
1583
+ hash?: MatcherPatternHash;
1584
+ /**
1585
+ * Parent record. The parent can be a group or a matchable record.
1586
+ * It will be included in the `matched` array of a resolved location.
1587
+ */
1588
+ parent?: EXPERIMENTAL_ResolverRecord | null;
1589
+ }
1590
+ /**
1591
+ * A group can contain other useful properties like `meta` defined by the router.
1592
+ */
1593
+ interface EXPERIMENTAL_ResolverRecord_Group extends EXPERIMENTAL_ResolverRecord_Base {
1594
+ /**
1595
+ * A group route cannot be matched directly and cannot be named.
1596
+ */
1597
+ name?: undefined;
1598
+ /**
1599
+ * A group route can **only** match the `query`.
1600
+ */
1601
+ path?: undefined;
1602
+ /**
1603
+ * A group route can **only** match the `query`.
1604
+ */
1605
+ hash?: undefined;
1606
+ }
1607
+ /**
1608
+ * A matchable record is a record that can be matched by a path, query or hash
1609
+ * and will resolve to a location.
1610
+ */
1611
+ interface EXPERIMENTAL_ResolverRecord_Matchable extends EXPERIMENTAL_ResolverRecord_Base {
1612
+ name: RecordName;
1613
+ path: MatcherPatternPath;
1614
+ }
1615
+ /**
1616
+ * A record that can be passed to the resolver. It can be extended via the
1617
+ * `ExtensionT` type param.
1618
+ */
1619
+ type EXPERIMENTAL_ResolverRecord<ExtensionT = {}> = (EXPERIMENTAL_ResolverRecord_Matchable & ExtensionT) | (EXPERIMENTAL_ResolverRecord_Group & ExtensionT);
1620
+ /**
1621
+ * @alias EXPERIMENTAL_Resolver_Base
1622
+ */
1623
+ interface EXPERIMENTAL_ResolverFixed<TRecord> extends EXPERIMENTAL_Resolver_Base<TRecord> {}
1624
+ /**
1625
+ * Creates a fixed resolver that must have all records defined at creation
1626
+ * time.
1627
+ *
1628
+ * @template TRecord - extended type of the records
1629
+ * @param {TRecord[]} records - Ordered array of records that will be used to resolve routes
1630
+ * @returns a resolver that can be passed to the router
1631
+ */
1632
+ declare function createFixedResolver<TRecord extends EXPERIMENTAL_ResolverRecord_Matchable>(records: TRecord[]): EXPERIMENTAL_ResolverFixed<TRecord>;
1633
+ //#endregion
1634
+ //#region src/experimental/router.d.ts
1635
+ /**
1636
+ * Options to initialize a {@link Router} instance.
1637
+ */
1638
+ interface EXPERIMENTAL_RouterOptions_Base extends PathParserOptions {
1639
+ /**
1640
+ * History implementation used by the router. Most web applications should use
1641
+ * `createWebHistory` but it requires the server to be properly configured.
1642
+ * You can also use a _hash_ based history with `createWebHashHistory` that
1643
+ * does not require any configuration on the server but isn't handled at all
1644
+ * by search engines and does poorly on SEO.
1645
+ *
1646
+ * @example
1647
+ * ```js
1648
+ * createRouter({
1649
+ * history: createWebHistory(),
1650
+ * // other options...
1651
+ * })
1652
+ * ```
1653
+ */
1654
+ history: RouterHistory;
1655
+ /**
1656
+ * Function to control scrolling when navigating between pages. Can return a
1657
+ * Promise to delay scrolling.
1658
+ *
1659
+ * @see {@link RouterScrollBehavior}.
1660
+ *
1661
+ * @example
1662
+ * ```js
1663
+ * function scrollBehavior(to, from, savedPosition) {
1664
+ * // `to` and `from` are both route locations
1665
+ * // `savedPosition` can be null if there isn't one
1666
+ * }
1667
+ * ```
1668
+ */
1669
+ scrollBehavior?: RouterScrollBehavior;
1670
+ /**
1671
+ * Custom implementation to parse a query. See its counterpart,
1672
+ * {@link EXPERIMENTAL_RouterOptions_Base.stringifyQuery}.
1673
+ *
1674
+ * @example
1675
+ * Let's say you want to use the [qs package](https://github.com/ljharb/qs)
1676
+ * to parse queries, you can provide both `parseQuery` and `stringifyQuery`:
1677
+ * ```js
1678
+ * import qs from 'qs'
1679
+ *
1680
+ * createRouter({
1681
+ * // other options...
1682
+ * parseQuery: qs.parse,
1683
+ * stringifyQuery: qs.stringify,
1684
+ * })
1685
+ * ```
1686
+ */
1687
+ parseQuery?: typeof parseQuery;
1688
+ /**
1689
+ * Custom implementation to stringify a query object. Should not prepend a leading `?`.
1690
+ * {@link parseQuery} counterpart to handle query parsing.
1691
+ */
1692
+ stringifyQuery?: typeof stringifyQuery;
1693
+ /**
1694
+ * Default class applied to active {@link RouterLink}. If none is provided,
1695
+ * `router-link-active` will be applied.
1696
+ */
1697
+ linkActiveClass?: string;
1698
+ /**
1699
+ * Default class applied to exact active {@link RouterLink}. If none is provided,
1700
+ * `router-link-exact-active` will be applied.
1701
+ */
1702
+ linkExactActiveClass?: string;
1703
+ }
1704
+ /**
1705
+ * Internal type for common properties among all kind of {@link RouteRecordRaw}.
1706
+ */
1707
+ interface EXPERIMENTAL_RouteRecord_Base extends EXPERIMENTAL_ResolverRecord_Base {
1708
+ /**
1709
+ * Where to redirect if the route is directly matched. The redirection happens
1710
+ * before any navigation guard and triggers a new navigation with the new
1711
+ * target location.
1712
+ */
1713
+ redirect?: RouteRecordRedirectOption;
1714
+ /**
1715
+ * References another record if this record is an alias of it.
1716
+ */
1717
+ aliasOf?: this;
1718
+ /**
1719
+ * Before Enter guard specific to this record. Note `beforeEnter` has no
1720
+ * effect if the record has a `redirect` property.
1721
+ */
1722
+ /**
1723
+ * Arbitrary data attached to the record.
1724
+ */
1725
+ meta?: RouteMeta;
1726
+ /**
1727
+ * Components to display when the URL matches this route. Allow using named views.
1728
+ */
1729
+ components?: Record<string, RawRouteComponent>;
1730
+ /**
1731
+ * Parent of this component if any
1732
+ */
1733
+ parent?: EXPERIMENTAL_RouteRecordNormalized | null;
1734
+ }
1735
+ interface EXPERIMENTAL_RouteRecord_Redirect extends Omit<EXPERIMENTAL_RouteRecord_Base, 'name' | 'path'>, EXPERIMENTAL_ResolverRecord_Matchable {
1736
+ components?: Record<string, RawRouteComponent>;
1737
+ redirect: RouteRecordRedirectOption;
1738
+ parent?: EXPERIMENTAL_RouteRecordNormalized | null;
1739
+ }
1740
+ interface EXPERIMENTAL_RouteRecord_Group extends Omit<EXPERIMENTAL_RouteRecord_Base, 'name' | 'path' | 'query' | 'hash'>, EXPERIMENTAL_ResolverRecord_Group {
1741
+ components?: Record<string, RawRouteComponent>;
1742
+ parent?: EXPERIMENTAL_RouteRecordNormalized | null;
1743
+ }
1744
+ interface EXPERIMENTAL_RouteRecord_Components extends Omit<EXPERIMENTAL_RouteRecord_Base, 'name' | 'path'>, EXPERIMENTAL_ResolverRecord_Matchable {
1745
+ components: Record<string, RawRouteComponent>;
1746
+ redirect?: never;
1747
+ parent?: EXPERIMENTAL_RouteRecordNormalized | null;
1748
+ }
1749
+ type EXPERIMENTAL_RouteRecord_Matchable = EXPERIMENTAL_RouteRecord_Components | EXPERIMENTAL_RouteRecord_Redirect;
1750
+ type EXPERIMENTAL_RouteRecordRaw = EXPERIMENTAL_RouteRecord_Matchable | EXPERIMENTAL_RouteRecord_Group;
1751
+ interface EXPERIMENTAL_RouteRecordNormalized_Base {
1752
+ /**
1753
+ * Contains the original modules for lazy loaded components.
1754
+ *
1755
+ * @internal
1756
+ */
1757
+ mods: Record<string, unknown>;
1758
+ props: Record<string, _RouteRecordProps>;
1759
+ /**
1760
+ * Registered leave guards
1761
+ *
1762
+ * @internal
1763
+ */
1764
+ leaveGuards: Set<NavigationGuard>;
1765
+ /**
1766
+ * Registered update guards
1767
+ *
1768
+ * @internal
1769
+ */
1770
+ updateGuards: Set<NavigationGuard>;
1771
+ instances: Record<string, unknown>;
1772
+ }
1773
+ interface EXPERIMENTAL_RouteRecordNormalized_Group extends EXPERIMENTAL_RouteRecordNormalized_Base, EXPERIMENTAL_RouteRecord_Group {
1774
+ meta: RouteMeta;
1775
+ }
1776
+ interface EXPERIMENTAL_RouteRecordNormalized_Redirect extends EXPERIMENTAL_RouteRecordNormalized_Base, EXPERIMENTAL_RouteRecord_Redirect {
1777
+ meta: RouteMeta;
1778
+ }
1779
+ interface EXPERIMENTAL_RouteRecordNormalized_Components extends EXPERIMENTAL_RouteRecordNormalized_Base, EXPERIMENTAL_RouteRecord_Components {
1780
+ meta: RouteMeta;
1781
+ }
1782
+ type EXPERIMENTAL_RouteRecordNormalized_Matchable = EXPERIMENTAL_RouteRecordNormalized_Components | EXPERIMENTAL_RouteRecordNormalized_Redirect;
1783
+ type EXPERIMENTAL_RouteRecordNormalized = EXPERIMENTAL_RouteRecordNormalized_Matchable | EXPERIMENTAL_RouteRecordNormalized_Group;
1784
+ declare function normalizeRouteRecord(record: EXPERIMENTAL_RouteRecord_Group): EXPERIMENTAL_RouteRecordNormalized_Group;
1785
+ declare function normalizeRouteRecord(record: EXPERIMENTAL_RouteRecord_Matchable): EXPERIMENTAL_RouteRecordNormalized_Matchable;
1786
+ /**
1787
+ * Merges route record objects for the experimental resolver format.
1788
+ * This function is specifically designed to work with objects that will be passed to normalizeRouteRecord().
1789
+ *
1790
+ * @internal
1791
+ *
1792
+ * @param main - main route record object
1793
+ * @param routeRecords - route records to merge (from definePage imports)
1794
+ * @returns merged route record object
1795
+ */
1796
+ declare function mergeRouteRecord(main: EXPERIMENTAL_RouteRecordNormalized, ...routeRecords: Partial<EXPERIMENTAL_RouteRecordNormalized>[]): EXPERIMENTAL_RouteRecordNormalized;
1797
+ /**
1798
+ * Options to initialize an experimental {@link EXPERIMENTAL_Router} instance.
1799
+ * @experimental
1800
+ */
1801
+ interface EXPERIMENTAL_RouterOptions extends EXPERIMENTAL_RouterOptions_Base {
1802
+ /**
1803
+ * Matcher to use to resolve routes.
1804
+ *
1805
+ * @experimental
1806
+ */
1807
+ resolver: EXPERIMENTAL_ResolverFixed<EXPERIMENTAL_RouteRecordNormalized_Matchable>;
1808
+ }
1809
+ /**
1810
+ * Router base instance.
1811
+ *
1812
+ * @experimental This version is not stable, it's meant to replace {@link Router} in the future.
1813
+ */
1814
+ interface EXPERIMENTAL_Router_Base<TRecord> {
1815
+ /**
1816
+ * Current {@link RouteLocationNormalized}
1817
+ */
1818
+ readonly currentRoute: ShallowRef<RouteLocationNormalizedLoaded>;
1819
+ /**
1820
+ * Allows turning off the listening of history events. This is a low level api for micro-frontend.
1821
+ */
1822
+ listening: boolean;
1823
+ /**
1824
+ * Checks if a route with a given name exists
1825
+ *
1826
+ * @param name - Name of the route to check
1827
+ */
1828
+ hasRoute(name: NonNullable<RouteRecordNameGeneric>): boolean;
1829
+ /**
1830
+ * Get a full list of all the {@link RouteRecord | route records}.
1831
+ */
1832
+ getRoutes(): TRecord[];
1833
+ /**
1834
+ * Returns the {@link RouteLocation | normalized version} of a
1835
+ * {@link RouteLocationRaw | route location}. Also includes an `href` property
1836
+ * that includes any existing `base`. By default, the `currentLocation` used is
1837
+ * `router.currentRoute` and should only be overridden in advanced use cases.
1838
+ *
1839
+ * @param to - Raw route location to resolve
1840
+ * @param currentLocation - Optional current location to resolve against
1841
+ */
1842
+ resolve<Name extends keyof RouteMap = keyof RouteMap>(to: RouteLocationAsRelativeTyped<RouteMap, Name>, currentLocation?: RouteLocationNormalizedLoaded): RouteLocationResolved<Name>;
1843
+ resolve(to: RouteLocationAsString | RouteLocationAsRelative | RouteLocationAsPath, currentLocation?: RouteLocationNormalizedLoaded): RouteLocationResolved;
1844
+ /**
1845
+ * Programmatically navigate to a new URL by pushing an entry in the history
1846
+ * stack.
1847
+ *
1848
+ * @param to - Route location to navigate to
1849
+ */
1850
+ push(to: RouteLocationRaw): Promise<NavigationFailure | void | undefined>;
1851
+ /**
1852
+ * Programmatically navigate to a new URL by replacing the current entry in
1853
+ * the history stack.
1854
+ *
1855
+ * @param to - Route location to navigate to
1856
+ */
1857
+ replace(to: RouteLocationRaw): Promise<NavigationFailure | void | undefined>;
1858
+ /**
1859
+ * Go back in history if possible by calling `history.back()`. Equivalent to
1860
+ * `router.go(-1)`.
1861
+ */
1862
+ back(): void;
1863
+ /**
1864
+ * Go forward in history if possible by calling `history.forward()`.
1865
+ * Equivalent to `router.go(1)`.
1866
+ */
1867
+ forward(): void;
1868
+ /**
1869
+ * Allows you to move forward or backward through the history. Calls
1870
+ * `history.go()`.
1871
+ *
1872
+ * @param delta - The position in the history to which you want to move,
1873
+ * relative to the current page
1874
+ */
1875
+ go(delta: number): void;
1876
+ /**
1877
+ * Add a navigation guard that executes before any navigation. Returns a
1878
+ * function that removes the registered guard.
1879
+ *
1880
+ * @param guard - navigation guard to add
1881
+ */
1882
+ beforeEach(guard: NavigationGuardWithThis<undefined>): () => void;
1883
+ /**
1884
+ * Add a navigation guard that executes before navigation is about to be
1885
+ * resolved. At this state all component have been fetched and other
1886
+ * navigation guards have been successful. Returns a function that removes the
1887
+ * registered guard.
1888
+ *
1889
+ * @param guard - navigation guard to add
1890
+ * @returns a function that removes the registered guard
1891
+ *
1892
+ * @example
1893
+ * ```js
1894
+ * router.beforeResolve(to => {
1895
+ * if (to.meta.requiresAuth && !isAuthenticated) return false
1896
+ * })
1897
+ * ```
1898
+ *
1899
+ */
1900
+ beforeResolve(guard: NavigationGuardWithThis<undefined>): () => void;
1901
+ /**
1902
+ * Add a navigation hook that is executed after every navigation. Returns a
1903
+ * function that removes the registered hook.
1904
+ *
1905
+ * @param guard - navigation hook to add
1906
+ * @returns a function that removes the registered hook
1907
+ *
1908
+ * @example
1909
+ * ```js
1910
+ * router.afterEach((to, from, failure) => {
1911
+ * if (isNavigationFailure(failure)) {
1912
+ * console.log('failed navigation', failure)
1913
+ * }
1914
+ * })
1915
+ * ```
1916
+ */
1917
+ afterEach(guard: NavigationHookAfter): () => void;
1918
+ /**
1919
+ * Adds an error handler that is called every time a non caught error happens
1920
+ * during navigation. This includes errors thrown synchronously and
1921
+ * asynchronously, errors returned or passed to `next` in any navigation
1922
+ * guard, and errors occurred when trying to resolve an async component that
1923
+ * is required to render a route.
1924
+ *
1925
+ * @param handler - error handler to register
1926
+ */
1927
+ onError(handler: _ErrorListener): () => void;
1928
+ /**
1929
+ * Returns a Promise that resolves when the router has completed the initial
1930
+ * navigation, which means it has resolved all async enter hooks and async
1931
+ * components that are associated with the initial route. If the initial
1932
+ * navigation already happened, the promise resolves immediately.
1933
+ *
1934
+ * This is useful in server-side rendering to ensure consistent output on both
1935
+ * the server and the client. Note that on server side, you need to manually
1936
+ * push the initial location while on client side, the router automatically
1937
+ * picks it up from the URL.
1938
+ */
1939
+ isReady(): Promise<void>;
1940
+ /**
1941
+ * Called automatically by `app.use(router)`. Should not be called manually by
1942
+ * the user. This will trigger the initial navigation when on client side.
1943
+ *
1944
+ * @internal
1945
+ * @param app - Application that uses the router
1946
+ */
1947
+ install(app: App): void;
1948
+ }
1949
+ interface EXPERIMENTAL_Router extends EXPERIMENTAL_Router_Base<EXPERIMENTAL_RouteRecordNormalized_Matchable> {
1950
+ /**
1951
+ * Original options object passed to create the Router
1952
+ */
1953
+ readonly options: EXPERIMENTAL_RouterOptions;
1954
+ /**
1955
+ * Dev only method to replace the resolver used by the router. Used during HMR
1956
+ *
1957
+ * @param newResolver - new resolver to use
1958
+ *
1959
+ * @internal
1960
+ */
1961
+ _hmrReplaceResolver?: (newResolver: EXPERIMENTAL_ResolverFixed<EXPERIMENTAL_RouteRecordNormalized_Matchable>) => void;
1962
+ }
1963
+ /**
1964
+ * Creates an experimental Router that allows passing a resolver instead of a
1965
+ * routes array. This router does not have `addRoute()` and `removeRoute()`
1966
+ * methods and is meant to be used with unplugin-vue-router by generating the
1967
+ * resolver from the `pages/` folder
1968
+ *
1969
+ * @param options - Options to initialize the router
1970
+ */
1971
+ declare function experimental_createRouter(options: EXPERIMENTAL_RouterOptions): EXPERIMENTAL_Router;
1972
+ //#endregion
1973
+ export { RouteParamsRawGeneric as $, RouteRecordRedirectOption as $t, MatcherPatternPathDynamic_ParamOptions as A, RouteLocationAsRelativeTyped as At, isNavigationFailure as B, RouteLocationNormalizedLoadedTyped as Bt, START_LOCATION_NORMALIZED as C, RouteLocation as Ct, MatcherPatternHash as D, RouteLocationAsPathTypedList as Dt, MatcherPattern as E, RouteLocationAsPathTyped as Et, RouterScrollBehavior as F, RouteLocationGeneric as Ft, RouteLocationMatched as G, RouteLocationResolved as Gt, MatcherLocation as H, RouteLocationNormalizedTyped as Ht, ErrorTypes as I, RouteLocationNormalized as It, RouteLocationPathRaw as J, RouteLocationResolvedTypedList as Jt, RouteLocationNamedRaw as K, RouteLocationResolvedGeneric as Kt, NavigationFailure as L, RouteLocationNormalizedGeneric as Lt, MatcherQueryParams as M, RouteLocationAsString as Mt, MatcherQueryParamsValue as N, RouteLocationAsStringTyped as Nt, MatcherPatternPath as O, RouteLocationAsRelative as Ot, ParamParser as P, RouteLocationAsStringTypedList as Pt, RouteParamsGeneric as Q, RouteRecordNameGeneric as Qt, NavigationFailureType as R, RouteLocationNormalizedLoaded as Rt, PARAM_PARSER_BOOL as S, NavigationHookAfter as St, MatcherParamsFormatted as T, RouteLocationAsPathGeneric as Tt, MatcherLocationAsPath as U, RouteLocationNormalizedTypedList as Ut, LocationAsRelativeRaw as V, RouteLocationNormalizedLoadedTypedList as Vt, RouteComponent as W, RouteLocationRaw as Wt, RouteParamValue as X, RouteLocationTypedList as Xt, RouteMeta as Y, RouteLocationTyped as Yt, RouteParamValueRaw as Z, RouteRecordName as Zt, MatcherPatternQueryParam as _, parseQuery as _n, NavigationGuard as _t, EXPERIMENTAL_RouteRecord_Base as a, ParamValueZeroOrOne as an, RouteRecordSingleView as at, defineQueryParamParser as b, NavigationGuardReturn as bt, EXPERIMENTAL_Router as c, RouteMap as cn, _RouteRecordBase as ct, EXPERIMENTAL_Router_Base as d, RouteRecordInfoGeneric as dn, RouterMatcher as dt, _RouteRecordProps as en, RouteQueryAndHash as et, experimental_createRouter as f, TypesConfig as fn, createRouterMatcher as ft, MatcherPatternQuery as g, LocationQueryValueRaw as gn, RouteRecordNormalized as gt, createFixedResolver as h, LocationQueryValue as hn, RouteRecord as ht, EXPERIMENTAL_RouteRecordRaw as i, ParamValueZeroOrMore as in, RouteRecordRedirect as it, MatcherPatternPathStatic as j, RouteLocationAsRelativeTypedList as jt, MatcherPatternPathDynamic as k, RouteLocationAsRelativeGeneric as kt, EXPERIMENTAL_RouterOptions as l, RouteMapGeneric as ln, HistoryState as lt, normalizeRouteRecord as m, LocationQueryRaw as mn, _PathParserOptions as mt, EXPERIMENTAL_RouteRecordNormalized_Group as n, ParamValue as nn, RouteRecordMultipleViewsWithChildren as nt, EXPERIMENTAL_RouteRecord_Group as o, RouteParams as on, RouteRecordSingleViewWithChildren as ot, mergeRouteRecord as p, LocationQuery as pn, PathParserOptions as pt, RouteLocationOptions as q, RouteLocationResolvedTyped as qt, EXPERIMENTAL_RouteRecordNormalized_Matchable as r, ParamValueOneOrMore as rn, RouteRecordRaw as rt, EXPERIMENTAL_RouteRecord_Matchable as s, RouteParamsRaw as sn, _RouteLocationBase as st, EXPERIMENTAL_RouteRecordNormalized as t, _Awaitable as tn, RouteRecordMultipleViews as tt, EXPERIMENTAL_RouterOptions_Base as u, RouteRecordInfo as un, RouterHistory as ut, defineParamParser as v, stringifyQuery as vn, NavigationGuardNext as vt, EmptyParams as w, RouteLocationAsPath as wt, PARAM_PARSER_INT as x, NavigationGuardWithThis as xt, definePathParamParser as y, NavigationGuardNextCallback as yt, NavigationRedirectError as z, RouteLocationNormalizedLoadedGeneric as zt };