fds-vue-core 8.2.1 → 8.2.2

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.
@@ -0,0 +1,32 @@
1
+ type RouterLike = {
2
+ push: (to: unknown) => Promise<unknown> | unknown;
3
+ };
4
+ /**
5
+ * Returns true when href is a relative URL suitable for in-app navigation
6
+ * (e.g. `/dashboard`, `page`, `./page`) — not absolute, protocol-relative, or hash-only.
7
+ */
8
+ export declare const isRelativeHref: (href: string) => boolean;
9
+ /**
10
+ * Resolves an anchor href to a value suitable for `router.push`.
11
+ * Returns `null` when the link should use normal browser navigation.
12
+ */
13
+ export declare const resolveRouterLinkTarget: (anchor: HTMLAnchorElement) => string | null;
14
+ /**
15
+ * Interceptar klick på relativa `<a href>` och navigerar med `router.push`
16
+ * i stället för full sidladdning. Användbart för HTML/JSON från t.ex. Payload CMS
17
+ * eller Poeditor där `router-link` inte kan användas direkt.
18
+ *
19
+ * Anropa en gång vid app-start:
20
+ * ```ts
21
+ * setupRouterLinkInterceptor(router)
22
+ * ```
23
+ *
24
+ * HTML-exempel:
25
+ * ```html
26
+ * <a href="/dashboard">Öppna dashboard</a>
27
+ * ```
28
+ */
29
+ export declare const setupRouterLinkInterceptor: (router: RouterLike) => void;
30
+ /** Tar bort den globala router-link-interceptorn. */
31
+ export declare const teardownRouterLinkInterceptor: () => void;
32
+ export {};