@ckeditor/ckeditor5-link 40.0.0 → 40.2.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +29 -29
  2. package/LICENSE.md +3 -3
  3. package/build/link.js +1 -1
  4. package/build/translations/ug.js +1 -1
  5. package/lang/translations/ug.po +6 -6
  6. package/package.json +3 -3
  7. package/src/augmentation.d.ts +30 -30
  8. package/src/augmentation.js +5 -5
  9. package/src/autolink.d.ts +75 -60
  10. package/src/autolink.js +284 -216
  11. package/src/index.d.ts +18 -18
  12. package/src/index.js +17 -17
  13. package/src/link.d.ts +27 -27
  14. package/src/link.js +31 -31
  15. package/src/linkcommand.d.ts +132 -132
  16. package/src/linkcommand.js +285 -285
  17. package/src/linkconfig.d.ts +251 -251
  18. package/src/linkconfig.js +5 -5
  19. package/src/linkediting.d.ts +70 -106
  20. package/src/linkediting.js +278 -547
  21. package/src/linkimage.d.ts +27 -27
  22. package/src/linkimage.js +31 -31
  23. package/src/linkimageediting.d.ts +39 -39
  24. package/src/linkimageediting.js +245 -245
  25. package/src/linkimageui.d.ts +40 -40
  26. package/src/linkimageui.js +96 -96
  27. package/src/linkui.d.ts +165 -165
  28. package/src/linkui.js +581 -581
  29. package/src/ui/linkactionsview.d.ts +101 -101
  30. package/src/ui/linkactionsview.js +156 -156
  31. package/src/ui/linkformview.d.ts +141 -141
  32. package/src/ui/linkformview.js +232 -232
  33. package/src/unlinkcommand.d.ts +31 -31
  34. package/src/unlinkcommand.js +66 -66
  35. package/src/utils/automaticdecorators.d.ts +45 -45
  36. package/src/utils/automaticdecorators.js +140 -140
  37. package/src/utils/manualdecorator.d.ts +72 -72
  38. package/src/utils/manualdecorator.js +47 -47
  39. package/src/utils.d.ts +80 -80
  40. package/src/utils.js +128 -128
  41. package/build/link.js.map +0 -1
@@ -1,5 +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 {};
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/autolink.d.ts CHANGED
@@ -1,60 +1,75 @@
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 link/autolink
7
- */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import { Delete } from 'ckeditor5/src/typing';
10
- /**
11
- * The autolink plugin.
12
- */
13
- export default class AutoLink extends Plugin {
14
- /**
15
- * @inheritDoc
16
- */
17
- static get requires(): readonly [typeof Delete];
18
- /**
19
- * @inheritDoc
20
- */
21
- static get pluginName(): "AutoLink";
22
- /**
23
- * @inheritDoc
24
- */
25
- init(): void;
26
- /**
27
- * @inheritDoc
28
- */
29
- afterInit(): void;
30
- /**
31
- * Enables autolinking on typing.
32
- */
33
- private _enableTypingHandling;
34
- /**
35
- * Enables autolinking on the <kbd>Enter</kbd> key.
36
- */
37
- private _enableEnterHandling;
38
- /**
39
- * Enables autolinking on the <kbd>Shift</kbd>+<kbd>Enter</kbd> keyboard shortcut.
40
- */
41
- private _enableShiftEnterHandling;
42
- /**
43
- * Checks if the passed range contains a linkable text.
44
- */
45
- private _checkAndApplyAutoLinkOnRange;
46
- /**
47
- * Applies a link on a given range if the link should be applied.
48
- *
49
- * @param url The URL to link.
50
- * @param range The text range to apply the link attribute to.
51
- */
52
- private _applyAutoLink;
53
- /**
54
- * Enqueues autolink changes in the model.
55
- *
56
- * @param url The URL to link.
57
- * @param range The text range to apply the link attribute to.
58
- */
59
- private _persistAutoLink;
60
- }
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 link/autolink
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core';
9
+ import { Delete } from 'ckeditor5/src/typing';
10
+ import LinkEditing from './linkediting';
11
+ /**
12
+ * The autolink plugin.
13
+ */
14
+ export default class AutoLink extends Plugin {
15
+ /**
16
+ * @inheritDoc
17
+ */
18
+ static get requires(): readonly [typeof Delete, typeof LinkEditing];
19
+ /**
20
+ * @inheritDoc
21
+ */
22
+ static get pluginName(): "AutoLink";
23
+ /**
24
+ * @inheritDoc
25
+ */
26
+ init(): void;
27
+ /**
28
+ * @inheritDoc
29
+ */
30
+ afterInit(): void;
31
+ /**
32
+ * For given position, returns a range that includes the whole link that contains the position.
33
+ *
34
+ * If position is not inside a link, returns `null`.
35
+ */
36
+ private _expandLinkRange;
37
+ /**
38
+ * Extends the document selection to includes all links that intersects with given `selectedRange`.
39
+ */
40
+ private _selectEntireLinks;
41
+ /**
42
+ * Enables autolinking on pasting a URL when some content is selected.
43
+ */
44
+ private _enablePasteLinking;
45
+ /**
46
+ * Enables autolinking on typing.
47
+ */
48
+ private _enableTypingHandling;
49
+ /**
50
+ * Enables autolinking on the <kbd>Enter</kbd> key.
51
+ */
52
+ private _enableEnterHandling;
53
+ /**
54
+ * Enables autolinking on the <kbd>Shift</kbd>+<kbd>Enter</kbd> keyboard shortcut.
55
+ */
56
+ private _enableShiftEnterHandling;
57
+ /**
58
+ * Checks if the passed range contains a linkable text.
59
+ */
60
+ private _checkAndApplyAutoLinkOnRange;
61
+ /**
62
+ * Applies a link on a given range if the link should be applied.
63
+ *
64
+ * @param url The URL to link.
65
+ * @param range The text range to apply the link attribute to.
66
+ */
67
+ private _applyAutoLink;
68
+ /**
69
+ * Enqueues autolink changes in the model.
70
+ *
71
+ * @param url The URL to link.
72
+ * @param range The text range to apply the link attribute to.
73
+ */
74
+ private _persistAutoLink;
75
+ }