@instructure/canvas-rce 6.0.0 → 7.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/__tests__/common/indicate.test.js +5 -6
  3. package/es/bridge/Bridge.js +2 -4
  4. package/es/canvasFileBrowser/FileBrowser.js +2 -4
  5. package/es/common/browser.js +2 -2
  6. package/es/common/fileUrl.js +13 -3
  7. package/es/defaultTinymceConfig.d.ts +1 -1
  8. package/es/defaultTinymceConfig.js +149 -114
  9. package/es/enhance-user-content/enhance_user_content.js +7 -1
  10. package/es/enhance-user-content/instructure_helper.js +4 -0
  11. package/es/enhance-user-content/youtube_overlay.d.ts +1 -0
  12. package/es/enhance-user-content/youtube_overlay.js +87 -0
  13. package/es/format-message.d.js +1 -0
  14. package/es/format-message.js +5 -0
  15. package/es/index.d.ts +1 -1
  16. package/es/rce/RCE.d.ts +0 -1
  17. package/es/rce/RCE.js +5 -10
  18. package/es/rce/RCEGlobals.d.ts +0 -2
  19. package/es/rce/RCEGlobals.js +0 -1
  20. package/es/rce/RCEVariants.d.ts +8 -3
  21. package/es/rce/RCEVariants.js +36 -10
  22. package/es/rce/RCEWrapper.d.ts +3 -5
  23. package/es/rce/RCEWrapper.js +68 -83
  24. package/es/rce/RCEWrapperProps.d.ts +1 -1
  25. package/es/rce/ShowOnFocusButton/index.js +4 -2
  26. package/es/rce/StatusBar.js +61 -15
  27. package/es/rce/alertHandler.js +6 -7
  28. package/es/rce/plugins/instructure-ui-icons/plugin.js +2 -2
  29. package/es/rce/plugins/instructure_equation/EquationEditorModal/index.d.ts +1 -1
  30. package/es/rce/plugins/instructure_equation/EquationEditorModal/index.js +6 -10
  31. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/Course.d.ts +5 -15
  32. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/Course.js +4 -10
  33. package/es/rce/plugins/instructure_image/ImageEmbedOptions.d.ts +7 -0
  34. package/es/rce/plugins/instructure_image/ImageEmbedOptions.js +49 -9
  35. package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolDialog/ExternalToolDialog.d.ts +1 -8
  36. package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolDialog/ExternalToolDialog.js +13 -33
  37. package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolDialog/ExternalToolDialogModal.d.ts +1 -2
  38. package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolDialog/ExternalToolDialogModal.js +2 -1
  39. package/es/rce/plugins/instructure_record/AudioOptionsTray/TrayController.js +1 -2
  40. package/es/rce/plugins/instructure_record/VideoOptionsTray/TrayController.js +2 -4
  41. package/es/rce/plugins/instructure_record/VideoOptionsTray/index.js +10 -7
  42. package/es/rce/plugins/shared/ContentSelection.js +4 -7
  43. package/es/rce/plugins/shared/DimensionsInput/index.js +3 -3
  44. package/es/rce/plugins/shared/FixedContentTray.d.ts +7 -23
  45. package/es/rce/plugins/shared/FixedContentTray.js +7 -16
  46. package/es/rce/plugins/shared/ImageCropper/constants.d.ts +1 -1
  47. package/es/rce/plugins/shared/ImageCropper/constants.js +1 -1
  48. package/es/rce/plugins/shared/ImageCropper/controls/CustomNumberInput.js +1 -1
  49. package/es/rce/plugins/shared/PreviewIcon.js +1 -1
  50. package/es/rce/plugins/shared/ai_tools/aiicons.d.ts +3 -3
  51. package/es/rce/plugins/shared/ai_tools/aiicons.js +11 -11
  52. package/es/rce/plugins/shared/fileTypeUtils.js +1 -1
  53. package/es/rce/plugins/tinymce-a11y-checker/components/checker.js +7 -1
  54. package/es/rce/plugins/tinymce-a11y-checker/plugin.js +50 -52
  55. package/es/rce/plugins/tinymce-a11y-checker/utils/indicate.d.ts +1 -1
  56. package/es/rce/plugins/tinymce-a11y-checker/utils/indicate.js +1 -1
  57. package/es/rce/style.js +47 -45
  58. package/es/rcs/api.d.ts +4 -1
  59. package/es/rcs/api.js +9 -13
  60. package/es/translations/locales/ar.js +29 -5
  61. package/es/translations/locales/ca.js +32 -8
  62. package/es/translations/locales/cy.js +29 -5
  63. package/es/translations/locales/da-x-k12.js +29 -5
  64. package/es/translations/locales/da.js +29 -5
  65. package/es/translations/locales/de.js +29 -5
  66. package/es/translations/locales/en-AU-x-unimelb.js +29 -5
  67. package/es/translations/locales/en-GB-x-ukhe.js +29 -5
  68. package/es/translations/locales/en.js +20 -5
  69. package/es/translations/locales/en_AU.js +29 -5
  70. package/es/translations/locales/en_CA.js +29 -5
  71. package/es/translations/locales/en_CY.js +29 -5
  72. package/es/translations/locales/en_GB.js +29 -5
  73. package/es/translations/locales/es.js +29 -5
  74. package/es/translations/locales/es_ES.js +29 -5
  75. package/es/translations/locales/fa_IR.js +0 -3
  76. package/es/translations/locales/fi.js +29 -5
  77. package/es/translations/locales/fr.js +29 -5
  78. package/es/translations/locales/fr_CA.js +30 -6
  79. package/es/translations/locales/ga.js +46 -22
  80. package/es/translations/locales/hi.js +29 -5
  81. package/es/translations/locales/ht.js +29 -5
  82. package/es/translations/locales/hu.js +0 -6
  83. package/es/translations/locales/id.js +29 -5
  84. package/es/translations/locales/is.js +23 -5
  85. package/es/translations/locales/it.js +29 -5
  86. package/es/translations/locales/ja.js +29 -5
  87. package/es/translations/locales/mi.js +29 -5
  88. package/es/translations/locales/ms.js +29 -5
  89. package/es/translations/locales/nb-x-k12.js +29 -5
  90. package/es/translations/locales/nb.js +29 -5
  91. package/es/translations/locales/nl.js +29 -5
  92. package/es/translations/locales/nn.js +0 -6
  93. package/es/translations/locales/pl.js +29 -5
  94. package/es/translations/locales/pt.js +29 -5
  95. package/es/translations/locales/pt_BR.js +29 -5
  96. package/es/translations/locales/ru.js +29 -5
  97. package/es/translations/locales/sl.js +29 -5
  98. package/es/translations/locales/sv-x-k12.js +29 -5
  99. package/es/translations/locales/sv.js +29 -5
  100. package/es/translations/locales/th.js +29 -5
  101. package/es/translations/locales/uk_UA.js +0 -6
  102. package/es/translations/locales/vi.js +29 -5
  103. package/es/translations/locales/zh-Hans.js +29 -5
  104. package/es/translations/locales/zh-Hant.js +29 -5
  105. package/es/translations/locales/zh.js +29 -5
  106. package/es/translations/locales/zh_HK.js +29 -5
  107. package/es/util/contextHelper.d.ts +7 -0
  108. package/{testcafe/axe.test.js → es/util/contextHelper.js} +10 -21
  109. package/es/util/loadingPlaceholder.js +11 -11
  110. package/eslint.config.js +3 -25
  111. package/jest/jest-setup.js +27 -2
  112. package/jest.config.js +5 -1
  113. package/package.json +62 -85
  114. package/testcafe/RCEWrapper.test.js +0 -319
  115. package/testcafe/StatusBar.test.js +0 -108
  116. package/testcafe/enhanceUserContent.html +0 -58
  117. package/testcafe/enhanceUserContent.test.js +0 -44
  118. package/testcafe/entry.jsx +0 -77
  119. package/testcafe/testcafe.html +0 -14
  120. package/webpack.testcafe.config.js +0 -61
@@ -20,10 +20,10 @@
20
20
  import { IconCopyLine, IconRefreshLine } from '@instructure/ui-icons/es/svg';
21
21
  const AIWandSVG = `<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
22
22
  <mask id="mask0_5548_26552" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="18" height="18">
23
- <path d="M8.48511 5.85958C8.34447 5.71049 8.11666 5.71049 7.97603 5.85958L6.54795 7.3735C6.40731 7.52256 6.40731 7.76409 6.54795 7.91315L8.75896 10.2571L8.75968 10.2582L8.76075 10.259L15.9574 17.8882C16.0277 17.9627 16.1198 18 16.2119 18C16.304 18 16.3961 17.9627 16.4664 17.8882L17.8945 16.3743C18.0352 16.2252 18.0352 15.9837 17.8945 15.8346L8.48511 5.85958ZM8.23057 6.66907L9.93327 8.47413L9.01436 9.44848L7.31157 7.64331L8.23057 6.66907ZM16.2119 17.0787L9.52344 9.98813L10.4423 9.01378L17.1309 16.1044L16.2119 17.0787Z" fill="#2D3B45"/>
24
- <path d="M6.9677 4.52528C6.98177 4.52716 6.99581 4.52789 7.00988 4.52789C7.13082 4.52789 7.24473 4.46343 7.3119 4.35423L7.89726 3.3986L8.97165 3.3688C9.10875 3.3647 9.23182 3.27899 9.28912 3.14703C9.34641 3.01511 9.32815 2.86005 9.242 2.74714L8.56629 1.86119L8.8711 0.769191C8.91013 0.629809 8.87074 0.479228 8.77021 0.380468C8.66999 0.281678 8.52444 0.251498 8.39683 0.304431L7.39345 0.712163L6.50783 0.0674013C6.395 -0.0153617 6.24769 -0.0224389 6.12816 0.0491233C6.00862 0.119925 5.93726 0.256733 5.94426 0.401699L6.00018 1.53956L5.14798 2.23316C5.03898 2.32151 4.98731 2.46759 5.01402 2.61033C5.04075 2.75272 5.1413 2.86675 5.27383 2.90442L6.31166 3.19959L6.67062 4.27372C6.71633 4.4105 6.83164 4.50815 6.9677 4.52528ZM6.16471 2.36772L6.58872 2.0226C6.68292 1.94618 6.73531 1.82543 6.72932 1.7002L6.70157 1.13443L7.14172 1.45495C7.23946 1.52614 7.36393 1.54216 7.47466 1.49672L7.97354 1.29396L7.822 1.83698C7.78827 1.95773 7.81287 2.08781 7.88741 2.18546L8.2235 2.62601L7.68912 2.64089C7.57063 2.64425 7.46131 2.70912 7.39662 2.81458L7.10552 3.28978L6.92693 2.75571C6.88753 2.63718 6.79542 2.54699 6.68083 2.51455L6.16471 2.36772Z" fill="#2D3B45"/>
25
- <path d="M5.00785 9.67232L5.31265 8.58029C5.35166 8.4409 5.31229 8.29032 5.21174 8.19156C5.11119 8.0928 4.96636 8.06262 4.83838 8.11553L3.83536 8.52329L2.94939 7.8785C2.83617 7.79614 2.68853 7.78904 2.56968 7.86025C2.45015 7.93105 2.37878 8.06783 2.38582 8.21282L2.44171 9.35068L1.5895 10.0443C1.48054 10.1326 1.42884 10.2787 1.45557 10.4215C1.48227 10.5638 1.58283 10.6779 1.71538 10.7155L2.75358 11.0107L3.11251 12.0845C3.15822 12.2212 3.27353 12.3189 3.40959 12.336C3.42366 12.3379 3.43773 12.3386 3.45179 12.3386C3.57273 12.3386 3.68664 12.2742 3.75379 12.1649L4.33915 11.2097L5.41354 11.1799C5.55067 11.1758 5.6737 11.0901 5.731 10.9582C5.78833 10.8262 5.77004 10.6712 5.68391 10.5582L5.00785 9.67232ZM4.13101 10.452C4.01255 10.4554 3.90319 10.5202 3.8385 10.6257L3.54741 11.1009L3.36881 10.5668C3.32945 10.4483 3.23734 10.3581 3.12271 10.3257L2.6066 10.1788L3.03024 9.83369C3.12448 9.7573 3.17687 9.63655 3.17088 9.51133L3.1431 8.94517L3.58363 9.26608C3.68137 9.33764 3.80581 9.35329 3.91655 9.30781L4.41509 9.10506L4.26356 9.6481C4.22982 9.76886 4.25443 9.89894 4.32894 9.99659L4.66541 10.4371L4.13101 10.452Z" fill="#2D3B45"/>
26
- <path d="M1.96063 6.47752C1.97467 6.47936 1.98874 6.48012 2.00281 6.48012C2.12375 6.48012 2.23765 6.41563 2.3048 6.30643L2.89016 5.35083L3.96458 5.321C4.10168 5.3169 4.22472 5.23119 4.28204 5.09923C4.33934 4.96731 4.32105 4.81225 4.23492 4.69934L3.55922 3.81343L3.86402 2.72139C3.90303 2.58201 3.86366 2.43143 3.76311 2.33267C3.66292 2.23391 3.51701 2.2037 3.38975 2.25663L2.38637 2.66437L1.50076 2.0196C1.38754 1.93687 1.24095 1.92976 1.12106 2.00133C1.00152 2.07216 0.930156 2.20894 0.937191 2.3539L0.993081 3.49176L0.140875 4.18536C0.0319077 4.27371 -0.0197896 4.41982 0.00694182 4.56256C0.0336457 4.70493 0.134199 4.81898 0.266753 4.85662L1.30459 5.15179L1.66355 6.22592C1.70923 6.3627 1.82457 6.46035 1.96063 6.47752ZM1.15764 4.31992L1.58161 3.9748C1.67585 3.89838 1.72824 3.77763 1.72225 3.6524L1.69447 3.08666L2.13464 3.40718C2.23274 3.47872 2.35718 3.49439 2.46759 3.44892L2.96646 3.24616L2.81493 3.78918C2.78119 3.90996 2.8058 4.04001 2.88031 4.13766L3.21643 4.57821L2.68204 4.59312C2.56356 4.59646 2.45421 4.66132 2.38954 4.76678L2.09842 5.24198L1.91983 4.70791C1.88046 4.58938 1.78835 4.49919 1.67373 4.46676L1.15764 4.31992Z" fill="#2D3B45"/>
23
+ <path d="M8.48511 5.85958C8.34447 5.71049 8.11666 5.71049 7.97603 5.85958L6.54795 7.3735C6.40731 7.52256 6.40731 7.76409 6.54795 7.91315L8.75896 10.2571L8.75968 10.2582L8.76075 10.259L15.9574 17.8882C16.0277 17.9627 16.1198 18 16.2119 18C16.304 18 16.3961 17.9627 16.4664 17.8882L17.8945 16.3743C18.0352 16.2252 18.0352 15.9837 17.8945 15.8346L8.48511 5.85958ZM8.23057 6.66907L9.93327 8.47413L9.01436 9.44848L7.31157 7.64331L8.23057 6.66907ZM16.2119 17.0787L9.52344 9.98813L10.4423 9.01378L17.1309 16.1044L16.2119 17.0787Z" fill="#273540"/>
24
+ <path d="M6.9677 4.52528C6.98177 4.52716 6.99581 4.52789 7.00988 4.52789C7.13082 4.52789 7.24473 4.46343 7.3119 4.35423L7.89726 3.3986L8.97165 3.3688C9.10875 3.3647 9.23182 3.27899 9.28912 3.14703C9.34641 3.01511 9.32815 2.86005 9.242 2.74714L8.56629 1.86119L8.8711 0.769191C8.91013 0.629809 8.87074 0.479228 8.77021 0.380468C8.66999 0.281678 8.52444 0.251498 8.39683 0.304431L7.39345 0.712163L6.50783 0.0674013C6.395 -0.0153617 6.24769 -0.0224389 6.12816 0.0491233C6.00862 0.119925 5.93726 0.256733 5.94426 0.401699L6.00018 1.53956L5.14798 2.23316C5.03898 2.32151 4.98731 2.46759 5.01402 2.61033C5.04075 2.75272 5.1413 2.86675 5.27383 2.90442L6.31166 3.19959L6.67062 4.27372C6.71633 4.4105 6.83164 4.50815 6.9677 4.52528ZM6.16471 2.36772L6.58872 2.0226C6.68292 1.94618 6.73531 1.82543 6.72932 1.7002L6.70157 1.13443L7.14172 1.45495C7.23946 1.52614 7.36393 1.54216 7.47466 1.49672L7.97354 1.29396L7.822 1.83698C7.78827 1.95773 7.81287 2.08781 7.88741 2.18546L8.2235 2.62601L7.68912 2.64089C7.57063 2.64425 7.46131 2.70912 7.39662 2.81458L7.10552 3.28978L6.92693 2.75571C6.88753 2.63718 6.79542 2.54699 6.68083 2.51455L6.16471 2.36772Z" fill="#273540"/>
25
+ <path d="M5.00785 9.67232L5.31265 8.58029C5.35166 8.4409 5.31229 8.29032 5.21174 8.19156C5.11119 8.0928 4.96636 8.06262 4.83838 8.11553L3.83536 8.52329L2.94939 7.8785C2.83617 7.79614 2.68853 7.78904 2.56968 7.86025C2.45015 7.93105 2.37878 8.06783 2.38582 8.21282L2.44171 9.35068L1.5895 10.0443C1.48054 10.1326 1.42884 10.2787 1.45557 10.4215C1.48227 10.5638 1.58283 10.6779 1.71538 10.7155L2.75358 11.0107L3.11251 12.0845C3.15822 12.2212 3.27353 12.3189 3.40959 12.336C3.42366 12.3379 3.43773 12.3386 3.45179 12.3386C3.57273 12.3386 3.68664 12.2742 3.75379 12.1649L4.33915 11.2097L5.41354 11.1799C5.55067 11.1758 5.6737 11.0901 5.731 10.9582C5.78833 10.8262 5.77004 10.6712 5.68391 10.5582L5.00785 9.67232ZM4.13101 10.452C4.01255 10.4554 3.90319 10.5202 3.8385 10.6257L3.54741 11.1009L3.36881 10.5668C3.32945 10.4483 3.23734 10.3581 3.12271 10.3257L2.6066 10.1788L3.03024 9.83369C3.12448 9.7573 3.17687 9.63655 3.17088 9.51133L3.1431 8.94517L3.58363 9.26608C3.68137 9.33764 3.80581 9.35329 3.91655 9.30781L4.41509 9.10506L4.26356 9.6481C4.22982 9.76886 4.25443 9.89894 4.32894 9.99659L4.66541 10.4371L4.13101 10.452Z" fill="#273540"/>
26
+ <path d="M1.96063 6.47752C1.97467 6.47936 1.98874 6.48012 2.00281 6.48012C2.12375 6.48012 2.23765 6.41563 2.3048 6.30643L2.89016 5.35083L3.96458 5.321C4.10168 5.3169 4.22472 5.23119 4.28204 5.09923C4.33934 4.96731 4.32105 4.81225 4.23492 4.69934L3.55922 3.81343L3.86402 2.72139C3.90303 2.58201 3.86366 2.43143 3.76311 2.33267C3.66292 2.23391 3.51701 2.2037 3.38975 2.25663L2.38637 2.66437L1.50076 2.0196C1.38754 1.93687 1.24095 1.92976 1.12106 2.00133C1.00152 2.07216 0.930156 2.20894 0.937191 2.3539L0.993081 3.49176L0.140875 4.18536C0.0319077 4.27371 -0.0197896 4.41982 0.00694182 4.56256C0.0336457 4.70493 0.134199 4.81898 0.266753 4.85662L1.30459 5.15179L1.66355 6.22592C1.70923 6.3627 1.82457 6.46035 1.96063 6.47752ZM1.15764 4.31992L1.58161 3.9748C1.67585 3.89838 1.72824 3.77763 1.72225 3.6524L1.69447 3.08666L2.13464 3.40718C2.23274 3.47872 2.35718 3.49439 2.46759 3.44892L2.96646 3.24616L2.81493 3.78918C2.78119 3.90996 2.8058 4.04001 2.88031 4.13766L3.21643 4.57821L2.68204 4.59312C2.56356 4.59646 2.45421 4.66132 2.38954 4.76678L2.09842 5.24198L1.91983 4.70791C1.88046 4.58938 1.78835 4.49919 1.67373 4.46676L1.15764 4.31992Z" fill="#273540"/>
27
27
  </mask>
28
28
  <g mask="url(#mask0_5548_26552)">
29
29
  <rect width="18" height="18" fill="currentColor"/>
@@ -31,17 +31,17 @@ const AIWandSVG = `<svg width="18" height="18" viewBox="0 0 18 18" fill="none" x
31
31
  </svg>
32
32
  `;
33
33
  const InsertSVG = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none">
34
- <path d="M16.9455 16.9451H12.375V18H18V12.375H16.9455V16.9451Z" fill="#2D3B45"/>
35
- <path d="M1.05487 1.0545H5.625V0H0V5.625H1.0545L1.05487 1.0545Z" fill="#2D3B45"/>
36
- <path d="M12.375 0V1.0545H16.9455V5.625H18V0H12.375Z" fill="#2D3B45"/>
37
- <path d="M1.05487 12.375H0V18H5.625V16.9451H1.05487V12.375Z" fill="#2D3B45"/>
38
- <path d="M3.59082 14.4093H14.4099V3.59058H3.59082V14.4093ZM4.64532 4.64508H13.3551V13.3548H4.64532V4.64508Z" fill="#2D3B45"/>
39
- <path d="M9.52752 6.92065H8.47302V8.47278H6.9209V9.52728H8.47302V11.0794H9.52752V9.52728H11.0796V8.47278H9.52752V6.92065Z" fill="#2D3B45"/>
34
+ <path d="M16.9455 16.9451H12.375V18H18V12.375H16.9455V16.9451Z" fill="#273540"/>
35
+ <path d="M1.05487 1.0545H5.625V0H0V5.625H1.0545L1.05487 1.0545Z" fill="#273540"/>
36
+ <path d="M12.375 0V1.0545H16.9455V5.625H18V0H12.375Z" fill="#273540"/>
37
+ <path d="M1.05487 12.375H0V18H5.625V16.9451H1.05487V12.375Z" fill="#273540"/>
38
+ <path d="M3.59082 14.4093H14.4099V3.59058H3.59082V14.4093ZM4.64532 4.64508H13.3551V13.3548H4.64532V4.64508Z" fill="#273540"/>
39
+ <path d="M9.52752 6.92065H8.47302V8.47278H6.9209V9.52728H8.47302V11.0794H9.52752V9.52728H11.0796V8.47278H9.52752V6.92065Z" fill="#273540"/>
40
40
  </svg>`;
41
41
  const CopySVG = IconCopyLine?.src;
42
42
  const RefreshSVG = IconRefreshLine?.src;
43
43
  const DislikeSVG = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none">
44
- <path fill-rule="evenodd" clip-rule="evenodd" d="M2.17647 7.41176L3.2353 7.41176L3.2353 6.35294C2.65189 6.35294 2.17647 5.87859 2.17647 5.29411C2.17647 4.70964 2.65189 4.23529 3.2353 4.23529L4.29412 4.23529L4.29412 3.17647C3.71071 3.17647 3.2353 2.70211 3.2353 2.11764C3.2353 1.53317 3.71071 1.05882 4.29412 1.05882L13.2941 1.05882C14.7532 1.05882 15.9412 2.24576 15.9412 3.70588L15.9412 9.52941L14.9417 9.52941C13.6277 9.52941 12.3698 10.0694 11.4888 11.0086C10.2267 12.3554 8.738 14.4445 8.54953 16.9412L8.20859 16.9412C7.7353 16.9412 7.28953 16.7315 6.98671 16.3652C6.68071 15.9946 6.55683 15.5107 6.64788 15.0385C6.86071 13.9267 7.21224 12.8255 7.69083 11.7656C7.91424 11.2733 7.87188 10.71 7.58071 10.2568C7.28635 9.80153 6.78659 9.52941 6.24341 9.52941L2.17647 9.52941C1.59306 9.52941 1.11765 9.05506 1.11765 8.47059C1.11765 7.88611 1.59306 7.41176 2.17647 7.41176ZM0.0588235 8.47059C0.0588234 9.63847 1.00859 10.5882 2.17647 10.5882L6.24341 10.5882C6.42765 10.5882 6.59071 10.6761 6.69024 10.8307C6.78765 10.9821 6.80141 11.1642 6.72624 11.3294C6.21377 12.4645 5.83682 13.6461 5.60706 14.8405C5.45776 15.624 5.66212 16.4255 6.17035 17.0396C6.67541 17.6495 7.41871 18 8.20859 18L9.58824 18L9.58824 17.4706C9.58824 15.0851 11.042 13.0341 12.2607 11.7328C12.9426 11.0065 13.9199 10.5882 14.9416 10.5882L17 10.5882L17 3.70588C17 1.66235 15.3376 -1.45327e-07 13.2941 -3.23979e-07L4.29412 -1.11078e-06C3.12624 -1.21288e-06 2.17647 0.949763 2.17647 2.11765C2.17647 2.55282 2.30882 2.95835 2.53435 3.29506C1.71059 3.58518 1.11765 4.37188 1.11765 5.29412C1.11765 5.72929 1.25 6.13482 1.47553 6.47153C0.651767 6.76164 0.0588235 7.54835 0.0588235 8.47059Z" fill="#2D3B45"/>
44
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M2.17647 7.41176L3.2353 7.41176L3.2353 6.35294C2.65189 6.35294 2.17647 5.87859 2.17647 5.29411C2.17647 4.70964 2.65189 4.23529 3.2353 4.23529L4.29412 4.23529L4.29412 3.17647C3.71071 3.17647 3.2353 2.70211 3.2353 2.11764C3.2353 1.53317 3.71071 1.05882 4.29412 1.05882L13.2941 1.05882C14.7532 1.05882 15.9412 2.24576 15.9412 3.70588L15.9412 9.52941L14.9417 9.52941C13.6277 9.52941 12.3698 10.0694 11.4888 11.0086C10.2267 12.3554 8.738 14.4445 8.54953 16.9412L8.20859 16.9412C7.7353 16.9412 7.28953 16.7315 6.98671 16.3652C6.68071 15.9946 6.55683 15.5107 6.64788 15.0385C6.86071 13.9267 7.21224 12.8255 7.69083 11.7656C7.91424 11.2733 7.87188 10.71 7.58071 10.2568C7.28635 9.80153 6.78659 9.52941 6.24341 9.52941L2.17647 9.52941C1.59306 9.52941 1.11765 9.05506 1.11765 8.47059C1.11765 7.88611 1.59306 7.41176 2.17647 7.41176ZM0.0588235 8.47059C0.0588234 9.63847 1.00859 10.5882 2.17647 10.5882L6.24341 10.5882C6.42765 10.5882 6.59071 10.6761 6.69024 10.8307C6.78765 10.9821 6.80141 11.1642 6.72624 11.3294C6.21377 12.4645 5.83682 13.6461 5.60706 14.8405C5.45776 15.624 5.66212 16.4255 6.17035 17.0396C6.67541 17.6495 7.41871 18 8.20859 18L9.58824 18L9.58824 17.4706C9.58824 15.0851 11.042 13.0341 12.2607 11.7328C12.9426 11.0065 13.9199 10.5882 14.9416 10.5882L17 10.5882L17 3.70588C17 1.66235 15.3376 -1.45327e-07 13.2941 -3.23979e-07L4.29412 -1.11078e-06C3.12624 -1.21288e-06 2.17647 0.949763 2.17647 2.11765C2.17647 2.55282 2.30882 2.95835 2.53435 3.29506C1.71059 3.58518 1.11765 4.37188 1.11765 5.29412C1.11765 5.72929 1.25 6.13482 1.47553 6.47153C0.651767 6.76164 0.0588235 7.54835 0.0588235 8.47059Z" fill="#273540"/>
45
45
  </svg>`;
46
46
  const AIAvatarSVG = `
47
47
  <svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
@@ -83,7 +83,7 @@ export function mediaPlayerURLFromFile(file, canvasOrigin) {
83
83
  if (typeof content_type !== 'string') throw new Error('Invalid content type');
84
84
  const type = content_type.replace(/\/.*$/, '');
85
85
  const baseOrigin = canvasOrigin !== null && canvasOrigin !== void 0 ? canvasOrigin : window.location.origin;
86
- if (RCEGlobals.getFeatures()?.media_links_use_attachment_id && isAudioOrVideo(content_type) && file.id) {
86
+ if (isAudioOrVideo(content_type) && file.id) {
87
87
  const url = new URL(`/media_attachments_iframe/${file.id}`, baseOrigin);
88
88
  url.searchParams.set('type', type);
89
89
  url.searchParams.set('embedded', 'true');
@@ -115,6 +115,9 @@ export default class Checker extends React.Component {
115
115
  errors: [],
116
116
  errorIndex: 0
117
117
  }, () => {
118
+ window.webkit?.messageHandlers?.modalPresentation?.postMessage?.({
119
+ open: true
120
+ });
118
121
  if (typeof this.state.config.beforeCheck === 'function') {
119
122
  this.state.config.beforeCheck(this.props.editor, () => {
120
123
  this._check(() => {
@@ -292,7 +295,10 @@ export default class Checker extends React.Component {
292
295
  this.setState({
293
296
  open: false
294
297
  }, () => {
295
- this.props.onClose();
298
+ this.props?.onClose();
299
+ window.webkit?.messageHandlers?.modalPresentation?.postMessage?.({
300
+ open: false
301
+ });
296
302
  });
297
303
  }
298
304
  render() {
@@ -27,60 +27,58 @@ const pendingInstanceCallbacks = [];
27
27
  const container = document.createElement('div');
28
28
  container.className = 'tinymce-a11y-checker-container';
29
29
  document.body.appendChild(container);
30
- tinymce.create('tinymce.plugins.AccessibilityChecker', {
31
- init(ed) {
32
- ed.addCommand('openAccessibilityChecker', function (ui, {
33
- done,
34
- config,
35
- additionalRules,
36
- mountNode,
37
- triggerElementId,
38
- onFixError
39
- }) {
40
- if (!isCheckerOpen) {
41
- ReactDOM.render(/*#__PURE__*/React.createElement(Checker, {
42
- getBody: ed.getBody.bind(ed),
43
- editor: ed,
44
- additionalRules: additionalRules,
45
- mountNode: mountNode,
46
- onClose: () => {
47
- isCheckerOpen = false;
48
- if (triggerElementId) {
49
- const button = document.querySelectorAll(`[data-btn-id=${triggerElementId}]`);
50
- button[0]?.focus();
51
- }
52
- },
53
- onFixError: onFixError
54
- }), container, function () {
55
- // this is a workaround for react 16 since ReactDOM.render is not
56
- // guaranteed to return the instance synchronously (especially if called
57
- // within another component's lifecycle method eg: componentDidMount). see:
58
- // https://github.com/facebook/react/issues/10309#issuecomment-318434635
59
- instance = this;
60
- if (config) getInstance(instance => instance.setConfig(config));
61
- pendingInstanceCallbacks.forEach(cb => cb(instance));
62
- instance.check(done);
63
- });
64
- isCheckerOpen = true;
65
- }
66
- });
67
- ed.addCommand('checkAccessibility', function (ui, {
68
- done,
69
- config,
70
- additionalRules
71
- }) {
72
- checkNode(ed.getBody(), done, config, additionalRules);
73
- });
74
- ed.ui.registry.addButton('check_a11y', {
75
- title: formatMessage('Check Accessibility'),
76
- onAction: _ => ed.execCommand('openAccessibilityChecker'),
77
- icon: 'a11y'
78
- });
79
- }
80
- });
30
+ const AccessibilityChecker = function (ed) {
31
+ ed.addCommand('openAccessibilityChecker', function (ui, {
32
+ done,
33
+ config,
34
+ additionalRules,
35
+ mountNode,
36
+ triggerElementId,
37
+ onFixError
38
+ }) {
39
+ if (!isCheckerOpen) {
40
+ ReactDOM.render(/*#__PURE__*/React.createElement(Checker, {
41
+ getBody: ed.getBody.bind(ed),
42
+ editor: ed,
43
+ additionalRules: additionalRules,
44
+ mountNode: mountNode,
45
+ onClose: () => {
46
+ isCheckerOpen = false;
47
+ if (triggerElementId) {
48
+ const button = document.querySelectorAll(`[data-btn-id=${triggerElementId}]`);
49
+ button[0]?.focus();
50
+ }
51
+ },
52
+ onFixError: onFixError
53
+ }), container, function () {
54
+ // this is a workaround for react 16 since ReactDOM.render is not
55
+ // guaranteed to return the instance synchronously (especially if called
56
+ // within another component's lifecycle method eg: componentDidMount). see:
57
+ // https://github.com/facebook/react/issues/10309#issuecomment-318434635
58
+ instance = this;
59
+ if (config) getInstance(instance => instance.setConfig(config));
60
+ pendingInstanceCallbacks.forEach(cb => cb(instance));
61
+ instance.check(done);
62
+ });
63
+ isCheckerOpen = true;
64
+ }
65
+ });
66
+ ed.addCommand('checkAccessibility', function (ui, {
67
+ done,
68
+ config,
69
+ additionalRules
70
+ }) {
71
+ checkNode(ed.getBody(), done, config, additionalRules);
72
+ });
73
+ ed.ui.registry.addButton('check_a11y', {
74
+ title: formatMessage('Check Accessibility'),
75
+ onAction: _ => ed.execCommand('openAccessibilityChecker'),
76
+ icon: 'a11y'
77
+ });
78
+ };
81
79
 
82
80
  // Register plugin
83
- tinymce.PluginManager.add('a11y_checker', tinymce.plugins.AccessibilityChecker);
81
+ tinymce.PluginManager.add('a11y_checker', AccessibilityChecker);
84
82
  export function getInstance(cb) {
85
83
  if (instance != null) {
86
84
  return cb(instance);
@@ -3,5 +3,5 @@ export function buildDepthSelector(elem: any): string;
3
3
  export function findChildDepth(parent: any, target: any): number;
4
4
  export function ensureA11yCheckerStyleElement(doc: any): any;
5
5
  export default function indicate(elem: any): void;
6
- export const INDICATOR_STYLE: "\noutline:2px solid #2D3B45;\noutline-offset:2px;\n";
6
+ export const INDICATOR_STYLE: "\noutline:2px solid #273540;\noutline-offset:2px;\n";
7
7
  export const A11Y_CHECKER_STYLE_ELEM_ID: "a11y-checker-style";
@@ -20,7 +20,7 @@
20
20
  // These rules will be assigned to the selector we build below
21
21
  // that locates the violating element in the DOM
22
22
  export const INDICATOR_STYLE = `
23
- outline:2px solid #2D3B45;
23
+ outline:2px solid #273540;
24
24
  outline-offset:2px;
25
25
  `;
26
26
 
package/es/rce/style.js CHANGED
@@ -62,44 +62,44 @@ export default function buildStyle() {
62
62
  break;
63
63
  case 'canvas-a11y':
64
64
  case 'canvas-high-contrast':
65
- themeCanvasButtonBackground = variables.colors.backgroundLight;
66
- themeCanvasSecondaryButtonBorderColor = variables.colors.borderMedium;
65
+ themeCanvasButtonBackground = variables.colors.contrasts.grey1111;
66
+ themeCanvasSecondaryButtonBorderColor = variables.colors.contrasts.grey1214;
67
67
  themeCanvasLinkDecoration = 'underline';
68
- themeCanvasFocusBorderColor = variables.colors.borderBrand;
68
+ themeCanvasFocusBorderColor = variables.colors.contrasts.blue4570;
69
69
  themeCanvasFocusBoxShadow = `0 0 0 2px ${variables.colors.brand}`;
70
70
  themeCanvasBrandColor = variables.colors.brand;
71
71
  break;
72
72
  default:
73
73
  themeCanvasLinkColor = variables.colors.link;
74
74
  themeCanvasLinkDecoration = 'none';
75
- themeCanvasTextColor = variables.colors.textDarkest;
75
+ themeCanvasTextColor = variables.colors.contrasts.grey125125;
76
76
  themeCanvasBrandColor = variables.colors.brand;
77
77
  themeCanvasFocusBorderColor = variables.borders.brand;
78
78
  themeCanvasFocusBoxShadow = `0 0 0 2px ${variables.colors.brand}`;
79
79
  themeCanvasEnabledColor = variables.borders.brand;
80
- themeCanvasPrimaryButtonBackground = variables.colors.backgroundBrand;
81
- themeCanvasPrimaryButtonColor = variables.colors.textLightest;
82
- themeCanvasPrimaryButtonHoverBackground = darken(variables.colors.backgroundBrand, 10);
83
- themeActiveMenuItemBackground = variables.colors.backgroundBrand;
84
- themeActiveMenuItemLabelColor = variables.colors.textLightest;
80
+ themeCanvasPrimaryButtonBackground = variables.colors.contrasts.blue4570;
81
+ themeCanvasPrimaryButtonColor = variables.colors.contrasts.white1010;
82
+ themeCanvasPrimaryButtonHoverBackground = darken(variables.colors.contrasts.blue4570, 10);
83
+ themeActiveMenuItemBackground = variables.colors.contrasts.blue4570;
84
+ themeActiveMenuItemLabelColor = variables.colors.contrasts.white1010;
85
85
  themeTableSelectorHighlightColor = alpha(lighten(variables.colors.brand, 10), 50);
86
- themeCanvasButtonBackground = variables.colors.backgroundLightest;
87
- themeCanvasSecondaryButtonBorderColor = darken(variables.colors.backgroundLight, 10);
86
+ themeCanvasButtonBackground = variables.colors.contrasts.white1010;
87
+ themeCanvasSecondaryButtonBorderColor = darken(variables.colors.contrasts.grey1111, 10);
88
88
  break;
89
89
  }
90
90
  const classNames = {
91
91
  root: 'canvas-rce__skins--root'
92
92
  };
93
- const toolbarButtonHoverBackgroundConst = darken(variables.colors.backgroundLightest, 5);
93
+ const toolbarButtonHoverBackgroundConst = darken(variables.colors.contrasts.white1010, 5);
94
94
  const tinySplitButtonChevronHoverBackgroundConst = darken(toolbarButtonHoverBackgroundConst, 10);
95
95
  const theme = {
96
- canvasBackgroundColor: variables.colors.white,
96
+ canvasBackgroundColor: variables.colors.primitives.white,
97
97
  canvasTextColor: themeCanvasTextColor,
98
- canvasErrorColor: variables.colors.textDanger,
99
- canvasWarningColor: variables.colors.textWarning,
100
- canvasInfoColor: variables.colors.textInfo,
101
- canvasSuccessColor: variables.colors.textSuccess,
102
- canvasBorderColor: variables.colors.borderMedium,
98
+ canvasErrorColor: variables.colors.contrasts.red4570,
99
+ canvasWarningColor: variables.colors.contrasts.orange4570,
100
+ canvasInfoColor: variables.colors.contrasts.blue4570,
101
+ canvasSuccessColor: variables.colors.contrasts.green4570,
102
+ canvasBorderColor: variables.colors.contrasts.grey3045,
103
103
  toolbarButtonHoverBackground: toolbarButtonHoverBackgroundConst,
104
104
  // copied from INSTUI "light" Button
105
105
  tinySplitButtonChevronHoverBackground: tinySplitButtonChevronHoverBackgroundConst,
@@ -112,10 +112,10 @@ export default function buildStyle() {
112
112
  // the instui default button
113
113
  canvasButtonBackground: themeCanvasButtonBackground,
114
114
  canvasButtonBorderColor: 'transparent',
115
- canvasButtonColor: variables.colors.textDarkest,
116
- canvasButtonHoverBackground: variables.colors.backgroundLightest,
115
+ canvasButtonColor: variables.colors.contrasts.grey125125,
116
+ canvasButtonHoverBackground: variables.colors.contrasts.white1010,
117
117
  canvasButtonHoverColor: variables.colors.brand,
118
- canvasButtonActiveBackground: variables.colors.backgroundLightest,
118
+ canvasButtonActiveBackground: variables.colors.contrasts.white1010,
119
119
  canvasButtonFontWeight: variables.typography.fontWeightNormal,
120
120
  canvasButtonFontSize: variables.typography.fontSizeMedium,
121
121
  canvasButtonLineHeight: variables.forms.inputHeightMedium,
@@ -125,19 +125,19 @@ export default function buildStyle() {
125
125
  canvasPrimaryButtonColor: themeCanvasPrimaryButtonColor,
126
126
  canvasPrimaryButtonBorderColor: 'transparent',
127
127
  canvasPrimaryButtonHoverBackground: themeCanvasPrimaryButtonHoverBackground,
128
- canvasPrimaryButtonHoverColor: variables.colors.textLightest,
128
+ canvasPrimaryButtonHoverColor: variables.colors.contrasts.white1010,
129
129
  // the instui secondary button
130
- canvasSecondaryButtonBackground: variables.colors.backgroundLight,
131
- canvasSecondaryButtonColor: variables.colors.textDarkest,
130
+ canvasSecondaryButtonBackground: variables.colors.contrasts.grey1111,
131
+ canvasSecondaryButtonColor: variables.colors.contrasts.grey125125,
132
132
  canvasSecondaryButtonBorderColor: themeCanvasSecondaryButtonBorderColor,
133
- canvasSecondaryButtonHoverBackground: darken(variables.colors.backgroundLight, 10),
134
- canvasSecondaryButtonHoverColor: variables.colors.textDarkest,
133
+ canvasSecondaryButtonHoverBackground: darken(variables.colors.contrasts.grey1111, 10),
134
+ canvasSecondaryButtonHoverColor: variables.colors.contrasts.grey125125,
135
135
  canvasFocusBorderColor: themeCanvasFocusBorderColor,
136
136
  canvasFocusBorderWidth: variables.borders.widthSmall,
137
137
  // canvas really uses widthMedium
138
138
  canvasFocusBoxShadow: themeCanvasFocusBoxShadow,
139
139
  canvasEnabledColor: themeCanvasEnabledColor,
140
- canvasEnabledBoxShadow: `inset 0 0 0.1875rem 0.0625rem ${darken(variables.colors.borderLightest, 25)}`,
140
+ canvasEnabledBoxShadow: `inset 0 0 0.1875rem 0.0625rem ${darken(variables.colors.contrasts.white1010, 25)}`,
141
141
  canvasFontFamily: variables.typography.fontFamily,
142
142
  canvasFontSize: '1rem',
143
143
  canvasFontSizeSmall: variables.typography.fontSizeSmall,
@@ -148,14 +148,14 @@ export default function buildStyle() {
148
148
  canvasModalHeadingFontWeight: variables.typography.fontWeightNormal,
149
149
  canvasModalBodyPadding: variables.spacing.medium,
150
150
  canvasModalFooterPadding: variables.spacing.small,
151
- canvasModalFooterBackground: variables.colors.backgroundLight,
151
+ canvasModalFooterBackground: variables.colors.contrasts.grey1111,
152
152
  canvasFormElementMargin: `0 0 ${variables.spacing.medium} 0`,
153
- canvasFormElementLabelColor: variables.colors.textDarkest,
153
+ canvasFormElementLabelColor: variables.colors.contrasts.grey125125,
154
154
  canvasFormElementLabelMargin: `0 0 ${variables.spacing.small} 0`,
155
155
  canvasFormElementLabelFontSize: variables.typography.fontSizeMedium,
156
156
  canvasFormElementLabelFontWeight: variables.typography.fontWeightBold,
157
157
  // a11y button badge
158
- canvasBadgeBackgroundColor: variables.colors.textInfo
158
+ canvasBadgeBackgroundColor: variables.colors.contrasts.blue4570
159
159
  };
160
160
  const css = `
161
161
  .${classNames.root} {
@@ -282,7 +282,7 @@ export default function buildStyle() {
282
282
  color: ${theme.canvasButtonHoverColor};
283
283
  }
284
284
  .tox .tox-checkbox__icons .tox-checkbox-icon__unchecked svg {
285
- fill: rgba(45, 59, 69, 0.3);
285
+ fill: rgba(39, 53, 64, 0.3);
286
286
  }
287
287
  .tox .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg {
288
288
  fill: ${theme.canvasTextColor};
@@ -298,7 +298,7 @@ export default function buildStyle() {
298
298
  }
299
299
  .tox .tox-collection__group-heading {
300
300
  background-color: #e3e6e8;
301
- color: rgba(45, 59, 69, 0.6);
301
+ color: rgba(39, 53, 64, 0.6);
302
302
  }
303
303
  .tox .tox-collection__item {
304
304
  color: ${theme.canvasTextColor};
@@ -339,7 +339,7 @@ export default function buildStyle() {
339
339
  margin-right: 8px;
340
340
  }
341
341
  .tox .tox-collection__item-accessory {
342
- color: rgba(45, 59, 69, 0.6);
342
+ color: rgba(39, 53, 64, 0.6);
343
343
  }
344
344
  .tox .tox-sv-palette {
345
345
  border: 1px solid black;
@@ -365,19 +365,19 @@ export default function buildStyle() {
365
365
  .tox .tox-comment {
366
366
  background: ${theme.canvasBackgroundColor};
367
367
  border-color: ${theme.canvasBorderColor};
368
- box-shadow: 0 4px 8px 0 rgba(45, 59, 69, 0.1);
368
+ box-shadow: 0 4px 8px 0 rgba(39, 53, 64, 0.1);
369
369
  }
370
370
  .tox .tox-comment__header {
371
371
  color: ${theme.canvasTextColor};
372
372
  }
373
373
  .tox .tox-comment__date {
374
- color: rgba(45, 59, 69, 0.6);
374
+ color: rgba(39, 53, 64, 0.6);
375
375
  }
376
376
  .tox .tox-comment__body {
377
377
  color: ${theme.canvasTextColor};
378
378
  }
379
379
  .tox .tox-comment__expander p {
380
- color: rgba(45, 59, 69, 0.6);
380
+ color: rgba(39, 53, 64, 0.6);
381
381
  }
382
382
  .tox .tox-comment-thread__overlay::after {
383
383
  background: ${theme.canvasBackgroundColor};
@@ -396,10 +396,10 @@ export default function buildStyle() {
396
396
  background-color: ${theme.canvasBackgroundColor};
397
397
  }
398
398
  .tox .tox-user__avatar svg {
399
- fill: rgba(45, 59, 69, 0.6);
399
+ fill: rgba(39, 53, 64, 0.6);
400
400
  }
401
401
  .tox .tox-user__name {
402
- color: rgba(45, 59, 69, 0.6);
402
+ color: rgba(39, 53, 64, 0.6);
403
403
  }
404
404
  .tox .tox-dialog-wrap__backdrop {
405
405
  background-color: rgba(255, 255, 255, 0.75);
@@ -426,7 +426,7 @@ export default function buildStyle() {
426
426
  padding: ${theme.canvasModalBodyPadding};
427
427
  }
428
428
  .tox .tox-dialog__body-nav-item {
429
- color: rgba(45, 59, 69, 0.75);
429
+ color: rgba(39, 53, 64, 0.75);
430
430
  }
431
431
  .tox .tox-dialog__body-nav-item:focus {
432
432
  box-shadow: ${theme.canvasFocusBoxShadow};
@@ -449,10 +449,10 @@ export default function buildStyle() {
449
449
  border: 2px dashed ${theme.canvasBorderColor};
450
450
  }
451
451
  .tox .tox-dropzone p {
452
- color: rgba(45, 59, 69, 0.6);
452
+ color: rgba(39, 53, 64, 0.6);
453
453
  }
454
454
  .tox .tox-edit-area {
455
- border: 1px solid ${theme.canvasBorderColor};
455
+ border: 1px solid rgba(122, 122, 122);
456
456
  border-radius: 3px;
457
457
  }
458
458
  .tox .tox-edit-area__iframe {
@@ -478,14 +478,14 @@ export default function buildStyle() {
478
478
  fill: ${theme.canvasSuccessColor};
479
479
  }
480
480
  .tox .tox-color-input span {
481
- border-color: rgba(45, 59, 69, 0.2);
481
+ border-color: rgba(39, 53, 64, 0.2);
482
482
  }
483
483
  .tox .tox-color-input span:focus {
484
484
  border-color: ${theme.canvasBrandColor};
485
485
  }
486
486
  .tox .tox-label,
487
487
  .tox .tox-toolbar-label {
488
- color: rgba(45, 59, 69, 0.6);
488
+ color: rgba(39, 53, 64, 0.6);
489
489
  }
490
490
  .tox .tox-form__group {
491
491
  margin: ${theme.canvasFormElementMargin};
@@ -543,6 +543,7 @@ export default function buildStyle() {
543
543
  }
544
544
  .tox .tox-menubar {
545
545
  background-color: ${theme.canvasBackgroundColor};
546
+ font-family: ${theme.canvasFontFamily};
546
547
  }
547
548
  .tox .tox-mbtn {
548
549
  color: ${theme.canvasButtonColor};
@@ -613,7 +614,7 @@ export default function buildStyle() {
613
614
  background-color: ${theme.canvasBrandColor};
614
615
  }
615
616
  .tox .tox-spinner > div {
616
- background-color: rgba(45, 59, 69, 0.6);
617
+ background-color: rgba(39, 53, 64, 0.6);
617
618
  }
618
619
  .tox .tox-tbtn {
619
620
  border-style: none;
@@ -697,7 +698,7 @@ export default function buildStyle() {
697
698
  }
698
699
  .tox .tox-tooltip__body {
699
700
  background-color: ${theme.canvasTextColor};
700
- box-shadow: 0 2px 4px rgba(45, 59, 69, 0.3);
701
+ box-shadow: 0 2px 4px rgba(39, 53, 64, 0.3);
701
702
  color: rgba(255, 255, 255, 0.75);
702
703
  }
703
704
  .tox .tox-tooltip--down .tox-tooltip__arrow {
@@ -728,6 +729,7 @@ export default function buildStyle() {
728
729
  .tox-editor-container .tox-toolbar-overlord {
729
730
  background-image: none;
730
731
  margin-bottom: 5px;
732
+ font-family: ${theme.canvasFontFamily};
731
733
  }
732
734
  .tox-editor-container .tox-toolbar__primary {
733
735
  background-image: none;
package/es/rcs/api.d.ts CHANGED
@@ -63,7 +63,10 @@ declare class RceApiSource {
63
63
  bookmark: any;
64
64
  files: any;
65
65
  }>;
66
- fetchMedia(props: any): Promise<any>;
66
+ fetchMedia(props: any): Promise<{
67
+ bookmark: any;
68
+ files: any;
69
+ }>;
67
70
  fetchFiles(uri: any): Promise<{
68
71
  bookmark: any;
69
72
  files: any;
package/es/rcs/api.js CHANGED
@@ -21,7 +21,6 @@ import { saveClosedCaptions, saveClosedCaptionsForAttachment, CONSTANTS } from '
21
21
  import { downloadToWrap, fixupFileUrl } from '../common/fileUrl';
22
22
  import alertHandler from '../rce/alertHandler';
23
23
  import buildError from './buildError';
24
- import RCEGlobals from '../rce/RCEGlobals';
25
24
  import { parseUrlPath } from '../util/url-util';
26
25
  export function headerFor(jwt) {
27
26
  return {
@@ -164,18 +163,15 @@ class RceApiSource {
164
163
  fetchMedia(props) {
165
164
  const media = props.media[props.contextType];
166
165
  const uri = media.bookmark || this.uriFor('media', props);
167
- if (RCEGlobals.getFeatures()?.media_links_use_attachment_id) {
168
- return this.apiFetch(uri, headerFor(this.jwt)).then(({
166
+ return this.apiFetch(uri, headerFor(this.jwt)).then(({
167
+ bookmark,
168
+ files
169
+ }) => {
170
+ return {
169
171
  bookmark,
170
- files
171
- }) => {
172
- return {
173
- bookmark,
174
- files: files.map(f => fixupFileUrl(props.contextType, props.contextId, f, this.canvasOrigin))
175
- };
176
- });
177
- }
178
- return this.apiFetch(uri, headerFor(this.jwt));
172
+ files: files.map(f => fixupFileUrl(props.contextType, props.contextId, f, this.canvasOrigin))
173
+ };
174
+ });
179
175
  }
180
176
  fetchFiles(uri) {
181
177
  return this.fetchPage(uri).then(({
@@ -219,7 +215,7 @@ class RceApiSource {
219
215
  title,
220
216
  attachment_id
221
217
  }) {
222
- const uri = RCEGlobals.getFeatures()?.media_links_use_attachment_id && attachment_id ? `${this.baseUri('media_attachments', apiProps.host)}/${attachment_id}?user_entered_title=${encodeURIComponent(title)}` : `${this.baseUri('media_objects', apiProps.host)}/${media_object_id}?user_entered_title=${encodeURIComponent(title)}`;
218
+ const uri = attachment_id ? `${this.baseUri('media_attachments', apiProps.host)}/${attachment_id}?user_entered_title=${encodeURIComponent(title)}` : `${this.baseUri('media_objects', apiProps.host)}/${media_object_id}?user_entered_title=${encodeURIComponent(title)}`;
223
219
  return this.apiPost(uri, headerFor(this.jwt), null, 'PUT');
224
220
  }
225
221
 
@@ -400,6 +400,9 @@ const locale = {
400
400
  "content_type_2cf90d95": {
401
401
  "message": "نوع المحتوى"
402
402
  },
403
+ "continue_to_youtube_content_a34f0f85": {
404
+ "message": "المتابعة إلى محتوى YouTube"
405
+ },
403
406
  "coproduct_e7838082": {
404
407
  "message": "منتج مشترك"
405
408
  },
@@ -499,6 +502,9 @@ const locale = {
499
502
  "decrease_indent_d9cf469d": {
500
503
  "message": "تقليل المسافة البادئة"
501
504
  },
505
+ "decrease_rich_content_area_82068f64": {
506
+ "message": "تقليل منطقة محتوى النص المنسق"
507
+ },
502
508
  "deep_purple_bb3e2907": {
503
509
  "message": "أرجواني داكن"
504
510
  },
@@ -1081,6 +1087,9 @@ const locale = {
1081
1087
  "increase_indent_6af90f7c": {
1082
1088
  "message": "زيادة المسافة البادئة"
1083
1089
  },
1090
+ "increase_rich_content_area_340b775": {
1091
+ "message": "زيادة منطقة محتوى النص المنسق"
1092
+ },
1084
1093
  "indefinite_integral_6623307e": {
1085
1094
  "message": "قيمة التكامل غير المحدد"
1086
1095
  },
@@ -1123,6 +1132,9 @@ const locale = {
1123
1132
  "intersection_cd4590e4": {
1124
1133
  "message": "تقاطع"
1125
1134
  },
1135
+ "invalid_description_991e23bb": {
1136
+ "message": "وصف غير صالح"
1137
+ },
1126
1138
  "invalid_entry_f7d2a0f5": {
1127
1139
  "message": "إدخال غير صالح."
1128
1140
  },
@@ -1690,9 +1702,18 @@ const locale = {
1690
1702
  "please_allow_canvas_to_access_your_microphone_and__dc2c3079": {
1691
1703
  "message": "يرجى السماح لـ Canvas بالوصول إلى الميكروفون وكاميرا الويب لديك."
1692
1704
  },
1705
+ "please_choose_a_file_c2449cc": {
1706
+ "message": "يرجى اختيار ملف"
1707
+ },
1693
1708
  "please_decribe_what_you_would_like_to_compose_27a51be5": {
1694
1709
  "message": "يرجى وصف ما ترغب في إنشائه."
1695
1710
  },
1711
+ "please_enter_a_file_name_f159edc1": {
1712
+ "message": "يرجى إدخال اسم الملف"
1713
+ },
1714
+ "please_select_a_file_of_a_supported_type_1fc578f2": {
1715
+ "message": "يرجى تحديد ملف بنوع مدعوم"
1716
+ },
1696
1717
  "plus_d43cd4ec": {
1697
1718
  "message": "موجب"
1698
1719
  },
@@ -2242,8 +2263,11 @@ const locale = {
2242
2263
  "the_first_heading_on_a_page_should_be_an_h2_859089f2": {
2243
2264
  "message": "يجب أن يكون أول عنوان في الصفحة هو H2."
2244
2265
  },
2245
- "the_following_content_is_partner_provided_ed1da756": {
2246
- "message": "المحتوى التالي تم إدخاله بواسطة شريك"
2266
+ "the_height_of_rich_content_area_is_decreased_36920e0": {
2267
+ "message": "قل ارتفاع منطقة محتوى النص المنسق."
2268
+ },
2269
+ "the_height_of_rich_content_area_is_increased_74c2358d": {
2270
+ "message": "زاد ارتفاع منطقة محتوى النص المنسق."
2247
2271
  },
2248
2272
  "the_material_is_in_the_public_domain_279c39a3": {
2249
2273
  "message": "توجد المادة في المجال العام"
@@ -2254,9 +2278,6 @@ const locale = {
2254
2278
  "the_material_is_subject_to_an_exception_e_g_fair_u_a39c8ca2": {
2255
2279
  "message": "المادة خاضعة لاستثناء - مثال استخدام عادل أو حق الاقتباس أو استثناءات أخرى بموجب قوانين حقوق النشر المعمول بها"
2256
2280
  },
2257
- "the_preceding_content_is_partner_provided_d753928c": {
2258
- "message": "المحتوى السابق تم إدخاله بواسطة شريك"
2259
- },
2260
2281
  "the_pretty_html_editor_is_not_keyboard_accessible__d6d5d2b": {
2261
2282
  "message": "محرر HTML الأنيق لا يمكن الوصول إليه من خلال لوحة المفاتيح. اضغط على Shift-O لفتح محرر HTML البسيط."
2262
2283
  },
@@ -2296,6 +2317,9 @@ const locale = {
2296
2317
  "this_image_is_currently_unavailable_25c68857": {
2297
2318
  "message": "هذه الصورة غير متوفرة حاليًا"
2298
2319
  },
2320
+ "this_video_may_display_youtube_ads_4d19d590": {
2321
+ "message": "قد يعرض هذا الفيديو إعلانات YouTube."
2322
+ },
2299
2323
  "though_your_video_will_have_the_correct_title_in_t_90e427f3": {
2300
2324
  "message": "بالرغم من أن مقطع الفيديو الخاص بك سيشتمل على العنوان الصحيح في المستعرض، لم نتمكن من تحديثه في قاعدة البيانات."
2301
2325
  },