@fsegurai/codemirror-theme-cobalt2 6.0.3 → 6.0.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.
- package/LICENSE +21 -0
- package/README.md +3 -1
- package/dist/index.cjs +5 -5
- package/dist/index.js +5 -5
- package/package.json +7 -7
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 fsegurai
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img alt="CodeMirror 6 Themes Logo" src="https://raw.githubusercontent.com/fsegurai/codemirror-themes/main/demo/public/codemirror-themes.
|
|
2
|
+
<img alt="CodeMirror 6 Themes Logo" src="https://raw.githubusercontent.com/fsegurai/codemirror-themes/main/demo/public/codemirror-themes.svg">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
- [Installation](#installation)
|
|
32
32
|
- [@fsegurai/codemirror-theme-cobalt2](#@fsegurai/codemirror-theme-cobalt2)
|
|
33
33
|
- [Using Theme](#using-theme)
|
|
34
|
+
- [More Resources](#more-resources)
|
|
34
35
|
- [Available Themes](#available-themes)
|
|
35
36
|
- [Demo Application](#demo-application)
|
|
36
37
|
- [License](#license)
|
|
@@ -89,6 +90,7 @@ Read the [CodeMirror documentation](https://codemirror.net/6/examples/styling/)
|
|
|
89
90
|
| High Contrast Light | [@fsegurai/codemirror-theme-high-contrast-light](https://www.npmjs.com/package/@fsegurai/codemirror-theme-high-contrast-light) |  |
|
|
90
91
|
| Material Dark | [@fsegurai/codemirror-theme-material-dark](https://www.npmjs.com/package/@fsegurai/codemirror-theme-material-dark) |  |
|
|
91
92
|
| Material Light | [@fsegurai/codemirror-theme-material-light](https://www.npmjs.com/package/@fsegurai/codemirror-theme-material-light) |  |
|
|
93
|
+
| Material Ocean | [@fsegurai/codemirror-theme-material-ocean](https://www.npmjs.com/package/@fsegurai/codemirror-theme-material-ocean) |  |
|
|
92
94
|
| Monokai | [@fsegurai/codemirror-theme-monokai](https://www.npmjs.com/package/@fsegurai/codemirror-theme-monokai) |  |
|
|
93
95
|
| Nord | [@fsegurai/codemirror-theme-nord](https://www.npmjs.com/package/@fsegurai/codemirror-theme-nord) |  |
|
|
94
96
|
| Palenight | [@fsegurai/codemirror-theme-palenight](https://www.npmjs.com/package/@fsegurai/codemirror-theme-palenight) |  |
|
package/dist/index.cjs
CHANGED
|
@@ -17,7 +17,7 @@ const generalDiff = {
|
|
|
17
17
|
insertedTextDecoration: 'none',
|
|
18
18
|
deletedTextDecoration: 'line-through',
|
|
19
19
|
insertedLinePadding: '1px 3px',
|
|
20
|
-
|
|
20
|
+
borderRadius: '3px'};
|
|
21
21
|
const generalGutter = {
|
|
22
22
|
border: 'none',
|
|
23
23
|
paddingRight: '8px',
|
|
@@ -285,14 +285,14 @@ const cobalt2Theme = view.EditorView.theme({
|
|
|
285
285
|
backgroundColor: addedBackground,
|
|
286
286
|
color: addedText,
|
|
287
287
|
padding: generalDiff.insertedLinePadding,
|
|
288
|
-
borderRadius: generalDiff.
|
|
288
|
+
borderRadius: generalDiff.borderRadius,
|
|
289
289
|
},
|
|
290
290
|
'ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))': {
|
|
291
291
|
textDecoration: generalDiff.insertedTextDecoration,
|
|
292
292
|
backgroundColor: `${addedBackground} !important`,
|
|
293
293
|
color: addedText,
|
|
294
294
|
padding: generalDiff.insertedLinePadding,
|
|
295
|
-
borderRadius: generalDiff.
|
|
295
|
+
borderRadius: generalDiff.borderRadius,
|
|
296
296
|
border: `1px solid ${addedText}30`,
|
|
297
297
|
},
|
|
298
298
|
'ins.cm-insertedLine .cm-changedText': {
|
|
@@ -304,14 +304,14 @@ const cobalt2Theme = view.EditorView.theme({
|
|
|
304
304
|
backgroundColor: removedBackground,
|
|
305
305
|
color: removedText,
|
|
306
306
|
padding: generalDiff.insertedLinePadding,
|
|
307
|
-
borderRadius: generalDiff.
|
|
307
|
+
borderRadius: generalDiff.borderRadius,
|
|
308
308
|
},
|
|
309
309
|
'del.cm-deletedLine, del, del:not(:has(.cm-deletedText))': {
|
|
310
310
|
textDecoration: generalDiff.deletedTextDecoration,
|
|
311
311
|
backgroundColor: `${removedBackground} !important`,
|
|
312
312
|
color: removedText,
|
|
313
313
|
padding: generalDiff.insertedLinePadding,
|
|
314
|
-
borderRadius: generalDiff.
|
|
314
|
+
borderRadius: generalDiff.borderRadius,
|
|
315
315
|
border: `1px solid ${removedText}30`,
|
|
316
316
|
},
|
|
317
317
|
'del .cm-deletedText, del .cm-changedText': {
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ const generalDiff = {
|
|
|
15
15
|
insertedTextDecoration: 'none',
|
|
16
16
|
deletedTextDecoration: 'line-through',
|
|
17
17
|
insertedLinePadding: '1px 3px',
|
|
18
|
-
|
|
18
|
+
borderRadius: '3px'};
|
|
19
19
|
const generalGutter = {
|
|
20
20
|
border: 'none',
|
|
21
21
|
paddingRight: '8px',
|
|
@@ -283,14 +283,14 @@ const cobalt2Theme = /*@__PURE__*/EditorView.theme({
|
|
|
283
283
|
backgroundColor: addedBackground,
|
|
284
284
|
color: addedText,
|
|
285
285
|
padding: generalDiff.insertedLinePadding,
|
|
286
|
-
borderRadius: generalDiff.
|
|
286
|
+
borderRadius: generalDiff.borderRadius,
|
|
287
287
|
},
|
|
288
288
|
'ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))': {
|
|
289
289
|
textDecoration: generalDiff.insertedTextDecoration,
|
|
290
290
|
backgroundColor: `${addedBackground} !important`,
|
|
291
291
|
color: addedText,
|
|
292
292
|
padding: generalDiff.insertedLinePadding,
|
|
293
|
-
borderRadius: generalDiff.
|
|
293
|
+
borderRadius: generalDiff.borderRadius,
|
|
294
294
|
border: `1px solid ${addedText}30`,
|
|
295
295
|
},
|
|
296
296
|
'ins.cm-insertedLine .cm-changedText': {
|
|
@@ -302,14 +302,14 @@ const cobalt2Theme = /*@__PURE__*/EditorView.theme({
|
|
|
302
302
|
backgroundColor: removedBackground,
|
|
303
303
|
color: removedText,
|
|
304
304
|
padding: generalDiff.insertedLinePadding,
|
|
305
|
-
borderRadius: generalDiff.
|
|
305
|
+
borderRadius: generalDiff.borderRadius,
|
|
306
306
|
},
|
|
307
307
|
'del.cm-deletedLine, del, del:not(:has(.cm-deletedText))': {
|
|
308
308
|
textDecoration: generalDiff.deletedTextDecoration,
|
|
309
309
|
backgroundColor: `${removedBackground} !important`,
|
|
310
310
|
color: removedText,
|
|
311
311
|
padding: generalDiff.insertedLinePadding,
|
|
312
|
-
borderRadius: generalDiff.
|
|
312
|
+
borderRadius: generalDiff.borderRadius,
|
|
313
313
|
border: `1px solid ${removedText}30`,
|
|
314
314
|
},
|
|
315
315
|
'del .cm-deletedText, del .cm-changedText': {
|
package/package.json
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fsegurai/codemirror-theme-cobalt2",
|
|
3
|
+
"version": "6.0.4",
|
|
3
4
|
"description": "Cobalt2 theme for the CodeMirror editor",
|
|
4
|
-
"version": "6.0.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
7
|
+
"module": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
7
9
|
"exports": {
|
|
8
10
|
"import": "./dist/index.js",
|
|
9
11
|
"require": "./dist/index.cjs"
|
|
10
12
|
},
|
|
11
|
-
"types": "dist/index.d.ts",
|
|
12
|
-
"module": "dist/index.js",
|
|
13
13
|
"sideEffects": false,
|
|
14
|
-
"scripts": {
|
|
15
|
-
"test": "cm-runtests",
|
|
16
|
-
"prepare": "cm-buildhelper src/index.ts"
|
|
17
|
-
},
|
|
18
14
|
"keywords": [
|
|
19
15
|
"editor",
|
|
20
16
|
"diff",
|
|
@@ -32,6 +28,10 @@
|
|
|
32
28
|
"url": "https://www.fsegurai.com/"
|
|
33
29
|
},
|
|
34
30
|
"license": "MIT",
|
|
31
|
+
"scripts": {
|
|
32
|
+
"pkg:build": "cm-buildhelper src/index.ts",
|
|
33
|
+
"pkg:test": "cm-runtests"
|
|
34
|
+
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@lezer/highlight": "^1.0.0",
|
|
37
37
|
"@codemirror/language": "^6.0.0",
|