@mbao01/next 0.0.41 → 0.0.43

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.0.41",
3
+ "version": "0.0.43",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "author": "Ayomide Bakare",
@@ -29,69 +29,81 @@
29
29
  "*.css"
30
30
  ],
31
31
  "scripts": {
32
- "dev": "storybook dev -p 6006",
32
+ "clean": "pnpx rimraf node_modules",
33
+ "dev": "storybook dev -p 6007",
33
34
  "build": "next build",
34
35
  "postbuild": "tsc --project tsconfig.declaration.json",
35
36
  "build-storybook": "storybook build -o ../../docs/storybook/next",
36
37
  "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
38
+ "prettier": "prettier --check \"**/*.{ts,tsx}\"",
39
+ "prettier:write": "prettier --write \"**/*.{ts,tsx}\"",
37
40
  "preview": "next dev",
41
+ "prod": "pnpx http-server ../../docs/storybook/next --port 6007",
38
42
  "start": "next start",
39
43
  "test": "vitest run",
44
+ "test:coverage": "vitest run --coverage",
40
45
  "test:ui": "vitest --ui",
41
- "test:watch": "vitest",
42
- "test:coverage": "vitest run --coverage"
46
+ "test:visual": "test-storybook --url http://127.0.0.1:6007",
47
+ "test:visual:ci": "test-storybook --ci --verbose --url http://127.0.0.1:6007",
48
+ "test:visual:watch": "test-storybook --watch",
49
+ "test:watch": "vitest"
43
50
  },
44
51
  "dependencies": {
45
- "@mbao01/common": "^0.0.40",
52
+ "@mbao01/common": "^0.0.42",
46
53
  "@radix-ui/react-icons": "^1.3.0",
47
- "clsx": "^2.1.0"
54
+ "clsx": "^2.1.1"
48
55
  },
49
56
  "devDependencies": {
50
- "@storybook/addon-essentials": "^8.0.6",
51
- "@storybook/addon-interactions": "^8.0.6",
52
- "@storybook/addon-links": "^8.0.6",
53
- "@storybook/addon-onboarding": "^8.0.6",
54
- "@storybook/addon-themes": "^8.0.6",
55
- "@storybook/blocks": "^8.0.6",
56
- "@storybook/nextjs": "^8.0.6",
57
- "@storybook/react": "^8.0.6",
58
- "@storybook/test": "^8.0.6",
59
- "@testing-library/jest-dom": "^6.4.2",
60
- "@testing-library/react": "^14.2.1",
57
+ "@ianvs/prettier-plugin-sort-imports": "^4.3.1",
58
+ "@storybook/addon-a11y": "^8.3.4",
59
+ "@storybook/addon-essentials": "^8.3.4",
60
+ "@storybook/addon-interactions": "^8.3.4",
61
+ "@storybook/addon-links": "^8.3.4",
62
+ "@storybook/addon-onboarding": "^8.3.4",
63
+ "@storybook/addon-themes": "^8.3.4",
64
+ "@storybook/addon-viewport": "^8.3.4",
65
+ "@storybook/blocks": "^8.3.4",
66
+ "@storybook/nextjs": "^8.3.4",
67
+ "@storybook/react": "^8.3.4",
68
+ "@storybook/test": "^8.3.4",
69
+ "@storybook/test-runner": "^0.19.1",
70
+ "@testing-library/jest-dom": "^6.5.0",
71
+ "@testing-library/react": "^16.0.1",
61
72
  "@testing-library/user-event": "^14.5.2",
62
- "@types/node": "^20.11.17",
63
- "@types/react": "^18.2.55",
64
- "@types/react-dom": "^18.2.19",
65
- "@typescript-eslint/eslint-plugin": "^6.21.0",
66
- "@typescript-eslint/parser": "^6.21.0",
67
- "@vitejs/plugin-react": "^4.2.1",
68
- "@vitest/coverage-v8": "^1.2.2",
69
- "@vitest/ui": "^1.2.2",
70
- "autoprefixer": "^10.4.17",
71
- "eslint": "^8.56.0",
72
- "eslint-config-next": "14.1.0",
73
- "eslint-plugin-jsx-a11y": "^6.8.0",
74
- "eslint-plugin-react": "^7.33.2",
75
- "eslint-plugin-react-hooks": "^4.6.0",
76
- "eslint-plugin-react-refresh": "^0.4.5",
77
- "eslint-plugin-storybook": "^0.8.0",
78
- "jsdom": "^23.2.0",
79
- "next": "^14.1.0",
80
- "next-router-mock": "^0.9.12",
73
+ "@types/jest-image-snapshot": "^6.4.0",
74
+ "@types/node": "^22.7.4",
75
+ "@types/react": "^18.3.10",
76
+ "@types/react-dom": "^18.3.0",
77
+ "@typescript-eslint/eslint-plugin": "^8.7.0",
78
+ "@typescript-eslint/parser": "^8.7.0",
79
+ "@vitejs/plugin-react": "^4.3.1",
80
+ "@vitest/coverage-v8": "^2.1.1",
81
+ "@vitest/ui": "^2.1.1",
82
+ "autoprefixer": "^10.4.20",
83
+ "eslint": "^8.57.1",
84
+ "eslint-config-next": "14.2.13",
85
+ "eslint-plugin-jsx-a11y": "^6.10.0",
86
+ "eslint-plugin-react": "^7.37.0",
87
+ "eslint-plugin-react-hooks": "^4.6.2",
88
+ "eslint-plugin-react-refresh": "^0.4.12",
89
+ "eslint-plugin-storybook": "^0.9.0",
90
+ "jest-image-snapshot": "^6.4.0",
91
+ "jsdom": "^25.0.1",
92
+ "next": "^14.2.13",
93
+ "next-router-mock": "^0.9.13",
81
94
  "path": "^0.12.7",
82
- "postcss": "^8.4.35",
83
- "react": "^18.2.0",
84
- "react-dom": "^18.2.0",
85
- "react-router-dom": "^6.22.0",
86
- "storybook": "^8.0.6",
87
- "tailwindcss": "^3.4.1",
88
- "typescript": "^5.3.3",
89
- "vite": "^5.1.1",
90
- "vite-plugin-dts": "^3.7.2",
91
- "vitest": "^1.2.2"
95
+ "postcss": "^8.4.47",
96
+ "prettier": "^3.3.3",
97
+ "react": "^18.3.1",
98
+ "react-dom": "^18.3.1",
99
+ "react-router-dom": "^6.26.2",
100
+ "storybook": "^8.3.4",
101
+ "tailwindcss": "^3.4.13",
102
+ "typescript": "^5.6.2",
103
+ "vitest": "^2.1.1"
92
104
  },
93
105
  "peerDependencies": {
94
106
  "next": "^14.1.0"
95
107
  },
96
- "gitHead": "30ae293d3e5c2ece6709f280ecf5f75ec5712ab2"
108
+ "gitHead": "eeaf76c4b41380b44e7eaed95b0391727e78010f"
97
109
  }
@@ -2,8 +2,8 @@ import NextLink from "next/link";
2
2
  import { ExternalLinkIcon } from "@radix-ui/react-icons";
3
3
  import { Anchor } from "@mbao01/common";
4
4
  import { cn } from "@mbao01/common/utilities";
5
- import { type LinkProps } from "./types";
6
5
  import { getLinkClasses } from "./constant";
6
+ import { type LinkProps } from "./types";
7
7
 
8
8
  export const Link = <T,>({
9
9
  href,
@@ -43,9 +43,7 @@ export const Link = <T,>({
43
43
  {...(isExternal && { rel: "noopener noreferrer" })}
44
44
  >
45
45
  {children}
46
- {isExternal ? (
47
- <ExternalLinkIcon name="external" className="ml-[2px] inline" />
48
- ) : null}
46
+ {isExternal ? <ExternalLinkIcon name="external" className="ml-[2px] inline" /> : null}
49
47
  </NextLink>
50
48
  );
51
49
  };
@@ -1 +1 @@
1
- export { Link } from './Link';
1
+ export { Link } from "./Link";
@@ -1,5 +1,5 @@
1
- import { type UrlObject } from "url";
2
1
  import { type LinkRestProps } from "next/link";
2
+ import { type UrlObject } from "url";
3
3
  import { type VariantProps } from "@mbao01/common/libs";
4
4
  import { getLinkClasses } from "./constant";
5
5
 
@@ -1,6 +1,6 @@
1
- import { vi } from "vitest";
2
1
  import mockRouter from "next-router-mock";
3
2
  import { createDynamicRouteParser } from "next-router-mock/dynamic-routes";
3
+ import { vi } from "vitest";
4
4
 
5
5
  vi.mock("next/router", () => vi.importActual("next-router-mock"));
6
6
 
@@ -12,9 +12,8 @@ mockRouter.useParser(
12
12
 
13
13
  vi.mock("next/navigation", async (importOriginal) => {
14
14
  const actual = await importOriginal<typeof import("next/navigation")>();
15
- const { useRouter } = await vi.importActual<
16
- typeof import("next-router-mock")
17
- >("next-router-mock");
15
+ const { useRouter } =
16
+ await vi.importActual<typeof import("next-router-mock")>("next-router-mock");
18
17
 
19
18
  const usePathname = vi.fn().mockImplementation(() => {
20
19
  const router = useRouter();