payload-richtext-tiptap 0.0.149 → 0.0.150
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/LICENSE.md +22 -22
- package/README.md +33 -33
- package/dist/src/body/StandardArticle.js.map +1 -1
- package/dist/src/client.js.map +1 -1
- package/dist/src/fields/TiptapEditor/Components.js.map +1 -1
- package/dist/src/fields/TiptapEditor/context/EditorContext.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/AICommand/AICommand.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/AICommand/AIMenuList.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/AICommand/CommandButton.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/AICommand/groups.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/AICommand/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/AICommand/types.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Audio/Audio.js +5 -5
- package/dist/src/fields/TiptapEditor/extensions/Audio/Audio.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Audio/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/AudioBlock/AudioBlock.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/AudioBlock/components/AudioBlockMenu.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/AudioBlock/components/AudioBlockView.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/AudioBlock/components/AudioBlockWidth.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/AudioBlock/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/BlockquoteFigure/BlockquoteFigure.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/BlockquoteFigure/Design.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/BlockquoteFigure/Quote/Quote.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/BlockquoteFigure/Quote/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/BlockquoteFigure/QuoteCaption/QuoteCaption.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/BlockquoteFigure/QuoteCaption/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/BlockquoteFigure/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Document/Document.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Document/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Figcaption/Figcaption.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Figcaption/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Figure/Figure.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Figure/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/FontSize/FontSize.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/FontSize/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Heading/Heading.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Heading/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/HorizontalRule/HorizontalRule.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/HorizontalRule/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Iframe/IframeEmbed.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Iframe/iframe.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Iframe/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Iframe/menus/IframeMenu.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Iframe/menus/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Image/Image.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Image/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/ImageBlock/ImageBlock.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/ImageBlock/components/ImageBlockMenu.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/ImageBlock/components/ImageBlockView.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/ImageBlock/components/ImageBlockViewClientside.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/ImageBlock/components/ImageBlockWidth.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/ImageBlock/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/ImageUpload/ImageUpload.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/ImageUpload/getImageActualSize.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/ImageUpload/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/ImageUpload/view/ImageUpload.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/ImageUpload/view/ImageUploader.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/ImageUpload/view/hooks.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/ImageUpload/view/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/InsideLinks/InsideLink.client.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/InsideLinks/InsideLinksComponent.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/InsideLinks/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/InsideLinks/insideLinks.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/InsideLinks/menus/InsideLinksMenu.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/InsideLinks/menus/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Link/Link.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Link/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/LinkPreview/EditLinkPreviewPopover.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/LinkPreview/LinkPreview.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/LinkPreview/LinkPreviewEditorPanel.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/LinkPreview/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/LinkPreview/menus/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/LinkPreview/menus/linkPreviewMenu.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/MultiColumn/Column.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/MultiColumn/Columns.js +3 -3
- package/dist/src/fields/TiptapEditor/extensions/MultiColumn/Columns.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/MultiColumn/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/MultiColumn/menus/ColumnsMenu.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/MultiColumn/menus/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Paragraph/Paragraph.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Paragraph/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Selection/Selection.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Selection/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SlashCommand/CommandButton.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SlashCommand/MenuList.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SlashCommand/SlashCommand.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SlashCommand/groups.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SlashCommand/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SlashCommand/types.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Facebook/FacebookEmbed.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Facebook/facebook.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Facebook/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Instagram/InstagramEmbed.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Instagram/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Instagram/instagram.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Linkedin/LinkedinEmbed.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Linkedin/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Linkedin/linkedin.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/SocialMediaEmbed.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/SocialMediaEmbedServerside.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Tiktok/TiktokEmbed.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Tiktok/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Tiktok/tiktok.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Twitter/TwitterEmbed.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Twitter/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Twitter/twitter.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Youtube/YoutubeEmbed.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Youtube/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Youtube/youtube.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/menus/SocialMediaMenu.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/menus/constants.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/menus/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Table/Cell.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Table/Header.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Table/Row.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Table/Table.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Table/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Table/menus/TableColumn/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Table/menus/TableColumn/utils.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Table/menus/TableRow/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Table/menus/TableRow/utils.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Table/menus/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Table/utils.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/TrailingNode/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/TrailingNode/trailing-node.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Video/Video.js +5 -5
- package/dist/src/fields/TiptapEditor/extensions/Video/Video.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Video/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/VideoBlock/VideoBlock.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockMenu.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockView.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockViewClientside.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockWidth.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/VideoPlayer.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/components/QualityOption.js +9 -9
- package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/components/QualityOption.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/components/QualitySelector.js +15 -15
- package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/components/QualitySelector.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/events.d.ts.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/events.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/middleware/SourceInterceptor.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/util/SafeSeek.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/VideoBlock/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/extension-kit.d.ts +1 -1
- package/dist/src/fields/TiptapEditor/extensions/extension-kit.d.ts.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/extension-kit.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/EmbedContentInlineRenderer.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/EmbedContentSideRenderer.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/EmbedContentSidebarRenderer.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/FacebookServerside.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/IFrameServerside.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/ImageBlockServerside.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/InsideLinkServerside.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/InstagramServerside.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/LinkedinServerside.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/RenderEmbedClientSide.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/ServersideTiptapBody.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/TiktokServerside.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/TwitterBlockServerside.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/VideoBlockServerside.js +5 -5
- package/dist/src/fields/TiptapEditor/extensions/serverside/VideoBlockServerside.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/YouTubeServerside.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/getAssetsAspectRatio.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/useAppendRequiredBlocksMarkerClient.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/BlockEditor/BlockEditor.d.ts +2 -2
- package/dist/src/fields/TiptapEditor/features/BlockEditor/BlockEditor.d.ts.map +1 -1
- package/dist/src/fields/TiptapEditor/features/BlockEditor/BlockEditor.js +22 -21
- package/dist/src/fields/TiptapEditor/features/BlockEditor/BlockEditor.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/BlockEditor/OneLineEditor.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/BlockEditor/components/EditorHeader.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/BlockEditor/components/EditorInfo.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/BlockEditor/components/OneLiner.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/BlockEditor/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/BlockEditor/types.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/ContentItemMenu/ContentItemMenu.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/ContentItemMenu/hooks/useContentItemActions.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/ContentItemMenu/hooks/useData.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/ContentItemMenu/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/LinkMenu/LinkMenu.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/LinkMenu/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/TextMenu/AITextMenu.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/TextMenu/TextMenu.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/TextMenu/components/ContentTypePicker.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/TextMenu/components/EditIframeLinkPopover.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/TextMenu/components/EditLinkPopover.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/TextMenu/components/FontFamilyPicker.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/TextMenu/components/FontSizePicker.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/TextMenu/components/SocialMediaPopover.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/TextMenu/components/ai-completion-command.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/TextMenu/components/ai-draft-selector-commands.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/TextMenu/components/ai-selector-commands.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/TextMenu/hooks/useTextmenuCommands.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/TextMenu/hooks/useTextmenuContentTypes.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/TextMenu/hooks/useTextmenuStates.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/TextMenu/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/types.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/panels/AICommandPanel/AICommandPanel.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/panels/AICommandPanel/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/panels/AIEditorPanel/AIEditorPanel.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/panels/AIEditorPanel/EditorPreview.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/panels/AIEditorPanel/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/panels/AIEditorPanel/markdown.hook.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/panels/AIEditorPanel/utils.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/panels/Colorpicker/ColorButton.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/panels/Colorpicker/Colorpicker.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/panels/Colorpicker/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/panels/IframeLinkEditorPanel/IframeLinkEditorPanel.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/panels/IframeLinkEditorPanel/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/panels/InsideLinksEditorPanel/InsideLinksEditorPanel.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/panels/InsideLinksEditorPanel/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/panels/LinkEditorPanel/LinkEditorPanel.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/panels/LinkEditorPanel/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/panels/LinkPreviewPanel/LinkPreviewPanel.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/panels/LinkPreviewPanel/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/panels/SocialMediaEditorPanel/SocialMediaEditorPanel.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/panels/SocialMediaEditorPanel/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/panels/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/ui/Button/Button.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/ui/Button/SpanButton.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/ui/Button/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/ui/Dropdown/Dropdown.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/ui/Dropdown/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/ui/Icon.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/ui/Loader/Loader.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/ui/Loader/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/ui/Loader/types.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/ui/Panel/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/ui/PopoverMenu.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/ui/Spinner/Spinner.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/ui/Spinner/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/ui/Surface.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/ui/Textarea/Textarea.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/ui/Textarea/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/ui/Toggle/Toggle.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/ui/Toggle/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/ui/Toolbar.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/ui/Tooltip/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/ui/Tooltip/types.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/ui/crazy-spinner.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/ui/scroll-area.js.map +1 -1
- package/dist/src/fields/TiptapEditor/hooks/useBlockEditor.js.map +1 -1
- package/dist/src/fields/TiptapEditor/hooks/useSidebar.js.map +1 -1
- package/dist/src/fields/TiptapEditor/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/lib/api.js.map +1 -1
- package/dist/src/fields/TiptapEditor/lib/constants.js.map +1 -1
- package/dist/src/fields/TiptapEditor/lib/data/initialContent.js.map +1 -1
- package/dist/src/fields/TiptapEditor/lib/extract.js.map +1 -1
- package/dist/src/fields/TiptapEditor/lib/tiptapSchema.js.map +1 -1
- package/dist/src/fields/TiptapEditor/lib/utils/cssVar.js.map +1 -1
- package/dist/src/fields/TiptapEditor/lib/utils/deepMerge.js +8 -8
- package/dist/src/fields/TiptapEditor/lib/utils/deepMerge.js.map +1 -1
- package/dist/src/fields/TiptapEditor/lib/utils/getRenderContainer.js.map +1 -1
- package/dist/src/fields/TiptapEditor/lib/utils/index.js.map +1 -1
- package/dist/src/fields/TiptapEditor/lib/utils/isCustomNodeSelected.js.map +1 -1
- package/dist/src/fields/TiptapEditor/lib/utils/isRtl.js.map +1 -1
- package/dist/src/fields/TiptapEditor/lib/utils/isTextSelected.js.map +1 -1
- package/dist/src/fields/TiptapEditor/lib/utils/partialRequired.js.map +1 -1
- package/dist/src/fields/TiptapEditor/types.d.js.map +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +196 -204
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockViewClientside.tsx"],"sourcesContent":["import { Node } from \"@tiptap/pm/model\";\
|
|
1
|
+
{"version":3,"sources":["../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockViewClientside.tsx"],"sourcesContent":["import { Node } from \"@tiptap/pm/model\";\nimport { NodeViewWrapper } from \"@tiptap/react\";\nimport React, { useEffect, useMemo, useRef } from \"react\";\nimport { cn } from \"../../../lib/utils/index.js\";\nimport VideoPlayer from \"./videojs/VideoPlayer.js\";\nimport { useGetAssetsAspectRatio } from \"../../serverside/getAssetsAspectRatio.js\";\n\ninterface VideoBlockViewProps {\n node: Node & {\n attrs: {\n src: string;\n poster: string;\n assetId: string;\n playlistUrl?: string;\n };\n };\n className?: string;\n getVideoAspect?: () => void;\n}\n\nexport type Playlist = {\n id: string;\n title: string;\n description: string;\n poster: string;\n items: Item[];\n};\n\nexport type Item = {\n src: string;\n type: string;\n label: string;\n width: number;\n height: number;\n};\n\nexport const VideoBlockViewClientside = ({\n className,\n getVideoAspect,\n ...props\n}: VideoBlockViewProps) => {\n const { node } = props;\n const videoWrapperRef = useRef<HTMLDivElement>(null);\n const { src, poster, playlistUrl, caption, actualWidth, actualHeight } =\n node.attrs;\n const { aspectRatio, calculateAspectRatio, isVertical } =\n useGetAssetsAspectRatio();\n const [playlistContent, setPlaylistContent] = React.useState<\n Playlist | undefined\n >();\n const [error, setError] = React.useState();\n\n useEffect(() => {\n async function getPlaylistContent() {\n const res = await fetch(playlistUrl, {\n cache: \"no-cache\",\n });\n return await res.json();\n }\n\n if (playlistUrl) {\n try {\n getPlaylistContent()\n .then((data) => {\n setPlaylistContent(data);\n })\n .catch((err) => {\n setError(err);\n });\n } catch (error) {\n setError(error);\n }\n }\n }, [playlistUrl]);\n\n const wrapperClassName = cn(\n node.attrs.align === \"left\" ? \"ml-0\" : \"ml-auto\",\n node.attrs.align === \"right\" ? \"mr-0\" : \"mr-auto\",\n node.attrs.align === \"center\" && \"mx-auto\"\n );\n\n const videoJsOptions = useMemo(() => {\n if (playlistContent == undefined) return {};\n\n if (\n playlistContent.items.some(\n (item) =>\n item.type === \"application/x-mpegURL\" ||\n item.type === \"application/vnd.apple.mpegurl\"\n )\n ) {\n return {\n sources: playlistContent.items\n .filter(\n (item) =>\n item.type === \"application/x-mpegURL\" ||\n item.type === \"application/vnd.apple.mpegurl\"\n )\n .map((item) => ({\n src: item.src,\n type: item.type,\n label: item.label,\n })),\n poster: playlistContent.poster,\n preload: \"auto\",\n };\n }\n return {\n sources: playlistContent.items.map((item) => ({\n src: item.src,\n type: item.type,\n label: item.label,\n })),\n poster: playlistContent.poster,\n preload: \"auto\",\n };\n }, [playlistContent]);\n\n useEffect(() => {\n if (!playlistContent?.items?.length) {\n return;\n }\n const source = playlistContent.items.find((item) => item.src);\n if (!aspectRatio && source?.src) {\n calculateAspectRatio(\n {\n src: source.src,\n actualWidth: actualWidth || source?.width,\n actualHeight: actualHeight || source?.height,\n },\n \"VIDEO\",\n getVideoAspect\n );\n }\n }, [playlistContent]);\n const style = useMemo(() => {\n if (aspectRatio) {\n return {\n aspectRatio,\n width: node.attrs.width,\n };\n }\n return {\n width: node.attrs.width,\n };\n }, [aspectRatio]);\n return (\n <NodeViewWrapper className={className}>\n <div\n className={cn(\n wrapperClassName,\n \"main-videojs-wrapper aspect-square h-full\"\n )}\n {...(isVertical && { \"data-vertical\": isVertical })}\n ref={videoWrapperRef}\n style={style}\n >\n {error && <div>{error}</div>}\n\n {playlistContent && <VideoPlayer options={videoJsOptions} />}\n </div>\n {caption && playlistContent?.title && (\n <div\n className=\"block mx-auto text-sm text-gray-500 text-center mt-1\"\n style={{ width: node.attrs.width }}\n >\n {playlistContent?.title}\n </div>\n )}\n </NodeViewWrapper>\n );\n};\n\nexport default VideoBlockViewClientside;\n"],"names":["NodeViewWrapper","React","useEffect","useMemo","useRef","cn","VideoPlayer","useGetAssetsAspectRatio","VideoBlockViewClientside","className","getVideoAspect","props","node","videoWrapperRef","src","poster","playlistUrl","caption","actualWidth","actualHeight","attrs","aspectRatio","calculateAspectRatio","isVertical","playlistContent","setPlaylistContent","useState","error","setError","getPlaylistContent","res","fetch","cache","json","then","data","catch","err","wrapperClassName","align","videoJsOptions","undefined","items","some","item","type","sources","filter","map","label","preload","length","source","find","width","height","style","div","ref","options","title"],"mappings":";AACA,SAASA,eAAe,QAAQ,gBAAgB;AAChD,OAAOC,SAASC,SAAS,EAAEC,OAAO,EAAEC,MAAM,QAAQ,QAAQ;AAC1D,SAASC,EAAE,QAAQ,8BAA8B;AACjD,OAAOC,iBAAiB,2BAA2B;AACnD,SAASC,uBAAuB,QAAQ,2CAA2C;AA+BnF,OAAO,MAAMC,2BAA2B,CAAC,EACvCC,SAAS,EACTC,cAAc,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ASnB;;;;YAE3CvB,WAAWO,iBAAiBoC,uBAC3B,KAACH;gBACChD,WAAU;gBACV+C,OAAO;oBAAEF,OAAO1C,KAAKQ,KAAK,CAACkC,KAAK;gBAAC;0BAEhC9B,iBAAiBoC;;;;AAK5B,EAAE;AAEF,eAAepD,yBAAyB"}
|
package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockWidth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockWidth.tsx"],"sourcesContent":["import React, { memo, useCallback, useEffect, useState } from \"react\";\
|
|
1
|
+
{"version":3,"sources":["../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockWidth.tsx"],"sourcesContent":["import React, { memo, useCallback, useEffect, useState } from \"react\";\n\nexport type VideoBlockWidthProps = {\n onChange: (value: number) => void;\n value: number;\n};\n\nexport const VideoBlockWidth = memo(\n ({ onChange, value }: VideoBlockWidthProps) => {\n const [currentValue, setCurrentValue] = useState(value);\n\n useEffect(() => {\n setCurrentValue(value);\n }, [value]);\n\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n onChange(parseInt(e.target.value));\n },\n [onChange]\n );\n\n return (\n <div className=\"flex items-center gap-2\">\n <input\n className=\"h-2 bg-neutral-200 border-0 rounded appearance-none fill-neutral-300\"\n type=\"range\"\n min=\"25\"\n max=\"100\"\n step=\"25\"\n onChange={handleChange}\n value={currentValue}\n />\n <span className=\"text-xs font-semibold text-neutral-500 select-none\">\n {value}%\n </span>\n </div>\n );\n }\n);\n\nVideoBlockWidth.displayName = \"VideoBlockWidth\";\n"],"names":["React","memo","useCallback","useEffect","useState","VideoBlockWidth","onChange","value","currentValue","setCurrentValue","handleChange","e","parseInt","target","div","className","input","type","min","max","step","span","displayName"],"mappings":";AAAA,OAAOA,SAASC,IAAI,EAAEC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAQ;AAOtE,OAAO,MAAMC,gCAAkBJ,KAC7B,CAAC,EAAEK,QAAQ,EAAEC,KAAK,EAAwB;IACxC,MAAM,CAACC,cAAcC,gBAAgB,GAAGL,SAASG;IAEjDJ,UAAU;QACRM,gBAAgBF;IAClB,GAAG;QAACA;KAAM;IAEV,MAAMG,eAAeR,YACnB,CAACS;QACCL,SAASM,SAASD,EAAEE,MAAM,CAACN,KAAK;IAClC,GACA;QAACD;KAAS;IAGZ,qBACE,MAACQ;QAAIC,WAAU;;0BACb,KAACC;gBACCD,WAAU;gBACVE,MAAK;gBACLC,KAAI;gBACJC,KAAI;gBACJC,MAAK;gBACLd,UAAUI;gBACVH,OAAOC;;0BAET,MAACa;gBAAKN,WAAU;;oBACbR;oBAAM;;;;;AAIf,GACA;AAEFF,gBAAgBiB,WAAW,GAAG"}
|
package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/VideoPlayer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/VideoPlayer.tsx"],"sourcesContent":["import React, { CSSProperties } from \"react\";\
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/VideoPlayer.tsx"],"sourcesContent":["import React, { CSSProperties } from \"react\";\nimport videojs, {\n VideoJsPlayer,\n VideoJsPlayerOptions,\n} from \"video.js/dist/video.es.js\";\nimport \"video.js/dist/video-js.css\";\n\n// Styles\nimport \"video.js/dist/video-js.css\";\n\nimport { QualitySelector } from \"./quality-selector/index.js\";\nimport { cn } from \"../../../../lib/utils/index.js\";\n\ninterface IVideoPlayerProps {\n options: VideoJsPlayerOptions;\n}\n\nconst initialOptions: VideoJsPlayerOptions = {\n controls: true,\n fluid: true,\n controlBar: {\n volumePanel: {\n inline: false,\n },\n },\n};\n\nconst VideoPlayer: React.FC<\n IVideoPlayerProps & { style?: CSSProperties; className?: string }\n> = ({ options, style, className }) => {\n const videoNode = React.useRef<HTMLVideoElement>(null);\n const player = React.useRef<videojs.Player>(null);\n\n React.useEffect(() => {\n QualitySelector(videojs);\n\n player.current = videojs(videoNode.current, {\n ...initialOptions,\n ...options,\n }).ready(function () {\n if (\n !this.controlBar\n .children()\n .some((c: { name_: string }) => c.name_ === \"QualitySelector\")\n ) {\n this.controlBar.addChild(\"QualitySelector\");\n }\n });\n return () => {\n if (player.current) {\n player.current.dispose();\n }\n };\n }, [options]);\n\n return (\n <video\n ref={videoNode}\n className={cn(\"video-js\", className)}\n style={style}\n />\n );\n};\n\nexport default VideoPlayer;\n"],"names":["React","videojs","QualitySelector","cn","initialOptions","controls","fluid","controlBar","volumePanel","inline","VideoPlayer","options","style","className","videoNode","useRef","player","useEffect","current","ready","children","some","c","name_","addChild","dispose","video","ref"],"mappings":";AAAA,OAAOA,WAA8B,QAAQ;AAC7C,OAAOC,aAGA,4BAA4B;AACnC,OAAO,6BAA6B;AAEpC,SAAS;AACT,OAAO,6BAA6B;AAEpC,SAASC,eAAe,QAAQ,8BAA8B;AAC9D,SAASC,EAAE,QAAQ,iCAAiC;AAMpD,MAAMC,iBAAuC;IAC3CC,UAAU;IACVC,OAAO;IACPC,YAAY;QACVC,aAAa;YACXC,QAAQ;QACV;IACF;AACF;AAEA,MAAMC,cAEF,CAAC,EAAEC,OAAO,EAAEC,KAAK,EAAEC,SAAS,EAAE;IAChC,MAAMC,YAAYd,MAAMe,MAAM,CAAmB;IACjD,MAAMC,SAAShB,MAAMe,MAAM,CAAiB;IAE5Cf,MAAMiB,SAAS,CAAC;QACdf,gBAAgBD;QAEhBe,OAAOE,OAAO,GAAGjB,QAAQa,UAAUI,OAAO,EAAE;YAC1C,GAAGd,cAAc;YACjB,GAAGO,OAAO;QACZ,GAAGQ,KAAK,CAAC;YACP,IACE,CAAC,IAAI,CAACZ,UAAU,CACba,QAAQ,GACRC,IAAI,CAAC,CAACC,IAAyBA,EAAEC,KAAK,KAAK,oBAC9C;gBACA,IAAI,CAAChB,UAAU,CAACiB,QAAQ,CAAC;YAC3B;QACF;QACA,OAAO;YACL,IAAIR,OAAOE,OAAO,EAAE;gBAClBF,OAAOE,OAAO,CAACO,OAAO;YACxB;QACF;IACF,GAAG;QAACd;KAAQ;IAEZ,qBACE,KAACe;QACCC,KAAKb;QACLD,WAAWV,GAAG,YAAYU;QAC1BD,OAAOA;;AAGb;AAEA,eAAeF,YAAY"}
|
|
@@ -2,14 +2,14 @@ import * as events from "../events.js";
|
|
|
2
2
|
import _ from "underscore";
|
|
3
3
|
export default function QualityOption(videojs) {
|
|
4
4
|
var MenuItem = videojs.getComponent("MenuItem");
|
|
5
|
-
/**
|
|
6
|
-
* A MenuItem to represent a video resolution
|
|
7
|
-
*
|
|
8
|
-
* @class QualityOption
|
|
9
|
-
* @extends videojs.MenuItem
|
|
5
|
+
/**
|
|
6
|
+
* A MenuItem to represent a video resolution
|
|
7
|
+
*
|
|
8
|
+
* @class QualityOption
|
|
9
|
+
* @extends videojs.MenuItem
|
|
10
10
|
*/ return class QualityOption extends MenuItem {
|
|
11
|
-
/**
|
|
12
|
-
* @inheritdoc
|
|
11
|
+
/**
|
|
12
|
+
* @inheritdoc
|
|
13
13
|
*/ constructor(player, options){
|
|
14
14
|
var source = options.source;
|
|
15
15
|
if (!_.isObject(source)) {
|
|
@@ -22,8 +22,8 @@ export default function QualityOption(videojs) {
|
|
|
22
22
|
super(player, options);
|
|
23
23
|
this.source = source;
|
|
24
24
|
}
|
|
25
|
-
/**
|
|
26
|
-
* @inheritdoc
|
|
25
|
+
/**
|
|
26
|
+
* @inheritdoc
|
|
27
27
|
*/ handleClick(event) {
|
|
28
28
|
super.handleClick(event);
|
|
29
29
|
this.player().trigger(events.QUALITY_REQUESTED, this.source);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/components/QualityOption.js"],"sourcesContent":["import * as events from \"../events.js\";\
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/components/QualityOption.js"],"sourcesContent":["import * as events from \"../events.js\";\nimport _ from \"underscore\";\n\nexport default function QualityOption(videojs) {\n var MenuItem = videojs.getComponent(\"MenuItem\");\n\n /**\n * A MenuItem to represent a video resolution\n *\n * @class QualityOption\n * @extends videojs.MenuItem\n */\n return class QualityOption extends MenuItem {\n /**\n * @inheritdoc\n */\n constructor(player, options) {\n var source = options.source;\n\n if (!_.isObject(source)) {\n throw new Error(\n 'was not provided a \"source\" object, but rather: ' + typeof source\n );\n }\n\n options = _.extend(\n {\n selectable: true,\n label: source.label,\n },\n options\n );\n\n super(player, options);\n\n this.source = source;\n }\n\n /**\n * @inheritdoc\n */\n handleClick(event) {\n super.handleClick(event);\n this.player().trigger(events.QUALITY_REQUESTED, this.source);\n }\n };\n}\n"],"names":["events","_","QualityOption","videojs","MenuItem","getComponent","constructor","player","options","source","isObject","Error","extend","selectable","label","handleClick","event","trigger","QUALITY_REQUESTED"],"mappings":"AAAA,YAAYA,YAAY,eAAe;AACvC,OAAOC,OAAO,aAAa;AAE3B,eAAe,SAASC,cAAcC,OAAO;IAC3C,IAAIC,WAAWD,QAAQE,YAAY,CAAC;IAEpC;;;;;GAKC,GACD,OAAO,MAAMH,sBAAsBE;QACjC;;KAEC,GACDE,YAAYC,MAAM,EAAEC,OAAO,CAAE;YAC3B,IAAIC,SAASD,QAAQC,MAAM;YAE3B,IAAI,CAACR,EAAES,QAAQ,CAACD,SAAS;gBACvB,MAAM,IAAIE,MACR,qDAAqD,OAAOF;YAEhE;YAEAD,UAAUP,EAAEW,MAAM,CAChB;gBACEC,YAAY;gBACZC,OAAOL,OAAOK,KAAK;YACrB,GACAN;YAGF,KAAK,CAACD,QAAQC;YAEd,IAAI,CAACC,MAAM,GAAGA;QAChB;QAEA;;KAEC,GACDM,YAAYC,KAAK,EAAE;YACjB,KAAK,CAACD,YAAYC;YAClB,IAAI,CAACT,MAAM,GAAGU,OAAO,CAACjB,OAAOkB,iBAAiB,EAAE,IAAI,CAACT,MAAM;QAC7D;IACF;AACF"}
|
|
@@ -4,14 +4,14 @@ import { default as qualityOptionFactory } from "./QualityOption.js";
|
|
|
4
4
|
const QUALITY_CHANGE_CLASS = "vjs-quality-changing";
|
|
5
5
|
export default function QualitySelector(videojs) {
|
|
6
6
|
var MenuButton = videojs.getComponent("MenuButton"), QualityOption = qualityOptionFactory(videojs);
|
|
7
|
-
/**
|
|
8
|
-
* A component for changing video resolutions
|
|
9
|
-
*
|
|
10
|
-
* @class QualitySelector
|
|
11
|
-
* @extends videojs.Button
|
|
7
|
+
/**
|
|
8
|
+
* A component for changing video resolutions
|
|
9
|
+
*
|
|
10
|
+
* @class QualitySelector
|
|
11
|
+
* @extends videojs.Button
|
|
12
12
|
*/ class QualitySelector extends MenuButton {
|
|
13
|
-
/**
|
|
14
|
-
* @inheritdoc
|
|
13
|
+
/**
|
|
14
|
+
* @inheritdoc
|
|
15
15
|
*/ constructor(player, options){
|
|
16
16
|
super(player, options);
|
|
17
17
|
// Update interface instantly so the user's change is acknowledged
|
|
@@ -38,10 +38,10 @@ export default function QualitySelector(videojs) {
|
|
|
38
38
|
}).bind(this));
|
|
39
39
|
this.controlText("Open quality selector menu");
|
|
40
40
|
}
|
|
41
|
-
/**
|
|
42
|
-
* Updates the source that is selected in the menu
|
|
43
|
-
*
|
|
44
|
-
* @param source {object} player source to display as selected
|
|
41
|
+
/**
|
|
42
|
+
* Updates the source that is selected in the menu
|
|
43
|
+
*
|
|
44
|
+
* @param source {object} player source to display as selected
|
|
45
45
|
*/ setSelectedSource(source) {
|
|
46
46
|
var src = source ? source.src : undefined;
|
|
47
47
|
if (this.selectedSrc !== src) {
|
|
@@ -51,8 +51,8 @@ export default function QualitySelector(videojs) {
|
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
/**
|
|
55
|
-
* @inheritdoc
|
|
54
|
+
/**
|
|
55
|
+
* @inheritdoc
|
|
56
56
|
*/ createItems() {
|
|
57
57
|
var player = this.player(), sources = player.currentSources();
|
|
58
58
|
if (!sources || sources.length < 2) {
|
|
@@ -65,8 +65,8 @@ export default function QualitySelector(videojs) {
|
|
|
65
65
|
});
|
|
66
66
|
}).bind(this));
|
|
67
67
|
}
|
|
68
|
-
/**
|
|
69
|
-
* @inheritdoc
|
|
68
|
+
/**
|
|
69
|
+
* @inheritdoc
|
|
70
70
|
*/ buildWrapperCSSClass() {
|
|
71
71
|
return "vjs-quality-selector " + super.buildWrapperCSSClass();
|
|
72
72
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/components/QualitySelector.js"],"sourcesContent":["import * as events from \"../events.js\";\
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/components/QualitySelector.js"],"sourcesContent":["import * as events from \"../events.js\";\nimport _ from \"underscore\";\n\nimport { default as qualityOptionFactory } from \"./QualityOption.js\";\n\nconst QUALITY_CHANGE_CLASS = \"vjs-quality-changing\";\n\nexport default function QualitySelector(videojs) {\n var MenuButton = videojs.getComponent(\"MenuButton\"),\n QualityOption = qualityOptionFactory(videojs);\n\n /**\n * A component for changing video resolutions\n *\n * @class QualitySelector\n * @extends videojs.Button\n */\n class QualitySelector extends MenuButton {\n /**\n * @inheritdoc\n */\n constructor(player, options) {\n super(player, options);\n\n // Update interface instantly so the user's change is acknowledged\n player.on(\n events.QUALITY_REQUESTED,\n function (event, newSource) {\n this.setSelectedSource(newSource);\n player.addClass(QUALITY_CHANGE_CLASS);\n\n player.one(\"loadeddata\", function () {\n player.removeClass(QUALITY_CHANGE_CLASS);\n });\n }.bind(this)\n );\n\n // Update the list of menu items only when the list of sources change\n player.on(\n events.PLAYER_SOURCES_CHANGED,\n function () {\n this.update();\n }.bind(this)\n );\n\n player.on(\n events.QUALITY_SELECTED,\n function (event, newSource) {\n // Update the selected source with the source that was actually selected\n this.setSelectedSource(newSource);\n }.bind(this)\n );\n\n // Since it's possible for the player to get a source before the selector is\n // created, make sure to update once we get a \"ready\" signal.\n player.one(\n \"ready\",\n function () {\n this.selectedSrc = player.src();\n this.update();\n }.bind(this)\n );\n\n this.controlText(\"Open quality selector menu\");\n }\n\n /**\n * Updates the source that is selected in the menu\n *\n * @param source {object} player source to display as selected\n */\n setSelectedSource(source) {\n var src = source ? source.src : undefined;\n\n if (this.selectedSrc !== src) {\n this.selectedSrc = src;\n _.each(this.items, function (item) {\n item.selected(item.source.src === src);\n });\n }\n }\n\n /**\n * @inheritdoc\n */\n createItems() {\n var player = this.player(),\n sources = player.currentSources();\n\n if (!sources || sources.length < 2) {\n return [];\n }\n\n return _.map(\n sources,\n function (source) {\n return new QualityOption(player, {\n source: source,\n selected: source.src === this.selectedSrc,\n });\n }.bind(this)\n );\n }\n\n /**\n * @inheritdoc\n */\n buildWrapperCSSClass() {\n return \"vjs-quality-selector \" + super.buildWrapperCSSClass();\n }\n }\n\n videojs.registerComponent(\"QualitySelector\", QualitySelector);\n\n return QualitySelector;\n}\n"],"names":["events","_","default","qualityOptionFactory","QUALITY_CHANGE_CLASS","QualitySelector","videojs","MenuButton","getComponent","QualityOption","constructor","player","options","on","QUALITY_REQUESTED","event","newSource","setSelectedSource","addClass","one","removeClass","bind","PLAYER_SOURCES_CHANGED","update","QUALITY_SELECTED","selectedSrc","src","controlText","source","undefined","each","items","item","selected","createItems","sources","currentSources","length","map","buildWrapperCSSClass","registerComponent"],"mappings":"AAAA,YAAYA,YAAY,eAAe;AACvC,OAAOC,OAAO,aAAa;AAE3B,SAASC,WAAWC,oBAAoB,QAAQ,qBAAqB;AAErE,MAAMC,uBAAuB;AAE7B,eAAe,SAASC,gBAAgBC,OAAO;IAC7C,IAAIC,aAAaD,QAAQE,YAAY,CAAC,eACpCC,gBAAgBN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AEC,GACDQ,cAAc;YACZ,IAAIvB,SAAS,IAAI,CAACA,MAAM,IACtBwB,UAAUxB,OAAOyB,cAAc;YAEjC,IAAI,CAACD,WAAWA,QAAQE,MAAM,GAAG,GAAG;gBAClC,OAAO,EAAE;YACX;YAEA,OAAOpC,EAAEqC,GAAG,CACVH,SACA,CAAA,SAAUP,MAAM;gBACd,OAAO,IAAInB,cAAcE,QAAQ;oBAC/BiB,QAAQA;oBACRK,UAAUL,OAAOF,GAAG,KAAK,IAAI,CAACD,WAAW;gBAC3C;YACF,CAAA,EAAEJ,IAAI,CAAC,IAAI;QAEf;QAEA;;KAEC,GACDkB,uBAAuB;YACrB,OAAO,0BAA0B,KAAK,CAACA;QACzC;IACF;IAEAjC,QAAQkC,iBAAiB,CAAC,mBAAmBnC;IAE7C,OAAOA;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/events.js"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/events.js"],"names":[],"mappings":"AAAA,gCAAiC,kBAAkB,CAAC;AACpD,+BAAgC,iBAAiB,CAAC;AAClD,qCAAsC,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/events.js"],"sourcesContent":["export const QUALITY_REQUESTED = \"qualityRequested\";\
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/events.js"],"sourcesContent":["export const QUALITY_REQUESTED = \"qualityRequested\";\nexport const QUALITY_SELECTED = \"qualitySelected\";\nexport const PLAYER_SOURCES_CHANGED = \"playerSourcesChanged\";\n\nexport default {\n QUALITY_REQUESTED,\n QUALITY_SELECTED,\n PLAYER_SOURCES_CHANGED,\n};\n"],"names":["QUALITY_REQUESTED","QUALITY_SELECTED","PLAYER_SOURCES_CHANGED"],"mappings":"AAAA,OAAO,MAAMA,oBAAoB,mBAAmB;AACpD,OAAO,MAAMC,mBAAmB,kBAAkB;AAClD,OAAO,MAAMC,yBAAyB,uBAAuB;AAE7D,eAAe;IACbF;IACAC;IACAC;AACF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/index.ts"],"sourcesContent":["import _ from \"underscore\";\
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/index.ts"],"sourcesContent":["import _ from \"underscore\";\nimport * as events from \"./events.js\";\nimport { default as qualitySelectorFactory } from \"./components/QualitySelector.js\";\nimport { default as sourceInterceptorFactory } from \"./middleware/SourceInterceptor.js\";\nimport SafeSeek from \"./util/SafeSeek.js\";\nimport type videojs from \"video.js/dist/video.es.js\";\nexport function QualitySelector(videojs: videojs) {\n qualitySelectorFactory(videojs);\n sourceInterceptorFactory(videojs);\n\n videojs.hook(\"setup\", function (player: videojs.Player) {\n function changeQuality(event: any, newSource: { src: any }) {\n var sources = player.currentSources(),\n currentTime = player.currentTime(),\n currentPlaybackRate = player.playbackRate(),\n isPaused = player.paused(),\n selectedSource;\n\n // Clear out any previously selected sources (see: #11)\n _.each(sources, function (source) {\n source.selected = false;\n });\n\n selectedSource = _.findWhere(sources, { src: newSource.src });\n // Note: `_.findWhere` returns a reference to an object. Thus the\n // following updates the original object in `sources`.\n selectedSource.selected = true;\n\n if (player._qualitySelectorSafeSeek) {\n player._qualitySelectorSafeSeek.onQualitySelectionChange();\n }\n\n player.src(sources);\n\n player.ready(function () {\n if (\n !player._qualitySelectorSafeSeek ||\n player._qualitySelectorSafeSeek.hasFinished()\n ) {\n // Either we don't have a pending seek action or the one that we have is no\n // longer applicable. This block must be within a `player.ready` callback\n // because the call to `player.src` above is asynchronous, and so not\n // having it within this `ready` callback would cause the SourceInterceptor\n // to execute after this block instead of before.\n //\n // We save the `currentTime` within the SafeSeek instance because if\n // multiple QUALITY_REQUESTED events are received before the SafeSeek\n // operation finishes, the player's `currentTime` will be `0` if the\n // player's `src` is updated but the player's `currentTime` has not yet\n // been set by the SafeSeek operation.\n player._qualitySelectorSafeSeek = new SafeSeek(player, currentTime);\n player.playbackRate(currentPlaybackRate);\n }\n\n if (!isPaused) {\n player.play();\n }\n });\n }\n\n // Add handler to switch sources when the user requests a change\n player.on(events.QUALITY_REQUESTED, changeQuality);\n });\n}\n\n//export const EVENTS = events;\n"],"names":["_","events","default","qualitySelectorFactory","sourceInterceptorFactory","SafeSeek","QualitySelector","videojs","hook","player","changeQuality","event","newSource","sources","currentSources","currentTime","currentPlaybackRate","playbackRate","isPaused","paused","selectedSource","each","source","selected","findWhere","src","_qualitySelectorSafeSeek","onQualitySelectionChange","ready","hasFinished","play","on","QUALITY_REQUESTED"],"mappings":"AAAA,OAAOA,OAAO,aAAa;AAC3B,YAAYC,YAAY,cAAc;AACtC,SAASC,WAAWC,sBAAsB,QAAQ,kCAAkC;AACpF,SAASD,WAAWE,wBAAwB,QAAQ,oCAAoC;AACxF,OAAOC,cAAc,qBAAqB;AAE1C,OAAO,SAASC,gBAAgBC,OAAgB;IAC9CJ,uBAAuBI;IACvBH,yBAAyBG;IAEzBA,QAAQC,IAAI,CAAC,SAAS,SAAUC,MAAsB;QACpD,SAASC,cAAcC,KAAU,EAAEC,SAAuB;YACxD,IAAIC,UAAUJ,OAAOK,cAAc,IACjCC,cAAcN,OAAOM,WAAW,IAChCC,sBAAsBP,OAAOQ,YAAY,IACzCC,WAAWT,OAAOU,MAAM,IACxBC;YAEF,uDAAuD;YACvDpB,EAAEqB,IAAI,CAACR,SAAS,SAAUS,MAAM;gBAC9BA,OAAOC,QAAQ,GAAG;YACpB;YAEAH,iBAAiBpB,EAAEwB,SAAS,CAACX,SAAS;gBAAEY,KAAKb,UAAUa,GAAG;YAAC;YAC3D,iEAAiE;YACjE,sDAAsD;YACtDL,eAAeG,QAAQ,GAAG;YAE1B,IAAId,OAAOiB,wBAAwB,EAAE;gBACnCjB,OAAOiB,wBAAwB,CAACC,wBAAwB;YAC1D;YAEAlB,OAAOgB,GAAG,CAACZ;YAEXJ,OAAOmB,KAAK,CAAC;gBACX,IACE,CAACnB,OAAOiB,wBAAwB,IAChCjB,OAAOiB,wBAAwB,CAACG,WAAW,IAC3C;oBACA,2EAA2E;oBAC3E,yEAAyE;oBACzE,qEAAqE;oBACrE,2EAA2E;oBAC3E,iDAAiD;oBACjD,EAAE;oBACF,oEAAoE;oBACpE,qEAAqE;oBACrE,oEAAoE;oBACpE,uEAAuE;oBACvE,sCAAsC;oBACtCpB,OAAOiB,wBAAwB,GAAG,IAAIrB,SAASI,QAAQM;oBACvDN,OAAOQ,YAAY,CAACD;gBACtB;gBAEA,IAAI,CAACE,UAAU;oBACbT,OAAOqB,IAAI;gBACb;YACF;QACF;QAEA,gEAAgE;QAChErB,OAAOsB,EAAE,CAAC9B,OAAO+B,iBAAiB,EAAEtB;IACtC;AACF,EAEA,+BAA+B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/middleware/SourceInterceptor.js"],"sourcesContent":["import _ from \"underscore\";\
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/middleware/SourceInterceptor.js"],"sourcesContent":["import _ from \"underscore\";\nimport * as events from \"../events.js\";\n\nexport default function SourceInterceptor(videojs) {\n videojs.use(\"*\", function (player) {\n return {\n setSource: function (playerSelectedSource, next) {\n var sources = player.currentSources(),\n userSelectedSource,\n chosenSource;\n\n if (player._qualitySelectorSafeSeek) {\n player._qualitySelectorSafeSeek.onPlayerSourcesChange();\n }\n\n if (!_.isEqual(sources, player._qualitySelectorPreviousSources)) {\n player.trigger(events.PLAYER_SOURCES_CHANGED, sources);\n player._qualitySelectorPreviousSources = sources;\n }\n\n // There are generally two source options, the one that videojs\n // auto-selects and the one that a \"user\" of this plugin has\n // supplied via the `selected` property. `selected` can come from\n // either the `<source>` tag or the list of sources passed to\n // videojs using `src()`.\n\n userSelectedSource = _.find(sources, function (source) {\n // Must check for boolean values as well as either the string 'true' or\n // 'selected'. When sources are set programmatically, the value will be a\n // boolean, but those coming from a `<source>` tag will be a string.\n return (\n source.selected === true ||\n source.selected === \"true\" ||\n source.selected === \"selected\"\n );\n });\n\n chosenSource = userSelectedSource || playerSelectedSource;\n\n player.trigger(events.QUALITY_SELECTED, chosenSource);\n\n // Pass along the chosen source\n next(null, chosenSource);\n },\n };\n });\n}\n"],"names":["_","events","SourceInterceptor","videojs","use","player","setSource","playerSelectedSource","next","sources","currentSources","userSelectedSource","chosenSource","_qualitySelectorSafeSeek","onPlayerSourcesChange","isEqual","_qualitySelectorPreviousSources","trigger","PLAYER_SOURCES_CHANGED","find","source","selected","QUALITY_SELECTED"],"mappings":"AAAA,OAAOA,OAAO,aAAa;AAC3B,YAAYC,YAAY,eAAe;AAEvC,eAAe,SAASC,kBAAkBC,OAAO;IAC/CA,QAAQC,GAAG,CAAC,KAAK,SAAUC,MAAM;QAC/B,OAAO;YACLC,WAAW,SAAUC,oBAAoB,EAAEC,IAAI;gBAC7C,IAAIC,UAAUJ,OAAOK,cAAc,IACjCC,oBACAC;gBAEF,IAAIP,OAAOQ,wBAAwB,EAAE;oBACnCR,OAAOQ,wBAAwB,CAACC,qBAAqB;gBACvD;gBAEA,IAAI,CAACd,EAAEe,OAAO,CAACN,SAASJ,OAAOW,+BAA+B,GAAG;oBAC/DX,OAAOY,OAAO,CAAChB,OAAOiB,sBAAsB,EAAET;oBAC9CJ,OAAOW,+BAA+B,GAAGP;gBAC3C;gBAEA,+DAA+D;gBAC/D,4DAA4D;gBAC5D,iEAAiE;gBACjE,6DAA6D;gBAC7D,yBAAyB;gBAEzBE,qBAAqBX,EAAEmB,IAAI,CAACV,SAAS,SAAUW,MAAM;oBACnD,uEAAuE;oBACvE,yEAAyE;oBACzE,oEAAoE;oBACpE,OACEA,OAAOC,QAAQ,KAAK,QACpBD,OAAOC,QAAQ,KAAK,UACpBD,OAAOC,QAAQ,KAAK;gBAExB;gBAEAT,eAAeD,sBAAsBJ;gBAErCF,OAAOY,OAAO,CAAChB,OAAOqB,gBAAgB,EAAEV;gBAExC,+BAA+B;gBAC/BJ,KAAK,MAAMI;YACb;QACF;IACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/util/SafeSeek.js"],"sourcesContent":["class SafeSeek {\
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/util/SafeSeek.js"],"sourcesContent":["class SafeSeek {\n constructor(player, seekToTime) {\n this._player = player;\n this._seekToTime = seekToTime;\n this._hasFinished = false;\n this._keepThisInstanceWhenPlayerSourcesChange = false;\n this._seekWhenSafe();\n }\n\n _seekWhenSafe() {\n var HAVE_FUTURE_DATA = 3;\n\n // `readyState` in Video.js is the same as the HTML5 Media element's `readyState`\n // property.\n //\n // `readyState` is an enum of 5 values (0-4), each of which represent a state of\n // readiness to play. The meaning of the values range from HAVE_NOTHING (0), meaning\n // no data is available to HAVE_ENOUGH_DATA (4), meaning all data is loaded and the\n // video can be played all the way through.\n //\n // In order to seek successfully, the `readyState` must be at least HAVE_FUTURE_DATA\n // (3).\n //\n // @see http://docs.videojs.com/player#readyState\n // @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/readyState\n // @see https://dev.w3.org/html5/spec-preview/media-elements.html#seek-the-media-controller\n if (this._player.readyState() < HAVE_FUTURE_DATA) {\n this._seekFn = this._seek.bind(this);\n // The `canplay` event means that the `readyState` is at least HAVE_FUTURE_DATA.\n this._player.one(\"canplay\", this._seekFn);\n } else {\n this._seek();\n }\n }\n\n onPlayerSourcesChange() {\n if (this._keepThisInstanceWhenPlayerSourcesChange) {\n // By setting this to `false`, we know that if the player sources change again\n // the change did not originate from a quality selection change, the new sources\n // are likely different from the old sources, and so this pending seek no longer\n // applies.\n this._keepThisInstanceWhenPlayerSourcesChange = false;\n } else {\n this.cancel();\n }\n }\n\n onQualitySelectionChange() {\n // `onPlayerSourcesChange` will cancel this pending seek unless we tell it not to.\n // We need to reuse this same pending seek instance because when the player is\n // paused, the `preload` attribute is set to `none`, and the user selects one\n // quality option and then another, the player cannot seek until the player has\n // enough data to do so (and the `canplay` event is fired) and thus on the second\n // selection the player's `currentTime()` is `0` and when the video plays we would\n // seek to `0` instead of the correct time.\n if (!this.hasFinished()) {\n this._keepThisInstanceWhenPlayerSourcesChange = true;\n }\n }\n\n _seek() {\n this._player.currentTime(this._seekToTime);\n this._keepThisInstanceWhenPlayerSourcesChange = false;\n this._hasFinished = true;\n }\n\n hasFinished() {\n return this._hasFinished;\n }\n\n cancel() {\n this._player.off(\"canplay\", this._seekFn);\n this._keepThisInstanceWhenPlayerSourcesChange = false;\n this._hasFinished = true;\n }\n}\n\nexport default SafeSeek;\n"],"names":["SafeSeek","constructor","player","seekToTime","_player","_seekToTime","_hasFinished","_keepThisInstanceWhenPlayerSourcesChange","_seekWhenSafe","HAVE_FUTURE_DATA","readyState","_seekFn","_seek","bind","one","onPlayerSourcesChange","cancel","onQualitySelectionChange","hasFinished","currentTime","off"],"mappings":"AAAA,MAAMA;IACJC,YAAYC,MAAM,EAAEC,UAAU,CAAE;QAC9B,IAAI,CAACC,OAAO,GAAGF;QACf,IAAI,CAACG,WAAW,GAAGF;QACnB,IAAI,CAACG,YAAY,GAAG;QACpB,IAAI,CAACC,wCAAwC,GAAG;QAChD,IAAI,CAACC,aAAa;IACpB;IAEAA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SAAS"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/index.ts"],"sourcesContent":["export * from \"./VideoBlock.js\";\
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/index.ts"],"sourcesContent":["export * from \"./VideoBlock.js\";\n"],"names":[],"mappings":"AAAA,cAAc,kBAAkB"}
|
|
@@ -3,6 +3,6 @@ interface ExtensionKitProps {
|
|
|
3
3
|
openAssetHQHandler: openAssetHQType;
|
|
4
4
|
dir?: "ltr" | "rtl";
|
|
5
5
|
}
|
|
6
|
-
export declare const ExtensionKit: ({ dir, openAssetHQHandler, }: ExtensionKitProps) => (import("@tiptap/core").Node<any, any> | import("@tiptap/core").Extension<any, any> | import("@tiptap/core").Mark<import("@tiptap/extension-
|
|
6
|
+
export declare const ExtensionKit: ({ dir, openAssetHQHandler, }: ExtensionKitProps) => (import("@tiptap/core").Node<any, any> | import("@tiptap/core").Extension<any, any> | import("@tiptap/core").Mark<import("@tiptap/extension-subscript").SubscriptExtensionOptions, any>)[];
|
|
7
7
|
export default ExtensionKit;
|
|
8
8
|
//# sourceMappingURL=extension-kit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension-kit.d.ts","sourceRoot":"","sources":["../../../../../src/fields/TiptapEditor/extensions/extension-kit.ts"],"names":[],"mappings":"AAiDA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAI9C,UAAU,iBAAiB;IACzB,kBAAkB,EAAE,eAAe,CAAC;IACpC,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,iCAGtB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"extension-kit.d.ts","sourceRoot":"","sources":["../../../../../src/fields/TiptapEditor/extensions/extension-kit.ts"],"names":[],"mappings":"AAiDA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAI9C,UAAU,iBAAiB;IACzB,kBAAkB,EAAE,eAAe,CAAC;IACpC,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,iCAGtB,iBAAiB,+LA6HnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/fields/TiptapEditor/extensions/extension-kit.ts"],"sourcesContent":["import {\
|
|
1
|
+
{"version":3,"sources":["../../../../../src/fields/TiptapEditor/extensions/extension-kit.ts"],"sourcesContent":["import {\n AICommand,\n AudioBlock,\n BlockquoteFigure,\n CharacterCount,\n Color,\n Document,\n Dropcursor,\n Facebook,\n Figcaption,\n FileHandler,\n Focus,\n FontFamily,\n FontSize,\n Heading,\n Highlight,\n HorizontalRule,\n LinkPreview,\n ImageBlock,\n InsideLinks,\n Instagram,\n Link,\n Linkedin,\n Placeholder,\n Selection,\n SlashCommand,\n StarterKit,\n Subscript,\n Superscript,\n TaskItem,\n TaskList,\n TextAlign,\n TextStyle,\n Tiktok,\n TrailingNode,\n Twitter,\n Typography,\n Underline,\n VideoBlock,\n Youtube,\n Iframe,\n BulletList,\n} from \"./index.js\";\n\nimport { ImageUpload } from \"./ImageUpload/ImageUpload.js\";\n\nimport History from \"@tiptap/extension-history\";\nimport { Markdown } from \"tiptap-markdown\";\nimport API from \"../lib/api.js\";\nimport { openAssetHQType } from \"../types.js\";\nimport i18next from \"i18next\";\nimport { getAssetActualSize } from \"./ImageUpload/getImageActualSize.js\";\n\ninterface ExtensionKitProps {\n openAssetHQHandler: openAssetHQType;\n dir?: \"ltr\" | \"rtl\";\n}\n\nexport const ExtensionKit = ({\n dir = \"ltr\",\n openAssetHQHandler,\n}: ExtensionKitProps) => [\n Markdown,\n Document,\n TaskList,\n TaskItem.configure({\n nested: true,\n }),\n Selection,\n Heading.configure({\n levels: [1, 2, 3, 4, 5, 6],\n }),\n HorizontalRule,\n StarterKit.configure({\n document: false,\n dropcursor: false,\n heading: false,\n horizontalRule: false,\n blockquote: false,\n history: false,\n codeBlock: false,\n }),\n TextStyle,\n // FontSize,\n // FontFamily,\n // Color,\n TrailingNode,\n Link.configure({\n openOnClick: false,\n }),\n // Highlight.configure({ multicolor: true }),\n Underline,\n CharacterCount.configure({ limit: 50000 }),\n ImageUpload.configure({\n openAssetHQHandler,\n }),\n ImageBlock,\n VideoBlock,\n AudioBlock,\n FileHandler.configure({\n allowedMimeTypes: [\"image/png\", \"image/jpeg\", \"image/gif\", \"image/webp\"],\n onDrop: (currentEditor, files, pos) => {\n const file = files[0];\n (async () => {\n openAssetHQHandler(\n (asset) => {\n let title = asset.title;\n if (\n i18next.language !== \"en\" &&\n !!asset.title_locale[i18next.language.toUpperCase()]\n ) {\n title = asset.title_locale[i18next.language.toUpperCase()];\n }\n const { actualHeight, actualWidth } = getAssetActualSize(asset);\n currentEditor\n .chain()\n .setImageBlockAt({\n pos,\n src: asset?.optimizedImageUrl || asset.fullUrl,\n caption: title,\n actualHeight,\n actualWidth,\n })\n .focus()\n .run();\n },\n file,\n \"image\"\n );\n })();\n },\n onPaste: (currentEditor, files) => {\n files.forEach(async () => {\n const url = await API.uploadImage();\n\n return currentEditor\n .chain()\n .setImageBlockAt({\n pos: currentEditor.state.selection.anchor,\n src: url,\n })\n .focus()\n .run();\n });\n },\n }),\n // Emoji.configure({\n // enableEmoticons: true,\n // suggestion: emojiSuggestion,\n // }),\n TextAlign.extend({\n addKeyboardShortcuts() {\n return {};\n },\n }).configure({\n defaultAlignment: dir === \"rtl\" ? \"right\" : \"left\",\n types: [\"heading\", \"paragraph\"],\n }),\n Subscript,\n Superscript,\n Typography,\n Placeholder.configure({\n includeChildren: true,\n showOnlyCurrent: false,\n placeholder: () => \"\",\n }),\n SlashCommand,\n Focus,\n Figcaption,\n BlockquoteFigure,\n Dropcursor.configure({\n width: 2,\n class: \"ProseMirror-dropcursor border-black\",\n }),\n History,\n Twitter,\n Tiktok,\n Instagram,\n Facebook,\n Linkedin,\n Youtube,\n InsideLinks,\n Iframe,\n AICommand,\n LinkPreview,\n BulletList,\n];\n\nexport default ExtensionKit;\n"],"names":["AICommand","AudioBlock","BlockquoteFigure","CharacterCount","Document","Dropcursor","Facebook","Figcaption","FileHandler","Focus","Heading","HorizontalRule","LinkPreview","ImageBlock","InsideLinks","Instagram","Link","Linkedin","Placeholder","Selection","SlashCommand","StarterKit","Subscript","Superscript","TaskItem","TaskList","TextAlign","TextStyle","Tiktok","TrailingNode","Twitter","Typography","Underline","VideoBlock","Youtube","Iframe","BulletList","ImageUpload","History","Markdown","API","i18next","getAssetActualSize","ExtensionKit","dir","openAssetHQHandler","configure","nested","levels","document","dropcursor","heading","horizontalRule","blockquote","history","codeBlock","openOnClick","limit","allowedMimeTypes","onDrop","currentEditor","files","pos","file","asset","title","language","title_locale","toUpperCase","actualHeight","actualWidth","chain","setImageBlockAt","src","optimizedImageUrl","fullUrl","caption","focus","run","onPaste","forEach","url","uploadImage","state","selection","anchor","extend","addKeyboardShortcuts","defaultAlignment","types","includeChildren","showOnlyCurrent","placeholder","width","class"],"mappings":"AAAA,SACEA,SAAS,EACTC,UAAU,EACVC,gBAAgB,EAChBC,cAAc,EAEdC,QAAQ,EACRC,UAAU,EACVC,QAAQ,EACRC,UAAU,EACVC,WAAW,EACXC,KAAK,EAGLC,OAAO,EAEPC,cAAc,EACdC,WAAW,EACXC,UAAU,EACVC,WAAW,EACXC,SAAS,EACTC,IAAI,EACJC,QAAQ,EACRC,WAAW,EACXC,SAAS,EACTC,YAAY,EACZC,UAAU,EACVC,SAAS,EACTC,WAAW,EACXC,QAAQ,EACRC,QAAQ,EACRC,SAAS,EACTC,SAAS,EACTC,MAAM,EACNC,YAAY,EACZC,OAAO,EACPC,UAAU,EACVC,SAAS,EACTC,UAAU,EACVC,OAAO,EACPC,MAAM,EACNC,UAAU,QACL,aAAa;AAEpB,SAASC,WAAW,QAAQ,+BAA+B;AAE3D,OAAOC,aAAa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GACLC,eAAe,CAAC;4BACfV;4BACAW,KAAKT,OAAOU,qBAAqBV,MAAMW,OAAO;4BAC9CC,SAASX;4BACTI;4BACAC;wBACF,GACCO,KAAK,GACLC,GAAG;oBACR,GACAf,MACA;gBAEJ,CAAA;YACF;YACAgB,SAAS,CAACnB,eAAeC;gBACvBA,MAAMmB,OAAO,CAAC;oBACZ,MAAMC,MAAM,MAAMzC,IAAI0C,WAAW;oBAEjC,OAAOtB,cACJW,KAAK,GACLC,eAAe,CAAC;wBACfV,KAAKF,cAAcuB,KAAK,CAACC,SAAS,CAACC,MAAM;wBACzCZ,KAAKQ;oBACP,GACCJ,KAAK,GACLC,GAAG;gBACR;YACF;QACF;QACA,oBAAoB;QACpB,2BAA2B;QAC3B,iCAAiC;QACjC,MAAM;QACNpD,UAAU4D,MAAM,CAAC;YACfC;gBACE,OAAO,CAAC;YACV;QACF,GAAGzC,SAAS,CAAC;YACX0C,kBAAkB5C,QAAQ,QAAQ,UAAU;YAC5C6C,OAAO;gBAAC;gBAAW;aAAY;QACjC;QACAnE;QACAC;QACAQ;QACAb,YAAY4B,SAAS,CAAC;YACpB4C,iBAAiB;YACjBC,iBAAiB;YACjBC,aAAa,IAAM;QACrB;QACAxE;QACAX;QACAF;QACAL;QACAG,WAAWyC,SAAS,CAAC;YACnB+C,OAAO;YACPC,OAAO;QACT;QACAxD;QACAR;QACAF;QACAb;QACAT;QACAW;QACAiB;QACApB;QACAqB;QACAnC;QACAY;QACAwB;KACD,CAAC;AAEF,eAAeO,aAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/fields/TiptapEditor/extensions/index.ts"],"sourcesContent":["// TODO: File causes circular dependency issue in ESLint\
|
|
1
|
+
{"version":3,"sources":["../../../../../src/fields/TiptapEditor/extensions/index.ts"],"sourcesContent":["// TODO: File causes circular dependency issue in ESLint\n/* eslint-disable */\nexport { StarterKit } from \"@tiptap/starter-kit\";\nexport { Highlight } from \"@tiptap/extension-highlight\";\nexport { CharacterCount } from \"@tiptap/extension-character-count\";\nexport { Underline } from \"@tiptap/extension-underline\";\nexport { Placeholder } from \"@tiptap/extension-placeholder\";\nexport { Emoji, gitHubEmojis } from \"@tiptap-pro/extension-emoji\";\nexport { TextAlign } from \"@tiptap/extension-text-align\";\nexport { TextStyle } from \"@tiptap/extension-text-style\";\nexport { FontFamily } from \"@tiptap/extension-font-family\";\nexport { Typography } from \"@tiptap/extension-typography\";\nexport { Color } from \"@tiptap/extension-color\";\nexport { FocusClasses as Focus } from \"@tiptap/extension-focus\";\nexport { Dropcursor } from \"@tiptap/extension-dropcursor\";\nexport { CollaborationCursor } from \"@tiptap/extension-collaboration-cursor\";\nexport { Subscript } from \"@tiptap/extension-subscript\";\nexport { TableOfContents } from \"@tiptap-pro/extension-table-of-contents\";\nexport { Superscript } from \"@tiptap/extension-superscript\";\nexport { CodeBlock } from \"@tiptap/extension-code-block\";\nexport { BulletList } from \"@tiptap/extension-bullet-list\";\nexport { OrderedList } from \"@tiptap/extension-ordered-list\";\nexport { Collaboration } from \"@tiptap/extension-collaboration\";\nexport { TaskItem } from \"@tiptap/extension-task-item\";\nexport { TaskList } from \"@tiptap/extension-task-list\";\nexport { FileHandler } from \"@tiptap-pro/extension-file-handler\";\n\nexport { Selection } from \"./Selection/Selection.js\";\nexport { Table, TableCell, TableHeader, TableRow } from \"./Table/index.js\";\nexport { HorizontalRule } from \"./HorizontalRule/HorizontalRule.js\";\nexport { Heading } from \"./Heading/Heading.js\";\nexport { Document } from \"./Document/Document.js\";\nexport { TrailingNode } from \"./TrailingNode/trailing-node.js\";\nexport { SlashCommand } from \"./SlashCommand/SlashCommand.js\";\nexport { FontSize } from \"./FontSize/FontSize.js\";\nexport { Figure } from \"./Figure/Figure.js\";\nexport { Figcaption } from \"./Figcaption/Figcaption.js\";\nexport { BlockquoteFigure } from \"./BlockquoteFigure/BlockquoteFigure.js\";\nexport { Quote } from \"./BlockquoteFigure/Quote/Quote.js\";\nexport { QuoteCaption } from \"./BlockquoteFigure/QuoteCaption/QuoteCaption.js\";\nexport { Link } from \"./Link/Link.js\";\nexport { ImageUpload } from \"./ImageUpload/ImageUpload.js\";\nexport { ImageBlock } from \"./ImageBlock/ImageBlock.js\";\nexport { VideoBlock } from \"./VideoBlock/VideoBlock.js\";\nexport { AudioBlock } from \"./AudioBlock/AudioBlock.js\";\n\nexport { Columns, Column } from \"./MultiColumn/index.js\";\nexport { AICommand } from \"./AICommand/AICommand.js\";\nexport { Iframe } from \"./Iframe/iframe.js\";\nexport {\n Twitter,\n Linkedin,\n Tiktok,\n Facebook,\n Instagram,\n Youtube,\n} from \"./SocialMedia/index.js\";\nexport { Paragraph } from \"./Paragraph/Paragraph.js\";\nexport { InsideLinks } from \"./InsideLinks/insideLinks.js\";\n\nexport { LinkPreview } from \"./LinkPreview/index.js\";\n\n// export * from \"./serverside/index.js\";\n"],"names":["StarterKit","Highlight","CharacterCount","Underline","Placeholder","Emoji","gitHubEmojis","TextAlign","TextStyle","FontFamily","Typography","Color","FocusClasses","Focus","Dropcursor","CollaborationCursor","Subscript","TableOfContents","Superscript","CodeBlock","BulletList","OrderedList","Collaboration","TaskItem","TaskList","FileHandler","Selection","Table","TableCell","TableHeader","TableRow","HorizontalRule","Heading","Document","TrailingNode","SlashCommand","FontSize","Figure","Figcaption","BlockquoteFigure","Quote","QuoteCaption","Link","ImageUpload","ImageBlock","VideoBlock","AudioBlock","Columns","Column","AICommand","Iframe","Twitter","Linkedin","Tiktok","Facebook","Instagram","Youtube","Paragraph","InsideLinks","LinkPreview"],"mappings":"AAAA,wDAAwD;AACxD,kBAAkB,GAClB,SAASA,UAAU,QAAQ,sBAAsB;AACjD,SAASC,SAAS,QAAQ,8BAA8B;AACxD,SAASC,cAAc,QAAQ,oCAAoC;AACnE,SAASC,SAAS,QAAQ,8BAA8B;AACxD,SAASC,WAAW,QAAQ,gCAAgC;AAC5D,SAASC,KAAK,EAAEC,YAAY,QAAQ,8BAA8B;AAClE,SAASC,S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QAAQ,6BAA6B;AACxD,SAASC,UAAU,QAAQ,6BAA6B;AAExD,SAASC,OAAO,EAAEC,MAAM,QAAQ,yBAAyB;AACzD,SAASC,SAAS,QAAQ,2BAA2B;AACrD,SAASC,MAAM,QAAQ,qBAAqB;AAC5C,SACEC,OAAO,EACPC,QAAQ,EACRC,MAAM,EACNC,QAAQ,EACRC,SAAS,EACTC,OAAO,QACF,yBAAyB;AAChC,SAASC,SAAS,QAAQ,2BAA2B;AACrD,SAASC,WAAW,QAAQ,+BAA+B;AAE3D,SAASC,WAAW,QAAQ,yBAAyB,CAErD,yCAAyC"}
|
package/dist/src/fields/TiptapEditor/extensions/serverside/EmbedContentInlineRenderer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/EmbedContentInlineRenderer.tsx"],"sourcesContent":["\"use client\";\
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/EmbedContentInlineRenderer.tsx"],"sourcesContent":["\"use client\";\n\nimport { Portal } from \"@radix-ui/react-portal\";\nimport { ComponentProps, memo, useEffect, useState } from \"react\";\n\nimport { renderEmbedContent } from \"./RenderEmbedClientSide.js\";\n\nconst CustomPortal = memo(\n ({\n content,\n getVideoAspect,\n ...props\n }: ComponentProps<typeof Portal> & { getVideoAspect }) => {\n useEffect(() => {}, []);\n return (\n <Portal {...props}>{renderEmbedContent(content, getVideoAspect)}</Portal>\n );\n }\n);\n\nexport function EmbedContentInlineRenderer({ body, getVideoAspect, prefix }) {\n const [mounted, setMounted] = useState(false);\n useEffect(() => {\n setMounted(true);\n }, []);\n\n if (!mounted) return null;\n return (\n <>\n {body.content\n .filter(\n (content) =>\n typeof content?.attrs?.[\"data-id\"] === \"number\" ||\n typeof content?.attrs?.[\"data-id\"] === \"string\"\n )\n .map((content) => {\n const container = document.getElementById(prefix);\n const element = container?.querySelector(\n `[data-id='${content.attrs[\"data-id\"]}']`\n );\n return (\n <CustomPortal\n key={`embed-content-inline-${content.attrs[\"data-id\"]}-${content.attrs.key}`}\n container={element}\n content={content}\n getVideoAspect={getVideoAspect}\n />\n );\n })}\n </>\n );\n}\n"],"names":["Portal","memo","useEffect","useState","renderEmbedContent","CustomPortal","content","getVideoAspect","props","EmbedContentInlineRenderer","body","prefix","mounted","setMounted","filter","attrs","map","container","document","getElementById","element","querySelector","key"],"mappings":"AAAA;;AAEA,SAASA,MAAM,QAAQ,yBAAyB;AAChD,SAAyBC,IAAI,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAQ;AAElE,SAASC,kBAAkB,QAAQ,6BAA6B;AAEhE,MAAMC,6BAAeJ,KACnB,CAAC,EACCK,OAAO,EACPC,cAAc,EACd,GAAGC,OACgD;IACnDN,UAAU,KAAO,GAAG,EAAE;IACtB,qBACE,KAACF;QAAQ,GAAGQ,KAAK;kBAAGJ,mBAAmBE,SAASC;;AAEpD;AAGF,OAAO,SAASE,2BAA2B,EAAEC,IAAI,EAAEH,cAAc,EAAEI,MAAM,EAAE;IACzE,MAAM,CAACC,SAASC,WAAW,GAAGV,SAAS;IACvCD,UAAU;QACRW,WAAW;IACb,GAAG,EAAE;IAEL,IAAI,CAACD,SAAS,OAAO;IACrB,qBACE;kBACGF,KAAKJ,OAAO,CACVQ,MAAM,CACL,CAACR,UACC,OAAOA,SAASS,OAAO,CAAC,UAAU,KAAK,YACvC,OAAOT,SAASS,OAAO,CAAC,UAAU,KAAK,UAE1CC,GAAG,CAAC,CAACV;YACJ,MAAMW,YAAYC,SAASC,cAAc,CAACR;YAC1C,MAAMS,UAAUH,WAAWI,cACzB,CAAC,UAAU,EAAEf,QAAQS,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC;YAE3C,qBACE,KAACV;gBAECY,WAAWG;gBACXd,SAASA;gBACTC,gBAAgBA;eAHX,CAAC,qBAAqB,EAAED,QAAQS,KAAK,CAAC,UAAU,CAAC,CAAC,EAAET,QAAQS,KAAK,CAACO,GAAG,EAAE;QAMlF;;AAGR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/EmbedContentSideRenderer.tsx"],"sourcesContent":["\"use client\";\
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/EmbedContentSideRenderer.tsx"],"sourcesContent":["\"use client\";\n\nimport { Portal } from \"@radix-ui/react-portal\";\nimport { ComponentProps, memo, useEffect, useState } from \"react\";\n\nimport { renderEmbedContent } from \"./RenderEmbedClientSide.js\";\n\nconst CustomPortal = memo(\n ({\n content,\n getVideoAspect,\n ...props\n }: ComponentProps<typeof Portal> & { getVideoAspect }) => {\n useEffect(() => {}, []);\n return (\n <Portal {...props}>{renderEmbedContent(content, getVideoAspect)}</Portal>\n );\n }\n);\n\nexport function EmbedContentSideRenderer({ body, getVideoAspect }) {\n const [mounted, setMounted] = useState(false);\n useEffect(() => {\n setMounted(true);\n }, []);\n\n if (!mounted) return null;\n return (\n <>\n {body.content\n .filter(\n (content) =>\n typeof content?.attrs?.[\"data-id\"] === \"number\" ||\n typeof content?.attrs?.[\"data-id\"] === \"string\"\n )\n .filter((content) => content?.attrs?.side)\n .map((content) => {\n return (\n <CustomPortal\n key={`embed-content-side-${content.attrs[\"data-id\"]}-${content.attrs.key}`}\n container={document?.querySelector(\n `[data-id='${content.attrs[\"data-id\"]}']`\n )}\n content={content}\n getVideoAspect={getVideoAspect}\n />\n );\n })}\n </>\n );\n}\n"],"names":["Portal","memo","useEffect","useState","renderEmbedContent","CustomPortal","content","getVideoAspect","props","EmbedContentSideRenderer","body","mounted","setMounted","filter","attrs","side","map","container","document","querySelector","key"],"mappings":"AAAA;;AAEA,SAASA,MAAM,QAAQ,yBAAyB;AAChD,SAAyBC,IAAI,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAQ;AAElE,SAASC,kBAAkB,QAAQ,6BAA6B;AAEhE,MAAMC,6BAAeJ,KACnB,CAAC,EACCK,OAAO,EACPC,cAAc,EACd,GAAGC,OACgD;IACnDN,UAAU,KAAO,GAAG,EAAE;IACtB,qBACE,KAACF;QAAQ,GAAGQ,KAAK;kBAAGJ,mBAAmBE,SAASC;;AAEpD;AAGF,OAAO,SAASE,yBAAyB,EAAEC,IAAI,EAAEH,cAAc,EAAE;IAC/D,MAAM,CAACI,SAASC,WAAW,GAAGT,SAAS;IACvCD,UAAU;QACRU,WAAW;IACb,GAAG,EAAE;IAEL,IAAI,CAACD,SAAS,OAAO;IACrB,qBACE;kBACGD,KAAKJ,OAAO,CACVO,MAAM,CACL,CAACP,UACC,OAAOA,SAASQ,OAAO,CAAC,UAAU,KAAK,YACvC,OAAOR,SAASQ,OAAO,CAAC,UAAU,KAAK,UAE1CD,MAAM,CAAC,CAACP,UAAYA,SAASQ,OAAOC,MACpCC,GAAG,CAAC,CAACV;YACJ,qBACE,KAACD;gBAECY,WAAWC,UAAUC,cACnB,CAAC,UAAU,EAAEb,QAAQQ,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC;gBAE3CR,SAASA;gBACTC,gBAAgBA;eALX,CAAC,mBAAmB,EAAED,QAAQQ,KAAK,CAAC,UAAU,CAAC,CAAC,EAAER,QAAQQ,KAAK,CAACM,GAAG,EAAE;QAQhF;;AAGR"}
|
package/dist/src/fields/TiptapEditor/extensions/serverside/EmbedContentSidebarRenderer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/EmbedContentSidebarRenderer.tsx"],"sourcesContent":["\"use client\";\
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/EmbedContentSidebarRenderer.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useRef, useState } from \"react\";\nimport { renderEmbedContent } from \"./RenderEmbedClientSide.js\";\nconst HEIGHT = 320;\n\nfunction getContainerElement(containerId) {\n if (typeof window === \"undefined\" || !containerId) return null;\n return document.getElementById(containerId);\n}\n\nexport function EmbedContentSidebarRenderer({\n body,\n containerId,\n getVideoAspect,\n}) {\n const [mounted, setMounted] = useState(false);\n useEffect(() => {\n setTimeout(() => {\n setMounted(true);\n }, 200);\n }, []);\n const containerEl = useRef(getContainerElement(containerId));\n if (!mounted || typeof window === \"undefined\") return null;\n if (!containerEl.current) {\n containerEl.current = getContainerElement(containerId);\n }\n let lastRenderedPixel =\n containerEl.current?.getBoundingClientRect()?.top + window.scrollY ||\n window.innerHeight;\n\n return (\n <>\n {body.content\n .filter((content) => content?.attrs?.[\"data-id\"])\n .filter((content) => content?.attrs?.side)\n .map((content) => {\n const el = document?.querySelector(\n `[data-id='${content.attrs[\"data-id\"]}']`\n );\n const relativeTopPosition = el.getBoundingClientRect().top;\n const topPosition = relativeTopPosition + window.scrollY;\n\n const tempBottomPixel = lastRenderedPixel;\n\n const marginTop = Math.max(\n 8,\n topPosition - tempBottomPixel - HEIGHT / 2\n );\n lastRenderedPixel = topPosition + HEIGHT;\n\n return (\n <div\n key={`embed-content-sidebar-${content.attrs[\"data-id\"]}-${content.attrs.key}`}\n className=\"w-full\"\n style={{ marginTop }}\n >\n {renderEmbedContent(content, getVideoAspect)}\n </div>\n );\n })}\n </>\n );\n}\n"],"names":["useEffect","useRef","useState","renderEmbedContent","HEIGHT","getContainerElement","containerId","window","document","getElementById","EmbedContentSidebarRenderer","body","getVideoAspect","mounted","setMounted","setTimeout","containerEl","current","lastRenderedPixel","getBoundingClientRect","top","scrollY","innerHeight","content","filter","attrs","side","map","el","querySelector","relativeTopPosition","topPosition","tempBottomPixel","marginTop","Math","max","div","className","style","key"],"mappings":"AAAA;;AAEA,SAASA,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AACpD,SAASC,kBAAkB,QAAQ,6BAA6B;AAChE,MAAMC,SAAS;AAEf,SAASC,oBAAoBC,WAAW;IACtC,IAAI,OAAOC,WAAW,eAAe,CAACD,aAAa,OAAO;IAC1D,OAAOE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acebookServerside.ts"],"sourcesContent":["import { Node, mergeAttributes } from \"@tiptap/core\";\
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/FacebookServerside.ts"],"sourcesContent":["import { Node, mergeAttributes } from \"@tiptap/core\";\n\nexport const FacebookServerside = Node.create({\n name: \"facebook\",\n\n group: \"block\",\n content: \"inline*\",\n\n parseHTML() {\n return [\n {\n tag: 'a[data-type=\"facebook\"]',\n },\n ];\n },\n addAttributes() {\n return {\n url: { default: null },\n \"data-id\": { default: null },\n class: { default: \"inline-facebook\" },\n };\n },\n renderHTML({ HTMLAttributes }) {\n return [\n \"div\",\n mergeAttributes(HTMLAttributes, {\n \"data-type\": \"facebook\",\n class: `react-renderer node-facebook ${HTMLAttributes.class}`,\n }),\n 0,\n ];\n },\n});\n"],"names":["Node","mergeAttributes","FacebookServerside","create","name","group","content","parseHTML","tag","addAttributes","url","default","class","renderHTML","HTMLAttributes"],"mappings":"AAAA,SAASA,IAAI,EAAEC,eAAe,QAAQ,eAAe;AAErD,OAAO,MAAMC,qBAAqBF,KAAKG,MAAM,CAAC;IAC5CC,MAAM;IAENC,OAAO;IACPC,SAAS;IAETC;QACE,OAAO;YACL;gBACEC,KAAK;YACP;SACD;IACH;IACAC;QACE,OAAO;YACLC,KAAK;gBAAEC,SAAS;YAAK;YACrB,WAAW;gBAAEA,SAAS;YAAK;YAC3BC,OAAO;gBAAED,SAAS;YAAkB;QACtC;IACF;IACAE,YAAW,EAAEC,cAAc,EAAE;QAC3B,OAAO;YACL;YACAb,gBAAgBa,gBAAgB;gBAC9B,aAAa;gBACbF,OAAO,CAAC,6BAA6B,EAAEE,eAAeF,KAAK,EAAE;YAC/D;YACA;SACD;IACH;AACF,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/IFrameServerside.ts"],"sourcesContent":["import { Node } from \"@tiptap/core\";\
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/IFrameServerside.ts"],"sourcesContent":["import { Node } from \"@tiptap/core\";\n\nexport interface IframeOptions {\n allowFullscreen: boolean;\n HTMLAttributes: {\n [key: string]: any;\n };\n}\n\ndeclare module \"@tiptap/core\" {\n interface Commands<ReturnType> {\n iframe: {\n /**\n * Add an iframe\n */\n setIframe: (options?: { src: string }) => ReturnType;\n insertIframe: (src?: string, className?: string) => ReturnType;\n setHtml: (value: string) => ReturnType;\n };\n }\n}\n\nexport const IFrameServerside = Node.create<IframeOptions>({\n name: \"iframe\",\n\n group: \"block\",\n content: \"inline*\",\n draggable: true,\n\n atom: true,\n\n addOptions() {\n return {\n allowFullscreen: true,\n HTMLAttributes: {\n class: \"iframe-wrapper\",\n },\n };\n },\n\n addAttributes() {\n return {\n src: {\n default: null,\n },\n frameborder: {\n default: 0,\n },\n allowfullscreen: {\n default: this.options.allowFullscreen,\n parseHTML: () => this.options.allowFullscreen,\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"iframe\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", this.options.HTMLAttributes, [\"iframe\", HTMLAttributes]];\n },\n});\n"],"names":["Node","IFrameServerside","create","name","group","content","draggable","atom","addOptions","allowFullscreen","HTMLAttributes","class","addAttributes","src","default","frameborder","allowfullscreen","options","parseHTML","tag","renderHTML"],"mappings":"AAAA,SAASA,IAAI,QAAQ,eAAe;AAsBpC,OAAO,MAAMC,mBAAmBD,KAAKE,MAAM,CAAgB;IACzDC,MAAM;IAENC,OAAO;IACPC,SAAS;IACTC,WAAW;IAEXC,MAAM;IAENC;QACE,OAAO;YACLC,iBAAiB;YACjBC,gBAAgB;gBACdC,OAAO;YACT;QACF;IACF;IAEAC;QACE,OAAO;YACLC,KAAK;gBACHC,SAAS;YACX;YACAC,aAAa;gBACXD,SAAS;YACX;YACAE,iBAAiB;gBACfF,SAAS,IAAI,CAACG,OAAO,CAACR,eAAe;gBACrCS,WAAW,IAAM,IAAI,CAACD,OAAO,CAACR,eAAe;YAC/C;QACF;IACF;IAEAS;QACE,OAAO;YACL;gBACEC,KAAK;YACP;SACD;IACH;IAEAC,YAAW,EAAEV,cAAc,EAAE;QAC3B,OAAO;YAAC;YAAO,IAAI,CAACO,OAAO,CAACP,cAAc;YAAE;gBAAC;gBAAUA;aAAe;SAAC;IACzE;AACF,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/ImageBlockServerside.ts"],"sourcesContent":["import { Node, mergeAttributes } from '@tiptap/core';\
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/ImageBlockServerside.ts"],"sourcesContent":["import { Node, mergeAttributes } from '@tiptap/core';\n\nexport const ImageBlockServerside = Node.create({\n name: 'imageBlock',\n group: 'block',\n content: 'inline*',\n\n parseHTML() {\n return [\n {\n tag: 'img[src*=\"tiptap.dev\"]:not([src^=\"data:\"]), img[src*=\"windows.net\"]:not([src^=\"data:\"])',\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\n 'div', // Create a div wrapper\n mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, {\n class: 'image-wrapper',\n }), // Add any desired attributes to the wrapper\n ];\n },\n\n // renderHTML({ HTMLAttributes }) {\n // return [\n // 'img',\n // mergeAttributes(this.options.HTMLAttributes, HTMLAttributes),\n // ];\n // },\n\n addAttributes() {\n return {\n 'data-id': { default: null },\n src: {\n default: '',\n parseHTML: element => element.getAttribute('src'),\n renderHTML: attributes => ({\n src: attributes.src,\n }),\n },\n width: {\n default: '100%',\n parseHTML: element => element.getAttribute('data-width'),\n renderHTML: attributes => ({\n 'data-width': attributes.width,\n }),\n },\n align: {\n default: 'center',\n parseHTML: element => element.getAttribute('data-align'),\n renderHTML: attributes => ({\n 'data-align': attributes.align,\n }),\n },\n alt: {\n default: undefined,\n parseHTML: element => element.getAttribute('alt'),\n renderHTML: attributes => ({\n alt: attributes.alt,\n }),\n },\n };\n },\n});\n"],"names":["Node","mergeAttributes","ImageBlockServerside","create","name","group","content","parseHTML","tag","renderHTML","HTMLAttributes","options","class","addAttributes","default","src","element","getAttribute","attributes","width","align","alt","undefined"],"mappings":"AAAA,SAASA,IAAI,EAAEC,eAAe,QAAQ,eAAe;AAErD,OAAO,MAAMC,uBAAuBF,KAAKG,MAAM,CAAC;IAC9CC,MAAM;IACNC,OAAO;IACPC,SAAS;IAETC;QACE,OAAO;YACL;gBACEC,KAAK;YACP;SACD;IACH;IAEAC,YAAW,EAAEC,cAAc,EAAE;QAC3B,OAAO;YACL;YACAT,gBAAgB,IAAI,CAACU,OAAO,CAACD,cAAc,EAAEA,gBAAgB;gBAC3DE,OAAO;YACT;SACD;IACH;IAEA,mCAAmC;IACnC,aAAa;IACb,aAAa;IACb,oEAAoE;IACpE,OAAO;IACP,KAAK;IAELC;QACE,OAAO;YACL,WAAW;gBAAEC,SAAS;YAAK;YAC3BC,KAAK;gBACHD,SAAS;gBACTP,WAAWS,CAAAA,UAAWA,QAAQC,YAAY,CAAC;gBAC3CR,YAAYS,CAAAA,aAAe,CAAA;wBACzBH,KAAKG,WAAWH,GAAG;oBACrB,CAAA;YACF;YACAI,OAAO;gBACLL,SAAS;gBACTP,WAAWS,CAAAA,UAAWA,QAAQC,YAAY,CAAC;gBAC3CR,YAAYS,CAAAA,aAAe,CAAA;wBACzB,cAAcA,WAAWC,KAAK;oBAChC,CAAA;YACF;YACAC,OAAO;gBACLN,SAAS;gBACTP,WAAWS,CAAAA,UAAWA,QAAQC,YAAY,CAAC;gBAC3CR,YAAYS,CAAAA,aAAe,CAAA;wBACzB,cAAcA,WAAWE,KAAK;oBAChC,CAAA;YACF;YACAC,KAAK;gBACHP,SAASQ;gBACTf,WAAWS,CAAAA,UAAWA,QAAQC,YAAY,CAAC;gBAC3CR,YAAYS,CAAAA,aAAe,CAAA;wBACzBG,KAAKH,WAAWG,GAAG;oBACrB,CAAA;YACF;QACF;IACF;AACF,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/InsideLinkServerside.ts"],"sourcesContent":["import { Node, mergeAttributes } from \"@tiptap/core\";\
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/InsideLinkServerside.ts"],"sourcesContent":["import { Node, mergeAttributes } from \"@tiptap/core\";\n\nexport const InsideLinkServerside = Node.create({\n name: \"insideLinks\",\n\n group: \"block\",\n content: \"inline*\",\n draggable: true,\n\n // content: 'inline*',\n\n parseHTML() {\n return [\n {\n tag: 'div[data-type=\"insideLinks\"]',\n },\n ];\n },\n\n addAttributes() {\n return {\n thumbnail: { default: null },\n title: { default: null },\n id: { default: null },\n type: { default: null },\n url: { default: null },\n };\n },\n\n addKeyboardShortcuts() {\n return {\n \"Mod-Enter\": () => {\n return this.editor\n .chain()\n .insertContentAt(this.editor.state.selection.head, {\n type: this.type.name,\n })\n .focus()\n .run();\n },\n };\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\n \"div\",\n mergeAttributes(HTMLAttributes, { \"data-type\": \"insideLinks\" }),\n 0,\n ];\n },\n});\n"],"names":["Node","mergeAttributes","InsideLinkServerside","create","name","group","content","draggable","parseHTML","tag","addAttributes","thumbnail","default","title","id","type","url","addKeyboardShortcuts","editor","chain","insertContentAt","state","selection","head","focus","run","renderHTML","HTMLAttributes"],"mappings":"AAAA,SAASA,IAAI,EAAEC,eAAe,QAAQ,eAAe;AAErD,OAAO,MAAMC,uBAAuBF,KAAKG,MAAM,CAAC;IAC9CC,MAAM;IAENC,OAAO;IACPC,SAAS;IACTC,WAAW;IAEX,sBAAsB;IAEtBC;QACE,OAAO;YACL;gBACEC,KAAK;YACP;SACD;IACH;IAEAC;QACE,OAAO;YACLC,WAAW;gBAAEC,SAAS;YAAK;YAC3BC,OAAO;gBAAED,SAAS;YAAK;YACvBE,IAAI;gBAAEF,SAAS;YAAK;YACpBG,MAAM;gBAAEH,SAAS;YAAK;YACtBI,KAAK;gBAAEJ,SAAS;YAAK;QACvB;IACF;IAEAK;QACE,OAAO;YACL,aAAa;gBACX,OAAO,IAAI,CAACC,MAAM,CACfC,KAAK,GACLC,eAAe,CAAC,IAAI,CAACF,MAAM,CAACG,KAAK,CAACC,SAAS,CAACC,IAAI,EAAE;oBACjDR,MAAM,IAAI,CAACA,IAAI,CAACX,IAAI;gBACtB,GACCoB,KAAK,GACLC,GAAG;YACR;QACF;IACF;IAEAC,YAAW,EAAEC,cAAc,EAAE;QAC3B,OAAO;YACL;YACA1B,gBAAgB0B,gBAAgB;gBAAE,aAAa;YAAc;YAC7D;SACD;IACH;AACF,GAAG"}
|