@neo4j-cypher/react-codemirror 2.0.0-next.4 → 2.0.0-next.6
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/{types/CypherEditor.d.ts → CypherEditor.d.ts} +10 -1
- package/dist/CypherEditor.js +206 -0
- package/dist/CypherEditor.js.map +1 -0
- package/dist/e2e_tests/autoCompletion.spec.js +133 -0
- package/dist/e2e_tests/autoCompletion.spec.js.map +1 -0
- package/dist/e2e_tests/e2eUtils.js +52 -0
- package/dist/e2e_tests/e2eUtils.js.map +1 -0
- package/dist/e2e_tests/extraKeybindings.spec.js +44 -0
- package/dist/e2e_tests/extraKeybindings.spec.js.map +1 -0
- package/dist/e2e_tests/historyNavigation.spec.js +136 -0
- package/dist/e2e_tests/historyNavigation.spec.js.map +1 -0
- package/dist/e2e_tests/performanceTest.spec.d.ts +6 -0
- package/dist/e2e_tests/performanceTest.spec.js +96 -0
- package/dist/e2e_tests/performanceTest.spec.js.map +1 -0
- package/dist/e2e_tests/sanityChecks.spec.js +65 -0
- package/dist/e2e_tests/sanityChecks.spec.js.map +1 -0
- package/dist/e2e_tests/signatureHelp.spec.js +151 -0
- package/dist/e2e_tests/signatureHelp.spec.js.map +1 -0
- package/dist/e2e_tests/syntaxHighlighting.spec.js +91 -0
- package/dist/e2e_tests/syntaxHighlighting.spec.js.map +1 -0
- package/dist/e2e_tests/syntaxValidation.spec.js +79 -0
- package/dist/e2e_tests/syntaxValidation.spec.js.map +1 -0
- package/dist/historyNavigation.js +163 -0
- package/dist/historyNavigation.js.map +1 -0
- package/dist/{types/icons.d.ts → icons.d.ts} +1 -1
- package/dist/icons.js +62 -0
- package/dist/icons.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/{types/lang-cypher → lang-cypher}/autocomplete.d.ts +1 -1
- package/dist/lang-cypher/autocomplete.js +56 -0
- package/dist/lang-cypher/autocomplete.js.map +1 -0
- package/dist/{types/lang-cypher → lang-cypher}/constants.d.ts +9 -0
- package/dist/lang-cypher/constants.js +65 -0
- package/dist/lang-cypher/constants.js.map +1 -0
- package/dist/lang-cypher/contants.test.js +102 -0
- package/dist/lang-cypher/contants.test.js.map +1 -0
- package/dist/lang-cypher/createCypherTheme.js +144 -0
- package/dist/lang-cypher/createCypherTheme.js.map +1 -0
- package/dist/{types/lang-cypher/lang-cypher.d.ts → lang-cypher/langCypher.d.ts} +3 -1
- package/dist/lang-cypher/langCypher.js +24 -0
- package/dist/lang-cypher/langCypher.js.map +1 -0
- package/dist/lang-cypher/lintWorker.d.ts +8 -0
- package/dist/lang-cypher/lintWorker.js +4 -0
- package/dist/lang-cypher/lintWorker.js.map +1 -0
- package/dist/lang-cypher/parser-adapter.d.ts +19 -0
- package/dist/lang-cypher/parser-adapter.js +113 -0
- package/dist/lang-cypher/parser-adapter.js.map +1 -0
- package/dist/lang-cypher/signatureHelp.d.ts +4 -0
- package/dist/lang-cypher/signatureHelp.js +77 -0
- package/dist/lang-cypher/signatureHelp.js.map +1 -0
- package/dist/lang-cypher/syntaxValidation.d.ts +5 -0
- package/dist/lang-cypher/syntaxValidation.js +71 -0
- package/dist/lang-cypher/syntaxValidation.js.map +1 -0
- package/dist/lang-cypher/themeIcons.js +22 -0
- package/dist/lang-cypher/themeIcons.js.map +1 -0
- package/dist/ndlTokensCopy.js +380 -0
- package/dist/ndlTokensCopy.js.map +1 -0
- package/dist/ndlTokensCopy.test.js +11 -0
- package/dist/ndlTokensCopy.test.js.map +1 -0
- package/dist/neo4jSetup.js +86 -0
- package/dist/neo4jSetup.js.map +1 -0
- package/dist/{types/themes.d.ts → themes.d.ts} +1 -1
- package/dist/themes.js +114 -0
- package/dist/themes.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +15 -18
- package/src/CypherEditor.tsx +34 -8
- package/src/e2e_tests/{auto-completion.spec.tsx → autoCompletion.spec.tsx} +8 -4
- package/src/e2e_tests/{extra-keybindings.spec.tsx → extraKeybindings.spec.tsx} +1 -1
- package/src/e2e_tests/{history-navigation.spec.tsx → historyNavigation.spec.tsx} +1 -1
- package/src/e2e_tests/performanceTest.spec.tsx +158 -0
- package/src/e2e_tests/{sanity-checks.spec.tsx → sanityChecks.spec.tsx} +8 -3
- package/src/e2e_tests/signatureHelp.spec.tsx +312 -0
- package/src/e2e_tests/{syntax-highlighting.spec.tsx → syntaxHighlighting.spec.tsx} +1 -1
- package/src/e2e_tests/{syntax-validation.spec.tsx → syntaxValidation.spec.tsx} +3 -3
- package/src/icons.ts +3 -0
- package/src/index.ts +2 -2
- package/src/lang-cypher/autocomplete.ts +7 -2
- package/src/lang-cypher/constants.ts +23 -0
- package/src/lang-cypher/{create-cypher-theme.ts → createCypherTheme.ts} +5 -1
- package/src/lang-cypher/{lang-cypher.ts → langCypher.ts} +16 -7
- package/src/lang-cypher/lintWorker.ts +14 -0
- package/src/lang-cypher/parser-adapter.ts +145 -0
- package/src/lang-cypher/signatureHelp.ts +102 -0
- package/src/lang-cypher/syntaxValidation.ts +99 -0
- package/src/{ndl-tokens-copy.test.ts → ndlTokensCopy.test.ts} +1 -1
- package/src/themes.ts +4 -2
- 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/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/syntax-validation.d.ts +0 -3
- package/dist/types/tsconfig.tsbuildinfo +0 -1
- package/src/e2e_tests/mock-data.ts +0 -4310
- package/src/e2e_tests/performance-test.spec.tsx +0 -71
- package/src/lang-cypher/ParserAdapter.ts +0 -92
- package/src/lang-cypher/syntax-validation.ts +0 -24
- /package/dist/{types/e2e_tests/auto-completion.spec.d.ts → e2e_tests/autoCompletion.spec.d.ts} +0 -0
- /package/dist/{types/e2e_tests/e2e-utils.d.ts → e2e_tests/e2eUtils.d.ts} +0 -0
- /package/dist/{types/e2e_tests/extra-keybindings.spec.d.ts → e2e_tests/extraKeybindings.spec.d.ts} +0 -0
- /package/dist/{types/e2e_tests/history-navigation.spec.d.ts → e2e_tests/historyNavigation.spec.d.ts} +0 -0
- /package/dist/{types/e2e_tests/performance-test.spec.d.ts → e2e_tests/sanityChecks.spec.d.ts} +0 -0
- /package/dist/{types/e2e_tests/sanity-checks.spec.d.ts → e2e_tests/signatureHelp.spec.d.ts} +0 -0
- /package/dist/{types/e2e_tests/syntax-highlighting.spec.d.ts → e2e_tests/syntaxHighlighting.spec.d.ts} +0 -0
- /package/dist/{types/e2e_tests/syntax-validation.spec.d.ts → e2e_tests/syntaxValidation.spec.d.ts} +0 -0
- /package/dist/{types/history-navigation.d.ts → historyNavigation.d.ts} +0 -0
- /package/dist/{types/lang-cypher → lang-cypher}/contants.test.d.ts +0 -0
- /package/dist/{types/lang-cypher/create-cypher-theme.d.ts → lang-cypher/createCypherTheme.d.ts} +0 -0
- /package/dist/{types/lang-cypher/theme-icons.d.ts → lang-cypher/themeIcons.d.ts} +0 -0
- /package/dist/{types/ndl-tokens-copy.d.ts → ndlTokensCopy.d.ts} +0 -0
- /package/dist/{types/ndl-tokens-copy.test.d.ts → ndlTokensCopy.test.d.ts} +0 -0
- /package/dist/{types/neo4j-setup.d.ts → neo4jSetup.d.ts} +0 -0
- /package/src/e2e_tests/{e2e-utils.ts → e2eUtils.ts} +0 -0
- /package/src/{history-navigation.ts → historyNavigation.ts} +0 -0
- /package/src/lang-cypher/{theme-icons.ts → themeIcons.ts} +0 -0
- /package/src/{ndl-tokens-copy.ts → ndlTokensCopy.ts} +0 -0
- /package/src/{neo4j-setup.tsx → neo4jSetup.tsx} +0 -0
package/dist/cjs/index.cjs
DELETED
|
@@ -1,1441 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// src/index.ts
|
|
20
|
-
var src_exports = {};
|
|
21
|
-
__export(src_exports, {
|
|
22
|
-
CypherEditor: () => CypherEditor,
|
|
23
|
-
CypherParser: () => import_language_support4.CypherParser,
|
|
24
|
-
cypher: () => cypher,
|
|
25
|
-
darkThemeConstants: () => darkThemeConstants,
|
|
26
|
-
lightThemeConstants: () => lightThemeConstants,
|
|
27
|
-
parse: () => import_language_support4.parse
|
|
28
|
-
});
|
|
29
|
-
module.exports = __toCommonJS(src_exports);
|
|
30
|
-
var import_language_support4 = require("@neo4j-cypher/language-support");
|
|
31
|
-
|
|
32
|
-
// src/CypherEditor.tsx
|
|
33
|
-
var import_state4 = require("@codemirror/state");
|
|
34
|
-
var import_view4 = require("@codemirror/view");
|
|
35
|
-
var import_react = require("react");
|
|
36
|
-
|
|
37
|
-
// src/history-navigation.ts
|
|
38
|
-
var import_state = require("@codemirror/state");
|
|
39
|
-
var import_view = require("@codemirror/view");
|
|
40
|
-
var import_state2 = require("@codemirror/state");
|
|
41
|
-
var DRAFT_ENTRY_INDEX = -1;
|
|
42
|
-
var historyInitialState = {
|
|
43
|
-
history: [],
|
|
44
|
-
index: DRAFT_ENTRY_INDEX,
|
|
45
|
-
documentUpdate: null,
|
|
46
|
-
draft: ""
|
|
47
|
-
};
|
|
48
|
-
var historyState = import_state2.StateField.define({
|
|
49
|
-
create() {
|
|
50
|
-
return historyInitialState;
|
|
51
|
-
},
|
|
52
|
-
toJSON(value) {
|
|
53
|
-
return JSON.stringify(value);
|
|
54
|
-
},
|
|
55
|
-
update(value, transaction) {
|
|
56
|
-
for (const effect of transaction.effects) {
|
|
57
|
-
if (effect.is(moveInHistory)) {
|
|
58
|
-
if (value.history.length === 0) {
|
|
59
|
-
return {
|
|
60
|
-
...value,
|
|
61
|
-
documentUpdate: null
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
const currentHistoryIndex = value.index;
|
|
65
|
-
if (effect.value === "BACK") {
|
|
66
|
-
const newHistoryIndex = currentHistoryIndex + 1;
|
|
67
|
-
if (newHistoryIndex === value.history.length) {
|
|
68
|
-
return {
|
|
69
|
-
...value,
|
|
70
|
-
documentUpdate: null
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
let draft = value.draft;
|
|
74
|
-
if (currentHistoryIndex === DRAFT_ENTRY_INDEX) {
|
|
75
|
-
draft = transaction.state.doc.toString();
|
|
76
|
-
}
|
|
77
|
-
return {
|
|
78
|
-
...value,
|
|
79
|
-
draft,
|
|
80
|
-
index: newHistoryIndex,
|
|
81
|
-
documentUpdate: value.history[newHistoryIndex]
|
|
82
|
-
};
|
|
83
|
-
} else if (effect.value === "FORWARDS") {
|
|
84
|
-
const newHistoryIndex = currentHistoryIndex - 1;
|
|
85
|
-
if (currentHistoryIndex === DRAFT_ENTRY_INDEX) {
|
|
86
|
-
return { ...value, documentUpdate: null };
|
|
87
|
-
}
|
|
88
|
-
if (newHistoryIndex === DRAFT_ENTRY_INDEX) {
|
|
89
|
-
return {
|
|
90
|
-
...value,
|
|
91
|
-
index: newHistoryIndex,
|
|
92
|
-
documentUpdate: value.draft
|
|
93
|
-
};
|
|
94
|
-
} else {
|
|
95
|
-
return {
|
|
96
|
-
...value,
|
|
97
|
-
index: newHistoryIndex,
|
|
98
|
-
documentUpdate: value.history[newHistoryIndex]
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
} else if (effect.is(replaceHistory)) {
|
|
103
|
-
return {
|
|
104
|
-
...value,
|
|
105
|
-
index: DRAFT_ENTRY_INDEX,
|
|
106
|
-
history: effect.value
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
return value;
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
var moveInHistory = import_state.StateEffect.define();
|
|
114
|
-
var replaceHistory = import_state.StateEffect.define();
|
|
115
|
-
function navigateHistory(view, direction) {
|
|
116
|
-
view.dispatch(
|
|
117
|
-
view.state.update({
|
|
118
|
-
effects: moveInHistory.of(direction),
|
|
119
|
-
selection: { anchor: view.state.doc.length }
|
|
120
|
-
})
|
|
121
|
-
);
|
|
122
|
-
const updatedHistory = view.state.field(historyState, false);
|
|
123
|
-
if (updatedHistory.documentUpdate !== null) {
|
|
124
|
-
view.dispatch(
|
|
125
|
-
view.state.update({
|
|
126
|
-
changes: {
|
|
127
|
-
from: 0,
|
|
128
|
-
to: view.state.doc.length,
|
|
129
|
-
insert: updatedHistory.documentUpdate
|
|
130
|
-
}
|
|
131
|
-
})
|
|
132
|
-
);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
var replMode = ({ history: history2 }) => {
|
|
136
|
-
return [
|
|
137
|
-
historyState.init(() => ({
|
|
138
|
-
...historyInitialState,
|
|
139
|
-
history: history2
|
|
140
|
-
})),
|
|
141
|
-
import_view.keymap.of([
|
|
142
|
-
{
|
|
143
|
-
key: "ArrowUp",
|
|
144
|
-
preventDefault: true,
|
|
145
|
-
run: (view) => {
|
|
146
|
-
const { empty, head } = view.state.selection.main;
|
|
147
|
-
if (!empty || head !== 0) {
|
|
148
|
-
return false;
|
|
149
|
-
}
|
|
150
|
-
navigateHistory(view, "BACK");
|
|
151
|
-
return true;
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
mac: "Cmd-ArrowUp",
|
|
156
|
-
win: "Ctrl-ArrowUp",
|
|
157
|
-
linux: "Ctrl-ArrowUp",
|
|
158
|
-
preventDefault: true,
|
|
159
|
-
run: (view) => {
|
|
160
|
-
const { empty, head } = view.state.selection.main;
|
|
161
|
-
if (!empty || head !== 0) {
|
|
162
|
-
return false;
|
|
163
|
-
}
|
|
164
|
-
navigateHistory(view, "BACK");
|
|
165
|
-
return true;
|
|
166
|
-
}
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
key: "ArrowDown",
|
|
170
|
-
preventDefault: true,
|
|
171
|
-
run: (view) => {
|
|
172
|
-
const { empty, head } = view.state.selection.main;
|
|
173
|
-
if (!empty || head !== view.state.doc.length) {
|
|
174
|
-
return false;
|
|
175
|
-
}
|
|
176
|
-
navigateHistory(view, "FORWARDS");
|
|
177
|
-
return true;
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
mac: "Cmd-ArrowDown",
|
|
182
|
-
win: "Ctrl-ArrowDown",
|
|
183
|
-
linux: "Ctrl-ArrowDown",
|
|
184
|
-
preventDefault: true,
|
|
185
|
-
run: (view) => {
|
|
186
|
-
const { empty, head } = view.state.selection.main;
|
|
187
|
-
if (!empty || head !== view.state.doc.length) {
|
|
188
|
-
return false;
|
|
189
|
-
}
|
|
190
|
-
navigateHistory(view, "FORWARDS");
|
|
191
|
-
return true;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
])
|
|
195
|
-
];
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
// src/lang-cypher/lang-cypher.ts
|
|
199
|
-
var import_language2 = require("@codemirror/language");
|
|
200
|
-
|
|
201
|
-
// src/lang-cypher/autocomplete.ts
|
|
202
|
-
var import_language_support = require("@neo4j-cypher/language-support");
|
|
203
|
-
var import_vscode_languageserver_types = require("vscode-languageserver-types");
|
|
204
|
-
var completionKindToCodemirrorIcon = (c) => {
|
|
205
|
-
const map = {
|
|
206
|
-
[import_vscode_languageserver_types.CompletionItemKind.Text]: "Text",
|
|
207
|
-
[import_vscode_languageserver_types.CompletionItemKind.Method]: "Method",
|
|
208
|
-
[import_vscode_languageserver_types.CompletionItemKind.Function]: "Function",
|
|
209
|
-
[import_vscode_languageserver_types.CompletionItemKind.Constructor]: "Constructor",
|
|
210
|
-
[import_vscode_languageserver_types.CompletionItemKind.Field]: "Field",
|
|
211
|
-
[import_vscode_languageserver_types.CompletionItemKind.Variable]: "Variable",
|
|
212
|
-
[import_vscode_languageserver_types.CompletionItemKind.Class]: "Class",
|
|
213
|
-
[import_vscode_languageserver_types.CompletionItemKind.Interface]: "Interface",
|
|
214
|
-
[import_vscode_languageserver_types.CompletionItemKind.Module]: "Module",
|
|
215
|
-
[import_vscode_languageserver_types.CompletionItemKind.Property]: "Property",
|
|
216
|
-
[import_vscode_languageserver_types.CompletionItemKind.Unit]: "Unit",
|
|
217
|
-
[import_vscode_languageserver_types.CompletionItemKind.Value]: "Value",
|
|
218
|
-
[import_vscode_languageserver_types.CompletionItemKind.Enum]: "Enum",
|
|
219
|
-
[import_vscode_languageserver_types.CompletionItemKind.Keyword]: "Keyword",
|
|
220
|
-
[import_vscode_languageserver_types.CompletionItemKind.Snippet]: "Snippet",
|
|
221
|
-
[import_vscode_languageserver_types.CompletionItemKind.Color]: "Color",
|
|
222
|
-
[import_vscode_languageserver_types.CompletionItemKind.File]: "File",
|
|
223
|
-
[import_vscode_languageserver_types.CompletionItemKind.Reference]: "Reference",
|
|
224
|
-
[import_vscode_languageserver_types.CompletionItemKind.Folder]: "Folder",
|
|
225
|
-
[import_vscode_languageserver_types.CompletionItemKind.EnumMember]: "EnumMember",
|
|
226
|
-
[import_vscode_languageserver_types.CompletionItemKind.Constant]: "Constant",
|
|
227
|
-
[import_vscode_languageserver_types.CompletionItemKind.Struct]: "Struct",
|
|
228
|
-
[import_vscode_languageserver_types.CompletionItemKind.Event]: "Event",
|
|
229
|
-
[import_vscode_languageserver_types.CompletionItemKind.Operator]: "Operator",
|
|
230
|
-
[import_vscode_languageserver_types.CompletionItemKind.TypeParameter]: "TypeParameter"
|
|
231
|
-
};
|
|
232
|
-
return map[c];
|
|
233
|
-
};
|
|
234
|
-
var cypherAutocomplete = (config) => (context) => {
|
|
235
|
-
const textUntilCursor = context.state.doc.toString().slice(0, context.pos);
|
|
236
|
-
const triggerCharacters = [".", ":", "{", "$"];
|
|
237
|
-
const lastCharacter = textUntilCursor.slice(-1);
|
|
238
|
-
const lastWord = context.matchBefore(/\w*/);
|
|
239
|
-
const inWord = lastWord.from !== lastWord.to;
|
|
240
|
-
const shouldTriggerCompletion = inWord || context.explicit || triggerCharacters.includes(lastCharacter);
|
|
241
|
-
if (!shouldTriggerCompletion) {
|
|
242
|
-
return null;
|
|
243
|
-
}
|
|
244
|
-
const options = (0, import_language_support.autocomplete)(textUntilCursor, config.schema ?? {});
|
|
245
|
-
return {
|
|
246
|
-
from: context.matchBefore(/(\w|\$)*$/).from,
|
|
247
|
-
options: options.map((o) => ({
|
|
248
|
-
label: o.label,
|
|
249
|
-
type: completionKindToCodemirrorIcon(o.kind)
|
|
250
|
-
}))
|
|
251
|
-
};
|
|
252
|
-
};
|
|
253
|
-
|
|
254
|
-
// src/lang-cypher/ParserAdapter.ts
|
|
255
|
-
var import_common2 = require("@lezer/common");
|
|
256
|
-
var import_language_support2 = require("@neo4j-cypher/language-support");
|
|
257
|
-
|
|
258
|
-
// src/lang-cypher/constants.ts
|
|
259
|
-
var import_language = require("@codemirror/language");
|
|
260
|
-
var import_common = require("@lezer/common");
|
|
261
|
-
var import_highlight = require("@lezer/highlight");
|
|
262
|
-
var cypherTokenTypeToNode = (facet2) => ({
|
|
263
|
-
topNode: import_common.NodeType.define({
|
|
264
|
-
id: 0,
|
|
265
|
-
name: "topNode",
|
|
266
|
-
props: [import_language.languageDataProp.add({ topNode: facet2 })]
|
|
267
|
-
}),
|
|
268
|
-
comment: import_common.NodeType.define({ id: 1, name: "comment" }),
|
|
269
|
-
keyword: import_common.NodeType.define({ id: 2, name: "keyword" }),
|
|
270
|
-
label: import_common.NodeType.define({ id: 3, name: "label" }),
|
|
271
|
-
predicateFunction: import_common.NodeType.define({ id: 4, name: "predicateFunction" }),
|
|
272
|
-
function: import_common.NodeType.define({ id: 5, name: "function" }),
|
|
273
|
-
procedure: import_common.NodeType.define({ id: 6, name: "procedure" }),
|
|
274
|
-
variable: import_common.NodeType.define({ id: 7, name: "variable" }),
|
|
275
|
-
paramDollar: import_common.NodeType.define({ id: 8, name: "paramDollar" }),
|
|
276
|
-
paramValue: import_common.NodeType.define({ id: 9, name: "paramValue" }),
|
|
277
|
-
symbolicName: import_common.NodeType.define({ id: 10, name: "symbolicName" }),
|
|
278
|
-
operator: import_common.NodeType.define({ id: 11, name: "operator" }),
|
|
279
|
-
stringLiteral: import_common.NodeType.define({ id: 12, name: "stringLiteral" }),
|
|
280
|
-
numberLiteral: import_common.NodeType.define({ id: 13, name: "numberLiteral" }),
|
|
281
|
-
booleanLiteral: import_common.NodeType.define({ id: 14, name: "booleanLiteral" }),
|
|
282
|
-
keywordLiteral: import_common.NodeType.define({ id: 15, name: "keywordLiteral" }),
|
|
283
|
-
property: import_common.NodeType.define({ id: 16, name: "property" }),
|
|
284
|
-
namespace: import_common.NodeType.define({ id: 17, name: "namespace" }),
|
|
285
|
-
bracket: import_common.NodeType.define({ id: 18, name: "bracket" }),
|
|
286
|
-
none: import_common.NodeType.define({ id: 19, name: "none" }),
|
|
287
|
-
separator: import_common.NodeType.define({ id: 20, name: "separator" }),
|
|
288
|
-
punctuation: import_common.NodeType.define({ id: 21, name: "punctuation" })
|
|
289
|
-
});
|
|
290
|
-
var tokenTypeToStyleTag = {
|
|
291
|
-
comment: import_highlight.tags.comment,
|
|
292
|
-
keyword: import_highlight.tags.keyword,
|
|
293
|
-
label: import_highlight.tags.typeName,
|
|
294
|
-
predicateFunction: import_highlight.tags.function(import_highlight.tags.variableName),
|
|
295
|
-
function: import_highlight.tags.function(import_highlight.tags.variableName),
|
|
296
|
-
procedure: import_highlight.tags.function(import_highlight.tags.variableName),
|
|
297
|
-
variable: import_highlight.tags.variableName,
|
|
298
|
-
paramDollar: import_highlight.tags.atom,
|
|
299
|
-
paramValue: import_highlight.tags.atom,
|
|
300
|
-
symbolicName: import_highlight.tags.variableName,
|
|
301
|
-
operator: import_highlight.tags.operator,
|
|
302
|
-
stringLiteral: import_highlight.tags.string,
|
|
303
|
-
numberLiteral: import_highlight.tags.number,
|
|
304
|
-
booleanLiteral: import_highlight.tags.bool,
|
|
305
|
-
keywordLiteral: import_highlight.tags.operatorKeyword,
|
|
306
|
-
property: import_highlight.tags.propertyName,
|
|
307
|
-
namespace: import_highlight.tags.namespace,
|
|
308
|
-
bracket: import_highlight.tags.bracket,
|
|
309
|
-
punctuation: import_highlight.tags.punctuation,
|
|
310
|
-
separator: import_highlight.tags.separator
|
|
311
|
-
};
|
|
312
|
-
var parserAdapterNodeSet = (nodes) => new import_common.NodeSet(Object.values(nodes)).extend((0, import_highlight.styleTags)(tokenTypeToStyleTag));
|
|
313
|
-
|
|
314
|
-
// src/lang-cypher/ParserAdapter.ts
|
|
315
|
-
var DEFAULT_NODE_GROUP_SIZE = 4;
|
|
316
|
-
var ParserAdapter = class extends import_common2.Parser {
|
|
317
|
-
cypherTokenTypeToNode;
|
|
318
|
-
constructor(facet2) {
|
|
319
|
-
super();
|
|
320
|
-
this.cypherTokenTypeToNode = cypherTokenTypeToNode(facet2);
|
|
321
|
-
}
|
|
322
|
-
createBufferForTokens(tokens2) {
|
|
323
|
-
return tokens2.map((token) => {
|
|
324
|
-
const nodeTypeId = this.cypherTokenTypeToNode[token.tokenType].id;
|
|
325
|
-
const startOffset = token.position.startOffset;
|
|
326
|
-
const endOffset = token.position.startOffset + token.length;
|
|
327
|
-
return [nodeTypeId, startOffset, endOffset, DEFAULT_NODE_GROUP_SIZE];
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
|
-
addTopNodeToBuffer(buffer, document2) {
|
|
331
|
-
const id = this.cypherTokenTypeToNode.topNode.id;
|
|
332
|
-
const startOffset = 0;
|
|
333
|
-
const endOffset = document2.length;
|
|
334
|
-
const totalBufferLength = buffer.length * DEFAULT_NODE_GROUP_SIZE;
|
|
335
|
-
buffer.push([
|
|
336
|
-
id,
|
|
337
|
-
startOffset,
|
|
338
|
-
endOffset,
|
|
339
|
-
totalBufferLength + DEFAULT_NODE_GROUP_SIZE
|
|
340
|
-
]);
|
|
341
|
-
}
|
|
342
|
-
buildTree(document2) {
|
|
343
|
-
const tokens2 = (0, import_language_support2.applySyntaxColouring)(document2);
|
|
344
|
-
if (tokens2.length < 1) {
|
|
345
|
-
return import_common2.Tree.build({
|
|
346
|
-
buffer: [
|
|
347
|
-
this.cypherTokenTypeToNode.topNode.id,
|
|
348
|
-
0,
|
|
349
|
-
document2.length,
|
|
350
|
-
DEFAULT_NODE_GROUP_SIZE
|
|
351
|
-
],
|
|
352
|
-
nodeSet: parserAdapterNodeSet(this.cypherTokenTypeToNode),
|
|
353
|
-
topID: this.cypherTokenTypeToNode.topNode.id
|
|
354
|
-
});
|
|
355
|
-
}
|
|
356
|
-
const buffer = this.createBufferForTokens(tokens2);
|
|
357
|
-
this.addTopNodeToBuffer(buffer, document2);
|
|
358
|
-
return import_common2.Tree.build({
|
|
359
|
-
buffer: buffer.flat(),
|
|
360
|
-
nodeSet: parserAdapterNodeSet(this.cypherTokenTypeToNode),
|
|
361
|
-
topID: this.cypherTokenTypeToNode.topNode.id
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
createParse(input) {
|
|
365
|
-
return this.startParse(input);
|
|
366
|
-
}
|
|
367
|
-
/* There are more arguments, but since we don't do any incremental parsing, they are not useful */
|
|
368
|
-
startParse(input) {
|
|
369
|
-
const document2 = typeof input === "string" ? input : input.read(0, input.length);
|
|
370
|
-
const tree = this.buildTree(document2);
|
|
371
|
-
return {
|
|
372
|
-
stoppedAt: input.length,
|
|
373
|
-
parsedPos: input.length,
|
|
374
|
-
stopAt: () => {
|
|
375
|
-
return void 0;
|
|
376
|
-
},
|
|
377
|
-
advance: () => tree
|
|
378
|
-
};
|
|
379
|
-
}
|
|
380
|
-
};
|
|
381
|
-
|
|
382
|
-
// src/lang-cypher/syntax-validation.ts
|
|
383
|
-
var import_lint = require("@codemirror/lint");
|
|
384
|
-
var import_language_support3 = require("@neo4j-cypher/language-support");
|
|
385
|
-
var import_vscode_languageserver_types2 = require("vscode-languageserver-types");
|
|
386
|
-
var cypherLinter = (config) => (0, import_lint.linter)((view) => {
|
|
387
|
-
if (!config.lint) {
|
|
388
|
-
return [];
|
|
389
|
-
}
|
|
390
|
-
return (0, import_language_support3.validateSyntax)(view.state.doc.toString(), config.schema).map(
|
|
391
|
-
(diagnostic) => ({
|
|
392
|
-
from: diagnostic.offsets.start,
|
|
393
|
-
to: diagnostic.offsets.end,
|
|
394
|
-
severity: diagnostic.severity === import_vscode_languageserver_types2.DiagnosticSeverity.Error ? "error" : "warning",
|
|
395
|
-
message: diagnostic.message
|
|
396
|
-
})
|
|
397
|
-
);
|
|
398
|
-
});
|
|
399
|
-
|
|
400
|
-
// src/lang-cypher/lang-cypher.ts
|
|
401
|
-
var facet = (0, import_language2.defineLanguageFacet)({
|
|
402
|
-
commentTokens: { block: { open: "/*", close: "*/" }, line: "//" },
|
|
403
|
-
closeBrackets: { brackets: ["(", "[", "{", "'", '"', "`"] }
|
|
404
|
-
});
|
|
405
|
-
var parserAdapter = new ParserAdapter(facet);
|
|
406
|
-
var cypherLanguage = new import_language2.Language(facet, parserAdapter, [], "cypher");
|
|
407
|
-
function cypher(config) {
|
|
408
|
-
return new import_language2.LanguageSupport(cypherLanguage, [
|
|
409
|
-
cypherLanguage.data.of({
|
|
410
|
-
autocomplete: cypherAutocomplete(config)
|
|
411
|
-
}),
|
|
412
|
-
cypherLinter(config)
|
|
413
|
-
]);
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
// src/neo4j-setup.tsx
|
|
417
|
-
var import_autocomplete2 = require("@codemirror/autocomplete");
|
|
418
|
-
var import_commands = require("@codemirror/commands");
|
|
419
|
-
var import_language3 = require("@codemirror/language");
|
|
420
|
-
var import_search = require("@codemirror/search");
|
|
421
|
-
var import_state3 = require("@codemirror/state");
|
|
422
|
-
var import_view2 = require("@codemirror/view");
|
|
423
|
-
var import_lint2 = require("@codemirror/lint");
|
|
424
|
-
|
|
425
|
-
// src/icons.ts
|
|
426
|
-
function getIconForType(iconTypeString = "Text", isDarkTheme = false) {
|
|
427
|
-
const lightThemeIcons = {
|
|
428
|
-
Keyword: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M15.0002 4H10.0002V3H15.0002V4ZM14.0002 7H12.0002V8H14.0002V7ZM10.0002 7H1.00024V8H10.0002V7ZM12.0002 13H1.00024V14H12.0002V13ZM7.00024 10H1.00024V11H7.00024V10ZM15.0002 10H10.0002V11H15.0002V10ZM8.00024 2V5H1.00024V2H8.00024ZM7.00024 3H2.00024V4H7.00024V3Z" fill="#424242"/> </svg>`,
|
|
429
|
-
Text: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M7.22313 10.933C7.54888 11.1254 7.92188 11.2231 8.30013 11.215C8.63802 11.2218 8.97279 11.1492 9.27746 11.003C9.58213 10.8567 9.84817 10.6409 10.0541 10.373C10.5094 9.76519 10.7404 9.01867 10.7081 8.25998C10.7414 7.58622 10.5376 6.9221 10.1321 6.38298C9.93599 6.14161 9.68601 5.94957 9.40225 5.82228C9.11848 5.69498 8.80883 5.63597 8.49813 5.64997C8.07546 5.64699 7.66018 5.76085 7.29813 5.97898C7.18328 6.04807 7.07515 6.12775 6.97513 6.21698V3.47498H5.98413V11.1H6.97913V10.756C7.0554 10.8217 7.13702 10.8809 7.22313 10.933ZM7.85005 6.70006C8.03622 6.62105 8.23832 6.58677 8.44013 6.59998C8.61281 6.59452 8.78429 6.63054 8.94018 6.70501C9.09608 6.77948 9.23185 6.89023 9.33613 7.02798C9.59277 7.39053 9.71865 7.82951 9.69313 8.27297C9.71996 8.79748 9.57993 9.31701 9.29313 9.75698C9.18846 9.91527 9.04571 10.0447 8.87797 10.1335C8.71023 10.2223 8.52289 10.2675 8.33313 10.265C8.14958 10.2732 7.96654 10.24 7.79758 10.1678C7.62862 10.0956 7.47809 9.98628 7.35713 9.84797C7.10176 9.55957 6.96525 9.18506 6.97513 8.79998V8.19998C6.96324 7.78332 7.10287 7.3765 7.36813 7.05498C7.49883 6.90064 7.66388 6.77908 7.85005 6.70006ZM3.28926 5.67499C2.97035 5.67933 2.65412 5.734 2.35226 5.83699C2.06442 5.92293 1.79372 6.05828 1.55226 6.23699L1.45226 6.31399V7.51399L1.87526 7.15499C2.24603 6.80478 2.73158 6.60146 3.24126 6.58299C3.36617 6.57164 3.49194 6.59147 3.60731 6.64068C3.72267 6.6899 3.82402 6.76697 3.90226 6.86499C4.05245 7.0971 4.13264 7.36754 4.13326 7.64399L2.90026 7.82499C2.39459 7.87781 1.9155 8.07772 1.52226 8.39999C1.36721 8.55181 1.24363 8.73271 1.15859 8.93235C1.07355 9.13199 1.02873 9.34644 1.02668 9.56343C1.02464 9.78042 1.06542 9.99568 1.14668 10.1969C1.22795 10.3981 1.3481 10.5813 1.50026 10.736C1.66895 10.8904 1.86647 11.01 2.08149 11.0879C2.29651 11.1659 2.5248 11.2005 2.75326 11.19C3.14725 11.1931 3.53302 11.0774 3.86026 10.858C3.96178 10.7897 4.05744 10.7131 4.14626 10.629V11.073H5.08726V7.71499C5.12161 7.17422 4.95454 6.63988 4.61826 6.21499C4.45004 6.03285 4.24373 5.89003 4.01402 5.7967C3.78431 5.70336 3.53686 5.66181 3.28926 5.67499ZM4.14626 8.71599C4.16588 9.13435 4.02616 9.54459 3.75526 9.864C3.63714 10.0005 3.49023 10.1092 3.3251 10.1821C3.15998 10.2551 2.98073 10.2906 2.80026 10.286C2.69073 10.2945 2.5806 10.2812 2.47624 10.2469C2.37187 10.2125 2.27536 10.1579 2.19226 10.086C2.06104 9.93455 1.9888 9.74088 1.9888 9.54049C1.9888 9.34011 2.06104 9.14644 2.19226 8.99499C2.47347 8.82131 2.79258 8.71837 3.12226 8.69499L4.14226 8.54699L4.14626 8.71599ZM12.459 11.0325C12.7663 11.1638 13.0985 11.2261 13.4324 11.215C13.9273 11.227 14.4156 11.1006 14.8424 10.85L14.9654 10.775L14.9784 10.768V9.61504L14.5324 9.93504C14.2163 10.1592 13.8359 10.2747 13.4484 10.264C13.2499 10.2719 13.0522 10.2342 12.8705 10.1538C12.6889 10.0733 12.5281 9.95232 12.4004 9.80004C12.1146 9.42453 11.9728 8.95911 12.0004 8.48804C11.9739 7.98732 12.1355 7.49475 12.4534 7.10704C12.5936 6.94105 12.7698 6.80914 12.9685 6.7213C13.1672 6.63346 13.3833 6.592 13.6004 6.60004C13.9441 6.59844 14.281 6.69525 14.5714 6.87904L15.0004 7.14404V5.97004L14.8314 5.89704C14.4628 5.73432 14.0644 5.6502 13.6614 5.65004C13.3001 5.63991 12.9409 5.70762 12.608 5.84859C12.2752 5.98956 11.9766 6.20048 11.7324 6.46704C11.2263 7.02683 10.9584 7.76186 10.9854 8.51604C10.9569 9.22346 11.1958 9.91569 11.6544 10.455C11.8772 10.704 12.1518 10.9012 12.459 11.0325Z" fill="#424242"/> </svg>`,
|
|
430
|
-
Method: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M13.5103 4L8.51025 1H7.51025L2.51025 4L2.02026 4.85999V10.86L2.51025 11.71L7.51025 14.71H8.51025L13.5103 11.71L14.0002 10.86V4.85999L13.5103 4ZM7.51025 13.5601L3.01025 10.86V5.69995L7.51025 8.15002V13.5601ZM3.27026 4.69995L8.01025 1.85999L12.7502 4.69995L8.01025 7.29004L3.27026 4.69995ZM13.0103 10.86L8.51025 13.5601V8.15002L13.0103 5.69995V10.86Z" fill="#652D90"/> </svg>`,
|
|
431
|
-
Function: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M13.5103 4L8.51025 1H7.51025L2.51025 4L2.02026 4.85999V10.86L2.51025 11.71L7.51025 14.71H8.51025L13.5103 11.71L14.0002 10.86V4.85999L13.5103 4ZM7.51025 13.5601L3.01025 10.86V5.69995L7.51025 8.15002V13.5601ZM3.27026 4.69995L8.01025 1.85999L12.7502 4.69995L8.01025 7.29004L3.27026 4.69995ZM13.0103 10.86L8.51025 13.5601V8.15002L13.0103 5.69995V10.86Z" fill="#652D90"/> </svg>`,
|
|
432
|
-
Constructor: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M13.5103 4L8.51025 1H7.51025L2.51025 4L2.02026 4.85999V10.86L2.51025 11.71L7.51025 14.71H8.51025L13.5103 11.71L14.0002 10.86V4.85999L13.5103 4ZM7.51025 13.5601L3.01025 10.86V5.69995L7.51025 8.15002V13.5601ZM3.27026 4.69995L8.01025 1.85999L12.7502 4.69995L8.01025 7.29004L3.27026 4.69995ZM13.0103 10.86L8.51025 13.5601V8.15002L13.0103 5.69995V10.86Z" fill="#652D90"/> </svg>`,
|
|
433
|
-
Field: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M14.4502 4.5L9.4502 2H8.55029L1.55029 5.5L1.00024 6.39001V10.89L1.55029 11.79L6.55029 14.29H7.4502L14.4502 10.79L15.0002 9.89001V5.39001L14.4502 4.5ZM6.4502 13.14L1.9502 10.89V7.17004L6.4502 9.17004V13.14ZM6.9502 8.33997L2.29028 6.22998L8.9502 2.89001L13.6202 5.22998L6.9502 8.33997ZM13.9502 9.89001L7.4502 13.14V9.20996L13.9502 6.20996V9.89001Z" fill="#007ACC"/> </svg>`,
|
|
434
|
-
Variable: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M2.00024 5H4.00024V4H1.50024L1.00024 4.5V12.5L1.50024 13H4.00024V12H2.00024V5ZM14.5002 4H12.0002V5H14.0002V12H12.0002V13H14.5002L15.0002 12.5V4.5L14.5002 4ZM11.7603 6.56995L12.0002 7V9.51001L11.7002 9.95996L7.2002 11.96H6.74023L4.24023 10.46L4.00024 10.03V7.53003L4.30029 7.06995L8.80029 5.06995H9.26025L11.7603 6.56995ZM5.00024 9.70996L6.50024 10.61V9.28003L5.00024 8.38V9.70996ZM5.5802 7.56006L7.03027 8.43005L10.4203 6.93005L8.97021 6.06006L5.5802 7.56006ZM7.53027 10.73L11.0303 9.17004V7.77002L7.53027 9.31995V10.73Z" fill="#007ACC"/> </svg>`,
|
|
435
|
-
Class: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M11.3403 9.70998H12.0503L14.7202 7.04005V6.32997L13.3803 5.00001H12.6803L10.8603 6.81007H5.86024V5.56007L7.72023 3.70997V3L5.72022 1H5.00025L1.00024 5.00001V5.70997L3.00025 7.70998H3.71027L4.85023 6.56007V12.35L5.35023 12.85H10.0003V13.37L11.3303 14.71H12.0402L14.7103 12.0401V11.33L13.3703 10H12.6703L10.8103 11.85H5.81025V7.84999H10.0003V8.32997L11.3403 9.70998ZM13.0303 6.06007L13.6602 6.68995L11.6602 8.68996L11.0303 8.06007L13.0303 6.06007ZM13.0303 11.0601L13.6602 11.69L11.6602 13.69L11.0303 13.0601L13.0303 11.0601ZM3.35022 6.65004L2.06024 5.34998L5.35023 2.06006L6.65028 3.34998L3.35022 6.65004Z" fill="#D67E00"/> </svg>`,
|
|
436
|
-
Interface: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M11.4967 4C10.6552 3.9989 9.8416 4.30189 9.20581 4.85315C8.57002 5.40442 8.15489 6.16684 8.03674 7H4.93665C4.81495 6.52867 4.52557 6.11794 4.12268 5.84473C3.71979 5.57152 3.23108 5.45466 2.74817 5.51599C2.26526 5.57733 1.82131 5.81261 1.49951 6.17786C1.17772 6.54311 1.00024 7.01322 1.00024 7.5C1.00024 7.98679 1.17772 8.45689 1.49951 8.82215C1.82131 9.1874 2.26526 9.42267 2.74817 9.48401C3.23108 9.54535 3.71979 9.42848 4.12268 9.15528C4.52557 8.88207 4.81495 8.47133 4.93665 8H8.03674C8.13261 8.66418 8.41741 9.28683 8.85718 9.7937C9.29695 10.3006 9.87308 10.6703 10.5171 10.8589C11.1611 11.0475 11.8458 11.047 12.4895 10.8574C13.1332 10.6679 13.7089 10.2973 14.1479 9.7898C14.587 9.28227 14.8708 8.65919 14.9657 7.99488C15.0606 7.33056 14.9624 6.65298 14.683 6.04285C14.4036 5.43272 13.9547 4.91578 13.3898 4.55359C12.8248 4.19141 12.1678 3.99922 11.4967 4V4ZM11.4967 10C11.0023 10 10.5189 9.85332 10.1078 9.57862C9.69667 9.30391 9.37623 8.91348 9.18701 8.45667C8.99779 7.99985 8.94834 7.49728 9.0448 7.01233C9.14126 6.52738 9.37925 6.08181 9.72888 5.73218C10.0785 5.38255 10.5241 5.14456 11.009 5.0481C11.494 4.95164 11.9966 5.00109 12.4534 5.19031C12.9102 5.37953 13.3006 5.69996 13.5753 6.11109C13.85 6.52221 13.9967 7.00555 13.9967 7.5C13.9967 8.16304 13.7334 8.79898 13.2645 9.26783C12.7957 9.73667 12.1597 10 11.4967 10V10Z" fill="#007ACC"/> </svg>`,
|
|
437
|
-
Module: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <g clip-path="url(#clip0)"> <path fill-rule="evenodd" clip-rule="evenodd" d="M6.00024 2.98361V2.97184V2H5.91107C5.59767 2 5.29431 2.06161 5.00152 2.18473C4.70842 2.30798 4.44967 2.48474 4.22602 2.71498C4.00336 2.94422 3.83816 3.19498 3.73306 3.46766L3.73257 3.46898C3.63406 3.7352 3.56839 4.01201 3.53557 4.29917L3.53543 4.30053C3.50702 4.5805 3.49894 4.86844 3.51108 5.16428C3.52297 5.45379 3.52891 5.74329 3.52891 6.03279C3.52891 6.23556 3.48999 6.42594 3.41225 6.60507L3.41185 6.60601C3.33712 6.78296 3.23447 6.93866 3.10341 7.07359C2.97669 7.20405 2.8249 7.31055 2.64696 7.3925C2.47084 7.46954 2.28522 7.5082 2.08942 7.5082H2.00024V7.6V8.4V8.4918H2.08942C2.2849 8.4918 2.47026 8.53238 2.64625 8.61334L2.64766 8.61396C2.82482 8.69157 2.97602 8.79762 3.10245 8.93161L3.10436 8.93352C3.23452 9.0637 3.33684 9.21871 3.41153 9.39942L3.41225 9.40108C3.49011 9.58047 3.52891 9.76883 3.52891 9.96721C3.52891 10.2567 3.52297 10.5462 3.51108 10.8357C3.49894 11.1316 3.50701 11.4215 3.5354 11.7055L3.5356 11.7072C3.56844 11.9903 3.63412 12.265 3.73256 12.531L3.73307 12.5323C3.83817 12.805 4.00336 13.0558 4.22602 13.285C4.44967 13.5153 4.70842 13.692 5.00152 13.8153C5.29431 13.9384 5.59767 14 5.91107 14H6.00024V13.2V13.0164H5.91107C5.71119 13.0164 5.52371 12.9777 5.34787 12.9008C5.17421 12.8191 5.02218 12.7126 4.89111 12.5818C4.76411 12.4469 4.66128 12.2911 4.58247 12.1137C4.50862 11.9346 4.47158 11.744 4.47158 11.541C4.47158 11.3127 4.47554 11.0885 4.48346 10.8686C4.49149 10.6411 4.49151 10.4195 4.48349 10.2039C4.47938 9.98246 4.46109 9.76883 4.42847 9.56312C4.39537 9.35024 4.33946 9.14757 4.26063 8.95536C4.18115 8.76157 4.07282 8.57746 3.9364 8.40298C3.8237 8.25881 3.68563 8.12462 3.52307 8C3.68563 7.87538 3.8237 7.74119 3.9364 7.59702C4.07282 7.42254 4.18115 7.23843 4.26063 7.04464C4.33938 6.85263 4.39537 6.65175 4.4285 6.44285C4.46107 6.2333 4.47938 6.01973 4.48349 5.80219C4.49151 5.58262 4.4915 5.36105 4.48345 5.13749C4.47554 4.9134 4.47158 4.68725 4.47158 4.45902C4.47158 4.26019 4.50857 4.07152 4.58263 3.89205C4.6616 3.71034 4.76445 3.55475 4.8911 3.42437C5.02218 3.28942 5.17485 3.18275 5.34826 3.10513C5.52404 3.02427 5.71138 2.98361 5.91107 2.98361H6.00024ZM10.0002 13.0164V13.0282V14H10.0894C10.4028 14 10.7062 13.9384 10.999 13.8153C11.2921 13.692 11.5508 13.5153 11.7745 13.285C11.9971 13.0558 12.1623 12.805 12.2674 12.5323L12.2679 12.531C12.3664 12.2648 12.4321 11.988 12.4649 11.7008L12.4651 11.6995C12.4935 11.4195 12.5015 11.1316 12.4894 10.8357C12.4775 10.5462 12.4716 10.2567 12.4716 9.96721C12.4716 9.76444 12.5105 9.57406 12.5882 9.39493L12.5886 9.39399C12.6634 9.21704 12.766 9.06134 12.8971 8.92642C13.0238 8.79595 13.1756 8.68945 13.3535 8.6075C13.5296 8.53046 13.7153 8.4918 13.9111 8.4918H14.0002V8.4V7.6V7.5082H13.9111C13.7156 7.5082 13.5302 7.46762 13.3542 7.38666L13.3528 7.38604C13.1757 7.30844 13.0245 7.20238 12.898 7.06839L12.8961 7.06648C12.766 6.9363 12.6637 6.78129 12.589 6.60058L12.5882 6.59892C12.5104 6.41953 12.4716 6.23117 12.4716 6.03279C12.4716 5.74329 12.4775 5.45379 12.4894 5.16428C12.5015 4.86842 12.4935 4.57848 12.4651 4.29454L12.4649 4.29285C12.4321 4.00971 12.3664 3.73502 12.2679 3.46897L12.2674 3.46766C12.1623 3.19499 11.9971 2.94422 11.7745 2.71498C11.5508 2.48474 11.2921 2.30798 10.999 2.18473C10.7062 2.06161 10.4028 2 10.0894 2H10.0002V2.8V2.98361H10.0894C10.2893 2.98361 10.4768 3.0223 10.6526 3.09917C10.8263 3.18092 10.9783 3.28736 11.1094 3.41823C11.2364 3.55305 11.3392 3.70889 11.418 3.88628C11.4919 4.0654 11.5289 4.25596 11.5289 4.45902C11.5289 4.68727 11.5249 4.91145 11.517 5.13142C11.509 5.35894 11.509 5.58049 11.517 5.79605C11.5211 6.01754 11.5394 6.23117 11.572 6.43688C11.6051 6.64976 11.661 6.85243 11.7399 7.04464C11.8193 7.23843 11.9277 7.42254 12.0641 7.59702C12.1768 7.74119 12.3149 7.87538 12.4774 8C12.3149 8.12462 12.1768 8.25881 12.0641 8.40298C11.9277 8.57746 11.8193 8.76157 11.7399 8.95536C11.6611 9.14737 11.6051 9.34825 11.572 9.55715C11.5394 9.7667 11.5211 9.98027 11.517 10.1978C11.509 10.4174 11.509 10.6389 11.517 10.8625C11.5249 11.0866 11.5289 11.3128 11.5289 11.541C11.5289 11.7398 11.4919 11.9285 11.4179 12.1079C11.3389 12.2897 11.236 12.4452 11.1094 12.5756C10.9783 12.7106 10.8256 12.8173 10.6522 12.8949C10.4764 12.9757 10.2891 13.0164 10.0894 13.0164H10.0002Z" fill="#424242"/> </g> <defs> <clipPath id="clip0"> <rect width="16" height="16" fill="white" transform="translate(0.000244141)"/> </clipPath> </defs> </svg> `,
|
|
438
|
-
Property: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M2.80747 14.9754C2.57144 14.9721 2.33851 14.9211 2.12271 14.8254C1.90692 14.7297 1.71273 14.5913 1.55183 14.4186C1.23875 14.1334 1.04458 13.7408 1.00799 13.3189C0.966469 12.8828 1.09293 12.4473 1.36158 12.1013C2.56804 10.8289 4.94755 8.4494 6.67836 6.75479C6.31007 5.75887 6.32729 4.66127 6.72661 3.67739C7.05499 2.85876 7.63893 2.16805 8.39153 1.70807C8.98195 1.31706 9.66055 1.07944 10.3659 1.01673C11.0713 0.954022 11.7812 1.06819 12.4313 1.34892L13.0485 1.6162L10.1827 4.56738L11.4374 5.82582L14.3811 2.94887L14.6484 3.56788C14.8738 4.08976 14.9933 4.65119 14.9999 5.21961C15.0066 5.78802 14.9004 6.35211 14.6874 6.87915C14.4763 7.40029 14.1626 7.87368 13.7649 8.27122C13.5396 8.49169 13.2907 8.68653 13.0225 8.85218C12.4676 9.22275 11.8327 9.45636 11.1699 9.5338C10.5071 9.61124 9.83546 9.5303 9.21007 9.29764C8.11219 10.4113 5.37167 13.1704 3.89143 14.5522C3.5945 14.8219 3.20856 14.9726 2.80747 14.9754ZM10.7451 1.92802C10.0873 1.92637 9.44383 2.12018 8.89639 2.48485C8.68289 2.6152 8.48461 2.76897 8.30522 2.9433C7.82813 3.42423 7.5095 4.03953 7.39206 4.70669C7.27462 5.37385 7.36398 6.06098 7.64816 6.67591L7.78366 6.97288L7.55072 7.20025C5.81249 8.89672 3.28171 11.4201 2.06504 12.7045C1.9567 12.8658 1.91037 13.0608 1.93459 13.2535C1.95881 13.4463 2.05195 13.6238 2.19682 13.7532C2.28029 13.8462 2.38201 13.9211 2.49565 13.9731C2.59581 14.0184 2.70408 14.043 2.81397 14.0455C2.98089 14.0413 3.14068 13.977 3.26407 13.8646C4.83711 12.3964 7.87646 9.32641 8.76832 8.42435L8.99754 8.19326L9.29266 8.32783C9.80642 8.56732 10.3734 8.66985 10.9385 8.62545C11.5036 8.58106 12.0476 8.39125 12.5176 8.07447C12.7316 7.9426 12.9299 7.78694 13.1088 7.61045C13.4186 7.30153 13.6634 6.93374 13.8288 6.52874C13.9943 6.12375 14.077 5.68974 14.0721 5.25228C14.0722 5.03662 14.0507 4.82148 14.0081 4.61007L11.4309 7.12508L8.87968 4.57759L11.3947 1.98834C11.1807 1.94674 10.9631 1.92653 10.7451 1.92802Z" fill="#424242"/> </svg>`,
|
|
439
|
-
Unit: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M14.0002 1H3.00024L2.00024 2V13L3.00024 14H14.0002L15.0002 13V2L14.0002 1ZM14.0002 13H3.00024V8H14.0002V13ZM14.0002 7H3.00024V2H14.0002V7Z" fill="#424242"/> </svg>`,
|
|
440
|
-
Value: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M7.00024 3L8.00024 2H14.0002L15.0002 3V8L14.0002 9H10.0002V8H14.0002V3H8.00024V6H7.00024V3ZM9.00024 9V8L8.00024 7H7.00024H2.00024L1.00024 8V13L2.00024 14H8.00024L9.00024 13V9ZM8.00024 8V9V13H2.00024V8H7.00024H8.00024ZM9.41446 7L9.00024 6.58579V6H13.0002V7H9.41446ZM9.00024 4H13.0002V5H9.00024V4ZM7.00024 10H3.00024V11H7.00024V10Z" fill="#007ACC"/> </svg>`,
|
|
441
|
-
Enum: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M14.0002 2H8.00024L7.00024 3V6H8.00024V3H14.0002V8H10.0002V9H14.0002L15.0002 8V3L14.0002 2ZM9.00024 6H13.0002V7H9.41024L9.00024 6.59V6ZM7.00024 7H2.00024L1.00024 8V13L2.00024 14H8.00024L9.00024 13V8L8.00024 7H7.00024ZM8.00024 13H2.00024V8H8.00024V9V13ZM3.00024 9H7.00024V10H3.00024V9ZM3.00024 11H7.00024V12H3.00024V11ZM9.00024 4H13.0002V5H9.00024V4Z" fill="#D67E00"/> </svg>`,
|
|
442
|
-
Snippet: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M2.50024 1L2.00024 1.5V13H3.00024V2H14.0002V13H15.0002V1.5L14.5002 1H2.50024ZM2.00024 15V14H3.00024V15H2.00024ZM5.00024 14.0001H4.00024V15.0001H5.00024V14.0001ZM6.00024 14.0001H7.00024V15.0001H6.00024V14.0001ZM9.00024 14.0001H8.00024V15.0001H9.00024V14.0001ZM10.0002 14.0001H11.0002V15.0001H10.0002V14.0001ZM15.0002 15.0001V14.0001H14.0002V15.0001H15.0002ZM12.0002 14.0001H13.0002V15.0001H12.0002V14.0001Z" fill="#424242"/> </svg>`,
|
|
443
|
-
Color: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M8.00024 1.00305C6.14373 1.00305 4.36323 1.74059 3.05048 3.05334C1.73772 4.3661 1.00024 6.14654 1.00024 8.00305V8.43311C1.09024 9.94311 2.91024 10.2231 4.00024 9.13306C4.35673 8.81625 4.82078 8.64759 5.29749 8.66162C5.77419 8.67565 6.22753 8.87127 6.56476 9.2085C6.90199 9.54572 7.0976 9.99912 7.11163 10.4758C7.12567 10.9525 6.95707 11.4166 6.64026 11.7731C5.54026 12.9331 5.85025 14.843 7.44025 14.973H8.04022C9.89674 14.973 11.6772 14.2356 12.99 12.9229C14.3027 11.6101 15.0402 9.82954 15.0402 7.97302C15.0402 6.11651 14.3027 4.33607 12.99 3.02332C11.6772 1.71056 9.89674 0.973022 8.04022 0.973022L8.00024 1.00305ZM8.00024 14.0031H7.48022C7.34775 13.9989 7.22072 13.9495 7.12024 13.863C7.04076 13.7807 6.98839 13.6761 6.97021 13.5631C6.93834 13.3682 6.95353 13.1684 7.0144 12.9806C7.07528 12.7927 7.18013 12.6222 7.32025 12.483C7.84072 11.9474 8.1319 11.2299 8.1319 10.483C8.1319 9.73615 7.84072 9.0187 7.32025 8.48303C7.05373 8.21635 6.73723 8.00481 6.38892 7.86047C6.0406 7.71614 5.66726 7.64185 5.29022 7.64185C4.91318 7.64185 4.53984 7.71614 4.19153 7.86047C3.84321 8.00481 3.52678 8.21635 3.26025 8.48303C3.15093 8.61081 3.01113 8.709 2.85382 8.76843C2.69651 8.82786 2.52673 8.84657 2.36023 8.823C2.27617 8.80694 2.19927 8.76498 2.14026 8.703C2.07155 8.6224 2.0358 8.5189 2.04022 8.41309V8.04309C2.04022 6.8564 2.39216 5.69629 3.05145 4.70959C3.71074 3.7229 4.64778 2.95388 5.74414 2.49976C6.8405 2.04563 8.04693 1.92681 9.21082 2.15833C10.3747 2.38984 11.4438 2.9613 12.2829 3.80042C13.122 4.63953 13.6934 5.70867 13.9249 6.87256C14.1564 8.03644 14.0376 9.24275 13.5835 10.3391C13.1294 11.4355 12.3604 12.3726 11.3737 13.0319C10.387 13.6911 9.22691 14.0431 8.04022 14.0431L8.00024 14.0031ZM9.00024 3.99683C9.00024 4.54911 8.55253 4.99683 8.00024 4.99683C7.44796 4.99683 7.00024 4.54911 7.00024 3.99683C7.00024 3.44454 7.44796 2.99683 8.00024 2.99683C8.55253 2.99683 9.00024 3.44454 9.00024 3.99683ZM12.0002 11.0037C12.0002 11.5559 11.5525 12.0037 11.0002 12.0037C10.448 12.0037 10.0002 11.5559 10.0002 11.0037C10.0002 10.4514 10.448 10.0037 11.0002 10.0037C11.5525 10.0037 12.0002 10.4514 12.0002 11.0037ZM5.00024 6.00415C5.55253 6.00415 6.00024 5.55644 6.00024 5.00415C6.00024 4.45187 5.55253 4.00415 5.00024 4.00415C4.44796 4.00415 4.00024 4.45187 4.00024 5.00415C4.00024 5.55644 4.44796 6.00415 5.00024 6.00415ZM12.0002 5.00415C12.0002 5.55644 11.5525 6.00415 11.0002 6.00415C10.448 6.00415 10.0002 5.55644 10.0002 5.00415C10.0002 4.45187 10.448 4.00415 11.0002 4.00415C11.5525 4.00415 12.0002 4.45187 12.0002 5.00415ZM13.0003 7.99939C13.0003 8.55167 12.5526 8.99939 12.0003 8.99939C11.448 8.99939 11.0003 8.55167 11.0003 7.99939C11.0003 7.4471 11.448 6.99939 12.0003 6.99939C12.5526 6.99939 13.0003 7.4471 13.0003 7.99939Z" fill="#424242"/> </svg>`,
|
|
444
|
-
File: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M13.8502 4.44L10.5702 1.14L10.2202 1H2.50024L2.00024 1.5V14.5L2.50024 15H13.5002L14.0002 14.5V4.8L13.8502 4.44ZM13.0002 5H10.0002V2L13.0002 5ZM3.00024 14V2H9.00024V5.5L9.50024 6H13.0002V14H3.00024Z" fill="#424242"/> </svg>`,
|
|
445
|
-
Reference: `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <g clip-path="url(#clip0)"> <path fill-rule="evenodd" clip-rule="evenodd" d="M11.1055 4.5613L7.67529 7.98827L6.54097 6.86834L8.61123 4.78848H3.81155C3.17507 4.78848 2.56466 5.04132 2.11461 5.49138C1.66455 5.94144 1.41171 6.55184 1.41171 7.18832C1.41171 7.8248 1.66455 8.43521 2.11461 8.88527C2.56466 9.33532 3.17507 9.58816 3.81155 9.58816H4.70109V11.1881H3.82115C2.79234 11.142 1.82094 10.7009 1.1092 9.95661C0.397467 9.21231 0.000244141 8.22216 0.000244141 7.19232C0.000244141 6.16249 0.397467 5.17234 1.1092 4.42803C1.82094 3.68373 2.79234 3.24263 3.82115 3.19659H8.62083L6.54097 1.13112L7.67529 0L11.1055 3.43177V4.5613ZM16.6203 24H7.02094L6.22099 23.2V10.4121L7.02094 9.61215H16.6203L17.4202 10.4121V23.2L16.6203 24ZM7.82089 22.4001H15.8204V11.212H7.82089V22.4001ZM13.4205 1.6015H23.0199L23.8198 2.40145V15.1878L23.0199 15.9877H19.0201V14.3878H22.2199V3.20139H14.2205V7.98828H12.6206V2.40145L13.4205 1.6015ZM14.2205 12.7879H9.42078V14.3878H14.2205V12.7879ZM9.42078 15.9877H14.2205V17.5876H9.42078V15.9877ZM14.2205 19.1875H9.42078V20.7874H14.2205V19.1875ZM15.8203 4.78848H20.62V6.38838H15.8203V4.78848ZM20.62 11.188H19.0201V12.7879H20.62V11.188ZM17.2827 8.01228V7.98828H20.62V9.58817H18.8585L17.2827 8.01228Z" fill="#424242"/> </g> <defs> <clipPath id="clip0"> <rect width="24" height="24" fill="white" transform="translate(0.000244141)"/> </clipPath> </defs> </svg> `,
|
|
446
|
-
Folder: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M14.5002 3H7.71021L6.86023 2.15002L6.51025 2H1.51025L1.01025 2.5V6.5V13.5L1.51025 14H14.5103L15.0103 13.5V9V3.5L14.5002 3ZM13.9902 11.49V13H1.99023V11.49V7.48999V7H6.48022L6.8302 6.84998L7.69019 5.98999H14.0002V7.48999L13.9902 11.49ZM13.9902 5H7.49023L7.14026 5.15002L6.28027 6.01001H2.00024V3.01001H6.29028L7.14026 3.85999L7.50024 4.01001H14.0002L13.9902 5Z" fill="#424242"/> </svg> `,
|
|
447
|
-
EnumMember: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M7.00024 3L8.00024 2H14.0002L15.0002 3V8L14.0002 9H10.0002V8H14.0002V3H8.00024V6H7.00024V3ZM9.00024 9V8L8.00024 7H7.00024H2.00024L1.00024 8V13L2.00024 14H8.00024L9.00024 13V9ZM8.00024 8V9V13H2.00024V8H7.00024H8.00024ZM9.41446 7L9.00024 6.58579V6H13.0002V7H9.41446ZM9.00024 4H13.0002V5H9.00024V4ZM7.00024 10H3.00024V11H7.00024V10Z" fill="#007ACC"/> </svg>`,
|
|
448
|
-
Constant: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M4.00024 6H12.0002V7H4.00024V6ZM12.0002 9H4.00024V10H12.0002V9Z" fill="#424242"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M1.00024 4L2.00024 3H14.0002L15.0002 4V12L14.0002 13H2.00024L1.00024 12V4ZM2.00024 4V12H14.0002V4H2.00024Z" fill="#424242"/> </svg>`,
|
|
449
|
-
Struct: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M2.00024 2L1.00024 3V6L2.00024 7H14.0002L15.0002 6V3L14.0002 2H2.00024ZM2.00024 3H3.00024H13.0002H14.0002V4V5V6H13.0002H3.00024H2.00024V5V4V3ZM1.00024 10L2.00024 9H5.00024L6.00024 10V13L5.00024 14H2.00024L1.00024 13V10ZM3.00024 10H2.00024V11V12V13H3.00024H4.00024H5.00024V12V11V10H4.00024H3.00024ZM10.0002 10L11.0002 9H14.0002L15.0002 10V13L14.0002 14H11.0002L10.0002 13V10ZM12.0002 10H11.0002V11V12V13H12.0002H13.0002H14.0002V12V11V10H13.0002H12.0002Z" fill="#424242"/> </svg>`,
|
|
450
|
-
Event: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M7.41379 1.55996L8.31177 1H11.6059L12.4243 2.57465L10.2358 6H12.0176L12.7365 7.69512L5.61967 15L4.01699 13.837L6.11967 10H4.89822L4.00024 8.55996L7.41379 1.55996ZM7.78058 9L4.90078 14.3049L12.0176 7H8.31177L11.6059 2H8.31177L4.89822 9H7.78058Z" fill="#D67E00"/> </svg>`,
|
|
451
|
-
Operator: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M2.87313 1.10023C3.20793 1.23579 3.4757 1.498 3.61826 1.82988C3.69056 1.99959 3.72699 2.18242 3.72526 2.36688C3.72642 2.54999 3.69 2.7314 3.61826 2.89988C3.51324 3.14567 3.33807 3.35503 3.11466 3.50177C2.89126 3.64851 2.62955 3.72612 2.36226 3.72488C2.17948 3.72592 1.99842 3.68951 1.83026 3.61788C1.58322 3.51406 1.37252 3.33932 1.22478 3.11575C1.07704 2.89219 0.99891 2.62984 1.00026 2.36188C0.999374 2.17921 1.03543 1.99825 1.10626 1.82988C1.24362 1.50314 1.50353 1.24323 1.83026 1.10588C2.16357 0.966692 2.53834 0.964661 2.87313 1.10023ZM2.57526 2.86488C2.70564 2.80913 2.80951 2.70526 2.86526 2.57488C2.89314 2.50838 2.90742 2.43698 2.90726 2.36488C2.90838 2.2654 2.88239 2.1675 2.8321 2.08167C2.7818 1.99584 2.70909 1.92531 2.62176 1.87767C2.53443 1.83002 2.43577 1.80705 2.33638 1.81121C2.23698 1.81537 2.1406 1.8465 2.05755 1.90128C1.97451 1.95606 1.90794 2.03241 1.865 2.12215C1.82205 2.21188 1.80434 2.31161 1.81376 2.41065C1.82319 2.50968 1.85939 2.60428 1.9185 2.6843C1.9776 2.76433 2.05738 2.82675 2.14926 2.86488C2.28574 2.92089 2.43878 2.92089 2.57526 2.86488ZM6.43019 1.1095L1.10992 6.42977L1.79581 7.11567L7.11608 1.7954L6.43019 1.1095ZM11.5002 8.99999H12.5002V11.5H15.0002V12.5H12.5002V15H11.5002V12.5H9.00024V11.5H11.5002V8.99999ZM5.76801 9.52509L6.47512 10.2322L4.70735 12L6.47512 13.7677L5.76801 14.4748L4.00024 12.7071L2.23248 14.4748L1.52537 13.7677L3.29314 12L1.52537 10.2322L2.23248 9.52509L4.00024 11.2929L5.76801 9.52509ZM7.11826 5.32988C7.01466 5.08268 6.83997 4.87183 6.61636 4.72406C6.39275 4.57629 6.13028 4.49826 5.86226 4.49988C5.6796 4.49899 5.49864 4.53505 5.33026 4.60588C5.00353 4.74323 4.74362 5.00314 4.60626 5.32988C4.53612 5.49478 4.49922 5.67191 4.49766 5.8511C4.4961 6.0303 4.52992 6.20804 4.59718 6.37414C4.66443 6.54024 4.76381 6.69143 4.88961 6.81906C5.0154 6.94669 5.16515 7.04823 5.33026 7.11788C5.49892 7.18848 5.67993 7.22484 5.86276 7.22484C6.0456 7.22484 6.22661 7.18848 6.39526 7.11788C6.64225 7.01388 6.85295 6.83913 7.00082 6.61563C7.1487 6.39213 7.22713 6.12987 7.22626 5.86188C7.22679 5.67905 7.19005 5.49803 7.11826 5.32988ZM6.36526 6.07488C6.3379 6.13937 6.29854 6.19808 6.24926 6.24788C6.19932 6.29724 6.14066 6.33691 6.07626 6.36488C6.00878 6.39297 5.93635 6.40725 5.86326 6.40688C5.79015 6.40744 5.71769 6.39315 5.65026 6.36488C5.58565 6.33729 5.52693 6.29757 5.47726 6.24788C5.42715 6.19856 5.38738 6.13975 5.36026 6.07488C5.30425 5.9384 5.30425 5.78536 5.36026 5.64888C5.41561 5.51846 5.51965 5.41477 5.65026 5.35988C5.71761 5.33126 5.79008 5.31663 5.86326 5.31688C5.93642 5.31685 6.00884 5.33147 6.07626 5.35988C6.14062 5.38749 6.19928 5.42682 6.24926 5.47588C6.2981 5.52603 6.33741 5.58465 6.36526 5.64888C6.39364 5.7163 6.40827 5.78872 6.40827 5.86188C6.40827 5.93503 6.39364 6.00745 6.36526 6.07488ZM14.0002 3H10.0002V4H14.0002V3Z" fill="#424242"/> </svg>`,
|
|
452
|
-
TypeParameter: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M11.0003 6H10.0003V5.5C10.0003 5.22386 9.7764 5 9.50026 5H8.47926V10.5C8.47926 10.7761 8.70312 11 8.97926 11H9.47926V12H6.47926V11H6.97926C7.2554 11 7.47926 10.7761 7.47926 10.5V5H6.50026C6.22412 5 6.00026 5.22386 6.00026 5.5V6H5.00026V4H11.0003V6ZM13.9145 8.0481L12.4522 6.58581L13.1593 5.87871L14.9751 7.69454V8.40165L13.2074 10.1694L12.5003 9.46231L13.9145 8.0481ZM3.54835 9.4623L2.08605 8.00002L3.50026 6.58581L2.79316 5.8787L1.02539 7.64647V8.35357L2.84124 10.1694L3.54835 9.4623Z" fill="#424242"/> </svg>`
|
|
453
|
-
};
|
|
454
|
-
const darkThemeIcons = {
|
|
455
|
-
Keyword: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M15 4H10V3H15V4ZM14 7H12V8H14V7ZM10 7H1V8H10V7ZM12 13H1V14H12V13ZM7 10H1V11H7V10ZM15 10H10V11H15V10ZM8 2V5H1V2H8ZM7 3H2V4H7V3Z" fill="#C5C5C5"/> </svg>`,
|
|
456
|
-
Text: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M7.22289 10.933C7.54863 11.1254 7.92163 11.2231 8.29989 11.215C8.63777 11.2218 8.97254 11.1492 9.27721 11.003C9.58188 10.8567 9.84792 10.6409 10.0539 10.373C10.5091 9.76519 10.7402 9.01867 10.7079 8.25998C10.7412 7.58622 10.5374 6.9221 10.1319 6.38298C9.93575 6.14161 9.68577 5.94957 9.402 5.82228C9.11824 5.69498 8.80858 5.63597 8.49789 5.64997C8.07522 5.64699 7.65994 5.76085 7.29789 5.97898C7.18304 6.04807 7.0749 6.12775 6.97489 6.21698V3.47498H5.98389V11.1H6.97889V10.756C7.05516 10.8217 7.13677 10.8809 7.22289 10.933ZM7.84981 6.70006C8.03598 6.62105 8.23807 6.58677 8.43989 6.59998C8.61257 6.59452 8.78404 6.63054 8.93994 6.70501C9.09583 6.77948 9.23161 6.89023 9.33589 7.02798C9.59253 7.39053 9.7184 7.82951 9.69289 8.27297C9.71972 8.79748 9.57969 9.31701 9.29289 9.75698C9.18822 9.91527 9.04546 10.0447 8.87773 10.1335C8.70999 10.2223 8.52264 10.2675 8.33289 10.265C8.14934 10.2732 7.9663 10.24 7.79734 10.1678C7.62838 10.0956 7.47784 9.98628 7.35689 9.84797C7.10152 9.55957 6.96501 9.18506 6.97489 8.79998V8.19998C6.96299 7.78332 7.10263 7.3765 7.36789 7.05498C7.49858 6.90064 7.66364 6.77908 7.84981 6.70006ZM3.28902 5.67499C2.97011 5.67933 2.65388 5.734 2.35202 5.83699C2.06417 5.92293 1.79347 6.05828 1.55202 6.23699L1.45202 6.31399V7.51399L1.87502 7.15499C2.24579 6.80478 2.73133 6.60146 3.24102 6.58299C3.36593 6.57164 3.4917 6.59147 3.60706 6.64068C3.72243 6.6899 3.82377 6.76697 3.90202 6.86499C4.0522 7.0971 4.13239 7.36754 4.13302 7.64399L2.90002 7.82499C2.39435 7.87781 1.91525 8.07772 1.52202 8.39999C1.36697 8.55181 1.24339 8.73271 1.15835 8.93235C1.07331 9.13199 1.02848 9.34644 1.02644 9.56343C1.0244 9.78042 1.06517 9.99568 1.14644 10.1969C1.2277 10.3981 1.34786 10.5813 1.50002 10.736C1.6687 10.8904 1.86622 11.01 2.08125 11.0879C2.29627 11.1659 2.52456 11.2005 2.75302 11.19C3.147 11.1931 3.53278 11.0774 3.86002 10.858C3.96153 10.7897 4.0572 10.7131 4.14602 10.629V11.073H5.08702V7.71499C5.12137 7.17422 4.9543 6.63988 4.61802 6.21499C4.44979 6.03285 4.24348 5.89003 4.01378 5.7967C3.78407 5.70336 3.53661 5.66181 3.28902 5.67499ZM4.14602 8.71599C4.16564 9.13435 4.02592 9.54459 3.75502 9.864C3.63689 10.0005 3.48998 10.1092 3.32486 10.1821C3.15973 10.2551 2.98049 10.2906 2.80002 10.286C2.69049 10.2945 2.58035 10.2812 2.47599 10.2469C2.37163 10.2125 2.27511 10.1579 2.19202 10.086C2.06079 9.93455 1.98856 9.74088 1.98856 9.54049C1.98856 9.34011 2.06079 9.14644 2.19202 8.99499C2.47322 8.82131 2.79233 8.71837 3.12202 8.69499L4.14202 8.54699L4.14602 8.71599ZM12.4588 11.0325C12.766 11.1638 13.0983 11.2261 13.4322 11.215C13.927 11.227 14.4153 11.1006 14.8422 10.85L14.9652 10.775L14.9782 10.768V9.61504L14.5322 9.93504C14.216 10.1592 13.8356 10.2747 13.4482 10.264C13.2497 10.2719 13.052 10.2342 12.8703 10.1538C12.6886 10.0733 12.5278 9.95232 12.4002 9.80004C12.1144 9.42453 11.9725 8.95911 12.0002 8.48804C11.9737 7.98732 12.1352 7.49475 12.4532 7.10704C12.5934 6.94105 12.7695 6.80914 12.9682 6.7213C13.167 6.63346 13.3831 6.592 13.6002 6.60004C13.9439 6.59844 14.2808 6.69525 14.5712 6.87904L15.0002 7.14404V5.97004L14.8312 5.89704C14.4626 5.73432 14.0641 5.6502 13.6612 5.65004C13.2999 5.63991 12.9406 5.70762 12.6078 5.84859C12.2749 5.98956 11.9763 6.20048 11.7322 6.46704C11.2261 7.02683 10.9581 7.76186 10.9852 8.51604C10.9567 9.22346 11.1955 9.91569 11.6542 10.455C11.8769 10.704 12.1516 10.9012 12.4588 11.0325Z" fill="#C5C5C5"/> </svg>`,
|
|
457
|
-
Method: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M13.51 4L8.51001 1H7.51001L2.51001 4L2.02002 4.85999V10.86L2.51001 11.71L7.51001 14.71H8.51001L13.51 11.71L14 10.86V4.85999L13.51 4ZM7.51001 13.5601L3.01001 10.86V5.69995L7.51001 8.15002V13.5601ZM3.27002 4.69995L8.01001 1.85999L12.75 4.69995L8.01001 7.29004L3.27002 4.69995ZM13.01 10.86L8.51001 13.5601V8.15002L13.01 5.69995V10.86Z" fill="#B180D7"/> </svg>`,
|
|
458
|
-
Function: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M13.51 4L8.51001 1H7.51001L2.51001 4L2.02002 4.85999V10.86L2.51001 11.71L7.51001 14.71H8.51001L13.51 11.71L14 10.86V4.85999L13.51 4ZM7.51001 13.5601L3.01001 10.86V5.69995L7.51001 8.15002V13.5601ZM3.27002 4.69995L8.01001 1.85999L12.75 4.69995L8.01001 7.29004L3.27002 4.69995ZM13.01 10.86L8.51001 13.5601V8.15002L13.01 5.69995V10.86Z" fill="#B180D7"/> </svg>`,
|
|
459
|
-
Constructor: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M13.51 4L8.51001 1H7.51001L2.51001 4L2.02002 4.85999V10.86L2.51001 11.71L7.51001 14.71H8.51001L13.51 11.71L14 10.86V4.85999L13.51 4ZM7.51001 13.5601L3.01001 10.86V5.69995L7.51001 8.15002V13.5601ZM3.27002 4.69995L8.01001 1.85999L12.75 4.69995L8.01001 7.29004L3.27002 4.69995ZM13.01 10.86L8.51001 13.5601V8.15002L13.01 5.69995V10.86Z" fill="#B180D7"/> </svg>`,
|
|
460
|
-
Field: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M14.45 4.5L9.44995 2H8.55005L1.55005 5.5L1 6.39001V10.89L1.55005 11.79L6.55005 14.29H7.44995L14.45 10.79L15 9.89001V5.39001L14.45 4.5ZM6.44995 13.14L1.94995 10.89V7.17004L6.44995 9.17004V13.14ZM6.94995 8.33997L2.29004 6.22998L8.94995 2.89001L13.62 5.22998L6.94995 8.33997ZM13.95 9.89001L7.44995 13.14V9.20996L13.95 6.20996V9.89001Z" fill="#75BEFF"/> </svg>`,
|
|
461
|
-
Variable: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M2 5H4V4H1.5L1 4.5V12.5L1.5 13H4V12H2V5ZM14.5 4H12V5H14V12H12V13H14.5L15 12.5V4.5L14.5 4ZM11.76 6.56995L12 7V9.51001L11.7 9.95996L7.19995 11.96H6.73999L4.23999 10.46L4 10.03V7.53003L4.30005 7.06995L8.80005 5.06995H9.26001L11.76 6.56995ZM5 9.70996L6.5 10.61V9.28003L5 8.38V9.70996ZM5.57996 7.56006L7.03003 8.43005L10.42 6.93005L8.96997 6.06006L5.57996 7.56006ZM7.53003 10.73L11.03 9.17004V7.77002L7.53003 9.31995V10.73Z" fill="#75BEFF"/> </svg>`,
|
|
462
|
-
Class: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M11.34 9.70998H12.05L14.72 7.04005V6.32997L13.38 5.00001H12.68L10.86 6.81007H5.86V5.56007L7.71999 3.70997V3L5.71998 1H5.00001L1 5.00001V5.70997L3 7.70998H3.71003L4.84998 6.56007V12.35L5.34998 12.85H10V13.37L11.33 14.71H12.04L14.7101 12.0401V11.33L13.37 10H12.67L10.81 11.85H5.81001V7.84999H10V8.32997L11.34 9.70998ZM13.0301 6.06007L13.66 6.68995L11.66 8.68996L11.0301 8.06007L13.0301 6.06007ZM13.0301 11.0601L13.66 11.69L11.66 13.69L11.0301 13.0601L13.0301 11.0601ZM3.34998 6.65004L2.06 5.34998L5.34998 2.06006L6.65004 3.34998L3.34998 6.65004Z" fill="#EE9D28"/> </svg>`,
|
|
463
|
-
Interface: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M11.4965 4C10.655 3.9989 9.84136 4.30189 9.20557 4.85315C8.56977 5.40442 8.15465 6.16684 8.0365 7H4.9364C4.8147 6.52867 4.52533 6.11794 4.12244 5.84473C3.71955 5.57152 3.23083 5.45466 2.74792 5.51599C2.26502 5.57733 1.82106 5.81261 1.49927 6.17786C1.17747 6.54311 1 7.01322 1 7.5C1 7.98679 1.17747 8.45689 1.49927 8.82215C1.82106 9.1874 2.26502 9.42267 2.74792 9.48401C3.23083 9.54535 3.71955 9.42848 4.12244 9.15528C4.52533 8.88207 4.8147 8.47133 4.9364 8H8.0365C8.13236 8.66418 8.41717 9.28683 8.85693 9.7937C9.2967 10.3006 9.87284 10.6703 10.5168 10.8589C11.1609 11.0475 11.8455 11.047 12.4893 10.8574C13.133 10.6679 13.7087 10.2973 14.1477 9.7898C14.5867 9.28227 14.8706 8.65919 14.9655 7.99488C15.0603 7.33056 14.9621 6.65298 14.6827 6.04285C14.4034 5.43272 13.9545 4.91578 13.3895 4.55359C12.8246 4.19141 12.1675 3.99922 11.4965 4V4ZM11.4965 10C11.002 10 10.5187 9.85332 10.1075 9.57862C9.69642 9.30391 9.37599 8.91348 9.18677 8.45667C8.99755 7.99985 8.94809 7.49728 9.04456 7.01233C9.14102 6.52738 9.37901 6.08181 9.72864 5.73218C10.0783 5.38255 10.5238 5.14456 11.0088 5.0481C11.4937 4.95164 11.9963 5.00109 12.4531 5.19031C12.9099 5.37953 13.3004 5.69996 13.5751 6.11109C13.8498 6.52221 13.9965 7.00555 13.9965 7.5C13.9965 8.16304 13.7331 8.79898 13.2643 9.26783C12.7954 9.73667 12.1595 10 11.4965 10V10Z" fill="#75BEFF"/> </svg>`,
|
|
464
|
-
Module: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M6 2.98361V2.97184V2H5.91083C5.59743 2 5.29407 2.06161 5.00128 2.18473C4.70818 2.30798 4.44942 2.48474 4.22578 2.71498C4.00311 2.94422 3.83792 3.19498 3.73282 3.46766L3.73233 3.46898C3.63382 3.7352 3.56814 4.01201 3.53533 4.29917L3.53519 4.30053C3.50678 4.5805 3.4987 4.86844 3.51084 5.16428C3.52272 5.45379 3.52866 5.74329 3.52866 6.03279C3.52866 6.23556 3.48974 6.42594 3.412 6.60507L3.4116 6.60601C3.33687 6.78296 3.23423 6.93866 3.10317 7.07359C2.97644 7.20405 2.82466 7.31055 2.64672 7.3925C2.4706 7.46954 2.28497 7.5082 2.08917 7.5082H2V7.6V8.4V8.4918H2.08917C2.28465 8.4918 2.47001 8.53238 2.64601 8.61334L2.64742 8.61396C2.82457 8.69157 2.97577 8.79762 3.10221 8.93161L3.10412 8.93352C3.23428 9.0637 3.33659 9.21871 3.41129 9.39942L3.41201 9.40108C3.48986 9.58047 3.52866 9.76883 3.52866 9.96721C3.52866 10.2567 3.52272 10.5462 3.51084 10.8357C3.4987 11.1316 3.50677 11.4215 3.53516 11.7055L3.53535 11.7072C3.56819 11.9903 3.63387 12.265 3.73232 12.531L3.73283 12.5323C3.83793 12.805 4.00311 13.0558 4.22578 13.285C4.44942 13.5153 4.70818 13.692 5.00128 13.8153C5.29407 13.9384 5.59743 14 5.91083 14H6V13.2V13.0164H5.91083C5.71095 13.0164 5.52346 12.9777 5.34763 12.9008C5.17396 12.8191 5.02194 12.7126 4.89086 12.5818C4.76386 12.4469 4.66104 12.2911 4.58223 12.1137C4.50838 11.9346 4.47134 11.744 4.47134 11.541C4.47134 11.3127 4.4753 11.0885 4.48321 10.8686C4.49125 10.6411 4.49127 10.4195 4.48324 10.2039C4.47914 9.98246 4.46084 9.76883 4.42823 9.56312C4.39513 9.35024 4.33921 9.14757 4.26039 8.95536C4.18091 8.76157 4.07258 8.57746 3.93616 8.40298C3.82345 8.25881 3.68538 8.12462 3.52283 8C3.68538 7.87538 3.82345 7.74119 3.93616 7.59702C4.07258 7.42254 4.18091 7.23843 4.26039 7.04464C4.33913 6.85263 4.39513 6.65175 4.42826 6.44285C4.46082 6.2333 4.47914 6.01973 4.48324 5.80219C4.49127 5.58262 4.49125 5.36105 4.48321 5.13749C4.4753 4.9134 4.47134 4.68725 4.47134 4.45902C4.47134 4.26019 4.50833 4.07152 4.58238 3.89205C4.66135 3.71034 4.76421 3.55475 4.89086 3.42437C5.02193 3.28942 5.17461 3.18275 5.34802 3.10513C5.5238 3.02427 5.71113 2.98361 5.91083 2.98361H6ZM10 13.0164V13.0282V14H10.0892C10.4026 14 10.7059 13.9384 10.9987 13.8153C11.2918 13.692 11.5506 13.5153 11.7742 13.285C11.9969 13.0558 12.1621 12.805 12.2672 12.5323L12.2677 12.531C12.3662 12.2648 12.4319 11.988 12.4647 11.7008L12.4648 11.6995C12.4932 11.4195 12.5013 11.1316 12.4892 10.8357C12.4773 10.5462 12.4713 10.2567 12.4713 9.96721C12.4713 9.76444 12.5103 9.57406 12.588 9.39493L12.5884 9.39399C12.6631 9.21704 12.7658 9.06134 12.8968 8.92642C13.0236 8.79595 13.1753 8.68945 13.3533 8.6075C13.5294 8.53046 13.715 8.4918 13.9108 8.4918H14V8.4V7.6V7.5082H13.9108C13.7153 7.5082 13.53 7.46762 13.354 7.38666L13.3526 7.38604C13.1754 7.30844 13.0242 7.20238 12.8978 7.06839L12.8959 7.06648C12.7657 6.9363 12.6634 6.78129 12.5887 6.60058L12.588 6.59892C12.5101 6.41953 12.4713 6.23117 12.4713 6.03279C12.4713 5.74329 12.4773 5.45379 12.4892 5.16428C12.5013 4.86842 12.4932 4.57848 12.4648 4.29454L12.4646 4.29285C12.4318 4.00971 12.3661 3.73502 12.2677 3.46897L12.2672 3.46766C12.1621 3.19499 11.9969 2.94422 11.7742 2.71498C11.5506 2.48474 11.2918 2.30798 10.9987 2.18473C10.7059 2.06161 10.4026 2 10.0892 2H10V2.8V2.98361H10.0892C10.2891 2.98361 10.4765 3.0223 10.6524 3.09917C10.826 3.18092 10.9781 3.28736 11.1091 3.41823C11.2361 3.55305 11.339 3.70889 11.4178 3.88628C11.4916 4.0654 11.5287 4.25596 11.5287 4.45902C11.5287 4.68727 11.5247 4.91145 11.5168 5.13142C11.5088 5.35894 11.5087 5.58049 11.5168 5.79605C11.5209 6.01754 11.5392 6.23117 11.5718 6.43688C11.6049 6.64976 11.6608 6.85243 11.7396 7.04464C11.8191 7.23843 11.9274 7.42254 12.0638 7.59702C12.1765 7.74119 12.3146 7.87538 12.4772 8C12.3146 8.12462 12.1765 8.25881 12.0638 8.40298C11.9274 8.57746 11.8191 8.76157 11.7396 8.95536C11.6609 9.14737 11.6049 9.34825 11.5717 9.55715C11.5392 9.7667 11.5209 9.98027 11.5168 10.1978C11.5087 10.4174 11.5087 10.6389 11.5168 10.8625C11.5247 11.0866 11.5287 11.3128 11.5287 11.541C11.5287 11.7398 11.4917 11.9285 11.4176 12.1079C11.3386 12.2897 11.2358 12.4452 11.1091 12.5756C10.9781 12.7106 10.8254 12.8173 10.652 12.8949C10.4762 12.9757 10.2889 13.0164 10.0892 13.0164H10Z" fill="#C5C5C5"/> </svg>`,
|
|
465
|
-
Property: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M2.80723 14.9754C2.57119 14.9721 2.33826 14.9211 2.12247 14.8254C1.90667 14.7297 1.71248 14.5913 1.55158 14.4186C1.2385 14.1334 1.04433 13.7408 1.00775 13.3189C0.966225 12.8828 1.09269 12.4473 1.36133 12.1013C2.56779 10.8289 4.9473 8.4494 6.67811 6.75479C6.30983 5.75887 6.32704 4.66127 6.72637 3.67739C7.05474 2.85876 7.63869 2.16805 8.39129 1.70807C8.9817 1.31706 9.66031 1.07944 10.3657 1.01673C11.0711 0.954022 11.7809 1.06819 12.4311 1.34892L13.0482 1.6162L10.1824 4.56738L11.4371 5.82582L14.3809 2.94887L14.6482 3.56788C14.8735 4.08976 14.993 4.65119 14.9997 5.21961C15.0064 5.78802 14.9002 6.35211 14.6872 6.87915C14.476 7.40029 14.1623 7.87368 13.7647 8.27122C13.5394 8.49169 13.2904 8.68653 13.0222 8.85218C12.4673 9.22275 11.8324 9.45636 11.1697 9.5338C10.5069 9.61124 9.83521 9.5303 9.20982 9.29764C8.11194 10.4113 5.37142 13.1704 3.89119 14.5522C3.59426 14.8219 3.20832 14.9726 2.80723 14.9754ZM10.7448 1.92802C10.087 1.92637 9.44359 2.12018 8.89614 2.48485C8.68265 2.6152 8.48437 2.76897 8.30498 2.9433C7.82789 3.42423 7.50926 4.03953 7.39182 4.70669C7.27438 5.37385 7.36374 6.06098 7.64792 6.67591L7.78342 6.97288L7.55048 7.20025C5.81224 8.89672 3.28146 11.4201 2.06479 12.7045C1.95646 12.8658 1.91012 13.0608 1.93435 13.2535C1.95857 13.4463 2.05171 13.6238 2.19657 13.7532C2.28005 13.8462 2.38177 13.9211 2.49541 13.9731C2.59557 14.0184 2.70383 14.043 2.81373 14.0455C2.98064 14.0413 3.14044 13.977 3.26383 13.8646C4.83687 12.3964 7.87622 9.32641 8.76807 8.42435L8.9973 8.19326L9.29242 8.32783C9.80617 8.56732 10.3731 8.66985 10.9382 8.62545C11.5033 8.58106 12.0473 8.39125 12.5174 8.07447C12.7313 7.9426 12.9296 7.78694 13.1085 7.61045C13.4183 7.30153 13.6631 6.93374 13.8286 6.52874C13.994 6.12375 14.0767 5.68974 14.0719 5.25228C14.0719 5.03662 14.0505 4.82148 14.0078 4.61007L11.4306 7.12508L8.87944 4.57759L11.3944 1.98834C11.1804 1.94674 10.9628 1.92653 10.7448 1.92802Z" fill="#C5C5C5"/> </svg>`,
|
|
466
|
-
Unit: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M14 1H3L2 2V13L3 14H14L15 13V2L14 1ZM14 13H3V8H14V13ZM14 7H3V2H14V7Z" fill="#C5C5C5"/> </svg>`,
|
|
467
|
-
Value: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M7 3L8 2H14L15 3V8L14 9H10V8H14V3H8V6H7V3ZM9 9V8L8 7H7H2L1 8V13L2 14H8L9 13V9ZM8 8V9V13H2V8H7H8ZM9.41421 7L9 6.58579V6H13V7H9.41421ZM9 4H13V5H9V4ZM7 10H3V11H7V10Z" fill="#75BEFF"/> </svg>`,
|
|
468
|
-
Enum: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M14 2H8L7 3V6H8V3H14V8H10V9H14L15 8V3L14 2ZM9 6H13V7H9.41L9 6.59V6ZM7 7H2L1 8V13L2 14H8L9 13V8L8 7H7ZM8 13H2V8H8V9V13ZM3 9H7V10H3V9ZM3 11H7V12H3V11ZM9 4H13V5H9V4Z" fill="#EE9D28"/> </svg>`,
|
|
469
|
-
Snippet: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M2.5 1L2 1.5V13H3V2H14V13H15V1.5L14.5 1H2.5ZM2 15V14H3V15H2ZM5 14.0001H4V15.0001H5V14.0001ZM6 14.0001H7V15.0001H6V14.0001ZM9 14.0001H8V15.0001H9V14.0001ZM10 14.0001H11V15.0001H10V14.0001ZM15 15.0001V14.0001H14V15.0001H15ZM12 14.0001H13V15.0001H12V14.0001Z" fill="#C5C5C5"/> </svg>`,
|
|
470
|
-
Color: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M8 1.00305C6.14348 1.00305 4.36299 1.74059 3.05023 3.05334C1.73748 4.3661 1 6.14654 1 8.00305V8.43311C1.09 9.94311 2.91 10.2231 4 9.13306C4.35648 8.81625 4.82054 8.64759 5.29724 8.66162C5.77395 8.67565 6.22729 8.87127 6.56451 9.2085C6.90174 9.54572 7.09736 9.99912 7.11139 10.4758C7.12542 10.9525 6.95682 11.4166 6.64001 11.7731C5.54001 12.9331 5.85 14.843 7.44 14.973H8.03998C9.89649 14.973 11.677 14.2356 12.9897 12.9229C14.3025 11.6101 15.04 9.82954 15.04 7.97302C15.04 6.11651 14.3025 4.33607 12.9897 3.02332C11.677 1.71056 9.89649 0.973022 8.03998 0.973022L8 1.00305ZM8 14.0031H7.47998C7.34751 13.9989 7.22047 13.9495 7.12 13.863C7.04052 13.7807 6.98815 13.6761 6.96997 13.5631C6.9381 13.3682 6.95328 13.1684 7.01416 12.9806C7.07504 12.7927 7.17989 12.6222 7.32001 12.483C7.84048 11.9474 8.13165 11.2299 8.13165 10.483C8.13165 9.73615 7.84048 9.0187 7.32001 8.48303C7.05348 8.21635 6.73699 8.00481 6.38867 7.86047C6.04036 7.71614 5.66702 7.64185 5.28998 7.64185C4.91294 7.64185 4.5396 7.71614 4.19128 7.86047C3.84297 8.00481 3.52654 8.21635 3.26001 8.48303C3.15068 8.61081 3.01089 8.709 2.85358 8.76843C2.69626 8.82786 2.52649 8.84657 2.35999 8.823C2.27593 8.80694 2.19903 8.76498 2.14001 8.703C2.07131 8.6224 2.03556 8.5189 2.03998 8.41309V8.04309C2.03998 6.8564 2.39192 5.69629 3.05121 4.70959C3.7105 3.7229 4.64754 2.95388 5.7439 2.49976C6.84025 2.04563 8.04669 1.92681 9.21057 2.15833C10.3745 2.38984 11.4435 2.9613 12.2827 3.80042C13.1218 4.63953 13.6932 5.70867 13.9247 6.87256C14.1562 8.03644 14.0374 9.24275 13.5833 10.3391C13.1291 11.4355 12.3601 12.3726 11.3734 13.0319C10.3867 13.6911 9.22667 14.0431 8.03998 14.0431L8 14.0031ZM9 3.99683C9 4.54911 8.55228 4.99683 8 4.99683C7.44771 4.99683 7 4.54911 7 3.99683C7 3.44454 7.44771 2.99683 8 2.99683C8.55228 2.99683 9 3.44454 9 3.99683ZM12 11.0037C12 11.5559 11.5523 12.0037 11 12.0037C10.4477 12.0037 10 11.5559 10 11.0037C10 10.4514 10.4477 10.0037 11 10.0037C11.5523 10.0037 12 10.4514 12 11.0037ZM5 6.00415C5.55229 6.00415 6 5.55644 6 5.00415C6 4.45187 5.55229 4.00415 5 4.00415C4.44772 4.00415 4 4.45187 4 5.00415C4 5.55644 4.44772 6.00415 5 6.00415ZM12 5.00415C12 5.55644 11.5523 6.00415 11 6.00415C10.4477 6.00415 10 5.55644 10 5.00415C10 4.45187 10.4477 4.00415 11 4.00415C11.5523 4.00415 12 4.45187 12 5.00415ZM13.0001 7.99939C13.0001 8.55167 12.5524 8.99939 12.0001 8.99939C11.4478 8.99939 11.0001 8.55167 11.0001 7.99939C11.0001 7.4471 11.4478 6.99939 12.0001 6.99939C12.5524 6.99939 13.0001 7.4471 13.0001 7.99939Z" fill="#C5C5C5"/> </svg>`,
|
|
471
|
-
File: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M13.85 4.44L10.57 1.14L10.22 1H2.5L2 1.5V14.5L2.5 15H13.5L14 14.5V4.8L13.85 4.44ZM13 5H10V2L13 5ZM3 14V2H9V5.5L9.5 6H13V14H3Z" fill="#C5C5C5"/> </svg>`,
|
|
472
|
-
Reference: `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M11.1052 4.5613L7.67505 7.98827L6.54072 6.86834L8.61098 4.78848H3.81131C3.17483 4.78848 2.56442 5.04132 2.11436 5.49138C1.6643 5.94144 1.41147 6.55184 1.41147 7.18832C1.41147 7.8248 1.6643 8.43521 2.11436 8.88527C2.56442 9.33532 3.17483 9.58816 3.81131 9.58816H4.70085V11.1881H3.8209C2.7921 11.142 1.8207 10.7009 1.10896 9.95661C0.397222 9.21231 0 8.22216 0 7.19232C0 6.16249 0.397222 5.17234 1.10896 4.42803C1.8207 3.68373 2.7921 3.24263 3.8209 3.19659H8.62058L6.54072 1.13112L7.67505 0L11.1052 3.43177V4.5613ZM16.6201 24H7.0207L6.22075 23.2V10.4121L7.0207 9.61215H16.6201L17.42 10.4121V23.2L16.6201 24ZM7.82064 22.4001H15.8201V11.212H7.82064V22.4001ZM13.4203 1.6015H23.0196L23.8196 2.40145V15.1878L23.0196 15.9877H19.0199V14.3878H22.2197V3.20139H14.2202V7.98828H12.6203V2.40145L13.4203 1.6015ZM14.2202 12.7879H9.42053V14.3878H14.2202V12.7879ZM9.42053 15.9877H14.2202V17.5876H9.42053V15.9877ZM14.2202 19.1875H9.42053V20.7874H14.2202V19.1875ZM15.8201 4.78848H20.6198V6.38838H15.8201V4.78848ZM20.6198 11.188H19.0199V12.7879H20.6198V11.188ZM17.2824 8.01228V7.98828H20.6198V9.58817H18.8583L17.2824 8.01228Z" fill="#C5C5C5"/> </svg>`,
|
|
473
|
-
Folder: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M14.5 3H7.70996L6.85999 2.15002L6.51001 2H1.51001L1.01001 2.5V6.5V13.5L1.51001 14H14.51L15.01 13.5V9V3.5L14.5 3ZM13.99 11.49V13H1.98999V11.49V7.48999V7H6.47998L6.82996 6.84998L7.68994 5.98999H14V7.48999L13.99 11.49ZM13.99 5H7.48999L7.14001 5.15002L6.28003 6.01001H2V3.01001H6.29004L7.14001 3.85999L7.5 4.01001H14L13.99 5Z" fill="#C5C5C5"/> </svg>`,
|
|
474
|
-
EnumMember: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M7 3L8 2H14L15 3V8L14 9H10V8H14V3H8V6H7V3ZM9 9V8L8 7H7H2L1 8V13L2 14H8L9 13V9ZM8 8V9V13H2V8H7H8ZM9.41421 7L9 6.58579V6H13V7H9.41421ZM9 4H13V5H9V4ZM7 10H3V11H7V10Z" fill="#75BEFF"/> </svg>`,
|
|
475
|
-
Constant: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M4 6H12V7H4V6ZM12 9H4V10H12V9Z" fill="#C5C5C5"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M1 4L2 3H14L15 4V12L14 13H2L1 12V4ZM2 4V12H14V4H2Z" fill="#C5C5C5"/> </svg>`,
|
|
476
|
-
Struct: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M2 2L1 3V6L2 7H14L15 6V3L14 2H2ZM2 3H3H13H14V4V5V6H13H3H2V5V4V3ZM1 10L2 9H5L6 10V13L5 14H2L1 13V10ZM3 10H2V11V12V13H3H4H5V12V11V10H4H3ZM10 10L11 9H14L15 10V13L14 14H11L10 13V10ZM12 10H11V11V12V13H12H13H14V12V11V10H13H12Z" fill="#C5C5C5"/> </svg>`,
|
|
477
|
-
Event: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M7.41354 1.55996L8.31152 1H11.6056L12.424 2.57465L10.2356 6H12.0174L12.7363 7.69512L5.61943 15L4.01675 13.837L6.11943 10H4.89798L4 8.55996L7.41354 1.55996ZM7.78033 9L4.90054 14.3049L12.0174 7H8.31152L11.6056 2H8.31152L4.89798 9H7.78033Z" fill="#EE9D28"/> </svg>`,
|
|
478
|
-
Operator: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M2.87289 1.10023C3.20768 1.23579 3.47545 1.498 3.61802 1.82988C3.69032 1.99959 3.72675 2.18242 3.72502 2.36688C3.72617 2.54999 3.68975 2.7314 3.61802 2.89988C3.51299 3.14567 3.33782 3.35503 3.11442 3.50177C2.89102 3.64851 2.6293 3.72612 2.36202 3.72488C2.17924 3.72592 1.99818 3.68951 1.83002 3.61788C1.58298 3.51406 1.37227 3.33932 1.22453 3.11575C1.0768 2.89219 0.998666 2.62984 1.00002 2.36188C0.99913 2.17921 1.03519 1.99825 1.10602 1.82988C1.24337 1.50314 1.50328 1.24323 1.83002 1.10588C2.16332 0.966692 2.53809 0.964661 2.87289 1.10023ZM2.57502 2.86488C2.7054 2.80913 2.80927 2.70526 2.86502 2.57488C2.8929 2.50838 2.90718 2.43698 2.90702 2.36488C2.90813 2.2654 2.88215 2.1675 2.83185 2.08167C2.78156 1.99584 2.70884 1.92531 2.62151 1.87767C2.53418 1.83002 2.43553 1.80705 2.33614 1.81121C2.23674 1.81537 2.14035 1.8465 2.05731 1.90128C1.97426 1.95606 1.9077 2.03241 1.86475 2.12215C1.8218 2.21188 1.80409 2.31161 1.81352 2.41065C1.82294 2.50968 1.85915 2.60428 1.91825 2.6843C1.97736 2.76433 2.05713 2.82675 2.14902 2.86488C2.28549 2.92089 2.43854 2.92089 2.57502 2.86488ZM6.42995 1.1095L1.10967 6.42977L1.79557 7.11567L7.11584 1.7954L6.42995 1.1095ZM11.5 8.99999H12.5V11.5H15V12.5H12.5V15H11.5V12.5H9V11.5H11.5V8.99999ZM5.76777 9.52509L6.47487 10.2322L4.70711 12L6.47487 13.7677L5.76777 14.4748L4 12.7071L2.23223 14.4748L1.52513 13.7677L3.29289 12L1.52513 10.2322L2.23223 9.52509L4 11.2929L5.76777 9.52509ZM7.11802 5.32988C7.01442 5.08268 6.83973 4.87183 6.61612 4.72406C6.3925 4.57629 6.13004 4.49826 5.86202 4.49988C5.67935 4.49899 5.49839 4.53505 5.33002 4.60588C5.00328 4.74323 4.74337 5.00314 4.60602 5.32988C4.53588 5.49478 4.49897 5.67191 4.49741 5.8511C4.49586 6.0303 4.52967 6.20804 4.59693 6.37414C4.66419 6.54024 4.76356 6.69143 4.88936 6.81906C5.01516 6.94669 5.1649 7.04823 5.33002 7.11788C5.49867 7.18848 5.67968 7.22484 5.86252 7.22484C6.04535 7.22484 6.22636 7.18848 6.39502 7.11788C6.64201 7.01388 6.8527 6.83913 7.00058 6.61563C7.14845 6.39213 7.22689 6.12987 7.22602 5.86188C7.22655 5.67905 7.1898 5.49803 7.11802 5.32988ZM6.36502 6.07488C6.33766 6.13937 6.29829 6.19808 6.24902 6.24788C6.19908 6.29724 6.14042 6.33691 6.07602 6.36488C6.00854 6.39297 5.93611 6.40725 5.86302 6.40688C5.78991 6.40744 5.71744 6.39315 5.65002 6.36488C5.58541 6.33729 5.52668 6.29757 5.47702 6.24788C5.42691 6.19856 5.38713 6.13975 5.36002 6.07488C5.30401 5.9384 5.30401 5.78536 5.36002 5.64888C5.41536 5.51846 5.51941 5.41477 5.65002 5.35988C5.71737 5.33126 5.78984 5.31663 5.86302 5.31688C5.93618 5.31685 6.0086 5.33147 6.07602 5.35988C6.14037 5.38749 6.19904 5.42682 6.24902 5.47588C6.29786 5.52603 6.33717 5.58465 6.36502 5.64888C6.3934 5.7163 6.40802 5.78872 6.40802 5.86188C6.40802 5.93503 6.3934 6.00745 6.36502 6.07488ZM14 3H10V4H14V3Z" fill="#C5C5C5"/> </svg>`,
|
|
479
|
-
TypeParameter: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M11 6H10V5.5C10 5.22386 9.77616 5 9.50001 5H8.47902V10.5C8.47902 10.7761 8.70288 11 8.97902 11H9.47902V12H6.47902V11H6.97902C7.25516 11 7.47902 10.7761 7.47902 10.5V5H6.50001C6.22387 5 6.00001 5.22386 6.00001 5.5V6H5.00001V4H11V6ZM13.9142 8.0481L12.4519 6.58581L13.159 5.87871L14.9749 7.69454V8.40165L13.2071 10.1694L12.5 9.46231L13.9142 8.0481ZM3.5481 9.4623L2.08581 8.00002L3.50002 6.58581L2.79291 5.8787L1.02515 7.64647V8.35357L2.841 10.1694L3.5481 9.4623Z" fill="#C5C5C5"/> </svg>`
|
|
480
|
-
};
|
|
481
|
-
const iconType = iconTypeString;
|
|
482
|
-
const icons = isDarkTheme ? darkThemeIcons : lightThemeIcons;
|
|
483
|
-
return icons[iconType] ?? icons.Keyword;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
// src/neo4j-setup.tsx
|
|
487
|
-
var insertTab = (cmd) => {
|
|
488
|
-
if (cmd.state.selection.main.from === cmd.state.selection.main.to) {
|
|
489
|
-
cmd.dispatch(
|
|
490
|
-
cmd.state.update({
|
|
491
|
-
changes: {
|
|
492
|
-
from: cmd.state.selection.main.to,
|
|
493
|
-
to: cmd.state.selection.main.to,
|
|
494
|
-
insert: " "
|
|
495
|
-
},
|
|
496
|
-
selection: { anchor: cmd.state.selection.main.to + 2 }
|
|
497
|
-
})
|
|
498
|
-
);
|
|
499
|
-
} else {
|
|
500
|
-
(0, import_commands.indentMore)(cmd);
|
|
501
|
-
}
|
|
502
|
-
return true;
|
|
503
|
-
};
|
|
504
|
-
var basicNeo4jSetup = () => {
|
|
505
|
-
const keymaps = [
|
|
506
|
-
import_autocomplete2.closeBracketsKeymap,
|
|
507
|
-
import_commands.defaultKeymap,
|
|
508
|
-
import_search.searchKeymap,
|
|
509
|
-
import_commands.historyKeymap,
|
|
510
|
-
import_language3.foldKeymap,
|
|
511
|
-
import_autocomplete2.completionKeymap,
|
|
512
|
-
import_lint2.lintKeymap,
|
|
513
|
-
{
|
|
514
|
-
key: "Tab",
|
|
515
|
-
preventDefault: true,
|
|
516
|
-
run: import_autocomplete2.acceptCompletion
|
|
517
|
-
},
|
|
518
|
-
{
|
|
519
|
-
key: "Tab",
|
|
520
|
-
preventDefault: true,
|
|
521
|
-
run: insertTab
|
|
522
|
-
},
|
|
523
|
-
{
|
|
524
|
-
key: "Shift-Tab",
|
|
525
|
-
preventDefault: true,
|
|
526
|
-
run: import_commands.indentLess
|
|
527
|
-
}
|
|
528
|
-
].flat();
|
|
529
|
-
const extensions = [];
|
|
530
|
-
extensions.push((0, import_view2.highlightSpecialChars)());
|
|
531
|
-
extensions.push((0, import_commands.history)());
|
|
532
|
-
extensions.push((0, import_view2.drawSelection)());
|
|
533
|
-
extensions.push((0, import_view2.dropCursor)());
|
|
534
|
-
extensions.push(import_state3.EditorState.allowMultipleSelections.of(true));
|
|
535
|
-
extensions.push((0, import_language3.indentOnInput)());
|
|
536
|
-
extensions.push(
|
|
537
|
-
(0, import_language3.syntaxHighlighting)(import_language3.defaultHighlightStyle, { fallback: true })
|
|
538
|
-
);
|
|
539
|
-
extensions.push((0, import_language3.bracketMatching)());
|
|
540
|
-
extensions.push((0, import_autocomplete2.closeBrackets)());
|
|
541
|
-
extensions.push(
|
|
542
|
-
(0, import_autocomplete2.autocompletion)({
|
|
543
|
-
icons: false,
|
|
544
|
-
interactionDelay: 5,
|
|
545
|
-
addToOptions: [
|
|
546
|
-
{
|
|
547
|
-
render(completion, state) {
|
|
548
|
-
const isDarkTheme = state.facet(import_view2.EditorView.darkTheme);
|
|
549
|
-
const icon = document.createElement("span");
|
|
550
|
-
icon.innerHTML = getIconForType(completion.type, isDarkTheme);
|
|
551
|
-
const svgElement = icon.children[0];
|
|
552
|
-
svgElement.style.display = "inline";
|
|
553
|
-
svgElement.style.marginRight = "5px";
|
|
554
|
-
return icon;
|
|
555
|
-
},
|
|
556
|
-
position: 20
|
|
557
|
-
}
|
|
558
|
-
]
|
|
559
|
-
})
|
|
560
|
-
);
|
|
561
|
-
extensions.push((0, import_view2.rectangularSelection)());
|
|
562
|
-
extensions.push((0, import_view2.crosshairCursor)());
|
|
563
|
-
extensions.push((0, import_search.highlightSelectionMatches)());
|
|
564
|
-
extensions.push(import_view2.keymap.of(keymaps));
|
|
565
|
-
return extensions;
|
|
566
|
-
};
|
|
567
|
-
|
|
568
|
-
// src/themes.ts
|
|
569
|
-
var import_ayu = require("ayu");
|
|
570
|
-
|
|
571
|
-
// src/lang-cypher/create-cypher-theme.ts
|
|
572
|
-
var import_language4 = require("@codemirror/language");
|
|
573
|
-
var import_view3 = require("@codemirror/view");
|
|
574
|
-
|
|
575
|
-
// src/lang-cypher/theme-icons.ts
|
|
576
|
-
var upArrowSvg = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
577
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.8538 6.99999L8.85384 2H8.14673L3.14673 6.99999L3.85384 7.7071L8.00027 3.56066V14H9.00027V3.56066L13.1467 7.7071L13.8538 6.99999Z" fill="#424242"/>
|
|
578
|
-
</svg>`;
|
|
579
|
-
var downArrowSvg = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
580
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.14667 9.00001L8.14665 14L8.85376 14L13.8538 9.00001L13.1467 8.2929L9.00021 12.4393L9.00022 2.00001L8.00022 2.00001L8.00022 12.4393L3.85378 8.2929L3.14667 9.00001Z" fill="#424242"/>
|
|
581
|
-
</svg>`;
|
|
582
|
-
var replaceSvg = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
583
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.22124 3.739L5.48224 6.008L7.70024 3.784L7.00025 3.084L5.98824 4.091L5.98024 2.491C5.97934 2.35567 6.03093 2.22525 6.12417 2.12716C6.21741 2.02908 6.34504 1.97095 6.48024 1.965H8.00024V1H6.48024C6.2852 1.00026 6.09213 1.03902 5.9121 1.11405C5.73207 1.18908 5.56862 1.29892 5.43112 1.43725C5.29363 1.57558 5.18479 1.73969 5.11085 1.92018C5.03691 2.10066 4.99932 2.29396 5.00024 2.489V4.1L3.92724 3.033L3.22124 3.739ZM9.89038 5.53277H9.90165C10.0838 5.84426 10.3524 6 10.7073 6C11.0998 6 11.4134 5.83236 11.6481 5.49708C11.8829 5.1618 12.0002 4.71728 12.0002 4.16353C12.0002 3.65304 11.8998 3.2507 11.6988 2.95652C11.4979 2.66234 11.2115 2.51525 10.8397 2.51525C10.434 2.51525 10.1214 2.70885 9.90165 3.09604H9.89038V1H9.00024V5.91888H9.89038V5.53277ZM9.8763 4.47177V4.13108C9.8763 3.88449 9.93452 3.6844 10.0509 3.53082C10.1693 3.37724 10.3176 3.30045 10.496 3.30045C10.6857 3.30045 10.8312 3.37833 10.9326 3.53407C11.0359 3.68765 11.0876 3.9018 11.0876 4.17651C11.0876 4.50746 11.0312 4.76379 10.9186 4.94549C10.8078 5.12503 10.6509 5.2148 10.4481 5.2148C10.281 5.2148 10.1439 5.14449 10.0369 5.00389C9.92982 4.86329 9.8763 4.68592 9.8763 4.47177ZM9.00024 12.7691C8.74457 12.923 8.37539 13 7.89272 13C7.3288 13 6.87241 12.8225 6.52354 12.4674C6.17468 12.1124 6.00024 11.6543 6.00024 11.0931C6.00024 10.4451 6.18662 9.93484 6.55938 9.5624C6.93453 9.18747 7.43513 9.00001 8.06118 9.00001C8.49367 9.00001 8.8067 9.0596 9.00024 9.17878V10.1769C8.76369 9.99319 8.49965 9.90132 8.20813 9.90132C7.88316 9.90132 7.62509 10.0006 7.43394 10.1993C7.24517 10.3954 7.15078 10.6673 7.15078 11.0149C7.15078 11.3526 7.24158 11.6183 7.42318 11.8119C7.60478 12.0031 7.85449 12.0987 8.17229 12.0987C8.45425 12.0987 8.73023 12.0068 9.00024 11.8231V12.7691ZM4.00024 7L3.00024 8V14L4.00024 15H11.0002L12.0002 14V8L11.0002 7H4.00024ZM4.00024 8H5.00024H10.0002H11.0002V9V13V14H10.0002H5.00024H4.00024V13V9V8Z" fill="#424242"/>
|
|
584
|
-
</svg>`;
|
|
585
|
-
var replaceAllSvg = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
586
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.6012 2.67683C11.7477 2.36708 11.9561 2.2122 12.2265 2.2122C12.4744 2.2122 12.6653 2.32987 12.7993 2.56522C12.9333 2.80056 13.0002 3.12243 13.0002 3.53082C13.0002 3.97383 12.922 4.32944 12.7655 4.59766C12.609 4.86589 12.3999 5 12.1383 5C11.9017 5 11.7226 4.87541 11.6012 4.62622H11.5937V4.93511H11.0002V1H11.5937V2.67683H11.6012ZM11.5843 3.77742C11.5843 3.94873 11.62 4.09063 11.6913 4.20311C11.7627 4.3156 11.8541 4.37184 11.9655 4.37184C12.1007 4.37184 12.2053 4.30002 12.2791 4.15639C12.3542 4.01103 12.3918 3.80597 12.3918 3.54121C12.3918 3.32144 12.3574 3.15012 12.2885 3.02726C12.2209 2.90266 12.1239 2.84036 11.9974 2.84036C11.8785 2.84036 11.7796 2.9018 11.7007 3.02466C11.6231 3.14752 11.5843 3.30759 11.5843 3.50487V3.77742ZM4.11993 7.695L2.00024 5.56781L2.66212 4.90594L3.66806 5.90625V4.39594C3.66719 4.21309 3.70243 4.03187 3.77175 3.86266C3.84107 3.69346 3.9431 3.53961 4.07201 3.40992C4.20091 3.28023 4.35414 3.17727 4.52292 3.10692C4.6917 3.03658 4.87271 3.00024 5.05556 3H7.39931V3.90469H5.05556C4.9288 3.91026 4.80915 3.96476 4.72173 4.05672C4.63432 4.14868 4.58596 4.27094 4.58681 4.39781L4.59431 5.89781L5.54306 4.95375L6.19931 5.61L4.11993 7.695ZM9.35585 4.93017H10.0002V3.22067C10.0002 2.40689 9.68559 2 9.05628 2C8.92122 2 8.77108 2.02421 8.60585 2.07263C8.44205 2.12104 8.31274 2.17691 8.21792 2.24022V2.90503C8.45499 2.70205 8.70499 2.60056 8.96792 2.60056C9.22941 2.60056 9.36016 2.75698 9.36016 3.06983L8.76102 3.17318C8.25384 3.25885 8.00024 3.57914 8.00024 4.13408C8.00024 4.39665 8.06131 4.60708 8.18343 4.76536C8.307 4.92179 8.47582 5 8.6899 5C8.98013 5 9.19924 4.83985 9.34723 4.51955H9.35585V4.93017ZM9.36016 3.57542V3.76816C9.36016 3.9432 9.31993 4.08845 9.23947 4.20391C9.15901 4.3175 9.05484 4.3743 8.92697 4.3743C8.83501 4.3743 8.76174 4.34264 8.70714 4.27933C8.65398 4.21415 8.6274 4.13128 8.6274 4.03073C8.6274 3.80912 8.73803 3.6797 8.9593 3.64246L9.36016 3.57542ZM7.00024 12.9302H6.35585V12.5196H6.34723C6.19924 12.8399 5.98013 13 5.6899 13C5.47582 13 5.307 12.9218 5.18343 12.7654C5.06131 12.6071 5.00024 12.3966 5.00024 12.1341C5.00024 11.5791 5.25384 11.2588 5.76102 11.1732L6.36016 11.0698C6.36016 10.757 6.22941 10.6006 5.96792 10.6006C5.70499 10.6006 5.45499 10.702 5.21792 10.905V10.2402C5.31274 10.1769 5.44205 10.121 5.60585 10.0726C5.77108 10.0242 5.92122 10 6.05628 10C6.68559 10 7.00024 10.4069 7.00024 11.2207V12.9302ZM6.36016 11.7682V11.5754L5.9593 11.6425C5.73803 11.6797 5.6274 11.8091 5.6274 12.0307C5.6274 12.1313 5.65398 12.2142 5.70714 12.2793C5.76174 12.3426 5.83501 12.3743 5.92697 12.3743C6.05484 12.3743 6.15901 12.3175 6.23947 12.2039C6.31993 12.0885 6.36016 11.9432 6.36016 11.7682ZM9.26189 13C9.58368 13 9.82979 12.9423 10.0002 12.8268V12.1173C9.82024 12.2551 9.63625 12.324 9.44827 12.324C9.2364 12.324 9.06994 12.2523 8.94887 12.1089C8.8278 11.9637 8.76727 11.7644 8.76727 11.5112C8.76727 11.2505 8.83019 11.0466 8.95604 10.8994C9.08348 10.7505 9.25552 10.676 9.47217 10.676C9.66651 10.676 9.84254 10.7449 10.0002 10.8827V10.1341C9.87121 10.0447 9.66253 10 9.3742 10C8.95684 10 8.6231 10.1406 8.373 10.4218C8.1245 10.7011 8.00024 11.0838 8.00024 11.5698C8.00024 11.9907 8.11653 12.3343 8.34911 12.6006C8.58169 12.8669 8.88595 13 9.26189 13ZM2.00024 9L3.00024 8H12.0002L13.0002 9V14L12.0002 15H3.00024L2.00024 14V9ZM3.00024 9V14H12.0002V9H3.00024ZM6.00024 7L7.00024 6H14.0002L15.0002 7V12L14.0002 13V12V7H7.00024H6.00024Z" fill="#424242"/>
|
|
587
|
-
</svg>`;
|
|
588
|
-
var caseSensitiveSvg = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
589
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.49524 9.052L8.38624 11.402H9.47724L6.23724 3H5.21724L2.00024 11.402H3.09524L3.93324 9.052H7.49524ZM5.81124 4.453L5.85524 4.588L7.17324 8.162H4.25524L5.56224 4.588L5.60624 4.453L5.64424 4.297L5.67624 4.145L5.69724 4.019H5.72024L5.74424 4.145L5.77324 4.297L5.81124 4.453ZM13.7952 10.464V11.4H14.7552V7.498C14.7552 6.779 14.5752 6.226 14.2162 5.837C13.8572 5.448 13.3272 5.254 12.6282 5.254C12.4292 5.254 12.2272 5.273 12.0222 5.31C11.8172 5.347 11.6222 5.394 11.4392 5.451C11.2562 5.508 11.0912 5.569 10.9442 5.636C10.7972 5.703 10.6832 5.765 10.6012 5.824V6.808C10.8672 6.578 11.1672 6.397 11.5052 6.268C11.8432 6.139 12.1942 6.075 12.5572 6.075C12.7452 6.075 12.9152 6.103 13.0702 6.16C13.2252 6.217 13.3572 6.306 13.4662 6.427C13.5752 6.548 13.6592 6.706 13.7182 6.899C13.7772 7.092 13.8062 7.326 13.8062 7.599L11.9952 7.851C11.6512 7.898 11.3552 7.977 11.1072 8.088C10.8592 8.199 10.6542 8.339 10.4922 8.507C10.3302 8.675 10.2102 8.868 10.1322 9.087C10.0542 9.306 10.0152 9.546 10.0152 9.808C10.0152 10.054 10.0572 10.283 10.1392 10.496C10.2212 10.709 10.3422 10.893 10.5022 11.047C10.6622 11.201 10.8622 11.323 11.1002 11.413C11.3382 11.503 11.6132 11.548 11.9262 11.548C12.3282 11.548 12.6862 11.456 13.0012 11.27C13.3162 11.084 13.5732 10.816 13.7722 10.464H13.7952ZM11.6672 8.721C11.8432 8.657 12.0682 8.607 12.3412 8.572L13.8062 8.367V8.976C13.8062 9.222 13.7652 9.451 13.6832 9.664C13.6012 9.877 13.4862 10.063 13.3402 10.221C13.1942 10.379 13.0192 10.503 12.8162 10.593C12.6132 10.683 12.3902 10.728 12.1482 10.728C11.9612 10.728 11.7952 10.703 11.6532 10.652C11.5112 10.601 11.3922 10.53 11.2962 10.441C11.2002 10.352 11.1272 10.247 11.0762 10.125C11.0252 10.003 11.0002 9.873 11.0002 9.732C11.0002 9.568 11.0182 9.421 11.0552 9.292C11.0922 9.163 11.1602 9.051 11.2572 8.958C11.3542 8.865 11.4912 8.785 11.6672 8.721Z" fill="#424242"/>
|
|
590
|
-
</svg>`;
|
|
591
|
-
var regexSvg = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
592
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.0124 2H10.9881V5.11346L13.5492 3.55609L14.0343 4.44095L11.4704 6L14.0343 7.55905L13.5492 8.44391L10.9881 6.88654V10H10.0124V6.88654L7.45138 8.44391L6.96631 7.55905L9.53014 6L6.96631 4.44095L7.45138 3.55609L10.0124 5.11346V2ZM2.00024 10H6.00024V14H2.00024V10Z" fill="#424242"/>
|
|
593
|
-
</svg>`;
|
|
594
|
-
var byWordSvg = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
595
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.00024 2H15.0002V3H1.00024V2ZM14.0002 4H13.0002V12H14.0002V4ZM11.2722 8.387C11.1942 8.088 11.0732 7.825 10.9122 7.601C10.7512 7.377 10.5472 7.2 10.3032 7.071C10.0592 6.942 9.76924 6.878 9.43724 6.878C9.23924 6.878 9.05724 6.902 8.89024 6.951C8.72524 7 8.57424 7.068 8.43724 7.156C8.30124 7.244 8.18024 7.35 8.07224 7.474L7.89324 7.732V4.578H7.00024V12H7.89324V11.425L8.01924 11.6C8.10624 11.702 8.20824 11.79 8.32324 11.869C8.44024 11.947 8.57224 12.009 8.72124 12.055C8.87024 12.101 9.03524 12.123 9.21924 12.123C9.57224 12.123 9.88524 12.052 10.1562 11.911C10.4282 11.768 10.6552 11.573 10.8382 11.325C11.0212 11.075 11.1592 10.782 11.2522 10.446C11.3452 10.108 11.3922 9.743 11.3922 9.349C11.3912 9.007 11.3522 8.686 11.2722 8.387ZM9.79324 7.78C9.94424 7.851 10.0752 7.956 10.1832 8.094C10.2922 8.234 10.3772 8.407 10.4382 8.611C10.4892 8.785 10.5202 8.982 10.5272 9.198L10.5202 9.323C10.5202 9.65 10.4872 9.943 10.4202 10.192C10.3532 10.438 10.2592 10.645 10.1422 10.806C10.0252 10.968 9.88224 11.091 9.72124 11.172C9.39924 11.334 8.96124 11.338 8.65224 11.187C8.49924 11.112 8.36624 11.012 8.25924 10.891C8.17424 10.795 8.10324 10.675 8.04124 10.524C8.04124 10.524 7.86224 10.077 7.86224 9.577C7.86224 9.077 8.04124 8.575 8.04124 8.575C8.10324 8.398 8.17724 8.257 8.26524 8.145C8.37924 8.002 8.52124 7.886 8.68924 7.8C8.85724 7.714 9.05424 7.671 9.27624 7.671C9.46624 7.671 9.64024 7.708 9.79324 7.78ZM15.0002 13H1.00024V14H15.0002V13ZM2.81324 10L2.08524 12.031H1.00024L1.02524 11.959L3.46624 4.87305H4.40724L6.89224 12.031H5.81024L5.03224 10H2.81324ZM3.93424 6.42205H3.91224L3.00724 9.17505H4.84824L3.93424 6.42205Z" fill="#424242"/>
|
|
596
|
-
</svg>`;
|
|
597
|
-
|
|
598
|
-
// src/lang-cypher/create-cypher-theme.ts
|
|
599
|
-
var createCypherTheme = ({
|
|
600
|
-
dark,
|
|
601
|
-
editorSettings: settings,
|
|
602
|
-
highlightStyles,
|
|
603
|
-
inheritBgColor
|
|
604
|
-
}) => {
|
|
605
|
-
const themeOptions = {
|
|
606
|
-
"&": {
|
|
607
|
-
backgroundColor: inheritBgColor ? "inherit" : settings.background,
|
|
608
|
-
color: settings.foreground,
|
|
609
|
-
fontVariantLigatures: "none"
|
|
610
|
-
},
|
|
611
|
-
"&.cm-focused": {
|
|
612
|
-
outline: "none"
|
|
613
|
-
},
|
|
614
|
-
".cm-gutters": {
|
|
615
|
-
backgroundColor: inheritBgColor ? "inherit" : settings.background,
|
|
616
|
-
color: settings.gutterForeground,
|
|
617
|
-
border: "none"
|
|
618
|
-
},
|
|
619
|
-
"&.cm-editor .cm-scroller": {
|
|
620
|
-
fontFamily: "Fira Code, Menlo, Monaco, Lucida Console, monospace"
|
|
621
|
-
},
|
|
622
|
-
".cm-content": {
|
|
623
|
-
caretColor: settings.cursor
|
|
624
|
-
},
|
|
625
|
-
".cm-cursor, .cm-dropCursor": {
|
|
626
|
-
borderLeftColor: settings.cursor
|
|
627
|
-
},
|
|
628
|
-
".cm-activeLine ::not(::selection)": {
|
|
629
|
-
backgroundColor: settings.background
|
|
630
|
-
},
|
|
631
|
-
"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection ": {
|
|
632
|
-
backgroundColor: settings.selection
|
|
633
|
-
},
|
|
634
|
-
"& .cm-selectionMatch": {
|
|
635
|
-
backgroundColor: settings.textMatchingSelection
|
|
636
|
-
},
|
|
637
|
-
"& .cm-panels": {
|
|
638
|
-
backgroundColor: settings.searchPanel.background,
|
|
639
|
-
fontFamily: "Fira Code, Menlo, Monaco, Lucida Console, monospace"
|
|
640
|
-
},
|
|
641
|
-
"& .cm-completionLabel": {
|
|
642
|
-
fontFamily: "Fira Code, Menlo, Monaco, Lucida Console, monospace",
|
|
643
|
-
verticalAlign: "middle"
|
|
644
|
-
},
|
|
645
|
-
"& .cm-completionMatchedText": {
|
|
646
|
-
fontWeight: "bold",
|
|
647
|
-
color: settings.autoCompletionPanel.matchingTextColor,
|
|
648
|
-
textDecoration: "none"
|
|
649
|
-
},
|
|
650
|
-
".cm-tooltip-autocomplete": {
|
|
651
|
-
"& > ul > li[aria-selected]": {
|
|
652
|
-
backgroundColor: settings.autoCompletionPanel.selectedColor,
|
|
653
|
-
color: settings.foreground
|
|
654
|
-
},
|
|
655
|
-
"& > ul": {
|
|
656
|
-
backgroundColor: settings.autoCompletionPanel.backgroundColor,
|
|
657
|
-
color: settings.foreground
|
|
658
|
-
}
|
|
659
|
-
},
|
|
660
|
-
"& .cm-search.cm-panel": {
|
|
661
|
-
"& input": {
|
|
662
|
-
fontFamily: "Fira Code, Menlo, Monaco, Lucida Console, monospace"
|
|
663
|
-
},
|
|
664
|
-
backgroundColor: settings.searchPanel.background,
|
|
665
|
-
color: settings.searchPanel.text,
|
|
666
|
-
"& .cm-button[name=select]": { display: "none" },
|
|
667
|
-
"& .cm-button": {
|
|
668
|
-
backgroundImage: "none",
|
|
669
|
-
color: settings.searchPanel.text,
|
|
670
|
-
fontSize: 0,
|
|
671
|
-
border: "none",
|
|
672
|
-
verticalAlign: "middle",
|
|
673
|
-
"&[name=next]::before": {
|
|
674
|
-
content: `url("data:image/svg+xml;base64,${window.btoa(
|
|
675
|
-
downArrowSvg
|
|
676
|
-
)}")`
|
|
677
|
-
},
|
|
678
|
-
"&[name=prev]::before": {
|
|
679
|
-
content: `url("data:image/svg+xml;base64,${window.btoa(
|
|
680
|
-
upArrowSvg
|
|
681
|
-
)}")`
|
|
682
|
-
},
|
|
683
|
-
"&[name=replace]::before": {
|
|
684
|
-
content: `url("data:image/svg+xml;base64,${window.btoa(
|
|
685
|
-
replaceSvg
|
|
686
|
-
)}")`
|
|
687
|
-
},
|
|
688
|
-
"&[name=replaceAll]::before": {
|
|
689
|
-
content: `url("data:image/svg+xml;base64,${window.btoa(
|
|
690
|
-
replaceAllSvg
|
|
691
|
-
)}")`
|
|
692
|
-
},
|
|
693
|
-
width: "20px",
|
|
694
|
-
height: "20px",
|
|
695
|
-
marginRight: "1px",
|
|
696
|
-
marginLeft: "1px",
|
|
697
|
-
borderRadius: "4px",
|
|
698
|
-
padding: "2px",
|
|
699
|
-
"&:hover": {
|
|
700
|
-
backgroundColor: settings.searchPanel.buttonHoverBackground
|
|
701
|
-
}
|
|
702
|
-
},
|
|
703
|
-
"& label": {
|
|
704
|
-
fontSize: "0",
|
|
705
|
-
height: "20px",
|
|
706
|
-
width: "20px",
|
|
707
|
-
verticalAlign: "middle",
|
|
708
|
-
"& input[type='checkbox']": {
|
|
709
|
-
cursor: "pointer",
|
|
710
|
-
appearance: "none",
|
|
711
|
-
marginRight: "1px",
|
|
712
|
-
marginLeft: "1px",
|
|
713
|
-
padding: "2px",
|
|
714
|
-
height: "20px",
|
|
715
|
-
width: "20px",
|
|
716
|
-
verticalAlign: "middle",
|
|
717
|
-
display: "inline-flex",
|
|
718
|
-
borderRadius: "4px",
|
|
719
|
-
"&[name=case]::before": {
|
|
720
|
-
content: `url("data:image/svg+xml;base64,${window.btoa(
|
|
721
|
-
caseSensitiveSvg
|
|
722
|
-
)}")`
|
|
723
|
-
},
|
|
724
|
-
"&[name=re]::before": {
|
|
725
|
-
content: `url("data:image/svg+xml;base64,${window.btoa(
|
|
726
|
-
regexSvg
|
|
727
|
-
)}")`
|
|
728
|
-
},
|
|
729
|
-
"&[name=word]::before": {
|
|
730
|
-
content: `url("data:image/svg+xml;base64,${window.btoa(
|
|
731
|
-
byWordSvg
|
|
732
|
-
)}")`
|
|
733
|
-
},
|
|
734
|
-
"&:hover": {
|
|
735
|
-
backgroundColor: settings.searchPanel.buttonHoverBackground
|
|
736
|
-
},
|
|
737
|
-
"&:checked": {
|
|
738
|
-
backgroundColor: settings.searchPanel.buttonHoverBackground
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
};
|
|
744
|
-
const themeExtension = import_view3.EditorView.theme(themeOptions, { dark });
|
|
745
|
-
const styles = Object.entries(highlightStyles).map(
|
|
746
|
-
([token, color]) => ({
|
|
747
|
-
tag: tokenTypeToStyleTag[token],
|
|
748
|
-
color
|
|
749
|
-
})
|
|
750
|
-
);
|
|
751
|
-
const highlightStyle = import_language4.HighlightStyle.define(styles);
|
|
752
|
-
const extension = [themeExtension, (0, import_language4.syntaxHighlighting)(highlightStyle)];
|
|
753
|
-
return extension;
|
|
754
|
-
};
|
|
755
|
-
|
|
756
|
-
// src/ndl-tokens-copy.ts
|
|
757
|
-
var tokens = {
|
|
758
|
-
borderRadius: {
|
|
759
|
-
"1xl": "12px",
|
|
760
|
-
"2xl": "14px",
|
|
761
|
-
"3xl": "16px",
|
|
762
|
-
"4xl": "18px",
|
|
763
|
-
"5xl": "20px",
|
|
764
|
-
full: "9999px",
|
|
765
|
-
lg: "8px",
|
|
766
|
-
md: "6px",
|
|
767
|
-
none: "0px",
|
|
768
|
-
sm: "4px",
|
|
769
|
-
xl: "10px"
|
|
770
|
-
},
|
|
771
|
-
boxShadow: {
|
|
772
|
-
l2: "0px 1px 2px 0px rgba(12, 26, 37, 0.18)",
|
|
773
|
-
l3: "0px 4px 8px 0px rgba(12, 26, 37, 0.04)",
|
|
774
|
-
l4: "0px 4px 8px 0px rgba(12, 26, 37, 0.08)",
|
|
775
|
-
l5: "0px 8px 20px 0px rgba(12, 26, 37, 0.12)"
|
|
776
|
-
},
|
|
777
|
-
breakpoints: {
|
|
778
|
-
"2xl": "1536px",
|
|
779
|
-
lg: "1024px",
|
|
780
|
-
md: "768px",
|
|
781
|
-
sm: "640px",
|
|
782
|
-
xl: "1280px",
|
|
783
|
-
xs: "450px"
|
|
784
|
-
},
|
|
785
|
-
colors: {
|
|
786
|
-
blueberry: {
|
|
787
|
-
"10": "#E8EBF6",
|
|
788
|
-
"20": "#C4CCE9",
|
|
789
|
-
"30": "#9DABD9",
|
|
790
|
-
"40": "#768ACA",
|
|
791
|
-
"50": "#3557B4",
|
|
792
|
-
"60": "#25459E",
|
|
793
|
-
"70": "#0B297D"
|
|
794
|
-
},
|
|
795
|
-
danger: {
|
|
796
|
-
"10": "#ffe6e9",
|
|
797
|
-
"20": "#ffb8c4",
|
|
798
|
-
"30": "#ff668a",
|
|
799
|
-
"40": "#ed1252",
|
|
800
|
-
"50": "#cc254b",
|
|
801
|
-
"60": "#a1003b",
|
|
802
|
-
"70": "#7a0031"
|
|
803
|
-
},
|
|
804
|
-
mint: {
|
|
805
|
-
"10": "#F0FFFA",
|
|
806
|
-
"20": "#D1FFF4",
|
|
807
|
-
"30": "#A8FFEE",
|
|
808
|
-
"40": "#55F9E2",
|
|
809
|
-
"50": "#3DD4C5",
|
|
810
|
-
"60": "#2AADA5",
|
|
811
|
-
"70": "#116161"
|
|
812
|
-
},
|
|
813
|
-
neutral: {
|
|
814
|
-
"10": "#FFFFFF",
|
|
815
|
-
"20": "#F5F7FA",
|
|
816
|
-
"30": "#EEF1F6",
|
|
817
|
-
"40": "#E6E9EE",
|
|
818
|
-
"50": "#C4C8CD",
|
|
819
|
-
"60": "#B2B7BD",
|
|
820
|
-
"70": "#717780",
|
|
821
|
-
"80": "#535B66",
|
|
822
|
-
"90": "#151E29"
|
|
823
|
-
},
|
|
824
|
-
primary: {
|
|
825
|
-
"10": "#e6f8ff",
|
|
826
|
-
"20": "#a3e2ff",
|
|
827
|
-
"30": "#7ad1ff",
|
|
828
|
-
"40": "#018bff",
|
|
829
|
-
"50": "#006FD6",
|
|
830
|
-
"60": "#0056b3",
|
|
831
|
-
"70": "#004092"
|
|
832
|
-
},
|
|
833
|
-
success: {
|
|
834
|
-
"10": "#E1FAEF",
|
|
835
|
-
"20": "#98EDCB",
|
|
836
|
-
"30": "#44D4A4",
|
|
837
|
-
"40": "#00BA88",
|
|
838
|
-
"50": "#327D60",
|
|
839
|
-
"60": "#006E58",
|
|
840
|
-
"70": "#00473B"
|
|
841
|
-
},
|
|
842
|
-
warning: {
|
|
843
|
-
"10": "#FFFBDE",
|
|
844
|
-
"20": "#FFF4B5",
|
|
845
|
-
"30": "#FFEA8C",
|
|
846
|
-
"40": "#FFDE63",
|
|
847
|
-
"50": "#D9B54A",
|
|
848
|
-
"60": "#966c2e",
|
|
849
|
-
"70": "#664817"
|
|
850
|
-
}
|
|
851
|
-
},
|
|
852
|
-
font: {
|
|
853
|
-
size: {
|
|
854
|
-
"body-large": "1rem",
|
|
855
|
-
"body-medium": "0.875rem",
|
|
856
|
-
"body-small": "0.75rem",
|
|
857
|
-
code: "0.875rem",
|
|
858
|
-
h1: "3rem",
|
|
859
|
-
h2: "2.5rem",
|
|
860
|
-
h3: "1.875rem",
|
|
861
|
-
h4: "1.5rem",
|
|
862
|
-
h5: "1.25rem",
|
|
863
|
-
h6: "1rem",
|
|
864
|
-
label: "0.875rem",
|
|
865
|
-
"subheading-large": "1.25rem",
|
|
866
|
-
"subheading-medium": "1rem",
|
|
867
|
-
"subheading-small": "0.875rem"
|
|
868
|
-
},
|
|
869
|
-
weight: {
|
|
870
|
-
bold: "700",
|
|
871
|
-
light: "300",
|
|
872
|
-
medium: "500",
|
|
873
|
-
normal: "400",
|
|
874
|
-
semibold: "600"
|
|
875
|
-
}
|
|
876
|
-
},
|
|
877
|
-
palette: {
|
|
878
|
-
categorical: {
|
|
879
|
-
"1": "#55BDC5",
|
|
880
|
-
"10": "#BF732D",
|
|
881
|
-
"11": "#478A6E",
|
|
882
|
-
"12": "#ADE86B",
|
|
883
|
-
"2": "#4D49CB",
|
|
884
|
-
"3": "#DC8B39",
|
|
885
|
-
"4": "#C9458D",
|
|
886
|
-
"5": "#8E8CF3",
|
|
887
|
-
"6": "#78DE7C",
|
|
888
|
-
"7": "#3F80E3",
|
|
889
|
-
"8": "#673FAB",
|
|
890
|
-
"9": "#DBBF40"
|
|
891
|
-
},
|
|
892
|
-
dark: {
|
|
893
|
-
danger: {
|
|
894
|
-
bg: {
|
|
895
|
-
strong: "#ffb8c4",
|
|
896
|
-
weak: "68, 61, 72"
|
|
897
|
-
},
|
|
898
|
-
border: {
|
|
899
|
-
strong: "#ffb8c4",
|
|
900
|
-
weak: "114, 91, 103"
|
|
901
|
-
},
|
|
902
|
-
hover: {
|
|
903
|
-
strong: "#ff668a",
|
|
904
|
-
weak: "rgba(255, 102, 138,0.08)"
|
|
905
|
-
},
|
|
906
|
-
icon: "#ffb8c4",
|
|
907
|
-
pressed: {
|
|
908
|
-
strong: "#ff668a",
|
|
909
|
-
weak: "rgba(255, 102, 138,0.12)"
|
|
910
|
-
},
|
|
911
|
-
text: "#ffb8c4"
|
|
912
|
-
},
|
|
913
|
-
neutral: {
|
|
914
|
-
bg: {
|
|
915
|
-
default: "#151E29",
|
|
916
|
-
strong: "45, 53, 63",
|
|
917
|
-
strongest: "#FFFFFF",
|
|
918
|
-
weak: "29, 38, 49"
|
|
919
|
-
},
|
|
920
|
-
border: {
|
|
921
|
-
strong: "#717780",
|
|
922
|
-
weak: "37, 47, 59"
|
|
923
|
-
},
|
|
924
|
-
hover: "rgba(196, 200, 205,0.1)",
|
|
925
|
-
icon: "#C4C8CD",
|
|
926
|
-
pressed: "rgba(196, 200, 205,0.2)",
|
|
927
|
-
text: {
|
|
928
|
-
default: "#F5F7FA",
|
|
929
|
-
inverse: "#151E29",
|
|
930
|
-
weak: "#C4C8CD",
|
|
931
|
-
weaker: "#B2B7BD",
|
|
932
|
-
weakest: "#717780"
|
|
933
|
-
}
|
|
934
|
-
},
|
|
935
|
-
primary: {
|
|
936
|
-
bg: {
|
|
937
|
-
strong: "#a3e2ff",
|
|
938
|
-
weak: "49, 69, 84"
|
|
939
|
-
},
|
|
940
|
-
border: {
|
|
941
|
-
strong: "#a3e2ff",
|
|
942
|
-
weak: "78, 108, 126"
|
|
943
|
-
},
|
|
944
|
-
focus: "#7ad1ff",
|
|
945
|
-
hover: {
|
|
946
|
-
strong: "#7ad1ff",
|
|
947
|
-
weak: "rgba(122, 209, 255,0.08)"
|
|
948
|
-
},
|
|
949
|
-
icon: "#a3e2ff",
|
|
950
|
-
pressed: {
|
|
951
|
-
strong: "#7ad1ff",
|
|
952
|
-
weak: "rgba(122, 209, 255,0.12)"
|
|
953
|
-
},
|
|
954
|
-
text: "#a3e2ff"
|
|
955
|
-
},
|
|
956
|
-
success: {
|
|
957
|
-
bg: {
|
|
958
|
-
strong: "#98EDCB",
|
|
959
|
-
weak: "47, 71, 73"
|
|
960
|
-
},
|
|
961
|
-
border: {
|
|
962
|
-
strong: "#98EDCB",
|
|
963
|
-
weak: "73, 113, 106"
|
|
964
|
-
},
|
|
965
|
-
icon: "#98EDCB",
|
|
966
|
-
text: "#98EDCB"
|
|
967
|
-
},
|
|
968
|
-
warning: {
|
|
969
|
-
bg: {
|
|
970
|
-
strong: "#FFEA8C",
|
|
971
|
-
weak: "68, 71, 60"
|
|
972
|
-
},
|
|
973
|
-
border: {
|
|
974
|
-
strong: "#FFEA8C",
|
|
975
|
-
weak: "114, 111, 80"
|
|
976
|
-
},
|
|
977
|
-
icon: "#FFEA8C",
|
|
978
|
-
text: "#FFEA8C"
|
|
979
|
-
}
|
|
980
|
-
},
|
|
981
|
-
graph: {
|
|
982
|
-
"1": "#FFDF81",
|
|
983
|
-
"10": "#FFC354",
|
|
984
|
-
"11": "#DA7294",
|
|
985
|
-
"12": "#579380",
|
|
986
|
-
"2": "#C990C0",
|
|
987
|
-
"3": "#F79767",
|
|
988
|
-
"4": "#56C7E4",
|
|
989
|
-
"5": "#F16767",
|
|
990
|
-
"6": "#D8C7AE",
|
|
991
|
-
"7": "#8DCC93",
|
|
992
|
-
"8": "#ECB4C9",
|
|
993
|
-
"9": "#4D8DDA"
|
|
994
|
-
},
|
|
995
|
-
light: {
|
|
996
|
-
danger: {
|
|
997
|
-
bg: {
|
|
998
|
-
strong: "#cc254b",
|
|
999
|
-
weak: "#ffe6e9"
|
|
1000
|
-
},
|
|
1001
|
-
border: {
|
|
1002
|
-
strong: "#cc254b",
|
|
1003
|
-
weak: "#ffb8c4"
|
|
1004
|
-
},
|
|
1005
|
-
hover: {
|
|
1006
|
-
strong: "#a1003b",
|
|
1007
|
-
weak: "rgba(237,18,82,0.08)"
|
|
1008
|
-
},
|
|
1009
|
-
icon: "#cc254b",
|
|
1010
|
-
pressed: {
|
|
1011
|
-
strong: "#7a0031",
|
|
1012
|
-
weak: "rgba(237,18,82,0.12)"
|
|
1013
|
-
},
|
|
1014
|
-
text: "#cc254b"
|
|
1015
|
-
},
|
|
1016
|
-
neutral: {
|
|
1017
|
-
bg: {
|
|
1018
|
-
default: "#F5F7FA",
|
|
1019
|
-
strong: "#E6E9EE",
|
|
1020
|
-
strongest: "#535B66",
|
|
1021
|
-
weak: "#FFFFFF"
|
|
1022
|
-
},
|
|
1023
|
-
border: {
|
|
1024
|
-
strong: "#C4C8CD",
|
|
1025
|
-
weak: "#EEF1F6"
|
|
1026
|
-
},
|
|
1027
|
-
hover: "rgba(113,119,128,0.1)",
|
|
1028
|
-
icon: "#535B66",
|
|
1029
|
-
pressed: "rgba(113,119,128,0.2)",
|
|
1030
|
-
text: {
|
|
1031
|
-
default: "#151E29",
|
|
1032
|
-
inverse: "#FFFFFF",
|
|
1033
|
-
weak: "#535B66",
|
|
1034
|
-
weaker: "#717780",
|
|
1035
|
-
weakest: "#B2B7BD"
|
|
1036
|
-
}
|
|
1037
|
-
},
|
|
1038
|
-
primary: {
|
|
1039
|
-
bg: {
|
|
1040
|
-
strong: "#006FD6",
|
|
1041
|
-
weak: "#e6f8ff"
|
|
1042
|
-
},
|
|
1043
|
-
border: {
|
|
1044
|
-
strong: "#006FD6",
|
|
1045
|
-
weak: "#7ad1ff"
|
|
1046
|
-
},
|
|
1047
|
-
focus: "#018bff",
|
|
1048
|
-
hover: {
|
|
1049
|
-
strong: "#0056b3",
|
|
1050
|
-
weak: "rgba(1,139,255,0.08)"
|
|
1051
|
-
},
|
|
1052
|
-
icon: "#006FD6",
|
|
1053
|
-
pressed: {
|
|
1054
|
-
strong: "#004092",
|
|
1055
|
-
weak: "rgba(1,139,255,0.12)"
|
|
1056
|
-
},
|
|
1057
|
-
text: "#006FD6"
|
|
1058
|
-
},
|
|
1059
|
-
success: {
|
|
1060
|
-
bg: {
|
|
1061
|
-
strong: "#327D60",
|
|
1062
|
-
weak: "#E1FAEF"
|
|
1063
|
-
},
|
|
1064
|
-
border: {
|
|
1065
|
-
strong: "#327D60",
|
|
1066
|
-
weak: "#98EDCB"
|
|
1067
|
-
},
|
|
1068
|
-
icon: "#327D60",
|
|
1069
|
-
text: "#327D60"
|
|
1070
|
-
},
|
|
1071
|
-
warning: {
|
|
1072
|
-
bg: {
|
|
1073
|
-
strong: "#966c2e",
|
|
1074
|
-
weak: "#FFFBDE"
|
|
1075
|
-
},
|
|
1076
|
-
border: {
|
|
1077
|
-
strong: "#966c2e",
|
|
1078
|
-
weak: "#FFEA8C"
|
|
1079
|
-
},
|
|
1080
|
-
icon: "#966c2e",
|
|
1081
|
-
text: "#966c2e"
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
1084
|
-
},
|
|
1085
|
-
space: {
|
|
1086
|
-
"0": "0px",
|
|
1087
|
-
"1": "1px",
|
|
1088
|
-
"10": "64px",
|
|
1089
|
-
"11": "96px",
|
|
1090
|
-
"12": "128px",
|
|
1091
|
-
"13": "320px",
|
|
1092
|
-
"2": "2px",
|
|
1093
|
-
"3": "4px",
|
|
1094
|
-
"4": "8px",
|
|
1095
|
-
"5": "12px",
|
|
1096
|
-
"6": "16px",
|
|
1097
|
-
"7": "24px",
|
|
1098
|
-
"8": "32px",
|
|
1099
|
-
"9": "48px"
|
|
1100
|
-
},
|
|
1101
|
-
transitions: {
|
|
1102
|
-
default: "all 100ms cubic-bezier(0.420, 0.000, 0.580, 1.000)",
|
|
1103
|
-
stripped: "100ms cubic-bezier(0.420, 0.000, 0.580, 1.000)",
|
|
1104
|
-
values: {
|
|
1105
|
-
duration: {
|
|
1106
|
-
default: "100ms"
|
|
1107
|
-
},
|
|
1108
|
-
properties: {
|
|
1109
|
-
default: "all"
|
|
1110
|
-
},
|
|
1111
|
-
"timing-function": {
|
|
1112
|
-
default: "cubic-bezier(0.420, 0.000, 0.580, 1.000)"
|
|
1113
|
-
}
|
|
1114
|
-
}
|
|
1115
|
-
},
|
|
1116
|
-
zIndex: {
|
|
1117
|
-
"0": 0,
|
|
1118
|
-
"10": 10,
|
|
1119
|
-
"20": 20,
|
|
1120
|
-
"30": 30,
|
|
1121
|
-
"40": 40,
|
|
1122
|
-
"50": 50,
|
|
1123
|
-
"60": 60,
|
|
1124
|
-
alias: {
|
|
1125
|
-
banner: 20,
|
|
1126
|
-
blanket: 30,
|
|
1127
|
-
modal: 60,
|
|
1128
|
-
overlay: 10,
|
|
1129
|
-
popover: 40,
|
|
1130
|
-
tooltip: 50
|
|
1131
|
-
},
|
|
1132
|
-
auto: "auto",
|
|
1133
|
-
deep: -999999
|
|
1134
|
-
}
|
|
1135
|
-
};
|
|
1136
|
-
|
|
1137
|
-
// src/themes.ts
|
|
1138
|
-
var convertToHex = (color) => {
|
|
1139
|
-
if (color.startsWith("#")) {
|
|
1140
|
-
return color;
|
|
1141
|
-
}
|
|
1142
|
-
const rgb = color.match(/\d+/g);
|
|
1143
|
-
if (!rgb) {
|
|
1144
|
-
return color;
|
|
1145
|
-
}
|
|
1146
|
-
const [r, g, b] = rgb;
|
|
1147
|
-
return `#${Number(r).toString(16)}${Number(g).toString(16)}${Number(
|
|
1148
|
-
b
|
|
1149
|
-
).toString(16)}`;
|
|
1150
|
-
};
|
|
1151
|
-
var lightThemeConstants = {
|
|
1152
|
-
dark: false,
|
|
1153
|
-
editorSettings: {
|
|
1154
|
-
background: import_ayu.light.editor.bg.hex(),
|
|
1155
|
-
foreground: import_ayu.light.editor.fg.hex(),
|
|
1156
|
-
gutterForeground: import_ayu.light.editor.gutter.normal.hex(),
|
|
1157
|
-
selection: import_ayu.light.editor.selection.active.hex(),
|
|
1158
|
-
textMatchingSelection: import_ayu.light.editor.findMatch.active.hex(),
|
|
1159
|
-
cursor: "#000000",
|
|
1160
|
-
autoCompletionPanel: {
|
|
1161
|
-
selectedColor: "#cce2ff",
|
|
1162
|
-
matchingTextColor: "#0066bf",
|
|
1163
|
-
backgroundColor: "#F3F4F5"
|
|
1164
|
-
},
|
|
1165
|
-
searchPanel: {
|
|
1166
|
-
background: tokens.palette.light.neutral.bg.default,
|
|
1167
|
-
text: tokens.palette.light.neutral.text.default,
|
|
1168
|
-
buttonHoverBackground: tokens.palette.light.neutral.bg.strong
|
|
1169
|
-
}
|
|
1170
|
-
},
|
|
1171
|
-
highlightStyles: {
|
|
1172
|
-
comment: import_ayu.light.syntax.comment.hex(),
|
|
1173
|
-
keyword: import_ayu.light.syntax.keyword.hex(),
|
|
1174
|
-
keywordLiteral: import_ayu.light.syntax.keyword.hex(),
|
|
1175
|
-
label: import_ayu.light.syntax.markup.hex(),
|
|
1176
|
-
predicateFunction: import_ayu.light.syntax.func.hex(),
|
|
1177
|
-
function: import_ayu.light.syntax.func.hex(),
|
|
1178
|
-
procedure: import_ayu.light.syntax.func.hex(),
|
|
1179
|
-
stringLiteral: import_ayu.light.syntax.string.hex(),
|
|
1180
|
-
numberLiteral: import_ayu.light.syntax.constant.hex(),
|
|
1181
|
-
booleanLiteral: import_ayu.light.syntax.constant.hex(),
|
|
1182
|
-
operator: import_ayu.light.syntax.operator.hex(),
|
|
1183
|
-
property: import_ayu.light.syntax.tag.hex(),
|
|
1184
|
-
paramDollar: import_ayu.light.syntax.regexp.hex(),
|
|
1185
|
-
paramValue: import_ayu.light.syntax.regexp.hex(),
|
|
1186
|
-
namespace: import_ayu.light.syntax.special.hex()
|
|
1187
|
-
}
|
|
1188
|
-
};
|
|
1189
|
-
var darkThemeConstants = {
|
|
1190
|
-
dark: true,
|
|
1191
|
-
editorSettings: {
|
|
1192
|
-
background: import_ayu.mirage.editor.bg.hex(),
|
|
1193
|
-
foreground: import_ayu.mirage.editor.fg.hex(),
|
|
1194
|
-
gutterForeground: import_ayu.mirage.editor.gutter.normal.hex(),
|
|
1195
|
-
selection: import_ayu.mirage.editor.selection.active.hex(),
|
|
1196
|
-
textMatchingSelection: import_ayu.mirage.editor.findMatch.active.hex(),
|
|
1197
|
-
cursor: "#ffffff",
|
|
1198
|
-
autoCompletionPanel: {
|
|
1199
|
-
selectedColor: "#062f4a",
|
|
1200
|
-
matchingTextColor: "#0097fb",
|
|
1201
|
-
backgroundColor: "#1C212B"
|
|
1202
|
-
},
|
|
1203
|
-
searchPanel: {
|
|
1204
|
-
background: convertToHex(tokens.palette.dark.neutral.bg.default),
|
|
1205
|
-
text: convertToHex(tokens.palette.dark.neutral.text.default),
|
|
1206
|
-
buttonHoverBackground: convertToHex(
|
|
1207
|
-
tokens.palette.dark.neutral.bg.strong
|
|
1208
|
-
)
|
|
1209
|
-
}
|
|
1210
|
-
},
|
|
1211
|
-
highlightStyles: {
|
|
1212
|
-
comment: import_ayu.mirage.syntax.comment.hex(),
|
|
1213
|
-
keyword: import_ayu.mirage.syntax.keyword.hex(),
|
|
1214
|
-
keywordLiteral: import_ayu.mirage.syntax.keyword.hex(),
|
|
1215
|
-
label: import_ayu.mirage.syntax.markup.hex(),
|
|
1216
|
-
predicateFunction: import_ayu.mirage.syntax.func.hex(),
|
|
1217
|
-
function: import_ayu.mirage.syntax.func.hex(),
|
|
1218
|
-
procedure: import_ayu.mirage.syntax.func.hex(),
|
|
1219
|
-
stringLiteral: import_ayu.mirage.syntax.string.hex(),
|
|
1220
|
-
numberLiteral: import_ayu.mirage.syntax.constant.hex(),
|
|
1221
|
-
booleanLiteral: import_ayu.mirage.syntax.constant.hex(),
|
|
1222
|
-
operator: import_ayu.mirage.syntax.operator.hex(),
|
|
1223
|
-
property: import_ayu.mirage.syntax.tag.hex(),
|
|
1224
|
-
paramDollar: import_ayu.mirage.syntax.regexp.hex(),
|
|
1225
|
-
paramValue: import_ayu.mirage.syntax.regexp.hex(),
|
|
1226
|
-
namespace: import_ayu.mirage.syntax.special.hex()
|
|
1227
|
-
}
|
|
1228
|
-
};
|
|
1229
|
-
var ayuLightTheme = ({ inheritBgColor }) => {
|
|
1230
|
-
return createCypherTheme({ ...lightThemeConstants, inheritBgColor });
|
|
1231
|
-
};
|
|
1232
|
-
var ayuDarkTheme = ({ inheritBgColor }) => {
|
|
1233
|
-
return createCypherTheme({ ...darkThemeConstants, inheritBgColor });
|
|
1234
|
-
};
|
|
1235
|
-
function getThemeExtension(theme, inheritBgColor) {
|
|
1236
|
-
switch (theme) {
|
|
1237
|
-
case "light":
|
|
1238
|
-
return ayuLightTheme({ inheritBgColor });
|
|
1239
|
-
case "dark":
|
|
1240
|
-
return ayuDarkTheme({ inheritBgColor });
|
|
1241
|
-
case "none":
|
|
1242
|
-
return [];
|
|
1243
|
-
default:
|
|
1244
|
-
return theme;
|
|
1245
|
-
}
|
|
1246
|
-
}
|
|
1247
|
-
|
|
1248
|
-
// src/CypherEditor.tsx
|
|
1249
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
1250
|
-
var executeKeybinding = (onExecute) => onExecute ? [
|
|
1251
|
-
{
|
|
1252
|
-
key: "Ctrl-Enter",
|
|
1253
|
-
mac: "Mod-Enter",
|
|
1254
|
-
preventDefault: true,
|
|
1255
|
-
run: (view) => {
|
|
1256
|
-
const doc = view.state.doc.toString();
|
|
1257
|
-
if (doc.trim() !== "") {
|
|
1258
|
-
onExecute(doc);
|
|
1259
|
-
}
|
|
1260
|
-
return true;
|
|
1261
|
-
}
|
|
1262
|
-
}
|
|
1263
|
-
] : [];
|
|
1264
|
-
var themeCompartment = new import_state4.Compartment();
|
|
1265
|
-
var keyBindingCompartment = new import_state4.Compartment();
|
|
1266
|
-
var ExternalEdit = import_state4.Annotation.define();
|
|
1267
|
-
var CypherEditor = class extends import_react.Component {
|
|
1268
|
-
/**
|
|
1269
|
-
* The codemirror editor container.
|
|
1270
|
-
*/
|
|
1271
|
-
editorContainer = (0, import_react.createRef)();
|
|
1272
|
-
/**
|
|
1273
|
-
* The codemirror editor state.
|
|
1274
|
-
*/
|
|
1275
|
-
editorState = (0, import_react.createRef)();
|
|
1276
|
-
/**
|
|
1277
|
-
* The codemirror editor view.
|
|
1278
|
-
*/
|
|
1279
|
-
editorView = (0, import_react.createRef)();
|
|
1280
|
-
schemaRef = (0, import_react.createRef)();
|
|
1281
|
-
/**
|
|
1282
|
-
* Focus the editor
|
|
1283
|
-
*/
|
|
1284
|
-
focus() {
|
|
1285
|
-
this.editorView.current?.focus();
|
|
1286
|
-
}
|
|
1287
|
-
/**
|
|
1288
|
-
* Move the cursor to the supplied position.
|
|
1289
|
-
* For example, to move the cursor to the end of the editor, use `value.length`
|
|
1290
|
-
*/
|
|
1291
|
-
updateCursorPosition(position) {
|
|
1292
|
-
this.editorView.current?.dispatch({
|
|
1293
|
-
selection: { anchor: position, head: position }
|
|
1294
|
-
});
|
|
1295
|
-
}
|
|
1296
|
-
/**
|
|
1297
|
-
* Externally set the editor value and focus the editor.
|
|
1298
|
-
*/
|
|
1299
|
-
setValueAndFocus(value = "") {
|
|
1300
|
-
const currentCmValue = this.editorView.current.state?.doc.toString() ?? "";
|
|
1301
|
-
this.editorView.current.dispatch({
|
|
1302
|
-
changes: {
|
|
1303
|
-
from: 0,
|
|
1304
|
-
to: currentCmValue.length,
|
|
1305
|
-
insert: value
|
|
1306
|
-
},
|
|
1307
|
-
selection: { anchor: value.length, head: value.length }
|
|
1308
|
-
});
|
|
1309
|
-
this.editorView.current?.focus();
|
|
1310
|
-
}
|
|
1311
|
-
static defaultProps = {
|
|
1312
|
-
lint: true,
|
|
1313
|
-
schema: {},
|
|
1314
|
-
overrideThemeBackgroundColor: false,
|
|
1315
|
-
lineWrap: false,
|
|
1316
|
-
extraKeybindings: [],
|
|
1317
|
-
history: [],
|
|
1318
|
-
theme: "light"
|
|
1319
|
-
};
|
|
1320
|
-
componentDidMount() {
|
|
1321
|
-
const {
|
|
1322
|
-
theme,
|
|
1323
|
-
extraKeybindings,
|
|
1324
|
-
lineWrap,
|
|
1325
|
-
overrideThemeBackgroundColor,
|
|
1326
|
-
schema,
|
|
1327
|
-
lint,
|
|
1328
|
-
onChange,
|
|
1329
|
-
onExecute
|
|
1330
|
-
} = this.props;
|
|
1331
|
-
this.schemaRef.current = { schema, lint };
|
|
1332
|
-
const themeExtension = getThemeExtension(
|
|
1333
|
-
theme,
|
|
1334
|
-
overrideThemeBackgroundColor
|
|
1335
|
-
);
|
|
1336
|
-
const changeListener = onChange ? [
|
|
1337
|
-
import_view4.EditorView.updateListener.of((upt) => {
|
|
1338
|
-
const wasUserEdit = !upt.transactions.some(
|
|
1339
|
-
(tr) => tr.annotation(ExternalEdit)
|
|
1340
|
-
);
|
|
1341
|
-
if (upt.docChanged && wasUserEdit) {
|
|
1342
|
-
const doc = upt.state.doc;
|
|
1343
|
-
const value = doc.toString();
|
|
1344
|
-
onChange(value, upt);
|
|
1345
|
-
}
|
|
1346
|
-
})
|
|
1347
|
-
] : [];
|
|
1348
|
-
this.editorState.current = import_state4.EditorState.create({
|
|
1349
|
-
extensions: [
|
|
1350
|
-
keyBindingCompartment.of(
|
|
1351
|
-
import_view4.keymap.of([...executeKeybinding(onExecute), ...extraKeybindings])
|
|
1352
|
-
),
|
|
1353
|
-
replMode(this.props),
|
|
1354
|
-
basicNeo4jSetup(),
|
|
1355
|
-
themeCompartment.of(themeExtension),
|
|
1356
|
-
changeListener,
|
|
1357
|
-
cypher(this.schemaRef.current),
|
|
1358
|
-
lineWrap ? import_view4.EditorView.lineWrapping : [],
|
|
1359
|
-
(0, import_view4.lineNumbers)({
|
|
1360
|
-
formatNumber: (a, state) => {
|
|
1361
|
-
if (state.doc.lines === 1 && this.props.prompt !== void 0) {
|
|
1362
|
-
return this.props.prompt;
|
|
1363
|
-
}
|
|
1364
|
-
return a.toString();
|
|
1365
|
-
}
|
|
1366
|
-
})
|
|
1367
|
-
],
|
|
1368
|
-
doc: this.props.value
|
|
1369
|
-
});
|
|
1370
|
-
this.editorView.current = new import_view4.EditorView({
|
|
1371
|
-
state: this.editorState.current,
|
|
1372
|
-
parent: this.editorContainer.current
|
|
1373
|
-
});
|
|
1374
|
-
if (this.props.autofocus) {
|
|
1375
|
-
this.focus();
|
|
1376
|
-
if (this.props.value) {
|
|
1377
|
-
this.updateCursorPosition(this.props.value.length);
|
|
1378
|
-
}
|
|
1379
|
-
}
|
|
1380
|
-
}
|
|
1381
|
-
componentDidUpdate(prevProps) {
|
|
1382
|
-
if (!this.editorView.current) {
|
|
1383
|
-
return;
|
|
1384
|
-
}
|
|
1385
|
-
const currentCmValue = this.editorView.current.state?.doc.toString() ?? "";
|
|
1386
|
-
if (this.props.value !== void 0 && currentCmValue !== this.props.value) {
|
|
1387
|
-
this.editorView.current.dispatch({
|
|
1388
|
-
changes: {
|
|
1389
|
-
from: 0,
|
|
1390
|
-
to: currentCmValue.length,
|
|
1391
|
-
insert: this.props.value ?? ""
|
|
1392
|
-
},
|
|
1393
|
-
annotations: [ExternalEdit.of(true)]
|
|
1394
|
-
});
|
|
1395
|
-
}
|
|
1396
|
-
const didChangeTheme = prevProps.theme !== this.props.theme || prevProps.overrideThemeBackgroundColor !== this.props.overrideThemeBackgroundColor;
|
|
1397
|
-
if (didChangeTheme) {
|
|
1398
|
-
this.editorView.current.dispatch({
|
|
1399
|
-
effects: themeCompartment.reconfigure(
|
|
1400
|
-
getThemeExtension(
|
|
1401
|
-
this.props.theme,
|
|
1402
|
-
this.props.overrideThemeBackgroundColor
|
|
1403
|
-
)
|
|
1404
|
-
)
|
|
1405
|
-
});
|
|
1406
|
-
}
|
|
1407
|
-
if (prevProps.extraKeybindings !== this.props.extraKeybindings || prevProps.onExecute !== this.props.onExecute) {
|
|
1408
|
-
this.editorView.current.dispatch({
|
|
1409
|
-
effects: keyBindingCompartment.reconfigure(
|
|
1410
|
-
import_view4.keymap.of([
|
|
1411
|
-
...executeKeybinding(this.props.onExecute),
|
|
1412
|
-
...this.props.extraKeybindings
|
|
1413
|
-
])
|
|
1414
|
-
)
|
|
1415
|
-
});
|
|
1416
|
-
}
|
|
1417
|
-
const didChangeHistoryEstimate = prevProps.history?.length !== this.props.history?.length || prevProps.history?.[0] !== this.props.history?.[0];
|
|
1418
|
-
if (didChangeHistoryEstimate) {
|
|
1419
|
-
this.editorView.current.dispatch({
|
|
1420
|
-
effects: replaceHistory.of(this.props.history ?? [])
|
|
1421
|
-
});
|
|
1422
|
-
}
|
|
1423
|
-
this.schemaRef.current.schema = this.props.schema;
|
|
1424
|
-
this.schemaRef.current.lint = this.props.lint;
|
|
1425
|
-
}
|
|
1426
|
-
componentWillUnmount() {
|
|
1427
|
-
this.editorView.current?.destroy();
|
|
1428
|
-
}
|
|
1429
|
-
render() {
|
|
1430
|
-
const { className, theme } = this.props;
|
|
1431
|
-
const themeClass = typeof theme === "string" ? `cm-theme-${theme}` : "cm-theme";
|
|
1432
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1433
|
-
"div",
|
|
1434
|
-
{
|
|
1435
|
-
ref: this.editorContainer,
|
|
1436
|
-
className: `${themeClass}${className ? ` ${className}` : ""}`
|
|
1437
|
-
}
|
|
1438
|
-
);
|
|
1439
|
-
}
|
|
1440
|
-
};
|
|
1441
|
-
//# sourceMappingURL=index.cjs.map
|