@ckeditor/ckeditor5-style 41.1.0 → 41.3.0-alpha.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.
@@ -0,0 +1,35 @@
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
+ * @module style/ui/stylegroupview
7
+ */
8
+ import { LabelView, View } from 'ckeditor5/src/ui.js';
9
+ import type { Locale } from 'ckeditor5/src/utils.js';
10
+ import StyleGridView from './stylegridview.js';
11
+ import type { NormalizedStyleDefinition } from '../styleutils.js';
12
+ import '../../theme/stylegroup.css';
13
+ /**
14
+ * A class representing a group of styles (e.g. "block" or "inline").
15
+ *
16
+ * Renders a {@link module:style/ui/stylegridview~StyleGridView style grid} and a label.
17
+ */
18
+ export default class StyleGroupView extends View<HTMLDivElement> {
19
+ /**
20
+ * The styles grid of the group.
21
+ */
22
+ readonly gridView: StyleGridView;
23
+ /**
24
+ * The label of the group.
25
+ */
26
+ readonly labelView: LabelView;
27
+ /**
28
+ * Creates an instance of the {@link module:style/ui/stylegroupview~StyleGroupView} class.
29
+ *
30
+ * @param locale The localization services instance.
31
+ * @param label The localized label of the group.
32
+ * @param styleDefinitions Definitions of the styles in the group.
33
+ */
34
+ constructor(locale: Locale, label: string, styleDefinitions: Array<NormalizedStyleDefinition>);
35
+ }
@@ -0,0 +1,89 @@
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
+ * @module style/ui/stylepanelview
7
+ */
8
+ import { FocusCycler, View, ViewCollection } from 'ckeditor5/src/ui.js';
9
+ import { FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils.js';
10
+ import StyleGroupView from './stylegroupview.js';
11
+ import type StyleGridView from './stylegridview.js';
12
+ import type { NormalizedStyleDefinitions } from '../styleutils.js';
13
+ import '../../theme/stylepanel.css';
14
+ /**
15
+ * A class representing a panel with available content styles. It renders styles in button grids, grouped
16
+ * in categories.
17
+ */
18
+ export default class StylePanelView extends View<HTMLDivElement> {
19
+ /**
20
+ * Tracks information about DOM focus in the panel.
21
+ */
22
+ readonly focusTracker: FocusTracker;
23
+ /**
24
+ * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
25
+ */
26
+ readonly keystrokes: KeystrokeHandler;
27
+ /**
28
+ * A collection of panel children.
29
+ */
30
+ readonly children: ViewCollection<StyleGroupView>;
31
+ /**
32
+ * A view representing block styles group.
33
+ */
34
+ readonly blockStylesGroupView: StyleGroupView;
35
+ /**
36
+ * A view representing inline styles group
37
+ */
38
+ readonly inlineStylesGroupView: StyleGroupView;
39
+ /**
40
+ * Array of active style names. They must correspond to the names of styles from
41
+ * definitions passed to the {@link #constructor}.
42
+ *
43
+ * @observable
44
+ */
45
+ readonly activeStyles: Array<string>;
46
+ /**
47
+ * Array of enabled style names. They must correspond to the names of styles from
48
+ * definitions passed to the {@link #constructor}.
49
+ *
50
+ * @observable
51
+ */
52
+ readonly enabledStyles: Array<string>;
53
+ /**
54
+ * A collection of views that can be focused in the panel.
55
+ */
56
+ protected readonly _focusables: ViewCollection<StyleGridView>;
57
+ /**
58
+ * Helps cycling over {@link #_focusables} in the panel.
59
+ */
60
+ protected readonly _focusCycler: FocusCycler;
61
+ /**
62
+ * Creates an instance of the {@link module:style/ui/stylegroupview~StyleGroupView} class.
63
+ *
64
+ * @param locale The localization services instance.
65
+ * @param styleDefinitions Normalized definitions of the styles.
66
+ */
67
+ constructor(locale: Locale, styleDefinitions: NormalizedStyleDefinitions);
68
+ /**
69
+ * @inheritDoc
70
+ */
71
+ render(): void;
72
+ /**
73
+ * Focuses the first focusable element in the panel.
74
+ */
75
+ focus(): void;
76
+ /**
77
+ * Focuses the last focusable element in the panel.
78
+ */
79
+ focusLast(): void;
80
+ }
81
+ /**
82
+ * Fired when a style was selected (clicked) by the user.
83
+ *
84
+ * @eventName ~StylePanelView#execute
85
+ */
86
+ export type StylePanelViewExecuteEvent = {
87
+ name: 'execute';
88
+ args: [];
89
+ };
@@ -14,7 +14,7 @@ msgid ""
14
14
  msgstr ""
15
15
  "Language-Team: Hebrew (https://app.transifex.com/ckeditor/teams/11143/he/)\n"
16
16
  "Language: he\n"
17
- "Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: (n % 10 == 0 && n % 1 == 0 && n > 10) ? 2 : 3;\n"
17
+ "Plural-Forms: nplurals=3; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: 2;\n"
18
18
  "Content-Type: text/plain; charset=UTF-8\n"
19
19
 
20
20
  msgctxt "The label of the styles dropdown button in the toolbar displayed when no style is currently active."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-style",
3
- "version": "41.1.0",
3
+ "version": "41.3.0-alpha.0",
4
4
  "description": "Style feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -13,7 +13,7 @@
13
13
  "type": "module",
14
14
  "main": "src/index.js",
15
15
  "dependencies": {
16
- "ckeditor5": "41.1.0",
16
+ "ckeditor5": "41.3.0-alpha.0",
17
17
  "lodash-es": "4.17.21"
18
18
  },
19
19
  "author": "CKSource (http://cksource.com/)",
@@ -26,6 +26,7 @@
26
26
  "directory": "packages/ckeditor5-style"
27
27
  },
28
28
  "files": [
29
+ "dist",
29
30
  "lang",
30
31
  "src/**/*.js",
31
32
  "src/**/*.d.ts",