@neo4j-cypher/react-codemirror 2.0.0-next.13 → 2.0.0-next.15
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/CHANGELOG.md +18 -0
- package/dist/e2e_tests/performanceTest.spec.js +2 -1
- package/dist/e2e_tests/performanceTest.spec.js.map +1 -1
- package/dist/e2e_tests/syntaxHighlighting.spec.js +21 -21
- package/dist/e2e_tests/syntaxHighlighting.spec.js.map +1 -1
- package/dist/e2e_tests/syntaxValidation.spec.js +8 -0
- package/dist/e2e_tests/syntaxValidation.spec.js.map +1 -1
- package/dist/ndlTokensCopy.d.ts +415 -256
- package/dist/ndlTokensCopy.js +458 -299
- package/dist/ndlTokensCopy.js.map +1 -1
- package/dist/themes.js +25 -42
- package/dist/themes.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/e2e_tests/performanceTest.spec.tsx +6 -1
- package/src/e2e_tests/syntaxHighlighting.spec.tsx +25 -21
- package/src/e2e_tests/syntaxValidation.spec.tsx +15 -0
- package/src/ndlTokensCopy.ts +458 -299
- package/src/themes.ts +25 -48
package/src/themes.ts
CHANGED
|
@@ -1,37 +1,19 @@
|
|
|
1
1
|
import { Extension } from '@codemirror/state';
|
|
2
|
-
import {
|
|
2
|
+
import { mirage } from 'ayu';
|
|
3
3
|
import {
|
|
4
4
|
createCypherTheme,
|
|
5
5
|
ThemeOptions,
|
|
6
6
|
} from './lang-cypher/createCypherTheme';
|
|
7
7
|
import { tokens } from './ndlTokensCopy';
|
|
8
8
|
|
|
9
|
-
/* ndl exports most tokens as hex colors but some tokens are exported as rgb colors, in the form of "10, 20, 30"
|
|
10
|
-
This should be fixed in version 2 of ndl.
|
|
11
|
-
Meanwhile we can use this function */
|
|
12
|
-
const convertToHex = (color: string) => {
|
|
13
|
-
if (color.startsWith('#')) {
|
|
14
|
-
return color;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const rgb = color.match(/\d+/g);
|
|
18
|
-
if (!rgb) {
|
|
19
|
-
return color;
|
|
20
|
-
}
|
|
21
|
-
const [r, g, b] = rgb;
|
|
22
|
-
return `#${Number(r).toString(16)}${Number(g).toString(16)}${Number(
|
|
23
|
-
b,
|
|
24
|
-
).toString(16)}`;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
9
|
export const lightThemeConstants: ThemeOptions = {
|
|
28
10
|
dark: false,
|
|
29
11
|
editorSettings: {
|
|
30
|
-
background:
|
|
31
|
-
foreground:
|
|
32
|
-
gutterForeground:
|
|
33
|
-
selection:
|
|
34
|
-
textMatchingSelection:
|
|
12
|
+
background: '#FEFEFE',
|
|
13
|
+
foreground: '#545454',
|
|
14
|
+
gutterForeground: '#a3a7ae',
|
|
15
|
+
selection: tokens.colors.neutral['20'],
|
|
16
|
+
textMatchingSelection: tokens.colors.lavender['15'],
|
|
35
17
|
cursor: '#000000',
|
|
36
18
|
autoCompletionPanel: {
|
|
37
19
|
selectedColor: '#cce2ff',
|
|
@@ -39,28 +21,25 @@ export const lightThemeConstants: ThemeOptions = {
|
|
|
39
21
|
backgroundColor: '#F3F4F5',
|
|
40
22
|
},
|
|
41
23
|
searchPanel: {
|
|
42
|
-
background:
|
|
43
|
-
text:
|
|
44
|
-
buttonHoverBackground: tokens.
|
|
24
|
+
background: '#FEFEFE',
|
|
25
|
+
text: '#545454',
|
|
26
|
+
buttonHoverBackground: tokens.theme.light.palette.neutral.bg.strong,
|
|
45
27
|
},
|
|
46
28
|
},
|
|
47
29
|
highlightStyles: {
|
|
48
|
-
comment:
|
|
49
|
-
keyword:
|
|
50
|
-
keywordLiteral:
|
|
51
|
-
label:
|
|
52
|
-
predicateFunction:
|
|
53
|
-
function:
|
|
54
|
-
procedure:
|
|
55
|
-
stringLiteral:
|
|
56
|
-
numberLiteral:
|
|
57
|
-
booleanLiteral:
|
|
58
|
-
operator:
|
|
59
|
-
property:
|
|
60
|
-
|
|
61
|
-
paramValue: light.syntax.regexp.hex(),
|
|
62
|
-
namespace: light.syntax.special.hex(),
|
|
63
|
-
consoleCommand: light.editor.fg.hex(),
|
|
30
|
+
comment: '#a3a7ae',
|
|
31
|
+
keyword: '#008561',
|
|
32
|
+
keywordLiteral: '#008561',
|
|
33
|
+
label: '#de064e',
|
|
34
|
+
predicateFunction: '#0177b8',
|
|
35
|
+
function: '#0177b8',
|
|
36
|
+
procedure: '#0177b8',
|
|
37
|
+
stringLiteral: '#8c6b41',
|
|
38
|
+
numberLiteral: '#9a4fcb',
|
|
39
|
+
booleanLiteral: '#9a4fcb',
|
|
40
|
+
operator: '#008561',
|
|
41
|
+
property: '#0055ae',
|
|
42
|
+
paramValue: '#9a4fcb',
|
|
64
43
|
},
|
|
65
44
|
};
|
|
66
45
|
|
|
@@ -79,11 +58,9 @@ export const darkThemeConstants: ThemeOptions = {
|
|
|
79
58
|
backgroundColor: '#1C212B',
|
|
80
59
|
},
|
|
81
60
|
searchPanel: {
|
|
82
|
-
background:
|
|
83
|
-
text:
|
|
84
|
-
buttonHoverBackground:
|
|
85
|
-
tokens.palette.dark.neutral.bg.strong,
|
|
86
|
-
),
|
|
61
|
+
background: tokens.theme.dark.palette.neutral.bg.default,
|
|
62
|
+
text: tokens.theme.dark.palette.neutral.text.default,
|
|
63
|
+
buttonHoverBackground: tokens.theme.dark.palette.neutral.bg.strong,
|
|
87
64
|
},
|
|
88
65
|
},
|
|
89
66
|
highlightStyles: {
|