@mbao01/next 0.5.0 → 0.5.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mbao01/next",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "author": "Ayomide Bakare",
@@ -14,7 +14,7 @@
14
14
  "nextjs"
15
15
  ],
16
16
  "main": "./src/index.ts",
17
- "types": "dist/types/index.d.ts",
17
+ "types": "dist/types/src/index.d.ts",
18
18
  "files": [
19
19
  "src",
20
20
  "dist/types"
@@ -50,7 +50,7 @@
50
50
  "test:watch": "vitest"
51
51
  },
52
52
  "dependencies": {
53
- "@mbao01/common": "^0.5.0",
53
+ "@mbao01/common": "^0.5.2",
54
54
  "clsx": "^2.1.1",
55
55
  "lucide-react": "^0.546.0"
56
56
  },
@@ -107,5 +107,5 @@
107
107
  "peerDependencies": {
108
108
  "next": "15"
109
109
  },
110
- "gitHead": "e7b6e3197fbcdb26d8e7829b4462ceda944409ec"
110
+ "gitHead": "30eba9ab76ef0ae78f5acbfb4b309204ca39971d"
111
111
  }
@@ -1,25 +1,17 @@
1
- import { type LinkProps as LinkRestProps } from "next/link";
1
+ import type { LinkProps as OriginalLinkProps } from "next/dist/client/link.js";
2
+ import { AnchorHTMLAttributes, DetailedHTMLProps } from "react";
2
3
  import { type UrlObject } from "url";
3
4
  import { type VariantProps } from "@mbao01/common/libs";
4
5
  import { getLinkClasses } from "./constant";
5
6
 
6
- // export type LinkProps<
7
- // T,
8
- // I = boolean,
9
- // H = I extends true
10
- // ? /**
11
- // * The path or URL to navigate to. This is the only required prop. It can also be an object.
12
- // * @see https://nextjs.org/docs/api-reference/next/link
13
- // */
14
- // __next_route_internal_types__.RouteImpl<T> | UrlObject
15
- // : string,
16
- // > = LinkRestProps & {
17
- // href: H;
18
- // isInternal?: I;
19
- // isExternal?: boolean;
20
- // } & VariantProps<typeof getLinkClasses>;
21
-
22
- export type LinkProps<T> = LinkRestProps<T> & { isExternal?: boolean; hardNavigate?: boolean } & (
7
+ export type LinkProps<T> = Omit<
8
+ Omit<
9
+ DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>,
10
+ keyof OriginalLinkProps
11
+ > &
12
+ OriginalLinkProps,
13
+ "href"
14
+ > & { isExternal?: boolean; hardNavigate?: boolean } & (
23
15
  | {
24
16
  href: __next_route_internal_types__.RouteImpl<T> | UrlObject;
25
17
  isInternal?: true;