@ckeditor/ckeditor5-case-change 41.2.1 → 41.3.0-alpha.2
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/build/case-change.js +1 -1
- package/dist/content-index.css +332 -0
- package/dist/editor-index.css +312 -0
- package/dist/index.css +951 -0
- package/dist/translations/ar.d.ts +8 -0
- package/dist/translations/ar.js +23 -0
- package/dist/translations/bg.d.ts +8 -0
- package/dist/translations/bg.js +23 -0
- package/dist/translations/bn.d.ts +8 -0
- package/dist/translations/bn.js +23 -0
- package/dist/translations/ca.d.ts +8 -0
- package/dist/translations/ca.js +23 -0
- package/dist/translations/cs.d.ts +8 -0
- package/dist/translations/cs.js +23 -0
- package/dist/translations/da.d.ts +8 -0
- package/dist/translations/da.js +23 -0
- package/dist/translations/de.d.ts +8 -0
- package/dist/translations/de.js +23 -0
- package/dist/translations/el.d.ts +8 -0
- package/dist/translations/el.js +23 -0
- package/dist/translations/en.d.ts +8 -0
- package/dist/translations/en.js +23 -0
- package/dist/translations/es.d.ts +8 -0
- package/dist/translations/es.js +23 -0
- package/dist/translations/et.d.ts +8 -0
- package/dist/translations/et.js +23 -0
- package/dist/translations/fi.d.ts +8 -0
- package/dist/translations/fi.js +23 -0
- package/dist/translations/fr.d.ts +8 -0
- package/dist/translations/fr.js +23 -0
- package/dist/translations/he.d.ts +8 -0
- package/dist/translations/he.js +23 -0
- package/dist/translations/hi.d.ts +8 -0
- package/dist/translations/hi.js +23 -0
- package/dist/translations/hr.d.ts +8 -0
- package/dist/translations/hr.js +23 -0
- package/dist/translations/hu.d.ts +8 -0
- package/dist/translations/hu.js +23 -0
- package/dist/translations/id.d.ts +8 -0
- package/dist/translations/id.js +23 -0
- package/dist/translations/it.d.ts +8 -0
- package/dist/translations/it.js +23 -0
- package/dist/translations/ja.d.ts +8 -0
- package/dist/translations/ja.js +23 -0
- package/dist/translations/ko.d.ts +8 -0
- package/dist/translations/ko.js +23 -0
- package/dist/translations/lt.d.ts +8 -0
- package/dist/translations/lt.js +23 -0
- package/dist/translations/lv.d.ts +8 -0
- package/dist/translations/lv.js +23 -0
- package/dist/translations/ms.d.ts +8 -0
- package/dist/translations/ms.js +23 -0
- package/dist/translations/nl.d.ts +8 -0
- package/dist/translations/nl.js +23 -0
- package/dist/translations/no.d.ts +8 -0
- package/dist/translations/no.js +23 -0
- package/dist/translations/pl.d.ts +8 -0
- package/dist/translations/pl.js +23 -0
- package/dist/translations/pt-br.d.ts +8 -0
- package/dist/translations/pt-br.js +23 -0
- package/dist/translations/pt.d.ts +8 -0
- package/dist/translations/pt.js +23 -0
- package/dist/translations/ro.d.ts +8 -0
- package/dist/translations/ro.js +23 -0
- package/dist/translations/ru.d.ts +8 -0
- package/dist/translations/ru.js +23 -0
- package/dist/translations/sk.d.ts +8 -0
- package/dist/translations/sk.js +23 -0
- package/dist/translations/sr.d.ts +8 -0
- package/dist/translations/sr.js +23 -0
- package/dist/translations/sv.d.ts +8 -0
- package/dist/translations/sv.js +23 -0
- package/dist/translations/th.d.ts +8 -0
- package/dist/translations/th.js +23 -0
- package/dist/translations/tr.d.ts +8 -0
- package/dist/translations/tr.js +23 -0
- package/dist/translations/uk.d.ts +8 -0
- package/dist/translations/uk.js +23 -0
- package/dist/translations/vi.d.ts +8 -0
- package/dist/translations/vi.js +23 -0
- package/dist/translations/zh-cn.d.ts +8 -0
- package/dist/translations/zh-cn.js +23 -0
- package/dist/translations/zh.d.ts +8 -0
- package/dist/translations/zh.js +23 -0
- package/dist/types/augmentation.d.ts +22 -0
- package/dist/types/casechange.d.ts +122 -0
- package/dist/types/casechangecommand.d.ts +36 -0
- package/dist/types/casechangeediting.d.ts +34 -0
- package/dist/types/casechangeui.d.ts +29 -0
- package/dist/types/index.d.ts +16 -0
- package/package.json +4 -3
- package/src/casechange.js +1 -1
- package/src/casechangecommand.js +1 -1
- package/src/casechangeediting.js +1 -1
- package/src/casechangeui.js +1 -1
- package/src/index.js +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
import type { Translations } from 'ckeditor5';
|
|
7
|
+
declare const translations: Translations;
|
|
8
|
+
export default translations;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
export default{'uk':{'dictionary':{'Case\x20change':'Зміна\x20регістру','UPPERCASE':'ВЕЛИКІ\x20ЛІТЕРИ','lowercase':'малі\x20літери','Title\x20Case':'Регістр\x20назви','Change\x20text\x20case':'Змінити\x20регістр\x20тексту'},'getPluralForm':_0x3d8e21=>_0x3d8e21%0x1==0x0&&_0x3d8e21%0xa==0x1&&_0x3d8e21%0x64!=0xb?0x0:_0x3d8e21%0x1==0x0&&_0x3d8e21%0xa>=0x2&&_0x3d8e21%0xa<=0x4&&(_0x3d8e21%0x64<0xc||_0x3d8e21%0x64>0xe)?0x1:_0x3d8e21%0x1==0x0&&(_0x3d8e21%0xa==0x0||_0x3d8e21%0xa>=0x5&&_0x3d8e21%0xa<=0x9||_0x3d8e21%0x64>=0xb&&_0x3d8e21%0x64<=0xe)?0x2:0x3}};
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
import type { Translations } from 'ckeditor5';
|
|
7
|
+
declare const translations: Translations;
|
|
8
|
+
export default translations;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
export default{'vi':{'dictionary':{'Case\x20change':'Thay\x20đổi\x20chữ\x20hoa,\x20chữ\x20thường','UPPERCASE':'CHỮ\x20HOA','lowercase':'chữ\x20thường','Title\x20Case':'Viết\x20Hoa\x20Đầu\x20Mỗi\x20Từ','Change\x20text\x20case':'Thay\x20đổi\x20chữ\x20hoa/thường'},'getPluralForm':_0x5a938b=>0x0}};
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
import type { Translations } from 'ckeditor5';
|
|
7
|
+
declare const translations: Translations;
|
|
8
|
+
export default translations;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
export default{'zh-cn':{'dictionary':{'Case\x20change':'改变大小写','UPPERCASE':'大写','lowercase':'小写','Title\x20Case':'标题大小写','Change\x20text\x20case':'更改文本大小写'},'getPluralForm':_0x33ed41=>0x0}};
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
import type { Translations } from 'ckeditor5';
|
|
7
|
+
declare const translations: Translations;
|
|
8
|
+
export default translations;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
export default{'zh':{'dictionary':{'Case\x20change':'變更大小寫','UPPERCASE':'大寫','lowercase':'小寫','Title\x20Case':'標題大小寫','Change\x20text\x20case':'更改文字大小寫'},'getPluralForm':_0x517a4d=>0x0}};
|
|
@@ -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
|
+
import type { CaseChange, CaseChangeEditing, CaseChangeUI, CaseChangeCommand, CaseChangeConfig } from './index.js';
|
|
10
|
+
declare module '@ckeditor/ckeditor5-core' {
|
|
11
|
+
interface EditorConfig {
|
|
12
|
+
caseChange?: CaseChangeConfig;
|
|
13
|
+
}
|
|
14
|
+
interface PluginsMap {
|
|
15
|
+
[CaseChange.pluginName]: CaseChange;
|
|
16
|
+
[CaseChangeEditing.pluginName]: CaseChangeEditing;
|
|
17
|
+
[CaseChangeUI.pluginName]: CaseChangeUI;
|
|
18
|
+
}
|
|
19
|
+
interface CommandsMap {
|
|
20
|
+
caseChange: CaseChangeCommand;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
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 case-change/casechange
|
|
11
|
+
* @publicApi
|
|
12
|
+
*/
|
|
13
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
14
|
+
import CaseChangeEditing from './casechangeediting.js';
|
|
15
|
+
import CaseChangeUI from './casechangeui.js';
|
|
16
|
+
/**
|
|
17
|
+
* The case change feature.
|
|
18
|
+
*
|
|
19
|
+
* For a detailed overview, check the {@glink features/case-change Case change} feature guide.
|
|
20
|
+
*/
|
|
21
|
+
export default class CaseChange extends Plugin {
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
static get requires(): readonly [typeof CaseChangeEditing, typeof CaseChangeUI];
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
static get pluginName(): "CaseChange";
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The configuration of the {@link module:case-change/casechange~CaseChange case change feature}.
|
|
33
|
+
*
|
|
34
|
+
* ```ts
|
|
35
|
+
* ClassicEditor
|
|
36
|
+
* .create( editorElement, {
|
|
37
|
+
* caseChange: ... // Case change feature configuration.
|
|
38
|
+
* } )
|
|
39
|
+
* .then( /* ... *\/ )
|
|
40
|
+
* .catch( /* ... *\/ );
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
44
|
+
*/
|
|
45
|
+
export interface CaseChangeConfig {
|
|
46
|
+
/**
|
|
47
|
+
* Title case configuration.
|
|
48
|
+
*/
|
|
49
|
+
titleCase?: CaseChangeTitleCaseConfig;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Title case configuration.
|
|
53
|
+
* It allows setting words that should not be capitalized when formatted as title case.
|
|
54
|
+
*
|
|
55
|
+
* ```ts
|
|
56
|
+
* ClassicEditor
|
|
57
|
+
* .create( editorElement, {
|
|
58
|
+
* caseChange: {
|
|
59
|
+
* titleCase {
|
|
60
|
+
* excludeWords: [ 'a', 'an', 'the' ]
|
|
61
|
+
* }
|
|
62
|
+
* }
|
|
63
|
+
* } )
|
|
64
|
+
* .then( /* ... *\/ )
|
|
65
|
+
* .catch( /* ... *\/ );
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* ```ts
|
|
69
|
+
* ClassicEditor
|
|
70
|
+
* .create( editorElement, {
|
|
71
|
+
* caseChange: {
|
|
72
|
+
* titleCase {
|
|
73
|
+
* excludeWords: ( word ) => [ 'a', 'an', 'the' ].includes( word )
|
|
74
|
+
* }
|
|
75
|
+
* }
|
|
76
|
+
* } )
|
|
77
|
+
* .then( /* ... *\/ )
|
|
78
|
+
* .catch( /* ... *\/ );
|
|
79
|
+
* ```
|
|
80
|
+
*
|
|
81
|
+
* ```ts
|
|
82
|
+
* ClassicEditor
|
|
83
|
+
* .create( editorElement, {
|
|
84
|
+
* caseChange: {
|
|
85
|
+
* titleCase {
|
|
86
|
+
* excludeWords: ( word, { wordIndex } ) => wordIndex > 0 && [ 'a', 'an', 'the' ].includes( word )
|
|
87
|
+
* }
|
|
88
|
+
* }
|
|
89
|
+
* } )
|
|
90
|
+
* .then( /* ... *\/ )
|
|
91
|
+
* .catch( /* ... *\/ );
|
|
92
|
+
* ```
|
|
93
|
+
*
|
|
94
|
+
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
95
|
+
*/
|
|
96
|
+
export interface CaseChangeTitleCaseConfig {
|
|
97
|
+
/**
|
|
98
|
+
* Words which should not be capitalized.
|
|
99
|
+
*/
|
|
100
|
+
excludeWords?: Array<string> | ExcludeWordsCallback;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* The exclude word callback.
|
|
104
|
+
*/
|
|
105
|
+
export type ExcludeWordsCallback = (word: string, context: ExcludeWordsCallbackContext) => boolean;
|
|
106
|
+
/**
|
|
107
|
+
* The exclude word callback context.
|
|
108
|
+
*/
|
|
109
|
+
export interface ExcludeWordsCallbackContext {
|
|
110
|
+
/**
|
|
111
|
+
* The offset in the text where the given word starts.
|
|
112
|
+
*/
|
|
113
|
+
charOffset: number;
|
|
114
|
+
/**
|
|
115
|
+
* The word index in the given text.
|
|
116
|
+
*/
|
|
117
|
+
wordIndex: number;
|
|
118
|
+
/**
|
|
119
|
+
* The block text.
|
|
120
|
+
*/
|
|
121
|
+
blockText: string;
|
|
122
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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 case-change/casechangecommand
|
|
11
|
+
* @publicApi
|
|
12
|
+
*/
|
|
13
|
+
import { Command, type Editor } from 'ckeditor5/src/core.js';
|
|
14
|
+
/**
|
|
15
|
+
* This command changes the case of the selected text.
|
|
16
|
+
*/
|
|
17
|
+
export default class CaseChangeCommand extends Command {
|
|
18
|
+
/**
|
|
19
|
+
* Creates a new `CaseChangeCommand` instance.
|
|
20
|
+
*
|
|
21
|
+
* @param editor The editor on which this command will be used.
|
|
22
|
+
*/
|
|
23
|
+
constructor(editor: Editor, transformCallback: TransformCallback);
|
|
24
|
+
/**
|
|
25
|
+
* Transforms the selected text with the defined case change callback.
|
|
26
|
+
*
|
|
27
|
+
* @fires execute
|
|
28
|
+
*/
|
|
29
|
+
execute(): void;
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
refresh(): void;
|
|
34
|
+
}
|
|
35
|
+
type TransformCallback = (arg: string) => string;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
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 case-change/casechangeediting
|
|
11
|
+
*/
|
|
12
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
13
|
+
/**
|
|
14
|
+
* The case change editing feature. It introduces three commands: `changeCaseUpper`, `changeCaseLower`, and `changeCaseTitle`.
|
|
15
|
+
*/
|
|
16
|
+
export default class CaseChangeEditing extends Plugin {
|
|
17
|
+
licenseKey: string;
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
static get pluginName(): "CaseChangeEditing";
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
constructor(editor: Editor);
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
init(): void;
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
destroy(): void;
|
|
34
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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 case-change/casechangeui
|
|
11
|
+
*/
|
|
12
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
13
|
+
/**
|
|
14
|
+
* The case change UI plugin.
|
|
15
|
+
*/
|
|
16
|
+
export default class CaseChangeUI extends Plugin {
|
|
17
|
+
/**
|
|
18
|
+
* @inheritDoc
|
|
19
|
+
*/
|
|
20
|
+
static get pluginName(): "CaseChangeUI";
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
init(): void;
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
afterInit(): void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
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 case-change
|
|
11
|
+
*/
|
|
12
|
+
export { default as CaseChange, type CaseChangeConfig } from './casechange.js';
|
|
13
|
+
export { default as CaseChangeEditing } from './casechangeediting.js';
|
|
14
|
+
export { default as CaseChangeUI } from './casechangeui.js';
|
|
15
|
+
export { default as CaseChangeCommand } from './casechangecommand.js';
|
|
16
|
+
import './augmentation.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-case-change",
|
|
3
|
-
"version": "41.2
|
|
3
|
+
"version": "41.3.0-alpha.2",
|
|
4
4
|
"description": "Case change feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -27,14 +27,15 @@
|
|
|
27
27
|
"type": "module",
|
|
28
28
|
"main": "src/index.js",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"ckeditor5": "41.2
|
|
31
|
-
"ckeditor5-collaboration": "41.2
|
|
30
|
+
"ckeditor5": "41.3.0-alpha.2",
|
|
31
|
+
"ckeditor5-collaboration": "41.3.0-alpha.2"
|
|
32
32
|
},
|
|
33
33
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
34
34
|
"author": "CKSource (http://cksource.com/)",
|
|
35
35
|
"homepage": "https://ckeditor.com/ckeditor-5",
|
|
36
36
|
"bugs": "https://support.ckeditor.com/hc/en-us/requests/new",
|
|
37
37
|
"files": [
|
|
38
|
+
"dist",
|
|
38
39
|
"lang",
|
|
39
40
|
"src/**/*.js",
|
|
40
41
|
"src/**/*.d.ts",
|
package/src/casechange.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
function _0x16c1(_0x1c04c2,_0x4d3405){var _0x6b5293=_0x6b52();return _0x16c1=function(_0x16c184,_0x369fe5){_0x16c184=_0x16c184-0x1d7;var _0x5a906b=_0x6b5293[_0x16c184];return _0x5a906b;},_0x16c1(_0x1c04c2,_0x4d3405);}var _0x2ed0ee=_0x16c1;(function(_0x56fc8b,_0xfce265){var _0x1fa15b=_0x16c1,_0x2ec0e6=_0x56fc8b();while(!![]){try{var _0x1d4b1d=-parseInt(_0x1fa15b(0x1e0))/0x1*(parseInt(_0x1fa15b(0x1da))/0x2)+-parseInt(_0x1fa15b(0x1e4))/0x3*(-parseInt(_0x1fa15b(0x1e1))/0x4)+-parseInt(_0x1fa15b(0x1df))/0x5+-parseInt(_0x1fa15b(0x1db))/0x6*(-parseInt(_0x1fa15b(0x1e2))/0x7)+-parseInt(_0x1fa15b(0x1d7))/0x8*(parseInt(_0x1fa15b(0x1de))/0x9)+-parseInt(_0x1fa15b(0x1e3))/0xa+parseInt(_0x1fa15b(0x1d9))/0xb;if(_0x1d4b1d===_0xfce265)break;else _0x2ec0e6['push'](_0x2ec0e6['shift']());}catch(_0x585dcf){_0x2ec0e6['push'](_0x2ec0e6['shift']());}}}(_0x6b52,0x39ab6));import{Plugin as _0x1ee1d6}from'ckeditor5/src/core.js';function _0x6b52(){var _0x16d322=['4602530WzVUpU','30579duAqth','48oJUFlQ','requires','12334113IHKAjA','2CWFYLp','9732WlMFZV','pluginName','CaseChange','670734xEhmYR','1089820gJbbNs','61149ShWnCb','12uomIeX','1169CwQpfU'];_0x6b52=function(){return _0x16d322;};return _0x6b52();}import _0x5dc159 from'./casechangeediting.js';import _0x3e370b from'./casechangeui.js';export default class a extends _0x1ee1d6{static get[_0x2ed0ee(0x1d8)](){return[_0x5dc159,_0x3e370b];}static get[_0x2ed0ee(0x1dc)](){var _0x3afc82=_0x2ed0ee;return _0x3afc82(0x1dd);}}
|
package/src/casechangecommand.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
function _0x498a(_0x1fb651,_0xa6cefa){const _0x2f1f2c=_0x2f1f();return _0x498a=function(_0x498ac6,_0x5ad118){_0x498ac6=_0x498ac6-0x1ce;let _0x2c26ad=_0x2f1f2c[_0x498ac6];return _0x2c26ad;},_0x498a(_0x1fb651,_0xa6cefa);}const _0x39c607=_0x498a;(function(_0x506a3b,_0x5c095e){const _0x4c8b0a=_0x498a,_0x534d0f=_0x506a3b();while(!![]){try{const _0x57fe5c=-parseInt(_0x4c8b0a(0x1fb))/0x1+-parseInt(_0x4c8b0a(0x1ea))/0x2+-parseInt(_0x4c8b0a(0x1ce))/0x3+-parseInt(_0x4c8b0a(0x1e0))/0x4+parseInt(_0x4c8b0a(0x1de))/0x5*(parseInt(_0x4c8b0a(0x1d2))/0x6)+-parseInt(_0x4c8b0a(0x1d4))/0x7+parseInt(_0x4c8b0a(0x1f0))/0x8;if(_0x57fe5c===_0x5c095e)break;else _0x534d0f['push'](_0x534d0f['shift']());}catch(_0x475ced){_0x534d0f['push'](_0x534d0f['shift']());}}}(_0x2f1f,0x9f4d3));import{Command as _0x16f1d5}from'ckeditor5/src/core.js';function _0x2f1f(){const _0x6ed732=['46390pFJcWh','add','3423648UfXhCG','parent','execute','from','insertContent','reduce','createRangeIn','$text','element','model','1215266RNRKnd','isEnabled','endOffset','getWalker','getAttributes','item','31787296jmgUrN','_getElementTextContent','_replaceTextNodeData','_transformCallback','_getAffectedRanges','document','change','_getElementsAllowingText','createSelection','refresh','getFirstPosition','1086048oboqCE','getChildren','isLimit','_modifyContent','getRanges','substring','_findAncestorTextBlock','isCollapsed','selection','1144407LNxknW','startOffset','_getTextNodesRangeLimited','data','228kAiGit','editor','5196905TaaATi','has','getItems','getIntersection','$textProxy','createRangeOn','setSelection','schema','checkChild','createText'];_0x2f1f=function(){return _0x6ed732;};return _0x2f1f();}export default class n extends _0x16f1d5{constructor(_0x4a1bb8,_0x2a6436){const _0x3382a0=_0x498a;super(_0x4a1bb8),this[_0x3382a0(0x1f3)]=_0x2a6436;}[_0x39c607(0x1e2)](){const _0x2d4eac=_0x39c607,_0x4601a1=this[_0x2d4eac(0x1d3)][_0x2d4eac(0x1e9)],_0x226e31=Array[_0x2d4eac(0x1e3)](this[_0x2d4eac(0x1f4)]()),_0x3412ff=Array[_0x2d4eac(0x1e3)](_0x4601a1[_0x2d4eac(0x1f5)][_0x2d4eac(0x203)][_0x2d4eac(0x1ff)]());_0x4601a1[_0x2d4eac(0x1f6)](_0xea2ee5=>{const _0x2dab99=_0x2d4eac;for(const _0x28b217 of _0x226e31)this[_0x2dab99(0x1fe)](_0x28b217,_0xea2ee5);_0xea2ee5[_0x2dab99(0x1da)](_0x3412ff);});}[_0x39c607(0x1f9)](){const _0x2b6b50=_0x39c607;for(const _0xb06d05 of this[_0x2b6b50(0x1f4)]())for(const _0x559bc5 of _0xb06d05)if(_0x559bc5[_0x2b6b50(0x1ef)]['is'](_0x2b6b50(0x1d8)))return void(this[_0x2b6b50(0x1eb)]=!0x0);this[_0x2b6b50(0x1eb)]=!0x1;}[_0x39c607(0x1f4)](){const _0x2e79a2=_0x39c607,_0x497812=this[_0x2e79a2(0x1d3)][_0x2e79a2(0x1e9)],_0x45c48c=_0x497812[_0x2e79a2(0x1f5)][_0x2e79a2(0x203)];if(_0x45c48c[_0x2e79a2(0x202)]){const _0x252b7d=this[_0x2e79a2(0x201)](_0x45c48c[_0x2e79a2(0x1fa)]()[_0x2e79a2(0x1e1)]);return _0x252b7d?[_0x497812[_0x2e79a2(0x1e6)](_0x252b7d)]:[];}return _0x45c48c[_0x2e79a2(0x1ff)]();}[_0x39c607(0x1fe)](_0x963f20,_0x19efa1){const _0x220899=_0x39c607;for(const _0x4008b1 of this[_0x220899(0x1f7)](_0x963f20)){const _0x30c1a9=this[_0x220899(0x1f1)](_0x4008b1),_0x535816=this[_0x220899(0x1f3)](_0x30c1a9);for(const _0x99c319 of this[_0x220899(0x1d0)](_0x4008b1,_0x963f20))this[_0x220899(0x1f2)](_0x99c319,_0x535816,_0x19efa1);}}[_0x39c607(0x201)](_0x2cf249){const _0x54ac0f=_0x39c607,_0x340e43=this[_0x54ac0f(0x1d3)][_0x54ac0f(0x1e9)][_0x54ac0f(0x1db)];if(_0x2cf249['is'](_0x54ac0f(0x1e8))&&_0x340e43[_0x54ac0f(0x1dc)](_0x2cf249,_0x54ac0f(0x1e7)))return _0x2cf249;const _0xcb87c7=_0x2cf249[_0x54ac0f(0x1e1)];return!_0xcb87c7||_0x340e43[_0x54ac0f(0x1fd)](_0x2cf249)?null:this[_0x54ac0f(0x201)](_0xcb87c7);}*[_0x39c607(0x1f7)](_0x28e618){const _0x113b2c=_0x39c607,_0x4ce6b6=new Set();for(const {item:_0x31b600}of _0x28e618[_0x113b2c(0x1ed)]()){const _0x4cef43=this[_0x113b2c(0x201)](_0x31b600);_0x4cef43&&!_0x4ce6b6[_0x113b2c(0x1d5)](_0x4cef43)&&(_0x4ce6b6[_0x113b2c(0x1df)](_0x4cef43),yield _0x4cef43);}}[_0x39c607(0x1f1)](_0x247d41){const _0x1fa0b4=_0x39c607;return Array[_0x1fa0b4(0x1e3)](_0x247d41[_0x1fa0b4(0x1fc)]())[_0x1fa0b4(0x1e5)]((_0x46c984,_0x1224a5)=>_0x46c984+(_0x1224a5['is'](_0x1fa0b4(0x1e7))?_0x1224a5[_0x1fa0b4(0x1d1)]:'\x20'),'');}*[_0x39c607(0x1d0)](_0xc80c89,_0x1c3b3b){const _0x1e8cf8=_0x39c607,_0x401921=_0x1c3b3b[_0x1e8cf8(0x1d7)](this[_0x1e8cf8(0x1d3)][_0x1e8cf8(0x1e9)][_0x1e8cf8(0x1e6)](_0xc80c89));if(_0x401921){for(const _0x2d9bac of _0x401921[_0x1e8cf8(0x1d6)]())_0x2d9bac['is'](_0x1e8cf8(0x1d8))&&_0x2d9bac[_0x1e8cf8(0x1e1)]==_0xc80c89&&(yield _0x2d9bac);}}[_0x39c607(0x1f2)](_0x102b3a,_0x570bd0,_0x2471d9){const _0x50d528=_0x39c607,_0x260ff2=_0x570bd0[_0x50d528(0x200)](_0x102b3a[_0x50d528(0x1cf)],_0x102b3a[_0x50d528(0x1ec)]);if(_0x260ff2===_0x102b3a[_0x50d528(0x1d1)])return;const _0x208579=_0x102b3a[_0x50d528(0x1ee)]();this[_0x50d528(0x1d3)][_0x50d528(0x1e9)][_0x50d528(0x1e4)](_0x2471d9[_0x50d528(0x1dd)](_0x260ff2,_0x208579),_0x2471d9[_0x50d528(0x1f8)](_0x2471d9[_0x50d528(0x1d9)](_0x102b3a)));}}
|
package/src/casechangeediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x2d96c7}from'ckeditor5/src/core.js';import{CKEditorError as _0x55df9b}from'ckeditor5/src/utils.js';import _0xa609c3 from'./casechangecommand.js';export default class r extends _0x2d96c7{static get['pluginName'](){return'CaseChangeEditing';}constructor(_0x40e548){super(_0x40e548),this['_currentCommandIndex']=0x0,this['_licenseKeyCheckInterval']=null;}['init'](){const _0x42db51=this['editor'],_0x2e975d=_0x42db51['locale']['contentLanguage'],_0x1f9cad=function(_0xa600bd=[]){return'function'==typeof _0xa600bd?_0xa600bd:(_0x3d17b3,{wordIndex:_0x4064a5})=>_0x4064a5>0x0&&_0xa600bd['includes'](_0x3d17b3);}(_0x42db51['config']['get']('caseChange.titleCase.excludeWords'));_0x42db51['commands']['add']('changeCaseUpper',new _0xa609c3(_0x42db51,_0x4675fd=>_0x4675fd['toLocaleUpperCase'](_0x2e975d))),_0x42db51['commands']['add']('changeCaseLower',new _0xa609c3(_0x42db51,_0x17eb24=>_0x17eb24['toLocaleLowerCase'](_0x2e975d))),_0x42db51['commands']['add']('changeCaseTitle',new _0xa609c3(_0x42db51,_0x421818=>function(_0xc9ea77,_0x7959f2,_0x28a1bc){return function(_0x37b2e2,_0xbee037){let _0x130ad9='',_0x347926=0x0,_0x5e4173=0x0;for(const _0x16525b of _0x37b2e2['matchAll'](/ +/g)){const _0x46cb23=_0x16525b['index'],_0x59dc29=_0x37b2e2['substring'](_0x347926,_0x46cb23);_0x59dc29['length']&&(_0x130ad9+=_0xbee037(_0x59dc29,_0x347926,_0x5e4173++)),_0x130ad9+=_0x16525b[0x0],_0x347926=_0x46cb23+_0x16525b[0x0]['length'];}const _0x2e3bb2=_0x37b2e2['substring'](_0x347926);return _0x2e3bb2['length']&&(_0x130ad9+=_0xbee037(_0x2e3bb2,_0x347926,_0x5e4173)),_0x130ad9;}(_0xc9ea77,(_0x3ff8c0,_0x25f65f,_0x119bf4)=>{const _0x56908d=_0x3ff8c0['toLocaleLowerCase'](_0x28a1bc);return _0x7959f2(_0x56908d,{'charOffset':_0x25f65f,'wordIndex':_0x119bf4,'blockText':_0xc9ea77})?_0x56908d:_0x56908d['replace'](/(?:^|[^\p{L}\d'])\p{L}/gu,_0x1a1f6f=>_0x1a1f6f['toLocaleUpperCase'](_0x28a1bc));});}(_0x421818,_0x1f9cad,_0x2e975d))),this['listenTo'](_0x42db51['editing']['view']['document'],'selectionChange',()=>{this['_currentCommandIndex']=0x0;}),_0x42db51['keystrokes']['set']('shift+f3',(_0x6be722,_0x10c0a8)=>{const _0x1ee4e5=_getOptions(this['editor']['t']),_0x51c392=_0x1ee4e5[this['_currentCommandIndex']%_0x1ee4e5['length']]['commandName'];_0x42db51['execute'](_0x51c392),this['_currentCommandIndex']++,_0x10c0a8();}),this['licenseKey']=_0x42db51['config']['get']('licenseKey');const _0xbf7aac=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2d48fc;for(const _0x477239 in _0xbf7aac){const _0x907d3a=_0x477239,_0x56e1ea=_0xbf7aac[_0x907d3a];if('caseChangeLicenseKeyTrial'===_0x56e1ea||'caseChangeLicenseKeyInvalid'===_0x56e1ea||'caseChangeLicenseKeyValid'===_0x56e1ea||'caseChangeLicenseKeyTrialLimit:operations'===_0x56e1ea){delete _0xbf7aac[_0x907d3a],_0x2d48fc=_0x56e1ea;break;}}if('caseChangeLicenseKeyInvalid'===_0x2d48fc)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x55df9b('case-change-invalid-license-key',null);if('caseChangeLicenseKeyTrial'===_0x2d48fc&&console['info']('You\x20are\x20using\x20the\x20trial\x20version\x20of\x20CKEditor\x205\x20case\x20change\x20plugin\x20with\x20limited\x20usage.\x20Make\x20sure\x20you\x20will\x20not\x20use\x20it\x20in\x20the\x20production\x20environment.'),'caseChangeLicenseKeyTrialLimit:operations'===_0x2d48fc)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x55df9b('case-change-trial-license-key-reached-limit-changes',null);'caseChangeLicenseKeyValid'===_0x2d48fc&&clearInterval(this['_licenseKeyCheckInterval']);},0x3e8);}['destroy'](){this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}export function _getOptions(t){return[{'label':t('UPPERCASE'),'commandName':'changeCaseUpper'},{'label':t('lowercase'),'commandName':'changeCaseLower'},{'label':t('Title\x20Case'),'commandName':'changeCaseTitle'}];}
|