@real-router/svelte 0.2.9 → 0.2.11

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,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { getNavigator } from "@real-router/core";
3
3
  import { createRouteSource } from "@real-router/sources";
4
- import { createRouteAnnouncer } from "./dom-utils";
4
+ import { createRouteAnnouncer } from "./dom-utils/index.js";
5
5
  import { setContext } from "svelte";
6
6
 
7
7
  import { createReactiveSource } from "./createReactiveSource.svelte";
@@ -1,6 +1,6 @@
1
1
  import { getContext } from "svelte";
2
2
  import { ROUTER_KEY } from "../context";
3
- import { shouldNavigate, applyLinkA11y } from "../dom-utils";
3
+ import { shouldNavigate, applyLinkA11y } from "../dom-utils/index.js";
4
4
  /**
5
5
  * Factory function that captures router context during component initialization.
6
6
  * Must be called during component init (not inside event handlers or effects).
@@ -1,7 +1,11 @@
1
1
  <script lang="ts">
2
2
  import { useIsActiveRoute } from "../composables/useIsActiveRoute.svelte";
3
3
  import { useRouter } from "../composables/useRouter.svelte";
4
- import { shouldNavigate, buildHref, buildActiveClassName } from "../dom-utils";
4
+ import {
5
+ shouldNavigate,
6
+ buildHref,
7
+ buildActiveClassName,
8
+ } from "../dom-utils/index.js";
5
9
 
6
10
  import type { NavigationOptions, Params } from "@real-router/core";
7
11
  import type { Snippet } from "svelte";
@@ -1,3 +1,3 @@
1
- export { createRouteAnnouncer } from "./route-announcer";
2
- export { shouldNavigate, buildHref, buildActiveClassName, applyLinkA11y, } from "./link-utils";
3
- export type { RouteAnnouncerOptions } from "./route-announcer";
1
+ export { createRouteAnnouncer } from "./route-announcer.js";
2
+ export { shouldNavigate, buildHref, buildActiveClassName, applyLinkA11y, } from "./link-utils.js";
3
+ export type { RouteAnnouncerOptions } from "./route-announcer.js";
@@ -1,2 +1,2 @@
1
- export { createRouteAnnouncer } from "./route-announcer";
2
- export { shouldNavigate, buildHref, buildActiveClassName, applyLinkA11y, } from "./link-utils";
1
+ export { createRouteAnnouncer } from "./route-announcer.js";
2
+ export { shouldNavigate, buildHref, buildActiveClassName, applyLinkA11y, } from "./link-utils.js";
@@ -5,7 +5,6 @@ export function shouldNavigate(evt) {
5
5
  !evt.ctrlKey &&
6
6
  !evt.shiftKey);
7
7
  }
8
- // Lives in dom-utils (not core/utils) because buildUrl is injected by browser-plugin via extendRouter()
9
8
  export function buildHref(router, routeName, routeParams) {
10
9
  try {
11
10
  const buildUrl = router.buildUrl;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@real-router/svelte",
3
- "version": "0.2.9",
3
+ "version": "0.2.11",
4
4
  "type": "module",
5
5
  "description": "Svelte 5 integration for Real-Router",
6
6
  "svelte": "./dist/index.js",
@@ -44,9 +44,9 @@
44
44
  "license": "MIT",
45
45
  "sideEffects": false,
46
46
  "dependencies": {
47
- "@real-router/core": "^0.45.2",
48
- "@real-router/route-utils": "^0.1.13",
49
- "@real-router/sources": "^0.4.3"
47
+ "@real-router/core": "^0.46.0",
48
+ "@real-router/route-utils": "^0.1.14",
49
+ "@real-router/sources": "^0.4.4"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@sveltejs/package": "2.5.7",
@@ -58,8 +58,7 @@
58
58
  "svelte": "5.54.0",
59
59
  "svelte-check": "4.4.5",
60
60
  "svelte-eslint-parser": "1.6.0",
61
- "@real-router/browser-plugin": "^0.11.6",
62
- "dom-utils": "^0.2.7"
61
+ "@real-router/browser-plugin": "^0.11.8"
63
62
  },
64
63
  "peerDependencies": {
65
64
  "svelte": ">=5.7.0"
@@ -67,6 +66,7 @@
67
66
  "scripts": {
68
67
  "build": "svelte-package -i src -o dist",
69
68
  "test": "vitest",
69
+ "test:properties": "vitest run --config vitest.config.properties.mts",
70
70
  "test:stress": "vitest run --config vitest.config.stress.mts",
71
71
  "type-check": "svelte-check --tsconfig ./tsconfig.json",
72
72
  "lint": "eslint --cache src/ tests/ --fix --max-warnings 0",
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { getNavigator } from "@real-router/core";
3
3
  import { createRouteSource } from "@real-router/sources";
4
- import { createRouteAnnouncer } from "dom-utils";
4
+ import { createRouteAnnouncer } from "./dom-utils/index.js";
5
5
  import { setContext } from "svelte";
6
6
 
7
7
  import { createReactiveSource } from "./createReactiveSource.svelte";
@@ -2,7 +2,7 @@ import { getContext } from "svelte";
2
2
  import type { ActionReturn } from "svelte/action";
3
3
  import type { Router, Params, NavigationOptions } from "@real-router/core";
4
4
  import { ROUTER_KEY } from "../context";
5
- import { shouldNavigate, applyLinkA11y } from "dom-utils";
5
+ import { shouldNavigate, applyLinkA11y } from "../dom-utils/index.js";
6
6
 
7
7
  export interface LinkActionParams {
8
8
  name: string;
@@ -1,7 +1,11 @@
1
1
  <script lang="ts">
2
2
  import { useIsActiveRoute } from "../composables/useIsActiveRoute.svelte";
3
3
  import { useRouter } from "../composables/useRouter.svelte";
4
- import { shouldNavigate, buildHref, buildActiveClassName } from "dom-utils";
4
+ import {
5
+ shouldNavigate,
6
+ buildHref,
7
+ buildActiveClassName,
8
+ } from "../dom-utils/index.js";
5
9
 
6
10
  import type { NavigationOptions, Params } from "@real-router/core";
7
11
  import type { Snippet } from "svelte";