@real-router/preact 0.12.0 → 0.14.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/README.md +2 -2
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/ssr.d.ts.map +1 -1
- package/dist/cjs/ssr.js.map +1 -1
- package/dist/cjs/useRoute-B3rj5MXo.js.map +1 -1
- package/dist/esm/index.d.mts +2 -2
- package/dist/esm/index.d.mts.map +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/ssr.d.mts.map +1 -1
- package/dist/esm/ssr.mjs.map +1 -1
- package/dist/esm/useRoute-BSPVVbLz.mjs.map +1 -1
- package/package.json +7 -7
- package/src/components/Link.tsx +2 -4
- package/src/types.ts +2 -2
package/src/components/Link.tsx
CHANGED
|
@@ -12,7 +12,7 @@ import { useIsActiveRoute } from "../hooks/useIsActiveRoute";
|
|
|
12
12
|
import { useRouter } from "../hooks/useRouter";
|
|
13
13
|
|
|
14
14
|
import type { LinkProps } from "../types";
|
|
15
|
-
import type { FunctionComponent,
|
|
15
|
+
import type { FunctionComponent, TargetedMouseEvent } from "preact";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Custom comparator for `Link`'s `memo()` wrapper.
|
|
@@ -95,9 +95,7 @@ export const Link: FunctionComponent<LinkProps> = memo(
|
|
|
95
95
|
hash === undefined ? undefined : { hash },
|
|
96
96
|
);
|
|
97
97
|
|
|
98
|
-
const handleClick = (
|
|
99
|
-
evt: JSX.TargetedMouseEvent<HTMLAnchorElement>,
|
|
100
|
-
): void => {
|
|
98
|
+
const handleClick = (evt: TargetedMouseEvent<HTMLAnchorElement>): void => {
|
|
101
99
|
if (onClick) {
|
|
102
100
|
onClick(evt);
|
|
103
101
|
|
package/src/types.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type {
|
|
|
4
4
|
Navigator,
|
|
5
5
|
State,
|
|
6
6
|
} from "@real-router/core";
|
|
7
|
-
import type {
|
|
7
|
+
import type { HTMLAttributes } from "preact";
|
|
8
8
|
|
|
9
9
|
export interface RouteState<P extends Params = Params> {
|
|
10
10
|
route: State<P> | undefined;
|
|
@@ -16,7 +16,7 @@ export type RouteContext<P extends Params = Params> = {
|
|
|
16
16
|
} & RouteState<P>;
|
|
17
17
|
|
|
18
18
|
export interface LinkProps<P extends Params = Params> extends Omit<
|
|
19
|
-
|
|
19
|
+
HTMLAttributes<HTMLAnchorElement>,
|
|
20
20
|
"className"
|
|
21
21
|
> {
|
|
22
22
|
routeName: string;
|