@instructure/canvas-rce 7.3.0 → 8.0.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 (162) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/{es/rce/plugins/shared/ai_tools/index.js → __mocks__/@instructure/ui-media-player/_mockUiMediaPlayer.js} +4 -4
  3. package/__tests__/common/mimeClass.test.js +25 -1
  4. package/__tests__/rcs/api.test.js +280 -251
  5. package/es/canvasFileBrowser/FileBrowser.d.ts +2 -2
  6. package/es/canvasFileBrowser/FileBrowser.js +8 -7
  7. package/es/common/mimeClass.js +3 -1
  8. package/es/defaultTinymceConfig.js +47 -49
  9. package/es/enhance-user-content/doc_previews.js +5 -0
  10. package/es/enhance-user-content/enhance_user_content.js +6 -8
  11. package/es/enhance-user-content/index.d.ts +3 -1
  12. package/es/enhance-user-content/index.js +3 -1
  13. package/es/enhance-user-content/instructure_helper.js +1 -0
  14. package/es/enhance-user-content/youtube_overlay.js +18 -0
  15. package/es/getThemeVars.d.ts +1 -1
  16. package/es/getThemeVars.js +23 -26
  17. package/es/rce/AlertMessageArea.d.ts +2 -2
  18. package/es/rce/AlertMessageArea.js +3 -3
  19. package/es/rce/KeyboardShortcutModal.js +2 -2
  20. package/es/rce/RCE.d.ts +9 -0
  21. package/es/rce/RCE.js +4 -0
  22. package/es/rce/RCEGlobals.d.ts +2 -0
  23. package/es/rce/RCEGlobals.js +1 -0
  24. package/es/rce/RCEVariants.d.ts +1 -2
  25. package/es/rce/RCEVariants.js +1 -2
  26. package/es/rce/RCEWrapper.d.ts +16 -26
  27. package/es/rce/RCEWrapper.js +227 -271
  28. package/es/rce/RCEWrapper.utils.d.ts +1 -1
  29. package/es/rce/RCEWrapperProps.d.ts +2 -1
  30. package/es/rce/RCEWrapperProps.js +2 -1
  31. package/es/rce/StatusBar.d.ts +0 -1
  32. package/es/rce/StatusBar.js +3 -28
  33. package/es/rce/plugins/instructure_equation/EquationEditorModal/advancedOnlySyntax.d.ts +2 -1
  34. package/es/rce/plugins/instructure_equation/EquationEditorModal/advancedOnlySyntax.js +3 -1
  35. package/es/rce/plugins/instructure_equation/EquationEditorModal/index.d.ts +1 -0
  36. package/es/rce/plugins/instructure_equation/EquationEditorModal/index.js +12 -2
  37. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/ImageOptions.js +2 -2
  38. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/ImageSection.js +3 -3
  39. package/es/rce/plugins/instructure_icon_maker/svg/constants.d.ts +20 -5
  40. package/es/rce/plugins/instructure_icon_maker/svg/utils.d.ts +1 -1
  41. package/es/rce/plugins/instructure_icon_maker/utils/IconMakerFormHasChanges.js +2 -2
  42. package/es/rce/plugins/instructure_image/ImageEmbedOptions.d.ts +0 -2
  43. package/es/rce/plugins/instructure_image/ImageEmbedOptions.js +2 -9
  44. package/es/rce/plugins/instructure_paste/plugin.js +18 -12
  45. package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolDialog/ExternalToolDialogModal.d.ts +1 -1
  46. package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolSelectionDialog/ExternalToolSelectionDialog.d.ts +1 -1
  47. package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolSelectionDialog/ExternalToolSelectionDialog.js +25 -25
  48. package/es/rce/plugins/instructure_rce_external_tools/components/util/ToolLaunchIframe.d.ts +4 -0
  49. package/es/rce/plugins/instructure_rce_external_tools/components/util/ToolLaunchIframe.js +4 -0
  50. package/es/rce/plugins/instructure_record/AudioOptionsTray/TrayController.d.ts +11 -2
  51. package/es/rce/plugins/instructure_record/AudioOptionsTray/TrayController.js +92 -10
  52. package/es/rce/plugins/instructure_record/AudioOptionsTray/index.d.ts +13 -1
  53. package/es/rce/plugins/instructure_record/AudioOptionsTray/index.js +216 -24
  54. package/es/rce/plugins/instructure_record/MediaPanel/index.js +16 -5
  55. package/es/rce/plugins/instructure_record/VideoOptionsTray/TrayController.d.ts +14 -13
  56. package/es/rce/plugins/instructure_record/VideoOptionsTray/TrayController.js +110 -39
  57. package/es/rce/plugins/instructure_record/VideoOptionsTray/index.d.ts +11 -1
  58. package/es/rce/plugins/instructure_record/VideoOptionsTray/index.js +242 -67
  59. package/es/rce/plugins/instructure_record/clickCallback.js +19 -4
  60. package/es/rce/plugins/instructure_record/mediaTranslations.js +1 -1
  61. package/es/rce/plugins/instructure_record/playerLayoutOptions.d.ts +25 -0
  62. package/es/rce/plugins/instructure_record/playerLayoutOptions.js +91 -0
  63. package/es/rce/plugins/instructure_record/plugin.js +2 -5
  64. package/es/rce/plugins/instructure_record/utils.d.ts +3 -0
  65. package/es/rce/plugins/instructure_record/utils.js +31 -0
  66. package/es/rce/plugins/instructure_studio_media_options/plugin.js +82 -24
  67. package/es/rce/plugins/instructure_wordcount/components/WordCountModal.js +1 -0
  68. package/es/rce/plugins/shared/ContentSelection.d.ts +6 -1
  69. package/es/rce/plugins/shared/ContentSelection.js +15 -6
  70. package/es/rce/plugins/shared/DimensionsInput/DimensionInput.js +1 -2
  71. package/es/rce/plugins/shared/DimensionsInput/index.js +11 -12
  72. package/es/rce/plugins/shared/DimensionsInput/useDimensionsState.d.ts +1 -1
  73. package/es/rce/plugins/shared/DimensionsInput/useDimensionsState.js +4 -3
  74. package/es/rce/plugins/shared/StudioLtiSupportUtils.d.ts +27 -5
  75. package/es/rce/plugins/shared/StudioLtiSupportUtils.js +94 -9
  76. package/es/rce/plugins/shared/Upload/UploadFile.js +1 -8
  77. package/es/rce/style.d.ts +2 -1
  78. package/es/rce/style.js +4 -2
  79. package/es/rcs/api.d.ts +5 -10
  80. package/es/rcs/api.js +15 -21
  81. package/es/rcs/fake.d.ts +1 -7
  82. package/es/rcs/fake.js +1 -47
  83. package/es/sidebar/actions/media.d.ts +19 -6
  84. package/es/sidebar/actions/media.js +17 -4
  85. package/es/sidebar/actions/upload.d.ts +3 -3
  86. package/es/sidebar/actions/upload.js +9 -9
  87. package/es/sidebar/containers/Sidebar.js +0 -2
  88. package/es/sidebar/containers/sidebarHandlers.d.ts +2 -4
  89. package/es/sidebar/containers/sidebarHandlers.js +2 -5
  90. package/es/sidebar/reducers/index.d.ts +0 -1
  91. package/es/sidebar/reducers/index.js +0 -2
  92. package/es/sidebar/store/initialState.d.ts +0 -1
  93. package/es/sidebar/store/initialState.js +0 -5
  94. package/es/translations/locales/ar.js +77 -77
  95. package/es/translations/locales/ca.js +77 -77
  96. package/es/translations/locales/cy.js +77 -77
  97. package/es/translations/locales/da-x-k12.js +77 -77
  98. package/es/translations/locales/da.js +77 -77
  99. package/es/translations/locales/de.js +77 -77
  100. package/es/translations/locales/el.js +0 -9
  101. package/es/translations/locales/en-AU-x-unimelb.js +77 -77
  102. package/es/translations/locales/en-GB-x-ukhe.js +77 -77
  103. package/es/translations/locales/en.js +67 -79
  104. package/es/translations/locales/en_AU.js +77 -77
  105. package/es/translations/locales/en_CA.js +77 -77
  106. package/es/translations/locales/en_CY.js +77 -77
  107. package/es/translations/locales/en_GB.js +77 -77
  108. package/es/translations/locales/es.js +77 -77
  109. package/es/translations/locales/es_ES.js +77 -77
  110. package/es/translations/locales/fa_IR.js +0 -9
  111. package/es/translations/locales/fi.js +77 -77
  112. package/es/translations/locales/fr.js +77 -77
  113. package/es/translations/locales/fr_CA.js +77 -77
  114. package/es/translations/locales/ga.js +77 -77
  115. package/es/translations/locales/he.js +0 -9
  116. package/es/translations/locales/hi.js +77 -77
  117. package/es/translations/locales/ht.js +77 -77
  118. package/es/translations/locales/hu.js +0 -36
  119. package/es/translations/locales/hy.js +0 -9
  120. package/es/translations/locales/id.js +77 -77
  121. package/es/translations/locales/is.js +77 -77
  122. package/es/translations/locales/it.js +77 -77
  123. package/es/translations/locales/ja.js +77 -77
  124. package/es/translations/locales/ko.js +2455 -133
  125. package/es/translations/locales/mi.js +77 -77
  126. package/es/translations/locales/ms.js +77 -77
  127. package/es/translations/locales/nb-x-k12.js +77 -77
  128. package/es/translations/locales/nb.js +77 -77
  129. package/es/translations/locales/nl.js +78 -78
  130. package/es/translations/locales/nn.js +0 -36
  131. package/es/translations/locales/pl.js +77 -77
  132. package/es/translations/locales/pt.js +77 -77
  133. package/es/translations/locales/pt_BR.js +77 -77
  134. package/es/translations/locales/ru.js +77 -77
  135. package/es/translations/locales/sl.js +77 -77
  136. package/es/translations/locales/sv-x-k12.js +77 -77
  137. package/es/translations/locales/sv.js +77 -77
  138. package/es/translations/locales/th.js +77 -77
  139. package/es/translations/locales/tr.js +1962 -18
  140. package/es/translations/locales/uk_UA.js +0 -9
  141. package/es/translations/locales/vi.js +77 -77
  142. package/es/translations/locales/zh-Hans.js +77 -77
  143. package/es/translations/locales/zh-Hant.js +77 -77
  144. package/es/translations/locales/zh.js +77 -77
  145. package/es/translations/locales/zh_HK.js +77 -77
  146. package/eslint.config.js +16 -147
  147. package/jest/jest-setup.js +1 -0
  148. package/jest.config.js +2 -0
  149. package/oxlint.json +84 -0
  150. package/package.json +86 -62
  151. package/tsconfig.json +3 -2
  152. package/es/rce/plugins/shared/ai_tools/AIResponseModal.d.ts +0 -10
  153. package/es/rce/plugins/shared/ai_tools/AIResponseModal.js +0 -67
  154. package/es/rce/plugins/shared/ai_tools/AIToolsTray.d.ts +0 -18
  155. package/es/rce/plugins/shared/ai_tools/AIToolsTray.js +0 -489
  156. package/es/rce/plugins/shared/ai_tools/aiicons.d.ts +0 -7
  157. package/es/rce/plugins/shared/ai_tools/aiicons.js +0 -60
  158. package/es/rce/plugins/shared/ai_tools/index.d.ts +0 -3
  159. package/es/sidebar/actions/flickr.d.ts +0 -20
  160. package/es/sidebar/actions/flickr.js +0 -60
  161. package/es/sidebar/reducers/flickr.d.ts +0 -1
  162. package/es/sidebar/reducers/flickr.js +0 -49
@@ -37,9 +37,6 @@ const locale = {
37
37
  "add_alt_text_for_the_image_48cd88aa": {
38
38
  "message": "為圖像添加替代文字"
39
39
  },
40
- "add_another_f4e50d57": {
41
- "message": "添加其他"
42
- },
43
40
  "add_cc_subtitles_55f0394e": {
44
41
  "message": "添加副本/字幕"
45
42
  },
@@ -61,12 +58,6 @@ const locale = {
61
58
  "adjacent_links_with_the_same_url_should_be_a_singl_7a1f7f6c": {
62
59
  "message": "URL 相同的相鄰連結應為單一連結。"
63
60
  },
64
- "ai_response_9624e8e8": {
65
- "message": "人工智慧反應"
66
- },
67
- "ai_tools_fda01177": {
68
- "message": "人工智慧工具"
69
- },
70
61
  "aleph_f4ffd155": {
71
62
  "message": "Aleph"
72
63
  },
@@ -82,6 +73,12 @@ const locale = {
82
73
  "all_apps_a50dea49": {
83
74
  "message": "所有應用程式"
84
75
  },
76
+ "allow_media_download_16dcf2bd": {
77
+ "message": "允許媒體下載"
78
+ },
79
+ "allow_transcript_download_3fa239f0": {
80
+ "message": "允許成績單下載"
81
+ },
85
82
  "alpha_15d59033": {
86
83
  "message": "α"
87
84
  },
@@ -103,9 +100,6 @@ const locale = {
103
100
  "an_error_occurred_making_a_network_request_d1bda348": {
104
101
  "message": "發出連線請求時發生錯誤"
105
102
  },
106
- "an_error_occurred_processing_your_request_a3a38d84": {
107
- "message": "處理您的申請時發生錯誤"
108
- },
109
103
  "an_error_occurred_uploading_your_media_71f1444d": {
110
104
  "message": "上載媒體時發生錯誤。"
111
105
  },
@@ -244,6 +238,9 @@ const locale = {
244
238
  "cap_product_3a5265a6": {
245
239
  "message": "便帽產品"
246
240
  },
241
+ "caption_manager_aae0906f": {
242
+ "message": "字幕管理員"
243
+ },
247
244
  "center_align_e68d9997": {
248
245
  "message": "置中對齊"
249
246
  },
@@ -265,6 +262,9 @@ const locale = {
265
262
  "change_text_color_1aecb912": {
266
263
  "message": "變更文字顏色"
267
264
  },
265
+ "changes_will_apply_after_you_save_this_page_fb324e9d": {
266
+ "message": "儲存本頁面後,套用變更。"
267
+ },
268
268
  "changes_you_made_may_not_be_saved_4e8db973": {
269
269
  "message": "您所做的變更或未能儲存。"
270
270
  },
@@ -325,6 +325,9 @@ const locale = {
325
325
  "close_d634289d": {
326
326
  "message": "關閉"
327
327
  },
328
+ "close_keyboard_shortcuts_modal_291ce074": {
329
+ "message": "關閉鍵盤快速鍵模態"
330
+ },
328
331
  "closed_caption_file_must_be_less_than_maxkb_kb_5880f752": {
329
332
  "message": "關閉的字幕檔案必須小於 { maxKb } kb"
330
333
  },
@@ -334,6 +337,9 @@ const locale = {
334
337
  "clubs_suit_c1ffedff": {
335
338
  "message": "梅花(花色)"
336
339
  },
340
+ "collab_575ac7bc": {
341
+ "message": "協作"
342
+ },
337
343
  "collaborations_5c56c15f": {
338
344
  "message": "協作"
339
345
  },
@@ -367,9 +373,6 @@ const locale = {
367
373
  "complex_numbers_a543d004": {
368
374
  "message": "複數"
369
375
  },
370
- "compose_44c904f4": {
371
- "message": "撰寫"
372
- },
373
376
  "computer_1d7dfa6f": {
374
377
  "message": "電腦"
375
378
  },
@@ -400,9 +403,6 @@ const locale = {
400
403
  "coproduct_e7838082": {
401
404
  "message": "副產品"
402
405
  },
403
- "copy_9748f9f": {
404
- "message": "複製"
405
- },
406
406
  "copyright_holder_66ee111": {
407
407
  "message": "版權持有人:"
408
408
  },
@@ -472,8 +472,8 @@ const locale = {
472
472
  "custom_6979cd81": {
473
473
  "message": "自訂"
474
474
  },
475
- "custom_width_and_height_pixels_946eea7c": {
476
- "message": "自訂寬度和高度(像素)"
475
+ "custom_dimensions_96596dba": {
476
+ "message": "自訂尺寸"
477
477
  },
478
478
  "cyan_c1d5f68a": {
479
479
  "message": "青色"
@@ -529,9 +529,6 @@ const locale = {
529
529
  "describe_the_type_ff448da5": {
530
530
  "message": "(描述 { TYPE })"
531
531
  },
532
- "describe_the_video_2fe8f46a": {
533
- "message": "(描述影片)"
534
- },
535
532
  "description_436c48d7": {
536
533
  "message": "描述"
537
534
  },
@@ -553,9 +550,6 @@ const locale = {
553
550
  "dimension_type_f5fa9170": {
554
551
  "message": "尺寸類型"
555
552
  },
556
- "dimensions_45ddb7b7": {
557
- "message": "尺寸"
558
- },
559
553
  "directionality_26ae9e08": {
560
554
  "message": "方向"
561
555
  },
@@ -577,9 +571,6 @@ const locale = {
577
571
  "disjoint_union_e74351a8": {
578
572
  "message": "互斥聯集"
579
573
  },
580
- "dislike_14befc48": {
581
- "message": "取消按讚"
582
- },
583
574
  "display_options_315aba85": {
584
575
  "message": "顯示選項"
585
576
  },
@@ -706,6 +697,9 @@ const locale = {
706
697
  "english_icon_25bfe845": {
707
698
  "message": "英文圖示"
708
699
  },
700
+ "enter_a_media_title_81b490ec": {
701
+ "message": "輸入媒體標題"
702
+ },
709
703
  "enter_at_least_3_characters_to_search_4f037ee0": {
710
704
  "message": "請輸入最少 3 個字元以開始搜尋"
711
705
  },
@@ -715,9 +709,6 @@ const locale = {
715
709
  "enter_search_text_26cb4459": {
716
710
  "message": "輸入搜尋文字"
717
711
  },
718
- "enter_text_8b35c65b": {
719
- "message": "輸入文字"
720
- },
721
712
  "epsilon_54bb8afa": {
722
713
  "message": "ɛ"
723
714
  },
@@ -769,6 +760,9 @@ const locale = {
769
760
  "extra_large_b6cdf1ff": {
770
761
  "message": "超大"
771
762
  },
763
+ "extra_large_width_x_height_px_915571fa": {
764
+ "message": "超大尺寸({ width } x { height }像素)"
765
+ },
772
766
  "extra_small_9ae33252": {
773
767
  "message": "超小"
774
768
  },
@@ -784,15 +778,18 @@ const locale = {
784
778
  "failed_getting_file_contents_e9ea19f4": {
785
779
  "message": "無法取得檔案內容"
786
780
  },
787
- "failed_to_copy_response_d3def551": {
788
- "message": "無法複製反應"
789
- },
790
781
  "failed_to_retrieve_content_from_external_tool_5899c213": {
791
782
  "message": "無法從外部工具擷取內容"
792
783
  },
793
784
  "file_name_8fd421ff": {
794
785
  "message": "檔案名稱"
795
786
  },
787
+ "file_preview_21667a6e": {
788
+ "message": "檔案預覽"
789
+ },
790
+ "file_preview_for_filename_ab314195": {
791
+ "message": "{ fileName } 的檔案預覽"
792
+ },
796
793
  "file_storage_quota_exceeded_b7846cd1": {
797
794
  "message": "已超過檔案儲存配額"
798
795
  },
@@ -973,12 +970,6 @@ const locale = {
973
970
  "height_69b03e15": {
974
971
  "message": "高度"
975
972
  },
976
- "hello_please_describe_the_modifications_you_would__49b19837": {
977
- "message": "您好,請描述您想要對您的作文所做的修改。"
978
- },
979
- "hello_please_describe_the_modifications_you_would__600dbbf0": {
980
- "message": "您好,請描述您想要對您的選擇進行的修改。"
981
- },
982
973
  "hexagon_d8468e0d": {
983
974
  "message": "六邊形"
984
975
  },
@@ -994,6 +985,9 @@ const locale = {
994
985
  "home_351838cd": {
995
986
  "message": "首頁"
996
987
  },
988
+ "how_to_request_and_edit_captions_a49a9c6b": {
989
+ "message": "如何申請和編輯標題?"
990
+ },
997
991
  "html_code_editor_fd967a44": {
998
992
  "message": "Html 代碼編輯器"
999
993
  },
@@ -1006,9 +1000,6 @@ const locale = {
1006
1000
  "i_hold_the_copyright_71ee91b1": {
1007
1001
  "message": "我持有該版權"
1008
1002
  },
1009
- "i_m_sorry_but_i_cannot_find_the_ai_s_answer_67569d19": {
1010
- "message": "抱歉,我找不到人工智慧的答案"
1011
- },
1012
1003
  "icon_215a1dc6": {
1013
1004
  "message": "圖示"
1014
1005
  },
@@ -1180,6 +1171,12 @@ const locale = {
1180
1171
  "large_text_e7ba08cd": {
1181
1172
  "message": "大文字"
1182
1173
  },
1174
+ "large_width_x_height_px_c61c2fd": {
1175
+ "message": "大尺寸({ width } x { height }像素)"
1176
+ },
1177
+ "learn_ad3b3505": {
1178
+ "message": "學習"
1179
+ },
1183
1180
  "learn_more_about_adjacent_links_2cb9762c": {
1184
1181
  "message": "了解更多有關相鄰連結"
1185
1182
  },
@@ -1321,6 +1318,9 @@ const locale = {
1321
1318
  "loading_preview_9f077aa1": {
1322
1319
  "message": "載入預覽"
1323
1320
  },
1321
+ "lock_speed_at_1x_57d4f815": {
1322
+ "message": "鎖定速度為 1 倍速"
1323
+ },
1324
1324
  "locked_762f138b": {
1325
1325
  "message": "已鎖定"
1326
1326
  },
@@ -1354,12 +1354,18 @@ const locale = {
1354
1354
  "media_file_is_processing_please_try_again_later_58a6d49": {
1355
1355
  "message": "正在處理媒體檔案中。請稍後重試。"
1356
1356
  },
1357
+ "media_options_saved_560c4ec8": {
1358
+ "message": "媒體選項已儲存。"
1359
+ },
1357
1360
  "media_title_2112243b": {
1358
1361
  "message": "媒體標題"
1359
1362
  },
1360
1363
  "medium_5a8e9ead": {
1361
1364
  "message": "中"
1362
1365
  },
1366
+ "medium_width_x_height_px_b076f6b6": {
1367
+ "message": "中尺寸({ width } x { height }像素)"
1368
+ },
1363
1369
  "merge_links_2478df96": {
1364
1370
  "message": "合併連結"
1365
1371
  },
@@ -1390,9 +1396,6 @@ const locale = {
1390
1396
  "miscellaneous_e9818229": {
1391
1397
  "message": "雜項"
1392
1398
  },
1393
- "modify_6b0b13e3": {
1394
- "message": "修改"
1395
- },
1396
1399
  "module_90d9fd32": {
1397
1400
  "message": "單元"
1398
1401
  },
@@ -1582,6 +1585,9 @@ const locale = {
1582
1585
  "operators_a2ef9a93": {
1583
1586
  "message": "操作員"
1584
1587
  },
1588
+ "options_3ab0ea65": {
1589
+ "message": "選項"
1590
+ },
1585
1591
  "or_9b70ccaa": {
1586
1592
  "message": "或者"
1587
1593
  },
@@ -1693,15 +1699,15 @@ const locale = {
1693
1699
  "play_media_comment_by_name_from_createdat_c230123d": {
1694
1700
  "message": "播放{ name }於{ createdAt }創建的媒體評論。"
1695
1701
  },
1702
+ "player_layout_14e09a29": {
1703
+ "message": "播放器佈局"
1704
+ },
1696
1705
  "please_allow_canvas_to_access_your_microphone_and__dc2c3079": {
1697
1706
  "message": "請允許 Canvas 存取您的麥克風和網路攝影機。"
1698
1707
  },
1699
1708
  "please_choose_a_file_c2449cc": {
1700
1709
  "message": "請選擇一個檔案"
1701
1710
  },
1702
- "please_decribe_what_you_would_like_to_compose_27a51be5": {
1703
- "message": "請描述您想創作什麼。"
1704
- },
1705
1711
  "please_enter_a_file_name_f159edc1": {
1706
1712
  "message": "請輸入一個檔案名稱"
1707
1713
  },
@@ -1864,18 +1870,12 @@ const locale = {
1864
1870
  "resize_ec83d538": {
1865
1871
  "message": "調校大小"
1866
1872
  },
1867
- "response_copied_to_clipboard_130d66cd": {
1868
- "message": "回應已複製到剪貼簿"
1869
- },
1870
1873
  "restore_auto_save_deccd84b": {
1871
1874
  "message": "還原自動儲存?"
1872
1875
  },
1873
1876
  "result_index_of_max_7db5ad8b": {
1874
1877
  "message": "{ max } 的結果 { index }。"
1875
1878
  },
1876
- "retry_ebd5f8ba": {
1877
- "message": "重試"
1878
- },
1879
1879
  "reverse_turnstile_does_not_yield_7558be06": {
1880
1880
  "message": "反向 T 形符號(不產生)"
1881
1881
  },
@@ -2026,23 +2026,17 @@ const locale = {
2026
2026
  "shortcut_911d6255": {
2027
2027
  "message": "快速鍵"
2028
2028
  },
2029
- "show_all_967a90f0": {
2030
- "message": "全部顯示"
2031
- },
2032
- "show_audio_options_b489926b": {
2033
- "message": "顯示音訊選項"
2034
- },
2035
2029
  "show_image_options_1e2ecc6b": {
2036
2030
  "message": "顯示影像選項"
2037
2031
  },
2038
2032
  "show_link_options_545338fd": {
2039
2033
  "message": "顯示連結選項"
2040
2034
  },
2041
- "show_studio_media_options_a0c748c6": {
2042
- "message": "顯示 Studio 媒體選項"
2035
+ "show_rolling_transcript_c1481744": {
2036
+ "message": "顯示滾動成績單"
2043
2037
  },
2044
- "show_video_options_6ed3721a": {
2045
- "message": "顯示影片選項"
2038
+ "show_rolling_transcript_d353aca4": {
2039
+ "message": "顯示滾動成績單"
2046
2040
  },
2047
2041
  "sighted_users_browse_web_pages_quickly_looking_for_1d4db0c1": {
2048
2042
  "message": "有視力的使用者能迅速瀏覽網頁,尋找大型或粗體標題。屏幕閱讀器使用者依靠標題理解內容背景。標題應使用適當的結構。"
@@ -2071,6 +2065,9 @@ const locale = {
2071
2065
  "small_b070434a": {
2072
2066
  "message": "小"
2073
2067
  },
2068
+ "small_width_x_height_px_359acd38": {
2069
+ "message": "小尺寸({ width } x { height }像素)"
2070
+ },
2074
2071
  "solid_circle_9f061dfc": {
2075
2072
  "message": "實心圓圈"
2076
2073
  },
@@ -2326,9 +2323,15 @@ const locale = {
2326
2323
  "though_your_video_will_have_the_correct_title_in_t_90e427f3": {
2327
2324
  "message": "雖然您的影片在瀏覽器中有正確的標題,但我們無法在資料庫中將其更新。"
2328
2325
  },
2326
+ "thumbnail_e0de666f": {
2327
+ "message": "縮略圖"
2328
+ },
2329
2329
  "timebar_a4d18443": {
2330
2330
  "message": "時間欄"
2331
2331
  },
2332
+ "title_can_t_be_blank_eb4021d7": {
2333
+ "message": "標題不能為空"
2334
+ },
2332
2335
  "title_ee03d132": {
2333
2336
  "message": "標題"
2334
2337
  },
@@ -2350,6 +2353,9 @@ const locale = {
2350
2353
  "top_66e0adb6": {
2351
2354
  "message": "頂部"
2352
2355
  },
2356
+ "transcript_panel_is_available_at_widths_above_720p_1cf94c0d": {
2357
+ "message": "成績單面板在寬度大於 720 像素時可用。"
2358
+ },
2353
2359
  "tray_839df38a": {
2354
2360
  "message": "收集箱"
2355
2361
  },
@@ -2383,6 +2389,9 @@ const locale = {
2383
2389
  "unpublished_dfd8801": {
2384
2390
  "message": "未發佈"
2385
2391
  },
2392
+ "unsaved_changes_will_be_lost_f977252a": {
2393
+ "message": "未儲存的變更都將遺失。"
2394
+ },
2386
2395
  "untitled_16aa4f2b": {
2387
2396
  "message": "無標題"
2388
2397
  },
@@ -2506,9 +2515,6 @@ const locale = {
2506
2515
  "used_by_screen_readers_to_describe_the_content_of__b1e76d9e": {
2507
2516
  "message": "由螢幕讀取器使用以描述影像的內容"
2508
2517
  },
2509
- "used_by_screen_readers_to_describe_the_video_37ebad25": {
2510
- "message": "由螢幕讀取器使用以描述影片"
2511
- },
2512
2518
  "user_documents_c206e61f": {
2513
2519
  "message": "使用者文件"
2514
2520
  },
@@ -2566,8 +2572,8 @@ const locale = {
2566
2572
  "view_word_and_character_counts_a743dd0c": {
2567
2573
  "message": "檢視文字和字元計數"
2568
2574
  },
2569
- "waiting_for_response_1efd0c50": {
2570
- "message": "等待回應"
2575
+ "viewer_restrictions_e14274c9": {
2576
+ "message": "檢視器限制"
2571
2577
  },
2572
2578
  "we_couldn_t_detect_a_working_microphone_connected__ceb71c40": {
2573
2579
  "message": "我們偵測不到與您的裝置連線的工作中麥克風。"
@@ -2587,9 +2593,6 @@ const locale = {
2587
2593
  "webpages_should_only_have_a_single_h1_which_is_aut_dc99189e": {
2588
2594
  "message": "網頁應該僅有一個 H1,由頁面的標題自動使用。您的內容中的第一個標題應該是 H2。"
2589
2595
  },
2590
- "what_would_you_like_to_do_6dc0d541": {
2591
- "message": "您想做什麼?"
2592
- },
2593
2596
  "when_markup_is_used_that_visually_formats_items_as_f941fc1b": {
2594
2597
  "message": "如果使用標記使項目看起來像清單,但並未標示其清單關係,使用者瀏覽資訊時或會有困難。"
2595
2598
  },
@@ -2620,9 +2623,6 @@ const locale = {
2620
2623
  "wreath_product_200b38ef": {
2621
2624
  "message": "花環產品"
2622
2625
  },
2623
- "writing_assistant_a30ac16a": {
2624
- "message": "寫作助理"
2625
- },
2626
2626
  "xi_149681d0": {
2627
2627
  "message": "ξ"
2628
2628
  },
package/eslint.config.js CHANGED
@@ -1,26 +1,20 @@
1
1
  const globals = require('globals')
2
- const pluginJs = require('@eslint/js')
3
- const tseslint = require('typescript-eslint')
4
- const pluginReact = require('eslint-plugin-react')
2
+ const tsParser = require('@typescript-eslint/parser')
5
3
  const jsxA11y = require('eslint-plugin-jsx-a11y')
6
- const pluginReactHooks = require('eslint-plugin-react-hooks')
7
- const pluginPromise = require('eslint-plugin-promise')
8
- const importPlugin = require('eslint-plugin-import')
9
4
  const notice = require('eslint-plugin-notice')
10
5
  const comments = require('@eslint-community/eslint-plugin-eslint-comments/configs')
11
6
  const pluginJest = require('eslint-plugin-jest')
12
7
 
13
8
  /** @type {import('eslint').Linter.Config[]} */
14
- module.exports = tseslint.config(
15
- // General
9
+ module.exports = [
16
10
  {
17
- files: ['src/**/*.ts'],
11
+ files: ['src/**/*.ts', 'src/**/*.tsx', 'src/**/*.js', 'src/**/*.jsx'],
18
12
  },
19
13
  {
20
14
  ignores: ['es/**/*', './src/translations/*/*', 'scripts', 'webpack.*.config.js'],
21
15
  },
22
16
 
23
- // Globals
17
+ // Globals (needed for ESLint to resolve references in remaining rules)
24
18
  {
25
19
  languageOptions: {
26
20
  ecmaVersion: 'latest',
@@ -38,104 +32,20 @@ module.exports = tseslint.config(
38
32
  },
39
33
  },
40
34
 
35
+ // TypeScript parser (needed to parse .ts/.tsx files)
41
36
  {
42
- rules: {
43
- 'no-console': 'warn',
44
- 'no-undef': 'warn',
45
- 'no-unused-private-class-members': 'warn',
46
- 'prefer-const': 'warn',
47
- 'prefer-rest-params': 'off',
48
- },
49
- },
50
-
51
- // TypeScript
52
- ...tseslint.configs.recommended,
53
- {
54
- rules: {
55
- '@typescript-eslint/ban-ts-comment': 'off',
56
- '@typescript-eslint/no-empty-object-type': 'warn',
57
- '@typescript-eslint/no-explicit-any': 'off',
58
- '@typescript-eslint/no-non-null-asserted-optional-chain': 'warn',
59
- '@typescript-eslint/no-require-imports': 'off',
60
- '@typescript-eslint/no-this-alias': 'off',
61
- '@typescript-eslint/no-unsafe-function-type': 'warn',
62
- '@typescript-eslint/no-unused-expressions': 'warn',
63
- '@typescript-eslint/no-unused-vars': [
64
- 'warn',
65
- {
66
- args: 'all',
67
- argsIgnorePattern: '^_',
68
- caughtErrors: 'all',
69
- caughtErrorsIgnorePattern: '^_',
70
- destructuredArrayIgnorePattern: '^_',
71
- varsIgnorePattern: '^_',
72
- ignoreRestSiblings: true,
73
- },
74
- ],
75
- '@typescript-eslint/no-wrapper-object-types': 'warn',
76
- 'no-undef': 'warn',
77
- },
37
+ files: ['**/*.{ts,tsx}'],
78
38
  languageOptions: {
79
- ecmaVersion: 'latest',
80
- sourceType: 'commonjs',
81
- globals: {
82
- ...globals.typescript,
83
- },
84
- },
85
- },
86
-
87
- // JavaScript
88
- pluginJs.configs.recommended,
89
- {
90
- rules: {
91
- 'no-constant-binary-expression': 'warn',
92
- 'no-dupe-class-members': 'warn',
93
- 'no-dupe-keys': 'warn',
94
- 'no-import-assign': 'warn',
95
- 'no-loss-of-precision': 'warn',
96
- 'no-prototype-builtins': 'off',
97
- 'no-redeclare': 'warn',
98
- 'no-unexpected-multiline': 'warn',
99
- 'no-unsafe-optional-chaining': 'warn',
100
- 'no-unused-expressions': 'off',
101
- 'no-unused-vars': 'off', // use @typescript-eslint/no-unused-vars instead
102
- 'no-useless-escape': 'warn',
103
- 'prefer-const': 'warn',
104
- 'prefer-rest-params': 'off',
105
- },
106
- },
107
-
108
- // React
109
- pluginReact.configs.flat.recommended,
110
- {
111
- plugins: {react: pluginReact},
112
- settings: {
113
- react: {
114
- version: 'detect',
115
- },
116
- },
117
- rules: {
118
- 'react/no-deprecated': 'warn',
119
- 'react/prop-types': 'warn',
120
- 'react/display-name': 'off',
121
- 'react/jsx-key': 'warn',
122
- 'react/no-string-refs': 'warn',
123
- 'react/no-find-dom-node': 'warn',
124
- 'react/no-unknown-property': 'warn',
125
- 'react/jsx-no-target-blank': 'warn',
39
+ parser: tsParser,
126
40
  },
127
41
  },
128
42
 
129
- // Copyright / Open Source Header
43
+ // Copyright / Open Source Header — not in oxlint
130
44
  {
131
45
  files: ['src/**/*.{js,mjs,ts,jsx,tsx}'],
132
46
  ignores: ['**/*.config.js', 'es/**/*', 'src/translations/**/*'],
133
- plugins: {
134
- notice,
135
- },
47
+ plugins: {notice},
136
48
  rules: {
137
- // Lenient so we don't automatically put our copyright notice on
138
- // top of something already copyrighted by someone else.
139
49
  'notice/notice': [
140
50
  'error',
141
51
  {
@@ -146,62 +56,24 @@ module.exports = tseslint.config(
146
56
  },
147
57
  },
148
58
 
149
- // Promises
150
- pluginPromise.configs['flat/recommended'],
151
- {
152
- rules: {
153
- 'promise/always-return': 'off',
154
- 'promise/catch-or-return': 'off',
155
- },
156
- },
157
-
158
- // Imports
159
- importPlugin.flatConfigs.recommended,
160
- {
161
- files: ['__tests__/**/*.{js,mjs,ts,jsx,tsx}', 'src/**/*.{js,mjs,ts,jsx,tsx}'],
162
- ignores: ['src/translations/**'],
163
- languageOptions: {
164
- ecmaVersion: 'latest',
165
- sourceType: 'commonjs',
166
- },
167
- rules: {
168
- 'import/no-dynamic-require': 'warn',
169
- 'import/no-nodejs-modules': 'warn',
170
- 'import/no-unresolved': 'off', // not working properly
171
- 'import/named': 'off',
172
- 'import/namespace': 'off',
173
- },
174
- },
175
-
176
- // React Hooks
177
- {
178
- plugins: {'react-hooks': pluginReactHooks},
179
- rules: {
180
- 'react-hooks/rules-of-hooks': 'warn',
181
- 'react-hooks/exhaustive-deps': 'warn',
182
- },
183
- },
184
-
185
- // JSX A11y
186
- jsxA11y.flatConfigs.recommended,
59
+ // JSX A11y — only the rule pending in oxlint
187
60
  {
61
+ plugins: {'jsx-a11y': jsxA11y},
188
62
  rules: {
189
63
  'jsx-a11y/no-interactive-element-to-noninteractive-role': 'warn',
190
- '@eslint-community/eslint-comments/no-duplicate-disable': 'warn',
191
- 'jsx-a11y/role-has-required-aria-props': 'warn',
192
- 'jsx-a11y/no-autofocus': 'warn',
193
64
  },
194
65
  },
195
66
 
196
- // Extra ESLint Comment rules
67
+ // ESLint Comments — not in oxlint
197
68
  comments.recommended,
198
69
  {
199
70
  rules: {
200
71
  '@eslint-community/eslint-comments/disable-enable-pair': ['error', {allowWholeFile: true}],
72
+ '@eslint-community/eslint-comments/no-duplicate-disable': 'warn',
201
73
  },
202
74
  },
203
75
 
204
- // Jest
76
+ // Jest — only rules not in oxlint
205
77
  {
206
78
  files: [
207
79
  '__tests__/**/*.{js,mjs,ts,jsx,tsx}',
@@ -217,12 +89,9 @@ module.exports = tseslint.config(
217
89
  },
218
90
  },
219
91
  rules: {
220
- 'jest/no-disabled-tests': 'warn',
221
- 'jest/no-focused-tests': 'error',
92
+ // jest/no-disabled-tests, jest/no-focused-tests, jest/valid-expect → oxlint
222
93
  'jest/no-identical-title': 'warn',
223
94
  'jest/prefer-to-have-length': 'warn',
224
- 'jest/valid-expect': 'error',
225
- 'react/no-deprecated': 'warn',
226
95
  },
227
96
  },
228
- )
97
+ ]
@@ -84,6 +84,7 @@ const ignoredErrors = [
84
84
  /Warning: %s uses the legacy childContextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext\(\) instead/,
85
85
  /Warning: %s uses the legacy contextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext\(\) with static contextType instead./,
86
86
  /Warning: Unknown event handler property `%s`. It will be ignored.%s/,
87
+ /`ref` is not a prop\. Trying to access it will result in `undefined` being returned/,
87
88
  ]
88
89
  const globalWarn = global.console.warn
89
90
  const ignoredWarnings = [
package/jest.config.js CHANGED
@@ -55,6 +55,8 @@ module.exports = {
55
55
  'crypto-es': '<rootDir>/src/rce/__mocks__/_mockCryptoEs.ts',
56
56
  '@instructure/studio-player':
57
57
  '<rootDir>/__mocks__/@instructure/studio-player/_mockStudioPlayer.js',
58
+ '@instructure/ui-media-player':
59
+ '<rootDir>/__mocks__/@instructure/ui-media-player/_mockUiMediaPlayer.js',
58
60
  },
59
61
 
60
62
  transform: {