@fsegurai/codemirror-theme-basic-dark 6.0.2 → 6.0.5
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/README.md +27 -27
- package/dist/index.cjs +26 -7
- package/dist/index.d.cts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +26 -7
- package/package.json +45 -45
package/README.md
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
<!-- NOTE: README.md is generated from src/README.md -->
|
|
2
|
-
|
|
3
|
-
# @fsegurai/codemirror-theme-basic-dark [](https://www.npmjs.org/package/@fsegurai/codemirror-theme-basic-dark)
|
|
4
|
-
|
|
5
|
-
[ [**WEBSITE**](https://codemirror.net/6/) | [**ISSUES**](https://github.com/codemirror/codemirror.next/issues) | [**DEMO**](https://fsegurai.github.io/codemirror-themes/) ]
|
|
6
|
-
|
|
7
|
-
This package implements the Basic Dark theme for the
|
|
8
|
-
[CodeMirror](https://codemirror.net/6/) code editor.
|
|
9
|
-
|
|
10
|
-
The [project page](https://codemirror.net/6/) has more information, a
|
|
11
|
-
number of [examples](https://codemirror.net/6/examples/) and the
|
|
12
|
-
[documentation](https://codemirror.net/6/docs/).
|
|
13
|
-
|
|
14
|
-
This code is released under an
|
|
15
|
-
[MIT license](https://github.com/fsegurai/cm6-themes/tree/main/LICENSE).
|
|
16
|
-
|
|
17
|
-
We aim to be an inclusive, welcoming community. To make that explicit,
|
|
18
|
-
we have a [code of
|
|
19
|
-
conduct](http://contributor-covenant.org/version/1/1/0/) that applies
|
|
20
|
-
to communication around the project.
|
|
21
|
-
|
|
22
|
-
## API Reference
|
|
23
|
-
|
|
24
|
-
@basicDark
|
|
25
|
-
|
|
26
|
-
@basicDarkTheme
|
|
27
|
-
|
|
1
|
+
<!-- NOTE: README.md is generated from src/README.md -->
|
|
2
|
+
|
|
3
|
+
# @fsegurai/codemirror-theme-basic-dark [](https://www.npmjs.org/package/@fsegurai/codemirror-theme-basic-dark)
|
|
4
|
+
|
|
5
|
+
[ [**WEBSITE**](https://codemirror.net/6/) | [**ISSUES**](https://github.com/codemirror/codemirror.next/issues) | [**DEMO**](https://fsegurai.github.io/codemirror-themes/) ]
|
|
6
|
+
|
|
7
|
+
This package implements the Basic Dark theme for the
|
|
8
|
+
[CodeMirror](https://codemirror.net/6/) code editor.
|
|
9
|
+
|
|
10
|
+
The [project page](https://codemirror.net/6/) has more information, a
|
|
11
|
+
number of [examples](https://codemirror.net/6/examples/) and the
|
|
12
|
+
[documentation](https://codemirror.net/6/docs/).
|
|
13
|
+
|
|
14
|
+
This code is released under an
|
|
15
|
+
[MIT license](https://github.com/fsegurai/cm6-themes/tree/main/LICENSE).
|
|
16
|
+
|
|
17
|
+
We aim to be an inclusive, welcoming community. To make that explicit,
|
|
18
|
+
we have a [code of
|
|
19
|
+
conduct](http://contributor-covenant.org/version/1/1/0/) that applies
|
|
20
|
+
to communication around the project.
|
|
21
|
+
|
|
22
|
+
## API Reference
|
|
23
|
+
|
|
24
|
+
@basicDark
|
|
25
|
+
|
|
26
|
+
@basicDarkTheme
|
|
27
|
+
|
|
28
28
|
@basicDarkHighlightStyle
|
package/dist/index.cjs
CHANGED
|
@@ -5,8 +5,10 @@ var language = require('@codemirror/language');
|
|
|
5
5
|
var highlight = require('@lezer/highlight');
|
|
6
6
|
|
|
7
7
|
const base00 = '#2E3235', base01 = '#DDDDDD', base02 = '#B9D2FF', base03 = '#b0b0b0', base05 = '#e0e0e0', base06 = '#808080', base07 = '#000000', base08 = '#A54543', base09 = '#fc6d24', base0A = '#fda331', base0B = '#8abeb7', base0C = '#b5bd68', base0D = '#6fb3d2', base0E = '#cc99cc', base0F = '#6987AF';
|
|
8
|
-
const invalid = base09, darkBackground = '#292d30', highlightBackground = base02 + '30', background = base00, tooltipBackground = base01, selection = '#
|
|
9
|
-
|
|
8
|
+
const invalid = base09, darkBackground = '#292d30', highlightBackground = base02 + '30', background = base00, tooltipBackground = base01, selection = '#b2cbf9b8', cursor = base01;
|
|
9
|
+
/**
|
|
10
|
+
The editor theme styles for Basic Dark.
|
|
11
|
+
*/
|
|
10
12
|
const basicDarkTheme = view.EditorView.theme({
|
|
11
13
|
'&': {
|
|
12
14
|
color: base01,
|
|
@@ -16,7 +18,10 @@ const basicDarkTheme = view.EditorView.theme({
|
|
|
16
18
|
caretColor: cursor
|
|
17
19
|
},
|
|
18
20
|
'.cm-cursor, .cm-dropCursor': { borderLeftColor: cursor },
|
|
19
|
-
'&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': {
|
|
21
|
+
'&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': {
|
|
22
|
+
backgroundColor: selection,
|
|
23
|
+
color: '#000000'
|
|
24
|
+
},
|
|
20
25
|
'.cm-panels': { backgroundColor: darkBackground, color: base03 },
|
|
21
26
|
'.cm-panels.cm-panels-top': { borderBottom: '2px solid black' },
|
|
22
27
|
'.cm-panels.cm-panels-bottom': { borderTop: '2px solid black' },
|
|
@@ -29,6 +34,15 @@ const basicDarkTheme = view.EditorView.theme({
|
|
|
29
34
|
backgroundColor: base05,
|
|
30
35
|
color: base07
|
|
31
36
|
},
|
|
37
|
+
'.cm-searchMatch .cm-selectionMatch': {
|
|
38
|
+
color: base07
|
|
39
|
+
},
|
|
40
|
+
'.cm-searchMatch .cm-selectionMatch .ͼ3w': {
|
|
41
|
+
color: base07
|
|
42
|
+
},
|
|
43
|
+
'.cm-searchMatch .ͼ3w': {
|
|
44
|
+
color: base07
|
|
45
|
+
},
|
|
32
46
|
'.cm-activeLine': { backgroundColor: highlightBackground },
|
|
33
47
|
'.cm-selectionMatch': { backgroundColor: highlightBackground },
|
|
34
48
|
'&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket': {
|
|
@@ -44,7 +58,8 @@ const basicDarkTheme = view.EditorView.theme({
|
|
|
44
58
|
backgroundColor: darkBackground
|
|
45
59
|
},
|
|
46
60
|
'.cm-activeLineGutter': {
|
|
47
|
-
backgroundColor:
|
|
61
|
+
backgroundColor: selection,
|
|
62
|
+
color: '#000000'
|
|
48
63
|
},
|
|
49
64
|
'.cm-foldPlaceholder': {
|
|
50
65
|
backgroundColor: 'transparent',
|
|
@@ -70,7 +85,9 @@ const basicDarkTheme = view.EditorView.theme({
|
|
|
70
85
|
}
|
|
71
86
|
}
|
|
72
87
|
}, { dark: true });
|
|
73
|
-
|
|
88
|
+
/**
|
|
89
|
+
The highlighting style for code in the Basic Light theme.
|
|
90
|
+
*/
|
|
74
91
|
const basicDarkHighlightStyle = language.HighlightStyle.define([
|
|
75
92
|
{ tag: highlight.tags.keyword, color: base0A },
|
|
76
93
|
{
|
|
@@ -166,8 +183,10 @@ const basicDarkHighlightStyle = language.HighlightStyle.define([
|
|
|
166
183
|
},
|
|
167
184
|
{ tag: highlight.tags.invalid, color: base02, borderBottom: `1px dotted ${invalid}` }
|
|
168
185
|
]);
|
|
169
|
-
|
|
170
|
-
|
|
186
|
+
/**
|
|
187
|
+
Extension to enable the Basic Dark theme (both the editor theme and
|
|
188
|
+
the highlight style).
|
|
189
|
+
*/
|
|
171
190
|
const basicDark = [
|
|
172
191
|
basicDarkTheme,
|
|
173
192
|
language.syntaxHighlighting(basicDarkHighlightStyle)
|
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import { Extension } from '@codemirror/state';
|
|
2
2
|
import { HighlightStyle } from '@codemirror/language';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
The editor theme styles for Basic Dark.
|
|
6
|
+
*/
|
|
4
7
|
declare const basicDarkTheme: Extension;
|
|
8
|
+
/**
|
|
9
|
+
The highlighting style for code in the Basic Light theme.
|
|
10
|
+
*/
|
|
5
11
|
declare const basicDarkHighlightStyle: HighlightStyle;
|
|
12
|
+
/**
|
|
13
|
+
Extension to enable the Basic Dark theme (both the editor theme and
|
|
14
|
+
the highlight style).
|
|
15
|
+
*/
|
|
6
16
|
declare const basicDark: Extension;
|
|
7
17
|
|
|
8
18
|
export { basicDark, basicDarkHighlightStyle, basicDarkTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import { Extension } from '@codemirror/state';
|
|
2
2
|
import { HighlightStyle } from '@codemirror/language';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
The editor theme styles for Basic Dark.
|
|
6
|
+
*/
|
|
4
7
|
declare const basicDarkTheme: Extension;
|
|
8
|
+
/**
|
|
9
|
+
The highlighting style for code in the Basic Light theme.
|
|
10
|
+
*/
|
|
5
11
|
declare const basicDarkHighlightStyle: HighlightStyle;
|
|
12
|
+
/**
|
|
13
|
+
Extension to enable the Basic Dark theme (both the editor theme and
|
|
14
|
+
the highlight style).
|
|
15
|
+
*/
|
|
6
16
|
declare const basicDark: Extension;
|
|
7
17
|
|
|
8
18
|
export { basicDark, basicDarkHighlightStyle, basicDarkTheme };
|
package/dist/index.js
CHANGED
|
@@ -3,8 +3,10 @@ import { HighlightStyle, syntaxHighlighting } from '@codemirror/language';
|
|
|
3
3
|
import { tags } from '@lezer/highlight';
|
|
4
4
|
|
|
5
5
|
const base00 = '#2E3235', base01 = '#DDDDDD', base02 = '#B9D2FF', base03 = '#b0b0b0', base05 = '#e0e0e0', base06 = '#808080', base07 = '#000000', base08 = '#A54543', base09 = '#fc6d24', base0A = '#fda331', base0B = '#8abeb7', base0C = '#b5bd68', base0D = '#6fb3d2', base0E = '#cc99cc', base0F = '#6987AF';
|
|
6
|
-
const invalid = base09, darkBackground = '#292d30', highlightBackground = base02 + '30', background = base00, tooltipBackground = base01, selection = '#
|
|
7
|
-
|
|
6
|
+
const invalid = base09, darkBackground = '#292d30', highlightBackground = base02 + '30', background = base00, tooltipBackground = base01, selection = '#b2cbf9b8', cursor = base01;
|
|
7
|
+
/**
|
|
8
|
+
The editor theme styles for Basic Dark.
|
|
9
|
+
*/
|
|
8
10
|
const basicDarkTheme = /*@__PURE__*/EditorView.theme({
|
|
9
11
|
'&': {
|
|
10
12
|
color: base01,
|
|
@@ -14,7 +16,10 @@ const basicDarkTheme = /*@__PURE__*/EditorView.theme({
|
|
|
14
16
|
caretColor: cursor
|
|
15
17
|
},
|
|
16
18
|
'.cm-cursor, .cm-dropCursor': { borderLeftColor: cursor },
|
|
17
|
-
'&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': {
|
|
19
|
+
'&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': {
|
|
20
|
+
backgroundColor: selection,
|
|
21
|
+
color: '#000000'
|
|
22
|
+
},
|
|
18
23
|
'.cm-panels': { backgroundColor: darkBackground, color: base03 },
|
|
19
24
|
'.cm-panels.cm-panels-top': { borderBottom: '2px solid black' },
|
|
20
25
|
'.cm-panels.cm-panels-bottom': { borderTop: '2px solid black' },
|
|
@@ -27,6 +32,15 @@ const basicDarkTheme = /*@__PURE__*/EditorView.theme({
|
|
|
27
32
|
backgroundColor: base05,
|
|
28
33
|
color: base07
|
|
29
34
|
},
|
|
35
|
+
'.cm-searchMatch .cm-selectionMatch': {
|
|
36
|
+
color: base07
|
|
37
|
+
},
|
|
38
|
+
'.cm-searchMatch .cm-selectionMatch .ͼ3w': {
|
|
39
|
+
color: base07
|
|
40
|
+
},
|
|
41
|
+
'.cm-searchMatch .ͼ3w': {
|
|
42
|
+
color: base07
|
|
43
|
+
},
|
|
30
44
|
'.cm-activeLine': { backgroundColor: highlightBackground },
|
|
31
45
|
'.cm-selectionMatch': { backgroundColor: highlightBackground },
|
|
32
46
|
'&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket': {
|
|
@@ -42,7 +56,8 @@ const basicDarkTheme = /*@__PURE__*/EditorView.theme({
|
|
|
42
56
|
backgroundColor: darkBackground
|
|
43
57
|
},
|
|
44
58
|
'.cm-activeLineGutter': {
|
|
45
|
-
backgroundColor:
|
|
59
|
+
backgroundColor: selection,
|
|
60
|
+
color: '#000000'
|
|
46
61
|
},
|
|
47
62
|
'.cm-foldPlaceholder': {
|
|
48
63
|
backgroundColor: 'transparent',
|
|
@@ -68,7 +83,9 @@ const basicDarkTheme = /*@__PURE__*/EditorView.theme({
|
|
|
68
83
|
}
|
|
69
84
|
}
|
|
70
85
|
}, { dark: true });
|
|
71
|
-
|
|
86
|
+
/**
|
|
87
|
+
The highlighting style for code in the Basic Light theme.
|
|
88
|
+
*/
|
|
72
89
|
const basicDarkHighlightStyle = /*@__PURE__*/HighlightStyle.define([
|
|
73
90
|
{ tag: tags.keyword, color: base0A },
|
|
74
91
|
{
|
|
@@ -164,8 +181,10 @@ const basicDarkHighlightStyle = /*@__PURE__*/HighlightStyle.define([
|
|
|
164
181
|
},
|
|
165
182
|
{ tag: tags.invalid, color: base02, borderBottom: `1px dotted ${invalid}` }
|
|
166
183
|
]);
|
|
167
|
-
|
|
168
|
-
|
|
184
|
+
/**
|
|
185
|
+
Extension to enable the Basic Dark theme (both the editor theme and
|
|
186
|
+
the highlight style).
|
|
187
|
+
*/
|
|
169
188
|
const basicDark = [
|
|
170
189
|
basicDarkTheme,
|
|
171
190
|
/*@__PURE__*/syntaxHighlighting(basicDarkHighlightStyle)
|
package/package.json
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@fsegurai/codemirror-theme-basic-dark",
|
|
3
|
-
"description": "Basic Dark theme for the CodeMirror code editor",
|
|
4
|
-
"version": "6.0.
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "dist/index.cjs",
|
|
7
|
-
"exports": {
|
|
8
|
-
"import": "./dist/index.js",
|
|
9
|
-
"require": "./dist/index.cjs"
|
|
10
|
-
},
|
|
11
|
-
"types": "dist/index.d.ts",
|
|
12
|
-
"module": "dist/index.js",
|
|
13
|
-
"sideEffects": false,
|
|
14
|
-
"scripts": {
|
|
15
|
-
"test": "cm-runtests",
|
|
16
|
-
"prepare": "cm-buildhelper src/index.ts"
|
|
17
|
-
},
|
|
18
|
-
"keywords": [
|
|
19
|
-
"editor",
|
|
20
|
-
"code",
|
|
21
|
-
"codemirror"
|
|
22
|
-
],
|
|
23
|
-
"author": {
|
|
24
|
-
"name": "Fabián Segura",
|
|
25
|
-
"url": "https://www.fsegurai.com/"
|
|
26
|
-
},
|
|
27
|
-
"license": "MIT",
|
|
28
|
-
"repository": {
|
|
29
|
-
"type": "git",
|
|
30
|
-
"url": "git+https://github.com/fsegurai/codemirror-themes.git"
|
|
31
|
-
},
|
|
32
|
-
"bugs": {
|
|
33
|
-
"url": "https://github.com/fsegurai/codemirror-themes/issues"
|
|
34
|
-
},
|
|
35
|
-
"homepage": "https://github.com/fsegurai/codemirror-themes#readme",
|
|
36
|
-
"peerDependencies": {
|
|
37
|
-
"@lezer/highlight": "^1.0.0",
|
|
38
|
-
"@codemirror/language": "^6.0.0",
|
|
39
|
-
"@codemirror/state": "^6.0.0",
|
|
40
|
-
"@codemirror/view": "^6.0.0"
|
|
41
|
-
},
|
|
42
|
-
"devDependencies": {
|
|
43
|
-
"@codemirror/buildhelper": "^1.0.
|
|
44
|
-
}
|
|
45
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@fsegurai/codemirror-theme-basic-dark",
|
|
3
|
+
"description": "Basic Dark theme for the CodeMirror code editor",
|
|
4
|
+
"version": "6.0.5",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.cjs",
|
|
7
|
+
"exports": {
|
|
8
|
+
"import": "./dist/index.js",
|
|
9
|
+
"require": "./dist/index.cjs"
|
|
10
|
+
},
|
|
11
|
+
"types": "dist/index.d.ts",
|
|
12
|
+
"module": "dist/index.js",
|
|
13
|
+
"sideEffects": false,
|
|
14
|
+
"scripts": {
|
|
15
|
+
"test": "cm-runtests",
|
|
16
|
+
"prepare": "cm-buildhelper src/index.ts"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"editor",
|
|
20
|
+
"code",
|
|
21
|
+
"codemirror"
|
|
22
|
+
],
|
|
23
|
+
"author": {
|
|
24
|
+
"name": "Fabián Segura",
|
|
25
|
+
"url": "https://www.fsegurai.com/"
|
|
26
|
+
},
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "git+https://github.com/fsegurai/codemirror-themes.git"
|
|
31
|
+
},
|
|
32
|
+
"bugs": {
|
|
33
|
+
"url": "https://github.com/fsegurai/codemirror-themes/issues"
|
|
34
|
+
},
|
|
35
|
+
"homepage": "https://github.com/fsegurai/codemirror-themes#readme",
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"@lezer/highlight": "^1.0.0",
|
|
38
|
+
"@codemirror/language": "^6.0.0",
|
|
39
|
+
"@codemirror/state": "^6.0.0",
|
|
40
|
+
"@codemirror/view": "^6.0.0"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@codemirror/buildhelper": "^1.0.2"
|
|
44
|
+
}
|
|
45
|
+
}
|