@mbao01/next 0.2.10 → 0.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mbao01/next",
3
- "version": "0.2.10",
3
+ "version": "0.4.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "author": "Ayomide Bakare",
@@ -50,67 +50,62 @@
50
50
  "test:watch": "vitest"
51
51
  },
52
52
  "dependencies": {
53
- "@mbao01/common": "^0.2.10",
53
+ "@mbao01/common": "^0.4.0",
54
54
  "clsx": "^2.1.1",
55
- "lucide-react": "^0.507.0"
55
+ "lucide-react": "^0.522.0"
56
56
  },
57
57
  "devDependencies": {
58
- "@eslint/js": "^9.26.0",
59
- "@ianvs/prettier-plugin-sort-imports": "^4.4.1",
60
- "@storybook/addon-a11y": "^8.6.12",
61
- "@storybook/addon-coverage": "^1.0.5",
62
- "@storybook/addon-essentials": "^8.6.12",
63
- "@storybook/addon-interactions": "^8.6.12",
64
- "@storybook/addon-links": "^8.6.12",
65
- "@storybook/addon-onboarding": "^8.6.12",
66
- "@storybook/addon-storysource": "^8.6.12",
67
- "@storybook/addon-themes": "^8.6.12",
68
- "@storybook/addon-viewport": "^8.6.12",
69
- "@storybook/blocks": "^8.6.12",
70
- "@storybook/nextjs": "^8.6.12",
71
- "@storybook/react": "^8.6.12",
72
- "@storybook/test": "^8.6.12",
73
- "@storybook/test-runner": "^0.22.0",
74
- "@tailwindcss/postcss": "^4.1.5",
58
+ "@eslint/eslintrc": "^3.3.1",
59
+ "@eslint/js": "^9.29.0",
60
+ "@ianvs/prettier-plugin-sort-imports": "^4.4.2",
61
+ "@storybook/addon-a11y": "^9.0.12",
62
+ "@storybook/addon-coverage": "^2.0.0",
63
+ "@storybook/addon-docs": "^9.0.12",
64
+ "@storybook/addon-links": "^9.0.12",
65
+ "@storybook/addon-onboarding": "^9.0.12",
66
+ "@storybook/addon-themes": "^9.0.12",
67
+ "@storybook/nextjs": "^9.0.12",
68
+ "@storybook/test-runner": "^0.23.0",
69
+ "@tailwindcss/postcss": "^4.1.10",
75
70
  "@testing-library/jest-dom": "^6.6.3",
76
71
  "@testing-library/react": "^16.3.0",
77
72
  "@testing-library/user-event": "^14.6.1",
78
73
  "@types/jest-image-snapshot": "^6.4.0",
79
- "@types/node": "^22.15.3",
80
- "@types/react": "^19.1.2",
81
- "@types/react-dom": "^19.1.3",
82
- "@typescript-eslint/eslint-plugin": "^8.31.1",
83
- "@typescript-eslint/parser": "^8.31.1",
84
- "@vitejs/plugin-react": "^4.4.1",
85
- "@vitest/coverage-v8": "^3.1.2",
86
- "@vitest/ui": "^3.1.2",
74
+ "@types/node": "^24.0.3",
75
+ "@types/react": "^19.1.8",
76
+ "@types/react-dom": "^19.1.6",
77
+ "@typescript-eslint/eslint-plugin": "^8.34.1",
78
+ "@typescript-eslint/parser": "^8.34.1",
79
+ "@vitejs/plugin-react": "^4.5.2",
80
+ "@vitest/coverage-v8": "^3.2.4",
81
+ "@vitest/ui": "^3.2.4",
87
82
  "axe-playwright": "^2.1.0",
88
- "eslint": "^9.26.0",
89
- "eslint-config-next": "^15.3.1",
83
+ "eslint": "^9.29.0",
84
+ "eslint-config-next": "^15.3.4",
90
85
  "eslint-plugin-jsx-a11y": "^6.10.2",
91
86
  "eslint-plugin-react": "^7.37.5",
92
87
  "eslint-plugin-react-hooks": "^5.2.0",
93
88
  "eslint-plugin-react-refresh": "^0.4.20",
94
- "eslint-plugin-storybook": "^0.12.0",
95
- "globals": "^16.0.0",
96
- "jest-image-snapshot": "^6.4.0",
89
+ "eslint-plugin-storybook": "^9.0.12",
90
+ "globals": "^16.2.0",
91
+ "jest-image-snapshot": "^6.5.1",
97
92
  "jsdom": "^26.1.0",
98
- "next": "^15.3.1",
99
- "next-router-mock": "^0.9.13",
93
+ "next": "^15.3.4",
94
+ "next-router-mock": "^1.0.2",
100
95
  "path": "^0.12.7",
101
- "postcss": "^8.5.3",
96
+ "postcss": "^8.5.6",
102
97
  "prettier": "^3.5.3",
103
98
  "react": "^19.1.0",
104
99
  "react-dom": "^19.1.0",
105
- "react-router-dom": "^7.5.3",
106
- "storybook": "^8.6.12",
107
- "tailwindcss": "^4.1.5",
100
+ "react-router-dom": "^7.6.2",
101
+ "storybook": "^9.0.12",
102
+ "tailwindcss": "^4.1.10",
108
103
  "typescript": "^5.8.3",
109
- "typescript-eslint": "^8.31.1",
110
- "vitest": "^3.1.2"
104
+ "typescript-eslint": "^8.34.1",
105
+ "vitest": "^3.2.4"
111
106
  },
112
107
  "peerDependencies": {
113
108
  "next": "15"
114
109
  },
115
- "gitHead": "844ae95ba12dbd4ef7785a69472bc388504e1321"
110
+ "gitHead": "e0e59e2648fa08d3c0f2b6943fd91c6fdecb9bbc"
116
111
  }
@@ -15,6 +15,7 @@ export const Link = <T,>({
15
15
  underline = false,
16
16
  isExternal = false,
17
17
  isInternal = true,
18
+ hardNavigate = false,
18
19
  ...props
19
20
  }: LinkProps<T>) => {
20
21
  if (isInternal === false) {
@@ -41,6 +42,12 @@ export const Link = <T,>({
41
42
  className={cn(getLinkClasses({ hover, variant, underline }), className)}
42
43
  {...props}
43
44
  {...(isExternal && { rel: "noopener noreferrer" })}
45
+ {...(hardNavigate && {
46
+ prefetch: props.prefetch ?? true,
47
+ onNavigate: (e) => {
48
+ props.onNavigate?.(e);
49
+ },
50
+ })}
44
51
  >
45
52
  {children}
46
53
  {isExternal ? <ExternalLinkIcon name="external" className="ml-[2px] w-4 h-4 inline" /> : null}
@@ -19,7 +19,7 @@ import { getLinkClasses } from "./constant";
19
19
  // isExternal?: boolean;
20
20
  // } & VariantProps<typeof getLinkClasses>;
21
21
 
22
- export type LinkProps<T> = LinkRestProps & { isExternal?: boolean } & (
22
+ export type LinkProps<T> = LinkRestProps & { isExternal?: boolean; hardNavigate?: boolean } & (
23
23
  | {
24
24
  href: __next_route_internal_types__.RouteImpl<T> | UrlObject;
25
25
  isInternal?: true;