@sveltia/ui 0.44.2 → 0.46.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.
@@ -39,18 +39,25 @@ import {
39
39
  registerRichText,
40
40
  } from '@lexical/rich-text';
41
41
  import { TableCellNode, TableNode, TableRowNode } from '@lexical/table';
42
- import { $getNearestNodeOfType as getNearestNodeOfType } from '@lexical/utils';
42
+ import { $getNearestNodeOfType as getNearestNodeOfType, objectKlassEquals } from '@lexical/utils';
43
43
  import { sleep } from '@sveltia/utils/misc';
44
+ import { isURL } from '@sveltia/utils/string';
44
45
  import {
46
+ COMMAND_PRIORITY_LOW,
45
47
  COMMAND_PRIORITY_NORMAL,
46
48
  createEditor,
49
+ $createTextNode as createTextNode,
47
50
  ElementNode,
48
51
  $getRoot as getRoot,
49
52
  $getSelection as getSelection,
50
53
  INDENT_CONTENT_COMMAND,
51
54
  INSERT_PARAGRAPH_COMMAND,
55
+ $insertNodes as insertNodes,
56
+ $isElementNode as isElementNode,
52
57
  $isRangeSelection as isRangeSelection,
58
+ $isTextNode as isTextNode,
53
59
  OUTDENT_CONTENT_COMMAND,
60
+ PASTE_COMMAND,
54
61
  } from 'lexical';
55
62
  import prismComponents from 'prismjs/components';
56
63
  import {
@@ -269,6 +276,7 @@ export const initEditor = ({
269
276
  );
270
277
  }
271
278
 
279
+ // https://github.com/facebook/lexical/blob/main/packages/lexical-link/src/LexicalLinkExtension.ts
272
280
  if (enabledButtons.includes('link')) {
273
281
  addUnregister(
274
282
  editor.registerCommand(
@@ -281,6 +289,47 @@ export const initEditor = ({
281
289
  COMMAND_PRIORITY_NORMAL,
282
290
  ),
283
291
  );
292
+
293
+ addUnregister(
294
+ editor.registerCommand(
295
+ PASTE_COMMAND,
296
+ (event) => {
297
+ const selection = getSelection();
298
+
299
+ if (
300
+ !isRangeSelection(selection) ||
301
+ !objectKlassEquals(event, ClipboardEvent) ||
302
+ !event.clipboardData ||
303
+ /** @type {HTMLElement} */ (event.target).matches('input, textarea')
304
+ ) {
305
+ return false;
306
+ }
307
+
308
+ const clipboardText = event.clipboardData.getData('text').trim();
309
+
310
+ if (!isURL(clipboardText)) {
311
+ return false;
312
+ }
313
+
314
+ if (selection.isCollapsed()) {
315
+ insertNodes([createTextNode(clipboardText)]);
316
+ }
317
+
318
+ if (
319
+ !selection
320
+ .getNodes()
321
+ .some((node) => isElementNode(node) || (isTextNode(node) && !node.isSimpleText()))
322
+ ) {
323
+ editor.dispatchCommand(TOGGLE_LINK_COMMAND, clipboardText);
324
+ event.preventDefault();
325
+ return true;
326
+ }
327
+
328
+ return false;
329
+ },
330
+ COMMAND_PRIORITY_LOW,
331
+ ),
332
+ );
284
333
  }
285
334
 
286
335
  if (enabledButtons.includes('bulleted-list')) {
@@ -138,14 +138,7 @@
138
138
  if (!hasAnchor) {
139
139
  anchorText = anchorText.trim();
140
140
  anchorText ||= anchorURL;
141
-
142
- const { anchor, focus } = /** @type {RangeSelection} */ (_selection);
143
- const node = createTextNode(anchorText);
144
- const key = node.getKey();
145
-
146
- insertNodes([node]);
147
- anchor.set(key, anchorText.length, 'text');
148
- focus.set(key, 0, 'text');
141
+ insertNodes([createTextNode(anchorText)]);
149
142
  }
150
143
 
151
144
  setSelection(_selection);
@@ -0,0 +1,113 @@
1
+ # Dialog action button labels
2
+ ok: ΟΚ
3
+ cancel: Άκυρο
4
+ close: Κλείσιμο
5
+
6
+ # Button to clear content, e.g. search input or calendar date
7
+ clear: Έκκαθάριση
8
+
9
+ # Text editor dialog buttons for link/image insertion
10
+ insert: Εισαγωγή
11
+ update: Ενημέρωση
12
+ remove: Κατάργηση
13
+
14
+ # Combobox dropdown toggle button aria-labels
15
+ collapse: Σύμπτυξη
16
+ expand: Ανάπτυξη
17
+
18
+ # Infobar/toast dismiss button label
19
+ dismiss: Παράβλεψη
20
+
21
+ # Calendar component
22
+ calendar:
23
+ # View switcher group aria-labels and navigation button aria-labels
24
+ year: Έτος
25
+ previous_decade: Προηγούμενη δεκαετία
26
+ next_decade: Επόμενη δεκαετία
27
+ month: Μήνας
28
+ previous_month: Προηγούμενος μήνας
29
+ next_month: Επόμενος μήνας
30
+ # “Today” button label in footer
31
+ today: Σήμερα
32
+
33
+ # Split button component
34
+ split_button:
35
+ # Wrapper aria-label, e.g. “Save Options” when primary button is “Save”
36
+ x_options: 'Επιλογές για {$name}'
37
+ # Dropdown toggle aria-label
38
+ more_options: Περισσότερες επιλογές
39
+
40
+ # Combobox component
41
+ combobox:
42
+ # Placeholder when no option is selected
43
+ select_an_option: Επιλέξτε μία επιλογή…
44
+ # Filter input aria-label
45
+ filter_options: Φιλτράρισμα επιλογών
46
+ # Empty state message when filter has no matches
47
+ no_matching_options: Δεν βρέθηκαν επιλογές που να ταιριάζουν
48
+
49
+ # Number input component
50
+ number_input:
51
+ # Spin button aria-labels for incrementing/decrementing the number value
52
+ increase: Αύξηση
53
+ decrease: Μείωση
54
+
55
+ # Password input component
56
+ password_input:
57
+ # Visibility toggle button aria-labels
58
+ show_password: Εμφάνιση κωδικού πρόσβασης
59
+ hide_password: Απόκρυψη κωδικού πρόσβασης
60
+
61
+ # Secret input component (API keys, tokens, etc.)
62
+ secret_input:
63
+ # Visibility toggle button aria-labels
64
+ show_secret: Εμφάνιση μυστικού
65
+ hide_secret: Απόκρυψη μυστικού
66
+
67
+ # Select tags component (multi-select)
68
+ select_tags:
69
+ # Listbox aria-label
70
+ selected_options: Επιλεγμένες επιλογές
71
+ # Remove button aria-label, e.g. “Remove Option 1”
72
+ remove_x: 'Κατάργηση {$name}'
73
+
74
+ # Text editor component
75
+ text_editor:
76
+ # Toolbar aria-labels
77
+ text_editor: Επεξεργαστής κειμένου
78
+ code_editor: Επεξεργαστής κώδικα
79
+ # Block style menu button and menu aria-labels
80
+ text_style_options: Επιλογές μορφοποίησης κειμένου
81
+ show_text_style_options: Εμφάνιση επιλογών μορφοποίησης κειμένου
82
+ # Block style menu items
83
+ paragraph: Παράγραφος
84
+ heading_1: Επικεφαλίδα 1
85
+ heading_2: Επικεφαλίδα 2
86
+ heading_3: Επικεφαλίδα 3
87
+ heading_4: Επικεφαλίδα 4
88
+ heading_5: Επικεφαλίδα 5
89
+ heading_6: Επικεφαλίδα 6
90
+ bulleted_list: Λίστα με κουκίδες
91
+ numbered_list: Αριθμημένη λίστα
92
+ blockquote: Παράθεση
93
+ code_block: Μπλόκ κώδικα
94
+ # Inline style button aria-labels
95
+ bold: Έντονα
96
+ italic: Πλάγια
97
+ strikethrough: Διακριτή διαγραφή
98
+ code: Κώδικας
99
+ link: Σύνδεσμος
100
+ # Link dialog title
101
+ insert_link: Εισαγωγή συνδέσμου
102
+ update_link: Ενημέρωση συνδέσμου
103
+ # Link dialog input field labels
104
+ text: Κείμενο
105
+ url: URL
106
+ # Markdown mode toggle button aria-label
107
+ edit_in_markdown: Επεξεργασία σε Markdown
108
+ # Error message when rich text conversion fails
109
+ converter_error: Δεν ήταν δυνατή η ενεργοποίηση της λειτουργίας εμπλουτισμένου κειμένου. Παρακαλούμε χρησιμοποιήστε τον επεξεργαστή απλού κειμένου.
110
+ # Language selector aria-label
111
+ language: Γλώσσα
112
+ # Plain text mode option in language selector
113
+ plain_text: Απλό κείμενο
@@ -33,7 +33,7 @@ calendar:
33
33
  # Split button component
34
34
  split_button:
35
35
  # Wrapper aria-label, e.g. “Save Options” when primary button is “Save”
36
- x_options: "{$name} Options"
36
+ x_options: '{$name} Options'
37
37
  # Dropdown toggle aria-label
38
38
  more_options: More Options
39
39
 
@@ -69,7 +69,7 @@ select_tags:
69
69
  # Listbox aria-label
70
70
  selected_options: Selected Options
71
71
  # Remove button aria-label, e.g. “Remove Option 1”
72
- remove_x: "Remove {$name}"
72
+ remove_x: 'Remove {$name}'
73
73
 
74
74
  # Text editor component
75
75
  text_editor:
@@ -0,0 +1,113 @@
1
+ # Dialog action button labels
2
+ ok: OK
3
+ cancel: Cancel
4
+ close: Close
5
+
6
+ # Button to clear content, e.g. search input or calendar date
7
+ clear: Clear
8
+
9
+ # Text editor dialog buttons for link/image insertion
10
+ insert: Insert
11
+ update: Update
12
+ remove: Remove
13
+
14
+ # Combobox dropdown toggle button aria-labels
15
+ collapse: Collapse
16
+ expand: Expand
17
+
18
+ # Infobar/toast dismiss button label
19
+ dismiss: Dismiss
20
+
21
+ # Calendar component
22
+ calendar:
23
+ # View switcher group aria-labels and navigation button aria-labels
24
+ year: Year
25
+ previous_decade: Previous Decade
26
+ next_decade: Next Decade
27
+ month: Month
28
+ previous_month: Previous Month
29
+ next_month: Next Month
30
+ # “Today” button label in footer
31
+ today: Today
32
+
33
+ # Split button component
34
+ split_button:
35
+ # Wrapper aria-label, e.g. “Save Options” when primary button is “Save”
36
+ x_options: '{$name} Options'
37
+ # Dropdown toggle aria-label
38
+ more_options: More Options
39
+
40
+ # Combobox component
41
+ combobox:
42
+ # Placeholder when no option is selected
43
+ select_an_option: Select an option…
44
+ # Filter input aria-label
45
+ filter_options: Filter Options
46
+ # Empty state message when filter has no matches
47
+ no_matching_options: No matching options found
48
+
49
+ # Number input component
50
+ number_input:
51
+ # Spin button aria-labels for incrementing/decrementing the number value
52
+ increase: Increase
53
+ decrease: Decrease
54
+
55
+ # Password input component
56
+ password_input:
57
+ # Visibility toggle button aria-labels
58
+ show_password: Show Password
59
+ hide_password: Hide Password
60
+
61
+ # Secret input component (API keys, tokens, etc.)
62
+ secret_input:
63
+ # Visibility toggle button aria-labels
64
+ show_secret: Show Secret
65
+ hide_secret: Hide Secret
66
+
67
+ # Select tags component (multi-select)
68
+ select_tags:
69
+ # Listbox aria-label
70
+ selected_options: Selected Options
71
+ # Remove button aria-label, e.g. “Remove Option 1”
72
+ remove_x: 'Remove {$name}'
73
+
74
+ # Text editor component
75
+ text_editor:
76
+ # Toolbar aria-labels
77
+ text_editor: Text Editor
78
+ code_editor: Code Editor
79
+ # Block style menu button and menu aria-labels
80
+ text_style_options: Text Style Options
81
+ show_text_style_options: Show Text Style Options
82
+ # Block style menu items
83
+ paragraph: Paragraph
84
+ heading_1: Heading 1
85
+ heading_2: Heading 2
86
+ heading_3: Heading 3
87
+ heading_4: Heading 4
88
+ heading_5: Heading 5
89
+ heading_6: Heading 6
90
+ bulleted_list: Bulleted List
91
+ numbered_list: Numbered List
92
+ blockquote: Block Quote
93
+ code_block: Code Block
94
+ # Inline style button aria-labels
95
+ bold: Bold
96
+ italic: Italic
97
+ strikethrough: Strikethrough
98
+ code: Code
99
+ link: Link
100
+ # Link dialog title
101
+ insert_link: Insert Link
102
+ update_link: Update Link
103
+ # Link dialog input field labels
104
+ text: Text
105
+ url: URL
106
+ # Markdown mode toggle button aria-label
107
+ edit_in_markdown: Edit in Markdown
108
+ # Error message when rich text conversion fails
109
+ converter_error: Unable to enable rich text mode. Please use the plain text editor instead.
110
+ # Language selector aria-label
111
+ language: Language
112
+ # Plain text mode option in language selector
113
+ plain_text: Plain Text
@@ -0,0 +1,113 @@
1
+ # Dialog action button labels
2
+ ok: OK
3
+ cancel: Cancel
4
+ close: Close
5
+
6
+ # Button to clear content, e.g. search input or calendar date
7
+ clear: Clear
8
+
9
+ # Text editor dialog buttons for link/image insertion
10
+ insert: Insert
11
+ update: Update
12
+ remove: Remove
13
+
14
+ # Combobox dropdown toggle button aria-labels
15
+ collapse: Collapse
16
+ expand: Expand
17
+
18
+ # Infobar/toast dismiss button label
19
+ dismiss: Dismiss
20
+
21
+ # Calendar component
22
+ calendar:
23
+ # View switcher group aria-labels and navigation button aria-labels
24
+ year: Year
25
+ previous_decade: Previous Decade
26
+ next_decade: Next Decade
27
+ month: Month
28
+ previous_month: Previous Month
29
+ next_month: Next Month
30
+ # “Today” button label in footer
31
+ today: Today
32
+
33
+ # Split button component
34
+ split_button:
35
+ # Wrapper aria-label, e.g. “Save Options” when primary button is “Save”
36
+ x_options: '{$name} Options'
37
+ # Dropdown toggle aria-label
38
+ more_options: More Options
39
+
40
+ # Combobox component
41
+ combobox:
42
+ # Placeholder when no option is selected
43
+ select_an_option: Select an option…
44
+ # Filter input aria-label
45
+ filter_options: Filter Options
46
+ # Empty state message when filter has no matches
47
+ no_matching_options: No matching options found
48
+
49
+ # Number input component
50
+ number_input:
51
+ # Spin button aria-labels for incrementing/decrementing the number value
52
+ increase: Increase
53
+ decrease: Decrease
54
+
55
+ # Password input component
56
+ password_input:
57
+ # Visibility toggle button aria-labels
58
+ show_password: Show Password
59
+ hide_password: Hide Password
60
+
61
+ # Secret input component (API keys, tokens, etc.)
62
+ secret_input:
63
+ # Visibility toggle button aria-labels
64
+ show_secret: Show Secret
65
+ hide_secret: Hide Secret
66
+
67
+ # Select tags component (multi-select)
68
+ select_tags:
69
+ # Listbox aria-label
70
+ selected_options: Selected Options
71
+ # Remove button aria-label, e.g. “Remove Option 1”
72
+ remove_x: 'Remove {$name}'
73
+
74
+ # Text editor component
75
+ text_editor:
76
+ # Toolbar aria-labels
77
+ text_editor: Text Editor
78
+ code_editor: Code Editor
79
+ # Block style menu button and menu aria-labels
80
+ text_style_options: Text Style Options
81
+ show_text_style_options: Show Text Style Options
82
+ # Block style menu items
83
+ paragraph: Paragraph
84
+ heading_1: Heading 1
85
+ heading_2: Heading 2
86
+ heading_3: Heading 3
87
+ heading_4: Heading 4
88
+ heading_5: Heading 5
89
+ heading_6: Heading 6
90
+ bulleted_list: Bulleted List
91
+ numbered_list: Numbered List
92
+ blockquote: Block Quote
93
+ code_block: Code Block
94
+ # Inline style button aria-labels
95
+ bold: Bold
96
+ italic: Italic
97
+ strikethrough: Strikethrough
98
+ code: Code
99
+ link: Link
100
+ # Link dialog title
101
+ insert_link: Insert Link
102
+ update_link: Update Link
103
+ # Link dialog input field labels
104
+ text: Text
105
+ url: URL
106
+ # Markdown mode toggle button aria-label
107
+ edit_in_markdown: Edit in Markdown
108
+ # Error message when rich text conversion fails
109
+ converter_error: Unable to enable rich text mode. Please use the plain text editor instead.
110
+ # Language selector aria-label
111
+ language: Language
112
+ # Plain text mode option in language selector
113
+ plain_text: Plain Text
@@ -33,7 +33,7 @@ calendar:
33
33
  # Split button component
34
34
  split_button:
35
35
  # Wrapper aria-label, e.g. "Save Options" when primary button is "Save"
36
- x_options: "{$name} オプション"
36
+ x_options: '{$name} オプション'
37
37
  # Dropdown toggle aria-label
38
38
  more_options: その他のオプション
39
39
 
@@ -69,7 +69,7 @@ select_tags:
69
69
  # Listbox aria-label
70
70
  selected_options: 選択済みのオプション
71
71
  # Remove button aria-label, e.g. "Remove Option 1"
72
- remove_x: "{$name} を削除"
72
+ remove_x: '{$name} を削除'
73
73
 
74
74
  # Text editor component
75
75
  text_editor:
@@ -0,0 +1,113 @@
1
+ # Dialog action button labels
2
+ ok: OK
3
+ cancel: Отмена
4
+ close: Закрыть
5
+
6
+ # Button to clear content, e.g. search input or calendar date
7
+ clear: Очистить
8
+
9
+ # Text editor dialog buttons for link/image insertion
10
+ insert: Вставить
11
+ update: Обновить
12
+ remove: Удалить
13
+
14
+ # Combobox dropdown toggle button aria-labels
15
+ collapse: Свернуть
16
+ expand: Развернуть
17
+
18
+ # Infobar/toast dismiss button label
19
+ dismiss: Отклонить
20
+
21
+ # Calendar component
22
+ calendar:
23
+ # View switcher group aria-labels and navigation button aria-labels
24
+ year: Год
25
+ previous_decade: Предыдущее десятилетие
26
+ next_decade: Следующее десятилетие
27
+ month: Месяц
28
+ previous_month: Предыдущий месяц
29
+ next_month: Следующий месяц
30
+ # “Today” button label in footer
31
+ today: Сегодня
32
+
33
+ # Split button component
34
+ split_button:
35
+ # Wrapper aria-label, e.g. “Save Options” when primary button is “Save”
36
+ x_options: Параметры «{$name}»
37
+ # Dropdown toggle aria-label
38
+ more_options: Другие параметры
39
+
40
+ # Combobox component
41
+ combobox:
42
+ # Placeholder when no option is selected
43
+ select_an_option: Выберите вариант…
44
+ # Filter input aria-label
45
+ filter_options: Фильтровать варианты
46
+ # Empty state message when filter has no matches
47
+ no_matching_options: Подходящих вариантов не найдено
48
+
49
+ # Number input component
50
+ number_input:
51
+ # Spin button aria-labels for incrementing/decrementing the number value
52
+ increase: Увеличить
53
+ decrease: Уменьшить
54
+
55
+ # Password input component
56
+ password_input:
57
+ # Visibility toggle button aria-labels
58
+ show_password: Показать пароль
59
+ hide_password: Скрыть пароль
60
+
61
+ # Secret input component (API keys, tokens, etc.)
62
+ secret_input:
63
+ # Visibility toggle button aria-labels
64
+ show_secret: Показать секрет
65
+ hide_secret: Скрыть секрет
66
+
67
+ # Select tags component (multi-select)
68
+ select_tags:
69
+ # Listbox aria-label
70
+ selected_options: Выбранные варианты
71
+ # Remove button aria-label, e.g. “Remove Option 1”
72
+ remove_x: Удалить «{$name}»
73
+
74
+ # Text editor component
75
+ text_editor:
76
+ # Toolbar aria-labels
77
+ text_editor: Текстовый редактор
78
+ code_editor: Редактор кода
79
+ # Block style menu button and menu aria-labels
80
+ text_style_options: Параметры стиля текста
81
+ show_text_style_options: Показать параметры стиля текста
82
+ # Block style menu items
83
+ paragraph: Абзац
84
+ heading_1: Заголовок 1
85
+ heading_2: Заголовок 2
86
+ heading_3: Заголовок 3
87
+ heading_4: Заголовок 4
88
+ heading_5: Заголовок 5
89
+ heading_6: Заголовок 6
90
+ bulleted_list: Маркированный список
91
+ numbered_list: Нумерованный список
92
+ blockquote: Цитата
93
+ code_block: Блок кода
94
+ # Inline style button aria-labels
95
+ bold: Полужирный
96
+ italic: Курсив
97
+ strikethrough: Зачёркнутый
98
+ code: Код
99
+ link: Ссылка
100
+ # Link dialog title
101
+ insert_link: Вставить ссылку
102
+ update_link: Обновить ссылку
103
+ # Link dialog input field labels
104
+ text: Текст
105
+ url: URL
106
+ # Markdown mode toggle button aria-label
107
+ edit_in_markdown: Редактировать в Markdown
108
+ # Error message when rich text conversion fails
109
+ converter_error: Не удалось включить режим форматированного текста. Вместо этого используйте редактор обычного текста.
110
+ # Language selector aria-label
111
+ language: Язык
112
+ # Plain text mode option in language selector
113
+ plain_text: Обычный текст
@@ -0,0 +1,113 @@
1
+ # Dialog action button labels
2
+ ok: OK
3
+ cancel: Скасувати
4
+ close: Закрити
5
+
6
+ # Button to clear content, e.g. search input or calendar date
7
+ clear: Очистити
8
+
9
+ # Text editor dialog buttons for link/image insertion
10
+ insert: Вставити
11
+ update: Оновити
12
+ remove: Видалити
13
+
14
+ # Combobox dropdown toggle button aria-labels
15
+ collapse: Згорнути
16
+ expand: Розгорнути
17
+
18
+ # Infobar/toast dismiss button label
19
+ dismiss: Відхилити
20
+
21
+ # Calendar component
22
+ calendar:
23
+ # View switcher group aria-labels and navigation button aria-labels
24
+ year: Рік
25
+ previous_decade: Попереднє десятиліття
26
+ next_decade: Наступне десятиліття
27
+ month: Місяць
28
+ previous_month: Попередній місяць
29
+ next_month: Наступний місяць
30
+ # “Today” button label in footer
31
+ today: Сьогодні
32
+
33
+ # Split button component
34
+ split_button:
35
+ # Wrapper aria-label, e.g. “Save Options” when primary button is “Save”
36
+ x_options: Параметри «{$name}»
37
+ # Dropdown toggle aria-label
38
+ more_options: Інші параметри
39
+
40
+ # Combobox component
41
+ combobox:
42
+ # Placeholder when no option is selected
43
+ select_an_option: Виберіть варіант…
44
+ # Filter input aria-label
45
+ filter_options: Фільтрувати варіанти
46
+ # Empty state message when filter has no matches
47
+ no_matching_options: Відповідних варіантів не знайдено
48
+
49
+ # Number input component
50
+ number_input:
51
+ # Spin button aria-labels for incrementing/decrementing the number value
52
+ increase: Збільшити
53
+ decrease: Зменшити
54
+
55
+ # Password input component
56
+ password_input:
57
+ # Visibility toggle button aria-labels
58
+ show_password: Показати пароль
59
+ hide_password: Сховати пароль
60
+
61
+ # Secret input component (API keys, tokens, etc.)
62
+ secret_input:
63
+ # Visibility toggle button aria-labels
64
+ show_secret: Показати секрет
65
+ hide_secret: Сховати секрет
66
+
67
+ # Select tags component (multi-select)
68
+ select_tags:
69
+ # Listbox aria-label
70
+ selected_options: Вибрані варіанти
71
+ # Remove button aria-label, e.g. “Remove Option 1”
72
+ remove_x: Видалити «{$name}»
73
+
74
+ # Text editor component
75
+ text_editor:
76
+ # Toolbar aria-labels
77
+ text_editor: Текстовий редактор
78
+ code_editor: Редактор коду
79
+ # Block style menu button and menu aria-labels
80
+ text_style_options: Параметри стилю тексту
81
+ show_text_style_options: Показати параметри стилю тексту
82
+ # Block style menu items
83
+ paragraph: Абзац
84
+ heading_1: Заголовок 1
85
+ heading_2: Заголовок 2
86
+ heading_3: Заголовок 3
87
+ heading_4: Заголовок 4
88
+ heading_5: Заголовок 5
89
+ heading_6: Заголовок 6
90
+ bulleted_list: Маркований список
91
+ numbered_list: Нумерований список
92
+ blockquote: Цитата
93
+ code_block: Блок коду
94
+ # Inline style button aria-labels
95
+ bold: Жирний
96
+ italic: Курсив
97
+ strikethrough: Закреслений
98
+ code: Код
99
+ link: Посилання
100
+ # Link dialog title
101
+ insert_link: Вставити посилання
102
+ update_link: Оновити посилання
103
+ # Link dialog input field labels
104
+ text: Текст
105
+ url: URL
106
+ # Markdown mode toggle button aria-label
107
+ edit_in_markdown: Редагувати в Markdown
108
+ # Error message when rich text conversion fails
109
+ converter_error: Не вдалося ввімкнути режим форматованого тексту. Натомість скористайтеся редактором звичайного тексту.
110
+ # Language selector aria-label
111
+ language: Мова
112
+ # Plain text mode option in language selector
113
+ plain_text: Звичайний текст
@@ -23,7 +23,7 @@ export const strings = Object.fromEntries(
23
23
  * @see https://github.com/sveltia/sveltia-i18n
24
24
  * @see https://vitejs.dev/guide/features.html#glob-import
25
25
  */
26
- export const initLocales = ({ fallbackLocale = 'en', initialLocale = 'en' } = {}) => {
26
+ export const initLocales = ({ fallbackLocale = 'en-US', initialLocale = 'en-US' } = {}) => {
27
27
  Object.entries(strings).forEach(([locale, resource]) => {
28
28
  // Add `_sui` suffix to avoid collision with app localization
29
29
  addMessages(locale, { _sui: resource });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltia/ui",
3
- "version": "0.44.2",
3
+ "version": "0.46.0",
4
4
  "description": "A collection of Svelte components and utilities for building user interfaces.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -46,14 +46,14 @@
46
46
  "@lexical/table": "^0.48.0",
47
47
  "@lexical/utils": "^0.48.0",
48
48
  "@sveltia/i18n": "^1.1.3",
49
- "@sveltia/utils": "^0.10.7",
49
+ "@sveltia/utils": "^0.11.0",
50
50
  "lexical": "^0.48.0",
51
51
  "prismjs": "^1.30.0"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@rollup/plugin-yaml": "^5.0.0",
55
55
  "@sveltejs/adapter-auto": "^7.0.1",
56
- "@sveltejs/kit": "^2.69.3",
56
+ "@sveltejs/kit": "^2.70.1",
57
57
  "@sveltejs/package": "^2.5.8",
58
58
  "@sveltejs/vite-plugin-svelte": "^7.2.0",
59
59
  "@vitest/coverage-v8": "^4.1.10",
@@ -62,21 +62,21 @@
62
62
  "eslint-config-airbnb-extended": "^3.1.1",
63
63
  "eslint-config-prettier": "^10.1.8",
64
64
  "eslint-plugin-import": "^2.32.0",
65
- "eslint-plugin-jsdoc": "^63.0.13",
66
- "eslint-plugin-package-json": "^1.6.0",
67
- "eslint-plugin-svelte": "^3.20.0",
65
+ "eslint-plugin-jsdoc": "^63.3.0",
66
+ "eslint-plugin-package-json": "^1.6.2",
67
+ "eslint-plugin-svelte": "^3.22.0",
68
68
  "globals": "^17.7.0",
69
- "happy-dom": "^20.10.6",
70
- "oxlint": "^1.74.0",
71
- "postcss": "^8.5.19",
69
+ "happy-dom": "^20.11.1",
70
+ "oxlint": "^1.75.0",
71
+ "postcss": "^8.5.23",
72
72
  "postcss-html": "^1.8.1",
73
- "prettier": "^3.9.5",
73
+ "prettier": "^3.9.6",
74
74
  "prettier-plugin-svelte": "^4.1.1",
75
- "sass": "^1.101.0",
76
- "stylelint": "^17.14.0",
75
+ "sass": "^1.102.0",
76
+ "stylelint": "^17.14.1",
77
77
  "stylelint-config-recommended-scss": "^17.0.1",
78
78
  "stylelint-scss": "^7.2.0",
79
- "svelte": "^5.56.5",
79
+ "svelte": "^5.56.8",
80
80
  "svelte-check": "^4.7.3",
81
81
  "svelte-preprocess": "^6.0.5",
82
82
  "tslib": "^2.8.1",