@nonoun/native-editor 0.2.2 → 0.2.4

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.
@@ -11,14 +11,10 @@
11
11
  /* ------------------------------------------------------------------ */
12
12
 
13
13
  :where(native-editor) {
14
- /* Code-editor chrome tokens — NativeUI first, one-dark fallbacks */
14
+ /* Host-level tokens — used by the host element itself */
15
15
  --n-code-bg: var(--n-control-neutral, #282c34);
16
- --n-code-bg-dark: var(--n-panel-neutral, #21252b);
17
- --n-code-bg-darker: var(--n-body-neutral, #1e2127);
18
- --n-code-text-muted: var(--n-ink-muted-neutral, #7d8799);
19
- --n-code-accent: var(--n-ink-accent, #61afef);
16
+ --n-code-bg-raised: var(--n-panel-neutral, #21252b);
20
17
  --n-code-border: var(--n-border-muted-neutral, #3e4451);
21
- --n-code-inline-bg: var(--n-card-neutral, #333843);
22
18
 
23
19
  display: grid;
24
20
  grid-template-rows: auto 1fr;
@@ -31,13 +27,25 @@
31
27
  outline: none;
32
28
  }
33
29
 
30
+ /* Override codemirror.css defaults for editor surface inside native-editor */
31
+ :where(native-editor) :where(.cm-editor) {
32
+ --n-code-bg: var(--n-control-neutral, #282c34);
33
+ --n-code-bg-raised: var(--n-panel-neutral, #21252b);
34
+ --n-code-bg-deeper: var(--n-body-neutral, #1e2127);
35
+ --n-code-text: var(--n-ink-neutral, #abb2bf);
36
+ --n-code-text-muted: var(--n-ink-muted-neutral, #7d8799);
37
+ --n-code-accent: var(--n-ink-accent, #61afef);
38
+ --n-code-border: var(--n-border-muted-neutral, #3e4451);
39
+ --n-code-bg-inline: var(--n-card-neutral, #333843);
40
+ }
41
+
34
42
  /* ------------------------------------------------------------------ */
35
43
  /* Card header (toolbar chrome) */
36
44
  /* ------------------------------------------------------------------ */
37
45
 
38
46
  :where(native-editor) > :where(n-card-header) {
39
47
  border-bottom: 1px solid var(--n-code-border);
40
- background: var(--n-code-bg-dark);
48
+ background: var(--n-code-bg-raised);
41
49
  padding: 0;
42
50
  }
43
51
 
@@ -98,7 +106,7 @@
98
106
 
99
107
  :where(native-editor) :where(.md-code) {
100
108
  font-family: ui-monospace, 'SF Mono', 'Cascadia Code', monospace;
101
- background: var(--n-code-inline-bg);
109
+ background: var(--n-code-bg-inline);
102
110
  border-radius: 0.1875rem;
103
111
  padding: 0.0625rem 0.25rem;
104
112
  }
@@ -172,7 +180,7 @@
172
180
  /* ------------------------------------------------------------------ */
173
181
 
174
182
  :where(native-editor) :where(.md-code-block) {
175
- background: var(--n-code-bg-darker);
183
+ background: var(--n-code-bg-deeper);
176
184
  font-family: ui-monospace, 'SF Mono', 'Cascadia Code', monospace;
177
185
  font-size: 0.8125rem;
178
186
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nonoun/native-editor",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Markdown content editor with live preview for @nonoun/native-ui",
5
5
  "license": "MIT",
6
6
  "type": "module",