@ckeditor/ckeditor5-widget 35.3.2 → 36.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. package/LICENSE.md +1 -1
  2. package/lang/contexts.json +2 -1
  3. package/lang/translations/ar.po +4 -0
  4. package/lang/translations/az.po +4 -0
  5. package/lang/translations/bg.po +4 -0
  6. package/lang/translations/bn.po +4 -0
  7. package/lang/translations/ca.po +4 -0
  8. package/lang/translations/cs.po +4 -0
  9. package/lang/translations/da.po +4 -0
  10. package/lang/translations/de-ch.po +4 -0
  11. package/lang/translations/de.po +4 -0
  12. package/lang/translations/el.po +4 -0
  13. package/lang/translations/en-au.po +4 -0
  14. package/lang/translations/en.po +4 -0
  15. package/lang/translations/es.po +4 -0
  16. package/lang/translations/et.po +4 -0
  17. package/lang/translations/fa.po +4 -0
  18. package/lang/translations/fi.po +4 -0
  19. package/lang/translations/fr.po +4 -0
  20. package/lang/translations/gl.po +4 -0
  21. package/lang/translations/he.po +4 -0
  22. package/lang/translations/hi.po +4 -0
  23. package/lang/translations/hr.po +4 -0
  24. package/lang/translations/hu.po +4 -0
  25. package/lang/translations/id.po +4 -0
  26. package/lang/translations/it.po +4 -0
  27. package/lang/translations/ja.po +4 -0
  28. package/lang/translations/ko.po +4 -0
  29. package/lang/translations/ku.po +4 -0
  30. package/lang/translations/lt.po +4 -0
  31. package/lang/translations/lv.po +4 -0
  32. package/lang/translations/ms.po +4 -0
  33. package/lang/translations/nl.po +4 -0
  34. package/lang/translations/no.po +4 -0
  35. package/lang/translations/pl.po +4 -0
  36. package/lang/translations/pt-br.po +4 -0
  37. package/lang/translations/pt.po +4 -0
  38. package/lang/translations/ro.po +4 -0
  39. package/lang/translations/ru.po +4 -0
  40. package/lang/translations/sk.po +4 -0
  41. package/lang/translations/sr-latn.po +4 -0
  42. package/lang/translations/sr.po +4 -0
  43. package/lang/translations/sv.po +4 -0
  44. package/lang/translations/th.po +4 -0
  45. package/lang/translations/tk.po +4 -0
  46. package/lang/translations/tr.po +4 -0
  47. package/lang/translations/uk.po +4 -0
  48. package/lang/translations/ur.po +4 -0
  49. package/lang/translations/uz.po +4 -0
  50. package/lang/translations/vi.po +4 -0
  51. package/lang/translations/zh-cn.po +4 -0
  52. package/lang/translations/zh.po +4 -0
  53. package/package.json +21 -21
  54. package/src/highlightstack.js +8 -8
  55. package/src/index.js +1 -1
  56. package/src/utils.js +19 -15
  57. package/src/verticalnavigation.js +2 -3
  58. package/src/widget.js +5 -6
  59. package/src/widgetresize/resizer.js +4 -6
  60. package/src/widgetresize/resizerstate.js +3 -4
  61. package/src/widgetresize/sizeview.js +2 -2
  62. package/src/widgetresize.js +5 -6
  63. package/src/widgettoolbarrepository.js +11 -8
  64. package/src/widgettypearound/utils.js +1 -1
  65. package/src/widgettypearound/widgettypearound.js +15 -8
  66. package/theme/widget.css +1 -1
  67. package/theme/widgetresize.css +1 -1
  68. package/theme/widgettypearound.css +1 -1
package/LICENSE.md CHANGED
@@ -2,7 +2,7 @@ Software License Agreement
2
2
  ==========================
3
3
 
4
4
  **CKEditor 5 widget API** – https://github.com/ckeditor/ckeditor5-image <br>
5
- Copyright (c) 2003-2022, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
5
+ Copyright (c) 2003-2023, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
6
6
 
7
7
  Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html).
8
8
 
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "Widget toolbar": "The label used by assistive technologies describing a toolbar attached to a widget.",
3
3
  "Insert paragraph before block": "The title displayed when a mouse is over a button that inserts a paragraph before a block.",
4
- "Insert paragraph after block": "The title displayed when a mouse is over a button that inserts a paragraph after a block."
4
+ "Insert paragraph after block": "The title displayed when a mouse is over a button that inserts a paragraph after a block.",
5
+ "Press Enter to type after or press Shift + Enter to type before the widget": "Information to be read by screen reader about shortcuts to type around a widget"
5
6
  }
@@ -27,3 +27,7 @@ msgstr "إدراج فقرة قبل الكتلة"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "إدراج فقرة بعد الكتلة"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "اضغط على Enter للكتابة بعد ذلك أو اضغط على Shift + Enter للكتابة قبل الأداة"
@@ -27,3 +27,7 @@ msgstr ""
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr ""
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr ""
@@ -27,3 +27,7 @@ msgstr "Въведи параграф преди блока"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Въведи параграф след блока"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Натиснете Enter за въвеждане или натиснете Shift + Enter за въвеждане преди изпълнимия модул"
@@ -27,3 +27,7 @@ msgstr "ব্লক করার আগে অনুচ্ছেদ ঢোক
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "ব্লকের পর অনুচ্ছেদ ঢোকান"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "পরে টাইপ করতে এন্টার চাপুন বা উইজেটের আগে টাইপ করতে Shift + এন্টার চাপুন"
@@ -27,3 +27,7 @@ msgstr "Inserir un paràgraf abans del bloc"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Inserir un paràgraf després del bloc"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Premeu Retorn per escriure després o premeu Maj + Retorn per escriure abans del giny"
@@ -27,3 +27,7 @@ msgstr "Vložte odstavec před blok"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Vložte odstavec za blok"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Stisknutím klávesy Enter můžete psát za widgetem a stisknutím Shift + Enter před ním"
@@ -27,3 +27,7 @@ msgstr "Indsæt paragraf før blok"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Indsæt paragraf efter blok"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Tryk på Enter for at skrive efter, eller tryk på Shift + Enter for at skrive før widgetten"
@@ -27,3 +27,7 @@ msgstr "Absatz vor Block einfügen"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Absatz nach Block einfügen"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr ""
@@ -27,3 +27,7 @@ msgstr "Absatz vor Block einfügen"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Absatz nach Block einfügen"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Drücken Sie die Eingabetaste, um nach dem Widget zu tippen oder Shift + Eingabetaste, um vor dem Widget zu tippen."
@@ -27,3 +27,7 @@ msgstr "Εισαγωγή παραγράφου πριν το τμήμα"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Εισαγωγή παραγράφου μετά το τμήμα"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Πατήστε Enter για να πληκτρολογήσετε μετά ή πατήστε Shift + Enter για να πληκτρολογήσετε πριν από το γραφικό στοιχείο"
@@ -27,3 +27,7 @@ msgstr "Insert paragraph before block"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Insert paragraph after block"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr ""
@@ -27,3 +27,7 @@ msgstr "Insert paragraph before block"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Insert paragraph after block"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Press Enter to type after or press Shift + Enter to type before the widget"
@@ -27,3 +27,7 @@ msgstr "Insertar párrafo antes del bloque"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Insertar párrafo después del bloque"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Pulse Intro para escribir después o pulse Mayús + Intro para escribir antes del «widget»."
@@ -27,3 +27,7 @@ msgstr "Sisesta lõik enne plokki"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Sisesta lõik pärast plokki"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Vajutage Enter, et tippida pärast, või Shift + Enter, et tippida enne vidinat"
@@ -27,3 +27,7 @@ msgstr "درج پاراگراف قبل از بلوک"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "درج پاراگراف بعد از بلوک"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr ""
@@ -27,3 +27,7 @@ msgstr "Liitä kappale ennen lohkoa"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Liitä kappale lohkon jälkeen"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Paina enter-näppäintä kirjoittaaksesi tai paina shift + enter kirjoittaaksesi ennen widget-sovellusta"
@@ -27,3 +27,7 @@ msgstr "Insérer du texte avant ce bloc"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Insérer du texte après ce bloc"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Appuyez sur la touche Entrée pour taper après ou sur Maj + Entrée pour taper avant le widget."
@@ -27,3 +27,7 @@ msgstr "Inserir parágrafo antes do bloque"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Inserir parágrafo após o bloque"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr ""
@@ -27,3 +27,7 @@ msgstr "הוספת פסקה מעל"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "הוספת פסקה מתחת"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "לחץ Enter כדי להקליד לפני היישומון או Shift + Enter כדי להקליד אחריו"
@@ -27,3 +27,7 @@ msgstr "Insert paragraph before block"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Insert paragraph after block"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "विजेट के बाद टाइप करने के लिए एंटर दबाएं या पहले टाइप करने के लिए शिफ्ट+एंटर दबाएं"
@@ -27,3 +27,7 @@ msgstr "Umetni odlomak prije bloka"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Umetni odlomak poslije bloka"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr ""
@@ -27,3 +27,7 @@ msgstr "Bekezdés beszúrása elé"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Bekezdés beszúrása utána"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Az Enter billentyű megnyomásával a widget után, a Shift + Enter kombinációval pedig a widget előtt írhatja be a szöveget"
@@ -27,3 +27,7 @@ msgstr "Tambahkan paragraf sebelum blok"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Tambahkan paragraf setelah blok"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Tekan Enter untuk mengetik setelah atau tekan Shift + Enter untuk mengetik sebelum widget"
@@ -27,3 +27,7 @@ msgstr "Inserisci paragrafo prima di blocco"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Inserisci paragrafo dopo blocco"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Premere Invio per inserire dopo il widget o premere Maiusc + Invio per inserire prima del widget"
@@ -27,3 +27,7 @@ msgstr "ブロックの前にパラグラフを挿入"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "ブロックの後にパラグラフを挿入"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Enterを押してウィジェットの後に入力するか、Shift + Enterを押してウィジェットの前に入力してください"
@@ -27,3 +27,7 @@ msgstr "블록 앞에 단락 삽입"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "블록 뒤에 단락 삽입"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "엔터를 눌러서 위젯 뒤에 입력하거나 시프트 + 엔터를 눌러서 위젯 앞에 입력하세요"
@@ -27,3 +27,7 @@ msgstr ""
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr ""
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr ""
@@ -27,3 +27,7 @@ msgstr "Įkelti pastraipą prieš bloką"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Įkelti pastraipą po bloko"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Paspauskite Enter, jei norite rašyti po valdiklio, arba paspauskite Shift + Enter, jei norite rašyti prieš valdiklį."
@@ -27,3 +27,7 @@ msgstr "Ievietot paragrāfu pirms bloka"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Ievietot paragrāfu aiz bloka"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Nospiediet taustiņu Enter, lai rakstītu aiz logrīka, vai nospiediet taustiņu Shift + Enter, lai rakstītu pirms logrīka"
@@ -27,3 +27,7 @@ msgstr "Masukkan perenggan sebelum blok"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Masukkan perenggan sebelum blok"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Tekan Enter untuk menaip selepas atau tekan Shift + Enter untuk menaip sebelum widget"
@@ -27,3 +27,7 @@ msgstr "Voeg paragraaf toe voor blok"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Voeg paragraaf toe na blok"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Druk op Enter om na de widget te typen of druk op Shift + Enter om vóór de widget te typen"
@@ -27,3 +27,7 @@ msgstr "Sett inn paragraf foran blokk"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Sett inn paragraf etter blokk"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Trykk Enter for å skrive etter eller trykk Shift + Enter for å skrive før widgeten"
@@ -27,3 +27,7 @@ msgstr "Wstaw akapit przed blokiem"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Wstaw akapit po bloku"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Naciśnij Enter, aby pisać po widżecie, lub Shift + Enter, aby pisać przed widżetem"
@@ -27,3 +27,7 @@ msgstr "Inserir parágrafo antes do bloco"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Inserir parágrafo após o bloco"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Pressione Enter para digitar depois ou pressione Shift + Enter para digitar antes do widget"
@@ -27,3 +27,7 @@ msgstr "Inserir parágrafo antes do bloco"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Inserir parágrafo após o bloco"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Prima Enter para escrever depois ou Shift + Enter para escrever antes do widget"
@@ -27,3 +27,7 @@ msgstr "Inserează un paragraf înaintea blocului"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Inserează un paragraf după bloc"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Apăsați Enter pentru a scrie după widget sau Shift+Enter pentru a scrie înaintea acestuia"
@@ -27,3 +27,7 @@ msgstr "Вставить параграф перед блоком"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Вставить параграф после блока"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Нажмите Enter для ввода текста после виджета или нажмите Shift + Enter для ввода текста перед виджетом"
@@ -27,3 +27,7 @@ msgstr "Vložiť odstavec pred blok"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Vložiť odstavec za blok"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Stlačte Enter, ak chcete písať po miniaplikácii, alebo stlačte Shift + Enter, ak chcete písať pred miniaplikáciou"
@@ -27,3 +27,7 @@ msgstr "Уметните одломак пре блока"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Уметните одломак после блока"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Pritisnite Enter da kucate posle ili pritisnite Shift + Enter da kucate pre vidžeta"
@@ -27,3 +27,7 @@ msgstr "Umetnite odlomak pre bloka"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Umetnite odlomak posle bloka"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Притисните Ентер да куцате после или притисните Схифт + Ентер да куцате пре виџета"
@@ -27,3 +27,7 @@ msgstr "Infoga stycke före block"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Infoga stycke efter block"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Tryck på retur för att skriva efter eller på skift + retur för att skriva före widgeten."
@@ -27,3 +27,7 @@ msgstr "แทรกย่อหน้าก่อนบล็อก"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "แทรกย่อหน้าหลังบล็อก"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "กด Enter เพื่อพิมพ์หลังจาก หรือกด Shift + Enter เพื่อพิมพ์ก่อนหน้าวิดเจ็ต"
@@ -27,3 +27,7 @@ msgstr "Blokdan öň abzas goýuň"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Blokdan soň abzas goýuň"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr ""
@@ -27,3 +27,7 @@ msgstr "Bloktan önce paragraf ekle"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Bloktan sonra paragraf ekle"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Görsel bileşenden sonra yazmak için Enter'a basın ya da görsel bileşenden önce yazmak için Shift + Enter'a basın"
@@ -27,3 +27,7 @@ msgstr "Додати абзац перед блоком"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Додати абзац після блока"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Натисніть Enter, щоб друкувати після або натисніть Shift + Enter, щоб друкувати перед віджетом"
@@ -27,3 +27,7 @@ msgstr "پیراگراف سے پہلے کوڈ خانہ نصب کریں"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "پیراگراف کے بعد کوڈ خانہ نصب کریں"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr ""
@@ -27,3 +27,7 @@ msgstr "Blokdan oldin paragrafni kiritish"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Вblokdan keyin paragraf qo'yish"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr ""
@@ -27,3 +27,7 @@ msgstr "Chèn đoạn trước khối"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "Chèn đoạn sau khối"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "Nhấn Enter để nhập vào sau hoặc nhấn Shift + Enter để nhập vào trước tiện ích"
@@ -27,3 +27,7 @@ msgstr "在前面插入段落"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "在后面插入段落"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "按下“Enter”键,在小组件后输入;按下“Shift+Enter”键,在小组件前输入"
@@ -27,3 +27,7 @@ msgstr "在這個區塊前面插入一個段落"
27
27
  msgctxt "The title displayed when a mouse is over a button that inserts a paragraph after a block."
28
28
  msgid "Insert paragraph after block"
29
29
  msgstr "在這個區塊後面插入一個段落"
30
+
31
+ msgctxt "Information to be read by screen reader about shortcuts to type around a widget"
32
+ msgid "Press Enter to type after or press Shift + Enter to type before the widget"
33
+ msgstr "按下 Enter 在小工具後輸入,或按下 Shift + Enter 在小工具前輸入"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-widget",
3
- "version": "35.3.2",
3
+ "version": "36.0.0",
4
4
  "description": "Widget API for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -11,29 +11,29 @@
11
11
  ],
12
12
  "main": "src/index.js",
13
13
  "dependencies": {
14
- "@ckeditor/ckeditor5-core": "^35.3.2",
15
- "@ckeditor/ckeditor5-engine": "^35.3.2",
16
- "@ckeditor/ckeditor5-enter": "^35.3.2",
17
- "@ckeditor/ckeditor5-ui": "^35.3.2",
18
- "@ckeditor/ckeditor5-utils": "^35.3.2",
19
- "@ckeditor/ckeditor5-typing": "^35.3.2",
14
+ "@ckeditor/ckeditor5-core": "^36.0.0",
15
+ "@ckeditor/ckeditor5-engine": "^36.0.0",
16
+ "@ckeditor/ckeditor5-enter": "^36.0.0",
17
+ "@ckeditor/ckeditor5-ui": "^36.0.0",
18
+ "@ckeditor/ckeditor5-utils": "^36.0.0",
19
+ "@ckeditor/ckeditor5-typing": "^36.0.0",
20
20
  "lodash-es": "^4.17.15"
21
21
  },
22
22
  "devDependencies": {
23
- "@ckeditor/ckeditor5-basic-styles": "^35.3.2",
24
- "@ckeditor/ckeditor5-block-quote": "^35.3.2",
25
- "@ckeditor/ckeditor5-clipboard": "^35.3.2",
26
- "@ckeditor/ckeditor5-editor-balloon": "^35.3.2",
27
- "@ckeditor/ckeditor5-editor-classic": "^35.3.2",
28
- "@ckeditor/ckeditor5-essentials": "^35.3.2",
29
- "@ckeditor/ckeditor5-heading": "^35.3.2",
30
- "@ckeditor/ckeditor5-horizontal-line": "^35.3.2",
31
- "@ckeditor/ckeditor5-image": "^35.3.2",
32
- "@ckeditor/ckeditor5-link": "^35.3.2",
33
- "@ckeditor/ckeditor5-media-embed": "^35.3.2",
34
- "@ckeditor/ckeditor5-paragraph": "^35.3.2",
35
- "@ckeditor/ckeditor5-table": "^35.3.2",
36
- "@ckeditor/ckeditor5-undo": "^35.3.2",
23
+ "@ckeditor/ckeditor5-basic-styles": "^36.0.0",
24
+ "@ckeditor/ckeditor5-block-quote": "^36.0.0",
25
+ "@ckeditor/ckeditor5-clipboard": "^36.0.0",
26
+ "@ckeditor/ckeditor5-editor-balloon": "^36.0.0",
27
+ "@ckeditor/ckeditor5-editor-classic": "^36.0.0",
28
+ "@ckeditor/ckeditor5-essentials": "^36.0.0",
29
+ "@ckeditor/ckeditor5-heading": "^36.0.0",
30
+ "@ckeditor/ckeditor5-horizontal-line": "^36.0.0",
31
+ "@ckeditor/ckeditor5-image": "^36.0.0",
32
+ "@ckeditor/ckeditor5-link": "^36.0.0",
33
+ "@ckeditor/ckeditor5-media-embed": "^36.0.0",
34
+ "@ckeditor/ckeditor5-paragraph": "^36.0.0",
35
+ "@ckeditor/ckeditor5-table": "^36.0.0",
36
+ "@ckeditor/ckeditor5-undo": "^36.0.0",
37
37
  "typescript": "^4.8.4",
38
38
  "webpack": "^5.58.1",
39
39
  "webpack-cli": "^4.9.0"
@@ -1,15 +1,15 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module widget/highlightstack
7
7
  */
8
- import { Emitter } from '@ckeditor/ckeditor5-utils/src/emittermixin';
8
+ import { EmitterMixin } from '@ckeditor/ckeditor5-utils';
9
9
  /**
10
- * Class used to handle correct order of highlights on elements.
10
+ * Class used to handle the correct order of highlights on elements.
11
11
  *
12
- * When different highlights are applied to same element correct order should be preserved:
12
+ * When different highlights are applied to same element the correct order should be preserved:
13
13
  *
14
14
  * * highlight with highest priority should be applied,
15
15
  * * if two highlights have same priority - sort by CSS class provided in
@@ -17,7 +17,7 @@ import { Emitter } from '@ckeditor/ckeditor5-utils/src/emittermixin';
17
17
  *
18
18
  * This way, highlight will be applied with the same rules it is applied on texts.
19
19
  */
20
- export default class HighlightStack extends Emitter {
20
+ export default class HighlightStack extends EmitterMixin() {
21
21
  /**
22
22
  * Creates class instance.
23
23
  */
@@ -69,8 +69,8 @@ export default class HighlightStack extends Emitter {
69
69
  }
70
70
  }
71
71
  /**
72
- * Inserts given descriptor in correct place in the stack. It also takes care about updating information when
73
- * descriptor with same id is already present.
72
+ * Inserts a given descriptor in correct place in the stack. It also takes care about updating information
73
+ * when descriptor with same id is already present.
74
74
  *
75
75
  * @private
76
76
  * @param {module:engine/conversion/downcasthelpers~HighlightDescriptor} descriptor
@@ -87,7 +87,7 @@ export default class HighlightStack extends Emitter {
87
87
  stack.splice(index, 1);
88
88
  }
89
89
  // Find correct place to insert descriptor in the stack.
90
- // It have different information (for example priority) so it must be re-inserted in correct place.
90
+ // It has different information (for example priority) so it must be re-inserted in correct place.
91
91
  let i = 0;
92
92
  while (stack[i] && shouldABeBeforeB(stack[i], descriptor)) {
93
93
  i++;
package/src/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  export { default as Widget } from './widget';
package/src/utils.js CHANGED
@@ -1,16 +1,15 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module widget/utils
7
7
  */
8
- import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
9
- import toArray from '@ckeditor/ckeditor5-utils/src/toarray';
10
- import { findOptimalInsertionRange as engineFindOptimalInsertionRange } from '@ckeditor/ckeditor5-engine/src/model/utils/findoptimalinsertionrange';
8
+ import { CKEditorError, toArray } from '@ckeditor/ckeditor5-utils';
9
+ import { findOptimalInsertionRange as engineFindOptimalInsertionRange } from '@ckeditor/ckeditor5-engine';
10
+ import { IconView } from '@ckeditor/ckeditor5-ui';
11
11
  import HighlightStack from './highlightstack';
12
12
  import { getTypeAroundFakeCaretPosition } from './widgettypearound/utils';
13
- import IconView from '@ckeditor/ckeditor5-ui/src/icon/iconview';
14
13
  import dragHandleIcon from '../theme/icons/drag-handle.svg';
15
14
  /**
16
15
  * CSS class added to each widget element.
@@ -97,8 +96,9 @@ export function toWidget(element, writer, options = {}) {
97
96
  writer.addClass(WIDGET_CLASS_NAME, element);
98
97
  writer.setCustomProperty('widget', true, element);
99
98
  element.getFillerOffset = getFillerOffset;
99
+ writer.setCustomProperty('widgetLabel', [], element);
100
100
  if (options.label) {
101
- setLabel(element, options.label, writer);
101
+ setLabel(element, options.label);
102
102
  }
103
103
  if (options.hasSelectionHandle) {
104
104
  addSelectionHandle(element, writer);
@@ -168,11 +168,11 @@ export function setHighlightHandling(element, writer, add = addHighlight, remove
168
168
  * {@link ~getLabel `getLabel()`}.
169
169
  *
170
170
  * @param {module:engine/view/element~Element} element
171
- * @param {String|Function} labelOrCreator
172
- * @param {module:engine/view/downcastwriter~DowncastWriter} writer
171
+ * @param {string|Function} labelOrCreator
173
172
  */
174
- export function setLabel(element, labelOrCreator, writer) {
175
- writer.setCustomProperty('widgetLabel', labelOrCreator, element);
173
+ export function setLabel(element, labelOrCreator) {
174
+ const widgetLabel = element.getCustomProperty('widgetLabel');
175
+ widgetLabel.push(labelOrCreator);
176
176
  }
177
177
  /**
178
178
  * Returns the label of the provided element.
@@ -181,11 +181,15 @@ export function setLabel(element, labelOrCreator, writer) {
181
181
  * @returns {String}
182
182
  */
183
183
  export function getLabel(element) {
184
- const labelCreator = element.getCustomProperty('widgetLabel');
185
- if (!labelCreator) {
186
- return '';
187
- }
188
- return typeof labelCreator == 'function' ? labelCreator() : labelCreator;
184
+ const widgetLabel = element.getCustomProperty('widgetLabel');
185
+ return widgetLabel.reduce((prev, current) => {
186
+ if (typeof current === 'function') {
187
+ return prev ? prev + '. ' + current() : current();
188
+ }
189
+ else {
190
+ return prev ? prev + '. ' + current : current;
191
+ }
192
+ }, '');
189
193
  }
190
194
  /**
191
195
  * Adds functionality to the provided {@link module:engine/view/editableelement~EditableElement} to act as a widget's editable:
@@ -1,9 +1,8 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
- import { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard';
6
- import Rect from '@ckeditor/ckeditor5-utils/src/dom/rect';
5
+ import { keyCodes, Rect } from '@ckeditor/ckeditor5-utils';
7
6
  /**
8
7
  * @module widget/verticalnavigationhandler
9
8
  */
package/src/widget.js CHANGED
@@ -1,16 +1,15 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module widget/widget
7
7
  */
8
- import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
9
- import MouseObserver from '@ckeditor/ckeditor5-engine/src/view/observer/mouseobserver';
8
+ import { Plugin } from '@ckeditor/ckeditor5-core';
9
+ import { MouseObserver } from '@ckeditor/ckeditor5-engine';
10
+ import { Delete } from '@ckeditor/ckeditor5-typing';
11
+ import { env, getLocalizedArrowKeyCodeDirection } from '@ckeditor/ckeditor5-utils';
10
12
  import WidgetTypeAround from './widgettypearound/widgettypearound';
11
- import Delete from '@ckeditor/ckeditor5-typing/src/delete';
12
- import env from '@ckeditor/ckeditor5-utils/src/env';
13
- import { getLocalizedArrowKeyCodeDirection } from '@ckeditor/ckeditor5-utils/src/keyboard';
14
13
  import verticalNavigationHandler from './verticalnavigation';
15
14
  import { getLabel, isWidget, WIDGET_SELECTED_CLASS_NAME } from './utils';
16
15
  import '../theme/widget.css';
@@ -1,14 +1,12 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module widget/widgetresize/resizer
7
7
  */
8
- import Template from '@ckeditor/ckeditor5-ui/src/template';
9
- import Rect from '@ckeditor/ckeditor5-utils/src/dom/rect';
10
- import compareArrays from '@ckeditor/ckeditor5-utils/src/comparearrays';
11
- import { Observable } from '@ckeditor/ckeditor5-utils/src/observablemixin';
8
+ import { Template } from '@ckeditor/ckeditor5-ui';
9
+ import { Rect, ObservableMixin, compareArrays } from '@ckeditor/ckeditor5-utils';
12
10
  import ResizeState from './resizerstate';
13
11
  import SizeView from './sizeview';
14
12
  /**
@@ -16,7 +14,7 @@ import SizeView from './sizeview';
16
14
  *
17
15
  * @mixes module:utils/observablemixin~ObservableMixin
18
16
  */
19
- export default class Resizer extends Observable {
17
+ export default class Resizer extends ObservableMixin() {
20
18
  /**
21
19
  * @param {module:widget/widgetresize~ResizerOptions} options Resizer options.
22
20
  */
@@ -1,17 +1,16 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module widget/widgetresize/resizerstate
7
7
  */
8
- import Rect from '@ckeditor/ckeditor5-utils/src/dom/rect';
9
- import { Observable } from '@ckeditor/ckeditor5-utils/src/observablemixin';
8
+ import { ObservableMixin, Rect } from '@ckeditor/ckeditor5-utils';
10
9
  /**
11
10
  * Stores the internal state of a single resizable object.
12
11
  *
13
12
  */
14
- export default class ResizeState extends Observable {
13
+ export default class ResizeState extends ObservableMixin() {
15
14
  /**
16
15
  * @param {module:widget/widgetresize~ResizerOptions} options Resizer options.
17
16
  */
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module widget/widgetresize/sizeview
7
7
  */
8
- import View from '@ckeditor/ckeditor5-ui/src/view';
8
+ import { View } from '@ckeditor/ckeditor5-ui';
9
9
  /**
10
10
  * A view displaying the proposed new element size during the resizing.
11
11
  *
@@ -1,15 +1,14 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module widget/widgetresize
7
7
  */
8
- import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
9
8
  import Resizer from './widgetresize/resizer';
10
- import { Emitter as DomEmitter } from '@ckeditor/ckeditor5-utils/src/dom/emittermixin';
11
- import global from '@ckeditor/ckeditor5-utils/src/dom/global';
12
- import MouseObserver from '@ckeditor/ckeditor5-engine/src/view/observer/mouseobserver';
9
+ import { Plugin } from '@ckeditor/ckeditor5-core';
10
+ import { MouseObserver } from '@ckeditor/ckeditor5-engine';
11
+ import { DomEmitterMixin, global } from '@ckeditor/ckeditor5-utils';
13
12
  import { throttle } from 'lodash-es';
14
13
  import '../theme/widgetresize.css';
15
14
  /**
@@ -58,7 +57,7 @@ export default class WidgetResize extends Plugin {
58
57
  */
59
58
  this._resizers = new Map();
60
59
  editing.view.addObserver(MouseObserver);
61
- this._observer = new DomEmitter();
60
+ this._observer = new (DomEmitterMixin())();
62
61
  this.listenTo(editing.view.document, 'mousedown', this._mouseDownListener.bind(this), { priority: 'high' });
63
62
  this._observer.listenTo(domDocument, 'mousemove', this._mouseMoveListener.bind(this));
64
63
  this._observer.listenTo(domDocument, 'mouseup', this._mouseUpListener.bind(this));
@@ -1,16 +1,14 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module widget/widgettoolbarrepository
7
7
  */
8
- import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
9
- import ContextualBalloon from '@ckeditor/ckeditor5-ui/src/panel/balloon/contextualballoon';
10
- import ToolbarView from '@ckeditor/ckeditor5-ui/src/toolbar/toolbarview';
11
- import BalloonPanelView from '@ckeditor/ckeditor5-ui/src/panel/balloon/balloonpanelview';
8
+ import { Plugin } from '@ckeditor/ckeditor5-core';
9
+ import { BalloonPanelView, ContextualBalloon, ToolbarView } from '@ckeditor/ckeditor5-ui';
10
+ import { CKEditorError, logWarning } from '@ckeditor/ckeditor5-utils';
12
11
  import { isWidget } from './utils';
13
- import CKEditorError, { logWarning } from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
14
12
  /**
15
13
  * Widget toolbar repository plugin. A central point for registering widget toolbars. This plugin handles the whole
16
14
  * toolbar rendering process and exposes a concise API.
@@ -138,11 +136,12 @@ export default class WidgetToolbarRepository extends Plugin {
138
136
  */
139
137
  throw new CKEditorError('widget-toolbar-duplicated', this, { toolbarId });
140
138
  }
141
- toolbarView.fillFromConfig(items, editor.ui.componentFactory);
142
139
  const toolbarDefinition = {
143
140
  view: toolbarView,
144
141
  getRelatedElement,
145
- balloonClassName
142
+ balloonClassName,
143
+ itemsConfig: items,
144
+ initialized: false
146
145
  };
147
146
  // Register the toolbar so it becomes available for Alt+F10 and Esc navigation.
148
147
  editor.ui.addToolbar(toolbarView, {
@@ -223,6 +222,10 @@ export default class WidgetToolbarRepository extends Plugin {
223
222
  repositionContextualBalloon(this.editor, relatedElement);
224
223
  }
225
224
  else if (!this._isToolbarInBalloon(toolbarDefinition)) {
225
+ if (!toolbarDefinition.initialized) {
226
+ toolbarDefinition.initialized = true;
227
+ toolbarDefinition.view.fillFromConfig(toolbarDefinition.itemsConfig, this.editor.ui.componentFactory);
228
+ }
226
229
  this._balloon.add({
227
230
  view: toolbarDefinition.view,
228
231
  position: getBalloonPositionData(this.editor, relatedElement),
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
@@ -1,21 +1,20 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /* global DOMParser */
6
6
  /**
7
7
  * @module widget/widgettypearound
8
8
  */
9
- import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
10
- import Template from '@ckeditor/ckeditor5-ui/src/template';
11
- import Enter from '@ckeditor/ckeditor5-enter/src/enter';
12
- import Delete from '@ckeditor/ckeditor5-typing/src/delete';
13
- import { isForwardArrowKeyCode } from '@ckeditor/ckeditor5-utils/src/keyboard';
9
+ import { Plugin } from '@ckeditor/ckeditor5-core';
10
+ import { Template } from '@ckeditor/ckeditor5-ui';
11
+ import { Enter } from '@ckeditor/ckeditor5-enter';
12
+ import { Delete } from '@ckeditor/ckeditor5-typing';
13
+ import { env, isForwardArrowKeyCode } from '@ckeditor/ckeditor5-utils';
14
14
  import { isTypeAroundWidget, getClosestTypeAroundDomButton, getTypeAroundButtonPosition, getClosestWidgetViewElement, getTypeAroundFakeCaretPosition, TYPE_AROUND_SELECTION_ATTRIBUTE } from './utils';
15
15
  import { isWidget } from '../utils';
16
16
  import returnIcon from '../../theme/icons/return-arrow.svg';
17
17
  import '../../theme/widgettypearound.css';
18
- import env from '@ckeditor/ckeditor5-utils/src/env';
19
18
  const POSSIBLE_INSERTION_POSITIONS = ['before', 'after'];
20
19
  // Do the SVG parsing once and then clone the result <svg> DOM element for each new button.
21
20
  const RETURN_ARROW_ICON_ELEMENT = new DOMParser().parseFromString(returnIcon, 'image/svg+xml').firstChild;
@@ -192,9 +191,16 @@ export default class WidgetTypeAround extends Plugin {
192
191
  };
193
192
  editor.editing.downcastDispatcher.on('insert', (evt, data, conversionApi) => {
194
193
  const viewElement = conversionApi.mapper.toViewElement(data.item);
194
+ if (!viewElement) {
195
+ return;
196
+ }
195
197
  // Filter out non-widgets and inline widgets.
196
198
  if (isTypeAroundWidget(viewElement, data.item, schema)) {
197
199
  injectUIIntoWidget(conversionApi.writer, buttonTitles, viewElement);
200
+ const widgetLabel = viewElement.getCustomProperty('widgetLabel');
201
+ widgetLabel.push(() => {
202
+ return this.isEnabled ? t('Press Enter to type after or press Shift + Enter to type before the widget') : '';
203
+ });
198
204
  }
199
205
  }, { priority: 'low' });
200
206
  }
@@ -761,7 +767,8 @@ function injectButtons(wrapperDomElement, buttonTitles) {
761
767
  'ck-widget__type-around__button',
762
768
  `ck-widget__type-around__button_${position}`
763
769
  ],
764
- title: buttonTitles[position]
770
+ title: buttonTitles[position],
771
+ 'aria-hidden': 'true'
765
772
  },
766
773
  children: [
767
774
  wrapperDomElement.ownerDocument.importNode(RETURN_ARROW_ICON_ELEMENT, true)
package/theme/widget.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5