@ckeditor/ckeditor5-find-and-replace 45.2.1-alpha.9 → 46.0.0-alpha.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-find-and-replace",
3
- "version": "45.2.1-alpha.9",
3
+ "version": "46.0.0-alpha.0",
4
4
  "description": "Find and replace feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -13,12 +13,12 @@
13
13
  "type": "module",
14
14
  "main": "src/index.js",
15
15
  "dependencies": {
16
- "@ckeditor/ckeditor5-core": "45.2.1-alpha.9",
17
- "@ckeditor/ckeditor5-icons": "45.2.1-alpha.9",
18
- "@ckeditor/ckeditor5-ui": "45.2.1-alpha.9",
19
- "@ckeditor/ckeditor5-utils": "45.2.1-alpha.9",
20
- "ckeditor5": "45.2.1-alpha.9",
21
- "es-toolkit": "1.32.0"
16
+ "@ckeditor/ckeditor5-core": "46.0.0-alpha.0",
17
+ "@ckeditor/ckeditor5-icons": "46.0.0-alpha.0",
18
+ "@ckeditor/ckeditor5-ui": "46.0.0-alpha.0",
19
+ "@ckeditor/ckeditor5-utils": "46.0.0-alpha.0",
20
+ "ckeditor5": "46.0.0-alpha.0",
21
+ "es-toolkit": "1.39.5"
22
22
  },
23
23
  "author": "CKSource (http://cksource.com/)",
24
24
  "license": "SEE LICENSE IN LICENSE.md",
@@ -6,10 +6,10 @@
6
6
  * @module find-and-replace/findandreplace
7
7
  */
8
8
  import { Plugin } from 'ckeditor5/src/core.js';
9
- import FindAndReplaceUI from './findandreplaceui.js';
10
- import FindAndReplaceEditing from './findandreplaceediting.js';
9
+ import { FindAndReplaceUI } from './findandreplaceui.js';
10
+ import { FindAndReplaceEditing } from './findandreplaceediting.js';
11
11
  import type { Marker } from 'ckeditor5/src/engine.js';
12
- export type ResultType = {
12
+ export type FindResultType = {
13
13
  id?: string;
14
14
  label?: string;
15
15
  start?: number;
@@ -26,7 +26,7 @@ export type ResultType = {
26
26
  * * The {@link module:find-and-replace/findandreplaceediting~FindAndReplaceEditing find and replace editing feature},
27
27
  * * The {@link module:find-and-replace/findandreplaceui~FindAndReplaceUI find and replace UI feature}
28
28
  */
29
- export default class FindAndReplace extends Plugin {
29
+ export declare class FindAndReplace extends Plugin {
30
30
  /**
31
31
  * @inheritDoc
32
32
  */
@@ -6,8 +6,8 @@
6
6
  * @module find-and-replace/findandreplace
7
7
  */
8
8
  import { Plugin } from 'ckeditor5/src/core.js';
9
- import FindAndReplaceUI from './findandreplaceui.js';
10
- import FindAndReplaceEditing from './findandreplaceediting.js';
9
+ import { FindAndReplaceUI } from './findandreplaceui.js';
10
+ import { FindAndReplaceEditing } from './findandreplaceediting.js';
11
11
  /**
12
12
  * The find and replace plugin.
13
13
  *
@@ -18,7 +18,7 @@ import FindAndReplaceEditing from './findandreplaceediting.js';
18
18
  * * The {@link module:find-and-replace/findandreplaceediting~FindAndReplaceEditing find and replace editing feature},
19
19
  * * The {@link module:find-and-replace/findandreplaceui~FindAndReplaceUI find and replace UI feature}
20
20
  */
21
- export default class FindAndReplace extends Plugin {
21
+ export class FindAndReplace extends Plugin {
22
22
  /**
23
23
  * @inheritDoc
24
24
  */
@@ -8,14 +8,14 @@
8
8
  import { Plugin } from 'ckeditor5/src/core.js';
9
9
  import { type Collection } from 'ckeditor5/src/utils.js';
10
10
  import { type FindAttributes } from './findcommand.js';
11
- import FindAndReplaceState, { type FindCallback } from './findandreplacestate.js';
12
- import FindAndReplaceUtils from './findandreplaceutils.js';
13
- import type { ResultType } from './findandreplace.js';
11
+ import { FindAndReplaceState, type FindCallback } from './findandreplacestate.js';
12
+ import { FindAndReplaceUtils } from './findandreplaceutils.js';
13
+ import type { FindResultType } from './findandreplace.js';
14
14
  import '../theme/findandreplace.css';
15
15
  /**
16
16
  * Implements the editing part for find and replace plugin. For example conversion, commands etc.
17
17
  */
18
- export default class FindAndReplaceEditing extends Plugin {
18
+ export declare class FindAndReplaceEditing extends Plugin {
19
19
  /**
20
20
  * @inheritDoc
21
21
  */
@@ -47,7 +47,7 @@ export default class FindAndReplaceEditing extends Plugin {
47
47
  /**
48
48
  * Initiate a search.
49
49
  */
50
- find(callbackOrText: string | FindCallback, findAttributes?: FindAttributes): Collection<ResultType>;
50
+ find(callbackOrText: string | FindCallback, findAttributes?: FindAttributes): Collection<FindResultType>;
51
51
  /**
52
52
  * Stops active results from updating, and clears out the results.
53
53
  */
@@ -7,20 +7,20 @@
7
7
  */
8
8
  import { Plugin } from 'ckeditor5/src/core.js';
9
9
  import { scrollViewportToShowTarget } from 'ckeditor5/src/utils.js';
10
- import FindCommand from './findcommand.js';
11
- import ReplaceCommand from './replacecommand.js';
12
- import ReplaceAllCommand from './replaceallcommand.js';
13
- import FindNextCommand from './findnextcommand.js';
14
- import FindPreviousCommand from './findpreviouscommand.js';
15
- import FindAndReplaceState from './findandreplacestate.js';
16
- import FindAndReplaceUtils from './findandreplaceutils.js';
10
+ import { FindCommand } from './findcommand.js';
11
+ import { ReplaceCommand } from './replacecommand.js';
12
+ import { ReplaceAllCommand } from './replaceallcommand.js';
13
+ import { FindNextCommand } from './findnextcommand.js';
14
+ import { FindPreviousCommand } from './findpreviouscommand.js';
15
+ import { FindAndReplaceState } from './findandreplacestate.js';
16
+ import { FindAndReplaceUtils } from './findandreplaceutils.js';
17
17
  import { debounce } from 'es-toolkit/compat';
18
18
  import '../theme/findandreplace.css';
19
19
  const HIGHLIGHT_CLASS = 'ck-find-result_selected';
20
20
  /**
21
21
  * Implements the editing part for find and replace plugin. For example conversion, commands etc.
22
22
  */
23
- export default class FindAndReplaceEditing extends Plugin {
23
+ export class FindAndReplaceEditing extends Plugin {
24
24
  /**
25
25
  * @inheritDoc
26
26
  */
@@ -5,9 +5,9 @@
5
5
  /**
6
6
  * @module find-and-replace/findandreplacestate
7
7
  */
8
- import type { Model, Item } from 'ckeditor5/src/engine.js';
8
+ import type { Model, ModelItem } from 'ckeditor5/src/engine.js';
9
9
  import { Collection } from 'ckeditor5/src/utils.js';
10
- import type { ResultType } from './findandreplace.js';
10
+ import type { FindResultType } from './findandreplace.js';
11
11
  declare const FindAndReplaceState_base: {
12
12
  new (): import("ckeditor5/src/utils.js").Observable;
13
13
  prototype: import("ckeditor5/src/utils.js").Observable;
@@ -15,20 +15,20 @@ declare const FindAndReplaceState_base: {
15
15
  /**
16
16
  * The object storing find and replace plugin state for a given editor instance.
17
17
  */
18
- export default class FindAndReplaceState extends /* #__PURE__ */ FindAndReplaceState_base {
18
+ export declare class FindAndReplaceState extends /* #__PURE__ */ FindAndReplaceState_base {
19
19
  /**
20
20
  * A collection of find matches.
21
21
  *
22
22
  * @observable
23
23
  */
24
- results: Collection<ResultType>;
24
+ results: Collection<FindResultType>;
25
25
  /**
26
26
  * Currently highlighted search result in {@link #results matched results}.
27
27
  *
28
28
  * @readonly
29
29
  * @observable
30
30
  */
31
- highlightedResult: ResultType | null;
31
+ highlightedResult: FindResultType | null;
32
32
  /**
33
33
  * Currently highlighted search result offset in {@link #results matched results}.
34
34
  *
@@ -89,13 +89,15 @@ export default class FindAndReplaceState extends /* #__PURE__ */ FindAndReplaceS
89
89
  * Sorts search results by marker positions. Make sure that the results are sorted in the same order as they appear in the document
90
90
  * to avoid issues with the `find next` command. Apparently, the order of the results in the state might be different than the order
91
91
  * of the markers in the model.
92
+ *
93
+ * @internal
92
94
  */
93
- export declare function sortSearchResultsByMarkerPositions(model: Model, results: Array<ResultType>): Array<ResultType>;
95
+ export declare function sortSearchResultsByMarkerPositions(model: Model, results: Array<FindResultType>): Array<FindResultType>;
94
96
  /**
95
97
  * The callback function used to find matches in the document.
96
98
  */
97
99
  export type FindCallback = ({ item, text }: {
98
- item: Item;
100
+ item: ModelItem;
99
101
  text: string;
100
102
  }) => FindCallbackResultObject | FindCallbackResult;
101
103
  /**
@@ -106,7 +108,7 @@ export type FindCallback = ({ item, text }: {
106
108
  * while searching for next item and the search will start from the beginning of the document.
107
109
  */
108
110
  export type FindCallbackResultObject = {
109
- results: Array<ResultType>;
111
+ results: Array<FindResultType>;
110
112
  searchText: string;
111
113
  };
112
114
  /**
@@ -114,5 +116,5 @@ export type FindCallbackResultObject = {
114
116
  *
115
117
  * @deprecated Use `FindCallbackResultObject` instead.
116
118
  */
117
- export type FindCallbackResult = Array<ResultType>;
119
+ export type FindCallbackResult = Array<FindResultType>;
118
120
  export {};
@@ -6,7 +6,7 @@ import { ObservableMixin, Collection } from 'ckeditor5/src/utils.js';
6
6
  /**
7
7
  * The object storing find and replace plugin state for a given editor instance.
8
8
  */
9
- export default class FindAndReplaceState extends /* #__PURE__ */ ObservableMixin() {
9
+ export class FindAndReplaceState extends /* #__PURE__ */ ObservableMixin() {
10
10
  /**
11
11
  * Creates an instance of the state.
12
12
  */
@@ -79,6 +79,8 @@ export default class FindAndReplaceState extends /* #__PURE__ */ ObservableMixin
79
79
  * Sorts search results by marker positions. Make sure that the results are sorted in the same order as they appear in the document
80
80
  * to avoid issues with the `find next` command. Apparently, the order of the results in the state might be different than the order
81
81
  * of the markers in the model.
82
+ *
83
+ * @internal
82
84
  */
83
85
  export function sortSearchResultsByMarkerPositions(model, results) {
84
86
  const sortMapping = { before: -1, same: 0, after: 1, different: 1 };
@@ -7,14 +7,14 @@
7
7
  */
8
8
  import { Plugin, type Editor } from 'ckeditor5/src/core.js';
9
9
  import { Dialog, type ViewWithCssTransitionDisabler } from 'ckeditor5/src/ui.js';
10
- import FindAndReplaceFormView from './ui/findandreplaceformview.js';
10
+ import { FindAndReplaceFormView } from './ui/findandreplaceformview.js';
11
11
  /**
12
12
  * The default find and replace UI.
13
13
  *
14
14
  * It registers the `'findAndReplace'` UI button in the editor's {@link module:ui/componentfactory~ComponentFactory component factory}.
15
15
  * that uses the {@link module:find-and-replace/findandreplace~FindAndReplace FindAndReplace} plugin API.
16
16
  */
17
- export default class FindAndReplaceUI extends Plugin {
17
+ export declare class FindAndReplaceUI extends Plugin {
18
18
  /**
19
19
  * @inheritDoc
20
20
  */
@@ -75,7 +75,7 @@ export default class FindAndReplaceUI extends Plugin {
75
75
  *
76
76
  * @eventName ~FindAndReplaceUI#searchReseted
77
77
  */
78
- export type SearchResetedEvent = {
78
+ export type FindResetedEvent = {
79
79
  name: 'searchReseted';
80
80
  args: [];
81
81
  };
@@ -8,14 +8,14 @@
8
8
  import { Plugin } from 'ckeditor5/src/core.js';
9
9
  import { IconFindReplace } from 'ckeditor5/src/icons.js';
10
10
  import { ButtonView, MenuBarMenuListItemButtonView, Dialog, DialogViewPosition, createDropdown, DropdownView, FormHeaderView, CssTransitionDisablerMixin } from 'ckeditor5/src/ui.js';
11
- import FindAndReplaceFormView from './ui/findandreplaceformview.js';
11
+ import { FindAndReplaceFormView } from './ui/findandreplaceformview.js';
12
12
  /**
13
13
  * The default find and replace UI.
14
14
  *
15
15
  * It registers the `'findAndReplace'` UI button in the editor's {@link module:ui/componentfactory~ComponentFactory component factory}.
16
16
  * that uses the {@link module:find-and-replace/findandreplace~FindAndReplace FindAndReplace} plugin API.
17
17
  */
18
- export default class FindAndReplaceUI extends Plugin {
18
+ export class FindAndReplaceUI extends Plugin {
19
19
  /**
20
20
  * @inheritDoc
21
21
  */
@@ -5,14 +5,14 @@
5
5
  /**
6
6
  * @module find-and-replace/findandreplaceutils
7
7
  */
8
- import type { Item, Model, Range } from 'ckeditor5/src/engine.js';
8
+ import type { ModelItem, Model, ModelRange } from 'ckeditor5/src/engine.js';
9
9
  import { Plugin } from 'ckeditor5/src/core.js';
10
10
  import { Collection } from 'ckeditor5/src/utils.js';
11
- import type { ResultType } from './findandreplace.js';
11
+ import type { FindResultType } from './findandreplace.js';
12
12
  /**
13
13
  * A set of helpers related to find and replace.
14
14
  */
15
- export default class FindAndReplaceUtils extends Plugin {
15
+ export declare class FindAndReplaceUtils extends Plugin {
16
16
  /**
17
17
  * @inheritDoc
18
18
  */
@@ -41,12 +41,12 @@ export default class FindAndReplaceUtils extends Plugin {
41
41
  * }
42
42
  * ```
43
43
  */
44
- updateFindResultFromRange(range: Range, model: Model, findCallback: ({ item, text }: {
45
- item: Item;
44
+ updateFindResultFromRange(range: ModelRange, model: Model, findCallback: ({ item, text }: {
45
+ item: ModelItem;
46
46
  text: string;
47
- }) => Array<ResultType> | {
48
- results: Array<ResultType>;
49
- }, startResults: Collection<ResultType> | null): Collection<ResultType>;
47
+ }) => Array<FindResultType> | {
48
+ results: Array<FindResultType>;
49
+ }, startResults: Collection<FindResultType> | null): Collection<FindResultType>;
50
50
  /**
51
51
  * Returns text representation of a range. The returned text length should be the same as range length.
52
52
  * In order to achieve this, this function will replace inline elements (text-line) as new line character ("\n").
@@ -54,7 +54,7 @@ export default class FindAndReplaceUtils extends Plugin {
54
54
  * @param range The model range.
55
55
  * @returns The text content of the provided range.
56
56
  */
57
- rangeToText(range: Range): string;
57
+ rangeToText(range: ModelRange): string;
58
58
  /**
59
59
  * Creates a text matching callback for a specified search term and matching options.
60
60
  *
@@ -67,7 +67,7 @@ export default class FindAndReplaceUtils extends Plugin {
67
67
  matchCase?: boolean;
68
68
  wholeWords?: boolean;
69
69
  }): ({ item, text }: {
70
- item: Item;
70
+ item: ModelItem;
71
71
  text: string;
72
- }) => Array<ResultType>;
72
+ }) => Array<FindResultType>;
73
73
  }
@@ -8,7 +8,7 @@ import { escapeRegExp } from 'es-toolkit/compat';
8
8
  /**
9
9
  * A set of helpers related to find and replace.
10
10
  */
11
- export default class FindAndReplaceUtils extends Plugin {
11
+ export class FindAndReplaceUtils extends Plugin {
12
12
  /**
13
13
  * @inheritDoc
14
14
  */
@@ -7,12 +7,12 @@
7
7
  */
8
8
  import { Command, type Editor } from 'ckeditor5/src/core.js';
9
9
  import type { Collection } from 'ckeditor5/src/utils.js';
10
- import type { default as FindAndReplaceState, FindCallback } from './findandreplacestate.js';
11
- import type { ResultType } from './findandreplace.js';
10
+ import type { FindAndReplaceState, FindCallback } from './findandreplacestate.js';
11
+ import type { FindResultType } from './findandreplace.js';
12
12
  /**
13
13
  * The find command. It is used by the {@link module:find-and-replace/findandreplace~FindAndReplace find and replace feature}.
14
14
  */
15
- export default class FindCommand extends Command {
15
+ export declare class FindCommand extends Command {
16
16
  /**
17
17
  * The find and replace state object used for command operations.
18
18
  */
@@ -35,7 +35,7 @@ export default class FindCommand extends Command {
35
35
  * @fires execute
36
36
  */
37
37
  execute(callbackOrText: string | FindCallback, { matchCase, wholeWords }?: FindAttributes): {
38
- results: Collection<ResultType>;
38
+ results: Collection<FindResultType>;
39
39
  findCallback: FindCallback;
40
40
  };
41
41
  }
@@ -9,7 +9,7 @@ import { Command } from 'ckeditor5/src/core.js';
9
9
  /**
10
10
  * The find command. It is used by the {@link module:find-and-replace/findandreplace~FindAndReplace find and replace feature}.
11
11
  */
12
- export default class FindCommand extends Command {
12
+ export class FindCommand extends Command {
13
13
  /**
14
14
  * The find and replace state object used for command operations.
15
15
  */
@@ -6,13 +6,13 @@
6
6
  * @module find-and-replace/findnextcommand
7
7
  */
8
8
  import { Command, type Editor } from 'ckeditor5/src/core.js';
9
- import type FindAndReplaceState from './findandreplacestate.js';
9
+ import { type FindAndReplaceState } from './findandreplacestate.js';
10
10
  /**
11
11
  * The find next command. Moves the highlight to the next search result.
12
12
  *
13
13
  * It is used by the {@link module:find-and-replace/findandreplace~FindAndReplace find and replace feature}.
14
14
  */
15
- export default class FindNextCommand extends Command {
15
+ export declare class FindNextCommand extends Command {
16
16
  /**
17
17
  * The find and replace state object used for command operations.
18
18
  */
@@ -11,7 +11,7 @@ import { Command } from 'ckeditor5/src/core.js';
11
11
  *
12
12
  * It is used by the {@link module:find-and-replace/findandreplace~FindAndReplace find and replace feature}.
13
13
  */
14
- export default class FindNextCommand extends Command {
14
+ export class FindNextCommand extends Command {
15
15
  /**
16
16
  * The find and replace state object used for command operations.
17
17
  */
@@ -5,13 +5,13 @@
5
5
  /**
6
6
  * @module find-and-replace/findpreviouscommand
7
7
  */
8
- import FindNextCommand from './findnextcommand.js';
8
+ import { FindNextCommand } from './findnextcommand.js';
9
9
  /**
10
10
  * The find previous command. Moves the highlight to the previous search result.
11
11
  *
12
12
  * It is used by the {@link module:find-and-replace/findandreplace~FindAndReplace find and replace feature}.
13
13
  */
14
- export default class FindPreviousCommand extends FindNextCommand {
14
+ export declare class FindPreviousCommand extends FindNextCommand {
15
15
  /**
16
16
  * @inheritDoc
17
17
  */
@@ -5,13 +5,13 @@
5
5
  /**
6
6
  * @module find-and-replace/findpreviouscommand
7
7
  */
8
- import FindNextCommand from './findnextcommand.js';
8
+ import { FindNextCommand } from './findnextcommand.js';
9
9
  /**
10
10
  * The find previous command. Moves the highlight to the previous search result.
11
11
  *
12
12
  * It is used by the {@link module:find-and-replace/findandreplace~FindAndReplace find and replace feature}.
13
13
  */
14
- export default class FindPreviousCommand extends FindNextCommand {
14
+ export class FindPreviousCommand extends FindNextCommand {
15
15
  /**
16
16
  * @inheritDoc
17
17
  */
package/src/index.d.ts CHANGED
@@ -5,14 +5,17 @@
5
5
  /**
6
6
  * @module find-and-replace
7
7
  */
8
- export { default as FindAndReplace } from './findandreplace.js';
9
- export { default as FindAndReplaceEditing } from './findandreplaceediting.js';
10
- export { default as FindAndReplaceUI } from './findandreplaceui.js';
11
- export { default as FindAndReplaceUtils } from './findandreplaceutils.js';
12
- export { default as FindCommand } from './findcommand.js';
13
- export { default as FindNextCommand } from './findnextcommand.js';
14
- export { default as FindPreviousCommand } from './findpreviouscommand.js';
15
- export { default as ReplaceCommand } from './replacecommand.js';
16
- export { default as ReplaceAllCommand } from './replaceallcommand.js';
8
+ export { FindAndReplace, type FindResultType } from './findandreplace.js';
9
+ export { FindAndReplaceEditing } from './findandreplaceediting.js';
10
+ export { FindAndReplaceUI, type FindResetedEvent } from './findandreplaceui.js';
11
+ export { FindAndReplaceUtils } from './findandreplaceutils.js';
12
+ export { FindCommand, type FindAttributes } from './findcommand.js';
13
+ export { FindNextCommand } from './findnextcommand.js';
14
+ export { FindPreviousCommand } from './findpreviouscommand.js';
15
+ export { ReplaceCommand } from './replacecommand.js';
16
+ export { ReplaceAllCommand } from './replaceallcommand.js';
17
+ export { FindReplaceCommandBase } from './replacecommandbase.js';
17
18
  export type { FindAndReplaceConfig } from './findandreplaceconfig.js';
19
+ export { FindAndReplaceFormView, type FindNextEvent, type FindNextEventData, type FindPreviousEvent, type FindEventBaseData, type ReplaceEvent, type ReplaceEventData, type ReplaceAllEvent } from './ui/findandreplaceformview.js';
20
+ export { FindAndReplaceState, sortSearchResultsByMarkerPositions as _sortFindResultsByMarkerPositions, type FindCallback, type FindCallbackResultObject, type FindCallbackResult } from './findandreplacestate.js';
18
21
  import './augmentation.js';
package/src/index.js CHANGED
@@ -5,13 +5,16 @@
5
5
  /**
6
6
  * @module find-and-replace
7
7
  */
8
- export { default as FindAndReplace } from './findandreplace.js';
9
- export { default as FindAndReplaceEditing } from './findandreplaceediting.js';
10
- export { default as FindAndReplaceUI } from './findandreplaceui.js';
11
- export { default as FindAndReplaceUtils } from './findandreplaceutils.js';
12
- export { default as FindCommand } from './findcommand.js';
13
- export { default as FindNextCommand } from './findnextcommand.js';
14
- export { default as FindPreviousCommand } from './findpreviouscommand.js';
15
- export { default as ReplaceCommand } from './replacecommand.js';
16
- export { default as ReplaceAllCommand } from './replaceallcommand.js';
8
+ export { FindAndReplace } from './findandreplace.js';
9
+ export { FindAndReplaceEditing } from './findandreplaceediting.js';
10
+ export { FindAndReplaceUI } from './findandreplaceui.js';
11
+ export { FindAndReplaceUtils } from './findandreplaceutils.js';
12
+ export { FindCommand } from './findcommand.js';
13
+ export { FindNextCommand } from './findnextcommand.js';
14
+ export { FindPreviousCommand } from './findpreviouscommand.js';
15
+ export { ReplaceCommand } from './replacecommand.js';
16
+ export { ReplaceAllCommand } from './replaceallcommand.js';
17
+ export { FindReplaceCommandBase } from './replacecommandbase.js';
18
+ export { FindAndReplaceFormView } from './ui/findandreplaceformview.js';
19
+ export { FindAndReplaceState, sortSearchResultsByMarkerPositions as _sortFindResultsByMarkerPositions } from './findandreplacestate.js';
17
20
  import './augmentation.js';
@@ -6,12 +6,12 @@
6
6
  * @module find-and-replace/replaceallcommand
7
7
  */
8
8
  import { Collection } from 'ckeditor5/src/utils.js';
9
- import type { ResultType } from './findandreplace.js';
10
- import { ReplaceCommandBase } from './replacecommandbase.js';
9
+ import type { FindResultType } from './findandreplace.js';
10
+ import { FindReplaceCommandBase } from './replacecommandbase.js';
11
11
  /**
12
12
  * The replace all command. It is used by the {@link module:find-and-replace/findandreplace~FindAndReplace find and replace feature}.
13
13
  */
14
- export default class ReplaceAllCommand extends ReplaceCommandBase {
14
+ export declare class ReplaceAllCommand extends FindReplaceCommandBase {
15
15
  /**
16
16
  * Replaces all the occurrences of `textToReplace` with a given `newText` string.
17
17
  *
@@ -31,5 +31,5 @@ export default class ReplaceAllCommand extends ReplaceCommandBase {
31
31
  *
32
32
  * @fires module:core/command~Command#event:execute
33
33
  */
34
- execute(newText: string, textToReplace: string | Collection<ResultType>): void;
34
+ execute(newText: string, textToReplace: string | Collection<FindResultType>): void;
35
35
  }
@@ -6,11 +6,11 @@
6
6
  * @module find-and-replace/replaceallcommand
7
7
  */
8
8
  import { Collection } from 'ckeditor5/src/utils.js';
9
- import { ReplaceCommandBase } from './replacecommandbase.js';
9
+ import { FindReplaceCommandBase } from './replacecommandbase.js';
10
10
  /**
11
11
  * The replace all command. It is used by the {@link module:find-and-replace/findandreplace~FindAndReplace find and replace feature}.
12
12
  */
13
- export default class ReplaceAllCommand extends ReplaceCommandBase {
13
+ export class ReplaceAllCommand extends FindReplaceCommandBase {
14
14
  /**
15
15
  * Replaces all the occurrences of `textToReplace` with a given `newText` string.
16
16
  *
@@ -5,12 +5,12 @@
5
5
  /**
6
6
  * @module find-and-replace/replacecommand
7
7
  */
8
- import type { ResultType } from './findandreplace.js';
9
- import { ReplaceCommandBase } from './replacecommandbase.js';
8
+ import type { FindResultType } from './findandreplace.js';
9
+ import { FindReplaceCommandBase } from './replacecommandbase.js';
10
10
  /**
11
11
  * The replace command. It is used by the {@link module:find-and-replace/findandreplace~FindAndReplace find and replace feature}.
12
12
  */
13
- export default class ReplaceCommand extends ReplaceCommandBase {
13
+ export declare class ReplaceCommand extends FindReplaceCommandBase {
14
14
  /**
15
15
  * Replace a given find result by a string or a callback.
16
16
  *
@@ -18,5 +18,5 @@ export default class ReplaceCommand extends ReplaceCommandBase {
18
18
  *
19
19
  * @fires execute
20
20
  */
21
- execute(replacementText: string, result: ResultType): void;
21
+ execute(replacementText: string, result: FindResultType): void;
22
22
  }
@@ -3,11 +3,11 @@
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  import { sortSearchResultsByMarkerPositions } from './findandreplacestate.js';
6
- import { ReplaceCommandBase } from './replacecommandbase.js';
6
+ import { FindReplaceCommandBase } from './replacecommandbase.js';
7
7
  /**
8
8
  * The replace command. It is used by the {@link module:find-and-replace/findandreplace~FindAndReplace find and replace feature}.
9
9
  */
10
- export default class ReplaceCommand extends ReplaceCommandBase {
10
+ export class ReplaceCommand extends FindReplaceCommandBase {
11
11
  /**
12
12
  * Replace a given find result by a string or a callback.
13
13
  *
@@ -6,9 +6,9 @@
6
6
  * @module find-and-replace/replacecommandbase
7
7
  */
8
8
  import { Command, type Editor } from 'ckeditor5/src/core.js';
9
- import type { ResultType } from './findandreplace.js';
10
- import type FindAndReplaceState from './findandreplacestate.js';
11
- export declare abstract class ReplaceCommandBase extends Command {
9
+ import type { FindResultType } from './findandreplace.js';
10
+ import { type FindAndReplaceState } from './findandreplacestate.js';
11
+ export declare abstract class FindReplaceCommandBase extends Command {
12
12
  /**
13
13
  * The find and replace state object used for command operations.
14
14
  */
@@ -27,5 +27,5 @@ export declare abstract class ReplaceCommandBase extends Command {
27
27
  *
28
28
  * @param result A single result from the find command.
29
29
  */
30
- protected _replace(replacementText: string, result: ResultType): void;
30
+ protected _replace(replacementText: string, result: FindResultType): void;
31
31
  }
@@ -6,7 +6,7 @@
6
6
  * @module find-and-replace/replacecommandbase
7
7
  */
8
8
  import { Command } from 'ckeditor5/src/core.js';
9
- export class ReplaceCommandBase extends Command {
9
+ export class FindReplaceCommandBase extends Command {
10
10
  /**
11
11
  * The find and replace state object used for command operations.
12
12
  */
@@ -14,7 +14,7 @@ import '../../theme/findandreplaceform.css';
14
14
  *
15
15
  * See {@link module:find-and-replace/ui/findandreplaceformview~FindAndReplaceFormView}.
16
16
  */
17
- export default class FindAndReplaceFormView extends View {
17
+ export declare class FindAndReplaceFormView extends View {
18
18
  /**
19
19
  * A collection of child views.
20
20
  */
@@ -17,7 +17,7 @@ import { IconPreviousArrow } from 'ckeditor5/src/icons.js';
17
17
  *
18
18
  * See {@link module:find-and-replace/ui/findandreplaceformview~FindAndReplaceFormView}.
19
19
  */
20
- export default class FindAndReplaceFormView extends View {
20
+ export class FindAndReplaceFormView extends View {
21
21
  /**
22
22
  * A collection of child views.
23
23
  */