vorma 0.85.0-pre.2 → 0.85.0-pre.4

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.
@@ -1 +1 @@
1
- {"version":2,"input_hash":"2320072537c0a83ee830136e2fc3a50e5051de550b168e48095834c75c228cba","output_hash":"561a71cc2877b9f58c352c39c08372ea11615cada04dc772e797f64f1f2dc4d3"}
1
+ {"version":2,"input_hash":"7e25b2953096d264220614a819dd56a5d90754400f80216ba393b913468e4a20","output_hash":"2ab9f42a65d1e8e9a865b8541cc92f64a0fe96548d439bc381d048ce0d7b9bcd"}
@@ -2285,8 +2285,8 @@ async function commitSuccessfulNavigation(props) {
2285
2285
  runNavigationCommitSideEffectsWithOptionalViewTransition({
2286
2286
  shouldUseViewTransition: props.intent === "navigate",
2287
2287
  runCommitSideEffects: () => {
2288
- applyCommittedCSSBundlesFromRouteDataSnapshot(committedSnapshot);
2289
2288
  applyRouteHeadAndTitle(committedSnapshot);
2289
+ applyCommittedCSSBundlesFromRouteDataSnapshot(committedSnapshot);
2290
2290
  if (props.shouldCommitHistory && props.intent === "navigate") {
2291
2291
  runHistoryCommit({
2292
2292
  targetUrl: props.targetUrl,
@@ -2354,6 +2354,21 @@ function resolveNavigationScrollStateForTargetHref(targetHref) {
2354
2354
  }
2355
2355
  return resolveStoredScrollStateForCurrentHistoryKeyOrTop();
2356
2356
  }
2357
+ function resolveScrollStateForSameDocumentNoopLinkClick(props) {
2358
+ const targetHash = new URL(props.targetHref, window.location.href).hash;
2359
+ if (normalizeHashForElementLookup(targetHash).length > 0) {
2360
+ return {
2361
+ hash: targetHash
2362
+ };
2363
+ }
2364
+ if (props.scrollToTop === false) {
2365
+ return void 0;
2366
+ }
2367
+ return {
2368
+ x: 0,
2369
+ y: 0
2370
+ };
2371
+ }
2357
2372
  function clearOperation(props) {
2358
2373
  props.store.skippedGlobalLoadingIndicatorNavigationOperationIDs.delete(
2359
2374
  props.operation.id
@@ -3556,6 +3571,12 @@ function makeFinalLinkProps(linkProps) {
3556
3571
  });
3557
3572
  if (targetClassification === "same-document-noop") {
3558
3573
  clickEvent.preventDefault?.();
3574
+ applyScrollState(
3575
+ resolveScrollStateForSameDocumentNoopLinkClick({
3576
+ targetHref: href,
3577
+ scrollToTop: linkProps.scrollToTop
3578
+ })
3579
+ );
3559
3580
  return;
3560
3581
  }
3561
3582
  if (targetClassification === "same-document-hash-change") {
@@ -3924,4 +3945,4 @@ export {
3924
3945
  createTypedAdapterLinkFactory,
3925
3946
  initClient
3926
3947
  };
3927
- //# sourceMappingURL=chunk-6TANZ7A3.js.map
3948
+ //# sourceMappingURL=chunk-KGCUHZ4S.js.map