Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@codemirror/search

Package Overview
Dependencies
Maintainers
2
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codemirror/search - npm Package Compare versions

Comparing version 0.19.10 to 0.20.0

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 0.20.0 (2022-04-20)
### Bug fixes
Make the `wholeWords` option to `highlightSelectionMatches` default to false, as intended.
## 0.19.10 (2022-04-04)

@@ -2,0 +8,0 @@

20

dist/index.d.ts
import * as _codemirror_state from '@codemirror/state';
import { Extension, StateCommand, EditorState } from '@codemirror/state';
import { Command, KeyBinding, EditorView } from '@codemirror/view';
import { Panel } from '@codemirror/panel';
import { Text } from '@codemirror/text';
import { Text, Extension, StateCommand, EditorState } from '@codemirror/state';
import { Command, KeyBinding, EditorView, Panel } from '@codemirror/view';

@@ -165,4 +163,4 @@ /**

/**
Select next occurrence of the current selection.
Expand selection to the word when selection range is empty.
Select next occurrence of the current selection. Expand selection
to the surrounding word when the selection is empty.
*/

@@ -184,3 +182,3 @@ declare const selectNextOccurrence: StateCommand;

Can be used to override the way the search panel is implemented.
Should create a [Panel](https://codemirror.net/6/docs/ref/#panel.Panel) that contains a form
Should create a [Panel](https://codemirror.net/6/docs/ref/#view.Panel) that contains a form
which lets the user:

@@ -201,4 +199,4 @@

configure the search extension.
([`openSearchPanel`](https://codemirror.net/6/docs/ref/#search.openSearchPanel) when automatically
enable this if it isn't already on.)
([`openSearchPanel`](https://codemirror.net/6/docs/ref/#search.openSearchPanel) will automatically
enable this if it isn't already on).
*/

@@ -258,2 +256,6 @@ declare function search(config?: SearchConfig): Extension;

eq(other: SearchQuery): boolean;
/**
Get a search cursor for this query, searching through the given
range in the given document.
*/
getCursor(doc: Text, from?: number, to?: number): Iterator<{

@@ -260,0 +262,0 @@ from: number;

@@ -1,7 +0,4 @@

import { EditorView, Decoration, ViewPlugin, runScopeHandlers } from '@codemirror/view';
import { StateEffect, StateField, EditorSelection, Facet, combineConfig, CharCategory, Prec } from '@codemirror/state';
import { showPanel, getPanel } from '@codemirror/panel';
import { RangeSetBuilder } from '@codemirror/rangeset';
import { showPanel, EditorView, getPanel, Decoration, ViewPlugin, runScopeHandlers } from '@codemirror/view';
import { codePointAt, fromCodePoint, codePointSize, StateEffect, StateField, EditorSelection, Facet, combineConfig, CharCategory, RangeSetBuilder, Prec } from '@codemirror/state';
import elt from 'crelt';
import { codePointAt, fromCodePoint, codePointSize } from '@codemirror/text';

@@ -342,3 +339,3 @@ const basicNormalize = typeof String.prototype.normalize == "function"

}
return { dom, pos: -10 };
return { dom };
}

@@ -392,3 +389,3 @@ const dialogEffect = /*@__PURE__*/StateEffect.define();

maxMatches: 100,
wholeWords: true
wholeWords: false
};

@@ -527,4 +524,4 @@ const highlightConfig = /*@__PURE__*/Facet.define({

/**
Select next occurrence of the current selection.
Expand selection to the word when selection range is empty.
Select next occurrence of the current selection. Expand selection
to the surrounding word when the selection is empty.
*/

@@ -553,3 +550,3 @@ const selectNextOccurrence = ({ state, dispatch }) => {

top: configs.reduce((val, conf) => val !== null && val !== void 0 ? val : conf.top, undefined) || false,
caseSensitive: configs.reduce((val, conf) => val !== null && val !== void 0 ? val : (conf.caseSensitive || conf.matchCase), undefined) || false,
caseSensitive: configs.reduce((val, conf) => val !== null && val !== void 0 ? val : conf.caseSensitive, undefined) || false,
createPanel: ((_a = configs.find(c => c.createPanel)) === null || _a === void 0 ? void 0 : _a.createPanel) || (view => new SearchPanel(view))

@@ -562,4 +559,4 @@ };

configure the search extension.
([`openSearchPanel`](https://codemirror.net/6/docs/ref/#search.openSearchPanel) when automatically
enable this if it isn't already on.)
([`openSearchPanel`](https://codemirror.net/6/docs/ref/#search.openSearchPanel) will automatically
enable this if it isn't already on).
*/

@@ -570,6 +567,2 @@ function search(config) {

/**
@internal
*/
const searchConfig = search; // FIXME drop on next release
/**
A search query. Part of the editor's search state.

@@ -602,2 +595,6 @@ */

}
/**
Get a search cursor for this query, searching through the given
range in the given document.
*/
getCursor(doc, from = 0, to = doc.length) {

@@ -1129,2 +1126,2 @@ return this.regexp ? regexpCursor(this, doc, from, to) : stringCursor(this, doc, from, to);

export { RegExpCursor, SearchCursor, SearchQuery, closeSearchPanel, findNext, findPrevious, getSearchQuery, gotoLine, highlightSelectionMatches, openSearchPanel, replaceAll, replaceNext, search, searchConfig, searchKeymap, selectMatches, selectNextOccurrence, selectSelectionMatches, setSearchQuery };
export { RegExpCursor, SearchCursor, SearchQuery, closeSearchPanel, findNext, findPrevious, getSearchQuery, gotoLine, highlightSelectionMatches, openSearchPanel, replaceAll, replaceNext, search, searchKeymap, selectMatches, selectNextOccurrence, selectSelectionMatches, setSearchQuery };
{
"name": "@codemirror/search",
"version": "0.19.10",
"version": "0.20.0",
"description": "Search functionality for the CodeMirror code editor",

@@ -29,7 +29,4 @@ "scripts": {

"dependencies": {
"@codemirror/panel": "^0.19.0",
"@codemirror/rangeset": "^0.19.0",
"@codemirror/state": "^0.19.3",
"@codemirror/text": "^0.19.0",
"@codemirror/view": "^0.19.34",
"@codemirror/state": "^0.20.0",
"@codemirror/view": "^0.20.0",
"crelt": "^1.0.5"

@@ -36,0 +33,0 @@ },

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc