@keenmate/svelte-spa-router 5.0.0-rc12 → 5.1.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/CHANGELOG.md CHANGED
@@ -7,7 +7,78 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- ## [5.0.0-rc12] - 2025-02-12
10
+ ## [5.1.0] - TBD
11
+
12
+ ### Added
13
+ - **Global Window API:** Added runtime debugging and introspection via `window.components['svelte-spa-router']`
14
+ - `version()` - Get library version at runtime
15
+ - `config` - Access package metadata (name, version, author, license, repository, homepage)
16
+ - `logging.enableLogging()` - Enable all debug logging from browser console
17
+ - `logging.disableLogging()` - Disable all logging from browser console
18
+ - `logging.setLogLevel(level)` - Set global log level from browser console
19
+ - `logging.setCategoryLevel(category, level)` - Control specific logging categories from browser console
20
+ - `logging.getCategories()` - List all available logging categories
21
+ - TypeScript support with full autocompletion for global API
22
+ - SSR-safe implementation (only initializes in browser)
23
+ - Namespace-safe pattern using `window.components` (shared across all component libraries)
24
+ - Enables debugging production issues without code changes or rebuilding
25
+ - Example: `window.components['svelte-spa-router'].logging.setCategoryLevel('ROUTER:NAVIGATION', 'debug')`
26
+
27
+ ## [5.0.0] - 2025-01-17 ✅ Published
28
+
29
+ ### Changed
30
+ - **Code Quality:** Major ESLint cleanup - reduced linting issues from 161 to 11 (93% reduction)
31
+ - Removed unused imports across multiple modules (hierarchyLogger, location, untrack, hasRoute, etc.)
32
+ - Removed unused function parameters in test files
33
+ - Replaced unused catch error variables with bare catch blocks
34
+ - Added `src/lib/vendor/**` to eslint ignore list (third-party loglevel library)
35
+ - Remaining 11 warnings are false positives from ESLint not understanding Svelte 5 runes
36
+ - **Note:** If issues arise, this cleanup touched error-handler, hierarchy, navigation-guard, permissions, querystring-helpers, route-metadata, utils, and all test files
37
+ - **Logger API:** Renamed `enableCategory()` to `setCategoryLevel()` for better clarity
38
+ - Old name was confusing: `enableCategory('ROUTER:SCROLL', 'silent')` reads as "enable to disable"
39
+ - New name is explicit: `setCategoryLevel('ROUTER:SCROLL', 'silent')` clearly sets the level
40
+ - Added `'silent'` to TypeScript type definitions for level parameter
41
+ - No backward compatibility - clean break for clearer API
42
+
43
+ ### Fixed
44
+ - **Breaking:** Standardized Router callback prop naming to camelCase (JavaScript convention)
45
+ - `onrouteLoading` → `onRouteLoading`
46
+ - `onrouteLoaded` → `onRouteLoaded`
47
+ - `onconditionsFailed` → `onConditionsFailed`
48
+ - `onNotFound` remains unchanged (already correct)
49
+ - Updated all documentation, examples, tests, and showcase site
50
+ - **Migration:** Update your Router component props to use camelCase naming
51
+ - **Permissions:** Completely redesigned unauthorized handling system
52
+ - Previously required manual `/unauthorized` route definition and `onUnauthorized` callback with hash-based navigation
53
+ - New system treats unauthorized state as special router state (like 404), not a regular route
54
+ - `/unauthorized` route no longer needs to be defined in routes object
55
+ - Respects configured routing mode (hash/history) instead of forcing hash navigation
56
+ - Two behavior modes available:
57
+ - `unauthorizedBehavior: 'component'` - Shows unauthorized component without changing URL (default)
58
+ - `unauthorizedBehavior: 'navigate'` - Navigates to configured unauthorized route
59
+ - Configure via `configurePermissions()` with new options: `unauthorizedBehavior`, `unauthorizedRoute`, `unauthorizedComponent`
60
+ - Router automatically detects permission failures by checking `routeContext.permissions`
61
+ - `createPermissionCondition()` only calls `onUnauthorized` handler if explicitly configured (backward compatibility)
62
+ - Added internal `hasExplicitHandler()` tracking to distinguish explicit callbacks from defaults
63
+ - **Migration:** Old `onUnauthorized` callback approach still works, new declarative config recommended
64
+ - **Referrer Tracking:** Fixed referrer not being preserved on browser back/forward navigation
65
+ - Previously, pressing back button would show chronological previous route as referrer instead of original referrer
66
+ - Example: `/` → `/links` (referrer: `/`) → `/query` (referrer: `/links`) → [BACK] → `/links` showed referrer `/query` (wrong!) instead of `/` (correct)
67
+ - Root cause: navigationContext with referrer was calculated by router but never saved to history.state
68
+ - Solution: Router now saves calculated navigationContext (with referrer) back to history.state after route loads
69
+ - Added serialization handling for Proxy objects in params (uses JSON serialization fallback when structuredClone fails)
70
+ - Applied to both hash mode and history mode navigation
71
+ - Navigation sequence tracking now correctly increments on forward and decrements on back
72
+ - `goBack()` function simplified to use native browser back (`window.history.back()`) instead of manual push
73
+ - Referrer and scroll position now automatically restored from history.state on back/forward navigation
74
+ - **Permissions:** Fixed `createProtectedRoute()` failing with synchronous component imports
75
+ - Error: "Cannot read properties of undefined (reading 'before')" when using sync imports like `component: AdminPanel`
76
+ - Root cause: `createProtectedRouteDefinition()` always treated components as async, causing Router to call component constructor as function returning `undefined`
77
+ - Solution: Detect sync vs async components - use `component` key for sync (let wrap() handle Promise wrapping) and `asyncComponent` key for async
78
+ - Now supports both patterns: `component: AdminPanel` (sync) and `component: () => import('./Admin.svelte')` (async)
79
+ - Async detection: `typeof component === 'function' && component.length === 0`
80
+
81
+ ## [5.0.0-rc12] - 2025-02-12 ✅ Published
11
82
 
12
83
  ### Fixed
13
84
  - **Critical:** Fixed missing TypeScript source files in published npm package
@@ -34,7 +105,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
34
105
  - Uses vendored `loglevel` and `loglevel-plugin-prefix` libraries (ESM versions)
35
106
  - **Breaking API change**: `setDebugLoggingEnabled()` replaced with new API
36
107
  - Old: `import { setDebugLoggingEnabled } from '@keenmate/svelte-spa-router/utils'`
37
- - New: `import { enableLogging, disableLogging, setLogLevel, enableCategory } from '@keenmate/svelte-spa-router/logger'`
108
+ - New: `import { enableLogging, disableLogging, setLogLevel, setCategoryLevel } from '@keenmate/svelte-spa-router/logger'`
38
109
  - **12 hierarchical categories** for granular control:
39
110
  - `ROUTER` - Core routing pipeline, route matching
40
111
  - `ROUTER:NAVIGATION` - push, pop, replace, goBack
@@ -53,8 +124,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
53
124
  - **Per-category control**: Enable specific categories at different log levels
54
125
  \`\`\`javascript
55
126
  disableLogging() // Disable all
56
- enableCategory('ROUTER:SCROLL', 'debug') // Enable only scroll logs
57
- enableCategory('ROUTER:NAVIGATION', 'info') // Navigation at info level
127
+ setCategoryLevel('ROUTER:SCROLL', 'debug') // Enable only scroll logs
128
+ setCategoryLevel('ROUTER:NAVIGATION', 'info') // Navigation at info level
58
129
  \`\`\`
59
130
  - **Global level control**: \`setLogLevel('warn')\` to set all categories at once
60
131
  - Removed \`src/lib/internal/logging.js\` (custom implementation)
package/README.md CHANGED
@@ -35,6 +35,135 @@ npm install @keenmate/svelte-spa-router
35
35
 
36
36
  > **⚠️ Important:** This package requires **Node.js 22 or higher** for production builds. Node.js 20 has compatibility issues with Svelte 5 that may cause runtime errors like "link is not defined" in production builds. Make sure your build environment (CI/CD, Docker, etc.) uses Node 22+.
37
37
 
38
+ ## Quick Start: Common Imports
39
+
40
+ Here are the most frequently used imports and where to get them:
41
+
42
+ ### Basic Router Setup
43
+
44
+ ```javascript
45
+ // Main Router component
46
+ import Router from '@keenmate/svelte-spa-router'
47
+
48
+ // Navigation functions - available from main module OR /utils
49
+ import { push, replace, pop, goBack } from '@keenmate/svelte-spa-router'
50
+ // Alternative:
51
+ import { push, replace, pop, goBack } from '@keenmate/svelte-spa-router/utils'
52
+
53
+ // Link action for <a> tags
54
+ import { link } from '@keenmate/svelte-spa-router'
55
+ ```
56
+
57
+ ### Accessing Route Information
58
+
59
+ ```javascript
60
+ // Get current route data (call as functions, not stores!)
61
+ import { location, querystring, routeParams, navigationContext } from '@keenmate/svelte-spa-router'
62
+
63
+ // Usage in components:
64
+ const currentPath = $derived(location()) // e.g., "/user/123"
65
+ const query = $derived(querystring()) // e.g., "?tab=profile"
66
+ const params = $derived(routeParams()) // e.g., { id: "123" }
67
+ const context = $derived(navigationContext()) // Navigation context data
68
+
69
+ // Alternative: Access from /utils
70
+ import { location, querystring, routeParams } from '@keenmate/svelte-spa-router'
71
+ ```
72
+
73
+ **⚠️ Important:** In route components, prefer receiving `routeParams` as props instead of importing:
74
+
75
+ ```svelte
76
+ <script>
77
+ // Recommended in route components
78
+ let { routeParams = {} } = $props()
79
+ </script>
80
+
81
+ <p>User ID: {routeParams.id}</p>
82
+ ```
83
+
84
+ ### Route Configuration
85
+
86
+ ```javascript
87
+ // Wrap routes with loading/conditions
88
+ import { wrap } from '@keenmate/svelte-spa-router/wrap'
89
+
90
+ // Active link highlighting
91
+ import active from '@keenmate/svelte-spa-router/active'
92
+
93
+ // Named routes system
94
+ import { registerRoutes, buildUrl } from '@keenmate/svelte-spa-router/routes'
95
+ ```
96
+
97
+ ### Advanced Features
98
+
99
+ ```javascript
100
+ // Permission-based routing
101
+ import {
102
+ configurePermissions,
103
+ createProtectedRoute,
104
+ hasPermission
105
+ } from '@keenmate/svelte-spa-router/helpers/permissions'
106
+
107
+ // Navigation guards
108
+ import {
109
+ registerBeforeLeave,
110
+ unregisterBeforeLeave,
111
+ NavigationCancelledError
112
+ } from '@keenmate/svelte-spa-router/helpers/navigation-guard'
113
+
114
+ // Hierarchical route structure
115
+ import { createHierarchy } from '@keenmate/svelte-spa-router/helpers/hierarchy'
116
+
117
+ // Error handling
118
+ import {
119
+ configureGlobalErrorHandler
120
+ } from '@keenmate/svelte-spa-router/helpers/error-handler'
121
+ import { GlobalErrorHandler } from '@keenmate/svelte-spa-router/helpers/GlobalErrorHandler'
122
+
123
+ // URL utilities
124
+ import { joinPaths } from '@keenmate/svelte-spa-router/helpers/url-helpers'
125
+
126
+ // Query string helpers
127
+ import {
128
+ parseQuerystring,
129
+ stringifyQuerystring,
130
+ updateQuerystring
131
+ } from '@keenmate/svelte-spa-router/helpers/querystring'
132
+ ```
133
+
134
+ ### All Available Import Paths
135
+
136
+ ```javascript
137
+ '@keenmate/svelte-spa-router' // Main module (Router, push, location, etc.)
138
+ '@keenmate/svelte-spa-router/utils' // Alternative path for utils
139
+ '@keenmate/svelte-spa-router/wrap' // Route wrapping
140
+ '@keenmate/svelte-spa-router/active' // Active link action
141
+ '@keenmate/svelte-spa-router/routes' // Named routes system
142
+ '@keenmate/svelte-spa-router/constants' // Constants and enums
143
+ '@keenmate/svelte-spa-router/logger' // Debug logging
144
+ '@keenmate/svelte-spa-router/helpers/permissions' // Permission system
145
+ '@keenmate/svelte-spa-router/helpers/navigation-guard' // Navigation guards
146
+ '@keenmate/svelte-spa-router/helpers/hierarchy' // Hierarchical routes
147
+ '@keenmate/svelte-spa-router/helpers/error-handler' // Error handling
148
+ '@keenmate/svelte-spa-router/helpers/GlobalErrorHandler' // Error component
149
+ '@keenmate/svelte-spa-router/helpers/url-helpers' // URL utilities
150
+ '@keenmate/svelte-spa-router/helpers/querystring' // Query string helpers
151
+ '@keenmate/svelte-spa-router/helpers/route-metadata' // Breadcrumbs/metadata
152
+ '@keenmate/svelte-spa-router/helpers/filters' // Filter parsing
153
+ ```
154
+
155
+ **❌ Common Mistake:**
156
+
157
+ ```javascript
158
+ // ❌ WRONG - /stores path doesn't exist (this was the old v3/v4 API)
159
+ import { routeParams } from '@keenmate/svelte-spa-router/stores'
160
+
161
+ // ✅ CORRECT - Import from main module or /utils
162
+ import { routeParams } from '@keenmate/svelte-spa-router'
163
+ ```
164
+
165
+ > **Note:** This is a Svelte 5 router using runes (`$state`, `$derived`), not Svelte stores. There is no `/stores` export path.
166
+
38
167
  ## Debug Logging
39
168
 
40
169
  The router includes a built-in debug logging system to help troubleshoot routing issues during development.
@@ -51,11 +180,11 @@ if (import.meta.env.DEV) {
51
180
  }
52
181
 
53
182
  // Or enable specific categories only
54
- import { disableLogging, enableCategory } from '@keenmate/svelte-spa-router/logger'
183
+ import { disableLogging, setCategoryLevel } from '@keenmate/svelte-spa-router/logger'
55
184
 
56
185
  disableLogging() // Disable all first
57
- enableCategory('ROUTER:SCROLL', 'debug') // Enable only scroll logs
58
- enableCategory('ROUTER:NAVIGATION', 'info') // Enable navigation at info level
186
+ setCategoryLevel('ROUTER:SCROLL', 'debug') // Enable only scroll logs
187
+ setCategoryLevel('ROUTER:NAVIGATION', 'info') // Enable navigation at info level
59
188
  ```
60
189
 
61
190
  ### What Gets Logged
@@ -88,15 +217,15 @@ The router provides **12 hierarchical logging categories** for granular control:
88
217
  ### Advanced Logging Control
89
218
 
90
219
  ```javascript
91
- import { setLogLevel, enableCategory } from '@keenmate/svelte-spa-router/logger'
220
+ import { setLogLevel, setCategoryLevel } from '@keenmate/svelte-spa-router/logger'
92
221
 
93
222
  // Set global log level (affects all categories)
94
223
  setLogLevel('warn') // Only show warnings and errors
95
224
 
96
225
  // Enable specific categories at different levels
97
226
  disableLogging() // Start with all disabled
98
- enableCategory('ROUTER:SCROLL', 'debug') // Debug scroll issues
99
- enableCategory('ROUTER:PERMISSIONS', 'info') // Monitor permission checks
227
+ setCategoryLevel('ROUTER:SCROLL', 'debug') // Debug scroll issues
228
+ setCategoryLevel('ROUTER:PERMISSIONS', 'info') // Monitor permission checks
100
229
  ```
101
230
 
102
231
  **Log Levels:** `trace`, `debug`, `info`, `warn`, `error`, `silent`
@@ -233,7 +362,7 @@ Uses the History API with clean URLs like `http://example.com/path`.
233
362
  ```javascript
234
363
  // main.js
235
364
  import { mount } from 'svelte'
236
- import { setHashRoutingEnabled, setBasePath } from '@keenmate/svelte-spa-router/utils'
365
+ import { setHashRoutingEnabled, setBasePath } from '@keenmate/svelte-spa-router'
237
366
  import App from './App.svelte'
238
367
 
239
368
  // Enable history mode
@@ -384,9 +513,12 @@ push({
384
513
  navigationContext: { source: 'toolbar', userId: 789 }
385
514
  })
386
515
 
387
- // Go back
516
+ // Go back (browser back button)
388
517
  pop()
389
518
 
519
+ // Go back to referrer (with scroll restoration) - requires referrer tracking
520
+ goBack()
521
+
390
522
  // Replace current page (supports all formats above)
391
523
  replace('/book/3')
392
524
  replace(['bookDetail', { bookId: 456 }])
@@ -432,50 +564,115 @@ Navigation context:
432
564
 
433
565
  ### Referrer Tracking
434
566
 
435
- Automatically track and access information about the previous route:
567
+ Automatically track and navigate back to the previous route with full context preservation.
568
+
569
+ #### Enabling Referrer Tracking
570
+
571
+ Configure in your main.js before mounting the app:
436
572
 
437
573
  ```javascript
438
- // main.js - Enable referrer tracking
439
- import { setIncludeReferrer } from '@keenmate/svelte-spa-router/utils'
574
+ // main.js
575
+ import { setIncludeReferrer } from '@keenmate/svelte-spa-router'
440
576
 
441
577
  setIncludeReferrer('always') // Track referrer for all routes
442
- // Options: 'never' (default), 'notfound' (404 only), 'always'
443
578
  ```
444
579
 
580
+ **Configuration Options:**
581
+ - `'never'` (default) - Disable referrer tracking
582
+ - `'notfound'` - Track referrer only for 404/catch-all routes
583
+ - `'always'` - Track referrer for all navigation
584
+
585
+ #### Using goBack() for "Go Back" Buttons
586
+
587
+ The `goBack()` helper provides the best way to navigate back with automatic scroll restoration:
588
+
589
+ ```svelte
590
+ <script>
591
+ import { goBack, navigationContext } from '@keenmate/svelte-spa-router'
592
+
593
+ const navContext = $derived(navigationContext())
594
+ const referrer = $derived(navContext?.referrer)
595
+ </script>
596
+
597
+ {#if referrer}
598
+ <button onclick={goBack}>← Back to {referrer.location}</button>
599
+ {/if}
600
+ ```
601
+
602
+ **How it works:**
603
+ - Navigates using browser's native back button (`window.history.back()`)
604
+ - Automatically restores scroll position from when you first visited that page
605
+ - Preserves the original referrer (not chronological previous route)
606
+ - Falls back to `pop()` if no referrer exists
607
+
608
+ > **⚠️ Important:** Use `goBack()` instead of manual `push(referrer.location)` to get automatic scroll restoration and proper back navigation behavior.
609
+
610
+ #### What Gets Tracked
611
+
612
+ The referrer object includes complete route context:
613
+
614
+ ```javascript
615
+ {
616
+ location: '/documents/123', // Previous route path
617
+ querystring: 'tab=settings', // Query string
618
+ params: { id: '123' }, // Route parameters
619
+ routeName: 'documentDetail', // Named route (if using named routes)
620
+ scrollX: 0, // Scroll position when leaving
621
+ scrollY: 245 // Scroll position when leaving
622
+ }
623
+ ```
624
+
625
+ #### How It Works
626
+
627
+ Referrers are automatically preserved in browser history:
628
+
629
+ 1. When you navigate forward, the router calculates the referrer and saves it to `history.state`
630
+ 2. When you press browser back/forward buttons, the referrer is restored from history
631
+ 3. Referrer tracking respects your routing mode (hash or history API)
632
+ 4. Scroll position is automatically saved and restored by `goBack()`
633
+
634
+ The referrer is cleared when users manually type a URL or refresh the page.
635
+
636
+ #### Advanced: Manual Navigation
637
+
638
+ For cases requiring custom logic before navigation:
639
+
445
640
  ```svelte
446
- <!-- In any route component -->
447
641
  <script>
448
- import { push, navigationContext } from '@keenmate/svelte-spa-router/utils'
642
+ import { push, navigationContext } from '@keenmate/svelte-spa-router'
449
643
 
450
644
  const navContext = $derived(navigationContext())
451
645
  const referrer = $derived(navContext?.referrer)
452
646
 
453
- function goBack() {
454
- if (referrer?.location) {
647
+ function customGoBack() {
648
+ if (!referrer?.location) {
649
+ // No referrer - fallback to home
650
+ push('/')
651
+ return
652
+ }
653
+
654
+ // Custom logic before navigation
655
+ if (await confirmUnsavedChanges()) {
455
656
  const url = referrer.querystring
456
657
  ? `${referrer.location}?${referrer.querystring}`
457
658
  : referrer.location
458
659
  push(url)
660
+ // Note: Manual push does NOT restore scroll position
459
661
  }
460
662
  }
461
663
  </script>
462
-
463
- {#if referrer}
464
- <button onclick={goBack}>← Go Back to {referrer.location}</button>
465
- {/if}
466
664
  ```
467
665
 
468
- Referrer object contains:
469
- - `location` - Previous route path (e.g., '/documents/123')
470
- - `querystring` - Previous query string
471
- - `params` - Previous route parameters
472
- - `routeName` - Previous route name (if using named routes)
666
+ > **Migration Note:** If you're currently using manual `push(referrer.location)` pattern, switch to `goBack()` for automatic scroll restoration and proper history navigation.
667
+
668
+ #### Benefits over history.back()
473
669
 
474
- **Benefits over `history.back()`:**
475
- - Works correctly with `replace()` navigation
476
- - Allows conditional logic before navigating back
477
- - Access to full previous route context
478
- - Custom fallback destinations
670
+ - **Automatic scroll restoration** - Returns to exact scroll position when you left
671
+ - **Preserved in browser history** - Works with browser back/forward buttons
672
+ - **Works with replace() navigation** - Referrer persists even when using `replace()`
673
+ - **Conditional logic** - Check referrer before navigating back
674
+ - **Full route context** - Access to params, querystring, route name
675
+ - **Custom fallback** - Redirect to home or other route when no referrer exists
479
676
 
480
677
  ### Strict Parameter Replacement
481
678
 
@@ -483,7 +680,7 @@ Configure how missing route parameters are handled:
483
680
 
484
681
  ```javascript
485
682
  // main.js
486
- import { setParamReplacementPlaceholder } from '@keenmate/svelte-spa-router/utils'
683
+ import { setParamReplacementPlaceholder } from '@keenmate/svelte-spa-router'
487
684
 
488
685
  // Set placeholder for missing parameters (default: 'N-A')
489
686
  setParamReplacementPlaceholder('N-A')
@@ -1522,7 +1719,7 @@ Define routes in a hierarchical tree structure as an alternative to flat definit
1522
1719
  **Enable hierarchical mode first:**
1523
1720
  ```javascript
1524
1721
  // main.js - before mounting app
1525
- import { setHierarchicalRoutesEnabled } from '@keenmate/svelte-spa-router/utils'
1722
+ import { setHierarchicalRoutesEnabled } from '@keenmate/svelte-spa-router'
1526
1723
 
1527
1724
  setHierarchicalRoutesEnabled(true)
1528
1725
  ```
@@ -1600,7 +1797,7 @@ const routes = {
1600
1797
  import Router from '@keenmate/svelte-spa-router'
1601
1798
 
1602
1799
  // Navigation utilities
1603
- import { routeParams, navigationContext } from '@keenmate/svelte-spa-router'
1800
+ import { push, replace, pop, goBack, location, querystring, routeParams, navigationContext } from '@keenmate/svelte-spa-router'
1604
1801
 
1605
1802
  // Named routes (for use with push/replace/link)
1606
1803
  import { registerRoutes, buildUrl } from '@keenmate/svelte-spa-router/routes'
@@ -1618,7 +1815,7 @@ import { createHierarchy } from '@keenmate/svelte-spa-router/helpers/hierarchy'
1618
1815
  import active from '@keenmate/svelte-spa-router/active'
1619
1816
 
1620
1817
  // Configuration
1621
- import { setHashRoutingEnabled, setBasePath, setParamReplacementPlaceholder, setHierarchicalRoutesEnabled } from '@keenmate/svelte-spa-router/utils'
1818
+ import { setHashRoutingEnabled, setBasePath, setParamReplacementPlaceholder, setHierarchicalRoutesEnabled } from '@keenmate/svelte-spa-router'
1622
1819
 
1623
1820
  // Querystring helpers (shared reactive state)
1624
1821
  import { configureQuerystring, query } from '@keenmate/svelte-spa-router/helpers/querystring'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keenmate/svelte-spa-router",
3
- "version": "5.0.0-rc12",
3
+ "version": "5.1.0",
4
4
  "description": "Router for SPAs using Svelte 5 with runes, dual-mode routing, permissions, and error handling",
5
5
  "main": "./src/lib/index.js",
6
6
  "svelte": "./src/lib/Router.svelte",
@@ -21,7 +21,6 @@
21
21
  "exports": {
22
22
  ".": {
23
23
  "types": "./src/lib/index.d.ts",
24
- "svelte": "./src/lib/Router.svelte",
25
24
  "import": "./src/lib/index.js"
26
25
  },
27
26
  "./active": {