@chrryai/pepper 2.2.70 → 2.2.74

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.
Files changed (2) hide show
  1. package/README.md +14 -10
  2. package/package.json +20 -20
package/README.md CHANGED
@@ -22,48 +22,52 @@ npm install @chrryai/pepper
22
22
  ### Web (with View Transitions)
23
23
 
24
24
  ```tsx
25
- import { HistoryRouterProvider, useNavigation } from "@chrryai/pepper/web"
25
+ import { HistoryRouterProvider, useNavigation } from "@chrryai/pepper/web";
26
26
 
27
27
  function App() {
28
28
  return (
29
29
  <HistoryRouterProvider>
30
30
  <YourApp />
31
31
  </HistoryRouterProvider>
32
- )
32
+ );
33
33
  }
34
34
 
35
35
  function YourComponent() {
36
- const { navigate, pathname } = useNavigation()
36
+ const { navigate, pathname } = useNavigation();
37
37
 
38
- return <button type="button" onClick={() => navigate("/about")}>Go to About</button>
38
+ return (
39
+ <button type="button" onClick={() => navigate("/about")}>
40
+ Go to About
41
+ </button>
42
+ );
39
43
  }
40
44
  ```
41
45
 
42
46
  ### React Native
43
47
 
44
48
  ```tsx
45
- import { HistoryRouterProvider, useNavigation } from "@chrryai/pepper/native"
49
+ import { HistoryRouterProvider, useNavigation } from "@chrryai/pepper/native";
46
50
 
47
51
  function App() {
48
52
  return (
49
53
  <HistoryRouterProvider>
50
54
  <YourApp />
51
55
  </HistoryRouterProvider>
52
- )
56
+ );
53
57
  }
54
58
  ```
55
59
 
56
60
  ### Browser Extension
57
61
 
58
62
  ```tsx
59
- import { HistoryRouterProvider, useNavigation } from "@chrryai/pepper/extension"
63
+ import { HistoryRouterProvider, useNavigation } from "@chrryai/pepper/extension";
60
64
 
61
65
  function App() {
62
66
  return (
63
67
  <HistoryRouterProvider>
64
68
  <YourApp />
65
69
  </HistoryRouterProvider>
66
- )
70
+ );
67
71
  }
68
72
  ```
69
73
 
@@ -91,7 +95,7 @@ const {
91
95
  pathname, // Current pathname
92
96
  searchParams, // URL search params
93
97
  hash, // URL hash
94
- } = useNavigation()
98
+ } = useNavigation();
95
99
  ```
96
100
 
97
101
  #### Methods
@@ -109,7 +113,7 @@ Pepper automatically uses the [View Transitions API](https://developer.mozilla.o
109
113
 
110
114
  ```tsx
111
115
  // Transitions happen automatically!
112
- navigate("/about") // ✨ Smooth transition
116
+ navigate("/about"); // ✨ Smooth transition
113
117
  ```
114
118
 
115
119
  ## 🎯 Why Pepper?
package/package.json CHANGED
@@ -1,29 +1,37 @@
1
1
  {
2
2
  "name": "@chrryai/pepper",
3
- "version": "2.2.70",
3
+ "version": "2.2.74",
4
4
  "description": "Universal router for React - works in web, React Native, and browser extensions with built-in view transitions",
5
5
  "keywords": [
6
- "router",
7
- "react",
8
- "react-native",
9
6
  "browser-extension",
10
- "view-transitions",
11
- "navigation",
12
7
  "history",
8
+ "navigation",
9
+ "react",
10
+ "react-native",
11
+ "router",
12
+ "typescript",
13
13
  "universal",
14
- "typescript"
14
+ "view-transitions"
15
15
  ],
16
16
  "homepage": "https://github.com/chrryai/pepper",
17
17
  "bugs": {
18
18
  "url": "https://github.com/chrryai/pepper/issues"
19
19
  },
20
+ "license": "AGPL-3.0",
21
+ "author": "Iliyan Velinov",
20
22
  "repository": {
21
23
  "type": "git",
22
24
  "url": "https://github.com/chrryai/pepper.git",
23
25
  "directory": "packages/pepper"
24
26
  },
25
- "license": "AGPL-3.0",
26
- "author": "Iliyan Velinov",
27
+ "files": [
28
+ "dist",
29
+ "README.md",
30
+ "LICENSE"
31
+ ],
32
+ "main": "./dist/index.js",
33
+ "module": "./dist/index.mjs",
34
+ "types": "./dist/index.d.ts",
27
35
  "exports": {
28
36
  ".": {
29
37
  "types": "./dist/index.d.ts",
@@ -46,14 +54,9 @@
46
54
  "require": "./dist/extension.js"
47
55
  }
48
56
  },
49
- "main": "./dist/index.js",
50
- "module": "./dist/index.mjs",
51
- "types": "./dist/index.d.ts",
52
- "files": [
53
- "dist",
54
- "README.md",
55
- "LICENSE"
56
- ],
57
+ "publishConfig": {
58
+ "access": "public"
59
+ },
57
60
  "dependencies": {
58
61
  "@types/react": "^19.1.12"
59
62
  },
@@ -66,9 +69,6 @@
66
69
  "peerDependencies": {
67
70
  "react": "^18.0.0 || ^19.0.0"
68
71
  },
69
- "publishConfig": {
70
- "access": "public"
71
- },
72
72
  "scripts": {
73
73
  "build": "pnpm exec tsup",
74
74
  "check-types": "tsc --noEmit",