@fsegurai/codemirror-theme-forest 6.0.3 → 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 +20 -20
- package/dist/index.js +20 -20
- 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-forest [](https://www.npmjs.org/package/@fsegurai/codemirror-theme-forest)
|
|
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 Forest 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
|
-
@forest
|
|
25
|
-
|
|
26
|
-
@forestTheme
|
|
27
|
-
|
|
1
|
+
<!-- NOTE: README.md is generated from src/README.md -->
|
|
2
|
+
|
|
3
|
+
# @fsegurai/codemirror-theme-forest [](https://www.npmjs.org/package/@fsegurai/codemirror-theme-forest)
|
|
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 Forest 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
|
+
@forest
|
|
25
|
+
|
|
26
|
+
@forestTheme
|
|
27
|
+
|
|
28
28
|
@forestHighlightStyle
|
package/dist/index.cjs
CHANGED
|
@@ -27,41 +27,41 @@ selectionMatch = '#5d3535';
|
|
|
27
27
|
const forestTheme = 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
39
|
backgroundColor: selection,
|
|
40
|
-
color: '#FFFFFF'
|
|
40
|
+
color: '#FFFFFF',
|
|
41
41
|
},
|
|
42
42
|
'.cm-panels': {
|
|
43
43
|
backgroundColor: darkBackground,
|
|
44
|
-
color: base01
|
|
44
|
+
color: base01,
|
|
45
45
|
},
|
|
46
46
|
'.cm-panels.cm-panels-top': {
|
|
47
|
-
borderBottom: '2px solid black'
|
|
47
|
+
borderBottom: '2px solid black',
|
|
48
48
|
},
|
|
49
49
|
'.cm-panels.cm-panels-bottom': {
|
|
50
|
-
borderTop: '2px solid black'
|
|
50
|
+
borderTop: '2px solid black',
|
|
51
51
|
},
|
|
52
52
|
'.cm-activeLine': {
|
|
53
|
-
backgroundColor: highlightBackground
|
|
53
|
+
backgroundColor: highlightBackground,
|
|
54
54
|
},
|
|
55
55
|
'.cm-gutters': {
|
|
56
56
|
backgroundColor: darkBackground,
|
|
57
|
-
color: base03
|
|
57
|
+
color: base03,
|
|
58
58
|
},
|
|
59
59
|
'.cm-activeLineGutter': {
|
|
60
60
|
backgroundColor: selection,
|
|
61
|
-
color: '#FFFFFF'
|
|
61
|
+
color: '#FFFFFF',
|
|
62
62
|
},
|
|
63
63
|
'.cm-tooltip': {
|
|
64
|
-
backgroundColor: tooltipBackground
|
|
64
|
+
backgroundColor: tooltipBackground,
|
|
65
65
|
},
|
|
66
66
|
'.cm-selectionMatch': {
|
|
67
67
|
backgroundColor: selectionMatch,
|
|
@@ -69,24 +69,24 @@ const forestTheme = view.EditorView.theme({
|
|
|
69
69
|
'.cm-searchMatch': {
|
|
70
70
|
backgroundColor: base02, // Use the selection color for search matches
|
|
71
71
|
color: base01, // Foreground color for text
|
|
72
|
-
outline: `1px solid ${base03}
|
|
72
|
+
outline: `1px solid ${base03}`, // Outline using comment color
|
|
73
73
|
},
|
|
74
74
|
'.cm-searchMatch.cm-searchMatch-selected': {
|
|
75
75
|
backgroundColor: base05, // Use the keyword color for the selected search match
|
|
76
|
-
color: base00 // Background color for high visibility
|
|
76
|
+
color: base00, // Background color for high visibility
|
|
77
77
|
},
|
|
78
78
|
'.cm-searchMatch.cm-searchMatch-selected .ͼ5k': {
|
|
79
|
-
color: base00
|
|
79
|
+
color: base00,
|
|
80
80
|
},
|
|
81
81
|
'.cm-searchMatch .cm-selectionMatch': {
|
|
82
|
-
color: base01
|
|
82
|
+
color: base01,
|
|
83
83
|
},
|
|
84
84
|
'.cm-searchMatch .cm-selectionMatch .ͼ5k': {
|
|
85
|
-
color: base01
|
|
85
|
+
color: base01,
|
|
86
86
|
},
|
|
87
87
|
'.cm-searchMatch .ͼ5k': {
|
|
88
|
-
color: base01
|
|
89
|
-
}
|
|
88
|
+
color: base01,
|
|
89
|
+
},
|
|
90
90
|
}, { dark: true });
|
|
91
91
|
// Define the highlighting style for code in the Forest theme.
|
|
92
92
|
const forestHighlightStyle = language.HighlightStyle.define([
|
|
@@ -110,12 +110,12 @@ const forestHighlightStyle = language.HighlightStyle.define([
|
|
|
110
110
|
{ tag: highlight.tags.heading, fontWeight: 'bold', color: base0A },
|
|
111
111
|
{ tag: [highlight.tags.atom, highlight.tags.bool, highlight.tags.special(highlight.tags.variableName)], color: base06 },
|
|
112
112
|
{ tag: highlight.tags.invalid, color: invalid },
|
|
113
|
-
{ tag: highlight.tags.strikethrough, textDecoration: 'line-through' }
|
|
113
|
+
{ tag: highlight.tags.strikethrough, textDecoration: 'line-through' },
|
|
114
114
|
]);
|
|
115
115
|
// Extension to enable the Forest theme (both the editor theme and the highlight style).
|
|
116
116
|
const forest = [
|
|
117
117
|
forestTheme,
|
|
118
|
-
language.syntaxHighlighting(forestHighlightStyle)
|
|
118
|
+
language.syntaxHighlighting(forestHighlightStyle),
|
|
119
119
|
];
|
|
120
120
|
|
|
121
121
|
exports.forest = forest;
|
package/dist/index.js
CHANGED
|
@@ -25,41 +25,41 @@ selectionMatch = '#5d3535';
|
|
|
25
25
|
const forestTheme = /*@__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
37
|
backgroundColor: selection,
|
|
38
|
-
color: '#FFFFFF'
|
|
38
|
+
color: '#FFFFFF',
|
|
39
39
|
},
|
|
40
40
|
'.cm-panels': {
|
|
41
41
|
backgroundColor: darkBackground,
|
|
42
|
-
color: base01
|
|
42
|
+
color: base01,
|
|
43
43
|
},
|
|
44
44
|
'.cm-panels.cm-panels-top': {
|
|
45
|
-
borderBottom: '2px solid black'
|
|
45
|
+
borderBottom: '2px solid black',
|
|
46
46
|
},
|
|
47
47
|
'.cm-panels.cm-panels-bottom': {
|
|
48
|
-
borderTop: '2px solid black'
|
|
48
|
+
borderTop: '2px solid black',
|
|
49
49
|
},
|
|
50
50
|
'.cm-activeLine': {
|
|
51
|
-
backgroundColor: highlightBackground
|
|
51
|
+
backgroundColor: highlightBackground,
|
|
52
52
|
},
|
|
53
53
|
'.cm-gutters': {
|
|
54
54
|
backgroundColor: darkBackground,
|
|
55
|
-
color: base03
|
|
55
|
+
color: base03,
|
|
56
56
|
},
|
|
57
57
|
'.cm-activeLineGutter': {
|
|
58
58
|
backgroundColor: selection,
|
|
59
|
-
color: '#FFFFFF'
|
|
59
|
+
color: '#FFFFFF',
|
|
60
60
|
},
|
|
61
61
|
'.cm-tooltip': {
|
|
62
|
-
backgroundColor: tooltipBackground
|
|
62
|
+
backgroundColor: tooltipBackground,
|
|
63
63
|
},
|
|
64
64
|
'.cm-selectionMatch': {
|
|
65
65
|
backgroundColor: selectionMatch,
|
|
@@ -67,24 +67,24 @@ const forestTheme = /*@__PURE__*/EditorView.theme({
|
|
|
67
67
|
'.cm-searchMatch': {
|
|
68
68
|
backgroundColor: base02, // Use the selection color for search matches
|
|
69
69
|
color: base01, // Foreground color for text
|
|
70
|
-
outline: `1px solid ${base03}
|
|
70
|
+
outline: `1px solid ${base03}`, // Outline using comment color
|
|
71
71
|
},
|
|
72
72
|
'.cm-searchMatch.cm-searchMatch-selected': {
|
|
73
73
|
backgroundColor: base05, // Use the keyword color for the selected search match
|
|
74
|
-
color: base00 // Background color for high visibility
|
|
74
|
+
color: base00, // Background color for high visibility
|
|
75
75
|
},
|
|
76
76
|
'.cm-searchMatch.cm-searchMatch-selected .ͼ5k': {
|
|
77
|
-
color: base00
|
|
77
|
+
color: base00,
|
|
78
78
|
},
|
|
79
79
|
'.cm-searchMatch .cm-selectionMatch': {
|
|
80
|
-
color: base01
|
|
80
|
+
color: base01,
|
|
81
81
|
},
|
|
82
82
|
'.cm-searchMatch .cm-selectionMatch .ͼ5k': {
|
|
83
|
-
color: base01
|
|
83
|
+
color: base01,
|
|
84
84
|
},
|
|
85
85
|
'.cm-searchMatch .ͼ5k': {
|
|
86
|
-
color: base01
|
|
87
|
-
}
|
|
86
|
+
color: base01,
|
|
87
|
+
},
|
|
88
88
|
}, { dark: true });
|
|
89
89
|
// Define the highlighting style for code in the Forest theme.
|
|
90
90
|
const forestHighlightStyle = /*@__PURE__*/HighlightStyle.define([
|
|
@@ -108,12 +108,12 @@ const forestHighlightStyle = /*@__PURE__*/HighlightStyle.define([
|
|
|
108
108
|
{ tag: tags.heading, fontWeight: 'bold', color: base0A },
|
|
109
109
|
{ tag: [tags.atom, tags.bool, /*@__PURE__*/tags.special(tags.variableName)], color: base06 },
|
|
110
110
|
{ tag: tags.invalid, color: invalid },
|
|
111
|
-
{ tag: tags.strikethrough, textDecoration: 'line-through' }
|
|
111
|
+
{ tag: tags.strikethrough, textDecoration: 'line-through' },
|
|
112
112
|
]);
|
|
113
113
|
// Extension to enable the Forest theme (both the editor theme and the highlight style).
|
|
114
114
|
const forest = [
|
|
115
115
|
forestTheme,
|
|
116
|
-
/*@__PURE__*/syntaxHighlighting(forestHighlightStyle)
|
|
116
|
+
/*@__PURE__*/syntaxHighlighting(forestHighlightStyle),
|
|
117
117
|
];
|
|
118
118
|
|
|
119
119
|
export { forest, forestHighlightStyle, forestTheme };
|
package/package.json
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@fsegurai/codemirror-theme-forest",
|
|
3
|
-
"description": "Forest 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-forest",
|
|
3
|
+
"description": "Forest 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
|
+
}
|