@veribenim/nextjs 1.0.0 → 3.0.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 +63 -0
- package/package.json +5 -4
package/README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# @veribenim/nextjs
|
|
2
|
+
|
|
3
|
+
> Veribenim KVKK & GDPR çerez onayı SDK — Next.js
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@veribenim/nextjs)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
|
|
8
|
+
## Kurulum
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @veribenim/nextjs
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## App Router (app/layout.tsx)
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
import { VeribenimProvider } from '@veribenim/nextjs';
|
|
18
|
+
|
|
19
|
+
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
20
|
+
return (
|
|
21
|
+
<html lang="tr">
|
|
22
|
+
<body>
|
|
23
|
+
<VeribenimProvider config={{
|
|
24
|
+
token: process.env.NEXT_PUBLIC_VERIBENIM_TOKEN!,
|
|
25
|
+
}}>
|
|
26
|
+
{children}
|
|
27
|
+
</VeribenimProvider>
|
|
28
|
+
</body>
|
|
29
|
+
</html>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Pages Router (_app.tsx)
|
|
35
|
+
|
|
36
|
+
```tsx
|
|
37
|
+
import { VeribenimProvider } from '@veribenim/nextjs';
|
|
38
|
+
import type { AppProps } from 'next/app';
|
|
39
|
+
|
|
40
|
+
export default function App({ Component, pageProps }: AppProps) {
|
|
41
|
+
return (
|
|
42
|
+
<VeribenimProvider config={{
|
|
43
|
+
token: process.env.NEXT_PUBLIC_VERIBENIM_TOKEN!,
|
|
44
|
+
}}>
|
|
45
|
+
<Component {...pageProps} />
|
|
46
|
+
</VeribenimProvider>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## .env.local
|
|
52
|
+
|
|
53
|
+
```env
|
|
54
|
+
NEXT_PUBLIC_VERIBENIM_TOKEN=buraya_token_yapistirin
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Token'ı [Veribenim Paneli](https://app.veribenim.com)'nden alın: Siteniz → Entegrasyon.
|
|
58
|
+
|
|
59
|
+
Tüm hook'lar (`useVeribenim`, `useConsentCategory` vb.) `@veribenim/react`'ten re-export edilir.
|
|
60
|
+
|
|
61
|
+
## Lisans
|
|
62
|
+
|
|
63
|
+
MIT © [Pariette](https://veribenim.com)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veribenim/nextjs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Veribenim KVKK/GDPR çerez onayı SDK - Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"kvkk",
|
|
@@ -23,11 +23,12 @@
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
|
-
"dist"
|
|
26
|
+
"dist",
|
|
27
|
+
"README.md"
|
|
27
28
|
],
|
|
28
29
|
"dependencies": {
|
|
29
|
-
"@veribenim/core": "
|
|
30
|
-
"@veribenim/react": "
|
|
30
|
+
"@veribenim/core": "3.0.0",
|
|
31
|
+
"@veribenim/react": "3.0.0"
|
|
31
32
|
},
|
|
32
33
|
"peerDependencies": {
|
|
33
34
|
"next": ">=13.0.0",
|