@dogsbay/ui 0.2.0-beta.96 → 0.2.0-beta.98
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dogsbay/ui",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.98",
|
|
4
4
|
"description": "Accessible UI components for Astro, inspired by Base UI and shadcn",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"astro": "^5.0.0 || ^6.0.0 || ^7.0.0",
|
|
17
|
-
"@dogsbay/elements": "0.2.0-beta.
|
|
18
|
-
"@dogsbay/
|
|
19
|
-
"@dogsbay/
|
|
17
|
+
"@dogsbay/elements": "0.2.0-beta.98",
|
|
18
|
+
"@dogsbay/icons": "0.2.0-beta.98",
|
|
19
|
+
"@dogsbay/primitives": "0.2.0-beta.98"
|
|
20
20
|
},
|
|
21
21
|
"optionalDependencies": {
|
|
22
22
|
"@shikijs/transformers": "^4.3.1",
|
|
@@ -12,7 +12,12 @@
|
|
|
12
12
|
min-width: 4ch;
|
|
13
13
|
margin-right: 1.5ch;
|
|
14
14
|
text-align: right;
|
|
15
|
-
|
|
15
|
+
/* Theme-aware, and NO alpha. This was a fixed dark grey at 70%
|
|
16
|
+
opacity: fine on a light code background, 1.3:1 against the dark
|
|
17
|
+
one — line numbers were effectively invisible in dark mode.
|
|
18
|
+
Opacity compounds it, since it blends toward whatever is behind.
|
|
19
|
+
--muted-foreground already flips per theme (L 0.45 / 0.708). */
|
|
20
|
+
color: var(--muted-foreground);
|
|
16
21
|
user-select: none;
|
|
17
22
|
flex-shrink: 0;
|
|
18
23
|
}
|
|
@@ -23,6 +28,18 @@
|
|
|
23
28
|
color: oklch(0.55 0.2 25);
|
|
24
29
|
}
|
|
25
30
|
|
|
31
|
+
/* Dark mode: the diff gutters sit on TINTED line backgrounds, not on
|
|
32
|
+
the plain code background, and at L0.55 they measure 2.89:1 (add)
|
|
33
|
+
and 2.63:1 (remove) there — both well under AA. Light mode is
|
|
34
|
+
unaffected, so these are overrides rather than a changed base.
|
|
35
|
+
Raised to L0.72 for headroom over the 4.5:1 floor. */
|
|
36
|
+
.dark .code-rich-body .gutter.add {
|
|
37
|
+
color: oklch(0.72 0.2 145);
|
|
38
|
+
}
|
|
39
|
+
.dark .code-rich-body .gutter.remove {
|
|
40
|
+
color: oklch(0.72 0.14 25);
|
|
41
|
+
}
|
|
42
|
+
|
|
26
43
|
/* ── Diff line backgrounds ────────────────────────────── */
|
|
27
44
|
.code-rich-body .line.diff.add {
|
|
28
45
|
background-color: oklch(0.75 0.18 145 / 0.15);
|
|
@@ -99,9 +99,21 @@ const currentPath = Astro.url.pathname.replace(/\/$/, "") || "/";
|
|
|
99
99
|
<title>{title} — {siteTitle}</title>
|
|
100
100
|
<ClientRouter />
|
|
101
101
|
<script is:inline>
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
// Explicit choice wins in BOTH directions; only its absence
|
|
103
|
+
// falls through to the OS. Kept in sync with
|
|
104
|
+
// packages/docs-layout/src/DocsLayout.astro — a test asserts no
|
|
105
|
+
// copy regresses to the localStorage-only form.
|
|
106
|
+
(function () {
|
|
107
|
+
var stored = null;
|
|
108
|
+
try {
|
|
109
|
+
stored = localStorage.getItem("theme");
|
|
110
|
+
} catch (e) {}
|
|
111
|
+
var dark =
|
|
112
|
+
stored === "dark" ||
|
|
113
|
+
(stored !== "light" &&
|
|
114
|
+
window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
115
|
+
if (dark) document.documentElement.classList.add("dark");
|
|
116
|
+
})();
|
|
105
117
|
</script>
|
|
106
118
|
<style is:global>
|
|
107
119
|
/*
|