@neo4j-cypher/react-codemirror 2.0.0-next.4 → 2.0.0-next.40
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 +350 -0
- package/README.md +3 -2
- package/dist/src/CypherEditor.d.ts +243 -0
- package/dist/src/CypherEditor.js +513 -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/diffView.d.ts +13 -0
- package/dist/src/diffView.js +11 -0
- package/dist/src/diffView.js.map +1 -0
- package/dist/src/e2e_tests/autoCompletion.spec.js +335 -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 +64 -0
- package/dist/src/e2e_tests/sanityChecks.spec.js.map +1 -0
- package/dist/src/e2e_tests/signatureHelp.spec.js +227 -0
- package/dist/src/e2e_tests/signatureHelp.spec.js.map +1 -0
- package/dist/src/e2e_tests/snippets.spec.js +14 -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 +129 -0
- package/dist/src/e2e_tests/syntaxValidation.spec.js.map +1 -0
- package/dist/src/editorActions.d.ts +17 -0
- package/dist/src/editorActions.js +194 -0
- package/dist/src/editorActions.js.map +1 -0
- package/dist/src/historyNavigation.js +163 -0
- package/dist/src/historyNavigation.js.map +1 -0
- package/dist/src/hostCallbacks.d.ts +9 -0
- package/dist/src/hostCallbacks.js +2 -0
- package/dist/src/hostCallbacks.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 +6 -0
- package/dist/src/index.js +5 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/inlinePanel.d.ts +27 -0
- package/dist/src/inlinePanel.js +86 -0
- package/dist/src/inlinePanel.js.map +1 -0
- package/dist/src/lang-cypher/autocomplete.d.ts +6 -0
- package/dist/src/lang-cypher/autocomplete.js +116 -0
- package/dist/src/lang-cypher/autocomplete.js.map +1 -0
- package/dist/{types → src}/lang-cypher/constants.d.ts +13 -0
- package/dist/src/lang-cypher/constants.js +74 -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/{types/lang-cypher/create-cypher-theme.d.ts → src/lang-cypher/createCypherTheme.d.ts} +12 -1
- package/dist/src/lang-cypher/createCypherTheme.js +202 -0
- package/dist/src/lang-cypher/createCypherTheme.js.map +1 -0
- package/dist/src/lang-cypher/langCypher.d.ts +14 -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 +2035 -0
- package/dist/src/lang-cypher/parser-adapter.d.ts +19 -0
- package/dist/src/lang-cypher/parser-adapter.js +112 -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 +108 -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 +60 -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/src/themes.d.ts +5 -0
- package/dist/src/themes.js +107 -0
- package/dist/src/themes.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +62 -62
- package/src/CypherEditor.test.tsx +203 -0
- package/src/CypherEditor.tsx +584 -48
- package/src/constants.ts +1 -0
- package/src/diffView.ts +24 -0
- package/src/e2e_tests/autoCompletion.spec.tsx +577 -0
- package/src/e2e_tests/configuration.spec.tsx +111 -0
- package/src/e2e_tests/debounce.spec.tsx +102 -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} +28 -20
- package/src/e2e_tests/signatureHelp.spec.tsx +443 -0
- package/src/e2e_tests/snippets.spec.tsx +19 -0
- package/src/e2e_tests/{syntax-highlighting.spec.tsx → syntaxHighlighting.spec.tsx} +26 -24
- package/src/e2e_tests/syntaxValidation.spec.tsx +252 -0
- package/src/editorActions.ts +253 -0
- package/src/{history-navigation.ts → historyNavigation.ts} +1 -1
- package/src/hostCallbacks.ts +9 -0
- package/src/icons.ts +3 -0
- package/src/index.ts +4 -2
- package/src/inlinePanel.ts +140 -0
- package/src/lang-cypher/autocomplete.ts +98 -18
- package/src/lang-cypher/constants.ts +32 -0
- package/src/lang-cypher/contants.test.ts +7 -3
- package/src/lang-cypher/{create-cypher-theme.ts → createCypherTheme.ts} +85 -23
- package/src/lang-cypher/langCypher.ts +46 -0
- package/src/lang-cypher/lintWorker.mjs +2035 -0
- package/src/lang-cypher/parser-adapter.ts +145 -0
- package/src/lang-cypher/signatureHelp.ts +154 -0
- package/src/lang-cypher/syntaxValidation.ts +76 -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 +61 -69
- package/src/viteEnv.d.ts +1 -0
- package/dist/cjs/index.cjs +0 -1441
- package/dist/cjs/index.cjs.map +0 -7
- package/dist/esm/index.mjs +0 -1464
- package/dist/esm/index.mjs.map +0 -7
- package/dist/types/CypherEditor.d.ts +0 -113
- 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/themes.d.ts +0 -11
- 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/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,355 @@
|
|
|
1
1
|
# @neo4j-cypher/react-codemirror
|
|
2
2
|
|
|
3
|
+
## 2.0.0-next.40
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 0ddd727: wrap placeholder around editor actions
|
|
8
|
+
- 9266800: normalize CRLF line endings
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- ce3820b: Update grammar and semantic analysis to 2026.08
|
|
13
|
+
- Updated dependencies [ce3820b]
|
|
14
|
+
- Updated dependencies [6c863cd]
|
|
15
|
+
- @neo4j-cypher/language-support@2.0.0-next.37
|
|
16
|
+
- @neo4j-cypher/lint-worker@1.10.1-next.14
|
|
17
|
+
|
|
18
|
+
## 2.0.0-next.39
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [50f061e]
|
|
23
|
+
- @neo4j-cypher/language-support@2.0.0-next.36
|
|
24
|
+
- @neo4j-cypher/lint-worker@1.10.1-next.13
|
|
25
|
+
|
|
26
|
+
## 2.0.0-next.38
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- 6866132: Update grammar and semantic analysis to 2026.07
|
|
31
|
+
- 9c65003: Declares `react-dom` as a peer dependency, since `CypherEditor` now imports `createPortal` from it to render the editor action buttons overlay
|
|
32
|
+
- Updated dependencies [6866132]
|
|
33
|
+
- @neo4j-cypher/language-support@2.0.0-next.35
|
|
34
|
+
- @neo4j-cypher/lint-worker@1.10.1-next.12
|
|
35
|
+
|
|
36
|
+
## 2.0.0-next.37
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- b616748: Add diff view to the Cypher editor using @codemirror/merge
|
|
41
|
+
- Updated dependencies [2f8b52d]
|
|
42
|
+
- @neo4j-cypher/language-support@2.0.0-next.34
|
|
43
|
+
- @neo4j-cypher/lint-worker@1.10.1-next.11
|
|
44
|
+
|
|
45
|
+
## 2.0.0-next.36
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- 2d5fa77: Add `inlinePanel` prop to `CypherEditor` for rendering a host-controlled panel as a block widget inside the editor.
|
|
50
|
+
- 02df611: Hide parameter errors when disconnected
|
|
51
|
+
- Updated dependencies [02df611]
|
|
52
|
+
- Updated dependencies [e69ee30]
|
|
53
|
+
- @neo4j-cypher/language-support@2.0.0-next.33
|
|
54
|
+
- @neo4j-cypher/lint-worker@1.10.1-next.10
|
|
55
|
+
|
|
56
|
+
## 2.0.0-next.35
|
|
57
|
+
|
|
58
|
+
### Patch Changes
|
|
59
|
+
|
|
60
|
+
- cd4ab49: Update grammar and semantic analysis to 2026.05
|
|
61
|
+
- Updated dependencies [cd4ab49]
|
|
62
|
+
- Updated dependencies [0b2d441]
|
|
63
|
+
- @neo4j-cypher/language-support@2.0.0-next.32
|
|
64
|
+
- @neo4j-cypher/lint-worker@1.10.1-next.9
|
|
65
|
+
|
|
66
|
+
## 2.0.0-next.34
|
|
67
|
+
|
|
68
|
+
### Patch Changes
|
|
69
|
+
|
|
70
|
+
- 3b2faf5: Rewrite global parserWrapper to instantiated languageService and add symbol fetching to react-codemirror
|
|
71
|
+
- Updated dependencies [08f94af]
|
|
72
|
+
- Updated dependencies [0763d97]
|
|
73
|
+
- Updated dependencies [3b2faf5]
|
|
74
|
+
- Updated dependencies [ca1bba6]
|
|
75
|
+
- @neo4j-cypher/language-support@2.0.0-next.31
|
|
76
|
+
- @neo4j-cypher/lint-worker@1.10.1-next.8
|
|
77
|
+
|
|
78
|
+
## 2.0.0-next.33
|
|
79
|
+
|
|
80
|
+
### Patch Changes
|
|
81
|
+
|
|
82
|
+
- Updated dependencies [0e457d6]
|
|
83
|
+
- Updated dependencies [b0170f9]
|
|
84
|
+
- Updated dependencies [25fad16]
|
|
85
|
+
- @neo4j-cypher/language-support@2.0.0-next.30
|
|
86
|
+
- @neo4j-cypher/lint-worker@1.10.1-next.7
|
|
87
|
+
|
|
88
|
+
## 2.0.0-next.32
|
|
89
|
+
|
|
90
|
+
### Patch Changes
|
|
91
|
+
|
|
92
|
+
- Updated dependencies [bfdc70e]
|
|
93
|
+
- @neo4j-cypher/language-support@2.0.0-next.29
|
|
94
|
+
- @neo4j-cypher/lint-worker@1.10.1-next.6
|
|
95
|
+
|
|
96
|
+
## 2.0.0-next.31
|
|
97
|
+
|
|
98
|
+
### Patch Changes
|
|
99
|
+
|
|
100
|
+
- Updated dependencies [5df1435]
|
|
101
|
+
- @neo4j-cypher/language-support@2.0.0-next.28
|
|
102
|
+
- @neo4j-cypher/lint-worker@1.10.1-next.5
|
|
103
|
+
|
|
104
|
+
## 2.0.0-next.30
|
|
105
|
+
|
|
106
|
+
### Patch Changes
|
|
107
|
+
|
|
108
|
+
- Updated dependencies [6a2a408]
|
|
109
|
+
- Updated dependencies [20b31b6]
|
|
110
|
+
- Updated dependencies [68d92a8]
|
|
111
|
+
- @neo4j-cypher/lint-worker@1.10.1-next.4
|
|
112
|
+
- @neo4j-cypher/language-support@2.0.0-next.27
|
|
113
|
+
|
|
114
|
+
## 2.0.0-next.29
|
|
115
|
+
|
|
116
|
+
### Patch Changes
|
|
117
|
+
|
|
118
|
+
- Updated dependencies [8e8d7f1]
|
|
119
|
+
- Updated dependencies [808aa73]
|
|
120
|
+
- @neo4j-cypher/language-support@2.0.0-next.26
|
|
121
|
+
- @neo4j-cypher/lint-worker@1.10.1-next.3
|
|
122
|
+
|
|
123
|
+
## 2.0.0-next.28
|
|
124
|
+
|
|
125
|
+
### Patch Changes
|
|
126
|
+
|
|
127
|
+
- Updated dependencies [b1e686e]
|
|
128
|
+
- @neo4j-cypher/language-support@2.0.0-next.25
|
|
129
|
+
- @neo4j-cypher/lint-worker@1.10.1-next.2
|
|
130
|
+
|
|
131
|
+
## 2.0.0-next.27
|
|
132
|
+
|
|
133
|
+
### Patch Changes
|
|
134
|
+
|
|
135
|
+
- 86f5c55: adding rich clipboard copier to codemirror
|
|
136
|
+
- 5fdc6dd: Fixes faulty worker termination on big queries
|
|
137
|
+
- Updated dependencies [246d60c]
|
|
138
|
+
- Updated dependencies [8eacddd]
|
|
139
|
+
- Updated dependencies [3a29711]
|
|
140
|
+
- Updated dependencies [b9c0e9d]
|
|
141
|
+
- Updated dependencies [d77e8a1]
|
|
142
|
+
- Updated dependencies [5fdc6dd]
|
|
143
|
+
- Updated dependencies [7183c63]
|
|
144
|
+
- @neo4j-cypher/lint-worker@1.10.1-next.1
|
|
145
|
+
- @neo4j-cypher/language-support@2.0.0-next.24
|
|
146
|
+
|
|
147
|
+
## 2.0.0-next.26
|
|
148
|
+
|
|
149
|
+
### Patch Changes
|
|
150
|
+
|
|
151
|
+
- Updated dependencies [c065d85]
|
|
152
|
+
- @neo4j-cypher/language-support@2.0.0-next.23
|
|
153
|
+
- @neo4j-cypher/lint-worker@1.10.1-next.0
|
|
154
|
+
|
|
155
|
+
## 2.0.0-next.25
|
|
156
|
+
|
|
157
|
+
### Patch Changes
|
|
158
|
+
|
|
159
|
+
- d99368c: Ensures CRLF newlines are handled when setting editor value
|
|
160
|
+
- Updated dependencies [ed65ef3]
|
|
161
|
+
- Updated dependencies [7538cfd]
|
|
162
|
+
- Updated dependencies [c1fa91f]
|
|
163
|
+
- Updated dependencies [039d1c5]
|
|
164
|
+
- Updated dependencies [1ef063e]
|
|
165
|
+
- Updated dependencies [a38255f]
|
|
166
|
+
- Updated dependencies [c4f27c9]
|
|
167
|
+
- @neo4j-cypher/language-support@2.0.0-next.22
|
|
168
|
+
- @neo4j-cypher/lint-worker@0.1.0-next.0
|
|
169
|
+
|
|
170
|
+
## 2.0.0-next.24
|
|
171
|
+
|
|
172
|
+
### Patch Changes
|
|
173
|
+
|
|
174
|
+
- 8b03317: resetting z index for cm panels
|
|
175
|
+
- Updated dependencies [4b0ee37]
|
|
176
|
+
- @neo4j-cypher/language-support@2.0.0-next.21
|
|
177
|
+
- @neo4j-cypher/lint-worker@2025.4.1-next.0
|
|
178
|
+
|
|
179
|
+
## 2.0.0-next.23
|
|
180
|
+
|
|
181
|
+
### Patch Changes
|
|
182
|
+
|
|
183
|
+
- Updated dependencies [013e4ff]
|
|
184
|
+
- @neo4j-cypher/language-support@2.0.0-next.20
|
|
185
|
+
|
|
186
|
+
## 2.0.0-next.22
|
|
187
|
+
|
|
188
|
+
### Patch Changes
|
|
189
|
+
|
|
190
|
+
- 5bfdac2: restructure packages as part of move to pnpm
|
|
191
|
+
- Updated dependencies [88e4930]
|
|
192
|
+
- Updated dependencies [5bfdac2]
|
|
193
|
+
- @neo4j-cypher/language-support@2.0.0-next.19
|
|
194
|
+
|
|
195
|
+
## 2.0.0-next.21
|
|
196
|
+
|
|
197
|
+
### Patch Changes
|
|
198
|
+
|
|
199
|
+
- Updated dependencies [1b971aa]
|
|
200
|
+
- Updated dependencies [07ac90f]
|
|
201
|
+
- @neo4j-cypher/language-support@2.0.0-next.18
|
|
202
|
+
|
|
203
|
+
## 2.0.0-next.20
|
|
204
|
+
|
|
205
|
+
### Patch Changes
|
|
206
|
+
|
|
207
|
+
- Updated dependencies [bffbb19]
|
|
208
|
+
- Updated dependencies [826d922]
|
|
209
|
+
- Updated dependencies [1caab0c]
|
|
210
|
+
- @neo4j-cypher/language-support@2.0.0-next.17
|
|
211
|
+
|
|
212
|
+
## 2.0.0-next.19
|
|
213
|
+
|
|
214
|
+
### Patch Changes
|
|
215
|
+
|
|
216
|
+
- a3e3e50: updating themes to use needle colors
|
|
217
|
+
- Updated dependencies [68f55d4]
|
|
218
|
+
- Updated dependencies [6d00433]
|
|
219
|
+
- Updated dependencies [c01b32a]
|
|
220
|
+
- @neo4j-cypher/language-support@2.0.0-next.16
|
|
221
|
+
|
|
222
|
+
## 2.0.0-next.18
|
|
223
|
+
|
|
224
|
+
### Patch Changes
|
|
225
|
+
|
|
226
|
+
- Updated dependencies [50cc73e]
|
|
227
|
+
- Updated dependencies [5ef538d]
|
|
228
|
+
- Updated dependencies [b988d3b]
|
|
229
|
+
- @neo4j-cypher/language-support@2.0.0-next.15
|
|
230
|
+
|
|
231
|
+
## 2.0.0-next.17
|
|
232
|
+
|
|
233
|
+
### Patch Changes
|
|
234
|
+
|
|
235
|
+
- 245fb6a: Automatically opens autocompletions after "YIELD "
|
|
236
|
+
- Updated dependencies [8ec797d]
|
|
237
|
+
- Updated dependencies [7aa9c3a]
|
|
238
|
+
- Updated dependencies [2be5469]
|
|
239
|
+
- Updated dependencies [245fb6a]
|
|
240
|
+
- Updated dependencies [c587b81]
|
|
241
|
+
- Updated dependencies [3f8b64f]
|
|
242
|
+
- Updated dependencies [043d766]
|
|
243
|
+
- Updated dependencies [704d1c5]
|
|
244
|
+
- @neo4j-cypher/language-support@2.0.0-next.14
|
|
245
|
+
|
|
246
|
+
## 2.0.0-next.16
|
|
247
|
+
|
|
248
|
+
### Patch Changes
|
|
249
|
+
|
|
250
|
+
- Updated dependencies [84a12fc]
|
|
251
|
+
- Updated dependencies [d329252]
|
|
252
|
+
- Updated dependencies [b0e419e]
|
|
253
|
+
- @neo4j-cypher/language-support@2.0.0-next.13
|
|
254
|
+
|
|
255
|
+
## 2.0.0-next.15
|
|
256
|
+
|
|
257
|
+
### Patch Changes
|
|
258
|
+
|
|
259
|
+
- adc5b64: using custom light color theme for the cypher editor
|
|
260
|
+
- Updated dependencies [88fbe63]
|
|
261
|
+
- Updated dependencies [22081b0]
|
|
262
|
+
- Updated dependencies [62ac442]
|
|
263
|
+
- @neo4j-cypher/language-support@2.0.0-next.12
|
|
264
|
+
|
|
265
|
+
## 2.0.0-next.14
|
|
266
|
+
|
|
267
|
+
### Patch Changes
|
|
268
|
+
|
|
269
|
+
- d85c1e0: Fixes bug with auto-completions
|
|
270
|
+
- Updated dependencies [bccf518]
|
|
271
|
+
- @neo4j-cypher/language-support@2.0.0-next.11
|
|
272
|
+
|
|
273
|
+
## 2.0.0-next.13
|
|
274
|
+
|
|
275
|
+
### Patch Changes
|
|
276
|
+
|
|
277
|
+
- Updated dependencies [8760c02]
|
|
278
|
+
- @neo4j-cypher/language-support@2.0.0-next.10
|
|
279
|
+
|
|
280
|
+
## 2.0.0-next.12
|
|
281
|
+
|
|
282
|
+
### Patch Changes
|
|
283
|
+
|
|
284
|
+
- dcbe67d: Expose moveFocusOnTab property on the CypherEditor component to conditionally disable tab keymappings
|
|
285
|
+
- e9621c8: Re-export language support from react codemirror
|
|
286
|
+
- Updated dependencies [2e72ac8]
|
|
287
|
+
- @neo4j-cypher/language-support@2.0.0-next.9
|
|
288
|
+
|
|
289
|
+
## 2.0.0-next.11
|
|
290
|
+
|
|
291
|
+
### Patch Changes
|
|
292
|
+
|
|
293
|
+
- Updated dependencies [05663bd]
|
|
294
|
+
- @neo4j-cypher/language-support@2.0.0-next.8
|
|
295
|
+
|
|
296
|
+
## 2.0.0-next.10
|
|
297
|
+
|
|
298
|
+
### Patch Changes
|
|
299
|
+
|
|
300
|
+
- bb7e9d3: Simplify detection and handling of value prop updates
|
|
301
|
+
|
|
302
|
+
## 2.0.0-next.9
|
|
303
|
+
|
|
304
|
+
### Patch Changes
|
|
305
|
+
|
|
306
|
+
- fbd5f7e: allow signature help panel to render below editor when there's not enough space above it
|
|
307
|
+
- 09dfae2: Add an ariaLabel prop to CypherEditor
|
|
308
|
+
- 7154e94: Fix bug causing debouncing to override value
|
|
309
|
+
- 62c152f: execute single line query on enter by default
|
|
310
|
+
- cbfc75e: Fix a bug causing debounced value updates to get cancelled erroneously
|
|
311
|
+
- 04ae35e: Set initial latestDispatchedValue and flush debounced changes onExecute
|
|
312
|
+
Add tests for debounce behaviour
|
|
313
|
+
- Updated dependencies [3661e9d]
|
|
314
|
+
- Updated dependencies [b76af58]
|
|
315
|
+
- Updated dependencies [21699b7]
|
|
316
|
+
- Updated dependencies [6afc0e3]
|
|
317
|
+
- Updated dependencies [39b924d]
|
|
318
|
+
- @neo4j-cypher/language-support@2.0.0-next.7
|
|
319
|
+
|
|
320
|
+
## 2.0.0-next.8
|
|
321
|
+
|
|
322
|
+
### Patch Changes
|
|
323
|
+
|
|
324
|
+
- 6cc9022: Adds more props to the CypherEditor component
|
|
325
|
+
- Updated dependencies [e92d8c7]
|
|
326
|
+
- @neo4j-cypher/language-support@2.0.0-next.6
|
|
327
|
+
|
|
328
|
+
## 2.0.0-next.7
|
|
329
|
+
|
|
330
|
+
### Patch Changes
|
|
331
|
+
|
|
332
|
+
- Updated dependencies [1f790d0]
|
|
333
|
+
- @neo4j-cypher/language-support@2.0.0-next.5
|
|
334
|
+
|
|
335
|
+
## 2.0.0-next.6
|
|
336
|
+
|
|
337
|
+
### Patch Changes
|
|
338
|
+
|
|
339
|
+
- Updated dependencies
|
|
340
|
+
- @neo4j-cypher/language-support@2.0.0-next.4
|
|
341
|
+
|
|
342
|
+
## 2.0.0-next.5
|
|
343
|
+
|
|
344
|
+
### Patch Changes
|
|
345
|
+
|
|
346
|
+
- 8cc77c6: Add support for console commands
|
|
347
|
+
- 1e210cb: Moves semantic analysis to a separate worker file
|
|
348
|
+
- Updated dependencies [8cc77c6]
|
|
349
|
+
- Updated dependencies [1e210cb]
|
|
350
|
+
- Updated dependencies [f6d20b2]
|
|
351
|
+
- @neo4j-cypher/language-support@2.0.0-next.3
|
|
352
|
+
|
|
3
353
|
## 2.0.0-next.4
|
|
4
354
|
|
|
5
355
|
### 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
|
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { EditorState, Extension } from '@codemirror/state';
|
|
2
|
+
import { EditorView, KeyBinding, ViewUpdate } from '@codemirror/view';
|
|
3
|
+
import { type InlinePanelCallbacks } from './inlinePanel';
|
|
4
|
+
import { type DiffProps } from './diffView';
|
|
5
|
+
import { CypherLanguageService, type DbSchema } from '@neo4j-cypher/language-support';
|
|
6
|
+
import { Component, type ReactNode } from 'react';
|
|
7
|
+
type DomEventHandlers = Parameters<typeof EditorView.domEventHandlers>[0];
|
|
8
|
+
export interface CypherEditorProps {
|
|
9
|
+
/**
|
|
10
|
+
* The prompt to show on single line editors
|
|
11
|
+
*/
|
|
12
|
+
prompt?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Custom keybindings to add to the editor.
|
|
15
|
+
* See https://codemirror.net/6/docs/ref/#keymap.of
|
|
16
|
+
*/
|
|
17
|
+
extraKeybindings?: KeyBinding[];
|
|
18
|
+
/**
|
|
19
|
+
* Callback on query execution, triggered via ctrl/cmd + Enter.
|
|
20
|
+
* If provided, will enable "repl-mode", which turns on navigating editor history
|
|
21
|
+
*
|
|
22
|
+
* @param cmd - the editor value when ctrl/cmd + enter was pressed
|
|
23
|
+
* @returns void
|
|
24
|
+
*/
|
|
25
|
+
onExecute?: (cmd: string) => void;
|
|
26
|
+
/**
|
|
27
|
+
* If true, pressing enter will add a new line to the editor and cmd/ctrl + enter will execute the query.
|
|
28
|
+
* Otherwise pressing enter on a single line will execute the query.
|
|
29
|
+
*
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
newLineOnEnter?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* The editor history navigable via up/down arrow keys. Order newest to oldest.
|
|
35
|
+
* Add to this list with the `onExecute` callback for REPL style history.
|
|
36
|
+
*/
|
|
37
|
+
history?: string[];
|
|
38
|
+
/**
|
|
39
|
+
* When set to `true` the editor will use the background color of the parent element.
|
|
40
|
+
*
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
overrideThemeBackgroundColor?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Whether the editor should take focus on mount.
|
|
46
|
+
* Will move the cursor to the end of the query when provided with an initial value.
|
|
47
|
+
*
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
autofocus?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Where to place the cursor in the query. Cannot be enabled at the same time than autofocus
|
|
53
|
+
*/
|
|
54
|
+
offset?: number;
|
|
55
|
+
/**
|
|
56
|
+
* Whether the editor should wrap lines.
|
|
57
|
+
*
|
|
58
|
+
* @default false
|
|
59
|
+
*/
|
|
60
|
+
lineWrap?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Whether the editor should perform syntax validation.
|
|
63
|
+
*
|
|
64
|
+
* @default true
|
|
65
|
+
*/
|
|
66
|
+
lint?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Whether the signature help tooltip should be shown below the text.
|
|
69
|
+
* If false, it will be shown above.
|
|
70
|
+
*
|
|
71
|
+
* @default true
|
|
72
|
+
*/
|
|
73
|
+
showSignatureTooltipBelow?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Internal feature flags for the editor. Don't use in production
|
|
76
|
+
*
|
|
77
|
+
*/
|
|
78
|
+
featureFlags?: {
|
|
79
|
+
consoleCommands?: boolean;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* The schema to use for autocompletion and linting.
|
|
83
|
+
*
|
|
84
|
+
* @type {DbSchema}
|
|
85
|
+
*/
|
|
86
|
+
schema?: DbSchema;
|
|
87
|
+
/**
|
|
88
|
+
* The current value of the editor.
|
|
89
|
+
*/
|
|
90
|
+
value?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Extra css classnames to add to the editor container.
|
|
93
|
+
*/
|
|
94
|
+
className?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Set the built in theme or provide a custom theme.
|
|
97
|
+
*
|
|
98
|
+
* `light` / `dark` / `Extension`
|
|
99
|
+
* @default light
|
|
100
|
+
*/
|
|
101
|
+
theme?: 'light' | 'dark' | Extension;
|
|
102
|
+
/**
|
|
103
|
+
* Callback when the editor value changes.
|
|
104
|
+
* @param {string} value - the current editor value
|
|
105
|
+
* @param {ViewUpdate} viewUpdate - the view update from codemirror
|
|
106
|
+
*/
|
|
107
|
+
onChange?(value: string, viewUpdate: ViewUpdate): void;
|
|
108
|
+
/**
|
|
109
|
+
* Map of event handlers to add to the editor.
|
|
110
|
+
*
|
|
111
|
+
* Note that the props are compared by reference, meaning object defined inline
|
|
112
|
+
* will cause the editor to re-render (much like the style prop does in this example:
|
|
113
|
+
* <div style={{}} />
|
|
114
|
+
*
|
|
115
|
+
* Memoize the object if you want/need to avoid this.
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* // listen to blur events
|
|
119
|
+
* <CypherEditor domEventHandlers={{blur: () => console.log("blur event fired")}} />
|
|
120
|
+
*/
|
|
121
|
+
domEventHandlers?: DomEventHandlers;
|
|
122
|
+
/**
|
|
123
|
+
* Placeholder text to display when the editor is empty.
|
|
124
|
+
*/
|
|
125
|
+
placeholder?: string;
|
|
126
|
+
/**
|
|
127
|
+
* Whether the editor should show line numbers.
|
|
128
|
+
*
|
|
129
|
+
* @default true
|
|
130
|
+
*/
|
|
131
|
+
lineNumbers?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Whether the editor is read-only.
|
|
134
|
+
*
|
|
135
|
+
* @default false
|
|
136
|
+
*/
|
|
137
|
+
readonly?: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* String value to assign to the aria-label attribute of the editor.
|
|
140
|
+
*/
|
|
141
|
+
ariaLabel?: string;
|
|
142
|
+
/**
|
|
143
|
+
* Whether keybindings for inserting indents with the Tab key should be disabled.
|
|
144
|
+
*
|
|
145
|
+
* true will not create keybindings for inserting indents.
|
|
146
|
+
* false will create keybindings for inserting indents.
|
|
147
|
+
*
|
|
148
|
+
* @default false
|
|
149
|
+
*/
|
|
150
|
+
moveFocusOnTab?: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* Render a panel as a block widget inside the editor.
|
|
153
|
+
* The widget DOM is only rebuilt when `pos` or `placement` change
|
|
154
|
+
*/
|
|
155
|
+
inlinePanel?: InlinePanelProps | null;
|
|
156
|
+
/**
|
|
157
|
+
* Render a unified diff of the current document against `diff.original`.
|
|
158
|
+
* Deleted lines are shown as uneditable widgets.
|
|
159
|
+
*/
|
|
160
|
+
diff?: DiffProps | null;
|
|
161
|
+
/**
|
|
162
|
+
* React content rendered as a cluster of action buttons (e.g. a context menu
|
|
163
|
+
* + Run) pinned to the top-right corner of the editor. Omit (or `null`) to
|
|
164
|
+
* hide it.
|
|
165
|
+
*/
|
|
166
|
+
editorActions?: ReactNode;
|
|
167
|
+
}
|
|
168
|
+
export type InlinePanelProps = {
|
|
169
|
+
/**
|
|
170
|
+
* Position the panel anchors to.
|
|
171
|
+
*/
|
|
172
|
+
pos: number;
|
|
173
|
+
/**
|
|
174
|
+
* Whether to render above or below the line
|
|
175
|
+
*
|
|
176
|
+
* @default 'above'
|
|
177
|
+
*/
|
|
178
|
+
placement?: 'above' | 'below';
|
|
179
|
+
} & InlinePanelCallbacks;
|
|
180
|
+
type CypherEditorState = {
|
|
181
|
+
editorActionsContainer: HTMLElement | null;
|
|
182
|
+
};
|
|
183
|
+
declare class CodemirrorSymbolFetcher {
|
|
184
|
+
constructor(languageService: CypherLanguageService);
|
|
185
|
+
private languageService;
|
|
186
|
+
private processing;
|
|
187
|
+
private nextJob;
|
|
188
|
+
private symbolTablePool;
|
|
189
|
+
queueSymbolJob(query: string, schema: DbSchema): void;
|
|
190
|
+
terminate(): void;
|
|
191
|
+
private processJobQueue;
|
|
192
|
+
}
|
|
193
|
+
export declare class CypherEditor extends Component<CypherEditorProps, CypherEditorState> {
|
|
194
|
+
/**
|
|
195
|
+
* The symbol fetcher object used to fetch the current symbol table on document changes
|
|
196
|
+
*/
|
|
197
|
+
symbolFetcher: CodemirrorSymbolFetcher;
|
|
198
|
+
/**
|
|
199
|
+
* The codemirror editor container.
|
|
200
|
+
*/
|
|
201
|
+
editorContainer: React.RefObject<HTMLDivElement>;
|
|
202
|
+
/**
|
|
203
|
+
* The codemirror editor state.
|
|
204
|
+
*/
|
|
205
|
+
editorState: React.MutableRefObject<EditorState>;
|
|
206
|
+
/**
|
|
207
|
+
* The codemirror editor view.
|
|
208
|
+
*/
|
|
209
|
+
editorView: React.MutableRefObject<EditorView>;
|
|
210
|
+
private schemaRef;
|
|
211
|
+
private inlinePanelController;
|
|
212
|
+
private editorActionsController;
|
|
213
|
+
state: CypherEditorState;
|
|
214
|
+
private editorActionsCallbacks;
|
|
215
|
+
/**
|
|
216
|
+
* Format Cypher query
|
|
217
|
+
*/
|
|
218
|
+
format(): void;
|
|
219
|
+
/**
|
|
220
|
+
* Focus the editor
|
|
221
|
+
*/
|
|
222
|
+
focus(): void;
|
|
223
|
+
/**
|
|
224
|
+
* Move the cursor to the supplied position.
|
|
225
|
+
* For example, to move the cursor to the end of the editor, use `value.length`
|
|
226
|
+
*/
|
|
227
|
+
updateCursorPosition(position: number): void;
|
|
228
|
+
/**
|
|
229
|
+
* Externally set the editor value and focus the editor.
|
|
230
|
+
*/
|
|
231
|
+
setValueAndFocus(value?: string): void;
|
|
232
|
+
static defaultProps: CypherEditorProps;
|
|
233
|
+
private debouncedOnChange;
|
|
234
|
+
componentDidMount(): void;
|
|
235
|
+
private setEditorActions;
|
|
236
|
+
private openInlinePanel;
|
|
237
|
+
private updateInlinePanel;
|
|
238
|
+
private closeInlinePanel;
|
|
239
|
+
componentDidUpdate(prevProps: CypherEditorProps): void;
|
|
240
|
+
componentWillUnmount(): void;
|
|
241
|
+
render(): React.ReactNode;
|
|
242
|
+
}
|
|
243
|
+
export {};
|