non-spooky-react-cookie 0.1.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/CHANGELOG.md +1 -0
- package/LICENSE +21 -0
- package/README.md +577 -0
- package/dist/index.cjs +856 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +137 -0
- package/dist/index.d.ts +137 -0
- package/dist/index.js +837 -0
- package/dist/index.js.map +1 -0
- package/dist/resolve-texts-yAIbWOUX.d.cts +456 -0
- package/dist/resolve-texts-yAIbWOUX.d.ts +456 -0
- package/dist/server.cjs +26 -0
- package/dist/server.cjs.map +1 -0
- package/dist/server.d.cts +28 -0
- package/dist/server.d.ts +28 -0
- package/dist/server.js +23 -0
- package/dist/server.js.map +1 -0
- package/dist/storage-Cqed-yMR.cjs +373 -0
- package/dist/storage-Cqed-yMR.cjs.map +1 -0
- package/dist/storage-WH-kuxkg.js +296 -0
- package/dist/storage-WH-kuxkg.js.map +1 -0
- package/dist/styles.css +624 -0
- package/package.json +119 -0
- package/server/README.md +25 -0
- package/server/package.json +5 -0
package/package.json
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "non-spooky-react-cookie",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A friendly, lightweight cookie consent manager for React and Next.js. Optional scripts stay out of the DOM until the visitor says yes.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react",
|
|
7
|
+
"nextjs",
|
|
8
|
+
"cookie",
|
|
9
|
+
"cookie-consent",
|
|
10
|
+
"cookie-banner",
|
|
11
|
+
"gdpr",
|
|
12
|
+
"consent-mode",
|
|
13
|
+
"privacy",
|
|
14
|
+
"script-loader"
|
|
15
|
+
],
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"author": "Kamil Adamski",
|
|
18
|
+
"homepage": "https://github.com/codingguydynamite/non-spooky-react-cookie#readme",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/codingguydynamite/non-spooky-react-cookie.git"
|
|
22
|
+
},
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/codingguydynamite/non-spooky-react-cookie/issues"
|
|
25
|
+
},
|
|
26
|
+
"type": "module",
|
|
27
|
+
"sideEffects": [
|
|
28
|
+
"**/*.css"
|
|
29
|
+
],
|
|
30
|
+
"main": "./dist/index.cjs",
|
|
31
|
+
"module": "./dist/index.js",
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"typesVersions": {
|
|
34
|
+
"*": {
|
|
35
|
+
"server": [
|
|
36
|
+
"./dist/server.d.ts"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"exports": {
|
|
41
|
+
".": {
|
|
42
|
+
"import": {
|
|
43
|
+
"types": "./dist/index.d.ts",
|
|
44
|
+
"default": "./dist/index.js"
|
|
45
|
+
},
|
|
46
|
+
"require": {
|
|
47
|
+
"types": "./dist/index.d.cts",
|
|
48
|
+
"default": "./dist/index.cjs"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"./server": {
|
|
52
|
+
"import": {
|
|
53
|
+
"types": "./dist/server.d.ts",
|
|
54
|
+
"default": "./dist/server.js"
|
|
55
|
+
},
|
|
56
|
+
"require": {
|
|
57
|
+
"types": "./dist/server.d.cts",
|
|
58
|
+
"default": "./dist/server.cjs"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"./styles.css": "./dist/styles.css",
|
|
62
|
+
"./package.json": "./package.json"
|
|
63
|
+
},
|
|
64
|
+
"files": [
|
|
65
|
+
"dist",
|
|
66
|
+
"server",
|
|
67
|
+
"README.md",
|
|
68
|
+
"LICENSE",
|
|
69
|
+
"CHANGELOG.md"
|
|
70
|
+
],
|
|
71
|
+
"peerDependencies": {
|
|
72
|
+
"react": ">=18",
|
|
73
|
+
"react-dom": ">=18"
|
|
74
|
+
},
|
|
75
|
+
"peerDependenciesMeta": {
|
|
76
|
+
"react-dom": {
|
|
77
|
+
"optional": true
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"devDependencies": {
|
|
81
|
+
"@arethetypeswrong/cli": "^0.18.5",
|
|
82
|
+
"@biomejs/biome": "^2.5.14",
|
|
83
|
+
"@changesets/cli": "^3.0.3",
|
|
84
|
+
"@types/react": "^19.3.0",
|
|
85
|
+
"@types/react-dom": "^19.3.0",
|
|
86
|
+
"jsdom": "^30.1.0",
|
|
87
|
+
"publint": "^0.3.24",
|
|
88
|
+
"react": "^19.3.0",
|
|
89
|
+
"react-dom": "^19.3.0",
|
|
90
|
+
"tsdown": "^0.23.0",
|
|
91
|
+
"typescript": "^7.0.2",
|
|
92
|
+
"vitest": "^5.0.1"
|
|
93
|
+
},
|
|
94
|
+
"engines": {
|
|
95
|
+
"node": ">=18"
|
|
96
|
+
},
|
|
97
|
+
"publishConfig": {
|
|
98
|
+
"access": "public",
|
|
99
|
+
"provenance": true
|
|
100
|
+
},
|
|
101
|
+
"scripts": {
|
|
102
|
+
"build": "tsdown",
|
|
103
|
+
"check:package": "publint && attw --pack . --exclude-entrypoints ./styles.css",
|
|
104
|
+
"check:cjs": "node -e \"require('./dist/index.cjs');require('./dist/server.cjs')\"",
|
|
105
|
+
"dev": "tsdown --watch",
|
|
106
|
+
"typecheck": "tsc --noEmit -p tsconfig.json && pnpm --filter vite-playground typecheck",
|
|
107
|
+
"lint": "biome check .",
|
|
108
|
+
"lint:fix": "biome check --write .",
|
|
109
|
+
"format": "biome format --write .",
|
|
110
|
+
"test": "vitest run",
|
|
111
|
+
"test:watch": "vitest",
|
|
112
|
+
"check": "pnpm lint && pnpm typecheck && pnpm test && pnpm build && pnpm check:package && pnpm check:cjs",
|
|
113
|
+
"example": "pnpm --filter vite-playground dev",
|
|
114
|
+
"example:build": "pnpm --filter vite-playground build",
|
|
115
|
+
"changeset": "changeset",
|
|
116
|
+
"version": "changeset version",
|
|
117
|
+
"release": "pnpm build && changeset publish"
|
|
118
|
+
}
|
|
119
|
+
}
|
package/server/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# server/
|
|
2
|
+
|
|
3
|
+
This directory is not an application — it's a subpath-export resolution shim.
|
|
4
|
+
|
|
5
|
+
`non-spooky-react-cookie` ships a separate server-only entry point (for reading
|
|
6
|
+
cookie consent during SSR, e.g. in Next.js). Modern bundlers resolve
|
|
7
|
+
`non-spooky-react-cookie/server` via the `exports` field in the root
|
|
8
|
+
[`package.json`](../package.json). Tools that don't support `exports` instead
|
|
9
|
+
look for a real `server/package.json` on disk, so this folder exists to satisfy
|
|
10
|
+
that legacy resolution path.
|
|
11
|
+
|
|
12
|
+
`package.json` here just points at the built output:
|
|
13
|
+
|
|
14
|
+
```json
|
|
15
|
+
{
|
|
16
|
+
"main": "../dist/server.cjs",
|
|
17
|
+
"module": "../dist/server.js",
|
|
18
|
+
"types": "../dist/server.d.ts"
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
It's listed in the root package's `files` array so it ships in the published
|
|
23
|
+
npm tarball alongside `dist/`. This `package.json` is hand-written, not
|
|
24
|
+
emitted by `tsdown`, and should stay in sync with the `"./server"` entry in
|
|
25
|
+
the root `exports` map.
|