@convex-internal/web-analytics 1.0.0 → 1.0.2
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 +8 -17
- package/dist/ConsentBanner.js +1 -1
- package/dist/banner.css +7 -12
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -68,10 +68,11 @@ Theme with `--wa-banner-*` variables on `.wa-banner`:
|
|
|
68
68
|
- Buttons: `--wa-banner-button-border-radius`, `--wa-banner-button-padding`,
|
|
69
69
|
`--wa-banner-button-min-height`, `--wa-banner-button-font-size`,
|
|
70
70
|
`--wa-banner-button-font-weight`, `--wa-banner-button-line-height`
|
|
71
|
-
- Accept button: `--wa-banner-accept-background-color`, `--wa-banner-accept-text-color
|
|
72
|
-
`--wa-banner-accept-hover-background-color`
|
|
71
|
+
- Accept button: `--wa-banner-accept-background-color`, `--wa-banner-accept-text-color`
|
|
73
72
|
- Decline button: `--wa-banner-decline-background-color`,
|
|
74
|
-
`--wa-banner-decline-text-color
|
|
73
|
+
`--wa-banner-decline-text-color`
|
|
74
|
+
|
|
75
|
+
Buttons default to 80% opacity and go to 100% on hover or keyboard focus.
|
|
75
76
|
|
|
76
77
|
### `Consented`
|
|
77
78
|
|
|
@@ -170,28 +171,18 @@ npm version patch # bug fixes
|
|
|
170
171
|
npm test
|
|
171
172
|
npm run build
|
|
172
173
|
npm pack --dry-run
|
|
173
|
-
npm publish
|
|
174
|
+
npm publish
|
|
174
175
|
```
|
|
175
176
|
|
|
176
|
-
If npm 2FA is enabled, add `--otp=<code>`.
|
|
177
|
-
|
|
178
177
|
## Consume a published version
|
|
179
178
|
|
|
180
|
-
Convex repos set `min-release-age=7` in `.npmrc`, so a version
|
|
181
|
-
the last 7 days will fail to install
|
|
182
|
-
|
|
183
|
-
succeed:
|
|
179
|
+
Convex repos typically set `min-release-age=7` in `.npmrc`, so a version
|
|
180
|
+
published in the last 7 days will fail to install. Override the window for that
|
|
181
|
+
one install:
|
|
184
182
|
|
|
185
183
|
```bash
|
|
186
184
|
npm install @convex-internal/web-analytics@<version> --min-release-age=0
|
|
187
185
|
```
|
|
188
186
|
|
|
189
|
-
```
|
|
190
|
-
# consuming-app/.npmrc
|
|
191
|
-
min-release-age-exclude[]=@convex-internal/web-analytics
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
You can drop the exclude once this version has been on npm for 7 days.
|
|
195
|
-
|
|
196
187
|
Use the local tarball workflow whenever you need to test changes that have
|
|
197
188
|
not been published yet.
|
package/dist/ConsentBanner.js
CHANGED
|
@@ -27,5 +27,5 @@ export function ConsentBanner() {
|
|
|
27
27
|
setConsent(decision === "accepted" ? "consented" : "declined");
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
-
return (_jsxs("aside", { "aria-label": "Privacy choices", className: "wa-banner", children: [_jsx("p", { className: "wa-banner-text", children: "We use cookies
|
|
30
|
+
return (_jsxs("aside", { "aria-label": "Privacy choices", className: "wa-banner", children: [_jsx("p", { className: "wa-banner-text", children: "We use third-party cookies to understand how people interact with our site." }), _jsxs("p", { className: "wa-banner-text wa-banner-policy", children: ["See our", " ", _jsx("a", { className: "wa-banner-link", href: "https://www.convex.dev/legal/privacy", rel: "noopener noreferrer", target: "_blank", children: "Privacy Policy" }), " ", "to learn more."] }), _jsxs("div", { className: "wa-banner-actions", children: [_jsx("button", { className: "wa-banner-button wa-banner-decline", onClick: () => decide("declined"), type: "button", children: "Decline" }), _jsx("button", { className: "wa-banner-button wa-banner-accept", onClick: () => decide("accepted"), type: "button", children: "Accept" })] })] }));
|
|
31
31
|
}
|
package/dist/banner.css
CHANGED
|
@@ -46,7 +46,13 @@
|
|
|
46
46
|
font-weight: var(--wa-banner-button-font-weight, inherit);
|
|
47
47
|
line-height: var(--wa-banner-button-line-height, inherit);
|
|
48
48
|
cursor: pointer;
|
|
49
|
-
|
|
49
|
+
opacity: 0.8;
|
|
50
|
+
transition: opacity 0.15s;
|
|
51
|
+
|
|
52
|
+
&:hover,
|
|
53
|
+
&:focus-visible {
|
|
54
|
+
opacity: 1;
|
|
55
|
+
}
|
|
50
56
|
|
|
51
57
|
&:focus-visible {
|
|
52
58
|
outline: 2px solid var(--wa-banner-focus-color, black);
|
|
@@ -56,22 +62,11 @@
|
|
|
56
62
|
&.wa-banner-decline {
|
|
57
63
|
background-color: var(--wa-banner-decline-background-color, lightgray);
|
|
58
64
|
color: var(--wa-banner-decline-text-color, black);
|
|
59
|
-
|
|
60
|
-
&:hover {
|
|
61
|
-
background-color: var(
|
|
62
|
-
--wa-banner-decline-hover-background-color,
|
|
63
|
-
lightgray
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
65
|
}
|
|
67
66
|
|
|
68
67
|
&.wa-banner-accept {
|
|
69
68
|
background-color: var(--wa-banner-accept-background-color, black);
|
|
70
69
|
color: var(--wa-banner-accept-text-color, white);
|
|
71
|
-
|
|
72
|
-
&:hover {
|
|
73
|
-
background-color: var(--wa-banner-accept-hover-background-color, black);
|
|
74
|
-
}
|
|
75
70
|
}
|
|
76
71
|
}
|
|
77
72
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@convex-internal/web-analytics",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
"files": [
|
|
13
13
|
"dist"
|
|
14
14
|
],
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
15
18
|
"scripts": {
|
|
16
19
|
"build": "tsc && cp src/banner.css dist/banner.css",
|
|
17
20
|
"prepack": "npm run build",
|