@oharness/server 0.5.0 → 0.6.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/dist/theme.js ADDED
@@ -0,0 +1,96 @@
1
+ /**
2
+ * The page's colours, in one place.
3
+ *
4
+ * Each theme is a plain object of CSS custom properties, and the stylesheet is
5
+ * generated from them rather than written out. The dark palette has to be
6
+ * reachable two ways — the system asked for it and nothing overrode that, or
7
+ * somebody picked it — and while those were two hand-kept copies they drifted:
8
+ * the picked copy had lost --mention-lift, so choosing dark by hand drew the
9
+ * light theme's shadow under every mention. One object, printed twice, cannot.
10
+ *
11
+ * Components read these variables and nothing else; a colour that means
12
+ * something belongs here, not as a hex literal in page.ts.
13
+ */
14
+ export const LIGHT = {
15
+ bg: "#fff",
16
+ panel: "#f7f7f8",
17
+ fg: "#1a1a1a",
18
+ dim: "#6b7280",
19
+ line: "#00000010",
20
+ accent: "#111827",
21
+ // The brand's electric lime, and only for the harness being alive: the
22
+ // thinking sweep, a call in flight, the caret, a switch that is on. Committing
23
+ // actions keep --accent's ink, so lime never has to mean "press me". On paper
24
+ // it is darkened to olive, since the dark theme's lime is illegible on white;
25
+ // it is still too light for small text there, so it colours marks, not words.
26
+ brand: "#5e8c00",
27
+ "brand-tint": "#5e8c0024",
28
+ // The thinking label: brand-coloured words with a silver band sweeping
29
+ // across them. The words are a shade deeper than --brand so 13px text still
30
+ // clears AA on white; the band is allowed to wash them out as it passes.
31
+ "brand-ink": "#4a7000",
32
+ "brand-shine": "#e4e9ec",
33
+ ok: "#15803d",
34
+ warn: "#b45309",
35
+ err: "#b91c1c",
36
+ add: "#065f46",
37
+ "add-bg": "#ecfdf5",
38
+ del: "#991b1b",
39
+ "del-bg": "#fef2f2",
40
+ hover: "#00000008",
41
+ sel: "#00000012",
42
+ focus: "#111827",
43
+ ring: "#1118271a",
44
+ field: "#00000006",
45
+ "field-focus": "#0000000d",
46
+ track: "#0000001f",
47
+ // What separates the mention chip from the field behind it. A shadow on
48
+ // paper; on the dark theme a shadow falls on something already black, so it
49
+ // is the faintest of light edges instead. Neither is a border: a hard ring
50
+ // made each mention read as a small input field inside a sentence.
51
+ "mention-lift": "0 1px 2px #0000000f, 0 0 0 1px #0000000a",
52
+ kw: "#7c3aed",
53
+ str: "#047857",
54
+ com: "#94a3b8",
55
+ num: "#b45309",
56
+ };
57
+ export const DARK = {
58
+ bg: "#0e1013",
59
+ panel: "#15171c",
60
+ fg: "#e6e6e6",
61
+ dim: "#8b93a1",
62
+ line: "#ffffff14",
63
+ accent: "#e5e7eb",
64
+ brand: "#c6f432",
65
+ "brand-tint": "#c6f43233",
66
+ "brand-ink": "#c6f432",
67
+ "brand-shine": "#f8fafc",
68
+ ok: "#4ade80",
69
+ warn: "#fbbf24",
70
+ err: "#f87171",
71
+ add: "#6ee7b7",
72
+ "add-bg": "#052e22",
73
+ del: "#fca5a5",
74
+ "del-bg": "#3b1214",
75
+ hover: "#ffffff0a",
76
+ sel: "#ffffff1a",
77
+ focus: "#6b7280",
78
+ ring: "#ffffff14",
79
+ field: "#ffffff08",
80
+ "field-focus": "#ffffff12",
81
+ track: "#ffffff2e",
82
+ "mention-lift": "0 0 0 1px #ffffff1f, 0 1px 3px #00000073",
83
+ kw: "#c4b5fd",
84
+ str: "#6ee7b7",
85
+ com: "#64748b",
86
+ num: "#fcd34d",
87
+ };
88
+ const vars = (palette) => Object.entries(palette)
89
+ .map(([name, value]) => `--${name}:${value};`)
90
+ .join(" ");
91
+ // Native scrollbars and form controls read color-scheme, not our variables:
92
+ // without it every scroller keeps a white track in dark mode.
93
+ export const THEME_CSS = `:root{color-scheme:light; ${vars(LIGHT)}}\n` +
94
+ `@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){color-scheme:dark; ${vars(DARK)}}}\n` +
95
+ `:root[data-theme="dark"]{color-scheme:dark; ${vars(DARK)}}\n`;
96
+ //# sourceMappingURL=theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.js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,SAAS;IACtB,aAAa,EAAE,SAAS;IACxB,EAAE,EAAE,SAAS;IACb,IAAI,EAAE,SAAS;IACf,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,QAAQ,EAAE,SAAS;IACnB,GAAG,EAAE,SAAS;IACd,QAAQ,EAAE,SAAS;IACnB,KAAK,EAAE,WAAW;IAClB,GAAG,EAAE,WAAW;IAChB,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,WAAW;IAClB,aAAa,EAAE,WAAW;IAC1B,KAAK,EAAE,WAAW;IAClB,cAAc,EAAE,0CAA0C;IAC1D,EAAE,EAAE,SAAS;IACb,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;CACf,CAAC;AAEF,MAAM,IAAI,GAAG,CAAC,OAAgB,EAAE,EAAE,CAChC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;KACpB,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,IAAI,IAAI,KAAK,GAAG,CAAC;KAC7C,IAAI,CAAC,GAAG,CAAC,CAAC;AAEf,4EAA4E;AAC5E,8DAA8D;AAC9D,MAAM,CAAC,MAAM,SAAS,GACpB,6BAA6B,IAAI,CAAC,KAAK,CAAC,KAAK;IAC7C,yFAAyF,IAAI,CAAC,IAAI,CAAC,MAAM;IACzG,+CAA+C,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oharness/server",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "The browser frontend's server. Deployable on its own, without a terminal attached.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -49,6 +49,6 @@
49
49
  "build": "rm -rf dist && tsc -p tsconfig.build.json"
50
50
  },
51
51
  "dependencies": {
52
- "@oharness/engine": "0.5.0"
52
+ "@oharness/engine": "0.6.0"
53
53
  }
54
54
  }