@vesk/vesk-cli 0.2.24 → 0.2.25

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 (2) hide show
  1. package/dist/cli.js +1 -21
  2. package/package.json +5 -5
package/dist/cli.js CHANGED
@@ -2835,11 +2835,6 @@ function isRouteHref(href) {
2835
2835
  function setIsHydrating(v) {
2836
2836
  __isHydrating = v;
2837
2837
  }
2838
- function captureInitialScroll() {
2839
- if (typeof window === "undefined") return;
2840
- _initialSavedScroll = window.scrollY || 0;
2841
- _initialScrollRestored = false;
2842
- }
2843
2838
  function setIsPopStateNavigation(v) {
2844
2839
  _isPopStateNavigation = v;
2845
2840
  }
@@ -2907,11 +2902,6 @@ function handleScroll(pathname, isReplace, scrollBehavior) {
2907
2902
  requestAnimationFrame(() => {
2908
2903
  window.scrollTo({ top: savedY !== void 0 ? savedY : 0, behavior });
2909
2904
  });
2910
- } else if (isReplace && !_initialScrollRestored) {
2911
- _initialScrollRestored = true;
2912
- requestAnimationFrame(() => {
2913
- window.scrollTo({ top: _initialSavedScroll, behavior });
2914
- });
2915
2905
  } else if (!isReplace) {
2916
2906
  requestAnimationFrame(() => window.scrollTo({ top: 0, behavior }));
2917
2907
  }
@@ -3222,7 +3212,7 @@ function useRouter() {
3222
3212
  }
3223
3213
  };
3224
3214
  }
3225
- var Redirect, NotFoundError, RouterCtx, _currentRouter, _outletId, __isHydrating, _state, _scrollPositions, _isPopStateNavigation, _initialScrollRestored, _initialSavedScroll, HEAD_MARKER;
3215
+ var Redirect, NotFoundError, RouterCtx, _currentRouter, _outletId, __isHydrating, _state, _scrollPositions, _isPopStateNavigation, HEAD_MARKER;
3226
3216
  var init_router_components = __esm({
3227
3217
  "../runtime/src/router-components.ts"() {
3228
3218
  "use strict";
@@ -3257,8 +3247,6 @@ var init_router_components = __esm({
3257
3247
  };
3258
3248
  _scrollPositions = /* @__PURE__ */ new Map();
3259
3249
  _isPopStateNavigation = false;
3260
- _initialScrollRestored = false;
3261
- _initialSavedScroll = 0;
3262
3250
  HEAD_MARKER = "data-vesk-head";
3263
3251
  }
3264
3252
  });
@@ -4316,10 +4304,6 @@ function createRouter(routes, options = {}) {
4316
4304
  },
4317
4305
  start() {
4318
4306
  setCurrentRouter(this);
4319
- if (typeof window !== "undefined" && "scrollRestoration" in window.history) {
4320
- captureInitialScroll();
4321
- window.history.scrollRestoration = "manual";
4322
- }
4323
4307
  if (typeof window !== "undefined" && typeof window.addEventListener === "function") {
4324
4308
  let _scrollTimer = null;
4325
4309
  window.addEventListener("scroll", () => {
@@ -4639,10 +4623,6 @@ function createFileRouter(routeTree, options = {}) {
4639
4623
  },
4640
4624
  start() {
4641
4625
  setCurrentRouter(this);
4642
- if (typeof window !== "undefined" && "scrollRestoration" in window.history) {
4643
- captureInitialScroll();
4644
- window.history.scrollRestoration = "manual";
4645
- }
4646
4626
  if (typeof window !== "undefined" && typeof window.addEventListener === "function") {
4647
4627
  let _scrollTimer = null;
4648
4628
  const _onScroll = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vesk/vesk-cli",
3
- "version": "0.2.24",
3
+ "version": "0.2.25",
4
4
  "type": "module",
5
5
  "description": "Vesk — compiler-first framework for the post-VDOM web. vesk dev, vesk build.",
6
6
  "bin": {
@@ -8,10 +8,10 @@
8
8
  },
9
9
  "main": "./dist/cli.js",
10
10
  "dependencies": {
11
- "@vesk/adapter": "^0.2.24",
12
- "@vesk/compiler": "^0.2.24",
13
- "@vesk/plugin-tailwind": "^0.2.24",
14
- "@vesk/runtime": "^0.2.24",
11
+ "@vesk/adapter": "^0.2.25",
12
+ "@vesk/compiler": "^0.2.25",
13
+ "@vesk/plugin-tailwind": "^0.2.25",
14
+ "@vesk/runtime": "^0.2.25",
15
15
  "esrap": "^2.3.0",
16
16
  "typescript": "^5.8.0",
17
17
  "ws": "^8.18.0",