@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.
- package/CHANGELOG.md +79 -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/doc_previews.js +5 -0
- 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/instructure_helper.js +1 -0
- 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/AlertMessageArea.d.ts +2 -2
- package/es/rce/AlertMessageArea.js +3 -3
- package/es/rce/KeyboardShortcutModal.js +2 -2
- 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 +16 -26
- package/es/rce/RCEWrapper.js +227 -271
- 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/ExternalToolSelectionDialog/ExternalToolSelectionDialog.d.ts +1 -1
- package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolSelectionDialog/ExternalToolSelectionDialog.js +25 -25
- 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 -24
- package/es/rce/plugins/instructure_wordcount/components/WordCountModal.js +1 -0
- 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 -5
- package/es/rce/plugins/shared/StudioLtiSupportUtils.js +94 -9
- 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 +77 -77
- package/es/translations/locales/ca.js +77 -77
- package/es/translations/locales/cy.js +77 -77
- package/es/translations/locales/da-x-k12.js +77 -77
- package/es/translations/locales/da.js +77 -77
- package/es/translations/locales/de.js +77 -77
- package/es/translations/locales/el.js +0 -9
- package/es/translations/locales/en-AU-x-unimelb.js +77 -77
- package/es/translations/locales/en-GB-x-ukhe.js +77 -77
- package/es/translations/locales/en.js +67 -79
- package/es/translations/locales/en_AU.js +77 -77
- package/es/translations/locales/en_CA.js +77 -77
- package/es/translations/locales/en_CY.js +77 -77
- package/es/translations/locales/en_GB.js +77 -77
- package/es/translations/locales/es.js +77 -77
- package/es/translations/locales/es_ES.js +77 -77
- package/es/translations/locales/fa_IR.js +0 -9
- package/es/translations/locales/fi.js +77 -77
- package/es/translations/locales/fr.js +77 -77
- package/es/translations/locales/fr_CA.js +77 -77
- package/es/translations/locales/ga.js +77 -77
- package/es/translations/locales/he.js +0 -9
- package/es/translations/locales/hi.js +77 -77
- package/es/translations/locales/ht.js +77 -77
- package/es/translations/locales/hu.js +0 -36
- package/es/translations/locales/hy.js +0 -9
- package/es/translations/locales/id.js +77 -77
- package/es/translations/locales/is.js +77 -77
- package/es/translations/locales/it.js +77 -77
- package/es/translations/locales/ja.js +77 -77
- package/es/translations/locales/ko.js +2455 -133
- package/es/translations/locales/mi.js +77 -77
- package/es/translations/locales/ms.js +77 -77
- package/es/translations/locales/nb-x-k12.js +77 -77
- package/es/translations/locales/nb.js +77 -77
- package/es/translations/locales/nl.js +78 -78
- package/es/translations/locales/nn.js +0 -36
- package/es/translations/locales/pl.js +77 -77
- package/es/translations/locales/pt.js +77 -77
- package/es/translations/locales/pt_BR.js +77 -77
- package/es/translations/locales/ru.js +77 -77
- package/es/translations/locales/sl.js +77 -77
- package/es/translations/locales/sv-x-k12.js +77 -77
- package/es/translations/locales/sv.js +77 -77
- package/es/translations/locales/th.js +77 -77
- package/es/translations/locales/tr.js +1962 -18
- package/es/translations/locales/uk_UA.js +0 -9
- package/es/translations/locales/vi.js +77 -77
- package/es/translations/locales/zh-Hans.js +77 -77
- package/es/translations/locales/zh-Hant.js +77 -77
- package/es/translations/locales/zh.js +77 -77
- package/es/translations/locales/zh_HK.js +77 -77
- 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/oxlint.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json",
|
|
3
|
+
"plugins": ["react", "jsx_a11y", "import", "promise", "typescript"],
|
|
4
|
+
"jsPlugins": ["../../config/canvas-copyright.js"],
|
|
5
|
+
"env": {
|
|
6
|
+
"browser": true,
|
|
7
|
+
"node": true
|
|
8
|
+
},
|
|
9
|
+
"ignorePatterns": [
|
|
10
|
+
"es/**/*",
|
|
11
|
+
"**/translations/**/*",
|
|
12
|
+
"**/node_modules/**"
|
|
13
|
+
],
|
|
14
|
+
"rules": {
|
|
15
|
+
"no-console": "warn",
|
|
16
|
+
"no-undef": "warn",
|
|
17
|
+
"no-constant-binary-expression": "warn",
|
|
18
|
+
"no-dupe-class-members": "warn",
|
|
19
|
+
"no-dupe-keys": "warn",
|
|
20
|
+
"no-import-assign": "warn",
|
|
21
|
+
"no-loss-of-precision": "warn",
|
|
22
|
+
"no-prototype-builtins": "off",
|
|
23
|
+
"no-unexpected-multiline": "warn",
|
|
24
|
+
"no-unsafe-optional-chaining": "warn",
|
|
25
|
+
"no-unused-expressions": "off",
|
|
26
|
+
"no-unused-vars": "off",
|
|
27
|
+
"no-unused-private-class-members": "warn",
|
|
28
|
+
"no-useless-escape": "warn",
|
|
29
|
+
"prefer-const": "warn",
|
|
30
|
+
"no-redeclare": "warn",
|
|
31
|
+
"typescript/ban-ts-comment": "off",
|
|
32
|
+
"typescript/no-unused-vars": ["warn", {
|
|
33
|
+
"args": "all",
|
|
34
|
+
"argsIgnorePattern": "^_",
|
|
35
|
+
"caughtErrors": "all",
|
|
36
|
+
"caughtErrorsIgnorePattern": "^_",
|
|
37
|
+
"destructuredArrayIgnorePattern": "^_",
|
|
38
|
+
"varsIgnorePattern": "^_",
|
|
39
|
+
"ignoreRestSiblings": true
|
|
40
|
+
}],
|
|
41
|
+
"typescript/no-this-alias": "off",
|
|
42
|
+
"typescript/no-explicit-any": "off",
|
|
43
|
+
"typescript/no-unused-expressions": "warn",
|
|
44
|
+
"typescript/no-empty-object-type": "warn",
|
|
45
|
+
"typescript/no-unsafe-function-type": "warn",
|
|
46
|
+
"typescript/no-require-imports": "off",
|
|
47
|
+
"typescript/no-wrapper-object-types": "warn",
|
|
48
|
+
"typescript/no-non-null-asserted-optional-chain": "warn",
|
|
49
|
+
"react/jsx-key": "warn",
|
|
50
|
+
"react/no-string-refs": "warn",
|
|
51
|
+
"react/no-find-dom-node": "warn",
|
|
52
|
+
"react/jsx-no-target-blank": "warn",
|
|
53
|
+
"react/no-unknown-property": "warn",
|
|
54
|
+
"react/rules-of-hooks": "warn",
|
|
55
|
+
"react/exhaustive-deps": "warn",
|
|
56
|
+
"jsx_a11y/role-has-required-aria-props": "warn",
|
|
57
|
+
"jsx_a11y/no-autofocus": "warn",
|
|
58
|
+
"import/no-dynamic-require": "warn",
|
|
59
|
+
"import/no-nodejs-modules": "warn",
|
|
60
|
+
"promise/always-return": "off",
|
|
61
|
+
"promise/catch-or-return": "off"
|
|
62
|
+
},
|
|
63
|
+
"overrides": [
|
|
64
|
+
{
|
|
65
|
+
"files": ["src/**/*.{js,mjs,ts,jsx,tsx}"],
|
|
66
|
+
"rules": {
|
|
67
|
+
"canvas-copyright/notice": "error"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"files": [
|
|
72
|
+
"**/__tests__/**",
|
|
73
|
+
"src/**/__tests__/**",
|
|
74
|
+
"src/rce/plugins/tinymce-a11y-checker/rules/__mocks__/index.js"
|
|
75
|
+
],
|
|
76
|
+
"plugins": ["jest"],
|
|
77
|
+
"rules": {
|
|
78
|
+
"jest/no-disabled-tests": "warn",
|
|
79
|
+
"jest/no-focused-tests": "error",
|
|
80
|
+
"jest/valid-expect": "error"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/canvas-rce",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "A component wrapping Canvas's usage of Tinymce",
|
|
5
5
|
"main": "es/index.js",
|
|
6
6
|
"types": "es/index.d.ts",
|
|
7
|
+
"typesVersions": {
|
|
8
|
+
"*": {
|
|
9
|
+
"enhance-user-content": [
|
|
10
|
+
"./es/enhance-user-content/index.d.ts"
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./es/index.d.ts",
|
|
17
|
+
"default": "./es/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./enhance-user-content": {
|
|
20
|
+
"types": "./es/enhance-user-content/index.d.ts",
|
|
21
|
+
"default": "./es/enhance-user-content/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./*": "./*"
|
|
24
|
+
},
|
|
7
25
|
"owner": "RCX",
|
|
8
26
|
"scripts": {
|
|
9
27
|
"i18n:extract": "format-message extract \"es/**/*.js\" -g underscored_crc32 -o locales/en.json",
|
|
@@ -45,75 +63,82 @@
|
|
|
45
63
|
],
|
|
46
64
|
"author": "Instructure, Inc",
|
|
47
65
|
"license": "AGPL-3.0",
|
|
48
|
-
"browserslist": [
|
|
66
|
+
"browserslist": [
|
|
67
|
+
"extends @instructure/browserslist-config-canvas-lms"
|
|
68
|
+
],
|
|
49
69
|
"nyc": {
|
|
50
|
-
"include": [
|
|
70
|
+
"include": [
|
|
71
|
+
"shared/**/*.js",
|
|
72
|
+
"src/**/*.js"
|
|
73
|
+
],
|
|
51
74
|
"exclude": [],
|
|
52
|
-
"require": [
|
|
75
|
+
"require": [
|
|
76
|
+
"@babel/register",
|
|
77
|
+
"@instructure/canvas-theme"
|
|
78
|
+
],
|
|
53
79
|
"sourceMap": false,
|
|
54
80
|
"instrument": false
|
|
55
81
|
},
|
|
56
82
|
"dependencies": {
|
|
57
|
-
"@instructure/canvas-theme": "
|
|
83
|
+
"@instructure/canvas-theme": "11.6.0",
|
|
58
84
|
"@instructure/canvas-media": "*",
|
|
59
|
-
"@instructure/debounce": "
|
|
60
|
-
"@instructure/emotion": "
|
|
85
|
+
"@instructure/debounce": "11.6.0",
|
|
86
|
+
"@instructure/emotion": "11.6.0",
|
|
61
87
|
"@instructure/k5uploader": "*",
|
|
62
|
-
"@instructure/media-capture": "
|
|
63
|
-
"@instructure/
|
|
64
|
-
"@instructure/ui-a11y-
|
|
65
|
-
"@instructure/ui-
|
|
66
|
-
"@instructure/ui-
|
|
67
|
-
"@instructure/ui-
|
|
68
|
-
"@instructure/ui-
|
|
69
|
-
"@instructure/ui-
|
|
70
|
-
"@instructure/ui-
|
|
71
|
-
"@instructure/ui-
|
|
72
|
-
"@instructure/ui-
|
|
73
|
-
"@instructure/ui-color-
|
|
74
|
-
"@instructure/ui-
|
|
75
|
-
"@instructure/ui-
|
|
76
|
-
"@instructure/ui-
|
|
77
|
-
"@instructure/ui-
|
|
78
|
-
"@instructure/ui-
|
|
79
|
-
"@instructure/ui-
|
|
80
|
-
"@instructure/ui-
|
|
81
|
-
"@instructure/ui-
|
|
82
|
-
"@instructure/ui-
|
|
83
|
-
"@instructure/ui-
|
|
84
|
-
"@instructure/ui-
|
|
85
|
-
"@instructure/ui-
|
|
86
|
-
"@instructure/ui-
|
|
87
|
-
"@instructure/ui-
|
|
88
|
-
"@instructure/ui-
|
|
89
|
-
"@instructure/ui-
|
|
90
|
-
"@instructure/ui-
|
|
91
|
-
"@instructure/ui-
|
|
92
|
-
"@instructure/ui-
|
|
93
|
-
"@instructure/ui-
|
|
94
|
-
"@instructure/ui-
|
|
95
|
-
"@instructure/ui-
|
|
96
|
-
"@instructure/ui-
|
|
97
|
-
"@instructure/ui-
|
|
98
|
-
"@instructure/ui-
|
|
99
|
-
"@instructure/ui-
|
|
100
|
-
"@instructure/ui-text-
|
|
101
|
-
"@instructure/ui-text
|
|
102
|
-
"@instructure/ui-
|
|
103
|
-
"@instructure/ui-
|
|
104
|
-
"@instructure/ui-
|
|
105
|
-
"@instructure/ui-
|
|
106
|
-
"@instructure/ui-
|
|
107
|
-
"@instructure/ui-
|
|
108
|
-
"@instructure/ui-
|
|
109
|
-
"@instructure/ui-
|
|
110
|
-
"@instructure/
|
|
111
|
-
"@instructure/uid": "10.26.2",
|
|
88
|
+
"@instructure/media-capture": "12.0.0",
|
|
89
|
+
"@instructure/ui-a11y-content": "11.6.0",
|
|
90
|
+
"@instructure/ui-a11y-utils": "11.6.0",
|
|
91
|
+
"@instructure/ui-alerts": "11.6.0",
|
|
92
|
+
"@instructure/ui-avatar": "11.6.0",
|
|
93
|
+
"@instructure/ui-badge": "11.6.0",
|
|
94
|
+
"@instructure/ui-billboard": "11.6.0",
|
|
95
|
+
"@instructure/ui-buttons": "11.6.0",
|
|
96
|
+
"@instructure/ui-checkbox": "11.6.0",
|
|
97
|
+
"@instructure/ui-source-code-editor": "11.6.0",
|
|
98
|
+
"@instructure/ui-color-picker": "11.6.0",
|
|
99
|
+
"@instructure/ui-color-utils": "11.6.0",
|
|
100
|
+
"@instructure/ui-file-drop": "11.6.0",
|
|
101
|
+
"@instructure/ui-flex": "11.6.0",
|
|
102
|
+
"@instructure/ui-focusable": "11.6.0",
|
|
103
|
+
"@instructure/ui-form-field": "11.6.0",
|
|
104
|
+
"@instructure/ui-grid": "11.6.0",
|
|
105
|
+
"@instructure/ui-heading": "11.6.0",
|
|
106
|
+
"@instructure/ui-icons": "11.6.0",
|
|
107
|
+
"@instructure/ui-img": "11.6.0",
|
|
108
|
+
"@instructure/ui-link": "11.6.0",
|
|
109
|
+
"@instructure/ui-list": "11.6.0",
|
|
110
|
+
"@instructure/ui-media-player": "12.0.0",
|
|
111
|
+
"@instructure/ui-menu": "11.6.0",
|
|
112
|
+
"@instructure/ui-modal": "11.6.0",
|
|
113
|
+
"@instructure/ui-motion": "11.6.0",
|
|
114
|
+
"@instructure/ui-number-input": "11.6.0",
|
|
115
|
+
"@instructure/ui-overlays": "11.6.0",
|
|
116
|
+
"@instructure/ui-pagination": "11.6.0",
|
|
117
|
+
"@instructure/ui-pill": "11.6.0",
|
|
118
|
+
"@instructure/ui-popover": "11.6.0",
|
|
119
|
+
"@instructure/ui-radio-input": "11.6.0",
|
|
120
|
+
"@instructure/ui-simple-select": "11.6.0",
|
|
121
|
+
"@instructure/ui-spinner": "11.6.0",
|
|
122
|
+
"@instructure/ui-svg-images": "11.6.0",
|
|
123
|
+
"@instructure/ui-table": "11.6.0",
|
|
124
|
+
"@instructure/ui-tabs": "11.6.0",
|
|
125
|
+
"@instructure/ui-text-area": "11.6.0",
|
|
126
|
+
"@instructure/ui-text-input": "11.6.0",
|
|
127
|
+
"@instructure/ui-text": "11.6.0",
|
|
128
|
+
"@instructure/ui-themes": "11.6.0",
|
|
129
|
+
"@instructure/ui-toggle-details": "11.6.0",
|
|
130
|
+
"@instructure/ui-tooltip": "11.6.0",
|
|
131
|
+
"@instructure/ui-tray": "11.6.0",
|
|
132
|
+
"@instructure/ui-tree-browser": "11.6.0",
|
|
133
|
+
"@instructure/ui-truncate-text": "11.6.0",
|
|
134
|
+
"@instructure/ui-utils": "11.6.0",
|
|
135
|
+
"@instructure/ui-view": "11.6.0",
|
|
136
|
+
"@instructure/uid": "11.6.0",
|
|
112
137
|
"@sheerun/mutationobserver-shim": "^0.3.2",
|
|
113
138
|
"@types/tinycolor2": "^1.4.6",
|
|
114
139
|
"@tinymce/tinymce-react": "~3.8.4",
|
|
115
140
|
"aphrodite": "^2",
|
|
116
|
-
"axios": "^
|
|
141
|
+
"axios": "^1.15.0",
|
|
117
142
|
"bloody-offset": "0.0.0",
|
|
118
143
|
"crypto-es": "^2.1.0",
|
|
119
144
|
"classnames": "^2.2.5",
|
|
@@ -121,11 +146,10 @@
|
|
|
121
146
|
"format-message-generate-id": "^6",
|
|
122
147
|
"i18n-js": "^3",
|
|
123
148
|
"isomorphic-fetch": "2.2.1",
|
|
124
|
-
"js-beautify": "1.
|
|
149
|
+
"js-beautify": "1.15.4",
|
|
125
150
|
"keycode": "^2",
|
|
126
|
-
"lodash": "^4",
|
|
127
151
|
"mathlive": "^0.77.0",
|
|
128
|
-
"minimatch": "
|
|
152
|
+
"minimatch": "^10.2.3",
|
|
129
153
|
"moment-timezone": "^0.5.45",
|
|
130
154
|
"prop-types": "^15",
|
|
131
155
|
"psl": "^1.1.0",
|
|
@@ -179,7 +203,7 @@
|
|
|
179
203
|
"jest-canvas-mock": "^2",
|
|
180
204
|
"jest-junit": "^7",
|
|
181
205
|
"jest-mock-proxy": "3.1.2",
|
|
182
|
-
"jest": "^
|
|
206
|
+
"jest": "^29",
|
|
183
207
|
"mathjax": "^3.2.0",
|
|
184
208
|
"msw": "^2.7",
|
|
185
209
|
"nyc": "^13",
|
package/tsconfig.json
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
"esModuleInterop": true,
|
|
5
5
|
"isolatedModules": true,
|
|
6
6
|
"jsx": "react",
|
|
7
|
-
"lib": ["dom", "es2020", "esnext"],
|
|
7
|
+
"lib": ["dom", "dom.iterable", "es2020", "esnext"],
|
|
8
8
|
"module": "ES2020",
|
|
9
|
-
"moduleResolution": "
|
|
9
|
+
"moduleResolution": "bundler",
|
|
10
10
|
"declaration": true,
|
|
11
11
|
"declarationDir": "es",
|
|
12
12
|
"emitDeclarationOnly": true,
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"composite": true,
|
|
20
20
|
"rootDir": "src",
|
|
21
21
|
"verbatimModuleSyntax": false,
|
|
22
|
+
"types": ["node"],
|
|
22
23
|
"paths": {
|
|
23
24
|
"@instructure/*": ["../packages/*"]
|
|
24
25
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
type AIResponseModaProps = {
|
|
3
|
-
open: boolean;
|
|
4
|
-
html: string;
|
|
5
|
-
onClose: () => void;
|
|
6
|
-
onInsert: () => void;
|
|
7
|
-
onReplace: () => void;
|
|
8
|
-
};
|
|
9
|
-
declare const AIResponseModal: ({ open, html, onClose, onInsert, onReplace }: AIResponseModaProps) => React.JSX.Element;
|
|
10
|
-
export { AIResponseModal };
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import _pt from "prop-types";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (C) 2024 - present Instructure, Inc.
|
|
4
|
-
*
|
|
5
|
-
* This file is part of Canvas.
|
|
6
|
-
*
|
|
7
|
-
* Canvas is free software: you can redistribute it and/or modify it under
|
|
8
|
-
* the terms of the GNU Affero General Public License as published by the Free
|
|
9
|
-
* Software Foundation, version 3 of the License.
|
|
10
|
-
*
|
|
11
|
-
* Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
12
|
-
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
13
|
-
* A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
14
|
-
* details.
|
|
15
|
-
*
|
|
16
|
-
* You should have received a copy of the GNU Affero General Public License along
|
|
17
|
-
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
import React from 'react';
|
|
21
|
-
import formatMessage from '../../../../format-message';
|
|
22
|
-
import { Button, CloseButton } from '@instructure/ui-buttons';
|
|
23
|
-
import { Heading } from '@instructure/ui-heading';
|
|
24
|
-
import { Modal } from '@instructure/ui-modal';
|
|
25
|
-
const AIResponseModal = ({
|
|
26
|
-
open,
|
|
27
|
-
html,
|
|
28
|
-
onClose,
|
|
29
|
-
onInsert,
|
|
30
|
-
onReplace
|
|
31
|
-
}) => {
|
|
32
|
-
return /*#__PURE__*/React.createElement(Modal, {
|
|
33
|
-
open: open,
|
|
34
|
-
onDismiss: onClose,
|
|
35
|
-
size: "medium",
|
|
36
|
-
label: formatMessage('AI Response')
|
|
37
|
-
}, /*#__PURE__*/React.createElement(Modal.Header, null, /*#__PURE__*/React.createElement(CloseButton, {
|
|
38
|
-
onClick: onClose,
|
|
39
|
-
placement: "end",
|
|
40
|
-
offset: "medium",
|
|
41
|
-
screenReaderLabel: formatMessage('Close')
|
|
42
|
-
}), /*#__PURE__*/React.createElement(Heading, {
|
|
43
|
-
level: "h3"
|
|
44
|
-
}, "AI Response")), /*#__PURE__*/React.createElement(Modal.Body, null, /*#__PURE__*/React.createElement("div", {
|
|
45
|
-
dangerouslySetInnerHTML: {
|
|
46
|
-
__html: html
|
|
47
|
-
}
|
|
48
|
-
})), /*#__PURE__*/React.createElement(Modal.Footer, null, /*#__PURE__*/React.createElement(Button, {
|
|
49
|
-
onClick: onClose,
|
|
50
|
-
margin: "medium 0 0 0"
|
|
51
|
-
}, formatMessage('Close')), /*#__PURE__*/React.createElement(Button, {
|
|
52
|
-
onClick: onReplace,
|
|
53
|
-
margin: "medium 0 0 medium"
|
|
54
|
-
}, formatMessage('Replace')), /*#__PURE__*/React.createElement(Button, {
|
|
55
|
-
onClick: onInsert,
|
|
56
|
-
color: "primary",
|
|
57
|
-
margin: "medium 0 0 medium"
|
|
58
|
-
}, formatMessage('Insert'))));
|
|
59
|
-
};
|
|
60
|
-
AIResponseModal.propTypes = {
|
|
61
|
-
open: _pt.bool.isRequired,
|
|
62
|
-
html: _pt.string.isRequired,
|
|
63
|
-
onClose: _pt.func.isRequired,
|
|
64
|
-
onInsert: _pt.func.isRequired,
|
|
65
|
-
onReplace: _pt.func.isRequired
|
|
66
|
-
};
|
|
67
|
-
export { AIResponseModal };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
type AIToolsTrayContent = {
|
|
3
|
-
type: 'selection' | 'full';
|
|
4
|
-
content: string;
|
|
5
|
-
};
|
|
6
|
-
type AIToolsTrayProps = {
|
|
7
|
-
open: boolean;
|
|
8
|
-
container: HTMLElement;
|
|
9
|
-
mountNode: HTMLElement;
|
|
10
|
-
contextId: string;
|
|
11
|
-
contextType: string;
|
|
12
|
-
currentContent: AIToolsTrayContent;
|
|
13
|
-
onClose: () => void;
|
|
14
|
-
onInsertContent: (content: string) => void;
|
|
15
|
-
onReplaceContent: (content: string) => void;
|
|
16
|
-
};
|
|
17
|
-
export declare const AIToolsTray: ({ open, container, mountNode, contextId, contextType, currentContent, onClose, onInsertContent, onReplaceContent, }: AIToolsTrayProps) => React.JSX.Element;
|
|
18
|
-
export {};
|