lt-ppt 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +661 -0
- package/README.md +31 -0
- package/dist/InnerApp-Cw-WNV5d.js +96942 -0
- package/dist/favicon.ico +0 -0
- package/dist/imgs/template_1.webp +0 -0
- package/dist/imgs/template_2.webp +0 -0
- package/dist/imgs/template_3.webp +0 -0
- package/dist/imgs/template_4.webp +0 -0
- package/dist/imgs/template_5.webp +0 -0
- package/dist/imgs/template_6.webp +0 -0
- package/dist/imgs/template_7.webp +0 -0
- package/dist/imgs/template_8.webp +0 -0
- package/dist/index-Bp6Exf0_.js +166 -0
- package/dist/index-lXMdfvq4.js +8 -0
- package/dist/lib-CcU3sBPZ.js +1907 -0
- package/dist/logo.png +0 -0
- package/dist/lt-ppt.css +7 -0
- package/dist/lt-ppt.es.js +5 -0
- package/dist/lt-ppt.umd.js +461 -0
- package/dist/mocks/AIPPT.json +475 -0
- package/dist/mocks/AIPPT_Outline.md +69 -0
- package/dist/mocks/imgs.json +482 -0
- package/dist/mocks/slides.json +184 -0
- package/dist/mocks/template_1.json +1 -0
- package/dist/mocks/template_2.json +1 -0
- package/dist/mocks/template_3.json +1 -0
- package/dist/mocks/template_4.json +1 -0
- package/dist/mocks/template_5.json +1 -0
- package/dist/mocks/template_6.json +1 -0
- package/dist/mocks/template_7.json +1 -0
- package/dist/mocks/template_8.json +1 -0
- package/dist/pinia-CVat9nJz.js +4417 -0
- package/dist/screen-B0Lx73x7.js +12797 -0
- package/dist/tippy.esm-Dos-q4Dz.js +1711 -0
- package/dist/types/lib.d.ts +2 -0
- package/dist/types/src/InnerApp.vue.d.ts +10 -0
- package/dist/types/src/LtPPT.vue.d.ts +22 -0
- package/dist/types/src/components/Button.vue.d.ts +28 -0
- package/dist/types/src/components/ButtonGroup.vue.d.ts +16 -0
- package/dist/types/src/components/Checkbox.vue.d.ts +19 -0
- package/dist/types/src/components/CheckboxButton.vue.d.ts +16 -0
- package/dist/types/src/components/ColorButton.vue.d.ts +5 -0
- package/dist/types/src/components/ColorListButton.vue.d.ts +5 -0
- package/dist/types/src/components/ColorPicker/Alpha.vue.d.ts +12 -0
- package/dist/types/src/components/ColorPicker/Checkboard.vue.d.ts +11 -0
- package/dist/types/src/components/ColorPicker/EditableInput.vue.d.ts +10 -0
- package/dist/types/src/components/ColorPicker/Hue.vue.d.ts +13 -0
- package/dist/types/src/components/ColorPicker/Saturation.vue.d.ts +13 -0
- package/dist/types/src/components/ColorPicker/index.vue.d.ts +11 -0
- package/dist/types/src/components/Contextmenu/MenuContent.vue.d.ts +7 -0
- package/dist/types/src/components/Contextmenu/index.vue.d.ts +9 -0
- package/dist/types/src/components/Contextmenu/types.d.ts +13 -0
- package/dist/types/src/components/Divider.vue.d.ts +9 -0
- package/dist/types/src/components/Drawer.vue.d.ts +24 -0
- package/dist/types/src/components/FileInput.vue.d.ts +20 -0
- package/dist/types/src/components/FullscreenSpin.vue.d.ts +11 -0
- package/dist/types/src/components/GradientBar.vue.d.ts +15 -0
- package/dist/types/src/components/ImageWaterfallViewer.vue.d.ts +35 -0
- package/dist/types/src/components/Input.vue.d.ts +41 -0
- package/dist/types/src/components/LaTeXEditor/FormulaContent.vue.d.ts +7 -0
- package/dist/types/src/components/LaTeXEditor/SymbolContent.vue.d.ts +5 -0
- package/dist/types/src/components/LaTeXEditor/hfmath.d.ts +2 -0
- package/dist/types/src/components/LaTeXEditor/index.vue.d.ts +73 -0
- package/dist/types/src/components/LanguageSwitch.vue.d.ts +2 -0
- package/dist/types/src/components/Message.vue.d.ts +23 -0
- package/dist/types/src/components/Modal.vue.d.ts +32 -0
- package/dist/types/src/components/MoveablePanel.vue.d.ts +41 -0
- package/dist/types/src/components/NumberInput.vue.d.ts +38 -0
- package/dist/types/src/components/OutlineEditor.vue.d.ts +9 -0
- package/dist/types/src/components/Popover.vue.d.ts +38 -0
- package/dist/types/src/components/PopoverMenuItem.vue.d.ts +18 -0
- package/dist/types/src/components/RadioButton.vue.d.ts +15 -0
- package/dist/types/src/components/RadioGroup.vue.d.ts +19 -0
- package/dist/types/src/components/Select.vue.d.ts +143 -0
- package/dist/types/src/components/SelectCustom.vue.d.ts +20 -0
- package/dist/types/src/components/SelectGroup.vue.d.ts +9 -0
- package/dist/types/src/components/Slider.vue.d.ts +22 -0
- package/dist/types/src/components/Switch.vue.d.ts +12 -0
- package/dist/types/src/components/Tabs.vue.d.ts +26 -0
- package/dist/types/src/components/TextArea.vue.d.ts +29 -0
- package/dist/types/src/components/TextColorButton.vue.d.ts +12 -0
- package/dist/types/src/components/WritingBoard.vue.d.ts +32 -0
- package/dist/types/src/configs/animation.d.ts +34 -0
- package/dist/types/src/configs/chart.d.ts +4 -0
- package/dist/types/src/configs/element.d.ts +2 -0
- package/dist/types/src/configs/font.d.ts +4 -0
- package/dist/types/src/configs/hotkey.d.ts +41 -0
- package/dist/types/src/configs/imageClip.d.ts +25 -0
- package/dist/types/src/configs/latex.d.ts +11 -0
- package/dist/types/src/configs/lines.d.ts +16 -0
- package/dist/types/src/configs/mime.d.ts +1 -0
- package/dist/types/src/configs/shapes.d.ts +26 -0
- package/dist/types/src/configs/storage.d.ts +1 -0
- package/dist/types/src/configs/symbol.d.ts +5 -0
- package/dist/types/src/configs/theme.d.ts +11 -0
- package/dist/types/src/directive/clickOutside.d.ts +3 -0
- package/dist/types/src/directive/contextmenu.d.ts +3 -0
- package/dist/types/src/directive/index.d.ts +5 -0
- package/dist/types/src/directive/loading.d.ts +3 -0
- package/dist/types/src/directive/tooltip.d.ts +3 -0
- package/dist/types/src/hooks/useAIPPT.d.ts +14 -0
- package/dist/types/src/hooks/useAddSlidesOrElements.d.ts +6 -0
- package/dist/types/src/hooks/useAlignActiveElement.d.ts +5 -0
- package/dist/types/src/hooks/useAlignElementToCanvas.d.ts +5 -0
- package/dist/types/src/hooks/useCombineElement.d.ts +6 -0
- package/dist/types/src/hooks/useCopyAndPasteElement.d.ts +7 -0
- package/dist/types/src/hooks/useCreateElement.d.ts +36 -0
- package/dist/types/src/hooks/useDeleteElement.d.ts +5 -0
- package/dist/types/src/hooks/useExport.d.ts +11 -0
- package/dist/types/src/hooks/useGlobalHotkey.d.ts +2 -0
- package/dist/types/src/hooks/useHideElement.d.ts +6 -0
- package/dist/types/src/hooks/useHistorySnapshot.d.ts +6 -0
- package/dist/types/src/hooks/useImport.d.ts +15 -0
- package/dist/types/src/hooks/useLink.d.ts +6 -0
- package/dist/types/src/hooks/useLoadSlides.d.ts +4 -0
- package/dist/types/src/hooks/useLockElement.d.ts +6 -0
- package/dist/types/src/hooks/useMoveElement.d.ts +4 -0
- package/dist/types/src/hooks/useOrderElement.d.ts +6 -0
- package/dist/types/src/hooks/usePasteDataTransfer.d.ts +7 -0
- package/dist/types/src/hooks/usePasteEvent.d.ts +2 -0
- package/dist/types/src/hooks/usePasteTextClipboardData.d.ts +8 -0
- package/dist/types/src/hooks/useScaleCanvas.d.ts +7 -0
- package/dist/types/src/hooks/useScreening.d.ts +6 -0
- package/dist/types/src/hooks/useSearch.d.ts +44 -0
- package/dist/types/src/hooks/useSectionHandler.d.ts +8 -0
- package/dist/types/src/hooks/useSelectElement.d.ts +5 -0
- package/dist/types/src/hooks/useShapeFormatPainter.d.ts +4 -0
- package/dist/types/src/hooks/useSlideBackgroundStyle.d.ts +21 -0
- package/dist/types/src/hooks/useSlideHandler.d.ts +16 -0
- package/dist/types/src/hooks/useSlideTheme.d.ts +14 -0
- package/dist/types/src/hooks/useTextFormatPainter.d.ts +4 -0
- package/dist/types/src/hooks/useUniformDisplayElement.d.ts +6 -0
- package/dist/types/src/lib.d.ts +5 -0
- package/dist/types/src/locales/en.d.ts +859 -0
- package/dist/types/src/locales/index.d.ts +1753 -0
- package/dist/types/src/locales/zh-CN.d.ts +887 -0
- package/dist/types/src/services/axios.d.ts +2 -0
- package/dist/types/src/services/fetch.d.ts +2 -0
- package/dist/types/src/services/index.d.ts +36 -0
- package/dist/types/src/store/index.d.ts +6 -0
- package/dist/types/src/store/keyboard.d.ts +16 -0
- package/dist/types/src/store/main.d.ts +915 -0
- package/dist/types/src/store/screen.d.ts +6 -0
- package/dist/types/src/store/slides.d.ts +1559 -0
- package/dist/types/src/store/snapshot.d.ts +21 -0
- package/dist/types/src/types/AIPPT.d.ts +36 -0
- package/dist/types/src/types/edit.d.ts +111 -0
- package/dist/types/src/types/export.d.ts +1 -0
- package/dist/types/src/types/injectKey.d.ts +10 -0
- package/dist/types/src/types/lt-ppt.d.ts +30 -0
- package/dist/types/src/types/mobile.d.ts +1 -0
- package/dist/types/src/types/slides.d.ts +732 -0
- package/dist/types/src/types/toolbar.d.ts +9 -0
- package/dist/types/src/utils/clipboard.d.ts +9 -0
- package/dist/types/src/utils/common.d.ts +18 -0
- package/dist/types/src/utils/crypto.d.ts +10 -0
- package/dist/types/src/utils/database.d.ts +17 -0
- package/dist/types/src/utils/element.d.ts +94 -0
- package/dist/types/src/utils/emitter.d.ts +23 -0
- package/dist/types/src/utils/font.d.ts +1 -0
- package/dist/types/src/utils/fonts.d.ts +5 -0
- package/dist/types/src/utils/fullscreen.d.ts +3 -0
- package/dist/types/src/utils/htmlParser/format.d.ts +3 -0
- package/dist/types/src/utils/htmlParser/index.d.ts +4 -0
- package/dist/types/src/utils/htmlParser/lexer.d.ts +2 -0
- package/dist/types/src/utils/htmlParser/parser.d.ts +15 -0
- package/dist/types/src/utils/htmlParser/stringify.d.ts +3 -0
- package/dist/types/src/utils/htmlParser/tags.d.ts +4 -0
- package/dist/types/src/utils/htmlParser/types.d.ts +55 -0
- package/dist/types/src/utils/iframe-sdk/index.d.ts +52 -0
- package/dist/types/src/utils/iframe-sdk/types.d.ts +30 -0
- package/dist/types/src/utils/image.d.ts +32 -0
- package/dist/types/src/utils/message.d.ts +28 -0
- package/dist/types/src/utils/print.d.ts +7 -0
- package/dist/types/src/utils/prosemirror/commands/replaceText.d.ts +2 -0
- package/dist/types/src/utils/prosemirror/commands/setListStyle.d.ts +4 -0
- package/dist/types/src/utils/prosemirror/commands/setTextAlign.d.ts +5 -0
- package/dist/types/src/utils/prosemirror/commands/setTextIndent.d.ts +3 -0
- package/dist/types/src/utils/prosemirror/commands/toggleList.d.ts +8 -0
- package/dist/types/src/utils/prosemirror/index.d.ts +4 -0
- package/dist/types/src/utils/prosemirror/plugins/index.d.ts +10 -0
- package/dist/types/src/utils/prosemirror/plugins/inputrules.d.ts +7 -0
- package/dist/types/src/utils/prosemirror/plugins/keymap.d.ts +3 -0
- package/dist/types/src/utils/prosemirror/plugins/placeholder.d.ts +2 -0
- package/dist/types/src/utils/prosemirror/schema/index.d.ts +24 -0
- package/dist/types/src/utils/prosemirror/schema/marks.d.ts +17 -0
- package/dist/types/src/utils/prosemirror/schema/nodes.d.ts +11 -0
- package/dist/types/src/utils/prosemirror/utils.d.ts +69 -0
- package/dist/types/src/utils/selection.d.ts +1 -0
- package/dist/types/src/utils/svg2Base64.d.ts +1 -0
- package/dist/types/src/utils/svgPathParser.d.ts +120 -0
- package/dist/types/src/utils/textParser.d.ts +5 -0
- package/dist/types/src/views/Editor/AIPPTDialog.vue.d.ts +111 -0
- package/dist/types/src/views/Editor/Canvas/AlignmentLine.vue.d.ts +9 -0
- package/dist/types/src/views/Editor/Canvas/EditableElement.vue.d.ts +12 -0
- package/dist/types/src/views/Editor/Canvas/ElementCreateSelection.vue.d.ts +9 -0
- package/dist/types/src/views/Editor/Canvas/GridLines.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/Canvas/LinkDialog.vue.d.ts +115 -0
- package/dist/types/src/views/Editor/Canvas/MouseSelection.vue.d.ts +9 -0
- package/dist/types/src/views/Editor/Canvas/Operate/BorderLine.vue.d.ts +9 -0
- package/dist/types/src/views/Editor/Canvas/Operate/CommonElementOperate.vue.d.ts +14 -0
- package/dist/types/src/views/Editor/Canvas/Operate/ImageElementOperate.vue.d.ts +14 -0
- package/dist/types/src/views/Editor/Canvas/Operate/LineElementOperate.vue.d.ts +12 -0
- package/dist/types/src/views/Editor/Canvas/Operate/LinkHandler.vue.d.ts +8 -0
- package/dist/types/src/views/Editor/Canvas/Operate/MultiSelectOperate.vue.d.ts +8 -0
- package/dist/types/src/views/Editor/Canvas/Operate/ResizeHandler.vue.d.ts +9 -0
- package/dist/types/src/views/Editor/Canvas/Operate/RotateHandler.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/Canvas/Operate/ShapeElementOperate.vue.d.ts +16 -0
- package/dist/types/src/views/Editor/Canvas/Operate/TableElementOperate.vue.d.ts +14 -0
- package/dist/types/src/views/Editor/Canvas/Operate/TextElementOperate.vue.d.ts +14 -0
- package/dist/types/src/views/Editor/Canvas/Operate/index.vue.d.ts +16 -0
- package/dist/types/src/views/Editor/Canvas/Ruler.vue.d.ts +13 -0
- package/dist/types/src/views/Editor/Canvas/ShapeCreateCanvas.vue.d.ts +9 -0
- package/dist/types/src/views/Editor/Canvas/ViewportBackground.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/Canvas/hooks/useCommonOperate.d.ts +89 -0
- package/dist/types/src/views/Editor/Canvas/hooks/useDragElement.d.ts +7 -0
- package/dist/types/src/views/Editor/Canvas/hooks/useDragLineElement.d.ts +7 -0
- package/dist/types/src/views/Editor/Canvas/hooks/useDrop.d.ts +3 -0
- package/dist/types/src/views/Editor/Canvas/hooks/useInsertFromCreateSelection.d.ts +12 -0
- package/dist/types/src/views/Editor/Canvas/hooks/useMouseSelection.d.ts +24 -0
- package/dist/types/src/views/Editor/Canvas/hooks/useMoveShapeKeypoint.d.ts +6 -0
- package/dist/types/src/views/Editor/Canvas/hooks/useRotateElement.d.ts +6 -0
- package/dist/types/src/views/Editor/Canvas/hooks/useScaleElement.d.ts +8 -0
- package/dist/types/src/views/Editor/Canvas/hooks/useSelectElement.d.ts +6 -0
- package/dist/types/src/views/Editor/Canvas/hooks/useViewportSize.d.ts +11 -0
- package/dist/types/src/views/Editor/Canvas/index.vue.d.ts +5 -0
- package/dist/types/src/views/Editor/CanvasTool/ChartPool.vue.d.ts +7 -0
- package/dist/types/src/views/Editor/CanvasTool/LinePool.vue.d.ts +7 -0
- package/dist/types/src/views/Editor/CanvasTool/MediaInput.vue.d.ts +22 -0
- package/dist/types/src/views/Editor/CanvasTool/ShapeItemThumbnail.vue.d.ts +6 -0
- package/dist/types/src/views/Editor/CanvasTool/ShapePool.vue.d.ts +7 -0
- package/dist/types/src/views/Editor/CanvasTool/TableGenerator.vue.d.ts +12 -0
- package/dist/types/src/views/Editor/CanvasTool/index.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/EditorHeader/HotkeyDoc.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/EditorHeader/index.vue.d.ts +4 -0
- package/dist/types/src/views/Editor/ExportDialog/ExportImage.vue.d.ts +8 -0
- package/dist/types/src/views/Editor/ExportDialog/ExportJSON.vue.d.ts +6 -0
- package/dist/types/src/views/Editor/ExportDialog/ExportPDF.vue.d.ts +8 -0
- package/dist/types/src/views/Editor/ExportDialog/ExportPDF2.vue.d.ts +8 -0
- package/dist/types/src/views/Editor/ExportDialog/ExportPPTX.vue.d.ts +8 -0
- package/dist/types/src/views/Editor/ExportDialog/ExportSpecificFile.vue.d.ts +6 -0
- package/dist/types/src/views/Editor/ExportDialog/index.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/ImageLibPanel.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/MarkupPanel.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/NotesPanel.vue.d.ts +57 -0
- package/dist/types/src/views/Editor/Remark/Editor.vue.d.ts +14 -0
- package/dist/types/src/views/Editor/Remark/index.vue.d.ts +35 -0
- package/dist/types/src/views/Editor/SearchPanel.vue.d.ts +111 -0
- package/dist/types/src/views/Editor/SelectPanel.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/SymbolPanel.vue.d.ts +4 -0
- package/dist/types/src/views/Editor/Thumbnails/Templates.vue.d.ts +17 -0
- package/dist/types/src/views/Editor/Thumbnails/index.vue.d.ts +91 -0
- package/dist/types/src/views/Editor/Toolbar/ElementAnimationPanel.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/Toolbar/ElementPositionPanel.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/Toolbar/ElementStylePanel/AudioStylePanel.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/Toolbar/ElementStylePanel/ChartStylePanel/ChartDataEditor.vue.d.ts +19 -0
- package/dist/types/src/views/Editor/Toolbar/ElementStylePanel/ChartStylePanel/ThemeColorsSetting.vue.d.ts +9 -0
- package/dist/types/src/views/Editor/Toolbar/ElementStylePanel/ChartStylePanel/index.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/Toolbar/ElementStylePanel/ImageStylePanel.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/Toolbar/ElementStylePanel/LatexStylePanel.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/Toolbar/ElementStylePanel/LineStylePanel.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/Toolbar/ElementStylePanel/ShapeStylePanel.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/Toolbar/ElementStylePanel/TableStylePanel.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/Toolbar/ElementStylePanel/TextStylePanel.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/Toolbar/ElementStylePanel/VideoStylePanel.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/Toolbar/ElementStylePanel/index.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/Toolbar/MultiPositionPanel.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/Toolbar/MultiStylePanel.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/Toolbar/SlideAnimationPanel.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/Toolbar/SlideDesignPanel/ThemeColorsSetting.vue.d.ts +6 -0
- package/dist/types/src/views/Editor/Toolbar/SlideDesignPanel/ThemeStylesExtract.vue.d.ts +6 -0
- package/dist/types/src/views/Editor/Toolbar/SlideDesignPanel/index.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/Toolbar/common/ElementColorMask.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/Toolbar/common/ElementFilter.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/Toolbar/common/ElementFlip.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/Toolbar/common/ElementOpacity.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/Toolbar/common/ElementOutline.vue.d.ts +7 -0
- package/dist/types/src/views/Editor/Toolbar/common/ElementShadow.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/Toolbar/common/RichTextBase.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/Toolbar/common/SVGLine.vue.d.ts +14 -0
- package/dist/types/src/views/Editor/Toolbar/index.vue.d.ts +2 -0
- package/dist/types/src/views/Editor/index.vue.d.ts +2 -0
- package/dist/types/src/views/Mobile/MobileEditor/ElementToolbar.vue.d.ts +2 -0
- package/dist/types/src/views/Mobile/MobileEditor/Header.vue.d.ts +6 -0
- package/dist/types/src/views/Mobile/MobileEditor/MobileEditableElement.vue.d.ts +8 -0
- package/dist/types/src/views/Mobile/MobileEditor/MobileOperate.vue.d.ts +12 -0
- package/dist/types/src/views/Mobile/MobileEditor/SlideToolbar.vue.d.ts +2 -0
- package/dist/types/src/views/Mobile/MobileEditor/index.vue.d.ts +9 -0
- package/dist/types/src/views/Mobile/MobilePlayer.vue.d.ts +6 -0
- package/dist/types/src/views/Mobile/MobilePreview.vue.d.ts +8 -0
- package/dist/types/src/views/Mobile/MobileThumbnails.vue.d.ts +2 -0
- package/dist/types/src/views/Mobile/index.vue.d.ts +2 -0
- package/dist/types/src/views/Screen/BaseView.vue.d.ts +5 -0
- package/dist/types/src/views/Screen/BottomThumbnails.vue.d.ts +4 -0
- package/dist/types/src/views/Screen/CountdownTimer.vue.d.ts +13 -0
- package/dist/types/src/views/Screen/PresenterView.vue.d.ts +8 -0
- package/dist/types/src/views/Screen/ScreenElement.vue.d.ts +10 -0
- package/dist/types/src/views/Screen/ScreenSlide.vue.d.ts +10 -0
- package/dist/types/src/views/Screen/ScreenSlideList.vue.d.ts +9 -0
- package/dist/types/src/views/Screen/SlideThumbnails.vue.d.ts +9 -0
- package/dist/types/src/views/Screen/WritingBoardTool.vue.d.ts +77 -0
- package/dist/types/src/views/Screen/hooks/useExecPlay.d.ts +20 -0
- package/dist/types/src/views/Screen/hooks/useFullscreen.d.ts +5 -0
- package/dist/types/src/views/Screen/hooks/useSlideSize.d.ts +6 -0
- package/dist/types/src/views/Screen/hooks/useSlidesWithTurningMode.d.ts +14 -0
- package/dist/types/src/views/Screen/index.vue.d.ts +2 -0
- package/dist/types/src/views/components/ThumbnailSlide/ThumbnailElement.vue.d.ts +7 -0
- package/dist/types/src/views/components/ThumbnailSlide/index.vue.d.ts +10 -0
- package/dist/types/src/views/components/element/AudioElement/AudioPlayer.vue.d.ts +17 -0
- package/dist/types/src/views/components/element/AudioElement/BaseAudioElement.vue.d.ts +6 -0
- package/dist/types/src/views/components/element/AudioElement/ScreenAudioElement.vue.d.ts +39 -0
- package/dist/types/src/views/components/element/AudioElement/index.vue.d.ts +9 -0
- package/dist/types/src/views/components/element/ChartElement/BaseChartElement.vue.d.ts +7 -0
- package/dist/types/src/views/components/element/ChartElement/Chart.vue.d.ts +15 -0
- package/dist/types/src/views/components/element/ChartElement/chartOption.d.ts +15 -0
- package/dist/types/src/views/components/element/ChartElement/index.vue.d.ts +9 -0
- package/dist/types/src/views/components/element/ElementOutline.vue.d.ts +8 -0
- package/dist/types/src/views/components/element/ImageElement/BaseImageElement.vue.d.ts +6 -0
- package/dist/types/src/views/components/element/ImageElement/ImageClipHandler.vue.d.ts +18 -0
- package/dist/types/src/views/components/element/ImageElement/ImageOutline/ImageEllipseOutline.vue.d.ts +8 -0
- package/dist/types/src/views/components/element/ImageElement/ImageOutline/ImagePolygonOutline.vue.d.ts +9 -0
- package/dist/types/src/views/components/element/ImageElement/ImageOutline/ImageRectOutline.vue.d.ts +11 -0
- package/dist/types/src/views/components/element/ImageElement/ImageOutline/index.vue.d.ts +6 -0
- package/dist/types/src/views/components/element/ImageElement/index.vue.d.ts +9 -0
- package/dist/types/src/views/components/element/ImageElement/useClipImage.d.ts +19 -0
- package/dist/types/src/views/components/element/ImageElement/useFilter.d.ts +6 -0
- package/dist/types/src/views/components/element/LatexElement/BaseLatexElement.vue.d.ts +6 -0
- package/dist/types/src/views/components/element/LatexElement/index.vue.d.ts +9 -0
- package/dist/types/src/views/components/element/LineElement/BaseLineElement.vue.d.ts +6 -0
- package/dist/types/src/views/components/element/LineElement/LinePointMarker.vue.d.ts +11 -0
- package/dist/types/src/views/components/element/LineElement/index.vue.d.ts +9 -0
- package/dist/types/src/views/components/element/ProsemirrorEditor.vue.d.ts +33 -0
- package/dist/types/src/views/components/element/ShapeElement/BaseShapeElement.vue.d.ts +6 -0
- package/dist/types/src/views/components/element/ShapeElement/GradientDefs.vue.d.ts +11 -0
- package/dist/types/src/views/components/element/ShapeElement/PatternDefs.vue.d.ts +6 -0
- package/dist/types/src/views/components/element/ShapeElement/index.vue.d.ts +68 -0
- package/dist/types/src/views/components/element/TableElement/BaseTableElement.vue.d.ts +6 -0
- package/dist/types/src/views/components/element/TableElement/CustomTextarea.vue.d.ts +15 -0
- package/dist/types/src/views/components/element/TableElement/EditableTable.vue.d.ts +22 -0
- package/dist/types/src/views/components/element/TableElement/StaticTable.vue.d.ts +14 -0
- package/dist/types/src/views/components/element/TableElement/index.vue.d.ts +11 -0
- package/dist/types/src/views/components/element/TableElement/useHideCells.d.ts +6 -0
- package/dist/types/src/views/components/element/TableElement/useSubThemeColor.d.ts +6 -0
- package/dist/types/src/views/components/element/TableElement/utils.d.ts +8 -0
- package/dist/types/src/views/components/element/TextElement/BaseTextElement.vue.d.ts +7 -0
- package/dist/types/src/views/components/element/TextElement/index.vue.d.ts +11 -0
- package/dist/types/src/views/components/element/VideoElement/BaseVideoElement.vue.d.ts +6 -0
- package/dist/types/src/views/components/element/VideoElement/ScreenVideoElement.vue.d.ts +6 -0
- package/dist/types/src/views/components/element/VideoElement/VideoPlayer/index.vue.d.ts +19 -0
- package/dist/types/src/views/components/element/VideoElement/VideoPlayer/useMSE.d.ts +3 -0
- package/dist/types/src/views/components/element/VideoElement/index.vue.d.ts +9 -0
- package/dist/types/src/views/components/element/hooks/useElementFill.d.ts +6 -0
- package/dist/types/src/views/components/element/hooks/useElementFlip.d.ts +5 -0
- package/dist/types/src/views/components/element/hooks/useElementOutline.d.ts +9 -0
- package/dist/types/src/views/components/element/hooks/useElementShadow.d.ts +6 -0
- package/dist/vue-i18n-R6dI71u7.js +3595 -0
- package/package.json +109 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const enum ToolbarStates {
|
|
2
|
+
EL_ANIMATION = "elAnimation",
|
|
3
|
+
EL_STYLE = "elStyle",
|
|
4
|
+
EL_POSITION = "elPosition",
|
|
5
|
+
SLIDE_DESIGN = "slideDesign",
|
|
6
|
+
SLIDE_ANIMATION = "slideAnimation",
|
|
7
|
+
MULTI_STYLE = "multiStyle",
|
|
8
|
+
MULTI_POSITION = "multiPosition"
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 复制文本到剪贴板
|
|
3
|
+
* @param text 文本内容
|
|
4
|
+
*/
|
|
5
|
+
export declare const copyText: (text: string) => Promise<unknown>;
|
|
6
|
+
export declare const readClipboard: () => Promise<string>;
|
|
7
|
+
export declare const pasteCustomClipboardString: (text: string) => any;
|
|
8
|
+
export declare const pasteExcelClipboardString: (text: string) => string[][] | null;
|
|
9
|
+
export declare const pasteHTMLTableClipboardString: (text: string) => string[][] | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 补足数字位数
|
|
3
|
+
* @param digit 数字
|
|
4
|
+
* @param len 位数
|
|
5
|
+
*/
|
|
6
|
+
export declare const fillDigit: (digit: number, len: number) => string;
|
|
7
|
+
/**
|
|
8
|
+
* 判断设备
|
|
9
|
+
*/
|
|
10
|
+
export declare const isPC: () => boolean;
|
|
11
|
+
/**
|
|
12
|
+
* 判断URL字符串
|
|
13
|
+
*/
|
|
14
|
+
export declare const isValidURL: (url: string) => boolean;
|
|
15
|
+
/**
|
|
16
|
+
* HTML转纯文本
|
|
17
|
+
*/
|
|
18
|
+
export declare const htmlToText: (html: string) => string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as Dexie, EntityTable } from 'dexie';
|
|
2
|
+
import { Slide } from '../types/slides';
|
|
3
|
+
export interface writingBoardImg {
|
|
4
|
+
id: string;
|
|
5
|
+
dataURL: string;
|
|
6
|
+
}
|
|
7
|
+
export interface Snapshot {
|
|
8
|
+
id: number;
|
|
9
|
+
index: number;
|
|
10
|
+
slides: Slide[];
|
|
11
|
+
}
|
|
12
|
+
export declare const deleteDiscardedDB: () => Promise<void>;
|
|
13
|
+
declare const db: Dexie & {
|
|
14
|
+
snapshots: EntityTable<Snapshot, 'id'>;
|
|
15
|
+
writingBoardImgs: EntityTable<writingBoardImg, 'id'>;
|
|
16
|
+
};
|
|
17
|
+
export { db };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { PPTElement, PPTLineElement, Slide } from '../types/slides';
|
|
2
|
+
interface RotatedElementData {
|
|
3
|
+
left: number;
|
|
4
|
+
top: number;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
rotate: number;
|
|
8
|
+
}
|
|
9
|
+
interface IdMap {
|
|
10
|
+
[id: string]: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 计算元素在画布中的矩形范围旋转后的新位置范围
|
|
14
|
+
* @param element 元素的位置大小和旋转角度信息
|
|
15
|
+
*/
|
|
16
|
+
export declare const getRectRotatedRange: (element: RotatedElementData) => {
|
|
17
|
+
xRange: number[];
|
|
18
|
+
yRange: number[];
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* 计算元素在画布中的矩形范围旋转后的新位置与旋转之前位置的偏离距离
|
|
22
|
+
* @param element 元素的位置大小和旋转角度信息
|
|
23
|
+
*/
|
|
24
|
+
export declare const getRectRotatedOffset: (element: RotatedElementData) => {
|
|
25
|
+
offsetX: number;
|
|
26
|
+
offsetY: number;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* 计算元素在画布中的位置范围
|
|
30
|
+
* @param element 元素信息
|
|
31
|
+
*/
|
|
32
|
+
export declare const getElementRange: (element: PPTElement) => {
|
|
33
|
+
minX: number;
|
|
34
|
+
maxX: number;
|
|
35
|
+
minY: number;
|
|
36
|
+
maxY: number;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* 计算一组元素在画布中的位置范围
|
|
40
|
+
* @param elementList 一组元素信息
|
|
41
|
+
*/
|
|
42
|
+
export declare const getElementListRange: (elementList: PPTElement[]) => {
|
|
43
|
+
minX: number;
|
|
44
|
+
maxX: number;
|
|
45
|
+
minY: number;
|
|
46
|
+
maxY: number;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* 计算线条元素的长度
|
|
50
|
+
* @param element 线条元素
|
|
51
|
+
*/
|
|
52
|
+
export declare const getLineElementLength: (element: PPTLineElement) => number;
|
|
53
|
+
export interface AlignLine {
|
|
54
|
+
value: number;
|
|
55
|
+
range: [number, number];
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* 将一组对齐吸附线进行去重:同位置的的多条对齐吸附线仅留下一条,取该位置所有对齐吸附线的最大值和最小值为新的范围
|
|
59
|
+
* @param lines 一组对齐吸附线信息
|
|
60
|
+
*/
|
|
61
|
+
export declare const uniqAlignLines: (lines: AlignLine[]) => AlignLine[];
|
|
62
|
+
/**
|
|
63
|
+
* 以页面列表为基础,为每一个页面生成新的ID,并关联到旧ID形成一个字典
|
|
64
|
+
* 主要用于页面元素时,维持数据中各处页面ID原有的关系
|
|
65
|
+
* @param slides 页面列表
|
|
66
|
+
*/
|
|
67
|
+
export declare const createSlideIdMap: (slides: Slide[]) => IdMap;
|
|
68
|
+
/**
|
|
69
|
+
* 以元素列表为基础,为每一个元素生成新的ID,并关联到旧ID形成一个字典
|
|
70
|
+
* 主要用于复制元素时,维持数据中各处元素ID原有的关系
|
|
71
|
+
* 例如:原本两个组合的元素拥有相同的groupId,复制后依然会拥有另一个相同的groupId
|
|
72
|
+
* @param elements 元素列表数据
|
|
73
|
+
*/
|
|
74
|
+
export declare const createElementIdMap: (elements: PPTElement[]) => {
|
|
75
|
+
groupIdMap: IdMap;
|
|
76
|
+
elIdMap: IdMap;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* 根据表格的主题色,获取对应用于配色的子颜色
|
|
80
|
+
* @param themeColor 主题色
|
|
81
|
+
*/
|
|
82
|
+
export declare const getTableSubThemeColor: (themeColor: string) => string[];
|
|
83
|
+
/**
|
|
84
|
+
* 获取线条元素路径字符串
|
|
85
|
+
* @param element 线条元素
|
|
86
|
+
*/
|
|
87
|
+
export declare const getLineElementPath: (element: PPTLineElement) => string;
|
|
88
|
+
/**
|
|
89
|
+
* 判断一个元素是否在可视范围内
|
|
90
|
+
* @param element 元素
|
|
91
|
+
* @param parent 父元素
|
|
92
|
+
*/
|
|
93
|
+
export declare const isElementInViewport: (element: HTMLElement, parent: HTMLElement) => boolean;
|
|
94
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Emitter } from 'mitt';
|
|
2
|
+
export declare const enum EmitterEvents {
|
|
3
|
+
RICH_TEXT_COMMAND = "RICH_TEXT_COMMAND",
|
|
4
|
+
SYNC_RICH_TEXT_ATTRS_TO_STORE = "SYNC_RICH_TEXT_ATTRS_TO_STORE",
|
|
5
|
+
OPEN_CHART_DATA_EDITOR = "OPEN_CHART_DATA_EDITOR",
|
|
6
|
+
OPEN_LATEX_EDITOR = "OPEN_LATEX_EDITOR"
|
|
7
|
+
}
|
|
8
|
+
export interface RichTextAction {
|
|
9
|
+
command: string;
|
|
10
|
+
value?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface RichTextCommand {
|
|
13
|
+
target?: string;
|
|
14
|
+
action: RichTextAction | RichTextAction[];
|
|
15
|
+
}
|
|
16
|
+
type Events = {
|
|
17
|
+
[EmitterEvents.RICH_TEXT_COMMAND]: RichTextCommand;
|
|
18
|
+
[EmitterEvents.SYNC_RICH_TEXT_ATTRS_TO_STORE]: void;
|
|
19
|
+
[EmitterEvents.OPEN_CHART_DATA_EDITOR]: void;
|
|
20
|
+
[EmitterEvents.OPEN_LATEX_EDITOR]: void;
|
|
21
|
+
};
|
|
22
|
+
declare const emitter: Emitter<Events>;
|
|
23
|
+
export default emitter;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isSystemFont: (font: string) => boolean;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Token, HTMLNode } from './types';
|
|
2
|
+
interface StackItem {
|
|
3
|
+
tagName: string | null;
|
|
4
|
+
children: HTMLNode[];
|
|
5
|
+
}
|
|
6
|
+
interface State {
|
|
7
|
+
stack: StackItem[];
|
|
8
|
+
cursor: number;
|
|
9
|
+
tokens: Token[];
|
|
10
|
+
}
|
|
11
|
+
export declare const parser: (tokens: Token[]) => HTMLNode[];
|
|
12
|
+
export declare const hasTerminalParent: (tagName: string, stack: StackItem[]) => boolean;
|
|
13
|
+
export declare const rewindStack: (stack: StackItem[], newLength: number) => void;
|
|
14
|
+
export declare const parse: (state: State) => void;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export interface ElementAttribute {
|
|
2
|
+
key: string;
|
|
3
|
+
value: string | null;
|
|
4
|
+
}
|
|
5
|
+
export interface CommentElement {
|
|
6
|
+
type: 'comment';
|
|
7
|
+
content: string;
|
|
8
|
+
}
|
|
9
|
+
export interface TextElement {
|
|
10
|
+
type: 'text';
|
|
11
|
+
content: string;
|
|
12
|
+
}
|
|
13
|
+
export interface NormalElement {
|
|
14
|
+
type: 'element';
|
|
15
|
+
tagName: string;
|
|
16
|
+
children: HTMLNode[];
|
|
17
|
+
attributes: string[];
|
|
18
|
+
}
|
|
19
|
+
export type HTMLNode = CommentElement | TextElement | NormalElement;
|
|
20
|
+
export interface ElementAST {
|
|
21
|
+
type: 'element';
|
|
22
|
+
tagName: string;
|
|
23
|
+
children: AST[];
|
|
24
|
+
attributes: ElementAttribute[];
|
|
25
|
+
}
|
|
26
|
+
export interface CommentOrTextAST {
|
|
27
|
+
type: 'comment' | 'text';
|
|
28
|
+
content: string;
|
|
29
|
+
}
|
|
30
|
+
export type AST = CommentOrTextAST | ElementAST;
|
|
31
|
+
export interface TagStartToken {
|
|
32
|
+
type: 'tag-start';
|
|
33
|
+
close: boolean;
|
|
34
|
+
}
|
|
35
|
+
export interface TagEndToken {
|
|
36
|
+
type: 'tag-end';
|
|
37
|
+
close: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface TagToken {
|
|
40
|
+
type: 'tag';
|
|
41
|
+
content: string;
|
|
42
|
+
}
|
|
43
|
+
export interface TextToken {
|
|
44
|
+
type: 'text';
|
|
45
|
+
content: string;
|
|
46
|
+
}
|
|
47
|
+
export interface CommentToken {
|
|
48
|
+
type: 'comment';
|
|
49
|
+
content: string;
|
|
50
|
+
}
|
|
51
|
+
export interface AttributeToken {
|
|
52
|
+
type: 'attribute';
|
|
53
|
+
content: string;
|
|
54
|
+
}
|
|
55
|
+
export type Token = TagStartToken | TagEndToken | TagToken | TextToken | CommentToken | AttributeToken;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { EventHandler, InitConfigPayload, RequestConfigResponse, RequestErrorPayload, StartLoadingPayload, ToggleConversationPayload, UploadFilePayload } from './types';
|
|
2
|
+
declare class EventEmitter {
|
|
3
|
+
private _name;
|
|
4
|
+
private _listenersByEvent;
|
|
5
|
+
constructor(name: string);
|
|
6
|
+
addListener(event: string, handler: EventHandler, replace?: boolean): void;
|
|
7
|
+
on(event: string, handler: EventHandler, replace?: boolean): void;
|
|
8
|
+
once(event: string, handler: EventHandler): void;
|
|
9
|
+
removeListener(event: string, handler: EventHandler): void;
|
|
10
|
+
off(event: string, handler: EventHandler): void;
|
|
11
|
+
removeAllListener(event: string): void;
|
|
12
|
+
trigger(event: string, ...args: any[]): void;
|
|
13
|
+
emit(event: string, ...args: any[]): void;
|
|
14
|
+
}
|
|
15
|
+
declare class IframeMessageHandler extends EventEmitter {
|
|
16
|
+
protected _origin: string;
|
|
17
|
+
roleType: number;
|
|
18
|
+
protected DEFAULT_TIMEOUT: number;
|
|
19
|
+
private _targetWindow;
|
|
20
|
+
constructor(name: string, roleType: number, origin?: string, targetWindow?: Window);
|
|
21
|
+
setTargetWindow(target: Window): void;
|
|
22
|
+
destroy(): void;
|
|
23
|
+
handlerSdkPromise(event: MessageEvent): Promise<void>;
|
|
24
|
+
onMessage(event: MessageEvent): void;
|
|
25
|
+
protected sendMessage(key: string, value?: any, promiseId?: number, isReply?: boolean): void;
|
|
26
|
+
protected onPromiseMessage(data: any): Promise<any>;
|
|
27
|
+
protected onNormalMessage(data: any): void;
|
|
28
|
+
}
|
|
29
|
+
declare class LtPPTIframeSdk extends IframeMessageHandler {
|
|
30
|
+
_promiseId: number;
|
|
31
|
+
private _promiseEvents;
|
|
32
|
+
private _config?;
|
|
33
|
+
constructor(parentOrigin?: string, targetWindow?: Window);
|
|
34
|
+
get nextPromiseId(): number;
|
|
35
|
+
get config(): InitConfigPayload | undefined;
|
|
36
|
+
private _privatePromiseEvents;
|
|
37
|
+
registPromiseEvent(key: string, handler: EventHandler): void;
|
|
38
|
+
unRegistPromiseEvent(key: string): void;
|
|
39
|
+
get promiseEvents(): Record<string, EventHandler>;
|
|
40
|
+
protected onPromiseMessage(data: any): Promise<any>;
|
|
41
|
+
protected onNormalMessage(data: any): void;
|
|
42
|
+
promisePostMessage<T>(key: string, value?: any, options?: {
|
|
43
|
+
timeout?: number;
|
|
44
|
+
}): Promise<T>;
|
|
45
|
+
notifyPagePrepared(): void;
|
|
46
|
+
notifyInitFinish(): void;
|
|
47
|
+
notifyRequestError(data: RequestErrorPayload): void;
|
|
48
|
+
getRequestConfig(params?: Record<string, any>): Promise<RequestConfigResponse>;
|
|
49
|
+
uploadFile(params: UploadFilePayload): Promise<string>;
|
|
50
|
+
}
|
|
51
|
+
export type { InitConfigPayload, StartLoadingPayload, ToggleConversationPayload };
|
|
52
|
+
export declare const iframeSdk: LtPPTIframeSdk;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
type EventHandler = (...args: any[]) => any;
|
|
2
|
+
interface EventListener {
|
|
3
|
+
handler: EventHandler;
|
|
4
|
+
disposable: boolean;
|
|
5
|
+
}
|
|
6
|
+
interface InitConfigPayload {
|
|
7
|
+
}
|
|
8
|
+
interface RequestConfigResponse {
|
|
9
|
+
token: string;
|
|
10
|
+
domain: string;
|
|
11
|
+
params?: Record<string, any>;
|
|
12
|
+
}
|
|
13
|
+
interface UploadFilePayload {
|
|
14
|
+
file?: File;
|
|
15
|
+
base64?: string;
|
|
16
|
+
}
|
|
17
|
+
interface StartLoadingPayload {
|
|
18
|
+
botId: string;
|
|
19
|
+
}
|
|
20
|
+
interface ToggleConversationPayload {
|
|
21
|
+
conversationId: string;
|
|
22
|
+
}
|
|
23
|
+
interface NewConversationCreatedPayload {
|
|
24
|
+
conversationId: string;
|
|
25
|
+
}
|
|
26
|
+
interface RequestErrorPayload {
|
|
27
|
+
code: number;
|
|
28
|
+
msg: string;
|
|
29
|
+
}
|
|
30
|
+
export type { EventHandler, EventListener, InitConfigPayload, NewConversationCreatedPayload, RequestConfigResponse, RequestErrorPayload, StartLoadingPayload, ToggleConversationPayload, UploadFilePayload, };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
interface ImageSize {
|
|
2
|
+
width: number;
|
|
3
|
+
height: number;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* 获取图片的原始宽高
|
|
7
|
+
* @param src 图片地址
|
|
8
|
+
*/
|
|
9
|
+
export declare const getImageSize: (src: string) => Promise<ImageSize>;
|
|
10
|
+
export declare const downloadFileFromUrl: (url: string, fileName: string) => void;
|
|
11
|
+
/**
|
|
12
|
+
* 读取图片文件的dataURL
|
|
13
|
+
* @param file 图片文件
|
|
14
|
+
*/
|
|
15
|
+
export declare const getImageDataURL: (file: File) => Promise<string>;
|
|
16
|
+
/**
|
|
17
|
+
* 判断是否为SVG代码字符串
|
|
18
|
+
* @param text 待验证文本
|
|
19
|
+
*/
|
|
20
|
+
export declare const isSVGString: (text: string) => boolean;
|
|
21
|
+
/**
|
|
22
|
+
* SVG代码转文件
|
|
23
|
+
* @param svg SVG代码
|
|
24
|
+
*/
|
|
25
|
+
export declare const svg2File: (svg: string) => File;
|
|
26
|
+
/**
|
|
27
|
+
* 网络图片URL转File对象
|
|
28
|
+
* @param url 图片URL地址
|
|
29
|
+
* @param filename 文件名(可选,默认使用时间戳)
|
|
30
|
+
*/
|
|
31
|
+
export declare const urlToFile: (url: string, filename?: string) => Promise<File>;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AppContext } from 'vue';
|
|
2
|
+
export interface MessageOptions {
|
|
3
|
+
type?: 'info' | 'success' | 'warning' | 'error' | 'loading';
|
|
4
|
+
title?: string;
|
|
5
|
+
message?: string;
|
|
6
|
+
duration?: number;
|
|
7
|
+
closable?: boolean;
|
|
8
|
+
ctx?: AppContext;
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export type MessageTypeOptions = Omit<MessageOptions, 'type' | 'message'>;
|
|
12
|
+
export interface MessageIntance {
|
|
13
|
+
id: string;
|
|
14
|
+
close: () => void;
|
|
15
|
+
}
|
|
16
|
+
export type MessageFn = (message: string, options?: MessageTypeOptions) => MessageIntance;
|
|
17
|
+
export interface Message {
|
|
18
|
+
(options: MessageOptions): MessageIntance;
|
|
19
|
+
info: MessageFn;
|
|
20
|
+
success: MessageFn;
|
|
21
|
+
error: MessageFn;
|
|
22
|
+
warning: MessageFn;
|
|
23
|
+
loading: MessageFn;
|
|
24
|
+
closeAll: () => void;
|
|
25
|
+
_context?: AppContext | null;
|
|
26
|
+
}
|
|
27
|
+
declare const message: Message;
|
|
28
|
+
export default message;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Schema } from 'prosemirror-model';
|
|
2
|
+
import { Transaction } from 'prosemirror-state';
|
|
3
|
+
import { EditorView } from 'prosemirror-view';
|
|
4
|
+
export declare const setTextAlign: (tr: Transaction, schema: Schema, alignment: string) => Transaction;
|
|
5
|
+
export declare const alignmentCommand: (view: EditorView, alignment: string) => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NodeType } from 'prosemirror-model';
|
|
2
|
+
import { Transaction, EditorState } from 'prosemirror-state';
|
|
3
|
+
interface TextStyleAttr {
|
|
4
|
+
color?: string;
|
|
5
|
+
fontsize?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const toggleList: (listType: NodeType, itemType: NodeType, listStyleType: string, textStyleAttr?: TextStyleAttr) => (state: EditorState, dispatch: (tr: Transaction) => void) => boolean;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DirectEditorProps, EditorView } from 'prosemirror-view';
|
|
2
|
+
import { PluginOptions } from './plugins/index';
|
|
3
|
+
export declare const createDocument: (content: string) => import('prosemirror-model').Node;
|
|
4
|
+
export declare const initProsemirrorEditor: (dom: Element, content: string, props: Omit<DirectEditorProps, 'state'>, pluginOptions?: PluginOptions) => EditorView;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Schema } from 'prosemirror-model';
|
|
2
|
+
export interface PluginOptions {
|
|
3
|
+
placeholder?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const buildPlugins: (schema: Schema, options?: PluginOptions) => (import('prosemirror-state').Plugin<{
|
|
6
|
+
transform: import('prosemirror-state').Transaction;
|
|
7
|
+
from: number;
|
|
8
|
+
to: number;
|
|
9
|
+
text: string;
|
|
10
|
+
} | null> | import('prosemirror-state').Plugin<any>)[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const schemaNodes: {
|
|
2
|
+
doc: import('prosemirror-model').NodeSpec;
|
|
3
|
+
paragraph: import('prosemirror-model').NodeSpec;
|
|
4
|
+
blockquote: import('prosemirror-model').NodeSpec;
|
|
5
|
+
text: import('prosemirror-model').NodeSpec;
|
|
6
|
+
ordered_list: import('prosemirror-model').NodeSpec;
|
|
7
|
+
bullet_list: import('prosemirror-model').NodeSpec;
|
|
8
|
+
list_item: import('prosemirror-model').NodeSpec;
|
|
9
|
+
};
|
|
10
|
+
export declare const schemaMarks: {
|
|
11
|
+
em: import('prosemirror-model').MarkSpec;
|
|
12
|
+
strong: import('prosemirror-model').MarkSpec;
|
|
13
|
+
fontsize: import('prosemirror-model').MarkSpec;
|
|
14
|
+
fontname: import('prosemirror-model').MarkSpec;
|
|
15
|
+
code: import('prosemirror-model').MarkSpec;
|
|
16
|
+
forecolor: import('prosemirror-model').MarkSpec;
|
|
17
|
+
backcolor: import('prosemirror-model').MarkSpec;
|
|
18
|
+
subscript: import('prosemirror-model').MarkSpec;
|
|
19
|
+
superscript: import('prosemirror-model').MarkSpec;
|
|
20
|
+
strikethrough: import('prosemirror-model').MarkSpec;
|
|
21
|
+
underline: import('prosemirror-model').MarkSpec;
|
|
22
|
+
link: import('prosemirror-model').MarkSpec;
|
|
23
|
+
mark: import('prosemirror-model').MarkSpec;
|
|
24
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MarkSpec } from 'prosemirror-model';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
em: MarkSpec;
|
|
4
|
+
strong: MarkSpec;
|
|
5
|
+
fontsize: MarkSpec;
|
|
6
|
+
fontname: MarkSpec;
|
|
7
|
+
code: MarkSpec;
|
|
8
|
+
forecolor: MarkSpec;
|
|
9
|
+
backcolor: MarkSpec;
|
|
10
|
+
subscript: MarkSpec;
|
|
11
|
+
superscript: MarkSpec;
|
|
12
|
+
strikethrough: MarkSpec;
|
|
13
|
+
underline: MarkSpec;
|
|
14
|
+
link: MarkSpec;
|
|
15
|
+
mark: MarkSpec;
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NodeSpec } from 'prosemirror-model';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
doc: NodeSpec;
|
|
4
|
+
paragraph: NodeSpec;
|
|
5
|
+
blockquote: NodeSpec;
|
|
6
|
+
text: NodeSpec;
|
|
7
|
+
ordered_list: NodeSpec;
|
|
8
|
+
bullet_list: NodeSpec;
|
|
9
|
+
list_item: NodeSpec;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Node, NodeType, Mark, MarkType, Schema } from 'prosemirror-model';
|
|
2
|
+
import { EditorState, Selection } from 'prosemirror-state';
|
|
3
|
+
import { EditorView } from 'prosemirror-view';
|
|
4
|
+
export declare const isList: (node: Node, schema: Schema) => boolean;
|
|
5
|
+
export declare const autoSelectAll: (view: EditorView) => void;
|
|
6
|
+
export declare const addMark: (editorView: EditorView, mark: Mark, selection?: {
|
|
7
|
+
from: number;
|
|
8
|
+
to: number;
|
|
9
|
+
}) => void;
|
|
10
|
+
export declare const findNodesWithSameMark: (doc: Node, from: number, to: number, markType: MarkType) => {
|
|
11
|
+
mark: Mark | null;
|
|
12
|
+
from: {
|
|
13
|
+
node: Node | null;
|
|
14
|
+
pos: number;
|
|
15
|
+
};
|
|
16
|
+
to: {
|
|
17
|
+
node: Node | null;
|
|
18
|
+
pos: number;
|
|
19
|
+
};
|
|
20
|
+
} | null;
|
|
21
|
+
export declare const findParentNode: (predicate: (node: Node) => boolean) => (_ref: Selection) => {
|
|
22
|
+
pos: number;
|
|
23
|
+
start: number;
|
|
24
|
+
depth: number;
|
|
25
|
+
node: Node;
|
|
26
|
+
} | undefined;
|
|
27
|
+
export declare const findParentNodeOfType: (nodeType: NodeType) => (selection: Selection) => {
|
|
28
|
+
pos: number;
|
|
29
|
+
start: number;
|
|
30
|
+
depth: number;
|
|
31
|
+
node: Node;
|
|
32
|
+
} | undefined;
|
|
33
|
+
export declare const isActiveOfParentNodeType: (nodeType: string, state: EditorState) => boolean;
|
|
34
|
+
export declare const getLastTextNode: (node: Node | null) => Node | null;
|
|
35
|
+
export declare const getMarkAttrs: (view: EditorView) => readonly Mark[];
|
|
36
|
+
export declare const getAttrValue: (marks: readonly Mark[], markType: string, attr: string) => string | null;
|
|
37
|
+
export declare const isActiveMark: (marks: readonly Mark[], markType: string) => boolean;
|
|
38
|
+
export declare const markActive: (state: EditorState, type: MarkType) => boolean | Mark | undefined;
|
|
39
|
+
export declare const getAttrValueInSelection: (view: EditorView, attr: string) => string;
|
|
40
|
+
type Align = 'left' | 'right' | 'center';
|
|
41
|
+
interface DefaultAttrs {
|
|
42
|
+
color: string;
|
|
43
|
+
backcolor: string;
|
|
44
|
+
fontsize: string;
|
|
45
|
+
fontname: string;
|
|
46
|
+
align: Align;
|
|
47
|
+
}
|
|
48
|
+
export declare const getTextAttrs: (view: EditorView, attrs?: Partial<DefaultAttrs>) => {
|
|
49
|
+
bold: boolean;
|
|
50
|
+
em: boolean;
|
|
51
|
+
underline: boolean;
|
|
52
|
+
strikethrough: boolean;
|
|
53
|
+
superscript: boolean;
|
|
54
|
+
subscript: boolean;
|
|
55
|
+
code: boolean;
|
|
56
|
+
color: string;
|
|
57
|
+
backcolor: string;
|
|
58
|
+
fontsize: string;
|
|
59
|
+
fontname: string;
|
|
60
|
+
link: string;
|
|
61
|
+
align: Align;
|
|
62
|
+
bulletList: boolean;
|
|
63
|
+
orderedList: boolean;
|
|
64
|
+
blockquote: boolean;
|
|
65
|
+
};
|
|
66
|
+
export type TextAttrs = ReturnType<typeof getTextAttrs>;
|
|
67
|
+
export declare const getFontsize: (view: EditorView) => number;
|
|
68
|
+
export declare const defaultRichTextAttrs: TextAttrs;
|
|
69
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const removeAllRanges: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const svg2Base64: (element: Element) => string;
|