skillet-shared 0.7.1 → 0.9.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 +3 -0
- package/dist/analytics.d.ts +1 -1
- package/dist/analytics.js +4 -3
- package/dist/tokens.css +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,6 +8,9 @@ Code that bender and videoskillet both ship, as raw TypeScript and CSS.
|
|
|
8
8
|
Both apps run it through Vite, so imports keep their `.ts` form and need no
|
|
9
9
|
build step.
|
|
10
10
|
|
|
11
|
+
[`DESIGN.md`](DESIGN.md) holds the rules both apps' controls follow, and
|
|
12
|
+
`src/tokens.css` the values.
|
|
13
|
+
|
|
11
14
|
## Develop
|
|
12
15
|
|
|
13
16
|
- `pnpm test`, `pnpm typecheck` and `pnpm lint` run the package's own suite
|
package/dist/analytics.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function startAnalytics(): void;
|
|
1
|
+
export declare function startAnalytics(site?: string): void;
|
package/dist/analytics.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// A hit counter on every page the site serves. GoatCounter counts page views
|
|
2
2
|
// and sets no cookies, so no page asks first; /privacy/ says what it collects.
|
|
3
|
-
|
|
3
|
+
// Each app passes the code of its own GoatCounter site.
|
|
4
|
+
const counter = (site) => `https://${site}.goatcounter.com/count`;
|
|
4
5
|
// A browser a script is driving counts nothing: the harnesses that screenshot
|
|
5
6
|
// and record these pages are nobody's visit.
|
|
6
|
-
export function startAnalytics() {
|
|
7
|
+
export function startAnalytics(site = 'cmdcolin') {
|
|
7
8
|
if (navigator.webdriver)
|
|
8
9
|
return;
|
|
9
10
|
if (document.querySelector('script[data-goatcounter]'))
|
|
@@ -11,6 +12,6 @@ export function startAnalytics() {
|
|
|
11
12
|
const tag = document.createElement('script');
|
|
12
13
|
tag.async = true;
|
|
13
14
|
tag.src = 'https://gc.zgo.at/count.js';
|
|
14
|
-
tag.dataset.goatcounter =
|
|
15
|
+
tag.dataset.goatcounter = counter(site);
|
|
15
16
|
document.head.append(tag);
|
|
16
17
|
}
|
package/dist/tokens.css
CHANGED
|
@@ -64,6 +64,11 @@
|
|
|
64
64
|
--ctl-radius: 3px;
|
|
65
65
|
--pill-radius: 999px;
|
|
66
66
|
|
|
67
|
+
/* The fill of the one chosen among several (a segment, a tab, an open
|
|
68
|
+
drawer's toggle), with --fg4 as its edge. A wash, so it lifts off a card
|
|
69
|
+
as well as off the page. */
|
|
70
|
+
--chosen-bg: color-mix(in srgb, var(--fg) 14%, transparent);
|
|
71
|
+
|
|
67
72
|
--shadow-modal: 0 10px 30px #000b;
|
|
68
73
|
--shadow-pop: 0 8px 28px #000a;
|
|
69
74
|
--scrim: #000a;
|