@nonoun/native-codemirror 0.2.0 → 0.2.1

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.
@@ -20,5 +20,5 @@ import type { Extension } from '@codemirror/state';
20
20
  * - Indent on input
21
21
  * - Line wrapping
22
22
  */
23
- export declare const nuiBaseExtensions: Extension;
23
+ export declare const NBaseExtensions: Extension;
24
24
  //# sourceMappingURL=base-extensions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-extensions.d.ts","sourceRoot":"","sources":["../src/base-extensions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAwBnD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAmC/B,CAAC"}
1
+ {"version":3,"file":"base-extensions.d.ts","sourceRoot":"","sources":["../src/base-extensions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAwBnD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe,EAAE,SAmC7B,CAAC"}
package/dist/index.d.ts CHANGED
@@ -7,8 +7,8 @@
7
7
  * factory function. Also re-exports key CodeMirror APIs so consumer
8
8
  * packages can import through this single dependency.
9
9
  */
10
- export { nuiTheme, nuiHighlightStyle, nuiSyntaxHighlighting } from './theme.ts';
11
- export { nuiBaseExtensions } from './base-extensions.ts';
10
+ export { NTheme, NHighlightStyle, NSyntaxHighlighting } from './theme.ts';
11
+ export { NBaseExtensions } from './base-extensions.ts';
12
12
  export { createEditorView } from './factory.ts';
13
13
  export type { CreateEditorOptions } from './factory.ts';
14
14
  export { EditorView, keymap, Decoration, ViewPlugin, WidgetType, lineNumbers, highlightActiveLine, highlightActiveLineGutter, drawSelection, } from '@codemirror/view';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,YAAY,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAMxD,OAAO,EACL,UAAU,EACV,MAAM,EACN,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,yBAAyB,EACzB,aAAa,GACd,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAMlE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACtF,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAMhE,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,UAAU,EACV,eAAe,EACf,aAAa,GACd,MAAM,sBAAsB,CAAC;AAM9B,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAMzF,OAAO,EACL,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC;AAMlC,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,YAAY,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAMxD,OAAO,EACL,UAAU,EACV,MAAM,EACN,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,yBAAyB,EACzB,aAAa,GACd,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAMlE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACtF,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAMhE,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,UAAU,EACV,eAAe,EACf,aAAa,GACd,MAAM,sBAAsB,CAAC;AAM9B,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAMzF,OAAO,EACL,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC;AAMlC,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * nui-codemirror.css
2
+ * n-codemirror.css
3
3
  *
4
4
  * CodeMirror chrome styles for NativeUI integration.
5
5
  * Scoped to @layer ui with zero-specificity :where() selectors.
@@ -15,6 +15,11 @@
15
15
  * --------------------------------------------------------------------- */
16
16
 
17
17
  :where(.cm-editor) {
18
+ /* CodeMirror chrome tokens */
19
+ --n-cm-scrollbar: #484c52;
20
+ --n-cm-scrollbar-hover: #5e6167;
21
+ --n-cm-match-bg: #314050;
22
+
18
23
  border-radius: var(--n-radius, 8px);
19
24
  overflow: hidden;
20
25
  font-variant-ligatures: contextual;
@@ -54,7 +59,7 @@
54
59
 
55
60
  :where(.cm-scroller) {
56
61
  scrollbar-width: thin;
57
- scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
62
+ scrollbar-color: var(--n-cm-scrollbar) transparent;
58
63
  }
59
64
 
60
65
  :where(.cm-scroller)::-webkit-scrollbar {
@@ -67,12 +72,12 @@
67
72
  }
68
73
 
69
74
  :where(.cm-scroller)::-webkit-scrollbar-thumb {
70
- background: rgba(255, 255, 255, 0.15);
75
+ background: var(--n-cm-scrollbar);
71
76
  border-radius: 4px;
72
77
  }
73
78
 
74
79
  :where(.cm-scroller)::-webkit-scrollbar-thumb:hover {
75
- background: rgba(255, 255, 255, 0.25);
80
+ background: var(--n-cm-scrollbar-hover);
76
81
  }
77
82
 
78
83
  :where(.cm-scroller)::-webkit-scrollbar-corner {
@@ -146,7 +151,7 @@
146
151
  * --------------------------------------------------------------------- */
147
152
 
148
153
  :where(.cm-selectionMatch) {
149
- background-color: rgba(97, 175, 239, 0.15);
154
+ background-color: var(--n-cm-match-bg);
150
155
  border-radius: 2px;
151
156
  }
152
157
  }
@@ -392,7 +392,7 @@ const X = n.theme({
392
392
  *
393
393
  * @example
394
394
  * ```ts
395
- * import { createEditorView } from '@nonoun/nui-codemirror';
395
+ * import { createEditorView } from '@nonoun/native-codemirror';
396
396
  *
397
397
  * const view = createEditorView(document.getElementById('editor')!, {
398
398
  * doc: 'console.log("hello");',
@@ -415,4 +415,4 @@ function me(e, t) {
415
415
  parent: e
416
416
  });
417
417
  }
418
- export { N as Compartment, e as Decoration, pe as EditorState, t as EditorView, l as HighlightStyle, F as StateEffect, I as StateField, r as ViewPlugin, i as WidgetType, T as autocompletion, d as bracketMatching, D as closeBrackets, k as closeBracketsKeymap, j as completionKeymap, me as createEditorView, _ as defaultKeymap, a as drawSelection, p as foldGutter, s as highlightActiveLine, te as highlightActiveLineGutter, y as history, x as historyKeymap, ce as indentOnInput, re as keymap, ae as lineNumbers, $ as nuiBaseExtensions, Z as nuiHighlightStyle, Q as nuiSyntaxHighlighting, X as nuiTheme, C as redo, ue as syntaxHighlighting, fe as syntaxTree, h as tags, w as undo };
418
+ export { N as Compartment, e as Decoration, pe as EditorState, t as EditorView, l as HighlightStyle, $ as NBaseExtensions, Z as NHighlightStyle, Q as NSyntaxHighlighting, X as NTheme, F as StateEffect, I as StateField, r as ViewPlugin, i as WidgetType, T as autocompletion, d as bracketMatching, D as closeBrackets, k as closeBracketsKeymap, j as completionKeymap, me as createEditorView, _ as defaultKeymap, a as drawSelection, p as foldGutter, s as highlightActiveLine, te as highlightActiveLineGutter, y as history, x as historyKeymap, ce as indentOnInput, re as keymap, ae as lineNumbers, C as redo, ue as syntaxHighlighting, fe as syntaxTree, h as tags, w as undo };
package/dist/theme.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * with { dark: true } and HighlightStyle.define() for syntax tokens.
7
7
  */
8
8
  import { HighlightStyle } from '@codemirror/language';
9
- export declare const nuiTheme: import("@codemirror/state").Extension;
10
- export declare const nuiHighlightStyle: HighlightStyle;
11
- export declare const nuiSyntaxHighlighting: import("@codemirror/state").Extension;
9
+ export declare const NTheme: import("@codemirror/state").Extension;
10
+ export declare const NHighlightStyle: HighlightStyle;
11
+ export declare const NSyntaxHighlighting: import("@codemirror/state").Extension;
12
12
  //# sourceMappingURL=theme.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,cAAc,EAAsB,MAAM,sBAAsB,CAAC;AA0B1E,eAAO,MAAM,QAAQ,uCAqKpB,CAAC;AAMF,eAAO,MAAM,iBAAiB,gBAoF5B,CAAC;AAEH,eAAO,MAAM,qBAAqB,uCAAwC,CAAC"}
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,cAAc,EAAsB,MAAM,sBAAsB,CAAC;AA0B1E,eAAO,MAAM,MAAM,uCAqKlB,CAAC;AAMF,eAAO,MAAM,eAAe,gBAoF1B,CAAC;AAEH,eAAO,MAAM,mBAAmB,uCAAsC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nonoun/native-codemirror",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Shared CodeMirror 6 integration layer for @nonoun/native-ui ecosystem",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -31,7 +31,7 @@
31
31
  "scripts": {
32
32
  "build": "npm run build:js && npm run build:css && npm run build:types",
33
33
  "build:js": "vite build",
34
- "build:css": "cp src/css/native-codemirror.css dist/native-codemirror.css",
34
+ "build:css": "cp src/css/codemirror.css dist/native-codemirror.css",
35
35
  "build:types": "tsc -p tsconfig.build.json"
36
36
  },
37
37
  "publishConfig": {