@zenithbuild/router 1.0.8 → 1.3.3
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenithbuild/router",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"description": "File-based SPA router for Zenith framework with deterministic, compile-time route resolution",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -63,4 +63,4 @@
|
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"typescript": "^5"
|
|
65
65
|
}
|
|
66
|
-
}
|
|
66
|
+
}
|
|
@@ -12,7 +12,7 @@ type Props = {
|
|
|
12
12
|
type?: string
|
|
13
13
|
ping?: string
|
|
14
14
|
referrerPolicy?: string
|
|
15
|
-
|
|
15
|
+
className?: string
|
|
16
16
|
id?: string
|
|
17
17
|
title?: string
|
|
18
18
|
ariaLabel?: string
|
|
@@ -24,6 +24,13 @@ type Props = {
|
|
|
24
24
|
onClick?: (event?: MouseEvent) => void | boolean
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
// Declare props as compile-time identifiers
|
|
28
|
+
const {
|
|
29
|
+
href, target, rel, download, hreflang, type, ping,
|
|
30
|
+
referrerPolicy, id, title, ariaLabel, role, tabIndex,
|
|
31
|
+
preload, exact, onClick, className
|
|
32
|
+
} = props<Props>()
|
|
33
|
+
|
|
27
34
|
/**
|
|
28
35
|
* Handle link click - prevents default and uses SPA navigation
|
|
29
36
|
* Respects target="_blank" and other standard anchor behaviors
|
|
@@ -217,7 +224,7 @@ function ensureAttributes(el) {
|
|
|
217
224
|
|
|
218
225
|
<a
|
|
219
226
|
href="{ href }"
|
|
220
|
-
class="zen-link {
|
|
227
|
+
class="zen-link { className }"
|
|
221
228
|
onclick="handleClick"
|
|
222
229
|
onmouseenter="handleMouseEnter"
|
|
223
230
|
style="cursor: pointer;"
|