@ckeditor/ckeditor5-block-quote 36.0.0 → 37.0.0-alpha.0

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-block-quote",
3
- "version": "36.0.0",
3
+ "version": "37.0.0-alpha.0",
4
4
  "description": "Block quote feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -12,22 +12,22 @@
12
12
  ],
13
13
  "main": "src/index.js",
14
14
  "dependencies": {
15
- "ckeditor5": "^36.0.0"
15
+ "ckeditor5": "^37.0.0-alpha.0"
16
16
  },
17
17
  "devDependencies": {
18
- "@ckeditor/ckeditor5-basic-styles": "^36.0.0",
19
- "@ckeditor/ckeditor5-core": "^36.0.0",
20
- "@ckeditor/ckeditor5-dev-utils": "^32.0.0",
21
- "@ckeditor/ckeditor5-editor-classic": "^36.0.0",
22
- "@ckeditor/ckeditor5-engine": "^36.0.0",
23
- "@ckeditor/ckeditor5-enter": "^36.0.0",
24
- "@ckeditor/ckeditor5-heading": "^36.0.0",
25
- "@ckeditor/ckeditor5-image": "^36.0.0",
26
- "@ckeditor/ckeditor5-list": "^36.0.0",
27
- "@ckeditor/ckeditor5-paragraph": "^36.0.0",
28
- "@ckeditor/ckeditor5-table": "^36.0.0",
29
- "@ckeditor/ckeditor5-theme-lark": "^36.0.0",
30
- "@ckeditor/ckeditor5-typing": "^36.0.0",
18
+ "@ckeditor/ckeditor5-basic-styles": "^37.0.0-alpha.0",
19
+ "@ckeditor/ckeditor5-core": "^37.0.0-alpha.0",
20
+ "@ckeditor/ckeditor5-dev-utils": "^34.0.0",
21
+ "@ckeditor/ckeditor5-editor-classic": "^37.0.0-alpha.0",
22
+ "@ckeditor/ckeditor5-engine": "^37.0.0-alpha.0",
23
+ "@ckeditor/ckeditor5-enter": "^37.0.0-alpha.0",
24
+ "@ckeditor/ckeditor5-heading": "^37.0.0-alpha.0",
25
+ "@ckeditor/ckeditor5-image": "^37.0.0-alpha.0",
26
+ "@ckeditor/ckeditor5-list": "^37.0.0-alpha.0",
27
+ "@ckeditor/ckeditor5-paragraph": "^37.0.0-alpha.0",
28
+ "@ckeditor/ckeditor5-table": "^37.0.0-alpha.0",
29
+ "@ckeditor/ckeditor5-theme-lark": "^37.0.0-alpha.0",
30
+ "@ckeditor/ckeditor5-typing": "^37.0.0-alpha.0",
31
31
  "typescript": "^4.8.4",
32
32
  "webpack": "^5.58.1",
33
33
  "webpack-cli": "^4.9.0"
@@ -58,5 +58,6 @@
58
58
  "dll:build": "webpack",
59
59
  "build": "tsc -p ./tsconfig.release.json",
60
60
  "postversion": "npm run build"
61
- }
61
+ },
62
+ "types": "src/index.d.ts"
62
63
  }
@@ -0,0 +1,33 @@
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
+ /**
6
+ * @module block-quote/blockquote
7
+ */
8
+ import { Plugin, type PluginDependencies } from 'ckeditor5/src/core';
9
+ /**
10
+ * The block quote plugin.
11
+ *
12
+ * For more information about this feature check the {@glink api/block-quote package page}.
13
+ *
14
+ * This is a "glue" plugin which loads the {@link module:block-quote/blockquoteediting~BlockQuoteEditing block quote editing feature}
15
+ * and {@link module:block-quote/blockquoteui~BlockQuoteUI block quote UI feature}.
16
+ *
17
+ * @extends module:core/plugin~Plugin
18
+ */
19
+ export default class BlockQuote extends Plugin {
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ static get requires(): PluginDependencies;
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ static get pluginName(): 'BlockQuote';
28
+ }
29
+ declare module '@ckeditor/ckeditor5-core' {
30
+ interface PluginsMap {
31
+ [BlockQuote.pluginName]: BlockQuote;
32
+ }
33
+ }
@@ -0,0 +1,66 @@
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
+ /**
6
+ * @module block-quote/blockquotecommand
7
+ */
8
+ import { Command } from 'ckeditor5/src/core';
9
+ /**
10
+ * The block quote command plugin.
11
+ *
12
+ * @extends module:core/command~Command
13
+ */
14
+ export default class BlockQuoteCommand extends Command {
15
+ /**
16
+ * Whether the selection starts in a block quote.
17
+ *
18
+ * @observable
19
+ * @readonly
20
+ */
21
+ value: boolean;
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ refresh(): void;
26
+ /**
27
+ * Executes the command. When the command {@link #value is on}, all top-most block quotes within
28
+ * the selection will be removed. If it is off, all selected blocks will be wrapped with
29
+ * a block quote.
30
+ *
31
+ * @fires execute
32
+ * @param options Command options.
33
+ * @param options.forceValue If set, it will force the command behavior. If `true`, the command will apply a block quote,
34
+ * otherwise the command will remove the block quote. If not set, the command will act basing on its current value.
35
+ */
36
+ execute(options?: {
37
+ forceValue?: boolean;
38
+ }): void;
39
+ /**
40
+ * Checks the command's {@link #value}.
41
+ */
42
+ private _getValue;
43
+ /**
44
+ * Checks whether the command can be enabled in the current context.
45
+ *
46
+ * @returns Whether the command should be enabled.
47
+ */
48
+ private _checkEnabled;
49
+ /**
50
+ * Removes the quote from given blocks.
51
+ *
52
+ * If blocks which are supposed to be "unquoted" are in the middle of a quote,
53
+ * start it or end it, then the quote will be split (if needed) and the blocks
54
+ * will be moved out of it, so other quoted blocks remained quoted.
55
+ */
56
+ private _removeQuote;
57
+ /**
58
+ * Applies the quote to given blocks.
59
+ */
60
+ private _applyQuote;
61
+ }
62
+ declare module '@ckeditor/ckeditor5-core' {
63
+ interface CommandsMap {
64
+ blockQuote: BlockQuoteCommand;
65
+ }
66
+ }
@@ -0,0 +1,34 @@
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
+ /**
6
+ * @module block-quote/blockquoteediting
7
+ */
8
+ import { Plugin, type PluginDependencies } from 'ckeditor5/src/core';
9
+ /**
10
+ * The block quote editing.
11
+ *
12
+ * Introduces the `'blockQuote'` command and the `'blockQuote'` model element.
13
+ *
14
+ * @extends module:core/plugin~Plugin
15
+ */
16
+ export default class BlockQuoteEditing extends Plugin {
17
+ /**
18
+ * @inheritDoc
19
+ */
20
+ static get pluginName(): 'BlockQuoteEditing';
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ static get requires(): PluginDependencies;
25
+ /**
26
+ * @inheritDoc
27
+ */
28
+ init(): void;
29
+ }
30
+ declare module '@ckeditor/ckeditor5-core' {
31
+ interface PluginsMap {
32
+ [BlockQuoteEditing.pluginName]: BlockQuoteEditing;
33
+ }
34
+ }
@@ -0,0 +1,31 @@
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
+ /**
6
+ * @module block-quote/blockquoteui
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core';
9
+ import '../theme/blockquote.css';
10
+ /**
11
+ * The block quote UI plugin.
12
+ *
13
+ * It introduces the `'blockQuote'` button.
14
+ *
15
+ * @extends module:core/plugin~Plugin
16
+ */
17
+ export default class BlockQuoteUI extends Plugin {
18
+ /**
19
+ * @inheritDoc
20
+ */
21
+ static get pluginName(): 'BlockQuoteUI';
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ init(): void;
26
+ }
27
+ declare module '@ckeditor/ckeditor5-core' {
28
+ interface PluginsMap {
29
+ [BlockQuoteUI.pluginName]: BlockQuoteUI;
30
+ }
31
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,10 @@
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
+ /**
6
+ * @module block-quote
7
+ */
8
+ export { default as BlockQuote } from './blockquote';
9
+ export { default as BlockQuoteEditing } from './blockquoteediting';
10
+ export { default as BlockQuoteUI } from './blockquoteui';