@celestia-island/hikari 0.55.403 → 0.55.404

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": "@celestia-island/hikari",
3
- "version": "0.55.403",
3
+ "version": "0.55.404",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Hikari UI library, Vue 3 runtime — one design system for Vue 3 and Rust/WASM applications",
@@ -0,0 +1,41 @@
1
+ import { readFileSync } from "node:fs";
2
+ import { join } from "node:path";
3
+
4
+ import { describe, expect, it } from "vitest";
5
+
6
+ /**
7
+ * The cursor's ink is THEME-INDEPENDENT (2026-11-16 field finding).
8
+ *
9
+ * The glyph rides the remote screen, which is dark in every app theme —
10
+ * the HkTerminal doctrine. The first cut used the page's text token, so
11
+ * in a light theme (--color-text near-black) the pointer rendered
12
+ * near-invisible against the black remote canvas: measured computed
13
+ * fill `rgb(30 30 30)` over `#0b0d12`. Both the arrow and the lobes now
14
+ * speak fixed light ink / dark glass, and this pin keeps a future edit
15
+ * from quietly restoring the theme tokens.
16
+ */
17
+ const scss = readFileSync(join(__dirname, "HkVirtualCursor.scss"), "utf8");
18
+
19
+ describe("HkVirtualCursor ink", () => {
20
+ it("the arrow is fixed light ink with a dark outline", () => {
21
+ // The sheet nests `path { … }` inside the arrow block; take the
22
+ // arrow block and check the nested rule inside it.
23
+ const arrow = /\.hk-virtual-cursor__arrow \{[\s\S]*?\n\}/.exec(scss)?.[0] ?? "";
24
+ expect(arrow, "the arrow block is present").not.toBe("");
25
+ const path = /path \{[\s\S]*?\n \}/.exec(arrow)?.[0] ?? "";
26
+ expect(path, "the nested path rule is present").not.toBe("");
27
+ expect(path).toMatch(/fill:\s*rgb\(255 255 255/);
28
+ expect(path).toMatch(/stroke:\s*rgb\(0 0 0/);
29
+ // The theme ink must not come back: it is near-black in light themes.
30
+ expect(path).not.toContain("--color-text");
31
+ });
32
+
33
+ it("the lobes speak a fixed dark-glass face, not the theme surface", () => {
34
+ const lobe = /\.hk-virtual-cursor__lobe \{[\s\S]*?\n\}/.exec(scss)?.[0] ?? "";
35
+ expect(lobe, "the lobe rule is present").not.toBe("");
36
+ expect(lobe).toMatch(/background:\s*rgb\(0 0 0 \//);
37
+ expect(lobe).toMatch(/color:\s*rgb\(255 255 255/);
38
+ expect(lobe, "no theme surface on the remote face").not.toContain("--color-background");
39
+ expect(lobe, "no theme ink on the remote face").not.toContain("--color-text");
40
+ });
41
+ });
@@ -28,9 +28,16 @@
28
28
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 55%));
29
29
  pointer-events: none;
30
30
 
31
+ /* The glyph rides a REMOTE-SCREEN surface, which is dark in every
32
+ * app theme (the HkTerminal doctrine: a remote canvas does not follow
33
+ * the page palette). Theme ink is therefore wrong here: in a light
34
+ * theme --color-text is near-black, and the pointer vanished against
35
+ * the black screen (measured: computed fill rgb(30 30 30) over
36
+ * #0b0d12 → effectively invisible). Fixed light ink + dark outline
37
+ * keeps the pointer legible on both dark and light remote content. */
31
38
  path {
32
- fill: rgb(var(--color-text));
33
- stroke: rgb(0 0 0 / 65%);
39
+ fill: rgb(255 255 255 / 96%);
40
+ stroke: rgb(0 0 0 / 70%);
34
41
  stroke-width: 1;
35
42
  }
36
43
  }
@@ -45,9 +52,13 @@
45
52
  place-items: center;
46
53
  width: 30px;
47
54
  height: 24px;
48
- border: 1px solid rgb(var(--color-border));
49
- background: rgb(var(--color-background) / 92%);
50
- color: rgb(var(--color-text));
55
+ /* Same doctrine as the arrow: the lobes ride the remote screen, not
56
+ * the page, so they speak a fixed dark-glass face (a theme-tinted
57
+ * pill vanishes on the remote black in dark themes and glares in
58
+ * light ones). Held state keeps the brand accent. */
59
+ border: 1px solid rgb(255 255 255 / 28%);
60
+ background: rgb(0 0 0 / 55%);
61
+ color: rgb(255 255 255 / 92%);
51
62
  border-radius: 8px;
52
63
  vertical-align: top;
53
64
  cursor: pointer;
@@ -72,9 +83,9 @@
72
83
  }
73
84
 
74
85
  &[data-held] {
75
- background: rgb(var(--color-primary) / 80%);
86
+ background: rgb(var(--color-primary) / 85%);
76
87
  border-color: rgb(var(--color-primary));
77
- color: rgb(var(--color-on-primary, 255 255 255));
88
+ color: rgb(255 255 255);
78
89
 
79
90
  &::after {
80
91
  opacity: 1;