@maizzle/framework 6.1.7 → 6.2.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.
- package/dist/composables/definePreviewProps.d.ts +21 -0
- package/dist/composables/definePreviewProps.d.ts.map +1 -0
- package/dist/composables/definePreviewProps.js +23 -0
- package/dist/composables/definePreviewProps.js.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -2
- package/dist/plugins/postcss/resolveMaizzleImports.js +15 -8
- package/dist/plugins/postcss/resolveMaizzleImports.js.map +1 -1
- package/dist/render/createRenderer.d.ts.map +1 -1
- package/dist/render/createRenderer.js +25 -4
- package/dist/render/createRenderer.js.map +1 -1
- package/dist/render/index.d.ts +21 -0
- package/dist/render/index.d.ts.map +1 -1
- package/dist/render/index.js +76 -30
- package/dist/render/index.js.map +1 -1
- package/dist/render/plugins/previewProps.d.ts +13 -0
- package/dist/render/plugins/previewProps.d.ts.map +1 -0
- package/dist/render/plugins/previewProps.js +185 -0
- package/dist/render/plugins/previewProps.js.map +1 -0
- package/dist/render/withPreviewProps.d.ts +15 -0
- package/dist/render/withPreviewProps.d.ts.map +1 -0
- package/dist/render/withPreviewProps.js +40 -0
- package/dist/render/withPreviewProps.js.map +1 -0
- package/dist/serve.d.ts.map +1 -1
- package/dist/serve.js +4 -1
- package/dist/serve.js.map +1 -1
- package/dist/server/ui/.vite/deps/@lucide_vue.js +51812 -41607
- package/dist/server/ui/.vite/deps/@lucide_vue.js.map +1 -1
- package/dist/server/ui/.vite/deps/@vueuse_core.js.map +1 -1
- package/dist/server/ui/.vite/deps/@vueuse_shared.js.map +1 -1
- package/dist/server/ui/.vite/deps/_metadata.json +13 -13
- package/dist/server/ui/.vite/deps/class-variance-authority.js.map +1 -1
- package/dist/server/ui/.vite/deps/clsx.js.map +1 -1
- package/dist/server/ui/.vite/deps/culori.js.map +1 -1
- package/dist/server/ui/.vite/deps/reka-ui.js +240 -73
- package/dist/server/ui/.vite/deps/reka-ui.js.map +1 -1
- package/dist/server/ui/.vite/deps/tailwind-merge.js +102 -22
- package/dist/server/ui/.vite/deps/tailwind-merge.js.map +1 -1
- package/dist/server/ui/.vite/deps/vue-router.js +84 -53
- package/dist/server/ui/.vite/deps/vue-router.js.map +1 -1
- package/dist/server/ui/.vite/deps/vue.runtime.esm-bundler-Dq07uCLt.js.map +1 -1
- package/dist/transformers/format.d.ts.map +1 -1
- package/dist/transformers/minify.d.ts.map +1 -1
- package/dist/transformers/purgeCss.d.ts.map +1 -1
- package/dist/transformers/shorthandCss.js +11 -5
- package/dist/transformers/shorthandCss.js.map +1 -1
- package/dist/transformers/tailwindComponent.js +1 -1
- package/dist/transformers/tailwindComponent.js.map +1 -1
- package/dist/transformers/tailwindcss.js +8 -4
- package/dist/transformers/tailwindcss.js.map +1 -1
- package/dist/types/config.d.ts.map +1 -1
- package/dist/utils/compileTailwindCss.js +1 -1
- package/dist/utils/compileTailwindCss.js.map +1 -1
- package/package.json +3 -3
|
@@ -134,13 +134,21 @@ function defineDiagnostics(options) {
|
|
|
134
134
|
return result;
|
|
135
135
|
}
|
|
136
136
|
//#endregion
|
|
137
|
-
//#region ../../home/cosmin/Work/maizzle/framework/node_modules/vue-router/dist/useApi-
|
|
137
|
+
//#region ../../home/cosmin/Work/maizzle/framework/node_modules/vue-router/dist/useApi-BPuI6ZR9.js
|
|
138
138
|
/*!
|
|
139
|
-
* vue-router v5.
|
|
139
|
+
* vue-router v5.3.1
|
|
140
140
|
* (c) 2026 Eduardo San Martin Morote
|
|
141
141
|
* @license MIT
|
|
142
142
|
*/
|
|
143
143
|
/**
|
|
144
|
+
* Checks if a path is absolute, meaning it starts with a `/`.
|
|
145
|
+
*
|
|
146
|
+
* @param path - path to check
|
|
147
|
+
*
|
|
148
|
+
* @internal
|
|
149
|
+
*/
|
|
150
|
+
var isAbsolutePath = (path) => path.startsWith("/");
|
|
151
|
+
/**
|
|
144
152
|
* Allows differentiating lazy components from functional components and vue-class-component
|
|
145
153
|
* @internal
|
|
146
154
|
*
|
|
@@ -4283,9 +4291,9 @@ target.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__ ??= null;
|
|
|
4283
4291
|
target.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__ ??= null;
|
|
4284
4292
|
target.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__ ??= null;
|
|
4285
4293
|
//#endregion
|
|
4286
|
-
//#region ../../home/cosmin/Work/maizzle/framework/node_modules/vue-router/dist/devtools-
|
|
4294
|
+
//#region ../../home/cosmin/Work/maizzle/framework/node_modules/vue-router/dist/devtools-CN5uWJaH.js
|
|
4287
4295
|
/*!
|
|
4288
|
-
* vue-router v5.
|
|
4296
|
+
* vue-router v5.3.1
|
|
4289
4297
|
* (c) 2026 Eduardo San Martin Morote
|
|
4290
4298
|
* @license MIT
|
|
4291
4299
|
*/
|
|
@@ -4505,8 +4513,8 @@ function isEquivalentArray(a, b) {
|
|
|
4505
4513
|
* @param from - currentLocation.path, should start with `/`
|
|
4506
4514
|
*/
|
|
4507
4515
|
function resolveRelativePath(to, from) {
|
|
4508
|
-
if (to
|
|
4509
|
-
if (!from
|
|
4516
|
+
if (isAbsolutePath(to)) return to;
|
|
4517
|
+
if (!isAbsolutePath(from)) {
|
|
4510
4518
|
diagnostics.VUE_ROUTER_R0070({
|
|
4511
4519
|
to,
|
|
4512
4520
|
from
|
|
@@ -4563,11 +4571,13 @@ var START_LOCATION_NORMALIZED = {
|
|
|
4563
4571
|
* @param base - base to normalize
|
|
4564
4572
|
*/
|
|
4565
4573
|
function normalizeBase(base) {
|
|
4566
|
-
if (!base)
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4574
|
+
if (!base) {
|
|
4575
|
+
if (isBrowser) {
|
|
4576
|
+
const baseEl = document.querySelector("base");
|
|
4577
|
+
base = baseEl && baseEl.getAttribute("href") || "/";
|
|
4578
|
+
base = base.replace(/^\w+:\/\/[^/]+/, "");
|
|
4579
|
+
} else base = "/";
|
|
4580
|
+
}
|
|
4571
4581
|
if (base[0] !== "/" && base[0] !== "#") base = "/" + base;
|
|
4572
4582
|
return removeTrailingSlash(base);
|
|
4573
4583
|
}
|
|
@@ -4584,10 +4594,10 @@ function getElementPosition(el, offset) {
|
|
|
4584
4594
|
top: elRect.top - docRect.top - (offset.top || 0)
|
|
4585
4595
|
};
|
|
4586
4596
|
}
|
|
4587
|
-
var computeScrollPosition = () =>
|
|
4597
|
+
var computeScrollPosition = () => history.scrollRestoration === "manual" ? {
|
|
4588
4598
|
left: window.scrollX,
|
|
4589
4599
|
top: window.scrollY
|
|
4590
|
-
}
|
|
4600
|
+
} : null;
|
|
4591
4601
|
function scrollToPosition(position) {
|
|
4592
4602
|
let scrollToOptions;
|
|
4593
4603
|
if ("el" in position) {
|
|
@@ -4640,8 +4650,8 @@ function getScrollKey(path, delta) {
|
|
|
4640
4650
|
return (history.state ? history.state.position - delta : -1) + path;
|
|
4641
4651
|
}
|
|
4642
4652
|
var scrollPositions = /* @__PURE__ */ new Map();
|
|
4643
|
-
function saveScrollPosition(key
|
|
4644
|
-
scrollPositions.set(key,
|
|
4653
|
+
function saveScrollPosition(key) {
|
|
4654
|
+
scrollPositions.set(key, computeScrollPosition());
|
|
4645
4655
|
}
|
|
4646
4656
|
function getSavedScrollPosition(key) {
|
|
4647
4657
|
const scroll = scrollPositions.get(key);
|
|
@@ -4955,8 +4965,10 @@ function extractChangingRecords(to, from) {
|
|
|
4955
4965
|
const len = Math.max(from.matched.length, to.matched.length);
|
|
4956
4966
|
for (let i = 0; i < len; i++) {
|
|
4957
4967
|
const recordFrom = from.matched[i];
|
|
4958
|
-
if (recordFrom)
|
|
4959
|
-
|
|
4968
|
+
if (recordFrom) {
|
|
4969
|
+
if (to.matched.find((record) => isSameRouteRecord(record, recordFrom))) updatingRecords.push(recordFrom);
|
|
4970
|
+
else leavingRecords.push(recordFrom);
|
|
4971
|
+
}
|
|
4960
4972
|
const recordTo = to.matched[i];
|
|
4961
4973
|
if (recordTo) {
|
|
4962
4974
|
if (!from.matched.find((record) => isSameRouteRecord(record, recordTo))) enteringRecords.push(recordTo);
|
|
@@ -5300,7 +5312,7 @@ function isRouteMatching(route, filter) {
|
|
|
5300
5312
|
}
|
|
5301
5313
|
const path = route.record.path.toLowerCase();
|
|
5302
5314
|
const decodedPath = decode(path);
|
|
5303
|
-
if (!filter
|
|
5315
|
+
if (!isAbsolutePath(filter) && (decodedPath.includes(filter) || path.includes(filter))) return true;
|
|
5304
5316
|
if (decodedPath.startsWith(filter) || path.startsWith(filter)) return true;
|
|
5305
5317
|
if (route.record.name && String(route.record.name).includes(filter)) return true;
|
|
5306
5318
|
return route.children.some((child) => isRouteMatching(child, filter));
|
|
@@ -5313,7 +5325,7 @@ function omit(obj, keys) {
|
|
|
5313
5325
|
//#endregion
|
|
5314
5326
|
//#region ../../home/cosmin/Work/maizzle/framework/node_modules/vue-router/dist/vue-router.js
|
|
5315
5327
|
/*!
|
|
5316
|
-
* vue-router v5.
|
|
5328
|
+
* vue-router v5.3.1
|
|
5317
5329
|
* (c) 2026 Eduardo San Martin Morote
|
|
5318
5330
|
* @license MIT
|
|
5319
5331
|
*/
|
|
@@ -5373,22 +5385,18 @@ function useHistoryListeners(base, historyState, currentLocation, replace) {
|
|
|
5373
5385
|
return teardown;
|
|
5374
5386
|
}
|
|
5375
5387
|
function beforeUnloadListener() {
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
history.replaceState(assign({}, history.state, { scroll: computeScrollPosition() }), "");
|
|
5380
|
-
}
|
|
5388
|
+
const { history } = window;
|
|
5389
|
+
if (!history.state) return;
|
|
5390
|
+
history.replaceState(assign({}, history.state, { scroll: computeScrollPosition() }), "");
|
|
5381
5391
|
}
|
|
5382
5392
|
function destroy() {
|
|
5383
5393
|
for (const teardown of teardowns) teardown();
|
|
5384
5394
|
teardowns = [];
|
|
5385
5395
|
window.removeEventListener("popstate", popStateHandler);
|
|
5386
5396
|
window.removeEventListener("pagehide", beforeUnloadListener);
|
|
5387
|
-
document.removeEventListener("visibilitychange", beforeUnloadListener);
|
|
5388
5397
|
}
|
|
5389
5398
|
window.addEventListener("popstate", popStateHandler);
|
|
5390
5399
|
window.addEventListener("pagehide", beforeUnloadListener);
|
|
5391
|
-
document.addEventListener("visibilitychange", beforeUnloadListener);
|
|
5392
5400
|
return {
|
|
5393
5401
|
pauseListeners,
|
|
5394
5402
|
listen,
|
|
@@ -5398,14 +5406,14 @@ function useHistoryListeners(base, historyState, currentLocation, replace) {
|
|
|
5398
5406
|
/**
|
|
5399
5407
|
* Creates a state object
|
|
5400
5408
|
*/
|
|
5401
|
-
function buildState(back, current, forward, replaced = false
|
|
5409
|
+
function buildState(back, current, forward, replaced = false) {
|
|
5402
5410
|
return {
|
|
5403
5411
|
back,
|
|
5404
5412
|
current,
|
|
5405
5413
|
forward,
|
|
5406
5414
|
replaced,
|
|
5407
5415
|
position: window.history.length,
|
|
5408
|
-
scroll:
|
|
5416
|
+
scroll: null
|
|
5409
5417
|
};
|
|
5410
5418
|
}
|
|
5411
5419
|
function useHistoryStateNavigation(base) {
|
|
@@ -5600,7 +5608,7 @@ var VALID_PARAM_RE = /[a-zA-Z0-9_]/;
|
|
|
5600
5608
|
function tokenizePath(path) {
|
|
5601
5609
|
if (!path) return [[]];
|
|
5602
5610
|
if (path === "/") return [[ROOT_TOKEN]];
|
|
5603
|
-
if (!path
|
|
5611
|
+
if (!isAbsolutePath(path)) throw new Error(`Route paths should start with a "/": "${path}" should be "/${path}".`);
|
|
5604
5612
|
function crash(message) {
|
|
5605
5613
|
throw new Error(`ERR (${state})/"${buffer}": ${message}`);
|
|
5606
5614
|
}
|
|
@@ -5666,9 +5674,10 @@ function tokenizePath(path) {
|
|
|
5666
5674
|
}
|
|
5667
5675
|
break;
|
|
5668
5676
|
case 2:
|
|
5669
|
-
if (char === ")")
|
|
5670
|
-
|
|
5671
|
-
|
|
5677
|
+
if (char === ")") {
|
|
5678
|
+
if (customRe[customRe.length - 1] == "\\") customRe = customRe.slice(0, -1) + char;
|
|
5679
|
+
else state = 3;
|
|
5680
|
+
} else customRe += char;
|
|
5672
5681
|
break;
|
|
5673
5682
|
case 3:
|
|
5674
5683
|
consumeBuffer();
|
|
@@ -5774,10 +5783,14 @@ function tokensToParser(segments, extraOptions) {
|
|
|
5774
5783
|
const param = value in params ? params[value] : "";
|
|
5775
5784
|
if (isArray(param) && !repeatable) throw new Error(`Provided param "${value}" is an array but it is not repeatable (* or + modifiers)`);
|
|
5776
5785
|
const text = isArray(param) ? param.join("/") : param;
|
|
5777
|
-
if (!text)
|
|
5778
|
-
if (
|
|
5779
|
-
|
|
5780
|
-
|
|
5786
|
+
if (!text) {
|
|
5787
|
+
if (optional) {
|
|
5788
|
+
if (segment.length < 2) {
|
|
5789
|
+
if (path.endsWith("/")) path = path.slice(0, -1);
|
|
5790
|
+
else avoidDuplicatedSlash = true;
|
|
5791
|
+
}
|
|
5792
|
+
} else throw new Error(`Missing required param "${value}"`);
|
|
5793
|
+
}
|
|
5781
5794
|
path += text;
|
|
5782
5795
|
}
|
|
5783
5796
|
}
|
|
@@ -5904,14 +5917,14 @@ function createRouterMatcher(routes, globalOptions) {
|
|
|
5904
5917
|
let originalMatcher;
|
|
5905
5918
|
for (const normalizedRecord of normalizedRecords) {
|
|
5906
5919
|
const { path } = normalizedRecord;
|
|
5907
|
-
if (parent && path
|
|
5920
|
+
if (parent && !isAbsolutePath(path)) {
|
|
5908
5921
|
const parentPath = parent.record.path;
|
|
5909
5922
|
const connectingSlash = parentPath[parentPath.length - 1] === "/" ? "" : "/";
|
|
5910
5923
|
normalizedRecord.path = parent.record.path + (path && connectingSlash + path);
|
|
5911
5924
|
}
|
|
5912
5925
|
if (normalizedRecord.path === "*") throw new Error("Catch all routes (\"*\") must now be defined using a param with a custom regexp.\nSee more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.");
|
|
5913
5926
|
matcher = createRouteRecordMatcher(normalizedRecord, parent, options);
|
|
5914
|
-
if (parent && path
|
|
5927
|
+
if (parent && isAbsolutePath(path)) checkMissingParamsInAbsolutePath(matcher, parent);
|
|
5915
5928
|
if (originalRecord) {
|
|
5916
5929
|
originalRecord.alias.push(matcher);
|
|
5917
5930
|
checkSameParams(originalRecord, matcher);
|
|
@@ -5984,7 +5997,7 @@ function createRouterMatcher(routes, globalOptions) {
|
|
|
5984
5997
|
path = matcher.stringify(params);
|
|
5985
5998
|
} else if (location.path != null) {
|
|
5986
5999
|
path = location.path;
|
|
5987
|
-
if (!path
|
|
6000
|
+
if (!isAbsolutePath(path)) diagnostics.VUE_ROUTER_R0101({ path });
|
|
5988
6001
|
matcher = matchers.find((m) => m.re.test(path));
|
|
5989
6002
|
if (matcher) {
|
|
5990
6003
|
params = matcher.parse(path);
|
|
@@ -6316,9 +6329,9 @@ function includesParams(outer, inner) {
|
|
|
6316
6329
|
for (const key in inner) {
|
|
6317
6330
|
const innerValue = inner[key];
|
|
6318
6331
|
const outerValue = outer[key];
|
|
6319
|
-
if (
|
|
6320
|
-
if (innerValue !== outerValue) return false;
|
|
6321
|
-
} else if (
|
|
6332
|
+
if (isArray(innerValue)) {
|
|
6333
|
+
if (!isArray(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i) => value.valueOf() !== outerValue[i].valueOf())) return false;
|
|
6334
|
+
} else if (innerValue !== outerValue) return false;
|
|
6322
6335
|
}
|
|
6323
6336
|
return true;
|
|
6324
6337
|
}
|
|
@@ -6404,7 +6417,7 @@ var RouterViewImpl = /*#__PURE__*/ defineComponent({
|
|
|
6404
6417
|
meta: matchedRoute.meta
|
|
6405
6418
|
};
|
|
6406
6419
|
(isArray(component.ref) ? component.ref.map((r) => r.i) : [component.ref.i]).forEach((instance) => {
|
|
6407
|
-
instance.__vrv_devtools = info;
|
|
6420
|
+
if (instance) instance.__vrv_devtools = info;
|
|
6408
6421
|
});
|
|
6409
6422
|
}
|
|
6410
6423
|
return normalizeSlot(slots.default, {
|
|
@@ -6447,6 +6460,7 @@ function createRouter(options) {
|
|
|
6447
6460
|
const beforeResolveGuards = useCallbacks();
|
|
6448
6461
|
const afterGuards = useCallbacks();
|
|
6449
6462
|
const currentRoute = shallowRef(START_LOCATION_NORMALIZED);
|
|
6463
|
+
const routesVersion = shallowRef(0);
|
|
6450
6464
|
let pendingLocation = START_LOCATION_NORMALIZED;
|
|
6451
6465
|
if (isBrowser && options.scrollBehavior && "scrollRestoration" in history) history.scrollRestoration = "manual";
|
|
6452
6466
|
const normalizeParams = applyToParams.bind(null, (paramValue) => "" + paramValue);
|
|
@@ -6460,12 +6474,23 @@ function createRouter(options) {
|
|
|
6460
6474
|
if (!parent) diagnostics.VUE_ROUTER_R0001({ name: String(parentOrRoute) });
|
|
6461
6475
|
record = route;
|
|
6462
6476
|
} else record = parentOrRoute;
|
|
6463
|
-
|
|
6477
|
+
const removeRoute = matcher.addRoute(record, parent);
|
|
6478
|
+
routesVersion.value++;
|
|
6479
|
+
return () => {
|
|
6480
|
+
removeRoute();
|
|
6481
|
+
routesVersion.value++;
|
|
6482
|
+
};
|
|
6464
6483
|
}
|
|
6465
6484
|
function removeRoute(name) {
|
|
6466
6485
|
const recordMatcher = matcher.getRecordMatcher(name);
|
|
6467
|
-
if (recordMatcher)
|
|
6468
|
-
|
|
6486
|
+
if (recordMatcher) {
|
|
6487
|
+
matcher.removeRoute(recordMatcher);
|
|
6488
|
+
routesVersion.value++;
|
|
6489
|
+
} else diagnostics.VUE_ROUTER_R0002({ name: String(name) });
|
|
6490
|
+
}
|
|
6491
|
+
function clearRoutes() {
|
|
6492
|
+
matcher.clearRoutes();
|
|
6493
|
+
routesVersion.value++;
|
|
6469
6494
|
}
|
|
6470
6495
|
function getRoutes() {
|
|
6471
6496
|
return matcher.getRoutes().map((routeMatcher) => routeMatcher.record);
|
|
@@ -6474,8 +6499,9 @@ function createRouter(options) {
|
|
|
6474
6499
|
return !!matcher.getRecordMatcher(name);
|
|
6475
6500
|
}
|
|
6476
6501
|
function resolve(rawLocation, currentLocation) {
|
|
6477
|
-
|
|
6502
|
+
routesVersion.value;
|
|
6478
6503
|
if (typeof rawLocation === "string") {
|
|
6504
|
+
currentLocation = currentLocation || (rawLocation.startsWith("/") ? START_LOCATION_NORMALIZED : currentRoute.value);
|
|
6479
6505
|
const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);
|
|
6480
6506
|
const matchedRoute = matcher.resolve({ path: locationNormalized.path }, currentLocation);
|
|
6481
6507
|
const href = routerHistory.createHref(locationNormalized.fullPath);
|
|
@@ -6494,6 +6520,7 @@ function createRouter(options) {
|
|
|
6494
6520
|
diagnostics.VUE_ROUTER_R0005({ rawLocation });
|
|
6495
6521
|
return resolve({});
|
|
6496
6522
|
}
|
|
6523
|
+
currentLocation = assign({}, currentLocation || (rawLocation.path != null && rawLocation.path.startsWith("/") && !("name" in rawLocation && rawLocation.name) ? START_LOCATION_NORMALIZED : currentRoute.value));
|
|
6497
6524
|
let matcherLocation;
|
|
6498
6525
|
if (rawLocation.path != null) {
|
|
6499
6526
|
if ("params" in rawLocation && !("name" in rawLocation) && Object.keys(rawLocation.params).length) diagnostics.VUE_ROUTER_R0006({ path: rawLocation.path });
|
|
@@ -6643,8 +6670,10 @@ function createRouter(options) {
|
|
|
6643
6670
|
return runGuardQueue(guards);
|
|
6644
6671
|
}).then(() => {
|
|
6645
6672
|
guards = [];
|
|
6646
|
-
for (const record of enteringRecords) if (record.beforeEnter)
|
|
6647
|
-
|
|
6673
|
+
for (const record of enteringRecords) if (record.beforeEnter) {
|
|
6674
|
+
if (isArray(record.beforeEnter)) for (const beforeEnter of record.beforeEnter) guards.push(guardToPromiseFn(beforeEnter, to, from));
|
|
6675
|
+
else guards.push(guardToPromiseFn(record.beforeEnter, to, from));
|
|
6676
|
+
}
|
|
6648
6677
|
guards.push(canceledNavigationCheck);
|
|
6649
6678
|
return runGuardQueue(guards);
|
|
6650
6679
|
}).then(() => {
|
|
@@ -6672,8 +6701,10 @@ function createRouter(options) {
|
|
|
6672
6701
|
if (error) return error;
|
|
6673
6702
|
const isFirstNavigation = from === START_LOCATION_NORMALIZED;
|
|
6674
6703
|
const state = !isBrowser ? {} : history.state;
|
|
6675
|
-
if (isPush)
|
|
6676
|
-
|
|
6704
|
+
if (isPush) {
|
|
6705
|
+
if (replace || isFirstNavigation) routerHistory.replace(toLocation.fullPath, assign({ scroll: isFirstNavigation && state && state.scroll }, data));
|
|
6706
|
+
else routerHistory.push(toLocation.fullPath, data);
|
|
6707
|
+
}
|
|
6677
6708
|
currentRoute.value = toLocation;
|
|
6678
6709
|
handleScroll(toLocation, from, isPush, isFirstNavigation);
|
|
6679
6710
|
markAsReady();
|
|
@@ -6694,7 +6725,7 @@ function createRouter(options) {
|
|
|
6694
6725
|
}
|
|
6695
6726
|
pendingLocation = toLocation;
|
|
6696
6727
|
const from = currentRoute.value;
|
|
6697
|
-
if (isBrowser) saveScrollPosition(getScrollKey(from.fullPath, info.delta)
|
|
6728
|
+
if (isBrowser && info.delta) saveScrollPosition(getScrollKey(from.fullPath, info.delta));
|
|
6698
6729
|
navigate(toLocation, from).catch((error) => {
|
|
6699
6730
|
if (isNavigationFailure(error, 12)) return error;
|
|
6700
6731
|
if (isNavigationFailure(error, 2)) {
|
|
@@ -6765,7 +6796,7 @@ function createRouter(options) {
|
|
|
6765
6796
|
listening: true,
|
|
6766
6797
|
addRoute,
|
|
6767
6798
|
removeRoute,
|
|
6768
|
-
clearRoutes
|
|
6799
|
+
clearRoutes,
|
|
6769
6800
|
hasRoute,
|
|
6770
6801
|
getRoutes,
|
|
6771
6802
|
resolve,
|