@ckeditor/ckeditor5-find-and-replace 0.0.0-internal-20241017.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 +4 -0
- package/LICENSE.md +21 -0
- package/README.md +26 -0
- package/build/find-and-replace.js +5 -0
- package/build/translations/af.js +1 -0
- package/build/translations/ar.js +1 -0
- package/build/translations/bg.js +1 -0
- package/build/translations/bn.js +1 -0
- package/build/translations/bs.js +1 -0
- package/build/translations/ca.js +1 -0
- package/build/translations/cs.js +1 -0
- package/build/translations/da.js +1 -0
- package/build/translations/de.js +1 -0
- package/build/translations/el.js +1 -0
- package/build/translations/en-au.js +1 -0
- package/build/translations/es-co.js +1 -0
- package/build/translations/es.js +1 -0
- package/build/translations/et.js +1 -0
- package/build/translations/fa.js +1 -0
- package/build/translations/fi.js +1 -0
- package/build/translations/fr.js +1 -0
- package/build/translations/gl.js +1 -0
- package/build/translations/he.js +1 -0
- package/build/translations/hi.js +1 -0
- package/build/translations/hr.js +1 -0
- package/build/translations/hu.js +1 -0
- package/build/translations/id.js +1 -0
- package/build/translations/it.js +1 -0
- package/build/translations/ja.js +1 -0
- package/build/translations/jv.js +1 -0
- package/build/translations/ko.js +1 -0
- package/build/translations/lt.js +1 -0
- package/build/translations/lv.js +1 -0
- package/build/translations/ms.js +1 -0
- package/build/translations/nl.js +1 -0
- package/build/translations/no.js +1 -0
- package/build/translations/pl.js +1 -0
- package/build/translations/pt-br.js +1 -0
- package/build/translations/pt.js +1 -0
- package/build/translations/ro.js +1 -0
- package/build/translations/ru.js +1 -0
- package/build/translations/sk.js +1 -0
- package/build/translations/sr-latn.js +1 -0
- package/build/translations/sr.js +1 -0
- package/build/translations/sv.js +1 -0
- package/build/translations/th.js +1 -0
- package/build/translations/ti.js +1 -0
- package/build/translations/tr.js +1 -0
- package/build/translations/tt.js +1 -0
- package/build/translations/ug.js +1 -0
- package/build/translations/uk.js +1 -0
- package/build/translations/ur.js +1 -0
- package/build/translations/vi.js +1 -0
- package/build/translations/zh-cn.js +1 -0
- package/build/translations/zh.js +1 -0
- package/ckeditor5-metadata.json +18 -0
- package/dist/augmentation.d.ts +24 -0
- package/dist/findandreplace.d.ts +50 -0
- package/dist/findandreplaceconfig.d.ts +35 -0
- package/dist/findandreplaceediting.d.ts +71 -0
- package/dist/findandreplacestate.d.ts +116 -0
- package/dist/findandreplaceui.d.ts +87 -0
- package/dist/findandreplaceutils.d.ts +77 -0
- package/dist/findcommand.d.ts +52 -0
- package/dist/findnextcommand.d.ts +39 -0
- package/dist/findpreviouscommand.d.ts +23 -0
- package/dist/index-content.css +4 -0
- package/dist/index-editor.css +54 -0
- package/dist/index.css +78 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +1523 -0
- package/dist/index.js.map +1 -0
- package/dist/replaceallcommand.d.ts +39 -0
- package/dist/replacecommand.d.ts +26 -0
- package/dist/replacecommandbase.d.ts +35 -0
- package/dist/translations/af.d.ts +8 -0
- package/dist/translations/af.js +5 -0
- package/dist/translations/af.umd.js +11 -0
- package/dist/translations/ar.d.ts +8 -0
- package/dist/translations/ar.js +5 -0
- package/dist/translations/ar.umd.js +11 -0
- package/dist/translations/bg.d.ts +8 -0
- package/dist/translations/bg.js +5 -0
- package/dist/translations/bg.umd.js +11 -0
- package/dist/translations/bn.d.ts +8 -0
- package/dist/translations/bn.js +5 -0
- package/dist/translations/bn.umd.js +11 -0
- package/dist/translations/bs.d.ts +8 -0
- package/dist/translations/bs.js +5 -0
- package/dist/translations/bs.umd.js +11 -0
- package/dist/translations/ca.d.ts +8 -0
- package/dist/translations/ca.js +5 -0
- package/dist/translations/ca.umd.js +11 -0
- package/dist/translations/cs.d.ts +8 -0
- package/dist/translations/cs.js +5 -0
- package/dist/translations/cs.umd.js +11 -0
- package/dist/translations/da.d.ts +8 -0
- package/dist/translations/da.js +5 -0
- package/dist/translations/da.umd.js +11 -0
- package/dist/translations/de.d.ts +8 -0
- package/dist/translations/de.js +5 -0
- package/dist/translations/de.umd.js +11 -0
- package/dist/translations/el.d.ts +8 -0
- package/dist/translations/el.js +5 -0
- package/dist/translations/el.umd.js +11 -0
- package/dist/translations/en-au.d.ts +8 -0
- package/dist/translations/en-au.js +5 -0
- package/dist/translations/en-au.umd.js +11 -0
- package/dist/translations/en.d.ts +8 -0
- package/dist/translations/en.js +5 -0
- package/dist/translations/en.umd.js +11 -0
- package/dist/translations/es-co.d.ts +8 -0
- package/dist/translations/es-co.js +5 -0
- package/dist/translations/es-co.umd.js +11 -0
- package/dist/translations/es.d.ts +8 -0
- package/dist/translations/es.js +5 -0
- package/dist/translations/es.umd.js +11 -0
- package/dist/translations/et.d.ts +8 -0
- package/dist/translations/et.js +5 -0
- package/dist/translations/et.umd.js +11 -0
- package/dist/translations/fa.d.ts +8 -0
- package/dist/translations/fa.js +5 -0
- package/dist/translations/fa.umd.js +11 -0
- package/dist/translations/fi.d.ts +8 -0
- package/dist/translations/fi.js +5 -0
- package/dist/translations/fi.umd.js +11 -0
- package/dist/translations/fr.d.ts +8 -0
- package/dist/translations/fr.js +5 -0
- package/dist/translations/fr.umd.js +11 -0
- package/dist/translations/gl.d.ts +8 -0
- package/dist/translations/gl.js +5 -0
- package/dist/translations/gl.umd.js +11 -0
- package/dist/translations/he.d.ts +8 -0
- package/dist/translations/he.js +5 -0
- package/dist/translations/he.umd.js +11 -0
- package/dist/translations/hi.d.ts +8 -0
- package/dist/translations/hi.js +5 -0
- package/dist/translations/hi.umd.js +11 -0
- package/dist/translations/hr.d.ts +8 -0
- package/dist/translations/hr.js +5 -0
- package/dist/translations/hr.umd.js +11 -0
- package/dist/translations/hu.d.ts +8 -0
- package/dist/translations/hu.js +5 -0
- package/dist/translations/hu.umd.js +11 -0
- package/dist/translations/id.d.ts +8 -0
- package/dist/translations/id.js +5 -0
- package/dist/translations/id.umd.js +11 -0
- package/dist/translations/it.d.ts +8 -0
- package/dist/translations/it.js +5 -0
- package/dist/translations/it.umd.js +11 -0
- package/dist/translations/ja.d.ts +8 -0
- package/dist/translations/ja.js +5 -0
- package/dist/translations/ja.umd.js +11 -0
- package/dist/translations/jv.d.ts +8 -0
- package/dist/translations/jv.js +5 -0
- package/dist/translations/jv.umd.js +11 -0
- package/dist/translations/ko.d.ts +8 -0
- package/dist/translations/ko.js +5 -0
- package/dist/translations/ko.umd.js +11 -0
- package/dist/translations/lt.d.ts +8 -0
- package/dist/translations/lt.js +5 -0
- package/dist/translations/lt.umd.js +11 -0
- package/dist/translations/lv.d.ts +8 -0
- package/dist/translations/lv.js +5 -0
- package/dist/translations/lv.umd.js +11 -0
- package/dist/translations/ms.d.ts +8 -0
- package/dist/translations/ms.js +5 -0
- package/dist/translations/ms.umd.js +11 -0
- package/dist/translations/nl.d.ts +8 -0
- package/dist/translations/nl.js +5 -0
- package/dist/translations/nl.umd.js +11 -0
- package/dist/translations/no.d.ts +8 -0
- package/dist/translations/no.js +5 -0
- package/dist/translations/no.umd.js +11 -0
- package/dist/translations/pl.d.ts +8 -0
- package/dist/translations/pl.js +5 -0
- package/dist/translations/pl.umd.js +11 -0
- package/dist/translations/pt-br.d.ts +8 -0
- package/dist/translations/pt-br.js +5 -0
- package/dist/translations/pt-br.umd.js +11 -0
- package/dist/translations/pt.d.ts +8 -0
- package/dist/translations/pt.js +5 -0
- package/dist/translations/pt.umd.js +11 -0
- package/dist/translations/ro.d.ts +8 -0
- package/dist/translations/ro.js +5 -0
- package/dist/translations/ro.umd.js +11 -0
- package/dist/translations/ru.d.ts +8 -0
- package/dist/translations/ru.js +5 -0
- package/dist/translations/ru.umd.js +11 -0
- package/dist/translations/sk.d.ts +8 -0
- package/dist/translations/sk.js +5 -0
- package/dist/translations/sk.umd.js +11 -0
- package/dist/translations/sr-latn.d.ts +8 -0
- package/dist/translations/sr-latn.js +5 -0
- package/dist/translations/sr-latn.umd.js +11 -0
- package/dist/translations/sr.d.ts +8 -0
- package/dist/translations/sr.js +5 -0
- package/dist/translations/sr.umd.js +11 -0
- package/dist/translations/sv.d.ts +8 -0
- package/dist/translations/sv.js +5 -0
- package/dist/translations/sv.umd.js +11 -0
- package/dist/translations/th.d.ts +8 -0
- package/dist/translations/th.js +5 -0
- package/dist/translations/th.umd.js +11 -0
- package/dist/translations/ti.d.ts +8 -0
- package/dist/translations/ti.js +5 -0
- package/dist/translations/ti.umd.js +11 -0
- package/dist/translations/tr.d.ts +8 -0
- package/dist/translations/tr.js +5 -0
- package/dist/translations/tr.umd.js +11 -0
- package/dist/translations/tt.d.ts +8 -0
- package/dist/translations/tt.js +5 -0
- package/dist/translations/tt.umd.js +11 -0
- package/dist/translations/ug.d.ts +8 -0
- package/dist/translations/ug.js +5 -0
- package/dist/translations/ug.umd.js +11 -0
- package/dist/translations/uk.d.ts +8 -0
- package/dist/translations/uk.js +5 -0
- package/dist/translations/uk.umd.js +11 -0
- package/dist/translations/ur.d.ts +8 -0
- package/dist/translations/ur.js +5 -0
- package/dist/translations/ur.umd.js +11 -0
- package/dist/translations/vi.d.ts +8 -0
- package/dist/translations/vi.js +5 -0
- package/dist/translations/vi.umd.js +11 -0
- package/dist/translations/zh-cn.d.ts +8 -0
- package/dist/translations/zh-cn.js +5 -0
- package/dist/translations/zh-cn.umd.js +11 -0
- package/dist/translations/zh.d.ts +8 -0
- package/dist/translations/zh.js +5 -0
- package/dist/translations/zh.umd.js +11 -0
- package/dist/ui/findandreplaceformview.d.ts +313 -0
- package/lang/contexts.json +16 -0
- package/lang/translations/af.po +74 -0
- package/lang/translations/ar.po +74 -0
- package/lang/translations/bg.po +74 -0
- package/lang/translations/bn.po +74 -0
- package/lang/translations/bs.po +74 -0
- package/lang/translations/ca.po +74 -0
- package/lang/translations/cs.po +74 -0
- package/lang/translations/da.po +74 -0
- package/lang/translations/de.po +74 -0
- package/lang/translations/el.po +74 -0
- package/lang/translations/en-au.po +74 -0
- package/lang/translations/en.po +74 -0
- package/lang/translations/es-co.po +74 -0
- package/lang/translations/es.po +74 -0
- package/lang/translations/et.po +74 -0
- package/lang/translations/fa.po +74 -0
- package/lang/translations/fi.po +74 -0
- package/lang/translations/fr.po +74 -0
- package/lang/translations/gl.po +74 -0
- package/lang/translations/he.po +74 -0
- package/lang/translations/hi.po +74 -0
- package/lang/translations/hr.po +74 -0
- package/lang/translations/hu.po +74 -0
- package/lang/translations/id.po +74 -0
- package/lang/translations/it.po +74 -0
- package/lang/translations/ja.po +74 -0
- package/lang/translations/jv.po +74 -0
- package/lang/translations/ko.po +74 -0
- package/lang/translations/lt.po +74 -0
- package/lang/translations/lv.po +74 -0
- package/lang/translations/ms.po +74 -0
- package/lang/translations/nl.po +74 -0
- package/lang/translations/no.po +74 -0
- package/lang/translations/pl.po +74 -0
- package/lang/translations/pt-br.po +74 -0
- package/lang/translations/pt.po +74 -0
- package/lang/translations/ro.po +74 -0
- package/lang/translations/ru.po +74 -0
- package/lang/translations/sk.po +74 -0
- package/lang/translations/sr-latn.po +74 -0
- package/lang/translations/sr.po +74 -0
- package/lang/translations/sv.po +74 -0
- package/lang/translations/th.po +74 -0
- package/lang/translations/ti.po +74 -0
- package/lang/translations/tr.po +74 -0
- package/lang/translations/tt.po +74 -0
- package/lang/translations/ug.po +74 -0
- package/lang/translations/uk.po +74 -0
- package/lang/translations/ur.po +74 -0
- package/lang/translations/vi.po +74 -0
- package/lang/translations/zh-cn.po +74 -0
- package/lang/translations/zh.po +74 -0
- package/package.json +42 -0
- package/src/augmentation.d.ts +20 -0
- package/src/augmentation.js +5 -0
- package/src/findandreplace.d.ts +46 -0
- package/src/findandreplace.js +90 -0
- package/src/findandreplaceconfig.d.ts +31 -0
- package/src/findandreplaceconfig.js +5 -0
- package/src/findandreplaceediting.d.ts +67 -0
- package/src/findandreplaceediting.js +233 -0
- package/src/findandreplacestate.d.ts +112 -0
- package/src/findandreplacestate.js +80 -0
- package/src/findandreplaceui.d.ts +83 -0
- package/src/findandreplaceui.js +275 -0
- package/src/findandreplaceutils.d.ts +73 -0
- package/src/findandreplaceutils.js +160 -0
- package/src/findcommand.d.ts +48 -0
- package/src/findcommand.js +79 -0
- package/src/findnextcommand.d.ts +35 -0
- package/src/findnextcommand.js +47 -0
- package/src/findpreviouscommand.d.ts +19 -0
- package/src/findpreviouscommand.js +25 -0
- package/src/index.d.ts +18 -0
- package/src/index.js +17 -0
- package/src/replaceallcommand.d.ts +35 -0
- package/src/replaceallcommand.js +50 -0
- package/src/replacecommand.d.ts +22 -0
- package/src/replacecommand.js +20 -0
- package/src/replacecommandbase.d.ts +31 -0
- package/src/replacecommandbase.js +56 -0
- package/src/ui/findandreplaceformview.d.ts +309 -0
- package/src/ui/findandreplaceformview.js +472 -0
- package/theme/findandreplace.css +13 -0
- package/theme/findandreplaceform.css +17 -0
- package/theme/icons/find-replace.svg +1 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module find-and-replace/findandreplaceediting
|
|
11
|
+
*/
|
|
12
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
13
|
+
import { type Collection } from 'ckeditor5/src/utils.js';
|
|
14
|
+
import { type FindAttributes } from './findcommand.js';
|
|
15
|
+
import FindAndReplaceState, { type FindCallback } from './findandreplacestate.js';
|
|
16
|
+
import FindAndReplaceUtils from './findandreplaceutils.js';
|
|
17
|
+
import type { ResultType } from './findandreplace.js';
|
|
18
|
+
import '../theme/findandreplace.css';
|
|
19
|
+
/**
|
|
20
|
+
* Implements the editing part for find and replace plugin. For example conversion, commands etc.
|
|
21
|
+
*/
|
|
22
|
+
export default class FindAndReplaceEditing extends Plugin {
|
|
23
|
+
/**
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
26
|
+
static get requires(): readonly [typeof FindAndReplaceUtils];
|
|
27
|
+
/**
|
|
28
|
+
* @inheritDoc
|
|
29
|
+
*/
|
|
30
|
+
static get pluginName(): "FindAndReplaceEditing";
|
|
31
|
+
/**
|
|
32
|
+
* @inheritDoc
|
|
33
|
+
*/
|
|
34
|
+
static get isOfficialPlugin(): true;
|
|
35
|
+
/**
|
|
36
|
+
* An object storing the find and replace state within a given editor instance.
|
|
37
|
+
*/
|
|
38
|
+
state?: FindAndReplaceState;
|
|
39
|
+
/**
|
|
40
|
+
* A flag that indicates that the user has started a search and the editor is listening for changes
|
|
41
|
+
* to the text on which it will perform an automatic search. Among other things, the mode is activated
|
|
42
|
+
* when the user first clicks 'Find' button and then later deactivated when the modal or search dropdown is closed.
|
|
43
|
+
*
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
_isSearchActive: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* @inheritDoc
|
|
49
|
+
*/
|
|
50
|
+
init(): void;
|
|
51
|
+
/**
|
|
52
|
+
* Initiate a search.
|
|
53
|
+
*/
|
|
54
|
+
find(callbackOrText: string | FindCallback, findAttributes?: FindAttributes): Collection<ResultType>;
|
|
55
|
+
/**
|
|
56
|
+
* Stops active results from updating, and clears out the results.
|
|
57
|
+
*/
|
|
58
|
+
stop(): void;
|
|
59
|
+
/**
|
|
60
|
+
* Sets up the commands.
|
|
61
|
+
*/
|
|
62
|
+
private _defineCommands;
|
|
63
|
+
/**
|
|
64
|
+
* Sets up the marker downcast converters for search results highlighting.
|
|
65
|
+
*/
|
|
66
|
+
private _defineConverters;
|
|
67
|
+
/**
|
|
68
|
+
* Reacts to document changes in order to update search list.
|
|
69
|
+
*/
|
|
70
|
+
private _onDocumentChange;
|
|
71
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module find-and-replace/findandreplacestate
|
|
11
|
+
*/
|
|
12
|
+
import type { Model, Item } from 'ckeditor5/src/engine.js';
|
|
13
|
+
import { Collection } from 'ckeditor5/src/utils.js';
|
|
14
|
+
import type { ResultType } from './findandreplace.js';
|
|
15
|
+
declare const FindAndReplaceState_base: {
|
|
16
|
+
new (): import("ckeditor5/src/utils.js").Observable;
|
|
17
|
+
prototype: import("ckeditor5/src/utils.js").Observable;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* The object storing find and replace plugin state for a given editor instance.
|
|
21
|
+
*/
|
|
22
|
+
export default class FindAndReplaceState extends /* #__PURE__ */ FindAndReplaceState_base {
|
|
23
|
+
/**
|
|
24
|
+
* A collection of find matches.
|
|
25
|
+
*
|
|
26
|
+
* @observable
|
|
27
|
+
*/
|
|
28
|
+
results: Collection<ResultType>;
|
|
29
|
+
/**
|
|
30
|
+
* Currently highlighted search result in {@link #results matched results}.
|
|
31
|
+
*
|
|
32
|
+
* @readonly
|
|
33
|
+
* @observable
|
|
34
|
+
*/
|
|
35
|
+
highlightedResult: ResultType | null;
|
|
36
|
+
/**
|
|
37
|
+
* Currently highlighted search result offset in {@link #results matched results}.
|
|
38
|
+
*
|
|
39
|
+
* @readonly
|
|
40
|
+
* @observable
|
|
41
|
+
*/
|
|
42
|
+
highlightedOffset: number;
|
|
43
|
+
/**
|
|
44
|
+
* Searched text value.
|
|
45
|
+
*
|
|
46
|
+
* @readonly
|
|
47
|
+
* @observable
|
|
48
|
+
*/
|
|
49
|
+
searchText: string;
|
|
50
|
+
/**
|
|
51
|
+
* The most recent search callback used by the feature to find matches.
|
|
52
|
+
* It is used to re-run the search when user modifies the editor content.
|
|
53
|
+
*
|
|
54
|
+
* @readonly
|
|
55
|
+
* @observable
|
|
56
|
+
*/
|
|
57
|
+
lastSearchCallback: FindCallback | null;
|
|
58
|
+
/**
|
|
59
|
+
* Replace text value.
|
|
60
|
+
*
|
|
61
|
+
* @readonly
|
|
62
|
+
* @observable
|
|
63
|
+
*/
|
|
64
|
+
replaceText: string;
|
|
65
|
+
/**
|
|
66
|
+
* Indicates whether the matchCase checkbox has been checked.
|
|
67
|
+
*
|
|
68
|
+
* @readonly
|
|
69
|
+
* @observable
|
|
70
|
+
*/
|
|
71
|
+
matchCase: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Indicates whether the matchWholeWords checkbox has been checked.
|
|
74
|
+
*
|
|
75
|
+
* @readonly
|
|
76
|
+
* @observable
|
|
77
|
+
*/
|
|
78
|
+
matchWholeWords: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Creates an instance of the state.
|
|
81
|
+
*/
|
|
82
|
+
constructor(model: Model);
|
|
83
|
+
/**
|
|
84
|
+
* Cleans the state up and removes markers from the model.
|
|
85
|
+
*/
|
|
86
|
+
clear(model: Model): void;
|
|
87
|
+
/**
|
|
88
|
+
* Refreshes the highlight result offset based on it's index within the result list.
|
|
89
|
+
*/
|
|
90
|
+
refreshHighlightOffset(): void;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* The callback function used to find matches in the document.
|
|
94
|
+
*/
|
|
95
|
+
export type FindCallback = ({ item, text }: {
|
|
96
|
+
item: Item;
|
|
97
|
+
text: string;
|
|
98
|
+
}) => FindCallbackResultObject | FindCallbackResult;
|
|
99
|
+
/**
|
|
100
|
+
* Represents the result of a find callback.
|
|
101
|
+
*
|
|
102
|
+
* The `searchText` attribute in the result object is used to determine if the search text has changed.
|
|
103
|
+
* If returned `searchText` is different than the last search text, the search results will be invalidated
|
|
104
|
+
* while searching for next item and the search will start from the beginning of the document.
|
|
105
|
+
*/
|
|
106
|
+
export type FindCallbackResultObject = {
|
|
107
|
+
results: Array<ResultType>;
|
|
108
|
+
searchText: string;
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Represents the result of a find callback.
|
|
112
|
+
*
|
|
113
|
+
* @deprecated Use `FindCallbackResultObject` instead.
|
|
114
|
+
*/
|
|
115
|
+
export type FindCallbackResult = Array<ResultType>;
|
|
116
|
+
export {};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module find-and-replace/findandreplaceui
|
|
11
|
+
*/
|
|
12
|
+
import { type Editor, Plugin } from 'ckeditor5/src/core.js';
|
|
13
|
+
import { Dialog, type ViewWithCssTransitionDisabler } from 'ckeditor5/src/ui.js';
|
|
14
|
+
import FindAndReplaceFormView from './ui/findandreplaceformview.js';
|
|
15
|
+
/**
|
|
16
|
+
* The default find and replace UI.
|
|
17
|
+
*
|
|
18
|
+
* It registers the `'findAndReplace'` UI button in the editor's {@link module:ui/componentfactory~ComponentFactory component factory}.
|
|
19
|
+
* that uses the {@link module:find-and-replace/findandreplace~FindAndReplace FindAndReplace} plugin API.
|
|
20
|
+
*/
|
|
21
|
+
export default class FindAndReplaceUI extends Plugin {
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
static get requires(): readonly [typeof Dialog];
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
static get pluginName(): "FindAndReplaceUI";
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
static get isOfficialPlugin(): true;
|
|
34
|
+
/**
|
|
35
|
+
* A reference to the find and replace form view.
|
|
36
|
+
*/
|
|
37
|
+
formView: FindAndReplaceFormView & ViewWithCssTransitionDisabler | null;
|
|
38
|
+
/**
|
|
39
|
+
* @inheritDoc
|
|
40
|
+
*/
|
|
41
|
+
constructor(editor: Editor);
|
|
42
|
+
/**
|
|
43
|
+
* @inheritDoc
|
|
44
|
+
*/
|
|
45
|
+
init(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Creates a dropdown containing the find and replace form.
|
|
48
|
+
*/
|
|
49
|
+
private _createDropdown;
|
|
50
|
+
/**
|
|
51
|
+
* Creates a button that opens a dialog with the find and replace form.
|
|
52
|
+
*/
|
|
53
|
+
private _createDialogButtonForToolbar;
|
|
54
|
+
/**
|
|
55
|
+
* Creates a button for for menu bar that will show find and replace dialog.
|
|
56
|
+
*/
|
|
57
|
+
private _createDialogButtonForMenuBar;
|
|
58
|
+
/**
|
|
59
|
+
* Creates a button for find and replace command to use either in toolbar or in menu bar.
|
|
60
|
+
*/
|
|
61
|
+
private _createButton;
|
|
62
|
+
/**
|
|
63
|
+
* Shows the find and replace dialog.
|
|
64
|
+
*/
|
|
65
|
+
private _showDialog;
|
|
66
|
+
/**
|
|
67
|
+
* Sets up the form view for the find and replace.
|
|
68
|
+
*
|
|
69
|
+
* @param formView A related form view.
|
|
70
|
+
*/
|
|
71
|
+
private _createFormView;
|
|
72
|
+
/**
|
|
73
|
+
* Clears the find and replace form and focuses the search text field.
|
|
74
|
+
*/
|
|
75
|
+
private _setupFormView;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Fired when the UI was reset and the search results marked in the editing root should be invalidated,
|
|
79
|
+
* for instance, because the user changed the searched phrase (or options) but didn't hit
|
|
80
|
+
* the "Find" button yet.
|
|
81
|
+
*
|
|
82
|
+
* @eventName ~FindAndReplaceUI#searchReseted
|
|
83
|
+
*/
|
|
84
|
+
export type SearchResetedEvent = {
|
|
85
|
+
name: 'searchReseted';
|
|
86
|
+
args: [];
|
|
87
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module find-and-replace/findandreplaceutils
|
|
11
|
+
*/
|
|
12
|
+
import type { Item, Model, Range } from 'ckeditor5/src/engine.js';
|
|
13
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
14
|
+
import { Collection } from 'ckeditor5/src/utils.js';
|
|
15
|
+
import type { ResultType } from './findandreplace.js';
|
|
16
|
+
/**
|
|
17
|
+
* A set of helpers related to find and replace.
|
|
18
|
+
*/
|
|
19
|
+
export default class FindAndReplaceUtils extends Plugin {
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
static get pluginName(): "FindAndReplaceUtils";
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
static get isOfficialPlugin(): true;
|
|
28
|
+
/**
|
|
29
|
+
* Executes findCallback and updates search results list.
|
|
30
|
+
*
|
|
31
|
+
* @param range The model range to scan for matches.
|
|
32
|
+
* @param model The model.
|
|
33
|
+
* @param findCallback The callback that should return `true` if provided text matches the search term.
|
|
34
|
+
* @param startResults An optional collection of find matches that the function should
|
|
35
|
+
* start with. This would be a collection returned by a previous `updateFindResultFromRange()` call.
|
|
36
|
+
* @returns A collection of objects describing find match.
|
|
37
|
+
*
|
|
38
|
+
* An example structure:
|
|
39
|
+
*
|
|
40
|
+
* ```js
|
|
41
|
+
* {
|
|
42
|
+
* id: resultId,
|
|
43
|
+
* label: foundItem.label,
|
|
44
|
+
* marker
|
|
45
|
+
* }
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
updateFindResultFromRange(range: Range, model: Model, findCallback: ({ item, text }: {
|
|
49
|
+
item: Item;
|
|
50
|
+
text: string;
|
|
51
|
+
}) => Array<ResultType> | {
|
|
52
|
+
results: Array<ResultType>;
|
|
53
|
+
}, startResults: Collection<ResultType> | null): Collection<ResultType>;
|
|
54
|
+
/**
|
|
55
|
+
* Returns text representation of a range. The returned text length should be the same as range length.
|
|
56
|
+
* In order to achieve this, this function will replace inline elements (text-line) as new line character ("\n").
|
|
57
|
+
*
|
|
58
|
+
* @param range The model range.
|
|
59
|
+
* @returns The text content of the provided range.
|
|
60
|
+
*/
|
|
61
|
+
rangeToText(range: Range): string;
|
|
62
|
+
/**
|
|
63
|
+
* Creates a text matching callback for a specified search term and matching options.
|
|
64
|
+
*
|
|
65
|
+
* @param searchTerm The search term.
|
|
66
|
+
* @param options Matching options.
|
|
67
|
+
* - options.matchCase=false If set to `true` letter casing will be ignored.
|
|
68
|
+
* - options.wholeWords=false If set to `true` only whole words that match `callbackOrText` will be matched.
|
|
69
|
+
*/
|
|
70
|
+
findByTextCallback(searchTerm: string, options: {
|
|
71
|
+
matchCase?: boolean;
|
|
72
|
+
wholeWords?: boolean;
|
|
73
|
+
}): ({ item, text }: {
|
|
74
|
+
item: Item;
|
|
75
|
+
text: string;
|
|
76
|
+
}) => Array<ResultType>;
|
|
77
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module find-and-replace/findcommand
|
|
11
|
+
*/
|
|
12
|
+
import { Command, type Editor } from 'ckeditor5/src/core.js';
|
|
13
|
+
import type { Collection } from 'ckeditor5/src/utils.js';
|
|
14
|
+
import type { default as FindAndReplaceState, FindCallback } from './findandreplacestate.js';
|
|
15
|
+
import type { ResultType } from './findandreplace.js';
|
|
16
|
+
/**
|
|
17
|
+
* The find command. It is used by the {@link module:find-and-replace/findandreplace~FindAndReplace find and replace feature}.
|
|
18
|
+
*/
|
|
19
|
+
export default class FindCommand extends Command {
|
|
20
|
+
/**
|
|
21
|
+
* The find and replace state object used for command operations.
|
|
22
|
+
*/
|
|
23
|
+
private _state;
|
|
24
|
+
/**
|
|
25
|
+
* Creates a new `FindCommand` instance.
|
|
26
|
+
*
|
|
27
|
+
* @param editor The editor on which this command will be used.
|
|
28
|
+
* @param state An object to hold plugin state.
|
|
29
|
+
*/
|
|
30
|
+
constructor(editor: Editor, state: FindAndReplaceState);
|
|
31
|
+
/**
|
|
32
|
+
* Executes the command.
|
|
33
|
+
*
|
|
34
|
+
* @param callbackOrText
|
|
35
|
+
* @param options Options object.
|
|
36
|
+
* @param options.matchCase If set to `true`, the letter case will be matched.
|
|
37
|
+
* @param options.wholeWords If set to `true`, only whole words that match `callbackOrText` will be matched.
|
|
38
|
+
*
|
|
39
|
+
* @fires execute
|
|
40
|
+
*/
|
|
41
|
+
execute(callbackOrText: string | FindCallback, { matchCase, wholeWords }?: FindAttributes): {
|
|
42
|
+
results: Collection<ResultType>;
|
|
43
|
+
findCallback: FindCallback;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The options object for the find command.
|
|
48
|
+
*/
|
|
49
|
+
export type FindAttributes = {
|
|
50
|
+
matchCase?: boolean;
|
|
51
|
+
wholeWords?: boolean;
|
|
52
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module find-and-replace/findnextcommand
|
|
11
|
+
*/
|
|
12
|
+
import { Command, type Editor } from 'ckeditor5/src/core.js';
|
|
13
|
+
import type FindAndReplaceState from './findandreplacestate.js';
|
|
14
|
+
/**
|
|
15
|
+
* The find next command. Moves the highlight to the next search result.
|
|
16
|
+
*
|
|
17
|
+
* It is used by the {@link module:find-and-replace/findandreplace~FindAndReplace find and replace feature}.
|
|
18
|
+
*/
|
|
19
|
+
export default class FindNextCommand extends Command {
|
|
20
|
+
/**
|
|
21
|
+
* The find and replace state object used for command operations.
|
|
22
|
+
*/
|
|
23
|
+
protected _state: FindAndReplaceState;
|
|
24
|
+
/**
|
|
25
|
+
* Creates a new `FindNextCommand` instance.
|
|
26
|
+
*
|
|
27
|
+
* @param editor The editor on which this command will be used.
|
|
28
|
+
* @param state An object to hold plugin state.
|
|
29
|
+
*/
|
|
30
|
+
constructor(editor: Editor, state: FindAndReplaceState);
|
|
31
|
+
/**
|
|
32
|
+
* @inheritDoc
|
|
33
|
+
*/
|
|
34
|
+
refresh(): void;
|
|
35
|
+
/**
|
|
36
|
+
* @inheritDoc
|
|
37
|
+
*/
|
|
38
|
+
execute(): void;
|
|
39
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module find-and-replace/findpreviouscommand
|
|
11
|
+
*/
|
|
12
|
+
import FindNextCommand from './findnextcommand.js';
|
|
13
|
+
/**
|
|
14
|
+
* The find previous command. Moves the highlight to the previous search result.
|
|
15
|
+
*
|
|
16
|
+
* It is used by the {@link module:find-and-replace/findandreplace~FindAndReplace find and replace feature}.
|
|
17
|
+
*/
|
|
18
|
+
export default class FindPreviousCommand extends FindNextCommand {
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
execute(): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
.ck-find-result{
|
|
6
|
+
background:var(--ck-color-highlight-background);
|
|
7
|
+
color:var(--ck-color-text);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.ck-find-result_selected{
|
|
11
|
+
background:hsl(29, 100%, 60%);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ck-vertical-form .ck-button::after{
|
|
15
|
+
content:"";
|
|
16
|
+
width:0;
|
|
17
|
+
position:absolute;
|
|
18
|
+
right:-1px;
|
|
19
|
+
top:-1px;
|
|
20
|
+
bottom:-1px;
|
|
21
|
+
z-index:1;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ck-vertical-form .ck-button:focus::after{
|
|
25
|
+
display:none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@media screen and (max-width: 600px){
|
|
29
|
+
.ck.ck-responsive-form .ck-button::after{
|
|
30
|
+
content:"";
|
|
31
|
+
width:0;
|
|
32
|
+
position:absolute;
|
|
33
|
+
right:-1px;
|
|
34
|
+
top:-1px;
|
|
35
|
+
bottom:-1px;
|
|
36
|
+
z-index:1;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ck.ck-responsive-form .ck-button:focus::after{
|
|
40
|
+
display:none;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.ck.ck-find-and-replace-form{
|
|
45
|
+
max-width:100%;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.ck.ck-find-and-replace-form .ck-find-and-replace-form__inputs, .ck.ck-find-and-replace-form .ck-find-and-replace-form__actions{
|
|
49
|
+
display:flex;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.ck.ck-find-and-replace-form .ck-find-and-replace-form__inputs.ck-find-and-replace-form__inputs .ck-results-counter, .ck.ck-find-and-replace-form .ck-find-and-replace-form__actions.ck-find-and-replace-form__inputs .ck-results-counter{
|
|
53
|
+
position:absolute;
|
|
54
|
+
}
|
package/dist/index.css
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/*
|
|
6
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
.ck-find-result {
|
|
11
|
+
background: var(--ck-color-highlight-background);
|
|
12
|
+
color: var(--ck-color-text);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.ck-find-result_selected {
|
|
16
|
+
background: hsl(29, 100%, 60%);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/*
|
|
20
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
21
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/*
|
|
25
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
26
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
.ck-vertical-form .ck-button::after {
|
|
30
|
+
content: "";
|
|
31
|
+
width: 0;
|
|
32
|
+
position: absolute;
|
|
33
|
+
right: -1px;
|
|
34
|
+
top: -1px;
|
|
35
|
+
bottom: -1px;
|
|
36
|
+
z-index: 1;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ck-vertical-form .ck-button:focus::after {
|
|
40
|
+
display: none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@media screen and (max-width: 600px) {
|
|
44
|
+
.ck.ck-responsive-form .ck-button::after {
|
|
45
|
+
content: "";
|
|
46
|
+
width: 0;
|
|
47
|
+
position: absolute;
|
|
48
|
+
right: -1px;
|
|
49
|
+
top: -1px;
|
|
50
|
+
bottom: -1px;
|
|
51
|
+
z-index: 1;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.ck.ck-responsive-form .ck-button:focus::after {
|
|
55
|
+
display: none;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/*
|
|
60
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
61
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
.ck.ck-find-and-replace-form {
|
|
65
|
+
max-width: 100%;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.ck.ck-find-and-replace-form .ck-find-and-replace-form__inputs, .ck.ck-find-and-replace-form .ck-find-and-replace-form__actions {
|
|
69
|
+
display: flex;
|
|
70
|
+
|
|
71
|
+
/* The inputs area styles */
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.ck.ck-find-and-replace-form .ck-find-and-replace-form__inputs.ck-find-and-replace-form__inputs .ck-results-counter, .ck.ck-find-and-replace-form .ck-find-and-replace-form__actions.ck-find-and-replace-form__inputs .ck-results-counter {
|
|
75
|
+
position: absolute;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/*# sourceMappingURL=index.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../theme/findandreplace.css","index.css","../../ckeditor5-ui/theme/components/responsive-form/responsiveform.css","../../../node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css","../theme/findandreplaceform.css"],"names":[],"mappings":";;;;AAAA,CAAA;ACCA,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ;AAC3E,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC;AAC5E,CAAC,CDAC;;AAEF,CAAA,EAAA,CAAA,IAAA,CAAA,MAAA,CAAA;ACCA,CDAC,UAAA,CAAA,CAAA,GAAA,CAAA,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AA,IAAA,CAAA,MAAA,CAAA,CAA2B;AHwD7B,CGpDC;;AAHC,CAAA,EAAA,CAAA,EAAA,CAAA,IAAA,CAAA,GAAA,CAAA,OAAA,CAAA,IAAA,CAAA,CAAA,EAAA,CAAA,IAAA,CAAA,GAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA,CAAA,IAAA,CAAA,GAAA,CAAA,OAAA,CAAA,YAAA,CAAA,CAAA,EAAA,CAAA,OAAA,CAAA,OAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,IAAA,CAAA,GAAA,CAAA,OAAA,CAAA,IAAA,CAAA,CAAA,EAAA,CAAA,IAAA,CAAA,GAAA,CAAA,OAAA,CAAA,aAAA,CAAA,EAAA,CAAA,IAAA,CAAA,GAAA,CAAA,OAAA,CAAA,YAAA,CAAA,CAAA,EAAA,CAAA,OAAA,CAAA,OAAA,CAAA;AH0DF,CAAC,CAAC,CGzDC,QAAA,CAAA,CAAA,QAAkB;AH0DrB,CAAC,CGzDC;;AH2DF,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC","file":"index.css.map","sourcesContent":["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-find-result {\n\tbackground: var(--ck-color-highlight-background);\n\tcolor: var(--ck-color-text);\n}\n\n.ck-find-result_selected {\n\tbackground: hsl(29, 100%, 60%);\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-find-result {\n\tbackground: var(--ck-color-highlight-background);\n\tcolor: var(--ck-color-text);\n}\n\n.ck-find-result_selected {\n\tbackground: hsl(29, 100%, 60%);\n}\n\n/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-vertical-form .ck-button::after {\n\t\tcontent: \"\";\n\t\twidth: 0;\n\t\tposition: absolute;\n\t\tright: -1px;\n\t\ttop: -1px;\n\t\tbottom: -1px;\n\t\tz-index: 1;\n\t}\n\n.ck-vertical-form .ck-button:focus::after {\n\t\tdisplay: none;\n\t}\n\n@media screen and (max-width: 600px) {\n\t\t\t.ck.ck-responsive-form .ck-button::after {\n\t\t\t\tcontent: \"\";\n\t\t\t\twidth: 0;\n\t\t\t\tposition: absolute;\n\t\t\t\tright: -1px;\n\t\t\t\ttop: -1px;\n\t\t\t\tbottom: -1px;\n\t\t\t\tz-index: 1;\n\t\t\t}\n\n\t\t\t.ck.ck-responsive-form .ck-button:focus::after {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t}\n\n/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-find-and-replace-form {\n\tmax-width: 100%;\n}\n\n.ck.ck-find-and-replace-form .ck-find-and-replace-form__inputs, .ck.ck-find-and-replace-form .ck-find-and-replace-form__actions {\n\t\tdisplay: flex;\n\n\t\t/* The inputs area styles */\n\t}\n\n.ck.ck-find-and-replace-form .ck-find-and-replace-form__inputs.ck-find-and-replace-form__inputs .ck-results-counter, .ck.ck-find-and-replace-form .ck-find-and-replace-form__actions.ck-find-and-replace-form__inputs .ck-results-counter {\n\t\t\tposition: absolute;\n\t\t}\n\n/*# sourceMappingURL=index.css.map */","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import \"@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css\";\n\n.ck-vertical-form .ck-button {\n\t&::after {\n\t\tcontent: \"\";\n\t\twidth: 0;\n\t\tposition: absolute;\n\t\tright: -1px;\n\t\ttop: -1px;\n\t\tbottom: -1px;\n\t\tz-index: 1;\n\t}\n\n\t&:focus::after {\n\t\tdisplay: none;\n\t}\n}\n\n.ck.ck-responsive-form {\n\t@mixin ck-media-phone {\n\t\t& .ck-button {\n\t\t\t&::after {\n\t\t\t\tcontent: \"\";\n\t\t\t\twidth: 0;\n\t\t\t\tposition: absolute;\n\t\t\t\tright: -1px;\n\t\t\t\ttop: -1px;\n\t\t\t\tbottom: -1px;\n\t\t\t\tz-index: 1;\n\t\t\t}\n\n\t\t\t&:focus::after {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-find-and-replace-form {\n\tmax-width: 100%;\n\n\t& .ck-find-and-replace-form__inputs, .ck-find-and-replace-form__actions {\n\t\tdisplay: flex;\n\n\t\t/* The inputs area styles */\n\t\t&.ck-find-and-replace-form__inputs .ck-results-counter {\n\t\t\tposition: absolute;\n\t\t}\n\t}\n}\n"]}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module find-and-replace
|
|
11
|
+
*/
|
|
12
|
+
export { default as FindAndReplace } from './findandreplace.js';
|
|
13
|
+
export { default as FindAndReplaceEditing } from './findandreplaceediting.js';
|
|
14
|
+
export { default as FindAndReplaceUI } from './findandreplaceui.js';
|
|
15
|
+
export { default as FindAndReplaceUtils } from './findandreplaceutils.js';
|
|
16
|
+
export { default as FindCommand } from './findcommand.js';
|
|
17
|
+
export { default as FindNextCommand } from './findnextcommand.js';
|
|
18
|
+
export { default as FindPreviousCommand } from './findpreviouscommand.js';
|
|
19
|
+
export { default as ReplaceCommand } from './replacecommand.js';
|
|
20
|
+
export { default as ReplaceAllCommand } from './replaceallcommand.js';
|
|
21
|
+
export type { FindAndReplaceConfig } from './findandreplaceconfig.js';
|
|
22
|
+
import './augmentation.js';
|