@ckeditor/ckeditor5-language 37.0.0-alpha.0 → 37.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-language",
3
- "version": "37.0.0-alpha.0",
3
+ "version": "37.0.0-alpha.2",
4
4
  "description": "Text part language feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -12,16 +12,16 @@
12
12
  ],
13
13
  "main": "src/index.js",
14
14
  "dependencies": {
15
- "ckeditor5": "^37.0.0-alpha.0"
15
+ "ckeditor5": "^37.0.0-alpha.2"
16
16
  },
17
17
  "devDependencies": {
18
- "@ckeditor/ckeditor5-core": "^37.0.0-alpha.0",
19
- "@ckeditor/ckeditor5-dev-utils": "^34.0.0",
20
- "@ckeditor/ckeditor5-editor-classic": "^37.0.0-alpha.0",
21
- "@ckeditor/ckeditor5-engine": "^37.0.0-alpha.0",
22
- "@ckeditor/ckeditor5-paragraph": "^37.0.0-alpha.0",
23
- "@ckeditor/ckeditor5-theme-lark": "^37.0.0-alpha.0",
24
- "@ckeditor/ckeditor5-ui": "^37.0.0-alpha.0",
18
+ "@ckeditor/ckeditor5-core": "^37.0.0-alpha.2",
19
+ "@ckeditor/ckeditor5-dev-utils": "^35.0.0",
20
+ "@ckeditor/ckeditor5-editor-classic": "^37.0.0-alpha.2",
21
+ "@ckeditor/ckeditor5-engine": "^37.0.0-alpha.2",
22
+ "@ckeditor/ckeditor5-paragraph": "^37.0.0-alpha.2",
23
+ "@ckeditor/ckeditor5-theme-lark": "^37.0.0-alpha.2",
24
+ "@ckeditor/ckeditor5-ui": "^37.0.0-alpha.2",
25
25
  "typescript": "^4.8.4",
26
26
  "webpack": "^5.58.1",
27
27
  "webpack-cli": "^4.9.0"
@@ -50,7 +50,7 @@
50
50
  ],
51
51
  "scripts": {
52
52
  "dll:build": "webpack",
53
- "build": "tsc -p ./tsconfig.release.json",
53
+ "build": "tsc -p ./tsconfig.json",
54
54
  "postversion": "npm run build"
55
55
  },
56
56
  "types": "src/index.d.ts"
@@ -0,0 +1,46 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, 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
+ import type { TextPartLanguageOption, TextPartLanguage, TextPartLanguageUI, TextPartLanguageCommand } from './index';
6
+ declare module '@ckeditor/ckeditor5-core' {
7
+ interface LanguageConfig {
8
+ /**
9
+ * The available {@link module:language/textpartlanguage~TextPartLanguage}
10
+ * options that allow setting the language of parts of the content.
11
+ *
12
+ * This configuration option is available only with the {@glink api/language text part language feature} enabled.
13
+ *
14
+ * Refer to the [WCAG 3.1.2 Language of Parts](https://www.w3.org/TR/UNDERSTANDING-WCAG20/meaning-other-lang-id.html) specification
15
+ * to learn more.
16
+ *
17
+ * To change the editor's UI language, refer to the {@glink features/ui-language Setting the UI language} guide.
18
+ *
19
+ * The default value is:
20
+ *
21
+ * ```ts
22
+ * const config = [
23
+ * { title: 'Arabic', languageCode: 'ar' },
24
+ * { title: 'French', languageCode: 'fr' },
25
+ * { title: 'Spanish', languageCode: 'es' }
26
+ * ];
27
+ * ```
28
+ *
29
+ * The `title` property will be used by the text part language dropdown to render available options.
30
+ *
31
+ * The `languageCode` property is used for the `lang` attribute in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format.
32
+ *
33
+ * You can also specify the optional `textDirection` property indicating the reading direction of the language.
34
+ * Correct values are `ltr` and `rtl`. When the `textDirection` property is missing, the text part language feature will
35
+ * specify the text direction by itself.
36
+ */
37
+ textPartLanguage?: Array<TextPartLanguageOption>;
38
+ }
39
+ interface PluginsMap {
40
+ [TextPartLanguage.pluginName]: TextPartLanguage;
41
+ [TextPartLanguageUI.pluginName]: TextPartLanguageUI;
42
+ }
43
+ interface CommandsMap {
44
+ textPartLanguage: TextPartLanguageCommand;
45
+ }
46
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, 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
+ export {};
package/src/index.d.ts CHANGED
@@ -8,3 +8,6 @@
8
8
  export { default as TextPartLanguage } from './textpartlanguage';
9
9
  export { default as TextPartLanguageEditing } from './textpartlanguageediting';
10
10
  export { default as TextPartLanguageUI } from './textpartlanguageui';
11
+ export type { TextPartLanguageOption } from './textpartlanguageconfig';
12
+ export type { default as TextPartLanguageCommand } from './textpartlanguagecommand';
13
+ import './augmentation';
package/src/index.js CHANGED
@@ -8,3 +8,4 @@
8
8
  export { default as TextPartLanguage } from './textpartlanguage';
9
9
  export { default as TextPartLanguageEditing } from './textpartlanguageediting';
10
10
  export { default as TextPartLanguageUI } from './textpartlanguageui';
11
+ import './augmentation';
@@ -31,8 +31,3 @@ export default class TextPartLanguage extends Plugin {
31
31
  */
32
32
  static get pluginName(): 'TextPartLanguage';
33
33
  }
34
- declare module '@ckeditor/ckeditor5-core' {
35
- interface PluginsMap {
36
- [TextPartLanguage.pluginName]: TextPartLanguage;
37
- }
38
- }
@@ -68,8 +68,3 @@ export default class TextPartLanguageCommand extends Command {
68
68
  */
69
69
  private _getValueFromFirstAllowedNode;
70
70
  }
71
- declare module '@ckeditor/ckeditor5-core' {
72
- interface CommandsMap {
73
- textPartLanguage: TextPartLanguageCommand;
74
- }
75
- }
@@ -23,37 +23,3 @@ export interface TextPartLanguageOption {
23
23
  */
24
24
  textDirection?: LanguageDirection;
25
25
  }
26
- declare module '@ckeditor/ckeditor5-core' {
27
- interface LanguageConfig {
28
- /**
29
- * The available {@link module:language/textpartlanguage~TextPartLanguage}
30
- * options that allow setting the language of parts of the content.
31
- *
32
- * This configuration option is available only with the {@glink api/language text part language feature} enabled.
33
- *
34
- * Refer to the [WCAG 3.1.2 Language of Parts](https://www.w3.org/TR/UNDERSTANDING-WCAG20/meaning-other-lang-id.html) specification
35
- * to learn more.
36
- *
37
- * To change the editor's UI language, refer to the {@glink features/ui-language Setting the UI language} guide.
38
- *
39
- * The default value is:
40
- *
41
- * ```ts
42
- * const config = [
43
- * { title: 'Arabic', languageCode: 'ar' },
44
- * { title: 'French', languageCode: 'fr' },
45
- * { title: 'Spanish', languageCode: 'es' }
46
- * ];
47
- * ```
48
- *
49
- * The `title` property will be used by the text part language dropdown to render available options.
50
- *
51
- * The `languageCode` property is used for the `lang` attribute in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format.
52
- *
53
- * You can also specify the optional `textDirection` property indicating the reading direction of the language.
54
- * Correct values are `ltr` and `rtl`. When the `textDirection` property is missing, the text part language feature will
55
- * specify the text direction by itself.
56
- */
57
- textPartLanguage?: Array<TextPartLanguageOption>;
58
- }
59
- }
@@ -3,7 +3,6 @@
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  import { Plugin, type Editor } from 'ckeditor5/src/core';
6
- import './textpartlanguageconfig';
7
6
  /**
8
7
  * The text part language editing.
9
8
  *
@@ -5,7 +5,6 @@
5
5
  import { Plugin } from 'ckeditor5/src/core';
6
6
  import TextPartLanguageCommand from './textpartlanguagecommand';
7
7
  import { stringifyLanguageAttribute, parseLanguageAttribute } from './utils';
8
- import './textpartlanguageconfig';
9
8
  /**
10
9
  * The text part language editing.
11
10
  *
@@ -6,7 +6,6 @@
6
6
  * @module language/textpartlanguageui
7
7
  */
8
8
  import { Plugin } from 'ckeditor5/src/core';
9
- import './textpartlanguageconfig';
10
9
  import '../theme/language.css';
11
10
  /**
12
11
  * The text part language UI plugin.
@@ -23,8 +22,3 @@ export default class TextPartLanguageUI extends Plugin {
23
22
  */
24
23
  init(): void;
25
24
  }
26
- declare module '@ckeditor/ckeditor5-core' {
27
- interface PluginsMap {
28
- [TextPartLanguageUI.pluginName]: TextPartLanguageUI;
29
- }
30
- }
@@ -9,7 +9,6 @@ import { Plugin } from 'ckeditor5/src/core';
9
9
  import { Model, createDropdown, addListToDropdown } from 'ckeditor5/src/ui';
10
10
  import { Collection } from 'ckeditor5/src/utils';
11
11
  import { stringifyLanguageAttribute } from './utils';
12
- import './textpartlanguageconfig';
13
12
  import '../theme/language.css';
14
13
  /**
15
14
  * The text part language UI plugin.