@vuu-ui/vuu-codemirror 0.6.21-debug → 0.6.22-debug
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/cjs/index.js +22 -1
- package/cjs/index.js.map +2 -2
- package/esm/index.js +22 -1
- package/esm/index.js.map +2 -2
- package/package.json +1 -1
package/esm/index.js
CHANGED
|
@@ -14793,6 +14793,7 @@ var minimalSetup = (() => [
|
|
|
14793
14793
|
highlightSpecialChars(),
|
|
14794
14794
|
history(),
|
|
14795
14795
|
drawSelection(),
|
|
14796
|
+
closeBrackets(),
|
|
14796
14797
|
syntaxHighlighting(defaultHighlightStyle, { fallback: true }),
|
|
14797
14798
|
keymap.of(keyBindings)
|
|
14798
14799
|
])();
|
|
@@ -15052,8 +15053,23 @@ var { COUNT: COUNT2 } = metadataKeys;
|
|
|
15052
15053
|
|
|
15053
15054
|
// src/suggestion-utils.ts
|
|
15054
15055
|
var NO_OPTIONS = {};
|
|
15056
|
+
var applyWithCursorMove = () => (view, completion, from) => {
|
|
15057
|
+
const annotation = new AnnotationType();
|
|
15058
|
+
view.dispatch(
|
|
15059
|
+
{
|
|
15060
|
+
changes: { from, insert: completion.label },
|
|
15061
|
+
annotations: annotation.of(completion)
|
|
15062
|
+
},
|
|
15063
|
+
{
|
|
15064
|
+
changes: { from: from + 1, insert: " " },
|
|
15065
|
+
selection: { anchor: from + 2, head: from + 2 },
|
|
15066
|
+
annotations: annotation.of(completion)
|
|
15067
|
+
}
|
|
15068
|
+
);
|
|
15069
|
+
};
|
|
15055
15070
|
var toSuggestions = (values, options = NO_OPTIONS) => {
|
|
15056
15071
|
const {
|
|
15072
|
+
moveCursorToEnd = false,
|
|
15057
15073
|
prefix = "",
|
|
15058
15074
|
quoted = false,
|
|
15059
15075
|
suffix = " ",
|
|
@@ -15063,7 +15079,7 @@ var toSuggestions = (values, options = NO_OPTIONS) => {
|
|
|
15063
15079
|
return values.map((value) => ({
|
|
15064
15080
|
isIllustration,
|
|
15065
15081
|
label: value,
|
|
15066
|
-
apply: isIllustration ? `${quote}${prefix}${quote}` : `${prefix}${quote}${value}${quote}${suffix}`
|
|
15082
|
+
apply: moveCursorToEnd ? applyWithCursorMove() : isIllustration ? `${quote}${prefix}${quote}` : `${prefix}${quote}${value}${quote}${suffix}`
|
|
15067
15083
|
}));
|
|
15068
15084
|
};
|
|
15069
15085
|
var asNameSuggestion = { label: "as", apply: "as ", boost: 1 };
|
|
@@ -15093,6 +15109,10 @@ var getRelationalOperators = (column) => {
|
|
|
15093
15109
|
return equalityOperators;
|
|
15094
15110
|
}
|
|
15095
15111
|
};
|
|
15112
|
+
var getNamePrompt = (entity) => {
|
|
15113
|
+
const label = entity ? `enter name for this ${entity}` : "enter name";
|
|
15114
|
+
return [{ label, boost: 5 }];
|
|
15115
|
+
};
|
|
15096
15116
|
export {
|
|
15097
15117
|
AnnotationType,
|
|
15098
15118
|
EditorState,
|
|
@@ -15110,6 +15130,7 @@ export {
|
|
|
15110
15130
|
drawSelection,
|
|
15111
15131
|
ensureSyntaxTree,
|
|
15112
15132
|
equalityOperators,
|
|
15133
|
+
getNamePrompt,
|
|
15113
15134
|
getNamedParentNode,
|
|
15114
15135
|
getNodeByName,
|
|
15115
15136
|
getPreviousNamedNode,
|