@codemirror/autocomplete 6.19.1 → 6.20.0
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 +6 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -391,7 +391,7 @@ const completionConfig = state.Facet.define({
|
|
|
391
391
|
addToOptions: [],
|
|
392
392
|
positionInfo: defaultPositionInfo,
|
|
393
393
|
filterStrict: false,
|
|
394
|
-
compareCompletions: (a, b) => a.label.localeCompare(b.label),
|
|
394
|
+
compareCompletions: (a, b) => (a.sortText || a.label).localeCompare(b.sortText || b.label),
|
|
395
395
|
interactionDelay: 75,
|
|
396
396
|
updateSyncTime: 100
|
|
397
397
|
}, {
|
package/dist/index.d.cts
CHANGED
|
@@ -21,6 +21,11 @@ interface Completion {
|
|
|
21
21
|
*/
|
|
22
22
|
displayLabel?: string;
|
|
23
23
|
/**
|
|
24
|
+
Overrides the text that is used to sort completions. Will
|
|
25
|
+
default to `label` if not given.
|
|
26
|
+
*/
|
|
27
|
+
sortText?: string;
|
|
28
|
+
/**
|
|
24
29
|
An optional short piece of information to show (with a different
|
|
25
30
|
style) after the label.
|
|
26
31
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -21,6 +21,11 @@ interface Completion {
|
|
|
21
21
|
*/
|
|
22
22
|
displayLabel?: string;
|
|
23
23
|
/**
|
|
24
|
+
Overrides the text that is used to sort completions. Will
|
|
25
|
+
default to `label` if not given.
|
|
26
|
+
*/
|
|
27
|
+
sortText?: string;
|
|
28
|
+
/**
|
|
24
29
|
An optional short piece of information to show (with a different
|
|
25
30
|
style) after the label.
|
|
26
31
|
*/
|
package/dist/index.js
CHANGED
|
@@ -389,7 +389,7 @@ const completionConfig = /*@__PURE__*/Facet.define({
|
|
|
389
389
|
addToOptions: [],
|
|
390
390
|
positionInfo: defaultPositionInfo,
|
|
391
391
|
filterStrict: false,
|
|
392
|
-
compareCompletions: (a, b) => a.label.localeCompare(b.label),
|
|
392
|
+
compareCompletions: (a, b) => (a.sortText || a.label).localeCompare(b.sortText || b.label),
|
|
393
393
|
interactionDelay: 75,
|
|
394
394
|
updateSyncTime: 100
|
|
395
395
|
}, {
|