@instructure/canvas-rce 7.3.1 → 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.
- package/CHANGELOG.md +65 -0
- package/{es/rce/plugins/shared/ai_tools/index.js → __mocks__/@instructure/ui-media-player/_mockUiMediaPlayer.js} +4 -4
- package/__tests__/common/mimeClass.test.js +25 -1
- package/__tests__/rcs/api.test.js +280 -251
- package/es/canvasFileBrowser/FileBrowser.d.ts +2 -2
- package/es/canvasFileBrowser/FileBrowser.js +8 -7
- package/es/common/mimeClass.js +3 -1
- package/es/defaultTinymceConfig.js +47 -49
- package/es/enhance-user-content/enhance_user_content.js +6 -8
- package/es/enhance-user-content/index.d.ts +3 -1
- package/es/enhance-user-content/index.js +3 -1
- package/es/enhance-user-content/youtube_overlay.js +18 -0
- package/es/getThemeVars.d.ts +1 -1
- package/es/getThemeVars.js +23 -26
- package/es/rce/KeyboardShortcutModal.js +1 -1
- package/es/rce/RCE.d.ts +9 -0
- package/es/rce/RCE.js +4 -0
- package/es/rce/RCEGlobals.d.ts +2 -0
- package/es/rce/RCEGlobals.js +1 -0
- package/es/rce/RCEVariants.d.ts +1 -2
- package/es/rce/RCEVariants.js +1 -2
- package/es/rce/RCEWrapper.d.ts +6 -16
- package/es/rce/RCEWrapper.js +18 -87
- package/es/rce/RCEWrapper.utils.d.ts +1 -1
- package/es/rce/RCEWrapperProps.d.ts +2 -1
- package/es/rce/RCEWrapperProps.js +2 -1
- package/es/rce/StatusBar.d.ts +0 -1
- package/es/rce/StatusBar.js +3 -28
- package/es/rce/plugins/instructure_equation/EquationEditorModal/advancedOnlySyntax.d.ts +2 -1
- package/es/rce/plugins/instructure_equation/EquationEditorModal/advancedOnlySyntax.js +3 -1
- package/es/rce/plugins/instructure_equation/EquationEditorModal/index.d.ts +1 -0
- package/es/rce/plugins/instructure_equation/EquationEditorModal/index.js +12 -2
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/ImageOptions.js +2 -2
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/ImageSection.js +3 -3
- package/es/rce/plugins/instructure_icon_maker/svg/constants.d.ts +20 -5
- package/es/rce/plugins/instructure_icon_maker/svg/utils.d.ts +1 -1
- package/es/rce/plugins/instructure_icon_maker/utils/IconMakerFormHasChanges.js +2 -2
- package/es/rce/plugins/instructure_image/ImageEmbedOptions.d.ts +0 -2
- package/es/rce/plugins/instructure_image/ImageEmbedOptions.js +2 -9
- package/es/rce/plugins/instructure_paste/plugin.js +18 -12
- package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolDialog/ExternalToolDialogModal.d.ts +1 -1
- package/es/rce/plugins/instructure_rce_external_tools/components/util/ToolLaunchIframe.d.ts +4 -0
- package/es/rce/plugins/instructure_rce_external_tools/components/util/ToolLaunchIframe.js +4 -0
- package/es/rce/plugins/instructure_record/AudioOptionsTray/TrayController.d.ts +11 -2
- package/es/rce/plugins/instructure_record/AudioOptionsTray/TrayController.js +92 -10
- package/es/rce/plugins/instructure_record/AudioOptionsTray/index.d.ts +13 -1
- package/es/rce/plugins/instructure_record/AudioOptionsTray/index.js +216 -24
- package/es/rce/plugins/instructure_record/MediaPanel/index.js +16 -5
- package/es/rce/plugins/instructure_record/VideoOptionsTray/TrayController.d.ts +14 -13
- package/es/rce/plugins/instructure_record/VideoOptionsTray/TrayController.js +110 -39
- package/es/rce/plugins/instructure_record/VideoOptionsTray/index.d.ts +11 -1
- package/es/rce/plugins/instructure_record/VideoOptionsTray/index.js +242 -67
- package/es/rce/plugins/instructure_record/clickCallback.js +19 -4
- package/es/rce/plugins/instructure_record/mediaTranslations.js +1 -1
- package/es/rce/plugins/instructure_record/playerLayoutOptions.d.ts +25 -0
- package/es/rce/plugins/instructure_record/playerLayoutOptions.js +91 -0
- package/es/rce/plugins/instructure_record/plugin.js +2 -5
- package/es/rce/plugins/instructure_record/utils.d.ts +3 -0
- package/es/rce/plugins/instructure_record/utils.js +31 -0
- package/es/rce/plugins/instructure_studio_media_options/plugin.js +82 -26
- package/es/rce/plugins/shared/ContentSelection.d.ts +6 -1
- package/es/rce/plugins/shared/ContentSelection.js +15 -6
- package/es/rce/plugins/shared/DimensionsInput/DimensionInput.js +1 -2
- package/es/rce/plugins/shared/DimensionsInput/index.js +11 -12
- package/es/rce/plugins/shared/DimensionsInput/useDimensionsState.d.ts +1 -1
- package/es/rce/plugins/shared/DimensionsInput/useDimensionsState.js +4 -3
- package/es/rce/plugins/shared/StudioLtiSupportUtils.d.ts +27 -6
- package/es/rce/plugins/shared/StudioLtiSupportUtils.js +82 -13
- package/es/rce/plugins/shared/Upload/UploadFile.js +1 -8
- package/es/rce/style.d.ts +2 -1
- package/es/rce/style.js +4 -2
- package/es/rcs/api.d.ts +5 -10
- package/es/rcs/api.js +15 -21
- package/es/rcs/fake.d.ts +1 -7
- package/es/rcs/fake.js +1 -47
- package/es/sidebar/actions/media.d.ts +19 -6
- package/es/sidebar/actions/media.js +17 -4
- package/es/sidebar/actions/upload.d.ts +3 -3
- package/es/sidebar/actions/upload.js +9 -9
- package/es/sidebar/containers/Sidebar.js +0 -2
- package/es/sidebar/containers/sidebarHandlers.d.ts +2 -4
- package/es/sidebar/containers/sidebarHandlers.js +2 -5
- package/es/sidebar/reducers/index.d.ts +0 -1
- package/es/sidebar/reducers/index.js +0 -2
- package/es/sidebar/store/initialState.d.ts +0 -1
- package/es/sidebar/store/initialState.js +0 -5
- package/es/translations/locales/ar.js +65 -80
- package/es/translations/locales/ca.js +65 -80
- package/es/translations/locales/cy.js +65 -80
- package/es/translations/locales/da-x-k12.js +65 -80
- package/es/translations/locales/da.js +65 -80
- package/es/translations/locales/de.js +65 -80
- package/es/translations/locales/el.js +0 -9
- package/es/translations/locales/en-AU-x-unimelb.js +65 -80
- package/es/translations/locales/en-GB-x-ukhe.js +65 -80
- package/es/translations/locales/en.js +61 -79
- package/es/translations/locales/en_AU.js +65 -80
- package/es/translations/locales/en_CA.js +65 -80
- package/es/translations/locales/en_CY.js +65 -80
- package/es/translations/locales/en_GB.js +65 -80
- package/es/translations/locales/es.js +65 -80
- package/es/translations/locales/es_ES.js +65 -80
- package/es/translations/locales/fa_IR.js +0 -9
- package/es/translations/locales/fi.js +65 -80
- package/es/translations/locales/fr.js +65 -80
- package/es/translations/locales/fr_CA.js +65 -80
- package/es/translations/locales/ga.js +65 -80
- package/es/translations/locales/he.js +0 -9
- package/es/translations/locales/hi.js +65 -80
- package/es/translations/locales/ht.js +65 -80
- package/es/translations/locales/hu.js +0 -36
- package/es/translations/locales/hy.js +0 -9
- package/es/translations/locales/id.js +65 -80
- package/es/translations/locales/is.js +65 -80
- package/es/translations/locales/it.js +65 -80
- package/es/translations/locales/ja.js +65 -80
- package/es/translations/locales/ko.js +2455 -133
- package/es/translations/locales/mi.js +65 -80
- package/es/translations/locales/ms.js +65 -80
- package/es/translations/locales/nb-x-k12.js +65 -80
- package/es/translations/locales/nb.js +65 -80
- package/es/translations/locales/nl.js +66 -81
- package/es/translations/locales/nn.js +0 -36
- package/es/translations/locales/pl.js +65 -80
- package/es/translations/locales/pt.js +65 -80
- package/es/translations/locales/pt_BR.js +65 -80
- package/es/translations/locales/ru.js +65 -80
- package/es/translations/locales/sl.js +65 -80
- package/es/translations/locales/sv-x-k12.js +65 -80
- package/es/translations/locales/sv.js +65 -80
- package/es/translations/locales/th.js +65 -80
- package/es/translations/locales/tr.js +1962 -18
- package/es/translations/locales/uk_UA.js +0 -9
- package/es/translations/locales/vi.js +65 -80
- package/es/translations/locales/zh-Hans.js +65 -80
- package/es/translations/locales/zh-Hant.js +65 -80
- package/es/translations/locales/zh.js +65 -80
- package/es/translations/locales/zh_HK.js +65 -80
- package/eslint.config.js +16 -147
- package/jest/jest-setup.js +1 -0
- package/jest.config.js +2 -0
- package/oxlint.json +84 -0
- package/package.json +86 -62
- package/tsconfig.json +3 -2
- package/es/rce/plugins/shared/ai_tools/AIResponseModal.d.ts +0 -10
- package/es/rce/plugins/shared/ai_tools/AIResponseModal.js +0 -67
- package/es/rce/plugins/shared/ai_tools/AIToolsTray.d.ts +0 -18
- package/es/rce/plugins/shared/ai_tools/AIToolsTray.js +0 -489
- package/es/rce/plugins/shared/ai_tools/aiicons.d.ts +0 -7
- package/es/rce/plugins/shared/ai_tools/aiicons.js +0 -60
- package/es/rce/plugins/shared/ai_tools/index.d.ts +0 -3
- package/es/sidebar/actions/flickr.d.ts +0 -20
- package/es/sidebar/actions/flickr.js +0 -60
- package/es/sidebar/reducers/flickr.d.ts +0 -1
- package/es/sidebar/reducers/flickr.js +0 -49
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,71 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## 8.0.0 - 2026-05-06
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- New Caption Manager for Media Tray with auto-captioning (ASR) support
|
|
12
|
+
- ClosedCaptionPanelV2 wired into AudioOptionsTray
|
|
13
|
+
- Player layout dropdown for video tray
|
|
14
|
+
- Size selector for audio tray
|
|
15
|
+
- Show rolling transcript option for Studio media
|
|
16
|
+
- Studio embed options in options tray
|
|
17
|
+
- Selected option highlighting for Studio toolbar options
|
|
18
|
+
- Viewer restrictions for Canvas media
|
|
19
|
+
- Title required validation in VideoOptionsTray with inline validation
|
|
20
|
+
- Unsaved changes tooltip for audio/video trays
|
|
21
|
+
- Reload mechanism for media after tray caption modifications
|
|
22
|
+
- Pendo analytics for Canvas media
|
|
23
|
+
- Community link in video and audio options trays
|
|
24
|
+
- Subpath export for `@instructure/canvas-rce/enhance-user-content`
|
|
25
|
+
(exposes `Mathml` and `makeAllExternalLinksExternalLinks`)
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
- **Breaking:** Upgraded InstUI from v10 to v11
|
|
29
|
+
- Replaced barrel export with named exports for `enhance-user-content`
|
|
30
|
+
- Upgraded TypeScript from 5.7.2 to 6.0.2
|
|
31
|
+
- Replaced ESLint with oxlint
|
|
32
|
+
- Removed lodash dependency (migrated to es-toolkit)
|
|
33
|
+
- Cleaned up and refactored jQueryUI in enhanced-user-content
|
|
34
|
+
- Removed unused Flickr code
|
|
35
|
+
- Removed AI Text Tools feature flag and related code
|
|
36
|
+
- Removed `consolidated_media_player` feature flag
|
|
37
|
+
- Aligned label naming to "Viewer restrictions" in Media Options Tray
|
|
38
|
+
- Enhanced error states for manual caption uploads
|
|
39
|
+
- Deduped file types in file upload
|
|
40
|
+
- Disabled browser translation for TinyMCE in Edge browser
|
|
41
|
+
|
|
42
|
+
### Fixed
|
|
43
|
+
- Multiple a11y issues: caption creator labels and accessibility, save
|
|
44
|
+
confirmation announcement, visible labels for custom dimension inputs,
|
|
45
|
+
heading hierarchy in options tray, Player layout helper text via
|
|
46
|
+
aria-describedby, tray overlay issue, descriptive label for
|
|
47
|
+
KBDShortcuts modal close button, 720px helper text linked to transcript
|
|
48
|
+
checkbox, WCAG 2.5.3 violations on RCE option buttons
|
|
49
|
+
- Studio tray controller, Studio video tray opening, infinite tray loading
|
|
50
|
+
on Studio embeds, multiple Studio embed discovery
|
|
51
|
+
- Hide new embed options in TinyMCE toolbar for old embeds
|
|
52
|
+
- Sync media tray loading state with player
|
|
53
|
+
- Tooltip mount node for MediaTrays
|
|
54
|
+
- Word count for text files with MIME parameters
|
|
55
|
+
- Microphone permissions in LTI tray/sidebar placements
|
|
56
|
+
- Missing save alert
|
|
57
|
+
|
|
58
|
+
### Security
|
|
59
|
+
- Sanitized MathML and prevented XSS in the math equation editor
|
|
60
|
+
- Removed `*` from allowed attributes on `<object>`/`<embed>` tags
|
|
61
|
+
- Upgraded axios to 1.13.5 (CSRF/security vulnerability)
|
|
62
|
+
- Upgraded minimatch (ReDoS vulnerability)
|
|
63
|
+
- Upgraded js-beautify
|
|
64
|
+
|
|
65
|
+
### Reverted
|
|
66
|
+
- "Fix doc preview height to use min-height"
|
|
67
|
+
- "Fix RCE toolbar vs Tray overlay issue"
|
|
68
|
+
- "Upgrade MediaCapture package to latest version"
|
|
69
|
+
|
|
70
|
+
### Localization
|
|
71
|
+
- Updated RCE translations
|
|
72
|
+
|
|
8
73
|
## 7.3.1 - 2025-11-11
|
|
9
74
|
|
|
10
75
|
### Fixed
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C)
|
|
2
|
+
* Copyright (C) 2025 - present Instructure, Inc.
|
|
3
3
|
*
|
|
4
4
|
* This file is part of Canvas.
|
|
5
5
|
*
|
|
@@ -16,6 +16,6 @@
|
|
|
16
16
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
module.exports = {
|
|
20
|
+
MediaPlayer: () => null,
|
|
21
|
+
}
|
|
@@ -33,7 +33,7 @@ describe('fileEmbed', () => {
|
|
|
33
33
|
const video = fileEmbed(getBaseFile({'content-type': 'video/mp4'}))
|
|
34
34
|
const audio = fileEmbed(getBaseFile({'content-type': 'audio/mpeg'}))
|
|
35
35
|
const notaudio = fileEmbed(
|
|
36
|
-
getBaseFile({'content-type': 'x-audio/mpeg', preview_url: undefined})
|
|
36
|
+
getBaseFile({'content-type': 'x-audio/mpeg', preview_url: undefined}),
|
|
37
37
|
)
|
|
38
38
|
const notvideo = fileEmbed(getBaseFile({'content-type': 'x-video/mp4', preview_url: undefined}))
|
|
39
39
|
|
|
@@ -82,4 +82,28 @@ describe('mimeClass', () => {
|
|
|
82
82
|
expect(mimeClass({type: 'image/webp'})).toEqual('image')
|
|
83
83
|
expect(mimeClass({type: 'application/vnd.ms-powerpoint'})).toEqual('ppt')
|
|
84
84
|
})
|
|
85
|
+
|
|
86
|
+
it('strips charset parameter from content-type', () => {
|
|
87
|
+
expect(mimeClass({'content-type': 'text/plain; charset=UTF-8'})).toEqual('text')
|
|
88
|
+
expect(mimeClass({'content-type': 'text/html; charset=iso-8859-1'})).toEqual('html')
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
it('strips multiple parameters from content-type', () => {
|
|
92
|
+
expect(mimeClass({'content-type': 'text/plain; charset=UTF-8; boundary=something'})).toEqual(
|
|
93
|
+
'text',
|
|
94
|
+
)
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
it('handles content-type with parameter but no space after semicolon', () => {
|
|
98
|
+
expect(mimeClass({'content-type': 'text/plain;charset=UTF-8'})).toEqual('text')
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
it('handles content-type with spaces around semicolon', () => {
|
|
102
|
+
expect(mimeClass({'content-type': 'text/plain ; charset=UTF-8'})).toEqual('text')
|
|
103
|
+
})
|
|
104
|
+
|
|
105
|
+
it('still works for content-types without parameters', () => {
|
|
106
|
+
expect(mimeClass({'content-type': 'text/plain'})).toEqual('text')
|
|
107
|
+
expect(mimeClass({'content-type': 'application/pdf'})).toEqual('pdf')
|
|
108
|
+
})
|
|
85
109
|
})
|