@ckeditor/ckeditor5-block-quote 36.0.1 → 37.0.0-alpha.1

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-block-quote",
3
- "version": "36.0.1",
3
+ "version": "37.0.0-alpha.1",
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.1"
15
+ "ckeditor5": "^37.0.0-alpha.1"
16
16
  },
17
17
  "devDependencies": {
18
- "@ckeditor/ckeditor5-basic-styles": "^36.0.1",
19
- "@ckeditor/ckeditor5-core": "^36.0.1",
20
- "@ckeditor/ckeditor5-dev-utils": "^32.0.0",
21
- "@ckeditor/ckeditor5-editor-classic": "^36.0.1",
22
- "@ckeditor/ckeditor5-engine": "^36.0.1",
23
- "@ckeditor/ckeditor5-enter": "^36.0.1",
24
- "@ckeditor/ckeditor5-heading": "^36.0.1",
25
- "@ckeditor/ckeditor5-image": "^36.0.1",
26
- "@ckeditor/ckeditor5-list": "^36.0.1",
27
- "@ckeditor/ckeditor5-paragraph": "^36.0.1",
28
- "@ckeditor/ckeditor5-table": "^36.0.1",
29
- "@ckeditor/ckeditor5-theme-lark": "^36.0.1",
30
- "@ckeditor/ckeditor5-typing": "^36.0.1",
18
+ "@ckeditor/ckeditor5-basic-styles": "^37.0.0-alpha.1",
19
+ "@ckeditor/ckeditor5-core": "^37.0.0-alpha.1",
20
+ "@ckeditor/ckeditor5-dev-utils": "^35.0.0",
21
+ "@ckeditor/ckeditor5-editor-classic": "^37.0.0-alpha.1",
22
+ "@ckeditor/ckeditor5-engine": "^37.0.0-alpha.1",
23
+ "@ckeditor/ckeditor5-enter": "^37.0.0-alpha.1",
24
+ "@ckeditor/ckeditor5-heading": "^37.0.0-alpha.1",
25
+ "@ckeditor/ckeditor5-image": "^37.0.0-alpha.1",
26
+ "@ckeditor/ckeditor5-list": "^37.0.0-alpha.1",
27
+ "@ckeditor/ckeditor5-paragraph": "^37.0.0-alpha.1",
28
+ "@ckeditor/ckeditor5-table": "^37.0.0-alpha.1",
29
+ "@ckeditor/ckeditor5-theme-lark": "^37.0.0-alpha.1",
30
+ "@ckeditor/ckeditor5-typing": "^37.0.0-alpha.1",
31
31
  "typescript": "^4.8.4",
32
32
  "webpack": "^5.58.1",
33
33
  "webpack-cli": "^4.9.0"
@@ -56,7 +56,8 @@
56
56
  ],
57
57
  "scripts": {
58
58
  "dll:build": "webpack",
59
- "build": "tsc -p ./tsconfig.release.json",
59
+ "build": "tsc -p ./tsconfig.json",
60
60
  "postversion": "npm run build"
61
- }
61
+ },
62
+ "types": "src/index.d.ts"
62
63
  }
@@ -0,0 +1,15 @@
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 { BlockQuote, BlockQuoteCommand, BlockQuoteEditing, BlockQuoteUI } from './index';
6
+ declare module '@ckeditor/ckeditor5-core' {
7
+ interface PluginsMap {
8
+ [BlockQuote.pluginName]: BlockQuote;
9
+ [BlockQuoteEditing.pluginName]: BlockQuoteEditing;
10
+ [BlockQuoteUI.pluginName]: BlockQuoteUI;
11
+ }
12
+ interface CommandsMap {
13
+ blockQuote: BlockQuoteCommand;
14
+ }
15
+ }
@@ -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 {};
@@ -0,0 +1,28 @@
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
+ }
@@ -0,0 +1,61 @@
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
+ }
@@ -0,0 +1,29 @@
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
+ }
@@ -0,0 +1,26 @@
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
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,12 @@
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';
11
+ export type { default as BlockQuoteCommand } from './blockquotecommand';
12
+ import './augmentation';
package/src/index.js CHANGED
@@ -8,3 +8,4 @@
8
8
  export { default as BlockQuote } from './blockquote';
9
9
  export { default as BlockQuoteEditing } from './blockquoteediting';
10
10
  export { default as BlockQuoteUI } from './blockquoteui';
11
+ import './augmentation';