@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.
- package/CHANGELOG.md +257 -0
- package/README.md +3 -2
- package/dist/{types → src}/CypherEditor.d.ts +81 -3
- package/dist/src/CypherEditor.js +336 -0
- package/dist/src/CypherEditor.js.map +1 -0
- package/dist/src/CypherEditor.test.js +154 -0
- package/dist/src/CypherEditor.test.js.map +1 -0
- package/dist/src/constants.d.ts +1 -0
- package/dist/src/constants.js +2 -0
- package/dist/src/constants.js.map +1 -0
- package/dist/src/e2e_tests/autoCompletion.spec.js +332 -0
- package/dist/src/e2e_tests/autoCompletion.spec.js.map +1 -0
- package/dist/src/e2e_tests/configuration.spec.js +83 -0
- package/dist/src/e2e_tests/configuration.spec.js.map +1 -0
- package/dist/src/e2e_tests/debounce.spec.js +66 -0
- package/dist/src/e2e_tests/debounce.spec.js.map +1 -0
- package/dist/{types/e2e_tests/e2e-utils.d.ts → src/e2e_tests/e2eUtils.d.ts} +2 -0
- package/dist/src/e2e_tests/e2eUtils.js +79 -0
- package/dist/src/e2e_tests/e2eUtils.js.map +1 -0
- package/dist/src/e2e_tests/extraKeybindings.spec.js +43 -0
- package/dist/src/e2e_tests/extraKeybindings.spec.js.map +1 -0
- package/dist/src/e2e_tests/historyNavigation.spec.js +227 -0
- package/dist/src/e2e_tests/historyNavigation.spec.js.map +1 -0
- package/dist/src/e2e_tests/performanceTest.spec.d.ts +6 -0
- package/dist/src/e2e_tests/performanceTest.spec.js +97 -0
- package/dist/src/e2e_tests/performanceTest.spec.js.map +1 -0
- package/dist/src/e2e_tests/sanityChecks.spec.js +53 -0
- package/dist/src/e2e_tests/sanityChecks.spec.js.map +1 -0
- package/dist/src/e2e_tests/signatureHelp.spec.js +228 -0
- package/dist/src/e2e_tests/signatureHelp.spec.js.map +1 -0
- package/dist/src/e2e_tests/snippets.spec.js +62 -0
- package/dist/src/e2e_tests/snippets.spec.js.map +1 -0
- package/dist/src/e2e_tests/syntaxHighlighting.spec.d.ts +1 -0
- package/dist/src/e2e_tests/syntaxHighlighting.spec.js +90 -0
- package/dist/src/e2e_tests/syntaxHighlighting.spec.js.map +1 -0
- package/dist/src/e2e_tests/syntaxValidation.spec.d.ts +1 -0
- package/dist/src/e2e_tests/syntaxValidation.spec.js +126 -0
- package/dist/src/e2e_tests/syntaxValidation.spec.js.map +1 -0
- package/dist/src/historyNavigation.js +163 -0
- package/dist/src/historyNavigation.js.map +1 -0
- package/dist/{types → src}/icons.d.ts +1 -1
- package/dist/src/icons.js +62 -0
- package/dist/src/icons.js.map +1 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.js +5 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/lang-cypher/autocomplete.d.ts +6 -0
- package/dist/src/lang-cypher/autocomplete.js +113 -0
- package/dist/src/lang-cypher/autocomplete.js.map +1 -0
- package/dist/{types → src}/lang-cypher/constants.d.ts +11 -0
- package/dist/src/lang-cypher/constants.js +69 -0
- package/dist/src/lang-cypher/constants.js.map +1 -0
- package/dist/src/lang-cypher/contants.test.d.ts +1 -0
- package/dist/src/lang-cypher/contants.test.js +103 -0
- package/dist/src/lang-cypher/contants.test.js.map +1 -0
- package/dist/src/lang-cypher/createCypherTheme.js +183 -0
- package/dist/src/lang-cypher/createCypherTheme.js.map +1 -0
- package/dist/src/lang-cypher/langCypher.d.ts +13 -0
- package/dist/src/lang-cypher/langCypher.js +23 -0
- package/dist/src/lang-cypher/langCypher.js.map +1 -0
- package/dist/src/lang-cypher/lintWorker.mjs +2022 -0
- package/dist/src/lang-cypher/parser-adapter.d.ts +19 -0
- package/dist/src/lang-cypher/parser-adapter.js +113 -0
- package/dist/src/lang-cypher/parser-adapter.js.map +1 -0
- package/dist/src/lang-cypher/signatureHelp.d.ts +4 -0
- package/dist/src/lang-cypher/signatureHelp.js +109 -0
- package/dist/src/lang-cypher/signatureHelp.js.map +1 -0
- package/dist/{types/lang-cypher/syntax-validation.d.ts → src/lang-cypher/syntaxValidation.d.ts} +2 -1
- package/dist/src/lang-cypher/syntaxValidation.js +57 -0
- package/dist/src/lang-cypher/syntaxValidation.js.map +1 -0
- package/dist/src/lang-cypher/themeIcons.js +22 -0
- package/dist/src/lang-cypher/themeIcons.js.map +1 -0
- package/dist/src/lang-cypher/utils.d.ts +2 -0
- package/dist/src/lang-cypher/utils.js +10 -0
- package/dist/src/lang-cypher/utils.js.map +1 -0
- package/dist/src/ndlTokensCopy.d.ts +570 -0
- package/dist/src/ndlTokensCopy.js +571 -0
- package/dist/src/ndlTokensCopy.js.map +1 -0
- package/dist/src/ndlTokensCopy.test.d.ts +1 -0
- package/dist/src/ndlTokensCopy.test.js +12 -0
- package/dist/src/ndlTokensCopy.test.js.map +1 -0
- package/dist/src/neo4jSetup.d.ts +6 -0
- package/dist/src/neo4jSetup.js +120 -0
- package/dist/src/neo4jSetup.js.map +1 -0
- package/dist/src/richClipboardCopier.d.ts +4 -0
- package/dist/src/richClipboardCopier.js +78 -0
- package/dist/src/richClipboardCopier.js.map +1 -0
- package/dist/src/richClipboardCopier.test.d.ts +1 -0
- package/dist/src/richClipboardCopier.test.js +53 -0
- package/dist/src/richClipboardCopier.test.js.map +1 -0
- package/dist/{types → src}/themes.d.ts +1 -1
- package/dist/src/themes.js +93 -0
- package/dist/src/themes.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +43 -41
- package/src/CypherEditor.test.tsx +204 -0
- package/src/CypherEditor.tsx +316 -42
- package/src/constants.ts +1 -0
- package/src/e2e_tests/autoCompletion.spec.tsx +571 -0
- package/src/e2e_tests/configuration.spec.tsx +111 -0
- package/src/e2e_tests/debounce.spec.tsx +106 -0
- package/src/e2e_tests/{e2e-utils.ts → e2eUtils.ts} +41 -3
- package/src/e2e_tests/{extra-keybindings.spec.tsx → extraKeybindings.spec.tsx} +1 -3
- package/src/e2e_tests/{history-navigation.spec.tsx → historyNavigation.spec.tsx} +137 -18
- package/src/e2e_tests/performanceTest.spec.tsx +163 -0
- package/src/e2e_tests/{sanity-checks.spec.tsx → sanityChecks.spec.tsx} +7 -22
- package/src/e2e_tests/signatureHelp.spec.tsx +444 -0
- package/src/e2e_tests/snippets.spec.tsx +92 -0
- package/src/e2e_tests/{syntax-highlighting.spec.tsx → syntaxHighlighting.spec.tsx} +26 -24
- package/src/e2e_tests/syntaxValidation.spec.tsx +259 -0
- package/src/{history-navigation.ts → historyNavigation.ts} +1 -1
- package/src/icons.ts +3 -0
- package/src/index.ts +2 -2
- package/src/lang-cypher/autocomplete.ts +99 -18
- package/src/lang-cypher/constants.ts +27 -0
- package/src/lang-cypher/contants.test.ts +6 -2
- package/src/lang-cypher/{create-cypher-theme.ts → createCypherTheme.ts} +45 -2
- package/src/lang-cypher/langCypher.ts +42 -0
- package/src/lang-cypher/lintWorker.mjs +2022 -0
- package/src/lang-cypher/parser-adapter.ts +145 -0
- package/src/lang-cypher/signatureHelp.ts +151 -0
- package/src/lang-cypher/syntaxValidation.ts +72 -0
- package/src/lang-cypher/utils.ts +9 -0
- package/src/{ndl-tokens-copy.test.ts → ndlTokensCopy.test.ts} +2 -1
- package/src/ndlTokensCopy.ts +570 -0
- package/src/{neo4j-setup.tsx → neo4jSetup.tsx} +78 -17
- package/src/richClipboardCopier.test.ts +65 -0
- package/src/richClipboardCopier.ts +99 -0
- package/src/themes.ts +45 -70
- package/src/viteEnv.d.ts +1 -0
- package/dist/cjs/index.cjs +0 -1440
- package/dist/cjs/index.cjs.map +0 -7
- package/dist/esm/index.mjs +0 -1463
- package/dist/esm/index.mjs.map +0 -7
- package/dist/types/e2e_tests/mock-data.d.ts +0 -3779
- package/dist/types/index.d.ts +0 -4
- package/dist/types/lang-cypher/ParserAdapter.d.ts +0 -14
- package/dist/types/lang-cypher/autocomplete.d.ts +0 -3
- package/dist/types/lang-cypher/lang-cypher.d.ts +0 -7
- package/dist/types/ndl-tokens-copy.d.ts +0 -379
- package/dist/types/neo4j-setup.d.ts +0 -2
- package/dist/types/tsconfig.tsbuildinfo +0 -1
- package/src/e2e_tests/auto-completion.spec.tsx +0 -232
- package/src/e2e_tests/mock-data.ts +0 -4310
- package/src/e2e_tests/performance-test.spec.tsx +0 -71
- package/src/e2e_tests/syntax-validation.spec.tsx +0 -156
- package/src/lang-cypher/ParserAdapter.ts +0 -92
- package/src/lang-cypher/lang-cypher.ts +0 -32
- package/src/lang-cypher/syntax-validation.ts +0 -24
- package/src/ndl-tokens-copy.ts +0 -379
- /package/dist/{types/e2e_tests/auto-completion.spec.d.ts → src/CypherEditor.test.d.ts} +0 -0
- /package/dist/{types/e2e_tests/extra-keybindings.spec.d.ts → src/e2e_tests/autoCompletion.spec.d.ts} +0 -0
- /package/dist/{types/e2e_tests/history-navigation.spec.d.ts → src/e2e_tests/configuration.spec.d.ts} +0 -0
- /package/dist/{types/e2e_tests/performance-test.spec.d.ts → src/e2e_tests/debounce.spec.d.ts} +0 -0
- /package/dist/{types/e2e_tests/sanity-checks.spec.d.ts → src/e2e_tests/extraKeybindings.spec.d.ts} +0 -0
- /package/dist/{types/e2e_tests/syntax-highlighting.spec.d.ts → src/e2e_tests/historyNavigation.spec.d.ts} +0 -0
- /package/dist/{types/e2e_tests/syntax-validation.spec.d.ts → src/e2e_tests/sanityChecks.spec.d.ts} +0 -0
- /package/dist/{types/lang-cypher/contants.test.d.ts → src/e2e_tests/signatureHelp.spec.d.ts} +0 -0
- /package/dist/{types/ndl-tokens-copy.test.d.ts → src/e2e_tests/snippets.spec.d.ts} +0 -0
- /package/dist/{types/history-navigation.d.ts → src/historyNavigation.d.ts} +0 -0
- /package/dist/{types/lang-cypher/create-cypher-theme.d.ts → src/lang-cypher/createCypherTheme.d.ts} +0 -0
- /package/dist/{types/lang-cypher/theme-icons.d.ts → src/lang-cypher/themeIcons.d.ts} +0 -0
- /package/src/lang-cypher/{theme-icons.ts → themeIcons.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,262 @@
|
|
|
1
1
|
# @neo4j-cypher/react-codemirror
|
|
2
2
|
|
|
3
|
+
## 2.0.0-next.30
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [6a2a408]
|
|
8
|
+
- Updated dependencies [20b31b6]
|
|
9
|
+
- Updated dependencies [68d92a8]
|
|
10
|
+
- @neo4j-cypher/lint-worker@1.10.1-next.4
|
|
11
|
+
- @neo4j-cypher/language-support@2.0.0-next.27
|
|
12
|
+
|
|
13
|
+
## 2.0.0-next.29
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [8e8d7f1]
|
|
18
|
+
- Updated dependencies [808aa73]
|
|
19
|
+
- @neo4j-cypher/language-support@2.0.0-next.26
|
|
20
|
+
- @neo4j-cypher/lint-worker@1.10.1-next.3
|
|
21
|
+
|
|
22
|
+
## 2.0.0-next.28
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- Updated dependencies [b1e686e]
|
|
27
|
+
- @neo4j-cypher/language-support@2.0.0-next.25
|
|
28
|
+
- @neo4j-cypher/lint-worker@1.10.1-next.2
|
|
29
|
+
|
|
30
|
+
## 2.0.0-next.27
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- 86f5c55: adding rich clipboard copier to codemirror
|
|
35
|
+
- 5fdc6dd: Fixes faulty worker termination on big queries
|
|
36
|
+
- Updated dependencies [246d60c]
|
|
37
|
+
- Updated dependencies [8eacddd]
|
|
38
|
+
- Updated dependencies [3a29711]
|
|
39
|
+
- Updated dependencies [b9c0e9d]
|
|
40
|
+
- Updated dependencies [d77e8a1]
|
|
41
|
+
- Updated dependencies [5fdc6dd]
|
|
42
|
+
- Updated dependencies [7183c63]
|
|
43
|
+
- @neo4j-cypher/lint-worker@1.10.1-next.1
|
|
44
|
+
- @neo4j-cypher/language-support@2.0.0-next.24
|
|
45
|
+
|
|
46
|
+
## 2.0.0-next.26
|
|
47
|
+
|
|
48
|
+
### Patch Changes
|
|
49
|
+
|
|
50
|
+
- Updated dependencies [c065d85]
|
|
51
|
+
- @neo4j-cypher/language-support@2.0.0-next.23
|
|
52
|
+
- @neo4j-cypher/lint-worker@1.10.1-next.0
|
|
53
|
+
|
|
54
|
+
## 2.0.0-next.25
|
|
55
|
+
|
|
56
|
+
### Patch Changes
|
|
57
|
+
|
|
58
|
+
- d99368c: Ensures CRLF newlines are handled when setting editor value
|
|
59
|
+
- Updated dependencies [ed65ef3]
|
|
60
|
+
- Updated dependencies [7538cfd]
|
|
61
|
+
- Updated dependencies [c1fa91f]
|
|
62
|
+
- Updated dependencies [039d1c5]
|
|
63
|
+
- Updated dependencies [1ef063e]
|
|
64
|
+
- Updated dependencies [a38255f]
|
|
65
|
+
- Updated dependencies [c4f27c9]
|
|
66
|
+
- @neo4j-cypher/language-support@2.0.0-next.22
|
|
67
|
+
- @neo4j-cypher/lint-worker@0.1.0-next.0
|
|
68
|
+
|
|
69
|
+
## 2.0.0-next.24
|
|
70
|
+
|
|
71
|
+
### Patch Changes
|
|
72
|
+
|
|
73
|
+
- 8b03317: resetting z index for cm panels
|
|
74
|
+
- Updated dependencies [4b0ee37]
|
|
75
|
+
- @neo4j-cypher/language-support@2.0.0-next.21
|
|
76
|
+
- @neo4j-cypher/lint-worker@2025.4.1-next.0
|
|
77
|
+
|
|
78
|
+
## 2.0.0-next.23
|
|
79
|
+
|
|
80
|
+
### Patch Changes
|
|
81
|
+
|
|
82
|
+
- Updated dependencies [013e4ff]
|
|
83
|
+
- @neo4j-cypher/language-support@2.0.0-next.20
|
|
84
|
+
|
|
85
|
+
## 2.0.0-next.22
|
|
86
|
+
|
|
87
|
+
### Patch Changes
|
|
88
|
+
|
|
89
|
+
- 5bfdac2: restructure packages as part of move to pnpm
|
|
90
|
+
- Updated dependencies [88e4930]
|
|
91
|
+
- Updated dependencies [5bfdac2]
|
|
92
|
+
- @neo4j-cypher/language-support@2.0.0-next.19
|
|
93
|
+
|
|
94
|
+
## 2.0.0-next.21
|
|
95
|
+
|
|
96
|
+
### Patch Changes
|
|
97
|
+
|
|
98
|
+
- Updated dependencies [1b971aa]
|
|
99
|
+
- Updated dependencies [07ac90f]
|
|
100
|
+
- @neo4j-cypher/language-support@2.0.0-next.18
|
|
101
|
+
|
|
102
|
+
## 2.0.0-next.20
|
|
103
|
+
|
|
104
|
+
### Patch Changes
|
|
105
|
+
|
|
106
|
+
- Updated dependencies [bffbb19]
|
|
107
|
+
- Updated dependencies [826d922]
|
|
108
|
+
- Updated dependencies [1caab0c]
|
|
109
|
+
- @neo4j-cypher/language-support@2.0.0-next.17
|
|
110
|
+
|
|
111
|
+
## 2.0.0-next.19
|
|
112
|
+
|
|
113
|
+
### Patch Changes
|
|
114
|
+
|
|
115
|
+
- a3e3e50: updating themes to use needle colors
|
|
116
|
+
- Updated dependencies [68f55d4]
|
|
117
|
+
- Updated dependencies [6d00433]
|
|
118
|
+
- Updated dependencies [c01b32a]
|
|
119
|
+
- @neo4j-cypher/language-support@2.0.0-next.16
|
|
120
|
+
|
|
121
|
+
## 2.0.0-next.18
|
|
122
|
+
|
|
123
|
+
### Patch Changes
|
|
124
|
+
|
|
125
|
+
- Updated dependencies [50cc73e]
|
|
126
|
+
- Updated dependencies [5ef538d]
|
|
127
|
+
- Updated dependencies [b988d3b]
|
|
128
|
+
- @neo4j-cypher/language-support@2.0.0-next.15
|
|
129
|
+
|
|
130
|
+
## 2.0.0-next.17
|
|
131
|
+
|
|
132
|
+
### Patch Changes
|
|
133
|
+
|
|
134
|
+
- 245fb6a: Automatically opens autocompletions after "YIELD "
|
|
135
|
+
- Updated dependencies [8ec797d]
|
|
136
|
+
- Updated dependencies [7aa9c3a]
|
|
137
|
+
- Updated dependencies [2be5469]
|
|
138
|
+
- Updated dependencies [245fb6a]
|
|
139
|
+
- Updated dependencies [c587b81]
|
|
140
|
+
- Updated dependencies [3f8b64f]
|
|
141
|
+
- Updated dependencies [043d766]
|
|
142
|
+
- Updated dependencies [704d1c5]
|
|
143
|
+
- @neo4j-cypher/language-support@2.0.0-next.14
|
|
144
|
+
|
|
145
|
+
## 2.0.0-next.16
|
|
146
|
+
|
|
147
|
+
### Patch Changes
|
|
148
|
+
|
|
149
|
+
- Updated dependencies [84a12fc]
|
|
150
|
+
- Updated dependencies [d329252]
|
|
151
|
+
- Updated dependencies [b0e419e]
|
|
152
|
+
- @neo4j-cypher/language-support@2.0.0-next.13
|
|
153
|
+
|
|
154
|
+
## 2.0.0-next.15
|
|
155
|
+
|
|
156
|
+
### Patch Changes
|
|
157
|
+
|
|
158
|
+
- adc5b64: using custom light color theme for the cypher editor
|
|
159
|
+
- Updated dependencies [88fbe63]
|
|
160
|
+
- Updated dependencies [22081b0]
|
|
161
|
+
- Updated dependencies [62ac442]
|
|
162
|
+
- @neo4j-cypher/language-support@2.0.0-next.12
|
|
163
|
+
|
|
164
|
+
## 2.0.0-next.14
|
|
165
|
+
|
|
166
|
+
### Patch Changes
|
|
167
|
+
|
|
168
|
+
- d85c1e0: Fixes bug with auto-completions
|
|
169
|
+
- Updated dependencies [bccf518]
|
|
170
|
+
- @neo4j-cypher/language-support@2.0.0-next.11
|
|
171
|
+
|
|
172
|
+
## 2.0.0-next.13
|
|
173
|
+
|
|
174
|
+
### Patch Changes
|
|
175
|
+
|
|
176
|
+
- Updated dependencies [8760c02]
|
|
177
|
+
- @neo4j-cypher/language-support@2.0.0-next.10
|
|
178
|
+
|
|
179
|
+
## 2.0.0-next.12
|
|
180
|
+
|
|
181
|
+
### Patch Changes
|
|
182
|
+
|
|
183
|
+
- dcbe67d: Expose moveFocusOnTab property on the CypherEditor component to conditionally disable tab keymappings
|
|
184
|
+
- e9621c8: Re-export language support from react codemirror
|
|
185
|
+
- Updated dependencies [2e72ac8]
|
|
186
|
+
- @neo4j-cypher/language-support@2.0.0-next.9
|
|
187
|
+
|
|
188
|
+
## 2.0.0-next.11
|
|
189
|
+
|
|
190
|
+
### Patch Changes
|
|
191
|
+
|
|
192
|
+
- Updated dependencies [05663bd]
|
|
193
|
+
- @neo4j-cypher/language-support@2.0.0-next.8
|
|
194
|
+
|
|
195
|
+
## 2.0.0-next.10
|
|
196
|
+
|
|
197
|
+
### Patch Changes
|
|
198
|
+
|
|
199
|
+
- bb7e9d3: Simplify detection and handling of value prop updates
|
|
200
|
+
|
|
201
|
+
## 2.0.0-next.9
|
|
202
|
+
|
|
203
|
+
### Patch Changes
|
|
204
|
+
|
|
205
|
+
- fbd5f7e: allow signature help panel to render below editor when there's not enough space above it
|
|
206
|
+
- 09dfae2: Add an ariaLabel prop to CypherEditor
|
|
207
|
+
- 7154e94: Fix bug causing debouncing to override value
|
|
208
|
+
- 62c152f: execute single line query on enter by default
|
|
209
|
+
- cbfc75e: Fix a bug causing debounced value updates to get cancelled erroneously
|
|
210
|
+
- 04ae35e: Set initial latestDispatchedValue and flush debounced changes onExecute
|
|
211
|
+
Add tests for debounce behaviour
|
|
212
|
+
- Updated dependencies [3661e9d]
|
|
213
|
+
- Updated dependencies [b76af58]
|
|
214
|
+
- Updated dependencies [21699b7]
|
|
215
|
+
- Updated dependencies [6afc0e3]
|
|
216
|
+
- Updated dependencies [39b924d]
|
|
217
|
+
- @neo4j-cypher/language-support@2.0.0-next.7
|
|
218
|
+
|
|
219
|
+
## 2.0.0-next.8
|
|
220
|
+
|
|
221
|
+
### Patch Changes
|
|
222
|
+
|
|
223
|
+
- 6cc9022: Adds more props to the CypherEditor component
|
|
224
|
+
- Updated dependencies [e92d8c7]
|
|
225
|
+
- @neo4j-cypher/language-support@2.0.0-next.6
|
|
226
|
+
|
|
227
|
+
## 2.0.0-next.7
|
|
228
|
+
|
|
229
|
+
### Patch Changes
|
|
230
|
+
|
|
231
|
+
- Updated dependencies [1f790d0]
|
|
232
|
+
- @neo4j-cypher/language-support@2.0.0-next.5
|
|
233
|
+
|
|
234
|
+
## 2.0.0-next.6
|
|
235
|
+
|
|
236
|
+
### Patch Changes
|
|
237
|
+
|
|
238
|
+
- Updated dependencies
|
|
239
|
+
- @neo4j-cypher/language-support@2.0.0-next.4
|
|
240
|
+
|
|
241
|
+
## 2.0.0-next.5
|
|
242
|
+
|
|
243
|
+
### Patch Changes
|
|
244
|
+
|
|
245
|
+
- 8cc77c6: Add support for console commands
|
|
246
|
+
- 1e210cb: Moves semantic analysis to a separate worker file
|
|
247
|
+
- Updated dependencies [8cc77c6]
|
|
248
|
+
- Updated dependencies [1e210cb]
|
|
249
|
+
- Updated dependencies [f6d20b2]
|
|
250
|
+
- @neo4j-cypher/language-support@2.0.0-next.3
|
|
251
|
+
|
|
252
|
+
## 2.0.0-next.4
|
|
253
|
+
|
|
254
|
+
### Patch Changes
|
|
255
|
+
|
|
256
|
+
- 8de605b: Improved history prop change detection
|
|
257
|
+
- Updated dependencies [17909e3]
|
|
258
|
+
- @neo4j-cypher/language-support@2.0.0-next.2
|
|
259
|
+
|
|
3
260
|
## 2.0.0-next.3
|
|
4
261
|
|
|
5
262
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# React Codemirror
|
|
2
2
|
|
|
3
|
-
This package can be built with `
|
|
3
|
+
This package can be built with `pnpm build` and then published to npm with `pnpm publish`.
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
@@ -27,7 +27,8 @@ For a full example, see the [react-codemirror-playground](https://github.com/neo
|
|
|
27
27
|
Currently we only support using the codemirror editor via the react wrapper, but we plan to release the codemirror extensions separately as well.
|
|
28
28
|
|
|
29
29
|
## Learning codemirror
|
|
30
|
-
|
|
30
|
+
|
|
31
|
+
It can take a little time to get into the CodeMirror6 ways of thinking, Trevor Harmon has a [great blog post](https://thetrevorharmon.com/blog/learning-codemirror/) explaining the cm6 "primitives". He also has a demo on how to integrate ANTLR4 with codemirror over [here](https://github.com/thetrevorharmon/zephyr-demo).
|
|
31
32
|
|
|
32
33
|
### Completion Icons
|
|
33
34
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { EditorState, Extension } from '@codemirror/state';
|
|
2
2
|
import { EditorView, KeyBinding, ViewUpdate } from '@codemirror/view';
|
|
3
|
-
import type
|
|
3
|
+
import { type DbSchema } from '@neo4j-cypher/language-support';
|
|
4
4
|
import { Component } from 'react';
|
|
5
|
+
type DomEventHandlers = Parameters<typeof EditorView.domEventHandlers>[0];
|
|
5
6
|
export interface CypherEditorProps {
|
|
6
7
|
/**
|
|
7
8
|
* The prompt to show on single line editors
|
|
@@ -21,7 +22,14 @@ export interface CypherEditorProps {
|
|
|
21
22
|
*/
|
|
22
23
|
onExecute?: (cmd: string) => void;
|
|
23
24
|
/**
|
|
24
|
-
*
|
|
25
|
+
* If true, pressing enter will add a new line to the editor and cmd/ctrl + enter will execute the query.
|
|
26
|
+
* Otherwise pressing enter on a single line will execute the query.
|
|
27
|
+
*
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
newLineOnEnter?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* The editor history navigable via up/down arrow keys. Order newest to oldest.
|
|
25
33
|
* Add to this list with the `onExecute` callback for REPL style history.
|
|
26
34
|
*/
|
|
27
35
|
history?: string[];
|
|
@@ -38,6 +46,10 @@ export interface CypherEditorProps {
|
|
|
38
46
|
* @default false
|
|
39
47
|
*/
|
|
40
48
|
autofocus?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Where to place the cursor in the query. Cannot be enabled at the same time than autofocus
|
|
51
|
+
*/
|
|
52
|
+
offset?: number;
|
|
41
53
|
/**
|
|
42
54
|
* Whether the editor should wrap lines.
|
|
43
55
|
*
|
|
@@ -50,6 +62,20 @@ export interface CypherEditorProps {
|
|
|
50
62
|
* @default true
|
|
51
63
|
*/
|
|
52
64
|
lint?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Whether the signature help tooltip should be shown below the text.
|
|
67
|
+
* If false, it will be shown above.
|
|
68
|
+
*
|
|
69
|
+
* @default true
|
|
70
|
+
*/
|
|
71
|
+
showSignatureTooltipBelow?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Internal feature flags for the editor. Don't use in production
|
|
74
|
+
*
|
|
75
|
+
*/
|
|
76
|
+
featureFlags?: {
|
|
77
|
+
consoleCommands?: boolean;
|
|
78
|
+
};
|
|
53
79
|
/**
|
|
54
80
|
* The schema to use for autocompletion and linting.
|
|
55
81
|
*
|
|
@@ -77,8 +103,54 @@ export interface CypherEditorProps {
|
|
|
77
103
|
* @param {ViewUpdate} viewUpdate - the view update from codemirror
|
|
78
104
|
*/
|
|
79
105
|
onChange?(value: string, viewUpdate: ViewUpdate): void;
|
|
106
|
+
/**
|
|
107
|
+
* Map of event handlers to add to the editor.
|
|
108
|
+
*
|
|
109
|
+
* Note that the props are compared by reference, meaning object defined inline
|
|
110
|
+
* will cause the editor to re-render (much like the style prop does in this example:
|
|
111
|
+
* <div style={{}} />
|
|
112
|
+
*
|
|
113
|
+
* Memoize the object if you want/need to avoid this.
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* // listen to blur events
|
|
117
|
+
* <CypherEditor domEventHandlers={{blur: () => console.log("blur event fired")}} />
|
|
118
|
+
*/
|
|
119
|
+
domEventHandlers?: DomEventHandlers;
|
|
120
|
+
/**
|
|
121
|
+
* Placeholder text to display when the editor is empty.
|
|
122
|
+
*/
|
|
123
|
+
placeholder?: string;
|
|
124
|
+
/**
|
|
125
|
+
* Whether the editor should show line numbers.
|
|
126
|
+
*
|
|
127
|
+
* @default true
|
|
128
|
+
*/
|
|
129
|
+
lineNumbers?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* Whether the editor is read-only.
|
|
132
|
+
*
|
|
133
|
+
* @default false
|
|
134
|
+
*/
|
|
135
|
+
readonly?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* String value to assign to the aria-label attribute of the editor.
|
|
138
|
+
*/
|
|
139
|
+
ariaLabel?: string;
|
|
140
|
+
/**
|
|
141
|
+
* Whether keybindings for inserting indents with the Tab key should be disabled.
|
|
142
|
+
*
|
|
143
|
+
* true will not create keybindings for inserting indents.
|
|
144
|
+
* false will create keybindings for inserting indents.
|
|
145
|
+
*
|
|
146
|
+
* @default false
|
|
147
|
+
*/
|
|
148
|
+
moveFocusOnTab?: boolean;
|
|
80
149
|
}
|
|
81
|
-
|
|
150
|
+
type CypherEditorState = {
|
|
151
|
+
cypherSupportEnabled: boolean;
|
|
152
|
+
};
|
|
153
|
+
export declare class CypherEditor extends Component<CypherEditorProps, CypherEditorState> {
|
|
82
154
|
/**
|
|
83
155
|
* The codemirror editor container.
|
|
84
156
|
*/
|
|
@@ -92,6 +164,10 @@ export declare class CypherEditor extends Component<CypherEditorProps> {
|
|
|
92
164
|
*/
|
|
93
165
|
editorView: React.MutableRefObject<EditorView>;
|
|
94
166
|
private schemaRef;
|
|
167
|
+
/**
|
|
168
|
+
* Format Cypher query
|
|
169
|
+
*/
|
|
170
|
+
format(): void;
|
|
95
171
|
/**
|
|
96
172
|
* Focus the editor
|
|
97
173
|
*/
|
|
@@ -106,8 +182,10 @@ export declare class CypherEditor extends Component<CypherEditorProps> {
|
|
|
106
182
|
*/
|
|
107
183
|
setValueAndFocus(value?: string): void;
|
|
108
184
|
static defaultProps: CypherEditorProps;
|
|
185
|
+
private debouncedOnChange;
|
|
109
186
|
componentDidMount(): void;
|
|
110
187
|
componentDidUpdate(prevProps: CypherEditorProps): void;
|
|
111
188
|
componentWillUnmount(): void;
|
|
112
189
|
render(): React.ReactNode;
|
|
113
190
|
}
|
|
191
|
+
export {};
|