@atlaskit/editor-common 60.1.0 → 61.0.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 (221) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/card/package.json +7 -0
  3. package/dist/cjs/card/cardOptions.js +5 -0
  4. package/dist/cjs/emoji.js +23 -0
  5. package/dist/cjs/extensions/extension-fields-helpers.js +1 -1
  6. package/dist/cjs/extensions/index.js +46 -40
  7. package/dist/cjs/extensions/manifest-helpers.js +3 -1
  8. package/dist/cjs/extensions/module-helpers.js +3 -1
  9. package/dist/cjs/extensions/types/field-definitions.js +7 -1
  10. package/dist/cjs/extensions/types/index.js +14 -8
  11. package/dist/cjs/extensions.js +38 -32
  12. package/dist/cjs/i18n/cs.js +1 -0
  13. package/dist/cjs/i18n/da.js +1 -0
  14. package/dist/cjs/i18n/de.js +1 -0
  15. package/dist/cjs/i18n/es.js +1 -0
  16. package/dist/cjs/i18n/fi.js +1 -0
  17. package/dist/cjs/i18n/fr.js +1 -0
  18. package/dist/cjs/i18n/hu.js +1 -0
  19. package/dist/cjs/i18n/index.js +26 -26
  20. package/dist/cjs/i18n/it.js +1 -0
  21. package/dist/cjs/i18n/ja.js +1 -0
  22. package/dist/cjs/i18n/ko.js +1 -0
  23. package/dist/cjs/i18n/nb.js +1 -0
  24. package/dist/cjs/i18n/nl.js +1 -0
  25. package/dist/cjs/i18n/pl.js +1 -0
  26. package/dist/cjs/i18n/pt_BR.js +1 -0
  27. package/dist/cjs/i18n/ru.js +1 -0
  28. package/dist/cjs/i18n/sv.js +1 -0
  29. package/dist/cjs/i18n/th.js +1 -0
  30. package/dist/cjs/i18n/tr.js +1 -0
  31. package/dist/cjs/i18n/uk.js +1 -0
  32. package/dist/cjs/i18n/vi.js +1 -0
  33. package/dist/cjs/i18n/zh.js +1 -1
  34. package/dist/cjs/i18n/zh_TW.js +1 -0
  35. package/dist/cjs/in-product.js +14 -14
  36. package/dist/cjs/index.js +314 -302
  37. package/dist/cjs/mention.js +23 -0
  38. package/dist/cjs/messages/codeBidiWarning.js +21 -0
  39. package/dist/cjs/messages/index.js +8 -0
  40. package/dist/cjs/provider-factory/context.js +1 -1
  41. package/dist/cjs/provider-factory.js +6 -6
  42. package/dist/cjs/provider-helpers/promise-helpers.js +1 -1
  43. package/dist/cjs/styles/index.js +86 -80
  44. package/dist/cjs/styles/shared/annotation.js +1 -1
  45. package/dist/cjs/styles/shared/block-marks.js +1 -1
  46. package/dist/cjs/styles/shared/media-single.js +1 -1
  47. package/dist/cjs/styles/shared/panel.js +90 -37
  48. package/dist/cjs/styles/shared/table.js +3 -3
  49. package/dist/cjs/type-ahead/index.js +1 -1
  50. package/dist/cjs/types/annotation/emitter.js +1 -1
  51. package/dist/cjs/ufo/experience-store.js +160 -0
  52. package/dist/cjs/ufo/index.js +25 -0
  53. package/dist/cjs/ui/BaseTheme/index.js +2 -2
  54. package/dist/cjs/ui/Expand/index.js +1 -1
  55. package/dist/cjs/ui/MediaSingle/grid.js +2 -2
  56. package/dist/cjs/ui/MediaSingle/index.js +2 -1
  57. package/dist/cjs/ui/MediaSingle/styled.js +1 -1
  58. package/dist/cjs/ui/Messages/index.js +1 -1
  59. package/dist/cjs/ui/Popup/index.js +1 -1
  60. package/dist/cjs/ui/Popup/utils.js +5 -5
  61. package/dist/cjs/ui/WidthProvider/index.js +2 -2
  62. package/dist/cjs/ui/index.js +72 -72
  63. package/dist/cjs/utils/analytics.js +6 -5
  64. package/dist/cjs/utils/breakout.js +1 -1
  65. package/dist/cjs/utils/compareNodes.js +6 -0
  66. package/dist/cjs/utils/date.js +1 -1
  67. package/dist/cjs/utils/index.js +129 -107
  68. package/dist/cjs/utils/performance/measure-tti.js +2 -2
  69. package/dist/cjs/utils/performance/measure.js +1 -1
  70. package/dist/cjs/utils/profiler/render-count.js +135 -0
  71. package/dist/cjs/utils/table.js +1 -1
  72. package/dist/cjs/utils/validate-using-spec.js +1 -1
  73. package/dist/cjs/utils/validator.js +47 -27
  74. package/dist/cjs/version.json +1 -1
  75. package/dist/es2019/card/cardOptions.js +1 -0
  76. package/dist/es2019/emoji.js +2 -0
  77. package/dist/es2019/extensions/index.js +1 -1
  78. package/dist/es2019/extensions/types/field-definitions.js +3 -0
  79. package/dist/es2019/extensions/types/index.js +1 -1
  80. package/dist/es2019/extensions.js +1 -1
  81. package/dist/es2019/i18n/cs.js +1 -0
  82. package/dist/es2019/i18n/da.js +1 -0
  83. package/dist/es2019/i18n/de.js +1 -0
  84. package/dist/es2019/i18n/es.js +1 -0
  85. package/dist/es2019/i18n/fi.js +1 -0
  86. package/dist/es2019/i18n/fr.js +1 -0
  87. package/dist/es2019/i18n/hu.js +1 -0
  88. package/dist/es2019/i18n/it.js +1 -0
  89. package/dist/es2019/i18n/ja.js +1 -0
  90. package/dist/es2019/i18n/ko.js +1 -0
  91. package/dist/es2019/i18n/nb.js +1 -0
  92. package/dist/es2019/i18n/nl.js +1 -0
  93. package/dist/es2019/i18n/pl.js +1 -0
  94. package/dist/es2019/i18n/pt_BR.js +1 -0
  95. package/dist/es2019/i18n/ru.js +1 -0
  96. package/dist/es2019/i18n/sv.js +1 -0
  97. package/dist/es2019/i18n/th.js +1 -0
  98. package/dist/es2019/i18n/tr.js +1 -0
  99. package/dist/es2019/i18n/uk.js +1 -0
  100. package/dist/es2019/i18n/vi.js +1 -0
  101. package/dist/es2019/i18n/zh.js +1 -1
  102. package/dist/es2019/i18n/zh_TW.js +1 -0
  103. package/dist/es2019/index.js +26 -8
  104. package/dist/es2019/mention.js +2 -0
  105. package/dist/es2019/messages/codeBidiWarning.js +12 -0
  106. package/dist/es2019/messages/index.js +1 -0
  107. package/dist/es2019/styles/index.js +4 -2
  108. package/dist/es2019/styles/shared/block-marks.js +1 -2
  109. package/dist/es2019/styles/shared/media-single.js +10 -0
  110. package/dist/es2019/styles/shared/panel.js +99 -45
  111. package/dist/es2019/styles/shared/table.js +2 -1
  112. package/dist/es2019/ufo/experience-store.js +116 -0
  113. package/dist/es2019/ufo/index.js +1 -0
  114. package/dist/es2019/ui/index.js +8 -3
  115. package/dist/es2019/utils/compareNodes.js +6 -0
  116. package/dist/es2019/utils/index.js +3 -1
  117. package/dist/es2019/utils/profiler/render-count.js +107 -0
  118. package/dist/es2019/utils/validator.js +36 -13
  119. package/dist/es2019/version.json +1 -1
  120. package/dist/esm/card/cardOptions.js +1 -0
  121. package/dist/esm/emoji.js +2 -0
  122. package/dist/esm/extensions/index.js +1 -1
  123. package/dist/esm/extensions/types/field-definitions.js +3 -0
  124. package/dist/esm/extensions/types/index.js +1 -1
  125. package/dist/esm/extensions.js +1 -1
  126. package/dist/esm/i18n/cs.js +1 -0
  127. package/dist/esm/i18n/da.js +1 -0
  128. package/dist/esm/i18n/de.js +1 -0
  129. package/dist/esm/i18n/es.js +1 -0
  130. package/dist/esm/i18n/fi.js +1 -0
  131. package/dist/esm/i18n/fr.js +1 -0
  132. package/dist/esm/i18n/hu.js +1 -0
  133. package/dist/esm/i18n/it.js +1 -0
  134. package/dist/esm/i18n/ja.js +1 -0
  135. package/dist/esm/i18n/ko.js +1 -0
  136. package/dist/esm/i18n/nb.js +1 -0
  137. package/dist/esm/i18n/nl.js +1 -0
  138. package/dist/esm/i18n/pl.js +1 -0
  139. package/dist/esm/i18n/pt_BR.js +1 -0
  140. package/dist/esm/i18n/ru.js +1 -0
  141. package/dist/esm/i18n/sv.js +1 -0
  142. package/dist/esm/i18n/th.js +1 -0
  143. package/dist/esm/i18n/tr.js +1 -0
  144. package/dist/esm/i18n/uk.js +1 -0
  145. package/dist/esm/i18n/vi.js +1 -0
  146. package/dist/esm/i18n/zh.js +1 -1
  147. package/dist/esm/i18n/zh_TW.js +1 -0
  148. package/dist/esm/index.js +26 -8
  149. package/dist/esm/mention.js +2 -0
  150. package/dist/esm/messages/codeBidiWarning.js +12 -0
  151. package/dist/esm/messages/index.js +1 -0
  152. package/dist/esm/styles/index.js +4 -2
  153. package/dist/esm/styles/shared/block-marks.js +1 -1
  154. package/dist/esm/styles/shared/media-single.js +1 -1
  155. package/dist/esm/styles/shared/panel.js +84 -37
  156. package/dist/esm/styles/shared/table.js +2 -2
  157. package/dist/esm/ufo/experience-store.js +144 -0
  158. package/dist/esm/ufo/index.js +1 -0
  159. package/dist/esm/ui/index.js +8 -3
  160. package/dist/esm/utils/compareNodes.js +6 -0
  161. package/dist/esm/utils/index.js +3 -1
  162. package/dist/esm/utils/profiler/render-count.js +123 -0
  163. package/dist/esm/utils/validator.js +46 -26
  164. package/dist/esm/version.json +1 -1
  165. package/dist/types/card/cardOptions.d.ts +9 -0
  166. package/dist/types/card/index.d.ts +1 -9
  167. package/dist/types/collab.d.ts +1 -1
  168. package/dist/types/emoji.d.ts +3 -0
  169. package/dist/types/extensions/index.d.ts +1 -1
  170. package/dist/types/extensions/types/extension-handler.d.ts +6 -2
  171. package/dist/types/extensions/types/extension-parameters.d.ts +1 -0
  172. package/dist/types/extensions/types/field-definitions.d.ts +2 -0
  173. package/dist/types/extensions/types/index.d.ts +1 -1
  174. package/dist/types/extensions.d.ts +1 -1
  175. package/dist/types/i18n/cs.d.ts +1 -0
  176. package/dist/types/i18n/da.d.ts +1 -0
  177. package/dist/types/i18n/de.d.ts +1 -0
  178. package/dist/types/i18n/es.d.ts +1 -0
  179. package/dist/types/i18n/fi.d.ts +1 -0
  180. package/dist/types/i18n/fr.d.ts +1 -0
  181. package/dist/types/i18n/hu.d.ts +1 -0
  182. package/dist/types/i18n/it.d.ts +1 -0
  183. package/dist/types/i18n/ja.d.ts +1 -0
  184. package/dist/types/i18n/ko.d.ts +1 -0
  185. package/dist/types/i18n/nb.d.ts +1 -0
  186. package/dist/types/i18n/nl.d.ts +1 -0
  187. package/dist/types/i18n/pl.d.ts +1 -0
  188. package/dist/types/i18n/pt_BR.d.ts +1 -0
  189. package/dist/types/i18n/ru.d.ts +1 -0
  190. package/dist/types/i18n/sv.d.ts +1 -0
  191. package/dist/types/i18n/th.d.ts +1 -0
  192. package/dist/types/i18n/tr.d.ts +1 -0
  193. package/dist/types/i18n/uk.d.ts +1 -0
  194. package/dist/types/i18n/vi.d.ts +1 -0
  195. package/dist/types/i18n/zh.d.ts +1 -0
  196. package/dist/types/i18n/zh_TW.d.ts +1 -0
  197. package/dist/types/index.d.ts +7 -3
  198. package/dist/types/mention.d.ts +2 -0
  199. package/dist/types/messages/codeBidiWarning.d.ts +11 -0
  200. package/dist/types/messages/index.d.ts +1 -0
  201. package/dist/types/provider-factory.d.ts +1 -0
  202. package/dist/types/styles/index.d.ts +1 -1
  203. package/dist/types/styles/shared/panel.d.ts +2 -0
  204. package/dist/types/ufo/experience-store.d.ts +33 -0
  205. package/dist/types/ufo/index.d.ts +1 -0
  206. package/dist/types/utils/index.d.ts +2 -0
  207. package/dist/types/utils/profiler/render-count.d.ts +50 -0
  208. package/emoji/package.json +7 -0
  209. package/mention/package.json +7 -0
  210. package/package.json +29 -17
  211. package/provider-helpers/package.json +7 -0
  212. package/types/package.json +7 -0
  213. package/ufo/package.json +7 -0
  214. package/ui/package.json +7 -0
  215. package/utils/package.json +7 -0
  216. package/dist/cjs/ui/Caption/index.test.js +0 -82
  217. package/dist/cjs/utils/performance/measure-tti.test.js +0 -183
  218. package/dist/es2019/ui/Caption/index.test.js +0 -73
  219. package/dist/es2019/utils/performance/measure-tti.test.js +0 -124
  220. package/dist/esm/ui/Caption/index.test.js +0 -73
  221. package/dist/esm/utils/performance/measure-tti.test.js +0 -174
@@ -6,6 +6,7 @@
6
6
  */
7
7
  // French
8
8
  export default {
9
+ 'fabric.editor.codeBidiWarningLabel': "Les caractères bidirectionnels changent l'ordre de rendu du texte. Ils peuvent être utilisés pour masquer du code malveillant.",
9
10
  'fabric.editor.captionPlaceholder': 'Ajouter une légende',
10
11
  'fabric.editor.collapseNode': 'Réduire le contenu',
11
12
  'fabric.editor.expandDefaultTitle': 'Cliquez ici pour développer...',
@@ -6,6 +6,7 @@
6
6
  */
7
7
  // Hungarian
8
8
  export default {
9
+ 'fabric.editor.codeBidiWarningLabel': 'A kétirányú karakterek megváltoztatják a szöveg renderelési sorrendjét. Ez felhasználható rosszindulatú kód elfedésére.',
9
10
  'fabric.editor.captionPlaceholder': 'Képaláírás hozzáadása',
10
11
  'fabric.editor.collapseNode': 'tartalom összecsukása',
11
12
  'fabric.editor.expandDefaultTitle': 'Kattints ide a kibontáshoz…',
@@ -6,6 +6,7 @@
6
6
  */
7
7
  // Italian
8
8
  export default {
9
+ 'fabric.editor.codeBidiWarningLabel': "I caratteri bidirezionali modificano l'ordine in cui è visualizzato il testo. Possono essere utilizzati per nascondere un codice dannoso.",
9
10
  'fabric.editor.captionPlaceholder': 'Aggiungi didascalia',
10
11
  'fabric.editor.collapseNode': 'Comprimi contenuto',
11
12
  'fabric.editor.expandDefaultTitle': 'Clicca qui per espandere...',
@@ -6,6 +6,7 @@
6
6
  */
7
7
  // Japanese
8
8
  export default {
9
+ 'fabric.editor.codeBidiWarningLabel': '双方向文字はテキストのレンダリング順序を変更します。このため、悪意あるコードを隠すために使用される場合があります。',
9
10
  'fabric.editor.captionPlaceholder': 'キャプションを追加',
10
11
  'fabric.editor.collapseNode': 'コンテンツを折りたたむ',
11
12
  'fabric.editor.expandDefaultTitle': 'こちらをクリックして展開…',
@@ -6,6 +6,7 @@
6
6
  */
7
7
  // Korean
8
8
  export default {
9
+ 'fabric.editor.codeBidiWarningLabel': '양방향 문자가 텍스트가 렌더링되는 순서를 변경합니다. 악성 코드를 가리는 데 사용할 수 있습니다.',
9
10
  'fabric.editor.captionPlaceholder': '캡션 추가',
10
11
  'fabric.editor.collapseNode': '콘텐츠 접기',
11
12
  'fabric.editor.expandDefaultTitle': '여기를 클릭하여 펼치기...',
@@ -6,6 +6,7 @@
6
6
  */
7
7
  // Norwegian Bokmål
8
8
  export default {
9
+ 'fabric.editor.codeBidiWarningLabel': 'Toveistegn endrer rekkefølgen som tekst vises i. Dette kan brukes til å skjule skadelig kode.',
9
10
  'fabric.editor.captionPlaceholder': 'Legg til bildetekst',
10
11
  'fabric.editor.collapseNode': 'Minimer innhold',
11
12
  'fabric.editor.expandDefaultTitle': 'Klikk her for å utvide …',
@@ -6,6 +6,7 @@
6
6
  */
7
7
  // Dutch
8
8
  export default {
9
+ 'fabric.editor.codeBidiWarningLabel': 'Bidirectionele tekens wijzigen de volgorde waarin de tekst wordt weergegeven. Dit kan worden gebruikt om schadelijke code te verdoezelen.',
9
10
  'fabric.editor.captionPlaceholder': 'Bijschrift toevoegen',
10
11
  'fabric.editor.collapseNode': 'Content inklappen',
11
12
  'fabric.editor.expandDefaultTitle': 'Klik hier om uit te breiden...',
@@ -6,6 +6,7 @@
6
6
  */
7
7
  // Polish
8
8
  export default {
9
+ 'fabric.editor.codeBidiWarningLabel': 'Znaki dwukierunkowe zmieniają kolejność, w jakiej tekst jest renderowany. Może to zostać wykorzystane do ukrycia złośliwego kodu.',
9
10
  'fabric.editor.captionPlaceholder': 'Dodaj podpis',
10
11
  'fabric.editor.collapseNode': 'Zwiń zawartość',
11
12
  'fabric.editor.expandDefaultTitle': 'Kliknij tutaj, aby rozwinąć...',
@@ -6,6 +6,7 @@
6
6
  */
7
7
  // Portuguese (Brazil)
8
8
  export default {
9
+ 'fabric.editor.codeBidiWarningLabel': 'Caracteres bidirecionais alteram a ordem em que o texto é renderizado. Eles podem ser usados para ocultar códigos mal-intencionados.',
9
10
  'fabric.editor.captionPlaceholder': 'Adicionar legenda',
10
11
  'fabric.editor.collapseNode': 'Recolher conteúdo',
11
12
  'fabric.editor.expandDefaultTitle': 'Clique aqui para expandir...',
@@ -6,6 +6,7 @@
6
6
  */
7
7
  // Russian
8
8
  export default {
9
+ 'fabric.editor.codeBidiWarningLabel': 'Двунаправленные символы изменяют порядок отображения текста. Они могут использоваться для маскировки вредоносного кода.',
9
10
  'fabric.editor.captionPlaceholder': 'Добавьте подпись',
10
11
  'fabric.editor.collapseNode': 'Свернуть содержимое',
11
12
  'fabric.editor.expandDefaultTitle': 'Нажмите здесь, чтобы развернуть…',
@@ -6,6 +6,7 @@
6
6
  */
7
7
  // Swedish
8
8
  export default {
9
+ 'fabric.editor.codeBidiWarningLabel': 'Dubbelriktade tecken ändrar återgivningsordningen för text. Detta kan användas för att dölja skadlig kod.',
9
10
  'fabric.editor.captionPlaceholder': 'Lägg till en bildtext',
10
11
  'fabric.editor.collapseNode': 'komprimera innehåll',
11
12
  'fabric.editor.expandDefaultTitle': 'Klicka här för att expandera ...',
@@ -6,6 +6,7 @@
6
6
  */
7
7
  // Thai
8
8
  export default {
9
+ 'fabric.editor.codeBidiWarningLabel': 'ตัวอักษรแบบสองทิศทางเปลี่ยนลำดับการแสดงข้อความ ซึ่งอาจนำไปใช้เพื่อปิดบังรหัสที่มีวัตถุประสงค์ในทางที่ไม่ดีได้',
9
10
  'fabric.editor.captionPlaceholder': 'เพิ่มคำอธิบาย',
10
11
  'fabric.editor.collapseNode': 'ย่อเนื้อหา',
11
12
  'fabric.editor.expandDefaultTitle': 'คลิกที่นี่เพื่อขยาย...',
@@ -6,6 +6,7 @@
6
6
  */
7
7
  // Turkish
8
8
  export default {
9
+ 'fabric.editor.codeBidiWarningLabel': 'Çift yönlü karakterler metnin oluşturulduğu sırayı değiştirir. Bu, kötü amaçlı kodu gizlemek için kullanılabilir.',
9
10
  'fabric.editor.captionPlaceholder': 'Açıklama yazısı ekleyin',
10
11
  'fabric.editor.collapseNode': 'içeriği daraltın',
11
12
  'fabric.editor.expandDefaultTitle': 'Genişletmek için buraya tıklayın...',
@@ -6,6 +6,7 @@
6
6
  */
7
7
  // Ukrainian
8
8
  export default {
9
+ 'fabric.editor.codeBidiWarningLabel': 'Двонаправлені символи змінюють порядок відображення тексту. Такий спосіб може використовуватися, щоб приховати зловмисний код.',
9
10
  'fabric.editor.captionPlaceholder': 'Додати підпис',
10
11
  'fabric.editor.collapseNode': 'Згорніть вміст',
11
12
  'fabric.editor.expandDefaultTitle': 'Натисніть, щоб розгорнути…',
@@ -6,6 +6,7 @@
6
6
  */
7
7
  // Vietnamese
8
8
  export default {
9
+ 'fabric.editor.codeBidiWarningLabel': 'Ký tự hai chiều thay đổi thứ tự kết xuất văn bản. Điều này có thể được dùng để che giấu mã độc hại.',
9
10
  'fabric.editor.captionPlaceholder': 'Thêm chú thích',
10
11
  'fabric.editor.collapseNode': 'thu gọn nội dung',
11
12
  'fabric.editor.expandDefaultTitle': 'Nhấp vào đây để mở rộng...',
@@ -4,8 +4,8 @@
4
4
  * This file is automatically generated by i18n-tools.
5
5
  * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
6
  */
7
- // Chinese
8
7
  export default {
8
+ 'fabric.editor.codeBidiWarningLabel': '双向字符会更改文本的呈现顺序。这可能被用于掩盖恶意代码。',
9
9
  'fabric.editor.captionPlaceholder': '添加标题',
10
10
  'fabric.editor.collapseNode': '收起内容',
11
11
  'fabric.editor.expandDefaultTitle': '点击此处展开...',
@@ -6,6 +6,7 @@
6
6
  */
7
7
  // undefined
8
8
  export default {
9
+ 'fabric.editor.codeBidiWarningLabel': '雙向字元會變更文字呈現的順序。這可用來將惡意程式碼模糊化。',
9
10
  'fabric.editor.captionPlaceholder': '新增標題',
10
11
  'fabric.editor.collapseNode': '摺疊內容',
11
12
  'fabric.editor.expandDefaultTitle': '按一下此處以展開...',
package/dist/esm/index.js CHANGED
@@ -1,9 +1,27 @@
1
- export { ADFTraversor, ErrorReporter, ZERO_WIDTH_SPACE, absoluteBreakoutWidth, browser, calcBreakoutWidth, breakoutConsts, calcTableColumnWidths, calcWideWidth, clearMeasure, compose, convertProsemirrorTableNodeToArrayOfRows, createCompareNodes, findAndTrackUnsupportedContentNodes, getAnalyticsAppearance, analyticsEventKey, getAnalyticsEventSeverity, getUnsupportedContentLevelData, UNSUPPORTED_CONTENT_LEVEL_SEVERITY_THRESHOLD_DEFAULTS, getExtensionLozengeData, getExtensionRenderer, getMarksByOrder, getModeFromTheme, getResponseEndTime, getValidContent, getValidDocument, getValidMark, getValidNode, getValidUnknownNode, hasMergedCell, isPastDate, isPerformanceAPIAvailable, isPerformanceObserverAvailable, isSameMark, isSubSupType, markOrder, measureRender, startMeasure, stopMeasure, measureTTI, getTTISeverity, TTI_SEVERITY_THRESHOLD_DEFAULTS, TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS, timestampToIsoFormat, timestampToString, timestampToTaskContext, timestampToUTCDate, todayTimestampInUTC, withImageLoader, canApplyAnnotationOnRange, getAnnotationIdsFromRange, SEVERITY, UNSUPPORTED_CONTENT_LEVEL_SEVERITY, shouldForceTracking, sniffUserBrowserExtensions } from './utils';
2
- export { SortOrder, AnnotationUpdateEmitter, AnnotationUpdateEvent } from './types';
3
- export { DefaultExtensionProvider, combineExtensionProviders, getExtensionKeyAndNodeKey, getExtensionModuleNode, getExtensionModuleNodePrivateProps, getQuickInsertItemsFromModule, getNodeRenderer, getContextualToolbarItemsFromModule, buildMenuItem, resolveImport } from './extensions';
4
- export { ProviderFactory, WithProviders } from './provider-factory';
5
- export { combineProviders } from './provider-helpers';
6
- export { TableSharedCssClassName, blockMarksSharedStyles, blockquoteSharedStyles, calcTableWidth, codeMarkSharedStyles, columnLayoutSharedStyle, dateSharedStyle, DateSharedCssClassName, annotationSharedStyles, AnnotationSharedCSSByState, AnnotationSharedClassNames, headingsSharedStyles, indentationSharedStyles, inlineNodeSharedStyle, linkSharedStyle, listsSharedStyles, richMediaClassName, mediaSingleSharedStyle, getPanelTypeBackground, panelSharedStyles, PanelSharedCssClassName, PanelSharedSelectors, paragraphSharedStyles, ruleSharedStyles, shadowSharedStyle, tableCellBorderWidth, tableCellMinWidth, tableCellPadding, tableMarginBottom, tableMarginSides, tableMarginTop, tableNewColumnMinWidth, tableResizeHandleWidth, tableSharedStyle, tasksAndDecisionsStyles, TaskDecisionSharedCssClassName, whitespaceSharedStyles, MentionSharedCssClassName, EmojiSharedCssClassName, StatusSharedCssClassName, smartCardSharedStyles, SmartCardSharedCssClassName } from './styles';
7
- export { BaseTheme, Caption, ClearNextSiblingMarginTop, DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH, Emoji, ErrorMessage, ExpandIconWrapper, ExpandLayoutWrapper, HelperMessage, MediaSingle, MediaSingleDimensionHelper, Mention, Popup, UnsupportedBlock, UnsupportedInline, ValidMessage, WidthConsumer, WidthProvider, WithCreateAnalyticsEvent, calcColumnsFromPx, calcPctFromPx, calcPxFromColumns, calcPxFromPct, expandMessages, findOverflowScrollParent, getBreakpoint, layoutSupportsWidth, mapBreakpointToLayoutMaxWidth, overflowShadow, shadowClassNames, sharedExpandStyles, snapToGrid, withOuterListeners, MediaLink, wrappedLayouts, shouldAddDefaultWrappedWidth } from './ui';
8
- export { linkMessages } from './messages/link';
1
+ // new child entry point ./utils/index.ts
2
+ export { ADFTraversor, ErrorReporter, ZERO_WIDTH_SPACE, absoluteBreakoutWidth, browser, calcBreakoutWidth, breakoutConsts, calcTableColumnWidths, calcWideWidth, clearMeasure, compose, convertProsemirrorTableNodeToArrayOfRows, createCompareNodes, findAndTrackUnsupportedContentNodes, getAnalyticsAppearance, analyticsEventKey, getAnalyticsEventSeverity, getUnsupportedContentLevelData, UNSUPPORTED_CONTENT_LEVEL_SEVERITY_THRESHOLD_DEFAULTS, getExtensionLozengeData, getExtensionRenderer, getMarksByOrder, getModeFromTheme, getResponseEndTime, getValidContent, getValidDocument, getValidMark, getValidNode, getValidUnknownNode, hasMergedCell, isPastDate, isPerformanceAPIAvailable, isPerformanceObserverAvailable, isSameMark, isSubSupType, markOrder, measureRender, startMeasure, stopMeasure, measureTTI, getTTISeverity, TTI_SEVERITY_THRESHOLD_DEFAULTS, TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS, timestampToIsoFormat, timestampToString, timestampToTaskContext, timestampToUTCDate, todayTimestampInUTC, withImageLoader, canApplyAnnotationOnRange, getAnnotationIdsFromRange, SEVERITY, UNSUPPORTED_CONTENT_LEVEL_SEVERITY, shouldForceTracking, sniffUserBrowserExtensions, RenderCountProfiler } from './utils'; // new child entry point ./utils/index.ts
3
+
4
+ // new child entry point ./types/index.ts
5
+ export { SortOrder, AnnotationUpdateEmitter, AnnotationUpdateEvent } from './types'; // new child entry point ./types/index.ts
6
+
7
+ // already exported by ./extensions.ts
8
+ export { DefaultExtensionProvider, combineExtensionProviders, getExtensionKeyAndNodeKey, getExtensionModuleNode, getExtensionModuleNodePrivateProps, getQuickInsertItemsFromModule, getNodeRenderer, getContextualToolbarItemsFromModule, buildMenuItem, resolveImport } from './extensions'; // already exported by ./extensions.ts
9
+
10
+ // already exported by ./provider-factory.ts
11
+ export { ProviderFactory, WithProviders } from './provider-factory'; // already exported by ./provider-factory.ts
12
+
13
+ // new child entry point ./provider-helpers/index.ts
14
+ export { combineProviders } from './provider-helpers'; // already exported by ./styles/index.ts
15
+
16
+ export { TableSharedCssClassName, blockMarksSharedStyles, blockquoteSharedStyles, calcTableWidth, codeMarkSharedStyles, columnLayoutSharedStyle, dateSharedStyle, DateSharedCssClassName, annotationSharedStyles, AnnotationSharedCSSByState, AnnotationSharedClassNames, headingsSharedStyles, indentationSharedStyles, inlineNodeSharedStyle, linkSharedStyle, listsSharedStyles, richMediaClassName, mediaSingleSharedStyle, getPanelTypeBackground, getPanelBackgroundDarkModeColors, panelSharedStyles, PanelSharedCssClassName, PanelSharedSelectors, paragraphSharedStyles, ruleSharedStyles, shadowSharedStyle, tableCellBorderWidth, tableCellMinWidth, tableCellPadding, tableMarginBottom, tableMarginSides, tableMarginTop, tableNewColumnMinWidth, tableResizeHandleWidth, tableSharedStyle, tasksAndDecisionsStyles, TaskDecisionSharedCssClassName, whitespaceSharedStyles, MentionSharedCssClassName, //exported from ./src/mention.ts
17
+ EmojiSharedCssClassName, //exported from ./src/emoji.ts
18
+ StatusSharedCssClassName, smartCardSharedStyles, SmartCardSharedCssClassName } from './styles'; // new child entry point ./ui/index.tsx
19
+
20
+ export { BaseTheme, Caption, ClearNextSiblingMarginTop, DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH, Emoji, //exported from ./src/emoji.ts
21
+ ErrorMessage, ExpandIconWrapper, ExpandLayoutWrapper, HelperMessage, MediaSingle, MediaSingleDimensionHelper, Mention, //exported from ./src/mention.ts
22
+ Popup, UnsupportedBlock, UnsupportedInline, ValidMessage, WidthConsumer, WidthProvider, WithCreateAnalyticsEvent, calcColumnsFromPx, calcPctFromPx, calcPxFromColumns, calcPxFromPct, expandMessages, findOverflowScrollParent, getBreakpoint, layoutSupportsWidth, mapBreakpointToLayoutMaxWidth, overflowShadow, shadowClassNames, sharedExpandStyles, snapToGrid, withOuterListeners, MediaLink, wrappedLayouts, shouldAddDefaultWrappedWidth } from './ui'; // new child entry point ./ui/index.tsx
23
+
24
+ // already exported by ./messages/index.ts
25
+ export { linkMessages } from './messages/link'; // new child entry point in ./utils/index.ts
26
+
9
27
  export { validateADFEntity, validationErrorHandler } from './utils/validate-using-spec';
@@ -0,0 +1,2 @@
1
+ export { default as Mention } from './ui/Mention';
2
+ export { MentionSharedCssClassName } from './styles/shared/mention';
@@ -0,0 +1,12 @@
1
+ import { defineMessages } from 'react-intl';
2
+ export var codeBidiWarningMessages = defineMessages({
3
+ /**
4
+ * Message taken from
5
+ * https://hello.atlassian.net/wiki/spaces/~tswan/pages/1366555782/PSHELP-2943+Investigate+Trojan+Source+Attack+Vulnerability+design
6
+ */
7
+ label: {
8
+ id: 'fabric.editor.codeBidiWarningLabel',
9
+ defaultMessage: 'Bidirectional characters change the order that text is rendered. This could be used to obscure malicious code.',
10
+ description: 'Tooltip message to present to users when a bidirectional character is encountered in code.'
11
+ }
12
+ });
@@ -1,2 +1,3 @@
1
+ export { codeBidiWarningMessages } from './codeBidiWarning';
1
2
  export { linkMessages } from './link';
2
3
  export { unsupportedContentMessages } from './unsupportedContent';
@@ -4,7 +4,7 @@ export { columnLayoutSharedStyle } from './shared/column-layout';
4
4
  export { mediaSingleSharedStyle, richMediaClassName } from './shared/media-single';
5
5
  export { blockquoteSharedStyles } from './shared/blockquote';
6
6
  export { headingsSharedStyles } from './shared/headings';
7
- export { getPanelTypeBackground, panelSharedStyles, PanelSharedCssClassName, PanelSharedSelectors } from './shared/panel';
7
+ export { getPanelTypeBackground, panelSharedStyles, PanelSharedCssClassName, PanelSharedSelectors, getPanelBackgroundDarkModeColors } from './shared/panel';
8
8
  export { ruleSharedStyles } from './shared/rule';
9
9
  export { whitespaceSharedStyles } from './shared/whitespace';
10
10
  export { paragraphSharedStyles } from './shared/paragraph';
@@ -16,7 +16,9 @@ export { blockMarksSharedStyles } from './shared/block-marks';
16
16
  export { codeMarkSharedStyles } from './shared/code-mark';
17
17
  export { shadowSharedStyle } from './shared/shadow';
18
18
  export { dateSharedStyle, DateSharedCssClassName } from './shared/date';
19
- export { tasksAndDecisionsStyles, TaskDecisionSharedCssClassName } from './shared/task-decision';
19
+ export { tasksAndDecisionsStyles, TaskDecisionSharedCssClassName } from './shared/task-decision'; // TODO: ED-13875 Remove MentionSharedCssClassName and EmojiSharedCssClassName
20
+ // exports once root entry point for editor-common has been removed
21
+
20
22
  export { MentionSharedCssClassName } from './shared/mention';
21
23
  export { EmojiSharedCssClassName } from './shared/emoji';
22
24
  export { StatusSharedCssClassName } from './shared/status';
@@ -3,4 +3,4 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
3
3
  var _templateObject;
4
4
 
5
5
  import { css } from 'styled-components';
6
- export var blockMarksSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /**\n * We need to remove margin-top from first item\n * inside doc, tableCell, tableHeader, blockquote, etc.\n */\n *:not(.fabric-editor-block-mark) >,\n /* For nested block marks */\n *:not(.fabric-editor-block-mark) > div.fabric-editor-block-mark:first-child {\n p,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n .heading-wrapper {\n &:first-child {\n margin-top: 0;\n }\n }\n }\n"])));
6
+ export var blockMarksSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /**\n * We need to remove margin-top from first item\n * inside doc, tableCell, tableHeader, blockquote, etc.\n */\n *:not(.fabric-editor-block-mark) >,\n /* For nested block marks */\n *:not(.fabric-editor-block-mark) > div.fabric-editor-block-mark:first-child {\n p,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n &:first-child {\n margin-top: 0;\n }\n }\n }\n"])));
@@ -5,5 +5,5 @@ var _templateObject;
5
5
  import { css } from 'styled-components';
6
6
  var richMediaClassName = 'rich-media-item';
7
7
  var wrappedMediaBreakoutPoint = 410;
8
- var mediaSingleSharedStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n li .", " {\n margin: 0;\n }\n\n /* Hack for chrome to fix media single position\n inside a list when media is the first child */\n &.ua-chrome li > .mediaSingleView-content-wrap::before {\n content: '';\n display: block;\n height: 0;\n }\n\n .mediaSingleView-content-wrap[layout='center'] {\n clear: both;\n }\n\n table .", " {\n margin-top: 12px;\n margin-bottom: 12px;\n clear: both;\n }\n\n .", ".image-wrap-right\n + .", ".image-wrap-left {\n clear: both;\n }\n\n .", ".image-wrap-left\n + .", ".image-wrap-right,\n .", ".image-wrap-right\n + .", ".image-wrap-left,\n .", ".image-wrap-left\n + .", ".image-wrap-left,\n .", ".image-wrap-right\n + .", ".image-wrap-right {\n margin-right: 0;\n margin-left: 0;\n }\n\n @media all and (max-width: ", "px) {\n div.mediaSingleView-content-wrap[layout='wrap-left'],\n div.mediaSingleView-content-wrap[data-layout='wrap-left'],\n div.mediaSingleView-content-wrap[layout='wrap-right'],\n div.mediaSingleView-content-wrap[data-layout='wrap-right'] {\n float: none;\n overflow: auto;\n margin: 12px 0;\n }\n }\n"])), richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, wrappedMediaBreakoutPoint);
8
+ var mediaSingleSharedStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n li .", " {\n margin: 0;\n }\n\n /* Hack for chrome to fix media single position\n inside a list when media is the first child */\n &.ua-chrome li > .mediaSingleView-content-wrap::before {\n content: '';\n display: block;\n height: 0;\n }\n\n &.ua-firefox {\n .mediaSingleView-content-wrap {\n user-select: none;\n }\n\n .captionView-content-wrap {\n user-select: text;\n }\n }\n\n .mediaSingleView-content-wrap[layout='center'] {\n clear: both;\n }\n\n table .", " {\n margin-top: 12px;\n margin-bottom: 12px;\n clear: both;\n }\n\n .", ".image-wrap-right\n + .", ".image-wrap-left {\n clear: both;\n }\n\n .", ".image-wrap-left\n + .", ".image-wrap-right,\n .", ".image-wrap-right\n + .", ".image-wrap-left,\n .", ".image-wrap-left\n + .", ".image-wrap-left,\n .", ".image-wrap-right\n + .", ".image-wrap-right {\n margin-right: 0;\n margin-left: 0;\n }\n\n @media all and (max-width: ", "px) {\n div.mediaSingleView-content-wrap[layout='wrap-left'],\n div.mediaSingleView-content-wrap[data-layout='wrap-left'],\n div.mediaSingleView-content-wrap[layout='wrap-right'],\n div.mediaSingleView-content-wrap[data-layout='wrap-right'] {\n float: none;\n overflow: auto;\n margin: 12px 0;\n }\n }\n"])), richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, wrappedMediaBreakoutPoint);
9
9
  export { mediaSingleSharedStyle, richMediaClassName };
@@ -1,9 +1,10 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
3
 
3
4
  var _templateObject;
4
5
 
5
6
  import { css } from 'styled-components';
6
- import { hexToRgba, PanelType } from '@atlaskit/adf-schema';
7
+ import { PanelType } from '@atlaskit/adf-schema';
7
8
  import { akEditorTableCellMinWidth, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
8
9
  import { akEditorCustomIconSize } from '@atlaskit/editor-shared-styles/consts';
9
10
  import { emojiImage, emojiSprite } from '@atlaskit/emoji';
@@ -18,22 +19,67 @@ var lightPanelColor = {
18
19
  warning: colors.Y50,
19
20
  error: colors.R50
20
21
  };
21
- var darkPanelOpacity = 0.64;
22
- var darkPanelColor = {
23
- info: colors.B500,
24
- note: colors.P500,
25
- tip: colors.G500,
26
- success: colors.G500,
27
- warning: colors.Y500,
28
- error: colors.R500
29
- };
30
- var darkPanelBorderColor = {
31
- info: colors.B400,
32
- note: colors.P400,
33
- tip: colors.G400,
34
- success: colors.G400,
35
- warning: colors.Y400,
36
- error: colors.R400
22
+ var darkPanelColors = {
23
+ // standard panels
24
+ info: '#0C294F',
25
+ error: "#441C13",
26
+ warning: "#413001",
27
+ tip: "#052E21",
28
+ success: "#052E21",
29
+ note: "#282249",
30
+ // Reds
31
+ R900: '#601D16',
32
+ // Red Saturated
33
+ R100S: "#FFEFEB",
34
+ R300S: "#FFB5A3",
35
+ R500S: "#FF6B47",
36
+ R800S: "#C4320E",
37
+ R1200S: "#441C13",
38
+ // Yellows
39
+ Y900: '#533F04',
40
+ // Yellow Saturated
41
+ Y100S: "#FFF3D1",
42
+ Y300S: "#FFDC7A",
43
+ Y500S: "#FFC933",
44
+ Y800S: "#D8A003",
45
+ Y1200S: "#413001",
46
+ // Greens
47
+ G900: '#164B35',
48
+ // Green Saturated
49
+ G100S: "#E3FCF0",
50
+ G300S: "#95EEC5",
51
+ G400S: "#60DCA8",
52
+ G900S: "#086848",
53
+ G1200S: "#052E21",
54
+ // Blues
55
+ B900: '#09326C',
56
+ // Saturated Blues
57
+ B100S: '#E5F0FF',
58
+ B300S: '#A3C9FF',
59
+ B500S: '#4794FF',
60
+ B800S: '#0055CC',
61
+ B1200S: '#0C294F',
62
+ // Purples
63
+ P900: "#352C63",
64
+ // Purple Saturated
65
+ P100S: "#EEEBFF",
66
+ P300S: "#CCC3FE",
67
+ P500S: "#A292F7",
68
+ P800S: "#5E49CA",
69
+ P1200S: "#282249",
70
+ // Teals
71
+ T900: '#1D474C',
72
+ // Teal Saturated
73
+ T100S: "#DBFAFF",
74
+ T300S: "#78EBFC",
75
+ T400S: "#3AD6EE",
76
+ T900S: "#056270",
77
+ T1200S: "#0B3037",
78
+ // Dark Mode Alpha
79
+ DNA20A: 'rgba(150, 176, 210, 0.53)',
80
+ DNA40A: 'rgba(134, 156, 180, 0.29)',
81
+ DNA80A: '#161A1D',
82
+ TextColor: '#D9DDE3'
37
83
  };
38
84
  var lightIconColor = {
39
85
  info: colors.B400,
@@ -50,16 +96,21 @@ var darkIconColor = {
50
96
  success: colors.G200,
51
97
  warning: colors.Y100,
52
98
  error: colors.R200
53
- };
54
- var darkTextColor = {
55
- info: colors.B75,
56
- note: colors.P75,
57
- tip: colors.G75,
58
- success: colors.G75,
59
- warning: colors.Y75,
60
- error: colors.R75
61
- };
62
- var verticalAlignment = -((gridSize() * 3 - akEditorCustomIconSize) / 2);
99
+ }; // New custom icons are a little smaller than predefined icons.
100
+ // To fix alignment issues with custom icons, vertical alignment is updated.
101
+
102
+ var panelEmojiSpriteVerticalAlignment = -(gridSize() * 3 - akEditorCustomIconSize) / 2;
103
+ var panelEmojiImageVerticalAlignment = panelEmojiSpriteVerticalAlignment - 1;
104
+ export var getPanelBackgroundDarkModeColors = [[colors.B50, darkPanelColors.B1200S], [colors.B75, darkPanelColors.B900], [colors.B100, darkPanelColors.B800S], [colors.N0, darkPanelColors.DNA80A], [colors.N20, darkPanelColors.DNA40A], [colors.N60, darkPanelColors.DNA20A], [colors.T50, darkPanelColors.T1200S], [colors.T75, darkPanelColors.T900], [colors.T100, darkPanelColors.T900S], [colors.G50, darkPanelColors.G1200S], [colors.G75, darkPanelColors.G900], [colors.G200, darkPanelColors.G900S], [colors.Y50, darkPanelColors.Y1200S], [colors.Y75, darkPanelColors.Y900], [colors.Y200, darkPanelColors.Y800S], [colors.R50, darkPanelColors.R1200S], [colors.R75, darkPanelColors.R900], [colors.R100, darkPanelColors.R800S], [colors.P50, darkPanelColors.P1200S], [colors.P75, darkPanelColors.P900], [colors.P100, darkPanelColors.P800S]].map(function (_ref) {
105
+ var _ref2 = _slicedToArray(_ref, 2),
106
+ colorName = _ref2[0],
107
+ colorValue = _ref2[1];
108
+
109
+ return getPanelDarkModeCSS(colorName, colorValue);
110
+ }).join('\n');
111
+ export function getPanelDarkModeCSS(colorName, colorValue) {
112
+ return "\n &[data-panel-color=\"".concat(colorName, "\"] {\n background-color: ").concat(colorValue, " !important; // !important to override default style color\n color: ").concat(darkPanelColors.TextColor, ";\n }\n ");
113
+ }
63
114
  var prefix = 'ak-editor-panel';
64
115
  export var PanelSharedCssClassName = {
65
116
  prefix: prefix,
@@ -97,7 +148,7 @@ var iconDynamicStyles = function iconDynamicStyles(panelType) {
97
148
  export var getPanelTypeBackground = function getPanelTypeBackground(panelType) {
98
149
  var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
99
150
  var light = lightPanelColor[panelType];
100
- var dark = hexToRgba(darkPanelColor[panelType], darkPanelOpacity);
151
+ var dark = darkPanelColors[panelType];
101
152
  var background = themed({
102
153
  light: light,
103
154
  dark: dark
@@ -108,18 +159,14 @@ export var getPanelTypeBackground = function getPanelTypeBackground(panelType) {
108
159
  var mainDynamicStyles = function mainDynamicStyles(panelType) {
109
160
  return function (props) {
110
161
  var background = getPanelTypeBackground(panelType, props);
111
- var darkText = darkTextColor[panelType];
112
- var darkBorder = '1px solid ' + darkPanelBorderColor[panelType];
113
- var border = themed({
114
- light: 'none',
115
- dark: darkBorder
116
- })(props);
117
162
  var text = themed({
118
163
  light: 'inherit',
119
- dark: darkText
164
+ dark: darkPanelColors.TextColor
120
165
  })(props);
121
- return "\n background-color: ".concat(background, ";\n border: ").concat(border, ";\n color: ").concat(text, ";\n ");
166
+ return "\n background-color: ".concat(background, ";\n color: ").concat(text, ";\n ");
122
167
  };
123
168
  };
124
169
 
125
- export var panelSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n border-radius: ", "px;\n margin: ", " 0 0;\n padding: ", "px;\n min-width: ", "px;\n display: flex;\n align-items: baseline;\n word-break: break-word;\n\n ", "\n\n .", " {\n display: block;\n flex-shrink: 0;\n height: ", "px;\n width: ", "px;\n box-sizing: content-box;\n padding-right: ", "px;\n text-align: center;\n ", "\n\n > span {\n vertical-align: middle;\n display: inline;\n }\n\n .", ", .", " {\n vertical-align: ", "px;\n }\n }\n\n .ak-editor-panel__content {\n margin: 1px 0 1px;\n flex: 1 0 0;\n /*\n https://ishadeed.com/article/min-max-css/#setting-min-width-to-zero-with-flexbox\n The default value for min-width is auto, which is computed to zero. When an element is a flex item, the value of min-width doesn\u2019t compute to zero. The minimum size of a flex item is equal to the size of its contents.\n */\n min-width: 0;\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n .", " {\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n }\n }\n }\n"])), PanelSharedCssClassName.prefix, borderRadius(), blockNodesVerticalMargin, gridSize(), akEditorTableCellMinWidth, mainDynamicStyles(PanelType.INFO), PanelSharedCssClassName.icon, gridSize() * 3, gridSize() * 3, gridSize(), iconDynamicStyles(PanelType.INFO), emojiSprite, emojiImage, verticalAlignment, PanelType.NOTE, mainDynamicStyles(PanelType.NOTE), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.NOTE), PanelType.TIP, mainDynamicStyles(PanelType.TIP), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.TIP), PanelType.WARNING, mainDynamicStyles(PanelType.WARNING), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.WARNING), PanelType.ERROR, mainDynamicStyles(PanelType.ERROR), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.ERROR), PanelType.SUCCESS, mainDynamicStyles(PanelType.SUCCESS), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.SUCCESS), PanelType.CUSTOM, PanelSharedCssClassName.icon);
170
+ export var panelSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n border-radius: ", "px;\n margin: ", " 0 0;\n padding: ", "px;\n min-width: ", "px;\n display: flex;\n position: relative;\n align-items: baseline;\n word-break: break-word;\n\n ", "\n\n .", " {\n flex-shrink: 0;\n height: ", "px;\n width: ", "px;\n box-sizing: content-box;\n padding-right: ", "px;\n text-align: center;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n ", "\n\n > span {\n vertical-align: middle;\n display: inline;\n }\n\n .", " {\n vertical-align: ", "px;\n }\n\n .", " {\n vertical-align: ", "px;\n\n // Vertical align only works for inline-block elements in Firefox\n @-moz-document url-prefix() {\n img {\n display: inline-block;\n }\n }\n }\n }\n\n .ak-editor-panel__content {\n margin: 1px 0 1px;\n flex: 1 0 0;\n /*\n https://ishadeed.com/article/min-max-css/#setting-min-width-to-zero-with-flexbox\n The default value for min-width is auto, which is computed to zero. When an element is a flex item, the value of min-width doesn\u2019t compute to zero. The minimum size of a flex item is equal to the size of its contents.\n */\n min-width: 0;\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", ";\n }\n }\n"])), PanelSharedCssClassName.prefix, borderRadius(), blockNodesVerticalMargin, gridSize(), akEditorTableCellMinWidth, mainDynamicStyles(PanelType.INFO), PanelSharedCssClassName.icon, gridSize() * 3, gridSize() * 3, gridSize(), iconDynamicStyles(PanelType.INFO), emojiSprite, panelEmojiSpriteVerticalAlignment, emojiImage, panelEmojiImageVerticalAlignment, PanelType.NOTE, mainDynamicStyles(PanelType.NOTE), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.NOTE), PanelType.TIP, mainDynamicStyles(PanelType.TIP), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.TIP), PanelType.WARNING, mainDynamicStyles(PanelType.WARNING), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.WARNING), PanelType.ERROR, mainDynamicStyles(PanelType.ERROR), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.ERROR), PanelType.SUCCESS, mainDynamicStyles(PanelType.SUCCESS), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.SUCCESS), PanelType.CUSTOM, themed({
171
+ dark: getPanelBackgroundDarkModeColors
172
+ }));
@@ -29,13 +29,13 @@ export var TableSharedCssClassName = {
29
29
  TABLE_CELL_NODEVIEW_CONTENT_DOM: tableCellContentDomSelector,
30
30
  TABLE_CELL_WRAPPER: tableCellSelector
31
31
  };
32
- var tableSharedStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n position: relative;\n margin: 0 auto ", "px;\n box-sizing: border-box;\n\n /**\n * Fix block top alignment inside table cells.\n */\n .decisionItemView-content-wrap:first-child > div {\n margin-top: 0;\n }\n }\n .", "[data-number-column='true'] {\n padding-left: ", "px;\n }\n /* avoid applying styles to nested tables (possible via extensions) */\n .", " > table,\n .", " > table,\n .", " > table {\n border-collapse: collapse;\n margin: ", "px ", "px 0 0;\n border: ", "px solid\n ", ";\n table-layout: fixed;\n font-size: 1em;\n width: 100%;\n\n &[data-autosize='true'] {\n table-layout: auto;\n }\n\n & {\n * {\n box-sizing: border-box;\n }\n hr {\n box-sizing: content-box;\n }\n\n tbody {\n border-bottom: none;\n }\n th td {\n background-color: white;\n }\n th,\n td {\n min-width: ", "px;\n font-weight: normal;\n vertical-align: top;\n border: 1px solid\n ", ";\n border-right-width: 0;\n border-bottom-width: 0;\n padding: ", "px;\n /* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n ", "\n\n ", ";\n\n > *:first-child {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor.-right:first-child + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + * {\n margin-top: 0;\n }\n\n th p:not(:first-of-type),\n td p:not(:first-of-type) {\n margin-top: 12px;\n }\n }\n th {\n background-color: ", ";\n text-align: left;\n\n /* only apply this styling to codeblocks in default background headercells */\n /* TODO this needs to be overhauled as it relies on unsafe selectors */\n &:not([style]) {\n .code-block {\n background-image: ", ";\n background-attachment: local, scroll, scroll;\n background-position: 100% 0, 100% 0, 0 0;\n background-color: ", ";\n\n .line-number-gutter {\n background-color: ", ";\n }\n\n /* this is only relevant to the element taken care of by renderer */\n > [data-ds--code--code-block] {\n background-image: ", "!important;\n\n background-color: ", "!important;\n\n // selector lives inside @atlaskit/code\n --ds--code--line-number-bg-color: ", ";\n }\n }\n }\n }\n }\n }\n"])), TableSharedCssClassName.TABLE_CONTAINER, tableMarginBottom, TableSharedCssClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableMarginTop, tableMarginSides, tableCellBorderWidth, themed({
32
+ var tableSharedStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n position: relative;\n margin: 0 auto ", "px;\n box-sizing: border-box;\n\n /**\n * Fix block top alignment inside table cells.\n */\n .decisionItemView-content-wrap:first-child > div {\n margin-top: 0;\n }\n }\n .", "[data-number-column='true'] {\n padding-left: ", "px;\n clear: both;\n }\n /* avoid applying styles to nested tables (possible via extensions) */\n .", " > table,\n .", " > table,\n .", " > table {\n border-collapse: collapse;\n margin: ", "px ", "px 0 0;\n border: ", "px solid\n ", ";\n table-layout: fixed;\n font-size: 1em;\n width: 100%;\n\n &[data-autosize='true'] {\n table-layout: auto;\n }\n\n & {\n * {\n box-sizing: border-box;\n }\n hr {\n box-sizing: content-box;\n }\n\n tbody {\n border-bottom: none;\n }\n th td {\n background-color: white;\n }\n th,\n td {\n min-width: ", "px;\n font-weight: normal;\n vertical-align: top;\n border: 1px solid\n ", ";\n border-right-width: 0;\n border-bottom-width: 0;\n padding: ", "px;\n /* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n ", "\n\n ", ";\n\n > *:first-child {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor.-right:first-child + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + * {\n margin-top: 0;\n }\n\n th p:not(:first-of-type),\n td p:not(:first-of-type) {\n margin-top: 12px;\n }\n }\n th {\n background-color: ", ";\n text-align: left;\n\n /* only apply this styling to codeblocks in default background headercells */\n /* TODO this needs to be overhauled as it relies on unsafe selectors */\n &:not([style]) {\n .code-block {\n background-image: ", ";\n background-attachment: local, scroll, scroll;\n background-position: 100% 0, 100% 0, 0 0;\n background-color: ", ";\n\n .line-number-gutter {\n background-color: ", ";\n }\n\n /* this is only relevant to the element taken care of by renderer */\n > [data-ds--code--code-block] {\n background-image: ", "!important;\n\n background-color: ", "!important;\n\n // selector lives inside @atlaskit/code\n --ds--code--line-number-bg-color: ", ";\n }\n }\n }\n }\n }\n }\n"])), TableSharedCssClassName.TABLE_CONTAINER, tableMarginBottom, TableSharedCssClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableMarginTop, tableMarginSides, tableCellBorderWidth, themed({
33
33
  light: akEditorTableBorder,
34
34
  dark: akEditorTableBorderDark
35
35
  }), tableCellMinWidth, themed({
36
36
  light: akEditorTableBorder,
37
37
  dark: akEditorTableBorderDark
38
- }), tableCellPadding, browser.gecko || browser.ie ? 'background-clip: padding-box;' : '', themed({
38
+ }), tableCellPadding, browser.gecko || browser.ie || browser.mac && browser.chrome ? 'background-clip: padding-box;' : '', themed({
39
39
  dark: getTableCellBackgroundDarkModeColors
40
40
  }), themed({
41
41
  light: akEditorTableToolbar,
@@ -0,0 +1,144 @@
1
+ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
+ import _createClass from "@babel/runtime/helpers/createClass";
3
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
+ import { ExperiencePerformanceTypes, ExperienceTypes, UFOExperience } from '@atlaskit/ufo';
5
+ export var experienceConfig = {
6
+ type: ExperienceTypes.Operation,
7
+ performanceType: ExperiencePerformanceTypes.Custom,
8
+ platform: {
9
+ component: 'editor'
10
+ }
11
+ };
12
+ export var EditorExperience;
13
+
14
+ (function (EditorExperience) {
15
+ EditorExperience["loadEditor"] = "load";
16
+ EditorExperience["typing"] = "type";
17
+ EditorExperience["interaction"] = "interact";
18
+ EditorExperience["editSession"] = "editSession";
19
+ })(EditorExperience || (EditorExperience = {}));
20
+
21
+ export var RELIABILITY_INTERVAL = 30000;
22
+ export var ExperienceStore = /*#__PURE__*/function () {
23
+ function ExperienceStore() {
24
+ _classCallCheck(this, ExperienceStore);
25
+
26
+ this.experiences = new Map();
27
+
28
+ for (var _i = 0, _Object$values = Object.values(EditorExperience); _i < _Object$values.length; _i++) {
29
+ var experienceId = _Object$values[_i];
30
+ var experience = new UFOExperience(experienceId, experienceConfig);
31
+ this.experiences.set(experienceId, experience);
32
+ }
33
+ }
34
+
35
+ _createClass(ExperienceStore, [{
36
+ key: "get",
37
+ value: function get(experienceId) {
38
+ return this.experiences.get(experienceId);
39
+ }
40
+ }, {
41
+ key: "getActive",
42
+ value: function getActive(experienceId) {
43
+ var experience = this.experiences.get(experienceId);
44
+
45
+ if (!(experience !== null && experience !== void 0 && experience.state.final)) {
46
+ return experience;
47
+ }
48
+ }
49
+ }, {
50
+ key: "getAll",
51
+ value: function getAll() {
52
+ return Array.from(this.experiences.values());
53
+ }
54
+ }, {
55
+ key: "start",
56
+ value: function start(experienceId, startTime) {
57
+ var _this$get;
58
+
59
+ (_this$get = this.get(experienceId)) === null || _this$get === void 0 ? void 0 : _this$get.start(startTime);
60
+ }
61
+ }, {
62
+ key: "addMetadata",
63
+ value: function addMetadata(experienceId, metadata) {
64
+ var _this$get2;
65
+
66
+ (_this$get2 = this.get(experienceId)) === null || _this$get2 === void 0 ? void 0 : _this$get2.addMetadata(metadata);
67
+ }
68
+ }, {
69
+ key: "mark",
70
+ value: function mark(experienceId, _mark, value) {
71
+ var _this$get3;
72
+
73
+ (_this$get3 = this.get(experienceId)) === null || _this$get3 === void 0 ? void 0 : _this$get3.mark(_mark, value);
74
+ }
75
+ }, {
76
+ key: "success",
77
+ value: function success(experienceId, metadata) {
78
+ var _this$getActive;
79
+
80
+ return (_this$getActive = this.getActive(experienceId)) === null || _this$getActive === void 0 ? void 0 : _this$getActive.success({
81
+ metadata: metadata
82
+ });
83
+ }
84
+ }, {
85
+ key: "fail",
86
+ value: function fail(experienceId, metadata) {
87
+ var _this$getActive2;
88
+
89
+ (_this$getActive2 = this.getActive(experienceId)) === null || _this$getActive2 === void 0 ? void 0 : _this$getActive2.failure({
90
+ metadata: metadata
91
+ });
92
+ }
93
+ }, {
94
+ key: "abort",
95
+ value: function abort(experienceId, metadata) {
96
+ var _this = this;
97
+
98
+ // We add this wait in here because when React catches an error it unmounts the component
99
+ // before the error boundary's componentDidCatch is called
100
+ // In this case we want to fail the experience, but without this wait, abort is called first
101
+ setTimeout(function () {
102
+ var _this$getActive3;
103
+
104
+ (_this$getActive3 = _this.getActive(experienceId)) === null || _this$getActive3 === void 0 ? void 0 : _this$getActive3.abort({
105
+ metadata: metadata
106
+ });
107
+ }, 0);
108
+ }
109
+ }, {
110
+ key: "abortAll",
111
+ value: function abortAll(metadata) {
112
+ var _this2 = this;
113
+
114
+ this.experiences.forEach(function (experience) {
115
+ _this2.abort(experience.id, metadata);
116
+ });
117
+ }
118
+ }, {
119
+ key: "failAll",
120
+ value: function failAll(metadata) {
121
+ var _this3 = this;
122
+
123
+ this.experiences.forEach(function (experience) {
124
+ _this3.fail(experience.id, metadata);
125
+ });
126
+ }
127
+ }], [{
128
+ key: "getInstance",
129
+ value: function getInstance(view) {
130
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
131
+
132
+ if (!this.stores.get(view) || options !== null && options !== void 0 && options.forceNewInstance) {
133
+ var store = new ExperienceStore();
134
+ this.stores.set(view, store);
135
+ }
136
+
137
+ return this.stores.get(view);
138
+ }
139
+ }]);
140
+
141
+ return ExperienceStore;
142
+ }();
143
+
144
+ _defineProperty(ExperienceStore, "stores", new WeakMap());
@@ -0,0 +1 @@
1
+ export { ExperienceStore, EditorExperience, RELIABILITY_INTERVAL } from './experience-store';