@neo4j-cypher/react-codemirror 2.0.0-next.3 → 2.0.0-next.30

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.
Files changed (163) hide show
  1. package/CHANGELOG.md +257 -0
  2. package/README.md +3 -2
  3. package/dist/{types → src}/CypherEditor.d.ts +81 -3
  4. package/dist/src/CypherEditor.js +336 -0
  5. package/dist/src/CypherEditor.js.map +1 -0
  6. package/dist/src/CypherEditor.test.js +154 -0
  7. package/dist/src/CypherEditor.test.js.map +1 -0
  8. package/dist/src/constants.d.ts +1 -0
  9. package/dist/src/constants.js +2 -0
  10. package/dist/src/constants.js.map +1 -0
  11. package/dist/src/e2e_tests/autoCompletion.spec.js +332 -0
  12. package/dist/src/e2e_tests/autoCompletion.spec.js.map +1 -0
  13. package/dist/src/e2e_tests/configuration.spec.js +83 -0
  14. package/dist/src/e2e_tests/configuration.spec.js.map +1 -0
  15. package/dist/src/e2e_tests/debounce.spec.js +66 -0
  16. package/dist/src/e2e_tests/debounce.spec.js.map +1 -0
  17. package/dist/{types/e2e_tests/e2e-utils.d.ts → src/e2e_tests/e2eUtils.d.ts} +2 -0
  18. package/dist/src/e2e_tests/e2eUtils.js +79 -0
  19. package/dist/src/e2e_tests/e2eUtils.js.map +1 -0
  20. package/dist/src/e2e_tests/extraKeybindings.spec.js +43 -0
  21. package/dist/src/e2e_tests/extraKeybindings.spec.js.map +1 -0
  22. package/dist/src/e2e_tests/historyNavigation.spec.js +227 -0
  23. package/dist/src/e2e_tests/historyNavigation.spec.js.map +1 -0
  24. package/dist/src/e2e_tests/performanceTest.spec.d.ts +6 -0
  25. package/dist/src/e2e_tests/performanceTest.spec.js +97 -0
  26. package/dist/src/e2e_tests/performanceTest.spec.js.map +1 -0
  27. package/dist/src/e2e_tests/sanityChecks.spec.js +53 -0
  28. package/dist/src/e2e_tests/sanityChecks.spec.js.map +1 -0
  29. package/dist/src/e2e_tests/signatureHelp.spec.js +228 -0
  30. package/dist/src/e2e_tests/signatureHelp.spec.js.map +1 -0
  31. package/dist/src/e2e_tests/snippets.spec.js +62 -0
  32. package/dist/src/e2e_tests/snippets.spec.js.map +1 -0
  33. package/dist/src/e2e_tests/syntaxHighlighting.spec.d.ts +1 -0
  34. package/dist/src/e2e_tests/syntaxHighlighting.spec.js +90 -0
  35. package/dist/src/e2e_tests/syntaxHighlighting.spec.js.map +1 -0
  36. package/dist/src/e2e_tests/syntaxValidation.spec.d.ts +1 -0
  37. package/dist/src/e2e_tests/syntaxValidation.spec.js +126 -0
  38. package/dist/src/e2e_tests/syntaxValidation.spec.js.map +1 -0
  39. package/dist/src/historyNavigation.js +163 -0
  40. package/dist/src/historyNavigation.js.map +1 -0
  41. package/dist/{types → src}/icons.d.ts +1 -1
  42. package/dist/src/icons.js +62 -0
  43. package/dist/src/icons.js.map +1 -0
  44. package/dist/src/index.d.ts +4 -0
  45. package/dist/src/index.js +5 -0
  46. package/dist/src/index.js.map +1 -0
  47. package/dist/src/lang-cypher/autocomplete.d.ts +6 -0
  48. package/dist/src/lang-cypher/autocomplete.js +113 -0
  49. package/dist/src/lang-cypher/autocomplete.js.map +1 -0
  50. package/dist/{types → src}/lang-cypher/constants.d.ts +11 -0
  51. package/dist/src/lang-cypher/constants.js +69 -0
  52. package/dist/src/lang-cypher/constants.js.map +1 -0
  53. package/dist/src/lang-cypher/contants.test.d.ts +1 -0
  54. package/dist/src/lang-cypher/contants.test.js +103 -0
  55. package/dist/src/lang-cypher/contants.test.js.map +1 -0
  56. package/dist/src/lang-cypher/createCypherTheme.js +183 -0
  57. package/dist/src/lang-cypher/createCypherTheme.js.map +1 -0
  58. package/dist/src/lang-cypher/langCypher.d.ts +13 -0
  59. package/dist/src/lang-cypher/langCypher.js +23 -0
  60. package/dist/src/lang-cypher/langCypher.js.map +1 -0
  61. package/dist/src/lang-cypher/lintWorker.mjs +2022 -0
  62. package/dist/src/lang-cypher/parser-adapter.d.ts +19 -0
  63. package/dist/src/lang-cypher/parser-adapter.js +113 -0
  64. package/dist/src/lang-cypher/parser-adapter.js.map +1 -0
  65. package/dist/src/lang-cypher/signatureHelp.d.ts +4 -0
  66. package/dist/src/lang-cypher/signatureHelp.js +109 -0
  67. package/dist/src/lang-cypher/signatureHelp.js.map +1 -0
  68. package/dist/{types/lang-cypher/syntax-validation.d.ts → src/lang-cypher/syntaxValidation.d.ts} +2 -1
  69. package/dist/src/lang-cypher/syntaxValidation.js +57 -0
  70. package/dist/src/lang-cypher/syntaxValidation.js.map +1 -0
  71. package/dist/src/lang-cypher/themeIcons.js +22 -0
  72. package/dist/src/lang-cypher/themeIcons.js.map +1 -0
  73. package/dist/src/lang-cypher/utils.d.ts +2 -0
  74. package/dist/src/lang-cypher/utils.js +10 -0
  75. package/dist/src/lang-cypher/utils.js.map +1 -0
  76. package/dist/src/ndlTokensCopy.d.ts +570 -0
  77. package/dist/src/ndlTokensCopy.js +571 -0
  78. package/dist/src/ndlTokensCopy.js.map +1 -0
  79. package/dist/src/ndlTokensCopy.test.d.ts +1 -0
  80. package/dist/src/ndlTokensCopy.test.js +12 -0
  81. package/dist/src/ndlTokensCopy.test.js.map +1 -0
  82. package/dist/src/neo4jSetup.d.ts +6 -0
  83. package/dist/src/neo4jSetup.js +120 -0
  84. package/dist/src/neo4jSetup.js.map +1 -0
  85. package/dist/src/richClipboardCopier.d.ts +4 -0
  86. package/dist/src/richClipboardCopier.js +78 -0
  87. package/dist/src/richClipboardCopier.js.map +1 -0
  88. package/dist/src/richClipboardCopier.test.d.ts +1 -0
  89. package/dist/src/richClipboardCopier.test.js +53 -0
  90. package/dist/src/richClipboardCopier.test.js.map +1 -0
  91. package/dist/{types → src}/themes.d.ts +1 -1
  92. package/dist/src/themes.js +93 -0
  93. package/dist/src/themes.js.map +1 -0
  94. package/dist/tsconfig.tsbuildinfo +1 -0
  95. package/package.json +43 -41
  96. package/src/CypherEditor.test.tsx +204 -0
  97. package/src/CypherEditor.tsx +316 -42
  98. package/src/constants.ts +1 -0
  99. package/src/e2e_tests/autoCompletion.spec.tsx +571 -0
  100. package/src/e2e_tests/configuration.spec.tsx +111 -0
  101. package/src/e2e_tests/debounce.spec.tsx +106 -0
  102. package/src/e2e_tests/{e2e-utils.ts → e2eUtils.ts} +41 -3
  103. package/src/e2e_tests/{extra-keybindings.spec.tsx → extraKeybindings.spec.tsx} +1 -3
  104. package/src/e2e_tests/{history-navigation.spec.tsx → historyNavigation.spec.tsx} +137 -18
  105. package/src/e2e_tests/performanceTest.spec.tsx +163 -0
  106. package/src/e2e_tests/{sanity-checks.spec.tsx → sanityChecks.spec.tsx} +7 -22
  107. package/src/e2e_tests/signatureHelp.spec.tsx +444 -0
  108. package/src/e2e_tests/snippets.spec.tsx +92 -0
  109. package/src/e2e_tests/{syntax-highlighting.spec.tsx → syntaxHighlighting.spec.tsx} +26 -24
  110. package/src/e2e_tests/syntaxValidation.spec.tsx +259 -0
  111. package/src/{history-navigation.ts → historyNavigation.ts} +1 -1
  112. package/src/icons.ts +3 -0
  113. package/src/index.ts +2 -2
  114. package/src/lang-cypher/autocomplete.ts +99 -18
  115. package/src/lang-cypher/constants.ts +27 -0
  116. package/src/lang-cypher/contants.test.ts +6 -2
  117. package/src/lang-cypher/{create-cypher-theme.ts → createCypherTheme.ts} +45 -2
  118. package/src/lang-cypher/langCypher.ts +42 -0
  119. package/src/lang-cypher/lintWorker.mjs +2022 -0
  120. package/src/lang-cypher/parser-adapter.ts +145 -0
  121. package/src/lang-cypher/signatureHelp.ts +151 -0
  122. package/src/lang-cypher/syntaxValidation.ts +72 -0
  123. package/src/lang-cypher/utils.ts +9 -0
  124. package/src/{ndl-tokens-copy.test.ts → ndlTokensCopy.test.ts} +2 -1
  125. package/src/ndlTokensCopy.ts +570 -0
  126. package/src/{neo4j-setup.tsx → neo4jSetup.tsx} +78 -17
  127. package/src/richClipboardCopier.test.ts +65 -0
  128. package/src/richClipboardCopier.ts +99 -0
  129. package/src/themes.ts +45 -70
  130. package/src/viteEnv.d.ts +1 -0
  131. package/dist/cjs/index.cjs +0 -1440
  132. package/dist/cjs/index.cjs.map +0 -7
  133. package/dist/esm/index.mjs +0 -1463
  134. package/dist/esm/index.mjs.map +0 -7
  135. package/dist/types/e2e_tests/mock-data.d.ts +0 -3779
  136. package/dist/types/index.d.ts +0 -4
  137. package/dist/types/lang-cypher/ParserAdapter.d.ts +0 -14
  138. package/dist/types/lang-cypher/autocomplete.d.ts +0 -3
  139. package/dist/types/lang-cypher/lang-cypher.d.ts +0 -7
  140. package/dist/types/ndl-tokens-copy.d.ts +0 -379
  141. package/dist/types/neo4j-setup.d.ts +0 -2
  142. package/dist/types/tsconfig.tsbuildinfo +0 -1
  143. package/src/e2e_tests/auto-completion.spec.tsx +0 -232
  144. package/src/e2e_tests/mock-data.ts +0 -4310
  145. package/src/e2e_tests/performance-test.spec.tsx +0 -71
  146. package/src/e2e_tests/syntax-validation.spec.tsx +0 -156
  147. package/src/lang-cypher/ParserAdapter.ts +0 -92
  148. package/src/lang-cypher/lang-cypher.ts +0 -32
  149. package/src/lang-cypher/syntax-validation.ts +0 -24
  150. package/src/ndl-tokens-copy.ts +0 -379
  151. /package/dist/{types/e2e_tests/auto-completion.spec.d.ts → src/CypherEditor.test.d.ts} +0 -0
  152. /package/dist/{types/e2e_tests/extra-keybindings.spec.d.ts → src/e2e_tests/autoCompletion.spec.d.ts} +0 -0
  153. /package/dist/{types/e2e_tests/history-navigation.spec.d.ts → src/e2e_tests/configuration.spec.d.ts} +0 -0
  154. /package/dist/{types/e2e_tests/performance-test.spec.d.ts → src/e2e_tests/debounce.spec.d.ts} +0 -0
  155. /package/dist/{types/e2e_tests/sanity-checks.spec.d.ts → src/e2e_tests/extraKeybindings.spec.d.ts} +0 -0
  156. /package/dist/{types/e2e_tests/syntax-highlighting.spec.d.ts → src/e2e_tests/historyNavigation.spec.d.ts} +0 -0
  157. /package/dist/{types/e2e_tests/syntax-validation.spec.d.ts → src/e2e_tests/sanityChecks.spec.d.ts} +0 -0
  158. /package/dist/{types/lang-cypher/contants.test.d.ts → src/e2e_tests/signatureHelp.spec.d.ts} +0 -0
  159. /package/dist/{types/ndl-tokens-copy.test.d.ts → src/e2e_tests/snippets.spec.d.ts} +0 -0
  160. /package/dist/{types/history-navigation.d.ts → src/historyNavigation.d.ts} +0 -0
  161. /package/dist/{types/lang-cypher/create-cypher-theme.d.ts → src/lang-cypher/createCypherTheme.d.ts} +0 -0
  162. /package/dist/{types/lang-cypher/theme-icons.d.ts → src/lang-cypher/themeIcons.d.ts} +0 -0
  163. /package/src/lang-cypher/{theme-icons.ts → themeIcons.ts} +0 -0
@@ -0,0 +1,65 @@
1
+ // @vitest-environment jsdom
2
+ import { describe, it, expect, vi, beforeEach } from 'vitest';
3
+ import { EditorView } from '@codemirror/view';
4
+ import { getHTML, getCSSStyleForClass } from './richClipboardCopier';
5
+
6
+ function createStyleSheet(rules: string): CSSStyleSheet {
7
+ const styleEl = document.createElement('style');
8
+ styleEl.textContent = rules;
9
+ document.head.appendChild(styleEl);
10
+ return styleEl.sheet;
11
+ }
12
+
13
+ describe('getCSSStyleForClass', () => {
14
+ beforeEach(() => {
15
+ document.head.innerHTML = '';
16
+ });
17
+
18
+ it('returns cssText for a given class', () => {
19
+ createStyleSheet('.foo { color: red; font-weight: bold; }');
20
+ const css = getCSSStyleForClass('foo');
21
+ expect(css).toContain('color: red');
22
+ expect(css).toContain('font-weight: bold');
23
+ });
24
+
25
+ it('returns empty string if no matching class exists', () => {
26
+ createStyleSheet('.bar { color: blue; }');
27
+ const css = getCSSStyleForClass('nonexistent');
28
+ expect(css).toBe('');
29
+ });
30
+ });
31
+
32
+ describe('getHTML', () => {
33
+ beforeEach(() => {
34
+ document.head.innerHTML = '';
35
+ });
36
+
37
+ it('wraps selected DOM content with monospace wrapper and inlines class styles', () => {
38
+ createStyleSheet(
39
+ '.foo { color: red; font-weight: bold; } .bar { background: yellow; }',
40
+ );
41
+
42
+ const div = document.createElement('div');
43
+ div.className = 'foo bar';
44
+ div.textContent = 'Hello';
45
+ const wrapper = document.createElement('div');
46
+ wrapper.appendChild(div);
47
+ document.body.appendChild(wrapper);
48
+
49
+ const mockView = {
50
+ domAtPos: vi.fn((pos: number) => ({
51
+ node: wrapper,
52
+ offset: pos === 0 ? 0 : 1,
53
+ })),
54
+ } as unknown as EditorView;
55
+
56
+ const html = getHTML(mockView, 0, 1);
57
+
58
+ expect(html).toContain('font-family: monospace;');
59
+ expect(html).toContain('color: red');
60
+ expect(html).toContain('font-weight: bold');
61
+ expect(html).toContain('background: yellow');
62
+ expect(html).not.toContain('class=');
63
+ expect(html).toContain('Hello');
64
+ });
65
+ });
@@ -0,0 +1,99 @@
1
+ import { EditorView } from '@codemirror/view';
2
+
3
+ export function getCSSStyleForClass(className: string): string {
4
+ return Array.from(document.styleSheets).reduce((cssText, sheet) => {
5
+ try {
6
+ const rules = sheet.cssRules ?? [];
7
+ for (const rule of Array.from(rules)) {
8
+ if (
9
+ rule instanceof CSSStyleRule &&
10
+ rule.selectorText
11
+ .split(',')
12
+ .some((sel) => sel.trim() === `.${className}`)
13
+ ) {
14
+ cssText += rule.style.cssText;
15
+ }
16
+ }
17
+ } catch {
18
+ // Ignore CORS-protected stylesheets
19
+ }
20
+ return cssText;
21
+ }, '');
22
+ }
23
+
24
+ function replaceClassWithStyle(element: HTMLElement): void {
25
+ const classNames = element.className.split(/\s+/).filter(Boolean);
26
+ const computed = getComputedStyle(element);
27
+
28
+ let styleText = computed.color ? `color: ${computed.color};` : '';
29
+
30
+ for (const cls of classNames) {
31
+ styleText += getCSSStyleForClass(cls);
32
+ }
33
+
34
+ if (styleText) {
35
+ element.setAttribute('style', styleText);
36
+ }
37
+
38
+ element.removeAttribute('class');
39
+ }
40
+
41
+ export function getHTML(view: EditorView, from: number, to: number): string {
42
+ const range = document.createRange();
43
+ const fromInfo = view.domAtPos(from);
44
+ const toInfo = view.domAtPos(to);
45
+
46
+ range.setStart(fromInfo.node, fromInfo.offset);
47
+ range.setEnd(toInfo.node, toInfo.offset);
48
+
49
+ const commonAncestor = range.commonAncestorContainer;
50
+ const wrapperElement =
51
+ commonAncestor instanceof Text
52
+ ? commonAncestor.parentElement
53
+ : (commonAncestor as HTMLElement);
54
+
55
+ const wrapper = document.createElement('div');
56
+
57
+ if (wrapperElement) {
58
+ const style = wrapperElement.getAttribute('style');
59
+ const cls = wrapperElement.getAttribute('class');
60
+ if (style) wrapper.setAttribute('style', style);
61
+ if (cls) wrapper.setAttribute('class', cls);
62
+ }
63
+
64
+ wrapper.appendChild(range.cloneContents());
65
+
66
+ replaceClassWithStyle(wrapper);
67
+ wrapper
68
+ .querySelectorAll<HTMLElement>('[class]')
69
+ .forEach(replaceClassWithStyle);
70
+
71
+ const editorElement = document.querySelector('.cm-editor');
72
+ const editorStyles = editorElement ? getComputedStyle(editorElement) : null;
73
+
74
+ return `<div style="font-family: monospace; ${
75
+ editorStyles?.color ? `color: ${editorStyles.color};` : ''
76
+ } ${
77
+ editorStyles?.backgroundColor
78
+ ? `background-color: ${editorStyles.backgroundColor};`
79
+ : ''
80
+ }">${wrapper.outerHTML}</div>`;
81
+ }
82
+
83
+ export const richClipboardCopier = EditorView.domEventHandlers({
84
+ copy: (event, view) => {
85
+ event.preventDefault();
86
+
87
+ const { from, to } = view.state.selection.main;
88
+ const selectedText = view.state.doc.sliceString(from, to);
89
+
90
+ if (!selectedText) return;
91
+
92
+ if (event.clipboardData) {
93
+ event.clipboardData.setData('text/plain', selectedText);
94
+ if (selectedText.length < 1000) {
95
+ event.clipboardData.setData('text/html', getHTML(view, from, to));
96
+ }
97
+ }
98
+ },
99
+ });
package/src/themes.ts CHANGED
@@ -1,37 +1,18 @@
1
1
  import { Extension } from '@codemirror/state';
2
- import { light, mirage } from 'ayu';
3
2
  import {
4
3
  createCypherTheme,
5
4
  ThemeOptions,
6
- } from './lang-cypher/create-cypher-theme';
7
- import { tokens } from './ndl-tokens-copy';
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
- };
5
+ } from './lang-cypher/createCypherTheme';
6
+ import { tokens } from './ndlTokensCopy';
26
7
 
27
8
  export const lightThemeConstants: ThemeOptions = {
28
9
  dark: false,
29
10
  editorSettings: {
30
- background: light.editor.bg.hex(),
31
- foreground: light.editor.fg.hex(),
32
- gutterForeground: light.editor.gutter.normal.hex(),
33
- selection: light.editor.selection.active.hex(),
34
- textMatchingSelection: light.editor.findMatch.active.hex(),
11
+ background: '#FEFEFE',
12
+ foreground: '#545454',
13
+ gutterForeground: '#a3a7ae',
14
+ selection: tokens.colors.neutral['20'],
15
+ textMatchingSelection: tokens.colors.lavender['15'],
35
16
  cursor: '#000000',
36
17
  autoCompletionPanel: {
37
18
  selectedColor: '#cce2ff',
@@ -39,68 +20,62 @@ export const lightThemeConstants: ThemeOptions = {
39
20
  backgroundColor: '#F3F4F5',
40
21
  },
41
22
  searchPanel: {
42
- background: tokens.palette.light.neutral.bg.default,
43
- text: tokens.palette.light.neutral.text.default,
44
- buttonHoverBackground: tokens.palette.light.neutral.bg.strong,
23
+ background: '#FEFEFE',
24
+ text: '#545454',
25
+ buttonHoverBackground: tokens.theme.light.palette.neutral.bg.strong,
45
26
  },
46
27
  },
47
28
  highlightStyles: {
48
- comment: light.syntax.comment.hex(),
49
- keyword: light.syntax.keyword.hex(),
50
- keywordLiteral: light.syntax.keyword.hex(),
51
- label: light.syntax.markup.hex(),
52
- predicateFunction: light.syntax.func.hex(),
53
- function: light.syntax.func.hex(),
54
- procedure: light.syntax.func.hex(),
55
- stringLiteral: light.syntax.string.hex(),
56
- numberLiteral: light.syntax.constant.hex(),
57
- booleanLiteral: light.syntax.constant.hex(),
58
- operator: light.syntax.operator.hex(),
59
- property: light.syntax.tag.hex(),
60
- paramDollar: light.syntax.regexp.hex(),
61
- paramValue: light.syntax.regexp.hex(),
62
- namespace: light.syntax.special.hex(),
29
+ comment: tokens.palette.code.light.comment,
30
+ keyword: tokens.palette.code.light.keyword,
31
+ keywordLiteral: tokens.palette.code.light.keywordLiteral,
32
+ label: tokens.palette.code.light.label,
33
+ predicateFunction: tokens.palette.code.light.predicateFunction,
34
+ function: tokens.palette.code.light.function,
35
+ procedure: tokens.palette.code.light.procedure,
36
+ stringLiteral: tokens.palette.code.light.stringLiteral,
37
+ numberLiteral: tokens.palette.code.light.numberLiteral,
38
+ booleanLiteral: tokens.palette.code.light.booleanLiteral,
39
+ operator: tokens.palette.code.light.operator,
40
+ property: tokens.palette.code.light.property,
41
+ paramValue: tokens.palette.code.light.paramValue,
63
42
  },
64
43
  };
65
44
 
66
45
  export const darkThemeConstants: ThemeOptions = {
67
46
  dark: true,
68
47
  editorSettings: {
69
- background: mirage.editor.bg.hex(),
70
- foreground: mirage.editor.fg.hex(),
71
- gutterForeground: mirage.editor.gutter.normal.hex(),
72
- selection: mirage.editor.selection.active.hex(),
73
- textMatchingSelection: mirage.editor.findMatch.active.hex(),
74
- cursor: '#ffffff',
48
+ background: '#242936',
49
+ foreground: '#cccac2',
50
+ gutterForeground: '#8a919966',
51
+ selection: '#409fff40',
52
+ textMatchingSelection: '#695380',
53
+ cursor: tokens.colors.neutral['10'],
75
54
  autoCompletionPanel: {
76
55
  selectedColor: '#062f4a',
77
56
  matchingTextColor: '#0097fb',
78
57
  backgroundColor: '#1C212B',
79
58
  },
80
59
  searchPanel: {
81
- background: convertToHex(tokens.palette.dark.neutral.bg.default),
82
- text: convertToHex(tokens.palette.dark.neutral.text.default),
83
- buttonHoverBackground: convertToHex(
84
- tokens.palette.dark.neutral.bg.strong,
85
- ),
60
+ background: tokens.theme.dark.palette.neutral.bg.default,
61
+ text: tokens.theme.dark.palette.neutral.text.default,
62
+ buttonHoverBackground: tokens.theme.dark.palette.neutral.bg.strong,
86
63
  },
87
64
  },
88
65
  highlightStyles: {
89
- comment: mirage.syntax.comment.hex(),
90
- keyword: mirage.syntax.keyword.hex(),
91
- keywordLiteral: mirage.syntax.keyword.hex(),
92
- label: mirage.syntax.markup.hex(),
93
- predicateFunction: mirage.syntax.func.hex(),
94
- function: mirage.syntax.func.hex(),
95
- procedure: mirage.syntax.func.hex(),
96
- stringLiteral: mirage.syntax.string.hex(),
97
- numberLiteral: mirage.syntax.constant.hex(),
98
- booleanLiteral: mirage.syntax.constant.hex(),
99
- operator: mirage.syntax.operator.hex(),
100
- property: mirage.syntax.tag.hex(),
101
- paramDollar: mirage.syntax.regexp.hex(),
102
- paramValue: mirage.syntax.regexp.hex(),
103
- namespace: mirage.syntax.special.hex(),
66
+ comment: tokens.palette.code.dark.comment,
67
+ keyword: tokens.palette.code.dark.keyword,
68
+ keywordLiteral: tokens.palette.code.dark.keywordLiteral,
69
+ label: tokens.palette.code.dark.label,
70
+ predicateFunction: tokens.palette.code.dark.predicateFunction,
71
+ function: tokens.palette.code.dark.function,
72
+ procedure: tokens.palette.code.dark.procedure,
73
+ stringLiteral: tokens.palette.code.dark.stringLiteral,
74
+ numberLiteral: tokens.palette.code.dark.numberLiteral,
75
+ booleanLiteral: tokens.palette.code.dark.booleanLiteral,
76
+ operator: tokens.palette.code.dark.operator,
77
+ property: tokens.palette.code.dark.property,
78
+ paramValue: tokens.palette.code.dark.paramValue,
104
79
  },
105
80
  };
106
81
 
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />