@instructure/canvas-rce 5.15.3 → 5.15.5
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/es/bridge/Bridge.d.ts +179 -0
- package/es/bridge/index.d.ts +3 -0
- package/es/canvasFileBrowser/FileBrowser.d.ts +80 -0
- package/es/canvasFileBrowser/en-US.d.ts +0 -0
- package/es/common/FlashAlert.d.ts +41 -0
- package/es/common/browser.d.ts +5 -0
- package/es/common/fileUrl.d.ts +13 -0
- package/es/common/getCookie.d.ts +7 -0
- package/es/common/incremental-loading/LoadMoreButton.d.ts +12 -0
- package/es/common/incremental-loading/LoadingIndicator.d.ts +2 -0
- package/es/common/incremental-loading/LoadingStatus.d.ts +6 -0
- package/es/common/incremental-loading/index.d.ts +4 -0
- package/es/common/incremental-loading/useIncrementalLoading.d.ts +10 -0
- package/es/common/indicate.d.ts +1 -0
- package/es/common/mimeClass.d.ts +5 -0
- package/es/common/natcompare.d.ts +8 -0
- package/es/defaultTinymceConfig.d.ts +44 -0
- package/es/elementDenylist.d.ts +2 -0
- package/es/enhance-user-content/doc_previews.d.ts +10 -0
- package/es/enhance-user-content/enhance_user_content.d.ts +1 -0
- package/es/enhance-user-content/external_links.d.ts +2 -0
- package/es/enhance-user-content/index.d.ts +4 -0
- package/es/enhance-user-content/instructure_helper.d.ts +6 -0
- package/es/enhance-user-content/jqueryish_funcs.d.ts +9 -0
- package/es/enhance-user-content/mathml.d.ts +28 -0
- package/es/enhance-user-content/media_comment_thumbnail.d.ts +1 -0
- package/es/format-message.d.ts +3 -0
- package/es/getThemeVars.d.ts +5 -0
- package/es/getTranslations.d.ts +2 -0
- package/es/index.d.ts +59 -0
- package/es/rce/AlertMessageArea.d.ts +16 -0
- package/es/rce/DraggingBlocker.d.ts +8 -0
- package/es/rce/KeyboardShortcutModal.d.ts +12 -0
- package/es/rce/RCE.d.ts +130 -0
- package/es/rce/RCEGlobals.d.ts +21 -0
- package/es/rce/RCEVariants.d.ts +17 -0
- package/es/rce/RCEWrapper.d.ts +428 -0
- package/es/rce/RCEWrapper.utils.d.ts +24 -0
- package/es/rce/RCEWrapperProps.d.ts +175 -0
- package/es/rce/RceHtmlEditor.d.ts +8 -0
- package/es/rce/ResizeHandle.d.ts +15 -0
- package/es/rce/RestoreAutoSaveModal.d.ts +15 -0
- package/es/rce/ShowOnFocusButton/index.d.ts +22 -0
- package/es/rce/StatusBar.d.ts +38 -0
- package/es/rce/alertHandler.d.ts +19 -0
- package/es/rce/contentInsertion.d.ts +8 -0
- package/es/rce/contentInsertionUtils.d.ts +20 -0
- package/es/rce/contentRendering.d.ts +9 -0
- package/es/rce/customEvents.d.ts +1 -0
- package/es/rce/editorLanguage.d.ts +10 -0
- package/es/rce/indicatorRegion.d.ts +6 -0
- package/es/rce/normalizeLocale.d.ts +1 -0
- package/es/rce/normalizeProps.d.ts +3 -0
- package/es/rce/plugins/instructure-ui-icons/plugin.d.ts +1 -0
- package/es/rce/plugins/instructure_color/clickCallback.d.ts +7 -0
- package/es/rce/plugins/instructure_color/components/ColorPicker.d.ts +30 -0
- package/es/rce/plugins/instructure_color/components/ColorPopup.d.ts +12 -0
- package/es/rce/plugins/instructure_color/components/colorUtils.d.ts +4 -0
- package/es/rce/plugins/instructure_color/plugin.d.ts +1 -0
- package/es/rce/plugins/instructure_condensed_buttons/core/ListUtils.d.ts +16 -0
- package/es/rce/plugins/instructure_condensed_buttons/plugin.d.ts +1 -0
- package/es/rce/plugins/instructure_condensed_buttons/ui/alignment-button.d.ts +2 -0
- package/es/rce/plugins/instructure_condensed_buttons/ui/directionality-button.d.ts +1 -0
- package/es/rce/plugins/instructure_condensed_buttons/ui/indent-outdent-button.d.ts +2 -0
- package/es/rce/plugins/instructure_condensed_buttons/ui/list-button.d.ts +8 -0
- package/es/rce/plugins/instructure_condensed_buttons/ui/subscript-superscript-button.d.ts +2 -0
- package/es/rce/plugins/instructure_documents/clickCallback.d.ts +1 -0
- package/es/rce/plugins/instructure_documents/components/DocumentsPanel.d.ts +18 -0
- package/es/rce/plugins/instructure_documents/components/Link.d.ts +28 -0
- package/es/rce/plugins/instructure_documents/plugin.d.ts +1 -0
- package/es/rce/plugins/instructure_equation/EquationEditorModal/advancedOnlySyntax.d.ts +2 -0
- package/es/rce/plugins/instructure_equation/EquationEditorModal/advancedPreference.d.ts +4 -0
- package/es/rce/plugins/instructure_equation/EquationEditorModal/index.d.ts +51 -0
- package/es/rce/plugins/instructure_equation/EquationEditorModal/latexTextareaUtil.d.ts +16 -0
- package/es/rce/plugins/instructure_equation/EquationEditorModal/parseLatex.d.ts +12 -0
- package/es/rce/plugins/instructure_equation/EquationEditorModal/styles.d.ts +6 -0
- package/es/rce/plugins/instructure_equation/EquationEditorToolbar/buttons.d.ts +17 -0
- package/es/rce/plugins/instructure_equation/EquationEditorToolbar/index.d.ts +10 -0
- package/es/rce/plugins/instructure_equation/MathIcon/index.d.ts +10 -0
- package/es/rce/plugins/instructure_equation/MathIcon/svgs.d.ts +216 -0
- package/es/rce/plugins/instructure_equation/clickCallback.d.ts +1 -0
- package/es/rce/plugins/instructure_equation/mathlive/index.d.ts +1 -0
- package/es/rce/plugins/instructure_equation/plugin.d.ts +1 -0
- package/es/rce/plugins/instructure_fullscreen/plugin.d.ts +1 -0
- package/es/rce/plugins/instructure_html_view/clickCallback.d.ts +1 -0
- package/es/rce/plugins/instructure_html_view/plugin.d.ts +1 -0
- package/es/rce/plugins/instructure_icon_maker/clickCallback.d.ts +5 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ColorSection.d.ts +6 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/CreateIconMakerForm.d.ts +10 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/Footer.d.ts +11 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/Group.d.ts +6 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/Header.d.ts +8 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/Course.d.ts +29 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/ImageOptions.d.ts +56 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/ImageSection.d.ts +20 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/ModeSelect.d.ts +3 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/MultiColor/index.d.ts +23 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/MultiColor/svg.d.ts +91 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/SVGList.d.ts +154 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/SVGThumbnail.d.ts +28 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/SingleColor/index.d.ts +29 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/SingleColor/svg.d.ts +97 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/Upload.d.ts +26 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/index.d.ts +1 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/propTypes.d.ts +21 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/utils.d.ts +5 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/Preview.d.ts +4 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ShapeSection.d.ts +5 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/TextSection.d.ts +5 -0
- package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/index.d.ts +1 -0
- package/es/rce/plugins/instructure_icon_maker/components/IconMakerTray.d.ts +22 -0
- package/es/rce/plugins/instructure_icon_maker/components/SavedIconMakerList.d.ts +30 -0
- package/es/rce/plugins/instructure_icon_maker/plugin.d.ts +1 -0
- package/es/rce/plugins/instructure_icon_maker/reducers/imageSection.d.ts +97 -0
- package/es/rce/plugins/instructure_icon_maker/reducers/svgSettings.d.ts +40 -0
- package/es/rce/plugins/instructure_icon_maker/registerEditToolbar.d.ts +3 -0
- package/es/rce/plugins/instructure_icon_maker/svg/clipPath.d.ts +2 -0
- package/es/rce/plugins/instructure_icon_maker/svg/constants.d.ts +66 -0
- package/es/rce/plugins/instructure_icon_maker/svg/font.d.ts +2 -0
- package/es/rce/plugins/instructure_icon_maker/svg/image.d.ts +44 -0
- package/es/rce/plugins/instructure_icon_maker/svg/index.d.ts +9 -0
- package/es/rce/plugins/instructure_icon_maker/svg/metadata.d.ts +2 -0
- package/es/rce/plugins/instructure_icon_maker/svg/settings.d.ts +6 -0
- package/es/rce/plugins/instructure_icon_maker/svg/shape.d.ts +14 -0
- package/es/rce/plugins/instructure_icon_maker/svg/text.d.ts +28 -0
- package/es/rce/plugins/instructure_icon_maker/svg/utils.d.ts +3 -0
- package/es/rce/plugins/instructure_icon_maker/utils/IconMakerClose.d.ts +2 -0
- package/es/rce/plugins/instructure_icon_maker/utils/IconMakerFormHasChanges.d.ts +35 -0
- package/es/rce/plugins/instructure_icon_maker/utils/addIconMakerAttributes.d.ts +4 -0
- package/es/rce/plugins/instructure_icon_maker/utils/iconValidation.d.ts +6 -0
- package/es/rce/plugins/instructure_icon_maker/utils/iconsLabels.d.ts +356 -0
- package/es/rce/plugins/instructure_icon_maker/utils/useDebouncedValue.d.ts +1 -0
- package/es/rce/plugins/instructure_image/ImageEmbedOptions.d.ts +49 -0
- package/es/rce/plugins/instructure_image/ImageList/Image.d.ts +33 -0
- package/es/rce/plugins/instructure_image/ImageList/index.d.ts +33 -0
- package/es/rce/plugins/instructure_image/ImageOptionsTray/TrayController.d.ts +17 -0
- package/es/rce/plugins/instructure_image/ImageOptionsTray/index.d.ts +29 -0
- package/es/rce/plugins/instructure_image/Images/index.d.ts +24 -0
- package/es/rce/plugins/instructure_image/clickCallback.d.ts +1 -0
- package/es/rce/plugins/instructure_image/plugin.d.ts +1 -0
- package/es/rce/plugins/instructure_links/clickCallback.d.ts +1 -0
- package/es/rce/plugins/instructure_links/components/AccordionSection.d.ts +18 -0
- package/es/rce/plugins/instructure_links/components/CollectionPanel.d.ts +113 -0
- package/es/rce/plugins/instructure_links/components/Link.d.ts +24 -0
- package/es/rce/plugins/instructure_links/components/LinkOptionsDialog/LinkOptionsDialogController.d.ts +18 -0
- package/es/rce/plugins/instructure_links/components/LinkOptionsDialog/index.d.ts +24 -0
- package/es/rce/plugins/instructure_links/components/LinkOptionsTray/LinkOptionsTrayController.d.ts +14 -0
- package/es/rce/plugins/instructure_links/components/LinkOptionsTray/index.d.ts +18 -0
- package/es/rce/plugins/instructure_links/components/LinkSet.d.ts +46 -0
- package/es/rce/plugins/instructure_links/components/LinksPanel.d.ts +107 -0
- package/es/rce/plugins/instructure_links/components/NavigationPanel.d.ts +17 -0
- package/es/rce/plugins/instructure_links/components/NoResults.d.ts +13 -0
- package/es/rce/plugins/instructure_links/components/propTypes.d.ts +102 -0
- package/es/rce/plugins/instructure_links/plugin.d.ts +1 -0
- package/es/rce/plugins/instructure_links/validateURL.d.ts +6 -0
- package/es/rce/plugins/instructure_media_embed/clickCallback.d.ts +1 -0
- package/es/rce/plugins/instructure_media_embed/components/Embed.d.ts +11 -0
- package/es/rce/plugins/instructure_media_embed/plugin.d.ts +1 -0
- package/es/rce/plugins/instructure_paste/pasteMenuCommand.d.ts +1 -0
- package/es/rce/plugins/instructure_paste/plugin.d.ts +1 -0
- package/es/rce/plugins/instructure_rce_external_tools/ExternalToolsEnv.d.ts +30 -0
- package/es/rce/plugins/instructure_rce_external_tools/RceToolWrapper.d.ts +77 -0
- package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolDialog/ExternalToolDialog.d.ts +45 -0
- package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolDialog/ExternalToolDialogModal.d.ts +8 -0
- package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolDialog/ExternalToolDialogTray.d.ts +14 -0
- package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolSelectionDialog/ExternalToolSelectionDialog.d.ts +18 -0
- package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolSelectionDialog/ExternalToolSelectionItem.d.ts +12 -0
- package/es/rce/plugins/instructure_rce_external_tools/components/util/ExpandoText.d.ts +7 -0
- package/es/rce/plugins/instructure_rce_external_tools/components/util/ToolLaunchIframe.d.ts +10 -0
- package/es/rce/plugins/instructure_rce_external_tools/constants.d.ts +9 -0
- package/es/rce/plugins/instructure_rce_external_tools/dialog-helper.d.ts +3 -0
- package/es/rce/plugins/instructure_rce_external_tools/helpers/tags.d.ts +18 -0
- package/es/rce/plugins/instructure_rce_external_tools/jquery/jquery.dropdownList.d.ts +27 -0
- package/es/rce/plugins/instructure_rce_external_tools/lti11-content-items/RceLti11ContentItem.d.ts +72 -0
- package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/Lti13ContentItemJson.d.ts +55 -0
- package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/RceLti13ContentItem.d.ts +31 -0
- package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/models/BaseLinkContentItem.d.ts +19 -0
- package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/models/HtmlFragmentContentItem.d.ts +11 -0
- package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/models/ImageContentItem.d.ts +17 -0
- package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/models/LinkContentItem.d.ts +7 -0
- package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/models/ResourceLinkContentItem.d.ts +9 -0
- package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/processEditorContentItems.d.ts +13 -0
- package/es/rce/plugins/instructure_rce_external_tools/lti13-content-items/rceLti13ContentItemFromJson.d.ts +12 -0
- package/es/rce/plugins/instructure_rce_external_tools/plugin.d.ts +9 -0
- package/es/rce/plugins/instructure_rce_external_tools/util/addParentFrameContextToUrl.d.ts +1 -0
- package/es/rce/plugins/instructure_rce_external_tools/util/externalToolsForToolbar.d.ts +2 -0
- package/es/rce/plugins/instructure_record/AudioOptionsTray/TrayController.d.ts +17 -0
- package/es/rce/plugins/instructure_record/AudioOptionsTray/index.d.ts +41 -0
- package/es/rce/plugins/instructure_record/MediaPanel/index.d.ts +18 -0
- package/es/rce/plugins/instructure_record/VideoOptionsTray/TrayController.d.ts +27 -0
- package/es/rce/plugins/instructure_record/VideoOptionsTray/index.d.ts +45 -0
- package/es/rce/plugins/instructure_record/clickCallback.d.ts +2 -0
- package/es/rce/plugins/instructure_record/mediaTranslations.d.ts +69 -0
- package/es/rce/plugins/instructure_record/plugin.d.ts +1 -0
- package/es/rce/plugins/instructure_search_and_replace/clickCallback.d.ts +2 -0
- package/es/rce/plugins/instructure_search_and_replace/components/FindReplaceTray.d.ts +14 -0
- package/es/rce/plugins/instructure_search_and_replace/components/FindReplaceTrayController.d.ts +12 -0
- package/es/rce/plugins/instructure_search_and_replace/getSelectionContext.d.ts +1 -0
- package/es/rce/plugins/instructure_search_and_replace/plugin.d.ts +1 -0
- package/es/rce/plugins/instructure_studio_media_options/plugin.d.ts +1 -0
- package/es/rce/plugins/instructure_wordcount/clickCallback.d.ts +6 -0
- package/es/rce/plugins/instructure_wordcount/components/WordCountModal.d.ts +8 -0
- package/es/rce/plugins/instructure_wordcount/plugin.d.ts +1 -0
- package/es/rce/plugins/instructure_wordcount/utils/countContent.d.ts +11 -0
- package/es/rce/plugins/instructure_wordcount/utils/tableContent.d.ts +12 -0
- package/es/rce/plugins/shared/CanvasContentTray.d.ts +66 -0
- package/es/rce/plugins/shared/CheckerboardStyling.d.ts +5 -0
- package/es/rce/plugins/shared/ColorInput.d.ts +11 -0
- package/es/rce/plugins/shared/ConditionalTooltip.d.ts +12 -0
- package/es/rce/plugins/shared/ContentSelection.d.ts +75 -0
- package/es/rce/plugins/shared/DimensionUtils.d.ts +14 -0
- package/es/rce/plugins/shared/DimensionsInput/DimensionInput.d.ts +13 -0
- package/es/rce/plugins/shared/DimensionsInput/index.d.ts +36 -0
- package/es/rce/plugins/shared/DimensionsInput/useDimensionsState.d.ts +25 -0
- package/es/rce/plugins/shared/ErrorBoundary.d.ts +16 -0
- package/es/rce/plugins/shared/EventUtils.d.ts +8 -0
- package/es/rce/plugins/shared/Filter.d.ts +18 -0
- package/es/rce/plugins/shared/FixedContentTray.d.ts +46 -0
- package/es/rce/plugins/shared/ImageCropper/DirectionRegion.d.ts +13 -0
- package/es/rce/plugins/shared/ImageCropper/Modal.d.ts +40 -0
- package/es/rce/plugins/shared/ImageCropper/Preview.d.ts +21 -0
- package/es/rce/plugins/shared/ImageCropper/constants.d.ts +22 -0
- package/es/rce/plugins/shared/ImageCropper/controls/CustomNumberInput.d.ts +30 -0
- package/es/rce/plugins/shared/ImageCropper/controls/ResetControls.d.ts +14 -0
- package/es/rce/plugins/shared/ImageCropper/controls/RotationControls.d.ts +18 -0
- package/es/rce/plugins/shared/ImageCropper/controls/ShapeControls.d.ts +12 -0
- package/es/rce/plugins/shared/ImageCropper/controls/ZoomControls.d.ts +18 -0
- package/es/rce/plugins/shared/ImageCropper/controls/index.d.ts +5 -0
- package/es/rce/plugins/shared/ImageCropper/controls/useDebouncedNumericValue.d.ts +7 -0
- package/es/rce/plugins/shared/ImageCropper/controls/utils.d.ts +4 -0
- package/es/rce/plugins/shared/ImageCropper/imageCropUtils.d.ts +8 -0
- package/es/rce/plugins/shared/ImageCropper/index.d.ts +1 -0
- package/es/rce/plugins/shared/ImageCropper/propTypes.d.ts +9 -0
- package/es/rce/plugins/shared/ImageCropper/reducers/imageCropper.d.ts +18 -0
- package/es/rce/plugins/shared/ImageCropper/shape.d.ts +10 -0
- package/es/rce/plugins/shared/ImageCropper/svg/index.d.ts +1 -0
- package/es/rce/plugins/shared/ImageCropper/svg/shape.d.ts +4 -0
- package/es/rce/plugins/shared/ImageCropper/svg/utils.d.ts +1 -0
- package/es/rce/plugins/shared/ImageCropper/useKeyMouseEvents.d.ts +1 -0
- package/es/rce/plugins/shared/ImageCropper/useMouseWheel.d.ts +1 -0
- package/es/rce/plugins/shared/ImageOptionsForm.d.ts +19 -0
- package/es/rce/plugins/shared/LinkDisplay.d.ts +9 -0
- package/es/rce/plugins/shared/PreviewIcon.d.ts +50 -0
- package/es/rce/plugins/shared/Previewable.d.ts +2 -0
- package/es/rce/plugins/shared/RceFileBrowser.d.ts +19 -0
- package/es/rce/plugins/shared/StoreContext.d.ts +15 -0
- package/es/rce/plugins/shared/StudioLtiSupportUtils.d.ts +37 -0
- package/es/rce/plugins/shared/UnknownFileTypePanel.d.ts +2 -0
- package/es/rce/plugins/shared/Upload/CanvasContentPanel.d.ts +29 -0
- package/es/rce/plugins/shared/Upload/CategoryProcessor.d.ts +3 -0
- package/es/rce/plugins/shared/Upload/ComputerPanel.d.ts +32 -0
- package/es/rce/plugins/shared/Upload/PanelFilter.d.ts +10 -0
- package/es/rce/plugins/shared/Upload/SvgCategoryProcessor.d.ts +4 -0
- package/es/rce/plugins/shared/Upload/UploadFile.d.ts +24 -0
- package/es/rce/plugins/shared/Upload/UploadFileModal.d.ts +3 -0
- package/es/rce/plugins/shared/Upload/UrlPanel.d.ts +12 -0
- package/es/rce/plugins/shared/Upload/UsageRightsSelectBox.d.ts +23 -0
- package/es/rce/plugins/shared/Upload/doFileUpload.d.ts +17 -0
- package/es/rce/plugins/shared/Upload/index.d.ts +2 -0
- package/es/rce/plugins/shared/ai_tools/AIResponseModal.d.ts +10 -0
- package/es/rce/plugins/shared/ai_tools/AIToolsTray.d.ts +18 -0
- package/es/rce/plugins/shared/ai_tools/aiicons.d.ts +7 -0
- package/es/rce/plugins/shared/ai_tools/index.d.ts +3 -0
- package/es/rce/plugins/shared/buildDownloadUrl.d.ts +1 -0
- package/es/rce/plugins/shared/canvasContentUtils.d.ts +138 -0
- package/es/rce/plugins/shared/compressionUtils.d.ts +11 -0
- package/es/rce/plugins/shared/dateUtils.d.ts +1 -0
- package/es/rce/plugins/shared/do-fetch-api-effect/defaultFetchOptions.d.ts +4 -0
- package/es/rce/plugins/shared/do-fetch-api-effect/doFetchApi.d.ts +22 -0
- package/es/rce/plugins/shared/do-fetch-api-effect/get-cookie.d.ts +7 -0
- package/es/rce/plugins/shared/do-fetch-api-effect/index.d.ts +7 -0
- package/es/rce/plugins/shared/do-fetch-api-effect/parse-link-header.d.ts +12 -0
- package/es/rce/plugins/shared/do-fetch-api-effect/query-string-encoding.d.ts +6 -0
- package/es/rce/plugins/shared/fileShape.d.ts +116 -0
- package/es/rce/plugins/shared/fileTypeUtils.d.ts +28 -0
- package/es/rce/plugins/shared/fileUtils.d.ts +1 -0
- package/es/rce/plugins/shared/linkUtils.d.ts +5 -0
- package/es/rce/plugins/shared/round.d.ts +1 -0
- package/es/rce/plugins/shared/trayUtils.d.ts +3 -0
- package/es/rce/plugins/shared/useDataUrl.d.ts +8 -0
- package/es/rce/plugins/shared/useFilterSettings.d.ts +10 -0
- package/es/rce/plugins/tinymce-a11y-checker/components/ColorField.d.ts +33 -0
- package/es/rce/plugins/tinymce-a11y-checker/components/checker.d.ts +53 -0
- package/es/rce/plugins/tinymce-a11y-checker/components/color-picker.d.ts +2 -0
- package/es/rce/plugins/tinymce-a11y-checker/components/placeholder-svg.d.ts +2 -0
- package/es/rce/plugins/tinymce-a11y-checker/components/pointer.d.ts +2 -0
- package/es/rce/plugins/tinymce-a11y-checker/node-checker.d.ts +1 -0
- package/es/rce/plugins/tinymce-a11y-checker/plugin.d.ts +2 -0
- package/es/rce/plugins/tinymce-a11y-checker/rules/adjacent-links.d.ts +19 -0
- package/es/rce/plugins/tinymce-a11y-checker/rules/headings-sequence.d.ts +18 -0
- package/es/rce/plugins/tinymce-a11y-checker/rules/headings-start-at-h2.d.ts +28 -0
- package/es/rce/plugins/tinymce-a11y-checker/rules/img-alt-filename.d.ts +25 -0
- package/es/rce/plugins/tinymce-a11y-checker/rules/img-alt-length.d.ts +18 -0
- package/es/rce/plugins/tinymce-a11y-checker/rules/img-alt.d.ts +25 -0
- package/es/rce/plugins/tinymce-a11y-checker/rules/index.d.ts +198 -0
- package/es/rce/plugins/tinymce-a11y-checker/rules/large-text-contrast.d.ts +19 -0
- package/es/rce/plugins/tinymce-a11y-checker/rules/list-structure.d.ts +20 -0
- package/es/rce/plugins/tinymce-a11y-checker/rules/paragraphs-for-headings.d.ts +18 -0
- package/es/rce/plugins/tinymce-a11y-checker/rules/small-text-contrast.d.ts +19 -0
- package/es/rce/plugins/tinymce-a11y-checker/rules/table-caption.d.ts +17 -0
- package/es/rce/plugins/tinymce-a11y-checker/rules/table-header-scope.d.ts +18 -0
- package/es/rce/plugins/tinymce-a11y-checker/rules/table-header.d.ts +18 -0
- package/es/rce/plugins/tinymce-a11y-checker/utils/colors.d.ts +10 -0
- package/es/rce/plugins/tinymce-a11y-checker/utils/describe.d.ts +1 -0
- package/es/rce/plugins/tinymce-a11y-checker/utils/dom.d.ts +11 -0
- package/es/rce/plugins/tinymce-a11y-checker/utils/indicate.d.ts +7 -0
- package/es/rce/plugins/tinymce-a11y-checker/utils/rgb-hex.d.ts +2 -0
- package/es/rce/plugins/tinymce-a11y-checker/utils/strings.d.ts +2 -0
- package/es/rce/root.d.ts +3 -0
- package/es/rce/sanitizePlugins.d.ts +1 -0
- package/es/rce/style.d.ts +64 -0
- package/es/rce/tinyRCE.d.ts +2 -0
- package/es/rce/tinymce.oxide.content.min.css.d.ts +2 -0
- package/es/rce/tinymce.oxide.skin.min.css.d.ts +2 -0
- package/es/rce/transformContent.d.ts +13 -0
- package/es/rce/types.d.ts +96 -0
- package/es/rce/userOS.d.ts +4 -0
- package/es/rce/wrapInitCb.d.ts +2 -0
- package/es/rcs/api.d.ts +117 -0
- package/es/rcs/buildError.d.ts +4 -0
- package/es/rcs/fake.d.ts +111 -0
- package/es/sidebar/actions/all_files.d.ts +5 -0
- package/es/sidebar/actions/data.d.ts +29 -0
- package/es/sidebar/actions/documents.d.ts +42 -0
- package/es/sidebar/actions/files.d.ts +66 -0
- package/es/sidebar/actions/filter.d.ts +25 -0
- package/es/sidebar/actions/flickr.d.ts +20 -0
- package/es/sidebar/actions/images.d.ts +63 -0
- package/es/sidebar/actions/links.d.ts +4 -0
- package/es/sidebar/actions/media.d.ts +46 -0
- package/es/sidebar/actions/session.d.ts +2 -0
- package/es/sidebar/actions/ui.d.ts +22 -0
- package/es/sidebar/actions/upload.d.ts +114 -0
- package/es/sidebar/containers/Sidebar.d.ts +1 -0
- package/es/sidebar/containers/sidebarHandlers.d.ts +33 -0
- package/es/sidebar/dragHtml.d.ts +1 -0
- package/es/sidebar/reducers/all_files.d.ts +1 -0
- package/es/sidebar/reducers/collection.d.ts +1 -0
- package/es/sidebar/reducers/collections.d.ts +9 -0
- package/es/sidebar/reducers/documents.d.ts +1 -0
- package/es/sidebar/reducers/files.d.ts +1 -0
- package/es/sidebar/reducers/filter.d.ts +7 -0
- package/es/sidebar/reducers/flickr.d.ts +1 -0
- package/es/sidebar/reducers/folder.d.ts +25 -0
- package/es/sidebar/reducers/folders.d.ts +1 -0
- package/es/sidebar/reducers/images.d.ts +1 -0
- package/es/sidebar/reducers/index.d.ts +44 -0
- package/es/sidebar/reducers/media.d.ts +1 -0
- package/es/sidebar/reducers/newPageLinkExpanded.d.ts +1 -0
- package/es/sidebar/reducers/noop.d.ts +1 -0
- package/es/sidebar/reducers/rootFolderId.d.ts +1 -0
- package/es/sidebar/reducers/session.d.ts +1 -0
- package/es/sidebar/reducers/ui.d.ts +6 -0
- package/es/sidebar/reducers/upload.d.ts +11 -0
- package/es/sidebar/store/configureStore.d.ts +3 -0
- package/es/sidebar/store/initialState.d.ts +22 -0
- package/es/translations/locales/ab.d.ts +1 -0
- package/es/translations/locales/ar.d.ts +1 -0
- package/es/translations/locales/ca.d.ts +1 -0
- package/es/translations/locales/cs.d.ts +1 -0
- package/es/translations/locales/cs_CZ.d.ts +1 -0
- package/es/translations/locales/cy.d.ts +1 -0
- package/es/translations/locales/da-x-k12.d.ts +1 -0
- package/es/translations/locales/da.d.ts +1 -0
- package/es/translations/locales/da_DK.d.ts +1 -0
- package/es/translations/locales/de.d.ts +1 -0
- package/es/translations/locales/el.d.ts +1 -0
- package/es/translations/locales/en-AU-x-unimelb.d.ts +1 -0
- package/es/translations/locales/en-GB-x-ukhe.d.ts +1 -0
- package/es/translations/locales/en.d.ts +1 -0
- package/es/translations/locales/en_AU.d.ts +1 -0
- package/es/translations/locales/en_CA.d.ts +1 -0
- package/es/translations/locales/en_CY.d.ts +1 -0
- package/es/translations/locales/en_GB.d.ts +1 -0
- package/es/translations/locales/en_NZ.d.ts +1 -0
- package/es/translations/locales/en_SE.d.ts +1 -0
- package/es/translations/locales/en_US.d.ts +1 -0
- package/es/translations/locales/es.d.ts +1 -0
- package/es/translations/locales/es_ES.d.ts +1 -0
- package/es/translations/locales/es_GT.d.ts +1 -0
- package/es/translations/locales/fa_IR.d.ts +1 -0
- package/es/translations/locales/fi.d.ts +1 -0
- package/es/translations/locales/fr.d.ts +1 -0
- package/es/translations/locales/fr_CA.d.ts +1 -0
- package/es/translations/locales/ga.d.ts +1 -0
- package/es/translations/locales/he.d.ts +1 -0
- package/es/translations/locales/hi.d.ts +1 -0
- package/es/translations/locales/ht.d.ts +1 -0
- package/es/translations/locales/hu.d.ts +1 -0
- package/es/translations/locales/hu_HU.d.ts +1 -0
- package/es/translations/locales/hy.d.ts +1 -0
- package/es/translations/locales/id.d.ts +1 -0
- package/es/translations/locales/id_ID.d.ts +1 -0
- package/es/translations/locales/is.d.ts +1 -0
- package/es/translations/locales/it.d.ts +1 -0
- package/es/translations/locales/ja.d.ts +1 -0
- package/es/translations/locales/ko.d.ts +1 -0
- package/es/translations/locales/ko_KR.d.ts +1 -0
- package/es/translations/locales/lt.d.ts +1 -0
- package/es/translations/locales/lt_LT.d.ts +1 -0
- package/es/translations/locales/mi.d.ts +1 -0
- package/es/translations/locales/mn_MN.d.ts +1 -0
- package/es/translations/locales/ms.d.ts +1 -0
- package/es/translations/locales/nb-x-k12.d.ts +1 -0
- package/es/translations/locales/nb.d.ts +1 -0
- package/es/translations/locales/nl.d.ts +1 -0
- package/es/translations/locales/nl_NL.d.ts +1 -0
- package/es/translations/locales/nn.d.ts +1 -0
- package/es/translations/locales/pl.d.ts +1 -0
- package/es/translations/locales/pt.d.ts +1 -0
- package/es/translations/locales/pt_BR.d.ts +1 -0
- package/es/translations/locales/ro.d.ts +1 -0
- package/es/translations/locales/ru.d.ts +1 -0
- package/es/translations/locales/se.d.ts +1 -0
- package/es/translations/locales/sl.d.ts +1 -0
- package/es/translations/locales/sv-x-k12.d.ts +1 -0
- package/es/translations/locales/sv.d.ts +1 -0
- package/es/translations/locales/sv_SE.d.ts +1 -0
- package/es/translations/locales/tg.d.ts +1 -0
- package/es/translations/locales/th.d.ts +1 -0
- package/es/translations/locales/th_TH.d.ts +1 -0
- package/es/translations/locales/tl_PH.d.ts +1 -0
- package/es/translations/locales/tr.d.ts +1 -0
- package/es/translations/locales/uk_UA.d.ts +1 -0
- package/es/translations/locales/vi.d.ts +1 -0
- package/es/translations/locales/vi_VN.d.ts +1 -0
- package/es/translations/locales/zh-Hans.d.ts +1 -0
- package/es/translations/locales/zh-Hant.d.ts +1 -0
- package/es/translations/locales/zh.d.ts +1 -0
- package/es/translations/locales/zh_HK.d.ts +1 -0
- package/es/translations/locales/zh_TW.Big5.d.ts +1 -0
- package/es/translations/locales/zh_TW.d.ts +1 -0
- package/es/translations/tinymce/ar_SA.d.ts +0 -0
- package/es/translations/tinymce/bg_BG.d.ts +0 -0
- package/es/translations/tinymce/ca.d.ts +0 -0
- package/es/translations/tinymce/cs.d.ts +0 -0
- package/es/translations/tinymce/cy.d.ts +0 -0
- package/es/translations/tinymce/da.d.ts +0 -0
- package/es/translations/tinymce/de.d.ts +0 -0
- package/es/translations/tinymce/el.d.ts +0 -0
- package/es/translations/tinymce/en_GB.d.ts +0 -0
- package/es/translations/tinymce/es.d.ts +0 -0
- package/es/translations/tinymce/fa_IR.d.ts +0 -0
- package/es/translations/tinymce/fi.d.ts +0 -0
- package/es/translations/tinymce/fr_FR.d.ts +0 -0
- package/es/translations/tinymce/ga.d.ts +0 -0
- package/es/translations/tinymce/he_IL.d.ts +0 -0
- package/es/translations/tinymce/hu_HU.d.ts +0 -0
- package/es/translations/tinymce/hy.d.ts +0 -0
- package/es/translations/tinymce/id.d.ts +0 -0
- package/es/translations/tinymce/it.d.ts +0 -0
- package/es/translations/tinymce/ja.d.ts +0 -0
- package/es/translations/tinymce/ko_KR.d.ts +0 -0
- package/es/translations/tinymce/nb_NO.d.ts +0 -0
- package/es/translations/tinymce/nl.d.ts +0 -0
- package/es/translations/tinymce/pl.d.ts +0 -0
- package/es/translations/tinymce/pt_BR.d.ts +0 -0
- package/es/translations/tinymce/pt_PT.d.ts +0 -0
- package/es/translations/tinymce/ro.d.ts +0 -0
- package/es/translations/tinymce/ru.d.ts +0 -0
- package/es/translations/tinymce/ru_RU.d.ts +0 -0
- package/es/translations/tinymce/sl.d.ts +0 -0
- package/es/translations/tinymce/sr.d.ts +0 -0
- package/es/translations/tinymce/sv_SE.d.ts +0 -0
- package/es/translations/tinymce/th.d.ts +0 -0
- package/es/translations/tinymce/tr_TR.d.ts +0 -0
- package/es/translations/tinymce/uk_UA.d.ts +0 -0
- package/es/translations/tinymce/vi_VN.d.ts +0 -0
- package/es/translations/tinymce/zh_CN.d.ts +0 -0
- package/es/translations/tinymce/zh_TW.d.ts +0 -0
- package/es/util/DeepPartialNullable.d.ts +15 -0
- package/es/util/ExtractRequired.d.ts +42 -0
- package/es/util/TypedDict.d.ts +99 -0
- package/es/util/assertNever.d.ts +24 -0
- package/es/util/elem-util.d.ts +6 -0
- package/es/util/encrypted-storage.d.ts +9 -0
- package/es/util/file-url-util.d.ts +1 -0
- package/es/util/fullscreenHelpers.d.ts +6 -0
- package/es/util/instui-icon-helper.d.ts +19 -0
- package/es/util/loadingPlaceholder.d.ts +39 -0
- package/es/util/simpleCache.d.ts +11 -0
- package/es/util/string-util.d.ts +20 -0
- package/es/util/textarea-editing-util.d.ts +35 -0
- package/es/util/tinymce-plugin-util.d.ts +16 -0
- package/es/util/url-util.d.ts +32 -0
- package/package.json +2 -3
- package/scripts/build.js +0 -40
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helper type that takes an input Record type and produces a copy where all properties are optional and nullable,
|
|
3
|
+
* recursively.
|
|
4
|
+
*
|
|
5
|
+
* Useful for declaring the type of unsafe input JSON to ensure that proper null checking is handled.
|
|
6
|
+
*/
|
|
7
|
+
export type DeepPartialNullable<T> = {
|
|
8
|
+
[K in keyof T]?: (T[K] extends object ? DeepPartialNullable<T[K]> : T[K]) | null;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Implementation of DeepPartial that handles children that may be optional or nullable.
|
|
12
|
+
*/
|
|
13
|
+
export type DeepPartialOptional<T> = {
|
|
14
|
+
[K in keyof T]?: T[K] extends object ? DeepPartialOptional<T[K]> : T[K] extends object | null ? DeepPartialOptional<T[K]> | null : T[K] extends object | undefined ? DeepPartialOptional<T[K]> | undefined : T[K] extends object | null | undefined ? DeepPartialOptional<T[K]> | null | undefined : T[K];
|
|
15
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extract from `T` those types that are assignable to `U`, but only allows values present in `T`
|
|
3
|
+
*
|
|
4
|
+
* This is a more type safe version of the built-in `Extract`.
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* // Imagine a type encoding the valid CSS border-style values:
|
|
9
|
+
*
|
|
10
|
+
* type CssBorderStyle = 'dotted'
|
|
11
|
+
* | 'dashed'
|
|
12
|
+
* | 'solid'
|
|
13
|
+
* | 'double'
|
|
14
|
+
* | 'groove'
|
|
15
|
+
* | 'ridge'
|
|
16
|
+
* | 'inset'
|
|
17
|
+
* | 'outset'
|
|
18
|
+
* | 'none'
|
|
19
|
+
* | 'hidden'
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
* // We might want to have a function that only supports a subset of that list, but we want the compiler to ensure
|
|
23
|
+
* // we didn't make a mistake. The following would compile:
|
|
24
|
+
*
|
|
25
|
+
*
|
|
26
|
+
* function applyValidBorder(
|
|
27
|
+
* style: ExtractRequired<CssBorderStyle, 'solid' | 'none' | 'dashed'>
|
|
28
|
+
* ){ }
|
|
29
|
+
*
|
|
30
|
+
*
|
|
31
|
+
* // But this would not compile, since 'unsolid' isn't in `CssBorderStyle`:
|
|
32
|
+
*
|
|
33
|
+
*
|
|
34
|
+
* function applyValidBorder(
|
|
35
|
+
* style: ExtractRequired<CssBorderStyle, 'unsolid' | 'none' | 'dashed'>
|
|
36
|
+
* ) { }
|
|
37
|
+
*
|
|
38
|
+
*
|
|
39
|
+
* // This is helpful if a value is later removed from `CssBorderStyle`: All uses of that value will become compiler
|
|
40
|
+
* // errors.
|
|
41
|
+
*/
|
|
42
|
+
export type ExtractRequired<TSuperset, TSubset extends TSuperset> = TSuperset extends TSubset ? TSuperset : never;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Takes a dictionary with explicit keys and returns an object with three type-safe properties:
|
|
3
|
+
*
|
|
4
|
+
* - `byKey`: The original dictionary, but with the key of each value added to it as `[keyProp]`
|
|
5
|
+
* - `values`: An array of the values in the original dictionary
|
|
6
|
+
* - `keys`: An array of the keys in the original dictionary
|
|
7
|
+
* - `TKey`: A placeholder value that holds the type of the keys
|
|
8
|
+
* - `TValue`: A placeholder value that holds the type of the values
|
|
9
|
+
*
|
|
10
|
+
* This is useful to add explicit type checking to the pattern where a literal dictionary is used to define
|
|
11
|
+
* a relationship between a known set of keys to some value type.
|
|
12
|
+
*
|
|
13
|
+
* For example:
|
|
14
|
+
*
|
|
15
|
+
* ```
|
|
16
|
+
* const {
|
|
17
|
+
* byKey: itemDict,
|
|
18
|
+
* values: items,
|
|
19
|
+
* keys: itemSlugs,
|
|
20
|
+
* } = typedKeyDict(
|
|
21
|
+
* {
|
|
22
|
+
* undo: {
|
|
23
|
+
* label: 'Undo',
|
|
24
|
+
* description: 'Undo the last action',
|
|
25
|
+
* performAction: () => {
|
|
26
|
+
* // Do work
|
|
27
|
+
* },
|
|
28
|
+
* },
|
|
29
|
+
* redo: {
|
|
30
|
+
* label: 'Redo',
|
|
31
|
+
* description: 'Redo the last undone action, or repeat the last action',
|
|
32
|
+
* performAction: () => {
|
|
33
|
+
* // Do work
|
|
34
|
+
* },
|
|
35
|
+
* },
|
|
36
|
+
* },
|
|
37
|
+
* 'slug'
|
|
38
|
+
* )
|
|
39
|
+
*
|
|
40
|
+
* // Values of itemDict now have a `slug` property with type `'undo' | 'redo'`
|
|
41
|
+
*
|
|
42
|
+
* const slug: 'undo' | 'redo' = itemDict.undo.slug
|
|
43
|
+
*
|
|
44
|
+
* // Key and value iteration are now type safe:
|
|
45
|
+
*
|
|
46
|
+
* items.forEach(item => {
|
|
47
|
+
* // item is the correct type, unlike what Object.values gives
|
|
48
|
+
* })
|
|
49
|
+
*
|
|
50
|
+
* itemSlugs.forEach(slug => {
|
|
51
|
+
* // slug is the correct type ('undo' | 'redo'), unlike what Object.values gives
|
|
52
|
+
* })
|
|
53
|
+
*
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* Additionally, explicit type arguments can be provided, ensuring that an interface is implemented, or that all keys
|
|
57
|
+
* in a union type are implemented.
|
|
58
|
+
*
|
|
59
|
+
* For example:
|
|
60
|
+
*
|
|
61
|
+
* ```
|
|
62
|
+
* type ItemSlug = 'undo' | 'redo'
|
|
63
|
+
*
|
|
64
|
+
* interface ActionItem {
|
|
65
|
+
* label: string
|
|
66
|
+
* description: string
|
|
67
|
+
* performAction: () => void
|
|
68
|
+
* }
|
|
69
|
+
*
|
|
70
|
+
* typedKeyDict<ItemSlug, ActionItem, 'slug'>(
|
|
71
|
+
* {
|
|
72
|
+
* undo: {
|
|
73
|
+
* label: 'Undo',
|
|
74
|
+
* description: 'Undo the last action',
|
|
75
|
+
* performAction: () => {
|
|
76
|
+
* // Do work
|
|
77
|
+
* },
|
|
78
|
+
* },
|
|
79
|
+
* },
|
|
80
|
+
* 'key'
|
|
81
|
+
* )
|
|
82
|
+
* ```
|
|
83
|
+
*
|
|
84
|
+
* Will not compile, because `redo` is not specified in the map, but is defined as a valid value for `ItemSlug`.
|
|
85
|
+
* This can be very helpful if `ItemSlug` is defined in another file. Adding an additional key to it will force
|
|
86
|
+
* you to fix anywhere it is used in this way.
|
|
87
|
+
*
|
|
88
|
+
* @param dict The input dictionary
|
|
89
|
+
* @param keyProp The name of the property to add to the resulting objects containing the key for each value. Defaults to 'key'
|
|
90
|
+
*/
|
|
91
|
+
export declare function typedKeyDict<TKey extends string, TValue extends object, TKeyProp extends string = 'key'>(dict: {
|
|
92
|
+
[key in TKey]: Omit<TValue, TKeyProp>;
|
|
93
|
+
}, keyProp?: TKeyProp): {
|
|
94
|
+
byKey: Record<TKey, TValue & Record<TKeyProp, TKey>>;
|
|
95
|
+
keys: Array<TKey>;
|
|
96
|
+
values: Array<TValue & Record<TKeyProp, TKey>>;
|
|
97
|
+
TKey: TKey;
|
|
98
|
+
TValue: TValue & Record<TKeyProp, TKey>;
|
|
99
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Used to ensure in a type safe way that some variable cannot ever be in a particular state.
|
|
3
|
+
* Useful for exhaustive switch statements, where the compiler will ensure all possible cases are covered.
|
|
4
|
+
*
|
|
5
|
+
* For example:
|
|
6
|
+
*
|
|
7
|
+
* ```
|
|
8
|
+
* const someValue: 'a' | 'b' = ...
|
|
9
|
+
*
|
|
10
|
+
* switch (someValue) {
|
|
11
|
+
* case 'a': return whatever();
|
|
12
|
+
* case 'b': return whatever();
|
|
13
|
+
*
|
|
14
|
+
* // If all possible values of someValue aren't handled above, this will fail to compile
|
|
15
|
+
* default: assertNever(someValue);
|
|
16
|
+
* }
|
|
17
|
+
*
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* Inspired by https://stackoverflow.com/questions/39419170/how-do-i-check-that-a-switch-block-is-exhaustive-in-typescript
|
|
21
|
+
*
|
|
22
|
+
* @param input
|
|
23
|
+
*/
|
|
24
|
+
export declare function assertNever(input: never): never;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export default class EncryptedStorage {
|
|
2
|
+
passphrase: import("crypto-es/lib/core").WordArray;
|
|
3
|
+
constructor(passphrase: string);
|
|
4
|
+
setItem(key: string, content: string): void | null;
|
|
5
|
+
getItem(key: string): any;
|
|
6
|
+
key(index: number): string | null;
|
|
7
|
+
removeItem(key: string): void | null;
|
|
8
|
+
errorHandlerWrapper: <T>(callback: () => T) => T | null;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function guessCanvasFileIdFromUrl(inputUrlStr: string, restrictToOrigin?: string | null): string | null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const FS_ELEMENT: string;
|
|
2
|
+
export declare const FS_REQUEST: string;
|
|
3
|
+
export declare const FS_EXIT: string;
|
|
4
|
+
export declare const FS_CHANGEEVENT: string;
|
|
5
|
+
export declare const FS_ENABLED: string;
|
|
6
|
+
export declare const instuiPopupMountNodeFn: () => HTMLElement | null | undefined;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* All inst-ui icons as an array.
|
|
3
|
+
*
|
|
4
|
+
* Note that this does require including these all in the built modules, but it appears that they were already
|
|
5
|
+
* present, as testing with and without this didn't yield much difference in module size.
|
|
6
|
+
*/
|
|
7
|
+
export declare const instUiIconsArray: Array<InstUiIcon>;
|
|
8
|
+
/**
|
|
9
|
+
* Type for inst ui icons
|
|
10
|
+
*/
|
|
11
|
+
export interface InstUiIcon {
|
|
12
|
+
variant: 'Line' | 'Solid';
|
|
13
|
+
glyphName: string;
|
|
14
|
+
/**
|
|
15
|
+
* SVG code for the icon
|
|
16
|
+
*/
|
|
17
|
+
src: string;
|
|
18
|
+
deprecated: boolean;
|
|
19
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Editor } from 'tinymce';
|
|
2
|
+
/**
|
|
3
|
+
* Determines what type of placeholder is appropriate for a given file information.
|
|
4
|
+
*/
|
|
5
|
+
export declare function placeholderInfoFor(fileMetaProps: PlaceHoldableThingInfo): Promise<PlaceholderInfo>;
|
|
6
|
+
export declare function removePlaceholder(editor: Editor, unencodedName: string): void;
|
|
7
|
+
/**
|
|
8
|
+
* Inserts a placeholder into a TinyMCE editor. It should be removed by calling removePlaceholder, to ensure
|
|
9
|
+
* image resources are cleaned up.
|
|
10
|
+
*/
|
|
11
|
+
export declare function insertPlaceholder(editor: Editor, unencodedName: string | undefined, placeholderInfoPromise: Promise<PlaceholderInfo>): Promise<HTMLElement>;
|
|
12
|
+
/**
|
|
13
|
+
* Something for which a placeholder can be added to the editor.
|
|
14
|
+
*/
|
|
15
|
+
export interface PlaceHoldableThingInfo {
|
|
16
|
+
name?: string;
|
|
17
|
+
type?: string;
|
|
18
|
+
title?: string;
|
|
19
|
+
contentType?: string;
|
|
20
|
+
displayAs?: 'link' | string;
|
|
21
|
+
domObject: File | Blob | {
|
|
22
|
+
preview?: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Style of placeholder to be inserted into the editor.
|
|
27
|
+
*/
|
|
28
|
+
export type PlaceholderInfo = {
|
|
29
|
+
visibleLabel: string;
|
|
30
|
+
ariaLabel: string;
|
|
31
|
+
} & ({
|
|
32
|
+
type: 'inline';
|
|
33
|
+
} | {
|
|
34
|
+
type: 'block';
|
|
35
|
+
backgroundImageUrl?: string;
|
|
36
|
+
width: string;
|
|
37
|
+
height: string;
|
|
38
|
+
vAlign: string;
|
|
39
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds a simple cache using a map and a compute function.
|
|
3
|
+
*
|
|
4
|
+
* @param compute The function to compute values in the cache
|
|
5
|
+
* @param cache The map to use as a cache
|
|
6
|
+
*/
|
|
7
|
+
export declare function simpleCache<K, V>(compute: (value: K) => V, cache?: Map<K, V>): SimpleCache<K, V>;
|
|
8
|
+
export interface SimpleCache<K, V> {
|
|
9
|
+
cache: Map<K, V>;
|
|
10
|
+
get(key: K): V;
|
|
11
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns null if the string is null, undefined, or has length === 0
|
|
3
|
+
*
|
|
4
|
+
* @param str
|
|
5
|
+
*/
|
|
6
|
+
export declare function emptyAsNull(str: string | null | undefined): string | null;
|
|
7
|
+
/**
|
|
8
|
+
* Returns null if the string is null, undefined, is empty, or contains only whitespace.
|
|
9
|
+
*
|
|
10
|
+
* Otherwise returns the string with leading and trailing whitespace removed.
|
|
11
|
+
*
|
|
12
|
+
* Useful for providing a default value for a string input:
|
|
13
|
+
*
|
|
14
|
+
* ```
|
|
15
|
+
* label.innerText = trimmedOrNull(input.value) ?? 'Default value'
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @param str
|
|
19
|
+
*/
|
|
20
|
+
export declare function trimmedOrNull(str: string | null | undefined): string | null;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a subset of the editing actions that can be taken on a <textarea> using the text-field-edit library.
|
|
3
|
+
*
|
|
4
|
+
* This is used to allow decoupling logic that requires textarea editing from the actual commands, because it's tricky
|
|
5
|
+
* to test code that uses the 'text-field-edit' library directly, since it relies on document.execCommand().
|
|
6
|
+
*
|
|
7
|
+
* For production code, actions can be executed on a <textarea> using performTextEditActionOnTextarea
|
|
8
|
+
* For testing, actions can be executed on a string using performTextEditActionsOnString
|
|
9
|
+
*/
|
|
10
|
+
export type TextEditAction = {
|
|
11
|
+
action: 'insert';
|
|
12
|
+
text: string;
|
|
13
|
+
} | {
|
|
14
|
+
action: 'wrapSelection';
|
|
15
|
+
before: string | null | undefined;
|
|
16
|
+
after: string | null | undefined;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Executes the given text edit actions on a <textarea>
|
|
20
|
+
*/
|
|
21
|
+
export declare function performTextEditActionOnTextarea(textarea: HTMLTextAreaElement, editAction: TextEditAction): void;
|
|
22
|
+
/**
|
|
23
|
+
* Executes the given text edit actions on an object representing the important state of textarea editing,
|
|
24
|
+
* the current text, selection start, and selection end.
|
|
25
|
+
*/
|
|
26
|
+
export declare function performTextEditActionsOnString(args: {
|
|
27
|
+
text: string;
|
|
28
|
+
selStart: number;
|
|
29
|
+
selEnd: number;
|
|
30
|
+
actions: TextEditAction[];
|
|
31
|
+
}): {
|
|
32
|
+
text: string;
|
|
33
|
+
selStart: number;
|
|
34
|
+
selEnd: number;
|
|
35
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Editor } from 'tinymce';
|
|
2
|
+
/**
|
|
3
|
+
* Returns a helper for updating the icon of a toolbar button in a TinyMCE editor, necessary since there isn't a
|
|
4
|
+
* built-in API for doing this, and RCE UX calls for toolbar buttons to be updated to match the user's selection
|
|
5
|
+
* in the editor.
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE:
|
|
9
|
+
* This function returns a helper that can later be used to actually update the icon. This is done so that
|
|
10
|
+
* `toolbarIconHelperFor` can be called in the `onSetup` method of a button, such that any errors in finding the
|
|
11
|
+
* icon in the toolbar will occur at RCE setup time, and not later, when user action occurs, thus increasing the
|
|
12
|
+
* likelihood that those errors will be caught in tests, rather than being thrown at runtime as a result of user action
|
|
13
|
+
*/
|
|
14
|
+
export declare function toolbarIconHelperFor(editor: Editor, ariaLabel: string): {
|
|
15
|
+
updateIcon(iconName: string): void;
|
|
16
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Attempts to build a URL from the given string, and returns null if it is not a valid URL, rather than
|
|
3
|
+
* throwing an exception, as the URL constructor does.
|
|
4
|
+
*/
|
|
5
|
+
export declare function parseUrlOrNull(url: string | null | undefined, base?: string | URL): URL | null;
|
|
6
|
+
export declare function relativizeUrl(url: string): string;
|
|
7
|
+
export declare function parseUrlPath(url: string): string | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Converts the given URL into a relative URL if it meets the following criteria:
|
|
10
|
+
* - is parsable by the browser URL class
|
|
11
|
+
* - has the HTTP or HTTPS protocol
|
|
12
|
+
* - has the same hostname as the given origin
|
|
13
|
+
*
|
|
14
|
+
* Note: This will relativize URLs where the ports don't match. This is intentional, as ports really shouldn't
|
|
15
|
+
* matter for RCE HTTP content, and it can solve issues where an extraneous port is added (e.g. :80 on an http url)
|
|
16
|
+
* or when running locally and the port is different. There isn't a security issue because the user could just manually
|
|
17
|
+
* put in the transformed content anyways.
|
|
18
|
+
*
|
|
19
|
+
* @param inputUrlStr URL to relativize
|
|
20
|
+
* @param origin Origin to check for
|
|
21
|
+
*/
|
|
22
|
+
export declare function relativeHttpUrlForHostname<TInput extends string | null | undefined>(inputUrlStr: TInput, origin: string): TInput;
|
|
23
|
+
/**
|
|
24
|
+
* Adds a record of query parameters to a URL. null or undefined values in the record are ignored.
|
|
25
|
+
*
|
|
26
|
+
* - Relative URLs are supported.
|
|
27
|
+
* - Non-parsable URLs will return null.
|
|
28
|
+
*
|
|
29
|
+
* @param inputUrlStr The URL string to parse
|
|
30
|
+
* @param queryParams A record containing the query parameters to add
|
|
31
|
+
*/
|
|
32
|
+
export declare function addQueryParamsToUrl(inputUrlStr: string | null | undefined, queryParams: Record<string, string | null | undefined>): string | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/canvas-rce",
|
|
3
|
-
"version": "5.15.
|
|
3
|
+
"version": "5.15.5",
|
|
4
4
|
"description": "A component wrapping Canvas's usage of Tinymce",
|
|
5
5
|
"main": "es/index.js",
|
|
6
6
|
"types": "es/index.d.ts",
|
|
@@ -31,13 +31,12 @@
|
|
|
31
31
|
"installTranslations": "scripts/installTranslations.js",
|
|
32
32
|
"commitTranslations": "scripts/commitTranslations.sh",
|
|
33
33
|
"build": "scripts/build-canvas",
|
|
34
|
-
"build:all": "scripts/build.js",
|
|
35
34
|
"build:es": "babel --out-dir es src --ignore '**/__tests__,**/__mocks__' --extensions '.ts,.tsx,.js,.jsx'",
|
|
36
35
|
"build:types": "tsc",
|
|
37
36
|
"build:canvas": "yarn run build",
|
|
38
37
|
"build:watch": "yarn clean:es && yarn build:es --watch",
|
|
39
38
|
"build:cafe": "wp --config webpack.testcafe.config.js",
|
|
40
|
-
"prepublishOnly": "yarn build
|
|
39
|
+
"prepublishOnly": "yarn build && yarn test",
|
|
41
40
|
"fmt:check": "biome check",
|
|
42
41
|
"fmt:fix": "biome format --write",
|
|
43
42
|
"clean": "rm -rf lib && yarn clean:es && rm -rf coverage && yarn demo:clean",
|