@uiw/codemirror-theme-sublime 4.9.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/README.md ADDED
@@ -0,0 +1,67 @@
1
+ <!--rehype:ignore:start-->
2
+
3
+ # Sublime Theme
4
+
5
+ <!--rehype:ignore:end-->
6
+
7
+ [![npm version](https://img.shields.io/npm/v/@uiw/codemirror-theme-sublime.svg)](https://www.npmjs.com/package/@uiw/codemirror-theme-sublime)
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ npm install @uiw/codemirror-theme-sublime --save
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ```jsx
18
+ import CodeMirror from '@uiw/react-codemirror';
19
+ import { sublime } from '@uiw/codemirror-theme-sublime';
20
+ import { javascript } from '@codemirror/lang-javascript';
21
+
22
+ function App() {
23
+ return (
24
+ <CodeMirror
25
+ value="console.log('hello world!');"
26
+ height="200px"
27
+ theme={sublime}
28
+ extensions={[javascript({ jsx: true })]}
29
+ onChange={(value, viewUpdate) => {
30
+ console.log('value:', value);
31
+ }}
32
+ />
33
+ );
34
+ }
35
+ export default App;
36
+ ```
37
+
38
+ ```js
39
+ import { EditorView } from '@codemirror/view';
40
+ import { EditorState } from '@codemirror/state';
41
+ import { javascript } from '@codemirror/lang-javascript';
42
+ import { sublime } from '@uiw/codemirror-theme-sublime';
43
+
44
+ const state = EditorState.create({
45
+ doc: 'my source code',
46
+ extensions: [sublime, javascript({ jsx: true })],
47
+ });
48
+
49
+ const view = new EditorView({
50
+ parent: document.querySelector('#editor'),
51
+ state,
52
+ });
53
+ ```
54
+
55
+ ## Contributors
56
+
57
+ As always, thanks to our amazing contributors!
58
+
59
+ <a href="https://github.com/uiwjs/react-codemirror/graphs/contributors">
60
+ <img src="https://uiwjs.github.io/react-codemirror/CONTRIBUTORS.svg" />
61
+ </a>
62
+
63
+ Made with [github-action-contributors](https://github.com/jaywcjlove/github-action-contributors).
64
+
65
+ ## License
66
+
67
+ Licensed under the MIT License.
package/cjs/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare const sublime: import("@codemirror/state").Extension;
package/cjs/index.js ADDED
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.sublime = void 0;
7
+
8
+ var _highlight = require("@lezer/highlight");
9
+
10
+ var _codemirrorThemes = require("@uiw/codemirror-themes");
11
+
12
+ var sublime = (0, _codemirrorThemes.createTheme)({
13
+ theme: 'dark',
14
+ settings: {
15
+ background: '#303841',
16
+ foreground: '#FFFFFF',
17
+ caret: '#FBAC52',
18
+ selection: '#4C5964',
19
+ selectionMatch: '#3A546E',
20
+ gutterBackground: '#303841',
21
+ gutterForeground: '#FFFFFF70',
22
+ lineHighlight: '#00000059'
23
+ },
24
+ styles: [{
25
+ tag: _highlight.tags.comment,
26
+ color: '#A2A9B5'
27
+ }, {
28
+ tag: [_highlight.tags.attributeName, _highlight.tags.keyword],
29
+ color: '#B78FBA'
30
+ }, {
31
+ tag: _highlight.tags["function"](_highlight.tags.variableName),
32
+ color: '#5AB0B0'
33
+ }, {
34
+ tag: _highlight.tags.typeOperator,
35
+ color: 'red'
36
+ }, {
37
+ tag: [_highlight.tags.string, _highlight.tags.regexp, _highlight.tags.attributeValue],
38
+ color: '#99C592'
39
+ }, {
40
+ tag: _highlight.tags.operator,
41
+ color: '#f47954'
42
+ }, {
43
+ tag: [_highlight.tags.propertyName, _highlight.tags.typeName],
44
+ color: '#629ccd'
45
+ }, {
46
+ tag: [_highlight.tags.tagName],
47
+ color: '#E35F63'
48
+ }, {
49
+ tag: [_highlight.tags.number, _highlight.tags.definition(_highlight.tags.tagName), _highlight.tags.className, _highlight.tags.definition(_highlight.tags.variableName)],
50
+ color: '#fbac52'
51
+ }]
52
+ });
53
+ exports.sublime = sublime;
54
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,43 @@
1
+ {
2
+ "version": 3,
3
+ "names": [
4
+ "sublime",
5
+ "createTheme",
6
+ "theme",
7
+ "settings",
8
+ "background",
9
+ "foreground",
10
+ "caret",
11
+ "selection",
12
+ "selectionMatch",
13
+ "gutterBackground",
14
+ "gutterForeground",
15
+ "lineHighlight",
16
+ "styles",
17
+ "tag",
18
+ "t",
19
+ "comment",
20
+ "color",
21
+ "attributeName",
22
+ "keyword",
23
+ "variableName",
24
+ "typeOperator",
25
+ "string",
26
+ "regexp",
27
+ "attributeValue",
28
+ "operator",
29
+ "propertyName",
30
+ "typeName",
31
+ "tagName",
32
+ "number",
33
+ "definition",
34
+ "className"
35
+ ],
36
+ "sources": [
37
+ "../src/index.ts"
38
+ ],
39
+ "sourcesContent": [
40
+ "import { tags as t } from '@lezer/highlight';\nimport { createTheme } from '@uiw/codemirror-themes';\n\nexport const sublime = createTheme({\n theme: 'dark',\n settings: {\n background: '#303841',\n foreground: '#FFFFFF',\n caret: '#FBAC52',\n selection: '#4C5964',\n selectionMatch: '#3A546E',\n gutterBackground: '#303841',\n gutterForeground: '#FFFFFF70',\n lineHighlight: '#00000059',\n },\n styles: [\n { tag: t.comment, color: '#A2A9B5' },\n { tag: [t.attributeName, t.keyword], color: '#B78FBA' },\n { tag: t.function(t.variableName), color: '#5AB0B0' },\n { tag: t.typeOperator, color: 'red' },\n { tag: [t.string, t.regexp, t.attributeValue], color: '#99C592' },\n { tag: t.operator, color: '#f47954' },\n { tag: [t.propertyName, t.typeName], color: '#629ccd' },\n { tag: [t.tagName], color: '#E35F63' },\n { tag: [t.number, t.definition(t.tagName), t.className, t.definition(t.variableName)], color: '#fbac52' },\n ],\n});\n"
41
+ ],
42
+ "mappings": ";;;;;;;AAAA;;AACA;;AAEO,IAAMA,OAAO,GAAG,IAAAC,6BAAA,EAAY;EACjCC,KAAK,EAAE,MAD0B;EAEjCC,QAAQ,EAAE;IACRC,UAAU,EAAE,SADJ;IAERC,UAAU,EAAE,SAFJ;IAGRC,KAAK,EAAE,SAHC;IAIRC,SAAS,EAAE,SAJH;I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 @@
1
+ export declare const sublime: import("@codemirror/state").Extension;
package/esm/index.js ADDED
@@ -0,0 +1,44 @@
1
+ import { tags as t } from '@lezer/highlight';
2
+ import { createTheme } from '@uiw/codemirror-themes';
3
+ export var sublime = createTheme({
4
+ theme: 'dark',
5
+ settings: {
6
+ background: '#303841',
7
+ foreground: '#FFFFFF',
8
+ caret: '#FBAC52',
9
+ selection: '#4C5964',
10
+ selectionMatch: '#3A546E',
11
+ gutterBackground: '#303841',
12
+ gutterForeground: '#FFFFFF70',
13
+ lineHighlight: '#00000059'
14
+ },
15
+ styles: [{
16
+ tag: t.comment,
17
+ color: '#A2A9B5'
18
+ }, {
19
+ tag: [t.attributeName, t.keyword],
20
+ color: '#B78FBA'
21
+ }, {
22
+ tag: t.function(t.variableName),
23
+ color: '#5AB0B0'
24
+ }, {
25
+ tag: t.typeOperator,
26
+ color: 'red'
27
+ }, {
28
+ tag: [t.string, t.regexp, t.attributeValue],
29
+ color: '#99C592'
30
+ }, {
31
+ tag: t.operator,
32
+ color: '#f47954'
33
+ }, {
34
+ tag: [t.propertyName, t.typeName],
35
+ color: '#629ccd'
36
+ }, {
37
+ tag: [t.tagName],
38
+ color: '#E35F63'
39
+ }, {
40
+ tag: [t.number, t.definition(t.tagName), t.className, t.definition(t.variableName)],
41
+ color: '#fbac52'
42
+ }]
43
+ });
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,45 @@
1
+ {
2
+ "version": 3,
3
+ "names": [
4
+ "tags",
5
+ "t",
6
+ "createTheme",
7
+ "sublime",
8
+ "theme",
9
+ "settings",
10
+ "background",
11
+ "foreground",
12
+ "caret",
13
+ "selection",
14
+ "selectionMatch",
15
+ "gutterBackground",
16
+ "gutterForeground",
17
+ "lineHighlight",
18
+ "styles",
19
+ "tag",
20
+ "comment",
21
+ "color",
22
+ "attributeName",
23
+ "keyword",
24
+ "function",
25
+ "variableName",
26
+ "typeOperator",
27
+ "string",
28
+ "regexp",
29
+ "attributeValue",
30
+ "operator",
31
+ "propertyName",
32
+ "typeName",
33
+ "tagName",
34
+ "number",
35
+ "definition",
36
+ "className"
37
+ ],
38
+ "sources": [
39
+ "../src/index.ts"
40
+ ],
41
+ "sourcesContent": [
42
+ "import { tags as t } from '@lezer/highlight';\nimport { createTheme } from '@uiw/codemirror-themes';\n\nexport const sublime = createTheme({\n theme: 'dark',\n settings: {\n background: '#303841',\n foreground: '#FFFFFF',\n caret: '#FBAC52',\n selection: '#4C5964',\n selectionMatch: '#3A546E',\n gutterBackground: '#303841',\n gutterForeground: '#FFFFFF70',\n lineHighlight: '#00000059',\n },\n styles: [\n { tag: t.comment, color: '#A2A9B5' },\n { tag: [t.attributeName, t.keyword], color: '#B78FBA' },\n { tag: t.function(t.variableName), color: '#5AB0B0' },\n { tag: t.typeOperator, color: 'red' },\n { tag: [t.string, t.regexp, t.attributeValue], color: '#99C592' },\n { tag: t.operator, color: '#f47954' },\n { tag: [t.propertyName, t.typeName], color: '#629ccd' },\n { tag: [t.tagName], color: '#E35F63' },\n { tag: [t.number, t.definition(t.tagName), t.className, t.definition(t.variableName)], color: '#fbac52' },\n ],\n});\n"
43
+ ],
44
+ "mappings": "AAAA,SAASA,IAAI,IAAIC,CAAjB,QAA0B,kBAA1B;AACA,SAASC,WAAT,QAA4B,wBAA5B;AAEA,OAAO,IAAMC,OAAO,GAAGD,WAAW,CAAC;EACjCE,KAAK,EAAE,MAD0B;EAEjCC,QAAQ,EAAE;IACRC,UAAU,EAAE,SADJ;IAERC,UAAU,EAAE,SAFJ;IAGRC,KAAK,EAAE,SAHC;IAIRC,SAAS,EAAE,SAJH;IAKRC,cAAc,EAAE,SALR;IAMRC,gBAAgB,EAAE,SANV;IAORC,gBAAgB,EAAE,WAPV;IAQRC,aAAa,EAAE;EARP,CAFuB;EAYjCC,MAAM,EAAE,CACN;IAAEC,GAAG,EAAEd,CAAC,CAACe,OAAT;IAAkBC,KAAK,EAAE;EAAzB,CADM,EAEN;IAAEF,GAAG,EAAE,CAACd,CAAC,CAACiB,aAAH,EAAkBjB,CAAC,CAACkB,OAApB,CAAP;IAAqCF,KAAK,EAAE;EAA5C,CAFM,EAGN;IAAEF,GAAG,EAAEd,CAAC,CAACmB,QAAF,CAAWnB,CAAC,CAACoB,YAAb,CAAP;IAAmCJ,KAAK,EAAE;EAA1C,CAHM,EAIN;IAAEF,GAAG,EAAEd,CAAC,CAACqB,YAAT;IAAuBL,KAAK,EAAE;EAA9B,CAJM,EAKN;IAAEF,GAAG,EAAE,CAACd,CAAC,CAACsB,MAAH,EAAWtB,CAAC,CAACuB,MAAb,EAAqBvB,CAAC,CAACwB,cAAvB,CAAP;IAA+CR,KAAK,EAAE;EAAtD,CALM,EAMN;IAAEF,GAAG,EAAEd,CAAC,CAACyB,QAAT;IAAmBT,KAAK,EAAE;EAA1B,CANM,EAON;IAAEF,GAAG,EAAE,CAACd,CAAC,CAAC0B,YAAH,EAAiB1B,CAAC,CAAC2B,QAAnB,CAAP;IAAqCX,KAAK,EAAE;EAA5C,CAPM,EAQN;IAAEF,GAAG,EAAE,CAACd,CAAC,CAAC4B,OAAH,CAAP;IAAoBZ,KAAK,EAAE;EAA3B,CARM,EASN;IAAEF,GAAG,EAAE,CAACd,CAAC,CAAC6B,MAAH,EAAW7B,CAAC,CAAC8B,UAAF,CAAa9B,CAAC,CAAC4B,OAAf,CAAX,EAAoC5B,CAAC,CAAC+B,SAAtC,EAAiD/B,CAAC,CAAC8B,UAAF,CAAa9B,CAAC,CAACoB,YAAf,CAAjD,CAAP;IAAuFJ,KAAK,EAAE;EAA9F,CATM;AAZyB,CAAD,CAA3B"
45
+ }
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@uiw/codemirror-theme-sublime",
3
+ "version": "4.9.4",
4
+ "description": "Theme sublime for CodeMirror.",
5
+ "homepage": "https://uiwjs.github.io/react-codemirror/#/theme/data/sublime",
6
+ "author": "kenny wong <wowohoo@qq.com>",
7
+ "license": "MIT",
8
+ "main": "./cjs/index.js",
9
+ "module": "./esm/index.js",
10
+ "scripts": {
11
+ "watch": "tsbb watch",
12
+ "build": "tsbb build"
13
+ },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "https://github.com/uiwjs/react-codemirror.git"
17
+ },
18
+ "files": [
19
+ "src",
20
+ "esm",
21
+ "cjs"
22
+ ],
23
+ "dependencies": {
24
+ "@uiw/codemirror-themes": "4.9.4"
25
+ },
26
+ "keywords": [
27
+ "codemirror",
28
+ "codemirror6",
29
+ "theme",
30
+ "sublime",
31
+ "syntax",
32
+ "ide",
33
+ "code"
34
+ ],
35
+ "jest": {
36
+ "coverageReporters": [
37
+ "lcov",
38
+ "json-summary"
39
+ ]
40
+ }
41
+ }
package/src/index.ts ADDED
@@ -0,0 +1,27 @@
1
+ import { tags as t } from '@lezer/highlight';
2
+ import { createTheme } from '@uiw/codemirror-themes';
3
+
4
+ export const sublime = createTheme({
5
+ theme: 'dark',
6
+ settings: {
7
+ background: '#303841',
8
+ foreground: '#FFFFFF',
9
+ caret: '#FBAC52',
10
+ selection: '#4C5964',
11
+ selectionMatch: '#3A546E',
12
+ gutterBackground: '#303841',
13
+ gutterForeground: '#FFFFFF70',
14
+ lineHighlight: '#00000059',
15
+ },
16
+ styles: [
17
+ { tag: t.comment, color: '#A2A9B5' },
18
+ { tag: [t.attributeName, t.keyword], color: '#B78FBA' },
19
+ { tag: t.function(t.variableName), color: '#5AB0B0' },
20
+ { tag: t.typeOperator, color: 'red' },
21
+ { tag: [t.string, t.regexp, t.attributeValue], color: '#99C592' },
22
+ { tag: t.operator, color: '#f47954' },
23
+ { tag: [t.propertyName, t.typeName], color: '#629ccd' },
24
+ { tag: [t.tagName], color: '#E35F63' },
25
+ { tag: [t.number, t.definition(t.tagName), t.className, t.definition(t.variableName)], color: '#fbac52' },
26
+ ],
27
+ });