@fsegurai/codemirror-theme-github-dark 6.0.2 → 6.0.6
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 +15 -15
- package/dist/index.js +15 -15
- 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-github-dark [](https://www.npmjs.org/package/@fsegurai/codemirror-theme-github-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 GitHub 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
|
-
@githubDark
|
|
25
|
-
|
|
26
|
-
@githubDarkTheme
|
|
27
|
-
|
|
1
|
+
<!-- NOTE: README.md is generated from src/README.md -->
|
|
2
|
+
|
|
3
|
+
# @fsegurai/codemirror-theme-github-dark [](https://www.npmjs.org/package/@fsegurai/codemirror-theme-github-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 GitHub 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
|
+
@githubDark
|
|
25
|
+
|
|
26
|
+
@githubDarkTheme
|
|
27
|
+
|
|
28
28
|
@githubDarkHighlightStyle
|
package/dist/index.cjs
CHANGED
|
@@ -27,47 +27,47 @@ selection = base02; // Selection color
|
|
|
27
27
|
const githubDarkTheme = view.EditorView.theme({
|
|
28
28
|
'&': {
|
|
29
29
|
color: base01,
|
|
30
|
-
backgroundColor: base00
|
|
30
|
+
backgroundColor: base00,
|
|
31
31
|
},
|
|
32
32
|
'.cm-content': {
|
|
33
|
-
caretColor: cursor
|
|
33
|
+
caretColor: cursor,
|
|
34
34
|
},
|
|
35
35
|
'.cm-cursor, .cm-dropCursor': {
|
|
36
|
-
borderLeftColor: cursor
|
|
36
|
+
borderLeftColor: cursor,
|
|
37
37
|
},
|
|
38
38
|
'&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': {
|
|
39
|
-
backgroundColor: selection
|
|
39
|
+
backgroundColor: selection,
|
|
40
40
|
},
|
|
41
41
|
'.cm-searchMatch': {
|
|
42
42
|
backgroundColor: base02, // Use the selection color for search matches
|
|
43
43
|
color: base01, // Ensure the text color contrasts with the background
|
|
44
|
-
outline: `1px solid ${base04}
|
|
44
|
+
outline: `1px solid ${base04}`, // Highlight with a subtle outline
|
|
45
45
|
},
|
|
46
46
|
'.cm-searchMatch.cm-searchMatch-selected': {
|
|
47
47
|
backgroundColor: base08, // Use a distinct color for the selected search match
|
|
48
48
|
color: base00, // Invert color for high visibility
|
|
49
|
-
outline: `1px solid ${base04}
|
|
49
|
+
outline: `1px solid ${base04}`,
|
|
50
50
|
},
|
|
51
51
|
'.cm-panels': {
|
|
52
52
|
backgroundColor: base00, // Use the main background color for consistency
|
|
53
|
-
color: base01
|
|
53
|
+
color: base01,
|
|
54
54
|
},
|
|
55
55
|
'.cm-panels.cm-panels-top': {
|
|
56
|
-
borderBottom: '2px solid black'
|
|
56
|
+
borderBottom: '2px solid black',
|
|
57
57
|
},
|
|
58
58
|
'.cm-panels.cm-panels-bottom': {
|
|
59
|
-
borderTop: '2px solid black'
|
|
59
|
+
borderTop: '2px solid black',
|
|
60
60
|
},
|
|
61
61
|
'.cm-activeLine': {
|
|
62
|
-
backgroundColor: highlightBackground
|
|
62
|
+
backgroundColor: highlightBackground,
|
|
63
63
|
},
|
|
64
64
|
'.cm-gutters': {
|
|
65
65
|
backgroundColor: base00, // Gutter background using the main background
|
|
66
|
-
color: base03 // Use comment color for gutter foreground
|
|
66
|
+
color: base03, // Use comment color for gutter foreground
|
|
67
67
|
},
|
|
68
68
|
'.cm-tooltip': {
|
|
69
|
-
backgroundColor: tooltipBackground
|
|
70
|
-
}
|
|
69
|
+
backgroundColor: tooltipBackground,
|
|
70
|
+
},
|
|
71
71
|
}, { dark: true });
|
|
72
72
|
// Define the highlighting style for code in the GitHub Dark theme.
|
|
73
73
|
const githubDarkHighlightStyle = language.HighlightStyle.define([
|
|
@@ -84,12 +84,12 @@ const githubDarkHighlightStyle = language.HighlightStyle.define([
|
|
|
84
84
|
{ tag: [highlight.tags.atom, highlight.tags.bool, highlight.tags.special(highlight.tags.variableName)], color: base0C },
|
|
85
85
|
{ tag: highlight.tags.link, textDecoration: 'underline' },
|
|
86
86
|
{ tag: highlight.tags.strikethrough, textDecoration: 'line-through' },
|
|
87
|
-
{ tag: highlight.tags.invalid, color: invalid }
|
|
87
|
+
{ tag: highlight.tags.invalid, color: invalid },
|
|
88
88
|
]);
|
|
89
89
|
// Extension to enable the GitHub Dark theme (both the editor theme and the highlight style).
|
|
90
90
|
const githubDark = [
|
|
91
91
|
githubDarkTheme,
|
|
92
|
-
language.syntaxHighlighting(githubDarkHighlightStyle)
|
|
92
|
+
language.syntaxHighlighting(githubDarkHighlightStyle),
|
|
93
93
|
];
|
|
94
94
|
|
|
95
95
|
exports.githubDark = githubDark;
|
package/dist/index.js
CHANGED
|
@@ -25,47 +25,47 @@ selection = base02; // Selection color
|
|
|
25
25
|
const githubDarkTheme = /*@__PURE__*/EditorView.theme({
|
|
26
26
|
'&': {
|
|
27
27
|
color: base01,
|
|
28
|
-
backgroundColor: base00
|
|
28
|
+
backgroundColor: base00,
|
|
29
29
|
},
|
|
30
30
|
'.cm-content': {
|
|
31
|
-
caretColor: cursor
|
|
31
|
+
caretColor: cursor,
|
|
32
32
|
},
|
|
33
33
|
'.cm-cursor, .cm-dropCursor': {
|
|
34
|
-
borderLeftColor: cursor
|
|
34
|
+
borderLeftColor: cursor,
|
|
35
35
|
},
|
|
36
36
|
'&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': {
|
|
37
|
-
backgroundColor: selection
|
|
37
|
+
backgroundColor: selection,
|
|
38
38
|
},
|
|
39
39
|
'.cm-searchMatch': {
|
|
40
40
|
backgroundColor: base02, // Use the selection color for search matches
|
|
41
41
|
color: base01, // Ensure the text color contrasts with the background
|
|
42
|
-
outline: `1px solid ${base04}
|
|
42
|
+
outline: `1px solid ${base04}`, // Highlight with a subtle outline
|
|
43
43
|
},
|
|
44
44
|
'.cm-searchMatch.cm-searchMatch-selected': {
|
|
45
45
|
backgroundColor: base08, // Use a distinct color for the selected search match
|
|
46
46
|
color: base00, // Invert color for high visibility
|
|
47
|
-
outline: `1px solid ${base04}
|
|
47
|
+
outline: `1px solid ${base04}`,
|
|
48
48
|
},
|
|
49
49
|
'.cm-panels': {
|
|
50
50
|
backgroundColor: base00, // Use the main background color for consistency
|
|
51
|
-
color: base01
|
|
51
|
+
color: base01,
|
|
52
52
|
},
|
|
53
53
|
'.cm-panels.cm-panels-top': {
|
|
54
|
-
borderBottom: '2px solid black'
|
|
54
|
+
borderBottom: '2px solid black',
|
|
55
55
|
},
|
|
56
56
|
'.cm-panels.cm-panels-bottom': {
|
|
57
|
-
borderTop: '2px solid black'
|
|
57
|
+
borderTop: '2px solid black',
|
|
58
58
|
},
|
|
59
59
|
'.cm-activeLine': {
|
|
60
|
-
backgroundColor: highlightBackground
|
|
60
|
+
backgroundColor: highlightBackground,
|
|
61
61
|
},
|
|
62
62
|
'.cm-gutters': {
|
|
63
63
|
backgroundColor: base00, // Gutter background using the main background
|
|
64
|
-
color: base03 // Use comment color for gutter foreground
|
|
64
|
+
color: base03, // Use comment color for gutter foreground
|
|
65
65
|
},
|
|
66
66
|
'.cm-tooltip': {
|
|
67
|
-
backgroundColor: tooltipBackground
|
|
68
|
-
}
|
|
67
|
+
backgroundColor: tooltipBackground,
|
|
68
|
+
},
|
|
69
69
|
}, { dark: true });
|
|
70
70
|
// Define the highlighting style for code in the GitHub Dark theme.
|
|
71
71
|
const githubDarkHighlightStyle = /*@__PURE__*/HighlightStyle.define([
|
|
@@ -82,12 +82,12 @@ const githubDarkHighlightStyle = /*@__PURE__*/HighlightStyle.define([
|
|
|
82
82
|
{ tag: [tags.atom, tags.bool, /*@__PURE__*/tags.special(tags.variableName)], color: base0C },
|
|
83
83
|
{ tag: tags.link, textDecoration: 'underline' },
|
|
84
84
|
{ tag: tags.strikethrough, textDecoration: 'line-through' },
|
|
85
|
-
{ tag: tags.invalid, color: invalid }
|
|
85
|
+
{ tag: tags.invalid, color: invalid },
|
|
86
86
|
]);
|
|
87
87
|
// Extension to enable the GitHub Dark theme (both the editor theme and the highlight style).
|
|
88
88
|
const githubDark = [
|
|
89
89
|
githubDarkTheme,
|
|
90
|
-
/*@__PURE__*/syntaxHighlighting(githubDarkHighlightStyle)
|
|
90
|
+
/*@__PURE__*/syntaxHighlighting(githubDarkHighlightStyle),
|
|
91
91
|
];
|
|
92
92
|
|
|
93
93
|
export { githubDark, githubDarkHighlightStyle, githubDarkTheme };
|
package/package.json
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@fsegurai/codemirror-theme-github-dark",
|
|
3
|
-
"description": "GitHub 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-github-dark",
|
|
3
|
+
"description": "GitHub Dark theme for the CodeMirror code editor",
|
|
4
|
+
"version": "6.0.6",
|
|
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
|
+
}
|