@atlaskit/editor-plugin-media 0.2.0 → 0.3.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 +10 -0
- package/dist/cjs/commands/captions.js +59 -0
- package/dist/cjs/commands/helpers.js +127 -0
- package/dist/cjs/commands/index.js +24 -0
- package/dist/cjs/commands/linking.js +181 -0
- package/dist/cjs/index.js +8 -1
- package/dist/cjs/media-plugin-options.js +5 -0
- package/dist/cjs/next-plugin-type.js +5 -0
- package/dist/cjs/nodeviews/mediaGroup.js +376 -0
- package/dist/cjs/nodeviews/mediaInline.js +288 -0
- package/dist/cjs/nodeviews/mediaNodeUpdater.js +739 -0
- package/dist/cjs/nodeviews/mediaNodeView/index.js +177 -0
- package/dist/cjs/nodeviews/mediaNodeView/media.js +242 -0
- package/dist/cjs/nodeviews/mediaSingle.js +629 -0
- package/dist/cjs/nodeviews/messages.js +14 -0
- package/dist/cjs/nodeviews/styles.js +46 -0
- package/dist/cjs/nodeviews/types.js +5 -0
- package/dist/cjs/picker-facade.js +192 -0
- package/dist/cjs/plugin.js +293 -0
- package/dist/cjs/pm-plugins/alt-text/actions.js +5 -0
- package/dist/cjs/pm-plugins/alt-text/commands.js +59 -0
- package/dist/cjs/pm-plugins/alt-text/index.js +36 -0
- package/dist/cjs/pm-plugins/alt-text/keymap.js +15 -0
- package/dist/cjs/pm-plugins/alt-text/messages.js +44 -0
- package/dist/cjs/pm-plugins/alt-text/reducer.js +32 -0
- package/dist/cjs/pm-plugins/alt-text/types.js +5 -0
- package/dist/cjs/pm-plugins/alt-text/ui/AltTextEdit.js +209 -0
- package/dist/cjs/pm-plugins/keymap-media-single.js +163 -0
- package/dist/cjs/pm-plugins/keymap.js +88 -0
- package/dist/cjs/pm-plugins/linking/actions.js +13 -0
- package/dist/cjs/pm-plugins/linking/index.js +65 -0
- package/dist/cjs/pm-plugins/linking/keymap.js +14 -0
- package/dist/cjs/pm-plugins/linking/reducer.js +43 -0
- package/dist/cjs/pm-plugins/linking/types.js +5 -0
- package/dist/cjs/pm-plugins/main.js +813 -0
- package/dist/cjs/pm-plugins/media-editor-plugin-factory.js +8 -0
- package/dist/cjs/pm-plugins/mediaTaskManager.js +101 -0
- package/dist/cjs/pm-plugins/plugin-key.js +8 -0
- package/dist/cjs/pm-plugins/types.js +5 -0
- package/dist/cjs/toolbar/alt-text.js +80 -0
- package/dist/cjs/toolbar/commands.js +236 -0
- package/dist/cjs/toolbar/filePreviewItem.js +66 -0
- package/dist/cjs/toolbar/imageBorder.js +20 -0
- package/dist/cjs/toolbar/index.js +523 -0
- package/dist/cjs/toolbar/linking-toolbar-appearance.js +100 -0
- package/dist/cjs/toolbar/linking.js +96 -0
- package/dist/cjs/toolbar/utils.js +110 -0
- package/dist/cjs/ui/CaptionPlaceholder/index.js +27 -0
- package/dist/cjs/ui/CaptionPlaceholder/messages.js +14 -0
- package/dist/cjs/ui/ImageBorder/index.js +226 -0
- package/dist/cjs/ui/ImageBorder/messages.js +49 -0
- package/dist/cjs/ui/ImageBorder/styles.js +52 -0
- package/dist/cjs/ui/Media/DropPlaceholder.js +38 -0
- package/dist/cjs/ui/Media/drop-placeholder-messages.js +14 -0
- package/dist/cjs/ui/MediaLinkingToolbar.js +196 -0
- package/dist/cjs/ui/MediaPicker/BrowserWrapper.js +40 -0
- package/dist/cjs/ui/MediaPicker/ClipboardWrapper.js +39 -0
- package/dist/cjs/ui/MediaPicker/DropzoneWrapper.js +51 -0
- package/dist/cjs/ui/MediaPicker/PickerFacadeProvider.js +151 -0
- package/dist/cjs/ui/MediaPicker/index.js +103 -0
- package/dist/cjs/ui/PixelEntry/constants.js +7 -0
- package/dist/cjs/ui/PixelEntry/index.js +185 -0
- package/dist/cjs/ui/PixelEntry/messages.js +54 -0
- package/dist/cjs/ui/PixelEntry/styles.js +19 -0
- package/dist/cjs/ui/PixelEntry/types.js +5 -0
- package/dist/cjs/ui/ResizableMediaSingle/ResizableMediaMigrationNotification.js +16 -0
- package/dist/cjs/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +541 -0
- package/dist/cjs/ui/ResizableMediaSingle/index.js +422 -0
- package/dist/cjs/ui/ResizableMediaSingle/styled.js +14 -0
- package/dist/cjs/ui/ResizableMediaSingle/styles.js +17 -0
- package/dist/cjs/ui/ResizableMediaSingle/types.js +5 -0
- package/dist/cjs/ui/ToolbarMedia/index.js +42 -0
- package/dist/cjs/ui/ToolbarMedia/toolbar-media-messages.js +14 -0
- package/dist/cjs/ui/media-linking-toolbar-messages.js +14 -0
- package/dist/cjs/utils/analytics.js +53 -0
- package/dist/cjs/utils/check-media-type.js +56 -0
- package/dist/cjs/utils/current-media-node.js +41 -0
- package/dist/cjs/utils/is-image.js +9 -0
- package/dist/cjs/utils/media-common.js +181 -0
- package/dist/cjs/utils/media-files.js +297 -0
- package/dist/cjs/utils/media-single.js +181 -0
- package/dist/es2019/commands/captions.js +47 -0
- package/dist/es2019/commands/helpers.js +113 -0
- package/dist/es2019/commands/index.js +1 -0
- package/dist/es2019/commands/linking.js +169 -0
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/media-plugin-options.js +1 -0
- package/dist/es2019/next-plugin-type.js +1 -0
- package/dist/es2019/nodeviews/mediaGroup.js +314 -0
- package/dist/es2019/nodeviews/mediaInline.js +201 -0
- package/dist/es2019/nodeviews/mediaNodeUpdater.js +384 -0
- package/dist/es2019/nodeviews/mediaNodeView/index.js +149 -0
- package/dist/es2019/nodeviews/mediaNodeView/media.js +182 -0
- package/dist/es2019/nodeviews/mediaSingle.js +511 -0
- package/dist/es2019/nodeviews/messages.js +8 -0
- package/dist/es2019/nodeviews/styles.js +46 -0
- package/dist/es2019/nodeviews/types.js +1 -0
- package/dist/es2019/picker-facade.js +146 -0
- package/dist/es2019/plugin.js +284 -0
- package/dist/es2019/pm-plugins/alt-text/actions.js +1 -0
- package/dist/es2019/pm-plugins/alt-text/commands.js +42 -0
- package/dist/es2019/pm-plugins/alt-text/index.js +33 -0
- package/dist/es2019/pm-plugins/alt-text/keymap.js +9 -0
- package/dist/es2019/pm-plugins/alt-text/messages.js +38 -0
- package/dist/es2019/pm-plugins/alt-text/reducer.js +26 -0
- package/dist/es2019/pm-plugins/alt-text/types.js +1 -0
- package/dist/es2019/pm-plugins/alt-text/ui/AltTextEdit.js +228 -0
- package/dist/es2019/pm-plugins/keymap-media-single.js +172 -0
- package/dist/es2019/pm-plugins/keymap.js +84 -0
- package/dist/es2019/pm-plugins/linking/actions.js +7 -0
- package/dist/es2019/pm-plugins/linking/index.js +56 -0
- package/dist/es2019/pm-plugins/linking/keymap.js +8 -0
- package/dist/es2019/pm-plugins/linking/reducer.js +37 -0
- package/dist/es2019/pm-plugins/linking/types.js +1 -0
- package/dist/es2019/pm-plugins/main.js +695 -0
- package/dist/es2019/pm-plugins/media-editor-plugin-factory.js +2 -0
- package/dist/es2019/pm-plugins/mediaTaskManager.js +64 -0
- package/dist/es2019/pm-plugins/plugin-key.js +2 -0
- package/dist/es2019/pm-plugins/types.js +1 -0
- package/dist/es2019/toolbar/alt-text.js +72 -0
- package/dist/es2019/toolbar/commands.js +212 -0
- package/dist/es2019/toolbar/filePreviewItem.js +54 -0
- package/dist/es2019/toolbar/imageBorder.js +15 -0
- package/dist/es2019/toolbar/index.js +538 -0
- package/dist/es2019/toolbar/linking-toolbar-appearance.js +90 -0
- package/dist/es2019/toolbar/linking.js +98 -0
- package/dist/es2019/toolbar/utils.js +86 -0
- package/dist/es2019/ui/CaptionPlaceholder/index.js +25 -0
- package/dist/es2019/ui/CaptionPlaceholder/messages.js +8 -0
- package/dist/es2019/ui/ImageBorder/index.js +213 -0
- package/dist/es2019/ui/ImageBorder/messages.js +43 -0
- package/dist/es2019/ui/ImageBorder/styles.js +126 -0
- package/dist/es2019/ui/Media/DropPlaceholder.js +47 -0
- package/dist/es2019/ui/Media/drop-placeholder-messages.js +8 -0
- package/dist/es2019/ui/MediaLinkingToolbar.js +190 -0
- package/dist/es2019/ui/MediaPicker/BrowserWrapper.js +31 -0
- package/dist/es2019/ui/MediaPicker/ClipboardWrapper.js +32 -0
- package/dist/es2019/ui/MediaPicker/DropzoneWrapper.js +42 -0
- package/dist/es2019/ui/MediaPicker/PickerFacadeProvider.js +85 -0
- package/dist/es2019/ui/MediaPicker/index.js +82 -0
- package/dist/es2019/ui/PixelEntry/constants.js +1 -0
- package/dist/es2019/ui/PixelEntry/index.js +170 -0
- package/dist/es2019/ui/PixelEntry/messages.js +48 -0
- package/dist/es2019/ui/PixelEntry/styles.js +51 -0
- package/dist/es2019/ui/PixelEntry/types.js +1 -0
- package/dist/es2019/ui/ResizableMediaSingle/ResizableMediaMigrationNotification.js +9 -0
- package/dist/es2019/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +454 -0
- package/dist/es2019/ui/ResizableMediaSingle/index.js +344 -0
- package/dist/es2019/ui/ResizableMediaSingle/styled.js +9 -0
- package/dist/es2019/ui/ResizableMediaSingle/styles.js +14 -0
- package/dist/es2019/ui/ResizableMediaSingle/types.js +1 -0
- package/dist/es2019/ui/ToolbarMedia/index.js +37 -0
- package/dist/es2019/ui/ToolbarMedia/toolbar-media-messages.js +8 -0
- package/dist/es2019/ui/media-linking-toolbar-messages.js +8 -0
- package/dist/es2019/utils/analytics.js +51 -0
- package/dist/es2019/utils/check-media-type.js +19 -0
- package/dist/es2019/utils/current-media-node.js +35 -0
- package/dist/es2019/utils/is-image.js +3 -0
- package/dist/es2019/utils/media-common.js +189 -0
- package/dist/es2019/utils/media-files.js +321 -0
- package/dist/es2019/utils/media-single.js +176 -0
- package/dist/esm/commands/captions.js +53 -0
- package/dist/esm/commands/helpers.js +120 -0
- package/dist/esm/commands/index.js +1 -0
- package/dist/esm/commands/linking.js +174 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/media-plugin-options.js +1 -0
- package/dist/esm/next-plugin-type.js +1 -0
- package/dist/esm/nodeviews/mediaGroup.js +369 -0
- package/dist/esm/nodeviews/mediaInline.js +278 -0
- package/dist/esm/nodeviews/mediaNodeUpdater.js +732 -0
- package/dist/esm/nodeviews/mediaNodeView/index.js +170 -0
- package/dist/esm/nodeviews/mediaNodeView/media.js +233 -0
- package/dist/esm/nodeviews/mediaSingle.js +622 -0
- package/dist/esm/nodeviews/messages.js +8 -0
- package/dist/esm/nodeviews/styles.js +39 -0
- package/dist/esm/nodeviews/types.js +1 -0
- package/dist/esm/picker-facade.js +186 -0
- package/dist/esm/plugin.js +282 -0
- package/dist/esm/pm-plugins/alt-text/actions.js +1 -0
- package/dist/esm/pm-plugins/alt-text/commands.js +52 -0
- package/dist/esm/pm-plugins/alt-text/index.js +31 -0
- package/dist/esm/pm-plugins/alt-text/keymap.js +9 -0
- package/dist/esm/pm-plugins/alt-text/messages.js +38 -0
- package/dist/esm/pm-plugins/alt-text/reducer.js +25 -0
- package/dist/esm/pm-plugins/alt-text/types.js +1 -0
- package/dist/esm/pm-plugins/alt-text/ui/AltTextEdit.js +206 -0
- package/dist/esm/pm-plugins/keymap-media-single.js +158 -0
- package/dist/esm/pm-plugins/keymap.js +81 -0
- package/dist/esm/pm-plugins/linking/actions.js +7 -0
- package/dist/esm/pm-plugins/linking/index.js +59 -0
- package/dist/esm/pm-plugins/linking/keymap.js +8 -0
- package/dist/esm/pm-plugins/linking/reducer.js +36 -0
- package/dist/esm/pm-plugins/linking/types.js +1 -0
- package/dist/esm/pm-plugins/main.js +798 -0
- package/dist/esm/pm-plugins/media-editor-plugin-factory.js +2 -0
- package/dist/esm/pm-plugins/mediaTaskManager.js +94 -0
- package/dist/esm/pm-plugins/plugin-key.js +2 -0
- package/dist/esm/pm-plugins/types.js +1 -0
- package/dist/esm/toolbar/alt-text.js +70 -0
- package/dist/esm/toolbar/commands.js +229 -0
- package/dist/esm/toolbar/filePreviewItem.js +56 -0
- package/dist/esm/toolbar/imageBorder.js +14 -0
- package/dist/esm/toolbar/index.js +513 -0
- package/dist/esm/toolbar/linking-toolbar-appearance.js +91 -0
- package/dist/esm/toolbar/linking.js +88 -0
- package/dist/esm/toolbar/utils.js +103 -0
- package/dist/esm/ui/CaptionPlaceholder/index.js +20 -0
- package/dist/esm/ui/CaptionPlaceholder/messages.js +8 -0
- package/dist/esm/ui/ImageBorder/index.js +218 -0
- package/dist/esm/ui/ImageBorder/messages.js +43 -0
- package/dist/esm/ui/ImageBorder/styles.js +42 -0
- package/dist/esm/ui/Media/DropPlaceholder.js +31 -0
- package/dist/esm/ui/Media/drop-placeholder-messages.js +8 -0
- package/dist/esm/ui/MediaLinkingToolbar.js +188 -0
- package/dist/esm/ui/MediaPicker/BrowserWrapper.js +33 -0
- package/dist/esm/ui/MediaPicker/ClipboardWrapper.js +32 -0
- package/dist/esm/ui/MediaPicker/DropzoneWrapper.js +44 -0
- package/dist/esm/ui/MediaPicker/PickerFacadeProvider.js +145 -0
- package/dist/esm/ui/MediaPicker/index.js +96 -0
- package/dist/esm/ui/PixelEntry/constants.js +1 -0
- package/dist/esm/ui/PixelEntry/index.js +174 -0
- package/dist/esm/ui/PixelEntry/messages.js +48 -0
- package/dist/esm/ui/PixelEntry/styles.js +12 -0
- package/dist/esm/ui/PixelEntry/types.js +1 -0
- package/dist/esm/ui/ResizableMediaSingle/ResizableMediaMigrationNotification.js +9 -0
- package/dist/esm/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +535 -0
- package/dist/esm/ui/ResizableMediaSingle/index.js +417 -0
- package/dist/esm/ui/ResizableMediaSingle/styled.js +7 -0
- package/dist/esm/ui/ResizableMediaSingle/styles.js +7 -0
- package/dist/esm/ui/ResizableMediaSingle/types.js +1 -0
- package/dist/esm/ui/ToolbarMedia/index.js +35 -0
- package/dist/esm/ui/ToolbarMedia/toolbar-media-messages.js +8 -0
- package/dist/esm/ui/media-linking-toolbar-messages.js +8 -0
- package/dist/esm/utils/analytics.js +47 -0
- package/dist/esm/utils/check-media-type.js +49 -0
- package/dist/esm/utils/current-media-node.js +35 -0
- package/dist/esm/utils/is-image.js +3 -0
- package/dist/esm/utils/media-common.js +175 -0
- package/dist/esm/utils/media-files.js +291 -0
- package/dist/esm/utils/media-single.js +172 -0
- package/dist/types/commands/captions.d.ts +5 -0
- package/dist/types/commands/helpers.d.ts +15 -0
- package/dist/types/commands/index.d.ts +1 -0
- package/dist/types/commands/linking.d.ts +9 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/media-plugin-options.d.ts +17 -0
- package/dist/types/next-plugin-type.d.ts +31 -0
- package/dist/types/nodeviews/__mocks__/mediaNodeUpdater.d.ts +24 -0
- package/dist/types/nodeviews/mediaGroup.d.ts +33 -0
- package/dist/types/nodeviews/mediaInline.d.ts +50 -0
- package/dist/types/nodeviews/mediaNodeUpdater.d.ts +45 -0
- package/dist/types/nodeviews/mediaNodeView/index.d.ts +28 -0
- package/dist/types/nodeviews/mediaNodeView/media.d.ts +44 -0
- package/dist/types/nodeviews/mediaSingle.d.ts +62 -0
- package/dist/types/nodeviews/messages.d.ts +7 -0
- package/dist/types/nodeviews/styles.d.ts +16 -0
- package/dist/types/nodeviews/types.d.ts +42 -0
- package/dist/types/picker-facade.d.ts +44 -0
- package/dist/types/plugin.d.ts +7 -0
- package/dist/types/pm-plugins/alt-text/actions.d.ts +10 -0
- package/dist/types/pm-plugins/alt-text/commands.d.ts +4 -0
- package/dist/types/pm-plugins/alt-text/index.d.ts +7 -0
- package/dist/types/pm-plugins/alt-text/keymap.d.ts +4 -0
- package/dist/types/pm-plugins/alt-text/messages.d.ts +37 -0
- package/dist/types/pm-plugins/alt-text/reducer.d.ts +4 -0
- package/dist/types/pm-plugins/alt-text/types.d.ts +3 -0
- package/dist/types/pm-plugins/alt-text/ui/AltTextEdit.d.ts +41 -0
- package/dist/types/pm-plugins/keymap-media-single.d.ts +3 -0
- package/dist/types/pm-plugins/keymap.d.ts +5 -0
- package/dist/types/pm-plugins/linking/actions.d.ts +20 -0
- package/dist/types/pm-plugins/linking/index.d.ts +10 -0
- package/dist/types/pm-plugins/linking/keymap.d.ts +3 -0
- package/dist/types/pm-plugins/linking/reducer.d.ts +4 -0
- package/dist/types/pm-plugins/linking/types.d.ts +12 -0
- package/dist/types/pm-plugins/main.d.ts +120 -0
- package/dist/types/pm-plugins/media-editor-plugin-factory.d.ts +3 -0
- package/dist/types/pm-plugins/mediaTaskManager.d.ts +9 -0
- package/dist/types/pm-plugins/plugin-key.d.ts +3 -0
- package/dist/types/pm-plugins/types.d.ts +65 -0
- package/dist/types/toolbar/alt-text.d.ts +13 -0
- package/dist/types/toolbar/commands.d.ts +12 -0
- package/dist/types/toolbar/filePreviewItem.d.ts +9 -0
- package/dist/types/toolbar/imageBorder.d.ts +2 -0
- package/dist/types/toolbar/index.d.ts +6 -0
- package/dist/types/toolbar/linking-toolbar-appearance.d.ts +14 -0
- package/dist/types/toolbar/linking.d.ts +10 -0
- package/dist/types/toolbar/utils.d.ts +11 -0
- package/dist/types/types.d.ts +2 -1
- package/dist/types/ui/CaptionPlaceholder/index.d.ts +6 -0
- package/dist/types/ui/CaptionPlaceholder/messages.d.ts +7 -0
- package/dist/types/ui/ImageBorder/index.d.ts +11 -0
- package/dist/types/ui/ImageBorder/messages.d.ts +42 -0
- package/dist/types/ui/ImageBorder/styles.d.ts +15 -0
- package/dist/types/ui/Media/DropPlaceholder.d.ts +8 -0
- package/dist/types/ui/Media/drop-placeholder-messages.d.ts +7 -0
- package/dist/types/ui/MediaLinkingToolbar.d.ts +35 -0
- package/dist/types/ui/MediaPicker/BrowserWrapper.d.ts +11 -0
- package/dist/types/ui/MediaPicker/ClipboardWrapper.d.ts +10 -0
- package/dist/types/ui/MediaPicker/DropzoneWrapper.d.ts +13 -0
- package/dist/types/ui/MediaPicker/PickerFacadeProvider.d.ts +28 -0
- package/dist/types/ui/MediaPicker/index.d.ts +23 -0
- package/dist/types/ui/PixelEntry/constants.d.ts +1 -0
- package/dist/types/ui/PixelEntry/index.d.ts +8 -0
- package/dist/types/ui/PixelEntry/messages.d.ts +47 -0
- package/dist/types/ui/PixelEntry/styles.d.ts +8 -0
- package/dist/types/ui/PixelEntry/types.d.ts +58 -0
- package/dist/types/ui/ResizableMediaSingle/ResizableMediaMigrationNotification.d.ts +3 -0
- package/dist/types/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +59 -0
- package/dist/types/ui/ResizableMediaSingle/index.d.ts +45 -0
- package/dist/types/ui/ResizableMediaSingle/styled.d.ts +2 -0
- package/dist/types/ui/ResizableMediaSingle/styles.d.ts +1 -0
- package/dist/types/ui/ResizableMediaSingle/types.d.ts +27 -0
- package/dist/types/ui/ToolbarMedia/index.d.ts +13 -0
- package/dist/types/ui/ToolbarMedia/toolbar-media-messages.d.ts +7 -0
- package/dist/types/ui/media-linking-toolbar-messages.d.ts +7 -0
- package/dist/types/utils/analytics.d.ts +3 -0
- package/dist/types/utils/check-media-type.d.ts +4 -0
- package/dist/types/utils/current-media-node.d.ts +9 -0
- package/dist/types/utils/is-image.d.ts +1 -0
- package/dist/types/utils/media-common.d.ts +20 -0
- package/dist/types/utils/media-files.d.ts +30 -0
- package/dist/types/utils/media-single.d.ts +20 -0
- package/dist/types-ts4.5/commands/captions.d.ts +5 -0
- package/dist/types-ts4.5/commands/helpers.d.ts +15 -0
- package/dist/types-ts4.5/commands/index.d.ts +1 -0
- package/dist/types-ts4.5/commands/linking.d.ts +9 -0
- package/dist/types-ts4.5/index.d.ts +2 -1
- package/dist/types-ts4.5/media-plugin-options.d.ts +17 -0
- package/dist/types-ts4.5/next-plugin-type.d.ts +31 -0
- package/dist/types-ts4.5/nodeviews/__mocks__/mediaNodeUpdater.d.ts +24 -0
- package/dist/types-ts4.5/nodeviews/mediaGroup.d.ts +33 -0
- package/dist/types-ts4.5/nodeviews/mediaInline.d.ts +50 -0
- package/dist/types-ts4.5/nodeviews/mediaNodeUpdater.d.ts +45 -0
- package/dist/types-ts4.5/nodeviews/mediaNodeView/index.d.ts +28 -0
- package/dist/types-ts4.5/nodeviews/mediaNodeView/media.d.ts +44 -0
- package/dist/types-ts4.5/nodeviews/mediaSingle.d.ts +62 -0
- package/dist/types-ts4.5/nodeviews/messages.d.ts +7 -0
- package/dist/types-ts4.5/nodeviews/styles.d.ts +16 -0
- package/dist/types-ts4.5/nodeviews/types.d.ts +42 -0
- package/dist/types-ts4.5/picker-facade.d.ts +44 -0
- package/dist/types-ts4.5/plugin.d.ts +7 -0
- package/dist/types-ts4.5/pm-plugins/alt-text/actions.d.ts +10 -0
- package/dist/types-ts4.5/pm-plugins/alt-text/commands.d.ts +4 -0
- package/dist/types-ts4.5/pm-plugins/alt-text/index.d.ts +7 -0
- package/dist/types-ts4.5/pm-plugins/alt-text/keymap.d.ts +4 -0
- package/dist/types-ts4.5/pm-plugins/alt-text/messages.d.ts +37 -0
- package/dist/types-ts4.5/pm-plugins/alt-text/reducer.d.ts +4 -0
- package/dist/types-ts4.5/pm-plugins/alt-text/types.d.ts +3 -0
- package/dist/types-ts4.5/pm-plugins/alt-text/ui/AltTextEdit.d.ts +41 -0
- package/dist/types-ts4.5/pm-plugins/keymap-media-single.d.ts +3 -0
- package/dist/types-ts4.5/pm-plugins/keymap.d.ts +5 -0
- package/dist/types-ts4.5/pm-plugins/linking/actions.d.ts +20 -0
- package/dist/types-ts4.5/pm-plugins/linking/index.d.ts +10 -0
- package/dist/types-ts4.5/pm-plugins/linking/keymap.d.ts +3 -0
- package/dist/types-ts4.5/pm-plugins/linking/reducer.d.ts +4 -0
- package/dist/types-ts4.5/pm-plugins/linking/types.d.ts +12 -0
- package/dist/types-ts4.5/pm-plugins/main.d.ts +120 -0
- package/dist/types-ts4.5/pm-plugins/media-editor-plugin-factory.d.ts +3 -0
- package/dist/types-ts4.5/pm-plugins/mediaTaskManager.d.ts +9 -0
- package/dist/types-ts4.5/pm-plugins/plugin-key.d.ts +3 -0
- package/dist/types-ts4.5/pm-plugins/types.d.ts +65 -0
- package/dist/types-ts4.5/toolbar/alt-text.d.ts +13 -0
- package/dist/types-ts4.5/toolbar/commands.d.ts +12 -0
- package/dist/types-ts4.5/toolbar/filePreviewItem.d.ts +9 -0
- package/dist/types-ts4.5/toolbar/imageBorder.d.ts +2 -0
- package/dist/types-ts4.5/toolbar/index.d.ts +6 -0
- package/dist/types-ts4.5/toolbar/linking-toolbar-appearance.d.ts +14 -0
- package/dist/types-ts4.5/toolbar/linking.d.ts +10 -0
- package/dist/types-ts4.5/toolbar/utils.d.ts +11 -0
- package/dist/types-ts4.5/types.d.ts +2 -1
- package/dist/types-ts4.5/ui/CaptionPlaceholder/index.d.ts +6 -0
- package/dist/types-ts4.5/ui/CaptionPlaceholder/messages.d.ts +7 -0
- package/dist/types-ts4.5/ui/ImageBorder/index.d.ts +11 -0
- package/dist/types-ts4.5/ui/ImageBorder/messages.d.ts +42 -0
- package/dist/types-ts4.5/ui/ImageBorder/styles.d.ts +15 -0
- package/dist/types-ts4.5/ui/Media/DropPlaceholder.d.ts +8 -0
- package/dist/types-ts4.5/ui/Media/drop-placeholder-messages.d.ts +7 -0
- package/dist/types-ts4.5/ui/MediaLinkingToolbar.d.ts +35 -0
- package/dist/types-ts4.5/ui/MediaPicker/BrowserWrapper.d.ts +11 -0
- package/dist/types-ts4.5/ui/MediaPicker/ClipboardWrapper.d.ts +10 -0
- package/dist/types-ts4.5/ui/MediaPicker/DropzoneWrapper.d.ts +13 -0
- package/dist/types-ts4.5/ui/MediaPicker/PickerFacadeProvider.d.ts +28 -0
- package/dist/types-ts4.5/ui/MediaPicker/index.d.ts +23 -0
- package/dist/types-ts4.5/ui/PixelEntry/constants.d.ts +1 -0
- package/dist/types-ts4.5/ui/PixelEntry/index.d.ts +8 -0
- package/dist/types-ts4.5/ui/PixelEntry/messages.d.ts +47 -0
- package/dist/types-ts4.5/ui/PixelEntry/styles.d.ts +8 -0
- package/dist/types-ts4.5/ui/PixelEntry/types.d.ts +58 -0
- package/dist/types-ts4.5/ui/ResizableMediaSingle/ResizableMediaMigrationNotification.d.ts +3 -0
- package/dist/types-ts4.5/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +59 -0
- package/dist/types-ts4.5/ui/ResizableMediaSingle/index.d.ts +45 -0
- package/dist/types-ts4.5/ui/ResizableMediaSingle/styled.d.ts +2 -0
- package/dist/types-ts4.5/ui/ResizableMediaSingle/styles.d.ts +1 -0
- package/dist/types-ts4.5/ui/ResizableMediaSingle/types.d.ts +27 -0
- package/dist/types-ts4.5/ui/ToolbarMedia/index.d.ts +13 -0
- package/dist/types-ts4.5/ui/ToolbarMedia/toolbar-media-messages.d.ts +7 -0
- package/dist/types-ts4.5/ui/media-linking-toolbar-messages.d.ts +7 -0
- package/dist/types-ts4.5/utils/analytics.d.ts +3 -0
- package/dist/types-ts4.5/utils/check-media-type.d.ts +4 -0
- package/dist/types-ts4.5/utils/current-media-node.d.ts +9 -0
- package/dist/types-ts4.5/utils/is-image.d.ts +1 -0
- package/dist/types-ts4.5/utils/media-common.d.ts +20 -0
- package/dist/types-ts4.5/utils/media-files.d.ts +30 -0
- package/dist/types-ts4.5/utils/media-single.d.ts +20 -0
- package/package.json +32 -20
- package/report.api.md +430 -0
- package/tmp/api-report-tmp.d.ts +381 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IntlShape } from 'react-intl-next';
|
|
2
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import type { Command, FloatingToolbarButton, FloatingToolbarConfig, FloatingToolbarCustom } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { ForceFocusSelector } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
5
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
6
|
+
import type { MediaToolbarBaseConfig } from '../types';
|
|
7
|
+
export declare const altTextButton: (intl: IntlShape, state: EditorState, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => FloatingToolbarButton<Command>;
|
|
8
|
+
export declare const altTextEditComponent: (options?: AltTextToolbarOptions) => FloatingToolbarCustom<Command>;
|
|
9
|
+
export interface AltTextToolbarOptions {
|
|
10
|
+
altTextValidator?: (value: string) => string[];
|
|
11
|
+
forceFocusSelector?: ForceFocusSelector;
|
|
12
|
+
}
|
|
13
|
+
export declare const getAltTextToolbar: (toolbarBaseConfig: MediaToolbarBaseConfig, options?: AltTextToolbarOptions) => FloatingToolbarConfig;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { BorderMarkAttributes, RichMediaLayout } from '@atlaskit/adf-schema';
|
|
2
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { PixelEntryValidation } from '../ui/PixelEntry/types';
|
|
5
|
+
export declare const DEFAULT_BORDER_COLOR = "#091e4224";
|
|
6
|
+
export declare const DEFAULT_BORDER_SIZE = 2;
|
|
7
|
+
export declare const changeInlineToMediaCard: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
8
|
+
export declare const changeMediaCardToInline: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
9
|
+
export declare const removeInlineCard: Command;
|
|
10
|
+
export declare const toggleBorderMark: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
11
|
+
export declare const setBorderMark: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (attrs: Partial<BorderMarkAttributes>) => Command;
|
|
12
|
+
export declare const updateMediaSingleWidth: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (width: number, validation: PixelEntryValidation, layout: RichMediaLayout) => Command;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { IntlShape } from 'react-intl-next';
|
|
3
|
+
import type { MediaPluginState } from '../pm-plugins/types';
|
|
4
|
+
interface FilePreviewProps {
|
|
5
|
+
mediaPluginState: MediaPluginState;
|
|
6
|
+
intl: IntlShape;
|
|
7
|
+
}
|
|
8
|
+
export declare const FilePreviewItem: FC<FilePreviewProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IntlShape } from 'react-intl-next';
|
|
2
|
+
import type { ExtractInjectionAPI, FloatingToolbarConfig } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
+
import type { MediaNextEditorPluginType } from '../next-plugin-type';
|
|
5
|
+
import type { MediaFloatingToolbarOptions } from '../types';
|
|
6
|
+
export declare const floatingToolbar: (state: EditorState, intl: IntlShape, options: MediaFloatingToolbarOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => FloatingToolbarConfig | undefined;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { IntlShape } from 'react-intl-next';
|
|
4
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
+
import type { MediaLinkingState } from '../pm-plugins/linking';
|
|
6
|
+
export interface LinkingToolbarProps {
|
|
7
|
+
editorState: EditorState;
|
|
8
|
+
intl: IntlShape;
|
|
9
|
+
mediaLinkingState: MediaLinkingState;
|
|
10
|
+
onAddLink: React.MouseEventHandler;
|
|
11
|
+
onEditLink: React.MouseEventHandler;
|
|
12
|
+
onOpenLink: React.MouseEventHandler;
|
|
13
|
+
}
|
|
14
|
+
export declare const LinkToolbarAppearance: React.FC<LinkingToolbarProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IntlShape } from 'react-intl-next';
|
|
2
|
+
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
+
import type { FloatingToolbarConfig } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
6
|
+
import type { MediaNextEditorPluginType } from '../next-plugin-type';
|
|
7
|
+
import type { MediaLinkingState } from '../pm-plugins/linking';
|
|
8
|
+
import type { MediaToolbarBaseConfig } from '../types';
|
|
9
|
+
export declare function shouldShowMediaLinkToolbar(editorState: EditorState): boolean;
|
|
10
|
+
export declare const getLinkingToolbar: (toolbarBaseConfig: MediaToolbarBaseConfig, mediaLinkingState: MediaLinkingState, state: EditorState, intl: IntlShape, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, providerFactory?: ProviderFactory) => FloatingToolbarConfig | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { MediaBaseAttributes, RichMediaLayout } from '@atlaskit/adf-schema';
|
|
2
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
+
import type { MediaPluginState } from '../pm-plugins/types';
|
|
5
|
+
export declare const getSelectedMediaContainerNodeAttrs: (mediaPluginState: MediaPluginState) => MediaBaseAttributes | null;
|
|
6
|
+
export declare const downloadMedia: (mediaPluginState: MediaPluginState) => Promise<boolean>;
|
|
7
|
+
export declare const removeMediaGroupNode: (state: EditorState) => import("prosemirror-state").Transaction;
|
|
8
|
+
export declare const getSelectedMediaSingle: (state: EditorState) => import("prosemirror-utils/dist/types").FindResult;
|
|
9
|
+
export declare const getPixelWidthOfElement: (editorView: EditorView, pos: number, mediaWidth: number) => number;
|
|
10
|
+
export declare const calcNewLayout: (width: number, layout: RichMediaLayout, contentWidth: number, fullWidthMode?: boolean) => RichMediaLayout;
|
|
11
|
+
export declare const getMaxToolbarWidth: () => number;
|
|
@@ -115,4 +115,5 @@ export interface ReactNodeProps {
|
|
|
115
115
|
selected: boolean;
|
|
116
116
|
}
|
|
117
117
|
export type ForwardRef = (node: HTMLElement | null) => void;
|
|
118
|
-
export {};
|
|
118
|
+
export type { InsertMediaAsMediaSingle } from './utils/media-single';
|
|
119
|
+
export type { MediaPluginState } from './pm-plugins/types';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
|
+
import type { IntlShape } from 'react-intl-next';
|
|
3
|
+
import type { BorderMarkAttributes } from '@atlaskit/adf-schema';
|
|
4
|
+
export interface ImageBorderProps {
|
|
5
|
+
intl: IntlShape;
|
|
6
|
+
toggleBorder: () => void;
|
|
7
|
+
borderMark?: BorderMarkAttributes;
|
|
8
|
+
setBorder: (attrs: Partial<BorderMarkAttributes>) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const ImageBorder: ({ intl: { formatMessage }, toggleBorder, borderMark, setBorder, }: ImageBorderProps) => jsx.JSX.Element;
|
|
11
|
+
export default ImageBorder;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare const messages: {
|
|
2
|
+
borderColor: {
|
|
3
|
+
id: string;
|
|
4
|
+
defaultMessage: string;
|
|
5
|
+
description: string;
|
|
6
|
+
};
|
|
7
|
+
borderSize: {
|
|
8
|
+
id: string;
|
|
9
|
+
defaultMessage: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
addBorder: {
|
|
13
|
+
id: string;
|
|
14
|
+
defaultMessage: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
removeBorder: {
|
|
18
|
+
id: string;
|
|
19
|
+
defaultMessage: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
borderOptions: {
|
|
23
|
+
id: string;
|
|
24
|
+
defaultMessage: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
borderSizeSubtle: {
|
|
28
|
+
id: string;
|
|
29
|
+
defaultMessage: string;
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
borderSizeMedium: {
|
|
33
|
+
id: string;
|
|
34
|
+
defaultMessage: string;
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
borderSizeBold: {
|
|
38
|
+
id: string;
|
|
39
|
+
defaultMessage: string;
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const menuItemDimensions: {
|
|
2
|
+
width: number;
|
|
3
|
+
height: number;
|
|
4
|
+
};
|
|
5
|
+
export declare const itemSpacing: number;
|
|
6
|
+
export declare const contextualMenuArrow: import("@emotion/react").SerializedStyles;
|
|
7
|
+
export declare const contextualMenuColorIcon: (color?: string) => import("@emotion/react").SerializedStyles;
|
|
8
|
+
export declare const contextualSubMenu: (index: number) => import("@emotion/react").SerializedStyles;
|
|
9
|
+
export declare const buttonStyle: (selected: boolean) => import("@emotion/react").SerializedStyles;
|
|
10
|
+
export declare const buttonWrapperStyle: import("@emotion/react").SerializedStyles;
|
|
11
|
+
export declare const line: (size: number, selected: boolean) => import("@emotion/react").SerializedStyles;
|
|
12
|
+
export declare const toolbarButtonWrapper: ({ enabled, isOpen, }: {
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
isOpen: boolean;
|
|
15
|
+
}) => import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import type { IntlShape, WrappedComponentProps } from 'react-intl-next';
|
|
5
|
+
import type { RecentSearchInputTypes } from '@atlaskit/editor-common/link';
|
|
6
|
+
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
7
|
+
export type Props = {
|
|
8
|
+
intl: IntlShape;
|
|
9
|
+
providerFactory: ProviderFactory;
|
|
10
|
+
editing: boolean;
|
|
11
|
+
onBack: (url: string, meta: {
|
|
12
|
+
inputMethod?: RecentSearchInputTypes;
|
|
13
|
+
}) => void;
|
|
14
|
+
onUnlink: () => void;
|
|
15
|
+
onCancel: () => void;
|
|
16
|
+
onBlur: (href: string) => void;
|
|
17
|
+
onSubmit: (href: string, meta: {
|
|
18
|
+
inputMethod: RecentSearchInputTypes;
|
|
19
|
+
}) => void;
|
|
20
|
+
displayUrl?: string;
|
|
21
|
+
};
|
|
22
|
+
export declare class LinkAddToolbar extends React.PureComponent<Props & WrappedComponentProps> {
|
|
23
|
+
state: {
|
|
24
|
+
validationErrors: never[];
|
|
25
|
+
};
|
|
26
|
+
private handleSubmit;
|
|
27
|
+
private handleOnBack;
|
|
28
|
+
private handleCancel;
|
|
29
|
+
private handleUnlink;
|
|
30
|
+
private handleOnBlur;
|
|
31
|
+
private getValidationErrors;
|
|
32
|
+
private renderContainer;
|
|
33
|
+
render(): jsx.JSX.Element;
|
|
34
|
+
}
|
|
35
|
+
export default LinkAddToolbar;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { MediaFeatureFlags } from '@atlaskit/media-common/mediaFeatureFlags';
|
|
3
|
+
import type { MediaPluginState } from '../../pm-plugins/types';
|
|
4
|
+
type Props = {
|
|
5
|
+
mediaState: MediaPluginState;
|
|
6
|
+
isOpen?: boolean;
|
|
7
|
+
onBrowseFn: (browse: () => void) => void;
|
|
8
|
+
featureFlags?: MediaFeatureFlags;
|
|
9
|
+
};
|
|
10
|
+
export declare const BrowserWrapper: ({ mediaState, isOpen, onBrowseFn, featureFlags, }: Props) => JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { MediaFeatureFlags } from '@atlaskit/media-common/mediaFeatureFlags';
|
|
3
|
+
import type { MediaPluginState } from '../../pm-plugins/types';
|
|
4
|
+
type Props = {
|
|
5
|
+
mediaState: MediaPluginState;
|
|
6
|
+
featureFlags?: MediaFeatureFlags;
|
|
7
|
+
container?: HTMLElement;
|
|
8
|
+
};
|
|
9
|
+
export declare const ClipboardWrapper: ({ mediaState, featureFlags, container, }: Props) => JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { MediaFeatureFlags } from '@atlaskit/media-common/mediaFeatureFlags';
|
|
4
|
+
import type { MediaPluginState } from '../../pm-plugins/types';
|
|
5
|
+
type Props = {
|
|
6
|
+
mediaState: MediaPluginState;
|
|
7
|
+
isActive: boolean;
|
|
8
|
+
featureFlags?: MediaFeatureFlags;
|
|
9
|
+
editorDomElement: Element;
|
|
10
|
+
appearance: EditorAppearance;
|
|
11
|
+
};
|
|
12
|
+
export declare const DropzoneWrapper: ({ mediaState, isActive, featureFlags, editorDomElement, appearance, }: Props) => JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
3
|
+
import type { BrowserConfig, ClipboardConfig, DropzoneConfig } from '@atlaskit/media-picker/types';
|
|
4
|
+
import PickerFacade from '../../picker-facade';
|
|
5
|
+
import type { MediaPluginState } from '../../pm-plugins/types';
|
|
6
|
+
export interface ChildrenProps {
|
|
7
|
+
config: ClipboardConfig | BrowserConfig | DropzoneConfig;
|
|
8
|
+
mediaClientConfig: MediaClientConfig;
|
|
9
|
+
pickerFacadeInstance: PickerFacade;
|
|
10
|
+
}
|
|
11
|
+
export type Props = {
|
|
12
|
+
mediaState: MediaPluginState;
|
|
13
|
+
analyticsName: string;
|
|
14
|
+
children: (props: ChildrenProps) => React.ReactNode;
|
|
15
|
+
};
|
|
16
|
+
type State = {
|
|
17
|
+
config?: ClipboardConfig | BrowserConfig | DropzoneConfig;
|
|
18
|
+
mediaClientConfig?: MediaClientConfig;
|
|
19
|
+
pickerFacadeInstance?: PickerFacade;
|
|
20
|
+
};
|
|
21
|
+
export default class PickerFacadeProvider extends React.Component<Props, State> {
|
|
22
|
+
state: State;
|
|
23
|
+
private handleMediaProvider;
|
|
24
|
+
componentDidMount(): void;
|
|
25
|
+
componentWillUnmount(): void;
|
|
26
|
+
render(): React.ReactNode;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { EditorAppearance, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { MediaNextEditorPluginType } from '../../next-plugin-type';
|
|
4
|
+
import type { MediaPluginState } from '../../pm-plugins/types';
|
|
5
|
+
type Props = {
|
|
6
|
+
mediaState: MediaPluginState;
|
|
7
|
+
editorDomElement: Element;
|
|
8
|
+
appearance: EditorAppearance;
|
|
9
|
+
api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
10
|
+
};
|
|
11
|
+
type State = {
|
|
12
|
+
isPopupOpened: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare class MediaPickerComponents extends React.Component<Props, State> {
|
|
15
|
+
static displayName: string;
|
|
16
|
+
state: {
|
|
17
|
+
isPopupOpened: boolean;
|
|
18
|
+
};
|
|
19
|
+
componentDidMount(): void;
|
|
20
|
+
onBrowseFn: (nativeBrowseFn: () => void) => void;
|
|
21
|
+
render(): JSX.Element;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PIXELENTRY_MIGRATION_BUTTON_TESTID = "pixel-entry-convert-pixels-btn";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import type { IntlShape } from 'react-intl-next';
|
|
4
|
+
import type { PixelEntryProps } from './types';
|
|
5
|
+
export declare const PixelEntry: ({ width, mediaWidth, mediaHeight, onSubmit, minWidth, maxWidth, onChange, intl: { formatMessage }, showMigration, onMigrate, }: PixelEntryProps) => jsx.JSX.Element;
|
|
6
|
+
export declare const FullWidthDisplay: React.FC<{
|
|
7
|
+
intl: IntlShape;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export declare const messages: {
|
|
2
|
+
validationFailedMessage: {
|
|
3
|
+
id: string;
|
|
4
|
+
defaultMessage: string;
|
|
5
|
+
description: string;
|
|
6
|
+
};
|
|
7
|
+
inputWidthTooltip: {
|
|
8
|
+
id: string;
|
|
9
|
+
defaultMessage: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
inputWidthAriaLabel: {
|
|
13
|
+
id: string;
|
|
14
|
+
defaultMessage: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
inputHeightTooltip: {
|
|
18
|
+
id: string;
|
|
19
|
+
defaultMessage: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
inputHeightAriaLabel: {
|
|
23
|
+
id: string;
|
|
24
|
+
defaultMessage: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
submitButtonText: {
|
|
28
|
+
id: string;
|
|
29
|
+
defaultMessage: string;
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
fullWidthLabel: {
|
|
33
|
+
id: string;
|
|
34
|
+
defaultMessage: string;
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
migrationButtonText: {
|
|
38
|
+
id: string;
|
|
39
|
+
defaultMessage: string;
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
migrationButtonTooltip: {
|
|
43
|
+
id: string;
|
|
44
|
+
defaultMessage: string;
|
|
45
|
+
description: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const pixelSizingWrapper: import("@emotion/react").SerializedStyles;
|
|
2
|
+
export declare const pixelEntryForm: import("@emotion/react").SerializedStyles;
|
|
3
|
+
export declare const pixelSizingInput: import("@emotion/react").SerializedStyles;
|
|
4
|
+
export declare const pixelSizingLabel: import("@emotion/react").SerializedStyles;
|
|
5
|
+
export declare const pixelSizingWidthInput: import("@emotion/react").SerializedStyles;
|
|
6
|
+
export declare const pixelSizingHeightInput: import("@emotion/react").SerializedStyles;
|
|
7
|
+
export declare const pixelEntryHiddenSubmit: import("@emotion/react").SerializedStyles;
|
|
8
|
+
export declare const pixelSizingFullWidthLabelStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { IntlShape } from 'react-intl-next';
|
|
2
|
+
export type PixelEntryProps = {
|
|
3
|
+
/**
|
|
4
|
+
* IntlShape passed in for translations
|
|
5
|
+
*/
|
|
6
|
+
intl: IntlShape;
|
|
7
|
+
/**
|
|
8
|
+
* The current pixel width
|
|
9
|
+
*/
|
|
10
|
+
width: number;
|
|
11
|
+
/**
|
|
12
|
+
* The original media width used to calculate the height
|
|
13
|
+
*/
|
|
14
|
+
mediaWidth: number;
|
|
15
|
+
/**
|
|
16
|
+
* The original media height used to calculate the width
|
|
17
|
+
*/
|
|
18
|
+
mediaHeight: number;
|
|
19
|
+
/**
|
|
20
|
+
* The minimum acceptable width input
|
|
21
|
+
*/
|
|
22
|
+
minWidth: number;
|
|
23
|
+
/**
|
|
24
|
+
* The maximum acceptable width input
|
|
25
|
+
*/
|
|
26
|
+
maxWidth: number;
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* Handler for valid input
|
|
30
|
+
*/
|
|
31
|
+
onChange?: (valid: boolean) => void;
|
|
32
|
+
/**
|
|
33
|
+
* show migration button to convert to pixels for legacy image resize experience
|
|
34
|
+
*/
|
|
35
|
+
showMigration?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* The submit function that is called when the form is valid and the submit key is pressed
|
|
38
|
+
*/
|
|
39
|
+
onSubmit?: (value: PixelEntryFormData) => void;
|
|
40
|
+
/**
|
|
41
|
+
* An optional validate function that is called before onSubmit is called.
|
|
42
|
+
* The value passed through the validator currently comes from the width input only.
|
|
43
|
+
*/
|
|
44
|
+
validate?: (value: number | '') => boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Migration handler called when the CTA button is clicked
|
|
47
|
+
*/
|
|
48
|
+
onMigrate?: () => void;
|
|
49
|
+
};
|
|
50
|
+
export type PixelEntryFormValues = {
|
|
51
|
+
inputWidth: number | '';
|
|
52
|
+
inputHeight: number | '';
|
|
53
|
+
};
|
|
54
|
+
export type PixelEntryValidation = 'valid' | 'greater-than-max' | 'less-than-min';
|
|
55
|
+
export type PixelEntryFormData = {
|
|
56
|
+
width: number;
|
|
57
|
+
validation: PixelEntryValidation;
|
|
58
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
5
|
+
import type { GuidelineConfig, GuidelineSnapsReference, RelativeGuides } from '@atlaskit/editor-common/guideline';
|
|
6
|
+
import type { Dimensions, HandleResize, HandleResizeStart, Position, Snap } from '@atlaskit/editor-common/resizer';
|
|
7
|
+
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
8
|
+
import type { Props } from './types';
|
|
9
|
+
type State = {
|
|
10
|
+
isVideoFile: boolean;
|
|
11
|
+
isResizing: boolean;
|
|
12
|
+
size: Dimensions;
|
|
13
|
+
snaps: Snap;
|
|
14
|
+
relativeGuides: RelativeGuides;
|
|
15
|
+
guidelines: GuidelineConfig[];
|
|
16
|
+
};
|
|
17
|
+
export declare const resizerNextTestId = "mediaSingle.resizerNext.testid";
|
|
18
|
+
type ResizableMediaSingleNextProps = Props & {
|
|
19
|
+
showLegacyNotification?: boolean;
|
|
20
|
+
};
|
|
21
|
+
declare class ResizableMediaSingleNext extends React.Component<ResizableMediaSingleNextProps, State> {
|
|
22
|
+
private lastSnappedGuidelineKeys;
|
|
23
|
+
constructor(props: ResizableMediaSingleNextProps);
|
|
24
|
+
componentDidUpdate(prevProps: Props): boolean;
|
|
25
|
+
componentDidMount(): Promise<void>;
|
|
26
|
+
UNSAFE_componentWillReceiveProps(nextProps: Props): void;
|
|
27
|
+
get wrappedLayout(): boolean;
|
|
28
|
+
get pos(): number | null;
|
|
29
|
+
get $pos(): import("prosemirror-model").ResolvedPos | null;
|
|
30
|
+
get aspectRatio(): number;
|
|
31
|
+
get insideInlineLike(): boolean;
|
|
32
|
+
get insideLayout(): boolean;
|
|
33
|
+
get isGuidelineEnabled(): boolean;
|
|
34
|
+
isNestedNode(): boolean;
|
|
35
|
+
private getDefaultGuidelines;
|
|
36
|
+
private updateGuidelines;
|
|
37
|
+
checkVideoFile(viewMediaClientConfig?: MediaClientConfig): Promise<void>;
|
|
38
|
+
calcNewLayout: (newWidth: number, stop: boolean) => MediaSingleLayout;
|
|
39
|
+
calcUnwrappedLayout: (width: number, containerWidth: number, contentWidth: number, fullWidthMode?: boolean, isNestedNode?: boolean) => 'center' | 'wide' | 'full-width';
|
|
40
|
+
calcPxHeight: (newWidth: number) => number;
|
|
41
|
+
private displayGuideline;
|
|
42
|
+
private setIsResizing;
|
|
43
|
+
private updateSizeInPluginState;
|
|
44
|
+
private calcMaxWidth;
|
|
45
|
+
private calcMinWidth;
|
|
46
|
+
private getRelativeGuides;
|
|
47
|
+
updateActiveGuidelines: (width: number | undefined, guidelines: GuidelineConfig[], guidelineSnapsReference: GuidelineSnapsReference) => void;
|
|
48
|
+
calculateSizeState: (size: Position & Dimensions, delta: Dimensions, onResizeStop?: boolean) => {
|
|
49
|
+
width: number;
|
|
50
|
+
height: number;
|
|
51
|
+
layout: MediaSingleLayout;
|
|
52
|
+
};
|
|
53
|
+
selectCurrentMediaNode: () => void;
|
|
54
|
+
handleResizeStart: HandleResizeStart;
|
|
55
|
+
handleResize: HandleResize;
|
|
56
|
+
handleResizeStop: HandleResize;
|
|
57
|
+
render(): jsx.JSX.Element;
|
|
58
|
+
}
|
|
59
|
+
export default ResizableMediaSingleNext;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
5
|
+
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
6
|
+
import type { Props } from './types';
|
|
7
|
+
type State = {
|
|
8
|
+
offsetLeft: number;
|
|
9
|
+
isVideoFile: boolean;
|
|
10
|
+
resizedPctWidth?: number;
|
|
11
|
+
};
|
|
12
|
+
export default class ResizableMediaSingle extends React.Component<Props, State> {
|
|
13
|
+
state: State;
|
|
14
|
+
componentDidUpdate(prevProps: Props): boolean;
|
|
15
|
+
private displayGrid;
|
|
16
|
+
get wrappedLayout(): boolean;
|
|
17
|
+
isNestedInTable(): boolean;
|
|
18
|
+
componentDidMount(): Promise<void>;
|
|
19
|
+
UNSAFE_componentWillReceiveProps(nextProps: Props): void;
|
|
20
|
+
checkVideoFile(viewMediaClientConfig?: MediaClientConfig): Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* When returning to center layout from a wrapped/aligned layout, it might actually
|
|
23
|
+
* be wide or full-width
|
|
24
|
+
*/
|
|
25
|
+
checkLayout(oldLayout: MediaSingleLayout, newLayout: MediaSingleLayout): void;
|
|
26
|
+
calcNewSize: (newWidth: number, stop: boolean) => {
|
|
27
|
+
width: number | null;
|
|
28
|
+
layout: MediaSingleLayout;
|
|
29
|
+
};
|
|
30
|
+
calcUnwrappedLayout: (pct: number, width: number) => 'center' | 'wide' | 'full-width';
|
|
31
|
+
get $pos(): import("prosemirror-model").ResolvedPos | null;
|
|
32
|
+
/**
|
|
33
|
+
* The maxmimum number of grid columns this node can resize to.
|
|
34
|
+
*/
|
|
35
|
+
get gridWidth(): number;
|
|
36
|
+
calcColumnLeftOffset: () => number;
|
|
37
|
+
wrapper?: HTMLElement;
|
|
38
|
+
calcPxWidth: (useLayout?: MediaSingleLayout) => number;
|
|
39
|
+
get insideInlineLike(): boolean;
|
|
40
|
+
get insideLayout(): boolean;
|
|
41
|
+
highlights: (newWidth: number, snapPoints: number[]) => string[] | number[];
|
|
42
|
+
private saveWrapper;
|
|
43
|
+
render(): jsx.JSX.Element;
|
|
44
|
+
}
|
|
45
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const resizableMediaMigrationNotificationStyle: import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
2
|
+
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { MediaSingleProps } from '@atlaskit/editor-common/ui';
|
|
5
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
+
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
7
|
+
import type { MediaNextEditorPluginType } from '../../next-plugin-type';
|
|
8
|
+
import type { getPosHandler } from '../../types';
|
|
9
|
+
export type EnabledHandles = {
|
|
10
|
+
left?: boolean;
|
|
11
|
+
right?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type Props = MediaSingleProps & {
|
|
14
|
+
updateSize: (width: number | null, layout: MediaSingleLayout) => void;
|
|
15
|
+
getPos: getPosHandler;
|
|
16
|
+
view: EditorView;
|
|
17
|
+
lineLength: number;
|
|
18
|
+
gridSize: number;
|
|
19
|
+
containerWidth: number;
|
|
20
|
+
allowBreakoutSnapPoints?: boolean;
|
|
21
|
+
selected: boolean;
|
|
22
|
+
viewMediaClientConfig?: MediaClientConfig;
|
|
23
|
+
fullWidthMode?: boolean;
|
|
24
|
+
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
25
|
+
mediaSingleWidth?: number;
|
|
26
|
+
pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
27
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WrappedComponentProps } from 'react-intl-next';
|
|
3
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { MediaNextEditorPluginType } from '../../next-plugin-type';
|
|
5
|
+
export interface Props {
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
isReducedSpacing?: boolean;
|
|
8
|
+
api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
|
|
11
|
+
WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|