@histoire/vendors 0.10.4 → 0.10.7

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.
@@ -3,7 +3,7 @@ import { s as setupDevtoolsPlugin } from './index2.js';
3
3
  import { y as getCurrentInstance, z as inject, A as toRaw, B as watch, C as unref, D as markRaw, E as effectScope, u as ref, G as isRef, H as isReactive, I as onUnmounted, J as toRefs, K as computed, b as nextTick, L as reactive, M as toRef } from './vue.runtime.esm-bundler.js';
4
4
 
5
5
  /*!
6
- * pinia v2.0.18
6
+ * pinia v2.0.20
7
7
  * (c) 2022 Eduardo San Martin Morote
8
8
  * @license MIT
9
9
  */
@@ -64,7 +64,14 @@ var MutationType;
64
64
  // maybe reset? for $state = {} and $reset
65
65
  })(MutationType || (MutationType = {}));
66
66
 
67
- const IS_CLIENT = typeof window !== 'undefined';
67
+ const IS_CLIENT = typeof window !== 'undefined';
68
+ /**
69
+ * Should we add the devtools plugins.
70
+ * - only if dev mode or forced through the prod devtools flag
71
+ * - not in test
72
+ * - only if window exists (could change in the future)
73
+ */
74
+ const USE_DEVTOOLS = ((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test') && IS_CLIENT;
68
75
 
69
76
  /*
70
77
  * FileSaver.js A saveAs() FileSaver implementation.
@@ -964,7 +971,7 @@ function createPinia() {
964
971
  app.provide(piniaSymbol, pinia);
965
972
  app.config.globalProperties.$pinia = pinia;
966
973
  /* istanbul ignore else */
967
- if ((process.env.NODE_ENV !== 'production') && IS_CLIENT) {
974
+ if (USE_DEVTOOLS) {
968
975
  registerPiniaDevtools(app, pinia);
969
976
  }
970
977
  toBeInstalled.forEach((plugin) => _p.push(plugin));
@@ -989,9 +996,8 @@ function createPinia() {
989
996
  state,
990
997
  });
991
998
  // pinia devtools rely on dev only features so they cannot be forced unless
992
- // the dev build of Vue is used
993
- // We also don't need devtools in test mode or anywhere where Proxy isn't supported (like IE)
994
- if ((process.env.NODE_ENV !== 'production') && IS_CLIENT && !(process.env.NODE_ENV === 'test') && typeof Proxy !== 'undefined') {
999
+ // the dev build of Vue is used. Avoid old browsers like IE11.
1000
+ if (USE_DEVTOOLS && typeof Proxy !== 'undefined') {
995
1001
  pinia.use(devtoolsPlugin);
996
1002
  }
997
1003
  return pinia;
@@ -1058,6 +1064,10 @@ function patchObject(newState, oldState) {
1058
1064
  * @param hot - `import.meta.hot`
1059
1065
  */
1060
1066
  function acceptHMRUpdate(initialUseStore, hot) {
1067
+ // strip as much as possible from iife.prod
1068
+ if (!(process.env.NODE_ENV !== 'production')) {
1069
+ return () => { };
1070
+ }
1061
1071
  return (newModule) => {
1062
1072
  const pinia = hot.data.pinia || initialUseStore._pinia;
1063
1073
  if (!pinia) {
@@ -1951,9 +1961,9 @@ const PiniaVuePlugin = function (_Vue) {
1951
1961
  // this allows calling useStore() outside of a component setup after
1952
1962
  // installing pinia's plugin
1953
1963
  setActivePinia(pinia);
1954
- if ((process.env.NODE_ENV !== 'production')) {
1955
- registerPiniaDevtools(pinia._a, pinia);
1956
- }
1964
+ }
1965
+ if (USE_DEVTOOLS) {
1966
+ registerPiniaDevtools(pinia._a, pinia);
1957
1967
  }
1958
1968
  }
1959
1969
  else if (!this.$pinia && options.parent && options.parent.$pinia) {
@@ -2,7 +2,7 @@ import { I as onUnmounted, N as onDeactivated, O as onActivated, y as getCurrent
2
2
  import { s as setupDevtoolsPlugin } from './index2.js';
3
3
 
4
4
  /*!
5
- * vue-router v4.1.3
5
+ * vue-router v4.1.4
6
6
  * (c) 2022 Eduardo San Martin Morote
7
7
  * @license MIT
8
8
  */
@@ -39,7 +39,7 @@ function warn(msg) {
39
39
  const TRAILING_SLASH_RE = /\/$/;
40
40
  const removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, '');
41
41
  /**
42
- * Transforms an URI into a normalized history location
42
+ * Transforms a URI into a normalized history location
43
43
  *
44
44
  * @param parseQuery
45
45
  * @param location - URI to normalize
@@ -88,8 +88,7 @@ function stringifyURL(stringifyQuery, location) {
88
88
  return location.path + (query && '?') + query + (location.hash || '');
89
89
  }
90
90
  /**
91
- * Strips off the base from the beginning of a location.pathname in a non
92
- * case-sensitive way.
91
+ * Strips off the base from the beginning of a location.pathname in a non-case-sensitive way.
93
92
  *
94
93
  * @param pathname - location.pathname
95
94
  * @param base - base to strip off
@@ -186,12 +185,12 @@ function resolveRelativePath(to, from) {
186
185
  continue;
187
186
  // go up in the from array
188
187
  if (segment === '..') {
189
- // we can't go below zero but we still need to increment toPosition
188
+ // we can't go below zero, but we still need to increment toPosition
190
189
  if (position > 1)
191
190
  position--;
192
191
  // continue
193
192
  }
194
- // we reached a non relative path, we stop here
193
+ // we reached a non-relative path, we stop here
195
194
  else
196
195
  break;
197
196
  }
@@ -428,7 +427,7 @@ function useHistoryListeners(base, historyState, currentLocation, replace) {
428
427
  pauseState = currentLocation.value;
429
428
  }
430
429
  function listen(callback) {
431
- // setup the listener and prepare teardown callbacks
430
+ // set up the listener and prepare teardown callbacks
432
431
  listeners.push(callback);
433
432
  const teardown = () => {
434
433
  const index = listeners.indexOf(callback);
@@ -451,7 +450,7 @@ function useHistoryListeners(base, historyState, currentLocation, replace) {
451
450
  window.removeEventListener('popstate', popStateHandler);
452
451
  window.removeEventListener('beforeunload', beforeUnloadListener);
453
452
  }
454
- // setup the listeners and prepare teardown callbacks
453
+ // set up the listeners and prepare teardown callbacks
455
454
  window.addEventListener('popstate', popStateHandler);
456
455
  window.addEventListener('beforeunload', beforeUnloadListener);
457
456
  return {
@@ -489,14 +488,14 @@ function useHistoryStateNavigation(base) {
489
488
  // the length is off by one, we need to decrease it
490
489
  position: history.length - 1,
491
490
  replaced: true,
492
- // don't add a scroll as the user may have an anchor and we want
491
+ // don't add a scroll as the user may have an anchor, and we want
493
492
  // scrollBehavior to be triggered without a saved position
494
493
  scroll: null,
495
494
  }, true);
496
495
  }
497
496
  function changeLocation(to, state, replace) {
498
497
  /**
499
- * if a base tag is provided and we are on a normal domain, we have to
498
+ * if a base tag is provided, and we are on a normal domain, we have to
500
499
  * respect the provided `base` attribute because pushState() will use it and
501
500
  * potentially erase anything before the `#` like at
502
501
  * https://github.com/vuejs/router/issues/685 where a base of
@@ -595,7 +594,7 @@ function createWebHistory(base) {
595
594
  }
596
595
 
597
596
  /**
598
- * Creates a in-memory based history. The main purpose of this history is to handle SSR. It starts in a special location that is nowhere.
597
+ * Creates an in-memory based history. The main purpose of this history is to handle SSR. It starts in a special location that is nowhere.
599
598
  * It's up to the user to replace that location with the starter location by either calling `router.push` or `router.replace`.
600
599
  *
601
600
  * @param base - Base applied to all urls, defaults to '/'
@@ -828,7 +827,7 @@ function stringifyRoute(to) {
828
827
  return JSON.stringify(location, null, 2);
829
828
  }
830
829
 
831
- // default pattern for a param: non greedy everything but /
830
+ // default pattern for a param: non-greedy everything but /
832
831
  const BASE_PARAM_PATTERN = '[^/]+?';
833
832
  const BASE_PATH_PARSER_OPTIONS = {
834
833
  sensitive: false,
@@ -861,7 +860,7 @@ function tokensToParser(segments, extraOptions) {
861
860
  pattern += '/';
862
861
  for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {
863
862
  const token = segment[tokenIndex];
864
- // resets the score if we are inside a sub segment /:a-other-:b
863
+ // resets the score if we are inside a sub-segment /:a-other-:b
865
864
  let subSegmentScore = 40 /* PathScore.Segment */ +
866
865
  (options.sensitive ? 0.25 /* PathScore.BonusCaseSensitive */ : 0);
867
866
  if (token.type === 0 /* TokenType.Static */) {
@@ -1316,11 +1315,11 @@ function createRouterMatcher(routes, globalOptions) {
1316
1315
  throw new Error('Catch all routes ("*") must now be defined using a param with a custom regexp.\n' +
1317
1316
  'See more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch-all-routes.');
1318
1317
  }
1319
- // create the object before hand so it can be passed to children
1318
+ // create the object beforehand, so it can be passed to children
1320
1319
  matcher = createRouteRecordMatcher(normalizedRecord, parent, options);
1321
1320
  if ((process.env.NODE_ENV !== 'production') && parent && path[0] === '/')
1322
1321
  checkMissingParamsInAbsolutePath(matcher, parent);
1323
- // if we are an alias we must tell the original record that we exist
1322
+ // if we are an alias we must tell the original record that we exist,
1324
1323
  // so we can be removed
1325
1324
  if (originalRecord) {
1326
1325
  originalRecord.alias.push(matcher);
@@ -1345,7 +1344,7 @@ function createRouterMatcher(routes, globalOptions) {
1345
1344
  }
1346
1345
  }
1347
1346
  // if there was no original record, then the first one was not an alias and all
1348
- // other alias (if any) need to reference this record when adding children
1347
+ // other aliases (if any) need to reference this record when adding children
1349
1348
  originalRecord = originalRecord || matcher;
1350
1349
  // TODO: add normalized records for more flexibility
1351
1350
  // if (parent && isAliasRecord(originalRecord)) {
@@ -1415,7 +1414,11 @@ function createRouterMatcher(routes, globalOptions) {
1415
1414
  paramsFromLocation(currentLocation.params,
1416
1415
  // only keep params that exist in the resolved location
1417
1416
  // TODO: only keep optional params coming from a parent record
1418
- matcher.keys.filter(k => !k.optional).map(k => k.name)), location.params);
1417
+ matcher.keys.filter(k => !k.optional).map(k => k.name)),
1418
+ // discard any existing params in the current location that do not exist here
1419
+ // #1497 this ensures better active/exact matching
1420
+ location.params &&
1421
+ paramsFromLocation(location.params, matcher.keys.map(k => k.name)));
1419
1422
  // throws if cannot be stringified
1420
1423
  path = matcher.stringify(params);
1421
1424
  }
@@ -1429,7 +1432,6 @@ function createRouterMatcher(routes, globalOptions) {
1429
1432
  matcher = matchers.find(m => m.re.test(path));
1430
1433
  // matcher should have a value after the loop
1431
1434
  if (matcher) {
1432
- // TODO: dev warning of unused params if provided
1433
1435
  // we know the matcher works because we tested the regexp
1434
1436
  params = matcher.parse(path);
1435
1437
  name = matcher.record.name;
@@ -1511,7 +1513,7 @@ function normalizeRouteRecord(record) {
1511
1513
  */
1512
1514
  function normalizeRecordProps(record) {
1513
1515
  const propsObject = {};
1514
- // props does not exist on redirect records but we can set false directly
1516
+ // props does not exist on redirect records, but we can set false directly
1515
1517
  const props = record.props || false;
1516
1518
  if ('component' in record) {
1517
1519
  propsObject.default = props;
@@ -1603,7 +1605,7 @@ function isRecordChildOf(record, parent) {
1603
1605
  * On top of that, the RFC3986 (https://tools.ietf.org/html/rfc3986#section-2.2)
1604
1606
  * defines some extra characters to be encoded. Most browsers do not encode them
1605
1607
  * in encodeURI https://github.com/whatwg/url/issues/369, so it may be safer to
1606
- * also encode `!'()*`. Leaving unencoded only ASCII alphanumeric(`a-zA-Z0-9`)
1608
+ * also encode `!'()*`. Leaving un-encoded only ASCII alphanumeric(`a-zA-Z0-9`)
1607
1609
  * plus `-._~`. This extra safety should be applied to query by patching the
1608
1610
  * string returned by encodeURIComponent encodeURI also encodes `[\]^`. `\`
1609
1611
  * should be encoded to avoid ambiguity. Browsers (IE, FF, C) transform a `\`
@@ -1627,7 +1629,7 @@ const PLUS_RE = /\+/g; // %2B
1627
1629
  * application/x-www-form-urlencoded
1628
1630
  * (https://url.spec.whatwg.org/#urlencoded-parsing) and most browsers seems lo
1629
1631
  * leave the plus character as is in queries. To be more flexible, we allow the
1630
- * plus character on the query but it can also be manually encoded by the user.
1632
+ * plus character on the query, but it can also be manually encoded by the user.
1631
1633
  *
1632
1634
  * Resources:
1633
1635
  * - https://url.spec.whatwg.org/#urlencoded-parsing
@@ -1919,7 +1921,7 @@ function onBeforeRouteLeave(leaveGuard) {
1919
1921
  {}).value;
1920
1922
  if (!activeRecord) {
1921
1923
  (process.env.NODE_ENV !== 'production') &&
1922
- warn('No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside of a component child of <router-view>. Maybe you called it inside of App.vue?');
1924
+ warn('No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?');
1923
1925
  return;
1924
1926
  }
1925
1927
  registerGuard(activeRecord, 'leaveGuards', leaveGuard);
@@ -1941,7 +1943,7 @@ function onBeforeRouteUpdate(updateGuard) {
1941
1943
  {}).value;
1942
1944
  if (!activeRecord) {
1943
1945
  (process.env.NODE_ENV !== 'production') &&
1944
- warn('No active route record was found when calling `onBeforeRouteUpdate()`. Make sure you call this function inside of a component child of <router-view>. Maybe you called it inside of App.vue?');
1946
+ warn('No active route record was found when calling `onBeforeRouteUpdate()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?');
1945
1947
  return;
1946
1948
  }
1947
1949
  registerGuard(activeRecord, 'updateGuards', updateGuard);
@@ -2106,7 +2108,7 @@ function isRouteComponent(component) {
2106
2108
  '__vccOpts' in component);
2107
2109
  }
2108
2110
  /**
2109
- * Ensures a route is loaded so it can be passed as o prop to `<RouterView>`.
2111
+ * Ensures a route is loaded, so it can be passed as o prop to `<RouterView>`.
2110
2112
  *
2111
2113
  * @param route - resolved route to load
2112
2114
  */
@@ -2246,7 +2248,7 @@ const RouterLinkImpl = /*#__PURE__*/ defineComponent({
2246
2248
  : null,
2247
2249
  href: link.href,
2248
2250
  // this would override user added attrs but Vue will still add
2249
- // the listener so we end up triggering both
2251
+ // the listener, so we end up triggering both
2250
2252
  onClick: link.navigate,
2251
2253
  class: elClass.value,
2252
2254
  }, children);
@@ -2362,7 +2364,7 @@ const RouterViewImpl = /*#__PURE__*/ defineComponent({
2362
2364
  // this will update the instance for new instances as well as reused
2363
2365
  // instances when navigating to a new route
2364
2366
  to.instances[name] = instance;
2365
- // the component instance is reused for a different route or name so
2367
+ // the component instance is reused for a different route or name, so
2366
2368
  // we copy any saved update or leave guards. With async setup, the
2367
2369
  // mounting component will mount before the matchedRoute changes,
2368
2370
  // making instance === oldInstance, so we check if guards have been
@@ -3016,7 +3018,7 @@ function createRouter(options) {
3016
3018
  delete targetParams[key];
3017
3019
  }
3018
3020
  }
3019
- // pass encoded values to the matcher so it can produce encoded path and fullPath
3021
+ // pass encoded values to the matcher, so it can produce encoded path and fullPath
3020
3022
  matcherLocation = assign({}, rawLocation, {
3021
3023
  params: encodeParams(rawLocation.params),
3022
3024
  });
@@ -3029,7 +3031,7 @@ function createRouter(options) {
3029
3031
  if ((process.env.NODE_ENV !== 'production') && hash && !hash.startsWith('#')) {
3030
3032
  warn(`A \`hash\` should always start with the character "#". Replace "${hash}" with "#${hash}".`);
3031
3033
  }
3032
- // decoding them) the matcher might have merged current location params so
3034
+ // the matcher might have merged current location params, so
3033
3035
  // we need to run the decoding again
3034
3036
  matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));
3035
3037
  const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {
@@ -3122,7 +3124,9 @@ function createRouter(options) {
3122
3124
  const shouldRedirect = handleRedirectRecord(targetLocation);
3123
3125
  if (shouldRedirect)
3124
3126
  return pushWithRedirect(assign(locationAsObject(shouldRedirect), {
3125
- state: data,
3127
+ state: typeof shouldRedirect === 'object'
3128
+ ? assign({}, data, shouldRedirect.state)
3129
+ : data,
3126
3130
  force,
3127
3131
  replace,
3128
3132
  }),
@@ -3170,10 +3174,12 @@ function createRouter(options) {
3170
3174
  return pushWithRedirect(
3171
3175
  // keep options
3172
3176
  assign({
3173
- // preserve an existing replace but allow the redirect to override it
3177
+ // preserve an existing replacement but allow the redirect to override it
3174
3178
  replace,
3175
3179
  }, locationAsObject(failure.to), {
3176
- state: data,
3180
+ state: typeof failure.to === 'object'
3181
+ ? assign({}, data, failure.to.state)
3182
+ : data,
3177
3183
  force,
3178
3184
  }),
3179
3185
  // preserve the original redirectedFrom if any
@@ -3347,8 +3353,8 @@ function createRouter(options) {
3347
3353
  // Here we could call if (info.delta) routerHistory.go(-info.delta,
3348
3354
  // false) but this is bug prone as we have no way to wait the
3349
3355
  // navigation to be finished before calling pushWithRedirect. Using
3350
- // a setTimeout of 16ms seems to work but there is not guarantee for
3351
- // it to work on every browser. So Instead we do not restore the
3356
+ // a setTimeout of 16ms seems to work but there is no guarantee for
3357
+ // it to work on every browser. So instead we do not restore the
3352
3358
  // history entry and trigger a new navigation as requested by the
3353
3359
  // navigation guard.
3354
3360
  // the error is already handled by router.push we just want to avoid
@@ -3358,7 +3364,7 @@ function createRouter(options) {
3358
3364
  )
3359
3365
  .then(failure => {
3360
3366
  // manual change in hash history #916 ending up in the URL not
3361
- // changing but it was changed by the manual url change, so we
3367
+ // changing, but it was changed by the manual url change, so we
3362
3368
  // need to manually change it ourselves
3363
3369
  if (isNavigationFailure(failure, 4 /* ErrorTypes.NAVIGATION_ABORTED */ |
3364
3370
  16 /* ErrorTypes.NAVIGATION_DUPLICATED */) &&
@@ -3534,6 +3540,7 @@ function createRouter(options) {
3534
3540
  }
3535
3541
  unmountApp();
3536
3542
  };
3543
+ // TODO: this probably needs to be updated so it can be used by vue-termui
3537
3544
  if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) && isBrowser) {
3538
3545
  addDevtools(app, router, matcher);
3539
3546
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babel/parser",
3
- "version": "7.18.11",
3
+ "version": "7.18.13",
4
4
  "description": "A JavaScript parser",
5
5
  "author": "The Babel Team (https://babel.dev/team)",
6
6
  "homepage": "https://babel.dev/docs/en/next/babel-parser",
@@ -1,11 +1,12 @@
1
1
  import Vue from 'vue'
2
- import type { PluginFunction, PluginObject, VueConstructor, Directive, InjectionKey } from 'vue'
2
+ import type { PluginFunction, PluginObject, VueConstructor, Directive, InjectionKey, Component } from 'vue'
3
3
 
4
4
  declare const isVue2: boolean
5
5
  declare const isVue3: boolean
6
6
  declare const Vue2: typeof Vue | undefined
7
7
  declare const version: string
8
8
  declare const install: (vue?: typeof Vue) => void
9
+ export declare function warn(msg: string, vm?: Component | null): void
9
10
  /**
10
11
  * @deprecated To avoid bringing in all the tree-shakable modules, this API has been deprecated. Use `Vue2` or named exports instead.
11
12
  * Refer to https://github.com/vueuse/vue-demi/issues/41
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-demi",
3
- "version": "0.13.8",
3
+ "version": "0.13.9",
4
4
  "engines": {
5
5
  "node": ">=12"
6
6
  },
@@ -1,12 +1,12 @@
1
1
  import { App } from 'vue-demi';
2
- import { ComputedRef } from 'vue-demi';
3
- import { DebuggerEvent } from 'vue-demi';
2
+ import type { ComputedRef } from 'vue-demi';
3
+ import type { DebuggerEvent } from 'vue-demi';
4
4
  import { EffectScope } from 'vue-demi';
5
5
  import type { Plugin as Plugin_2 } from 'vue-demi';
6
6
  import { Ref } from 'vue-demi';
7
7
  import { ToRefs } from 'vue-demi';
8
8
  import { UnwrapRef } from 'vue-demi';
9
- import { WatchOptions } from 'vue-demi';
9
+ import type { WatchOptions } from 'vue-demi';
10
10
 
11
11
  /**
12
12
  * Creates an _accept_ function to pass to `import.meta.hot` in Vite applications.
@@ -1,11 +1,12 @@
1
1
  import Vue from 'vue'
2
- import type { PluginFunction, PluginObject, VueConstructor, Directive, InjectionKey } from 'vue'
2
+ import type { PluginFunction, PluginObject, VueConstructor, Directive, InjectionKey, Component } from 'vue'
3
3
 
4
4
  declare const isVue2: boolean
5
5
  declare const isVue3: boolean
6
6
  declare const Vue2: typeof Vue | undefined
7
7
  declare const version: string
8
8
  declare const install: (vue?: typeof Vue) => void
9
+ export declare function warn(msg: string, vm?: Component | null): void
9
10
  /**
10
11
  * @deprecated To avoid bringing in all the tree-shakable modules, this API has been deprecated. Use `Vue2` or named exports instead.
11
12
  * Refer to https://github.com/vueuse/vue-demi/issues/41
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-demi",
3
- "version": "0.13.8",
3
+ "version": "0.13.9",
4
4
  "engines": {
5
5
  "node": ">=12"
6
6
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinia",
3
- "version": "2.0.18",
3
+ "version": "2.0.20",
4
4
  "description": "Intuitive, type safe and flexible Store for Vue",
5
5
  "main": "index.js",
6
6
  "module": "dist/pinia.mjs",
@@ -14,7 +14,7 @@ import { VNodeProps } from 'vue';
14
14
  declare type Awaitable<T> = T | Promise<T>;
15
15
 
16
16
  /**
17
- * Creates a in-memory based history. The main purpose of this history is to handle SSR. It starts in a special location that is nowhere.
17
+ * Creates an in-memory based history. The main purpose of this history is to handle SSR. It starts in a special location that is nowhere.
18
18
  * It's up to the user to replace that location with the starter location by either calling `router.push` or `router.replace`.
19
19
  *
20
20
  * @param base - Base applied to all urls, defaults to '/'
@@ -115,7 +115,7 @@ declare interface HistoryStateArray extends Array<HistoryStateValue> {
115
115
 
116
116
  /**
117
117
  * Allowed variables in HTML5 history state. Note that pushState clones the state
118
- * passed and does not accept everything: e.g it doesn't accept symbols, nor
118
+ * passed and does not accept everything: e.g.: it doesn't accept symbols, nor
119
119
  * functions as values. It also ignores Symbols as keys.
120
120
  *
121
121
  * @internal
@@ -154,7 +154,7 @@ export declare function isNavigationFailure(error: any, type?: ErrorTypes | Navi
154
154
  declare type Lazy<T> = () => Promise<T>;
155
155
 
156
156
  /**
157
- * Ensures a route is loaded so it can be passed as o prop to `<RouterView>`.
157
+ * Ensures a route is loaded, so it can be passed as o prop to `<RouterView>`.
158
158
  *
159
159
  * @param route - resolved route to load
160
160
  */
@@ -232,7 +232,7 @@ declare interface MatcherLocation {
232
232
  */
233
233
  params: RouteParams;
234
234
  /**
235
- * Merged `meta` properties from all of the matched route records.
235
+ * Merged `meta` properties from all the matched route records.
236
236
  */
237
237
  meta: RouteMeta;
238
238
  /**
@@ -254,8 +254,8 @@ declare interface MatcherLocationAsName {
254
254
  /**
255
255
  * @internal
256
256
  */
257
- export declare interface MatcherLocationAsPath<P extends string = string> {
258
- path: P;
257
+ export declare interface MatcherLocationAsPath {
258
+ path: string;
259
259
  }
260
260
 
261
261
  /**
@@ -352,7 +352,7 @@ export declare interface NavigationHookAfter {
352
352
  }
353
353
 
354
354
  declare interface NavigationInformation {
355
- type: NavigationType_2;
355
+ type: NavigationType;
356
356
  direction: NavigationDirection;
357
357
  delta: number;
358
358
  }
@@ -367,7 +367,7 @@ export declare interface NavigationRedirectError extends Omit<NavigationFailure,
367
367
  to: RouteLocationRaw;
368
368
  }
369
369
 
370
- declare enum NavigationType_2 {
370
+ declare enum NavigationType {
371
371
  pop = "pop",
372
372
  push = "push"
373
373
  }
@@ -417,7 +417,7 @@ declare interface PathParser {
417
417
  */
418
418
  keys: PathParserParamKey[];
419
419
  /**
420
- * Parses a url and returns the matched params or nul if it doesn't match. An
420
+ * Parses a url and returns the matched params or null if it doesn't match. An
421
421
  * optional param that isn't preset will be an empty string. A repeatable
422
422
  * param will be an array if there is at least one value.
423
423
  *
@@ -442,20 +442,28 @@ export declare type PathParserOptions = Pick<_PathParserOptions, 'end' | 'sensit
442
442
  */
443
443
  export declare interface _PathParserOptions {
444
444
  /**
445
- * Makes the RegExp case sensitive. Defaults to false
445
+ * Makes the RegExp case-sensitive.
446
+ *
447
+ * @defaultValue `false`
446
448
  */
447
449
  sensitive?: boolean;
448
450
  /**
449
- * Should we disallow a trailing slash. Defaults to false
451
+ * Whether to disallow a trailing slash or not.
452
+ *
453
+ * @defaultValue `false`
450
454
  */
451
455
  strict?: boolean;
452
456
  /**
453
- * Should the RegExp match from the beginning by prepending a `^` to it. Defaults to true
457
+ * Should the RegExp match from the beginning by prepending a `^` to it.
454
458
  * @internal
459
+ *
460
+ * @defaultValue `true`
455
461
  */
456
462
  start?: boolean;
457
463
  /**
458
- * Should the RegExp match until the end by appending a `$` to it. Defaults to true
464
+ * Should the RegExp match until the end by appending a `$` to it.
465
+ *
466
+ * @defaultValue `true`
459
467
  */
460
468
  end?: boolean;
461
469
  }
@@ -554,7 +562,7 @@ export declare interface RouteLocationNormalized extends _RouteLocationBase {
554
562
  export declare interface RouteLocationNormalizedLoaded extends _RouteLocationBase {
555
563
  /**
556
564
  * Array of {@link RouteLocationMatched} containing only plain components (any
557
- * lazy-loaded components have been loaded and were replaced inside of the
565
+ * lazy-loaded components have been loaded and were replaced inside the
558
566
  * `components` object) so it can be directly used to display routes. It
559
567
  * cannot contain redirect records either
560
568
  */
@@ -688,7 +696,7 @@ export declare interface Router {
688
696
  /**
689
697
  * Returns the {@link RouteLocation | normalized version} of a
690
698
  * {@link RouteLocationRaw | route location}. Also includes an `href` property
691
- * that includes any existing `base`. By default the `currentLocation` used is
699
+ * that includes any existing `base`. By default, the `currentLocation` used is
692
700
  * `route.currentRoute` and should only be overridden in advanced use cases.
693
701
  *
694
702
  * @param to - Raw route location to resolve
@@ -1037,8 +1045,8 @@ declare interface RouteRecordSingleViewWithChildren extends _RouteRecordBase {
1037
1045
  export declare interface RouterHistory {
1038
1046
  /**
1039
1047
  * Base path that is prepended to every url. This allows hosting an SPA at a
1040
- * subfolder of a domain like `example.com/subfolder` by having a `base` of
1041
- * `/subfolder`
1048
+ * sub-folder of a domain like `example.com/sub-folder` by having a `base` of
1049
+ * `/sub-folder`
1042
1050
  */
1043
1051
  readonly base: string;
1044
1052
  /**
@@ -1118,7 +1126,7 @@ export declare const routerKey: InjectionKey<Router>;
1118
1126
  export declare const RouterLink: _RouterLinkI;
1119
1127
 
1120
1128
  /**
1121
- * Typed version of the `RouterLink` component. Its generic defaults to the typed router so it can be inferred
1129
+ * Typed version of the `RouterLink` component. Its generic defaults to the typed router, so it can be inferred
1122
1130
  * automatically for JSX.
1123
1131
  *
1124
1132
  * @internal
@@ -1164,7 +1172,9 @@ export declare interface RouterLinkProps extends RouterLinkOptions {
1164
1172
  */
1165
1173
  exactActiveClass?: string;
1166
1174
  /**
1167
- * Value passed to the attribute `aria-current` when the link is exact active. Defaults to "page"
1175
+ * Value passed to the attribute `aria-current` when the link is exact active.
1176
+ *
1177
+ * @defaultValue `'page'`
1168
1178
  */
1169
1179
  ariaCurrentValue?: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false';
1170
1180
  }
@@ -1440,7 +1450,7 @@ declare module '@vue/runtime-core' {
1440
1450
  : NavigationGuardWithThis<undefined>
1441
1451
 
1442
1452
  /**
1443
- * Guard called whenever the route that renders this component has changed but
1453
+ * Guard called whenever the route that renders this component has changed, but
1444
1454
  * it is reused for the new route. This allows you to guard for changes in
1445
1455
  * params, the query or the hash.
1446
1456
  *
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-router",
3
- "version": "4.1.3",
3
+ "version": "4.1.4",
4
4
  "main": "index.js",
5
5
  "unpkg": "dist/vue-router.global.js",
6
6
  "jsdelivr": "dist/vue-router.global.js",
@@ -11,7 +11,7 @@
11
11
  "types": "./dist/vue-router.d.ts",
12
12
  "node": {
13
13
  "import": {
14
- "production": "./dist/vue-router.prod.cjs",
14
+ "production": "./dist/vue-router.node.mjs",
15
15
  "development": "./dist/vue-router.node.mjs",
16
16
  "default": "./dist/vue-router.node.mjs"
17
17
  },
@@ -58,15 +58,15 @@
58
58
  "@vue/devtools-api": "^6.1.4"
59
59
  },
60
60
  "devDependencies": {
61
- "@microsoft/api-extractor": "^7.28.4",
61
+ "@microsoft/api-extractor": "^7.29.2",
62
62
  "@rollup/plugin-alias": "^3.1.4",
63
- "@rollup/plugin-commonjs": "^22.0.1",
63
+ "@rollup/plugin-commonjs": "^22.0.2",
64
64
  "@rollup/plugin-node-resolve": "^13.0.5",
65
65
  "@rollup/plugin-replace": "^4.0.0",
66
66
  "@sucrase/jest-plugin": "^2.1.1",
67
67
  "@types/jest": "^27.4.1",
68
68
  "@types/jsdom": "^16.2.13",
69
- "@types/nightwatch": "^2.0.9",
69
+ "@types/nightwatch": "^2.3.3",
70
70
  "@vitejs/plugin-vue": "^2.3.3",
71
71
  "@vue/compiler-sfc": "^3.2.31",
72
72
  "@vue/server-renderer": "^3.2.37",
@@ -80,10 +80,10 @@
80
80
  "geckodriver": "^3.0.2",
81
81
  "jest": "^27.5.1",
82
82
  "jest-mock-warn": "^1.1.0",
83
- "nightwatch": "^2.2.3",
83
+ "nightwatch": "^2.3.0",
84
84
  "nightwatch-helpers": "^1.2.0",
85
85
  "rimraf": "^3.0.2",
86
- "rollup": "^2.77.0",
86
+ "rollup": "^2.78.0",
87
87
  "rollup-plugin-analyzer": "^4.0.0",
88
88
  "rollup-plugin-terser": "^7.0.2",
89
89
  "rollup-plugin-typescript2": "^0.32.1",
@@ -92,7 +92,7 @@
92
92
  "vue": "^3.2.37"
93
93
  },
94
94
  "scripts": {
95
- "dev": "vite --config playground/vite.config.js",
95
+ "dev": "jest --watch",
96
96
  "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1",
97
97
  "build": "rimraf dist && rollup -c rollup.config.js",
98
98
  "build:dts": "api-extractor run --local --verbose && tail -n +10 src/globalExtensions.ts >> dist/vue-router.d.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@histoire/vendors",
3
- "version": "0.10.4",
3
+ "version": "0.10.7",
4
4
  "description": "Bundled vendors for histoire",
5
5
  "license": "MIT",
6
6
  "author": {