@real-router/svelte 0.19.0 → 0.19.1

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.
@@ -87,6 +87,21 @@ export declare function anchorTargetsAnotherContext(element: Element | null | un
87
87
  * (#1442). Previous 3-arg call sites continue to work unchanged.
88
88
  */
89
89
  export declare function buildHref(router: Router, routeName: string, routeParams: Params, routeSearch?: SearchParams, hash?: string): string | undefined;
90
+ /**
91
+ * `<Link>` click-handler navigation helper (#532).
92
+ *
93
+ * Wraps `router.navigate(name, params, search, opts)` — the query channel took
94
+ * slot 3 in RFC-4 M2 (#1548) — with same-route different-hash
95
+ * detection: when the consumer clicks a hash-bearing Link that targets the
96
+ * current route with the same params but a different fragment, core's
97
+ * SAME_STATES check would otherwise reject the navigation. The helper adds
98
+ * `force: true` and `hashChange: true` automatically — subscribers can then
99
+ * disambiguate via `state.context.url.hashChanged`.
100
+ *
101
+ * For pure programmatic same-route hash-only navigation, callers are
102
+ * documented to pass `{ force: true }` themselves; the auto-bypass here is
103
+ * a UX convenience for `<Link hash>` that all 6 framework adapters share.
104
+ */
90
105
  export declare function navigateWithHash(router: Router, routeName: string, routeParams: Params, routeSearch: SearchParams | undefined, hash: string | undefined, extraOptions?: NavigationOptions): Promise<State>;
91
106
  export declare function buildActiveClassName(isActive: boolean, activeClassName: string | undefined, baseClassName: string | undefined): string | undefined;
92
107
  /**
@@ -177,6 +177,21 @@ export function buildHref(router, routeName, routeParams, routeSearch, hash) {
177
177
  return undefined;
178
178
  }
179
179
  }
180
+ /**
181
+ * `<Link>` click-handler navigation helper (#532).
182
+ *
183
+ * Wraps `router.navigate(name, params, search, opts)` — the query channel took
184
+ * slot 3 in RFC-4 M2 (#1548) — with same-route different-hash
185
+ * detection: when the consumer clicks a hash-bearing Link that targets the
186
+ * current route with the same params but a different fragment, core's
187
+ * SAME_STATES check would otherwise reject the navigation. The helper adds
188
+ * `force: true` and `hashChange: true` automatically — subscribers can then
189
+ * disambiguate via `state.context.url.hashChanged`.
190
+ *
191
+ * For pure programmatic same-route hash-only navigation, callers are
192
+ * documented to pass `{ force: true }` themselves; the auto-bypass here is
193
+ * a UX convenience for `<Link hash>` that all 6 framework adapters share.
194
+ */
180
195
  export function navigateWithHash(router, routeName, routeParams, routeSearch, hash, extraOptions) {
181
196
  const opts = { ...extraOptions };
182
197
  if (hash !== undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@real-router/svelte",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "type": "module",
5
5
  "description": "Svelte 5 integration for Real-Router",
6
6
  "svelte": "./dist/index.js",
@@ -48,14 +48,14 @@
48
48
  "license": "MIT",
49
49
  "sideEffects": false,
50
50
  "dependencies": {
51
- "@real-router/core": "^0.130.0",
51
+ "@real-router/core": "^0.131.0",
52
52
  "@real-router/route-utils": "^0.4.0",
53
- "@real-router/sources": "^0.14.37"
53
+ "@real-router/sources": "^0.14.38"
54
54
  },
55
55
  "devDependencies": {
56
- "@real-router/browser-plugin": "^0.22.17",
56
+ "@real-router/browser-plugin": "^0.22.18",
57
57
  "@sveltejs/package": "2.5.8",
58
- "@sveltejs/vite-plugin-svelte": "6.2.4",
58
+ "@sveltejs/vite-plugin-svelte": "7.3.0",
59
59
  "@testing-library/jest-dom": "~6.9.1",
60
60
  "@testing-library/svelte": "~5.4.2",
61
61
  "@testing-library/user-event": "~14.6.1",