@ckeditor/ckeditor5-template 41.3.0-alpha.4 → 41.3.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.
Files changed (201) hide show
  1. package/build/template.js +2 -2
  2. package/build/translations/ar.js +1 -1
  3. package/build/translations/bg.js +1 -1
  4. package/build/translations/bn.js +1 -1
  5. package/build/translations/ca.js +1 -1
  6. package/build/translations/cs.js +1 -1
  7. package/build/translations/da.js +1 -1
  8. package/build/translations/de.js +1 -1
  9. package/build/translations/el.js +1 -1
  10. package/build/translations/en-au.js +1 -1
  11. package/build/translations/es.js +1 -1
  12. package/build/translations/et.js +1 -1
  13. package/build/translations/fi.js +1 -1
  14. package/build/translations/fr.js +1 -1
  15. package/build/translations/gl.js +1 -1
  16. package/build/translations/he.js +1 -1
  17. package/build/translations/hi.js +1 -1
  18. package/build/translations/hr.js +1 -1
  19. package/build/translations/hu.js +1 -1
  20. package/build/translations/id.js +1 -1
  21. package/build/translations/it.js +1 -1
  22. package/build/translations/ja.js +1 -1
  23. package/build/translations/ko.js +1 -1
  24. package/build/translations/lt.js +1 -1
  25. package/build/translations/lv.js +1 -1
  26. package/build/translations/ms.js +1 -1
  27. package/build/translations/nl.js +1 -1
  28. package/build/translations/no.js +1 -1
  29. package/build/translations/pl.js +1 -1
  30. package/build/translations/pt-br.js +1 -1
  31. package/build/translations/pt.js +1 -1
  32. package/build/translations/ro.js +1 -1
  33. package/build/translations/ru.js +1 -1
  34. package/build/translations/sk.js +1 -1
  35. package/build/translations/sr-latn.js +1 -1
  36. package/build/translations/sr.js +1 -1
  37. package/build/translations/sv.js +1 -1
  38. package/build/translations/th.js +1 -1
  39. package/build/translations/tr.js +1 -1
  40. package/build/translations/uk.js +1 -1
  41. package/build/translations/uz.js +1 -1
  42. package/build/translations/vi.js +1 -1
  43. package/build/translations/zh-cn.js +1 -1
  44. package/build/translations/zh.js +1 -1
  45. package/lang/contexts.json +1 -0
  46. package/lang/translations/ar.po +4 -0
  47. package/lang/translations/bg.po +4 -0
  48. package/lang/translations/bn.po +4 -0
  49. package/lang/translations/ca.po +4 -0
  50. package/lang/translations/cs.po +4 -0
  51. package/lang/translations/da.po +4 -0
  52. package/lang/translations/de.po +4 -0
  53. package/lang/translations/el.po +4 -0
  54. package/lang/translations/en-au.po +4 -0
  55. package/lang/translations/en.po +4 -0
  56. package/lang/translations/es.po +4 -0
  57. package/lang/translations/et.po +4 -0
  58. package/lang/translations/fi.po +4 -0
  59. package/lang/translations/fr.po +4 -0
  60. package/lang/translations/gl.po +4 -0
  61. package/lang/translations/he.po +4 -0
  62. package/lang/translations/hi.po +4 -0
  63. package/lang/translations/hr.po +4 -0
  64. package/lang/translations/hu.po +4 -0
  65. package/lang/translations/id.po +4 -0
  66. package/lang/translations/it.po +4 -0
  67. package/lang/translations/ja.po +4 -0
  68. package/lang/translations/ko.po +4 -0
  69. package/lang/translations/lt.po +4 -0
  70. package/lang/translations/lv.po +4 -0
  71. package/lang/translations/ms.po +4 -0
  72. package/lang/translations/nl.po +4 -0
  73. package/lang/translations/no.po +4 -0
  74. package/lang/translations/pl.po +4 -0
  75. package/lang/translations/pt-br.po +4 -0
  76. package/lang/translations/pt.po +4 -0
  77. package/lang/translations/ro.po +4 -0
  78. package/lang/translations/ru.po +4 -0
  79. package/lang/translations/sk.po +4 -0
  80. package/lang/translations/sr-latn.po +4 -0
  81. package/lang/translations/sr.po +4 -0
  82. package/lang/translations/sv.po +4 -0
  83. package/lang/translations/th.po +4 -0
  84. package/lang/translations/tr.po +4 -0
  85. package/lang/translations/uk.po +4 -0
  86. package/lang/translations/uz.po +4 -0
  87. package/lang/translations/vi.po +4 -0
  88. package/lang/translations/zh-cn.po +4 -0
  89. package/lang/translations/zh.po +4 -0
  90. package/package.json +4 -5
  91. package/src/index.js +1 -1
  92. package/src/template.d.ts +1 -1
  93. package/src/template.js +1 -1
  94. package/src/templatecommand.js +1 -1
  95. package/src/templateediting.js +1 -1
  96. package/src/templateui.js +1 -1
  97. package/src/ui/templatelistbuttonview.js +1 -1
  98. package/src/ui/templatelistitemview.d.ts +1 -1
  99. package/src/ui/templatelistitemview.js +1 -1
  100. package/src/ui/templatelistview.js +1 -1
  101. package/theme/template.css +15 -11
  102. package/dist/content-index.css +0 -332
  103. package/dist/editor-index.css +0 -406
  104. package/dist/index.css +0 -1101
  105. package/dist/translations/ar.d.ts +0 -8
  106. package/dist/translations/ar.js +0 -23
  107. package/dist/translations/bg.d.ts +0 -8
  108. package/dist/translations/bg.js +0 -23
  109. package/dist/translations/bn.d.ts +0 -8
  110. package/dist/translations/bn.js +0 -23
  111. package/dist/translations/ca.d.ts +0 -8
  112. package/dist/translations/ca.js +0 -23
  113. package/dist/translations/cs.d.ts +0 -8
  114. package/dist/translations/cs.js +0 -23
  115. package/dist/translations/da.d.ts +0 -8
  116. package/dist/translations/da.js +0 -23
  117. package/dist/translations/de.d.ts +0 -8
  118. package/dist/translations/de.js +0 -23
  119. package/dist/translations/el.d.ts +0 -8
  120. package/dist/translations/el.js +0 -23
  121. package/dist/translations/en-au.d.ts +0 -8
  122. package/dist/translations/en-au.js +0 -23
  123. package/dist/translations/en.d.ts +0 -8
  124. package/dist/translations/en.js +0 -23
  125. package/dist/translations/es.d.ts +0 -8
  126. package/dist/translations/es.js +0 -23
  127. package/dist/translations/et.d.ts +0 -8
  128. package/dist/translations/et.js +0 -23
  129. package/dist/translations/fi.d.ts +0 -8
  130. package/dist/translations/fi.js +0 -23
  131. package/dist/translations/fr.d.ts +0 -8
  132. package/dist/translations/fr.js +0 -23
  133. package/dist/translations/gl.d.ts +0 -8
  134. package/dist/translations/gl.js +0 -23
  135. package/dist/translations/he.d.ts +0 -8
  136. package/dist/translations/he.js +0 -23
  137. package/dist/translations/hi.d.ts +0 -8
  138. package/dist/translations/hi.js +0 -23
  139. package/dist/translations/hr.d.ts +0 -8
  140. package/dist/translations/hr.js +0 -23
  141. package/dist/translations/hu.d.ts +0 -8
  142. package/dist/translations/hu.js +0 -23
  143. package/dist/translations/id.d.ts +0 -8
  144. package/dist/translations/id.js +0 -23
  145. package/dist/translations/it.d.ts +0 -8
  146. package/dist/translations/it.js +0 -23
  147. package/dist/translations/ja.d.ts +0 -8
  148. package/dist/translations/ja.js +0 -23
  149. package/dist/translations/ko.d.ts +0 -8
  150. package/dist/translations/ko.js +0 -23
  151. package/dist/translations/lt.d.ts +0 -8
  152. package/dist/translations/lt.js +0 -23
  153. package/dist/translations/lv.d.ts +0 -8
  154. package/dist/translations/lv.js +0 -23
  155. package/dist/translations/ms.d.ts +0 -8
  156. package/dist/translations/ms.js +0 -23
  157. package/dist/translations/nl.d.ts +0 -8
  158. package/dist/translations/nl.js +0 -23
  159. package/dist/translations/no.d.ts +0 -8
  160. package/dist/translations/no.js +0 -23
  161. package/dist/translations/pl.d.ts +0 -8
  162. package/dist/translations/pl.js +0 -23
  163. package/dist/translations/pt-br.d.ts +0 -8
  164. package/dist/translations/pt-br.js +0 -23
  165. package/dist/translations/pt.d.ts +0 -8
  166. package/dist/translations/pt.js +0 -23
  167. package/dist/translations/ro.d.ts +0 -8
  168. package/dist/translations/ro.js +0 -23
  169. package/dist/translations/ru.d.ts +0 -8
  170. package/dist/translations/ru.js +0 -23
  171. package/dist/translations/sk.d.ts +0 -8
  172. package/dist/translations/sk.js +0 -23
  173. package/dist/translations/sr-latn.d.ts +0 -8
  174. package/dist/translations/sr-latn.js +0 -23
  175. package/dist/translations/sr.d.ts +0 -8
  176. package/dist/translations/sr.js +0 -23
  177. package/dist/translations/sv.d.ts +0 -8
  178. package/dist/translations/sv.js +0 -23
  179. package/dist/translations/th.d.ts +0 -8
  180. package/dist/translations/th.js +0 -23
  181. package/dist/translations/tr.d.ts +0 -8
  182. package/dist/translations/tr.js +0 -23
  183. package/dist/translations/uk.d.ts +0 -8
  184. package/dist/translations/uk.js +0 -23
  185. package/dist/translations/uz.d.ts +0 -8
  186. package/dist/translations/uz.js +0 -23
  187. package/dist/translations/vi.d.ts +0 -8
  188. package/dist/translations/vi.js +0 -23
  189. package/dist/translations/zh-cn.d.ts +0 -8
  190. package/dist/translations/zh-cn.js +0 -23
  191. package/dist/translations/zh.d.ts +0 -8
  192. package/dist/translations/zh.js +0 -23
  193. package/dist/types/augmentation.d.ts +0 -27
  194. package/dist/types/index.d.ts +0 -17
  195. package/dist/types/template.d.ts +0 -119
  196. package/dist/types/templatecommand.d.ts +0 -27
  197. package/dist/types/templateediting.d.ts +0 -34
  198. package/dist/types/templateui.d.ts +0 -33
  199. package/dist/types/ui/templatelistbuttonview.d.ts +0 -108
  200. package/dist/types/ui/templatelistitemview.d.ts +0 -38
  201. package/dist/types/ui/templatelistview.d.ts +0 -42
@@ -1,108 +0,0 @@
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 template/ui/templatelistbuttonview
11
- */
12
- import type { Locale } from 'ckeditor5/src/utils.js';
13
- import { ButtonView, HighlightedTextView, View } from 'ckeditor5/src/ui.js';
14
- import type { TemplateDefinition } from '../template.js';
15
- /**
16
- * A class representing an individual button (template) in the list. Renders a rich preview of the template option.
17
- *
18
- * @protected
19
- */
20
- export default class TemplateListButtonView extends ButtonView {
21
- /**
22
- * The definition of the template that the button will apply when executed.
23
- *
24
- * @readonly
25
- */
26
- templateDefinition: TemplateDefinition;
27
- /**
28
- * The view rendering the text part of the template definition.
29
- *
30
- * @protected
31
- * @readonly
32
- */
33
- textPartView: TextPartView | null;
34
- /**
35
- * Creates an instance of the {@link module:template/ui/templatelistbuttonview~TemplateListButtonView} class.
36
- *
37
- * @param locale The localization services instance.
38
- * @param templateDefinition The definition of the template.
39
- */
40
- constructor(locale: Locale, templateDefinition: TemplateDefinition);
41
- /**
42
- * @inheritDoc
43
- */
44
- render(): void;
45
- destroy(): void;
46
- /**
47
- * Tells whether the `title` or `description` of the {@link #templateDefinition} match against the provided regular expression.
48
- *
49
- * @param regExp A regular expression to match the definition against.
50
- * @returns When the match is positive, an object with the `title` and `description` keys is returned that describes
51
- * the match. Otherwise, this method returns `null`.
52
- */
53
- isMatching(regExp: RegExp): object | null;
54
- /**
55
- * Highlights a subset of the {@link #textPartView} text according to a specified regular expression. When `null` is passed,
56
- * the highlighting is turned off.
57
- *
58
- * @param regExp A regular expression used to highlight the matching text in the {@link #textPartView}.
59
- */
60
- highlightText(regExp: RegExp | null): void;
61
- }
62
- /**
63
- * A view representing the title and the description of the template.
64
- *
65
- * @protected
66
- */
67
- export declare class TextPartView extends View {
68
- /**
69
- * The title text of the template.
70
- *
71
- * @readonly
72
- */
73
- title: string;
74
- /**
75
- * The description text of the template.
76
- *
77
- * @readonly
78
- */
79
- description: string | undefined;
80
- /**
81
- * Renders the title text of a template.
82
- *
83
- * **Note**: It acts as a label of the entire button in the context of accessibility.
84
- *
85
- * @readonly
86
- */
87
- titleView: HighlightedTextView;
88
- /**
89
- * Renders the description text of a template.
90
- *
91
- * @readonly
92
- */
93
- descriptionView: HighlightedTextView;
94
- /**
95
- * Creates an instance of the text part view.
96
- *
97
- * @param locale The {@link module:core/editor/editor~Editor#locale} instance.
98
- * @param templateDefinition The definition of the template.
99
- * @param labelId A unique ID that connects the entire button with the {@link #titleView} in the context of accessibility.
100
- */
101
- constructor(locale: Locale, templateDefinition: TemplateDefinition, labelId: string);
102
- /**
103
- * Highlights a subset of the {@link #titleView} and {@link #descriptionView} text according to a specified regular expression.
104
- *
105
- * @param regExp
106
- */
107
- highlightText(regExp: RegExp | null): void;
108
- }
@@ -1,38 +0,0 @@
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 template/ui/templatelistitemview
11
- */
12
- import type { Locale } from 'ckeditor5/src/utils.js';
13
- import { ListItemView } from 'ckeditor5/src/ui.js';
14
- import type TemplateListButtonView from './templatelistbuttonview.js';
15
- /**
16
- * A view representing an item in the list of tempaltes.
17
- *
18
- * @protected
19
- */
20
- export default class TemplateListItemView extends ListItemView {
21
- /**
22
- * The initial index of the item in the list of templates.
23
- * Useful while searching and sorting to reverse the list to the same order.
24
- */
25
- readonly originalIndex: number;
26
- /**
27
- * The instance of the template button view containing the title,
28
- * icon, and description of the template.
29
- */
30
- buttonView: TemplateListButtonView | null;
31
- /**
32
- * Creates an instance of the {@link module:template/ui/templatelistitemview~TemplateListItemView} class.
33
- *
34
- * @param locale The localization services instance.
35
- * @param originalIndex The initial index of the item in the list of templates.
36
- */
37
- constructor(locale: Locale, originalIndex: number);
38
- }
@@ -1,42 +0,0 @@
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 template/ui/templatelistview
11
- */
12
- import { ListView, type FilteredView } from 'ckeditor5/src/ui.js';
13
- /**
14
- * The template list view class with filtering and sorting.
15
- *
16
- * @private
17
- */
18
- export default class TemplateListView extends ListView implements FilteredView {
19
- /**
20
- * Filters the list of templates according to a specified regular expression. The filtered list is sorted so that items that
21
- * match the regular expression in their titles are displayed first.
22
- *
23
- * Matching items highlight the regular expression (query) in their titles and/or descriptions.
24
- *
25
- * **Note**: The `Collection` (also `ViewCollection`) class does not provide sorting functionality. Thus, the functionality
26
- * implemented in this method is **extremely inefficient** because it clones the entire collection, sorts it as an array,
27
- * then purges the original collection and sets it from scratch with the sorted array. Purging and resetting the
28
- * collection triggers an avalanche of `add` and `remove` events synchronously handled by the `Template` (UI bindings)
29
- * and **rendered in the DOM**. As long as sorting takes shorter than rendering of the DOM this should not be noticeable
30
- * but the moment it does not, the UI will start glitching. A proper `Collection#sort` is needed to work around
31
- * this overhead (see https://github.com/ckeditor/ckeditor5/issues/2065).
32
- *
33
- * **Note**: Passing `null` to this method resets the list to its original state.
34
- *
35
- * @param regExp A regular expression used to match the list title and description.
36
- * @returns True if some list items matched the regular expression. False otherwise.
37
- */
38
- filter(regExp: RegExp | null): {
39
- resultsCount: number;
40
- totalItemsCount: number;
41
- };
42
- }