mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
refactor: use import type
This commit is contained in:
parent
6a15f89289
commit
d17900c1e4
@ -75,6 +75,7 @@ module.exports = {
|
||||
},
|
||||
}],
|
||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||
'@typescript-eslint/consistent-type-imports': 'error',
|
||||
'vue/multi-word-component-names': 'off',
|
||||
'vue/no-reserved-component-names': 'off',
|
||||
},
|
||||
|
@ -20,7 +20,7 @@
|
||||
import { computed, onUnmounted, ref } from 'vue'
|
||||
|
||||
import Checkboard from './Checkboard.vue'
|
||||
import { ColorFormats } from 'tinycolor2'
|
||||
import type { ColorFormats } from 'tinycolor2'
|
||||
|
||||
const props = defineProps<{
|
||||
value: ColorFormats.RGBA
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
import tinycolor, { ColorFormats } from 'tinycolor2'
|
||||
import tinycolor, { type ColorFormats } from 'tinycolor2'
|
||||
|
||||
const props = defineProps<{
|
||||
value: ColorFormats.RGBA
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, onUnmounted, ref, watch } from 'vue'
|
||||
import tinycolor, { ColorFormats } from 'tinycolor2'
|
||||
import tinycolor, { type ColorFormats } from 'tinycolor2'
|
||||
|
||||
const props = defineProps<{
|
||||
value: ColorFormats.RGBA
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, onUnmounted, ref } from 'vue'
|
||||
import tinycolor, { ColorFormats } from 'tinycolor2'
|
||||
import tinycolor, { type ColorFormats } from 'tinycolor2'
|
||||
import { throttle, clamp } from 'lodash'
|
||||
|
||||
const props = defineProps<{
|
||||
|
@ -77,7 +77,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, onMounted, ref, watch } from 'vue'
|
||||
import tinycolor, { ColorFormats } from 'tinycolor2'
|
||||
import tinycolor, { type ColorFormats } from 'tinycolor2'
|
||||
import { debounce } from 'lodash'
|
||||
import { toCanvas } from 'html-to-image'
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ContextmenuItem } from './types'
|
||||
import type { ContextmenuItem } from './types'
|
||||
|
||||
defineProps<{
|
||||
menus: ContextmenuItem[]
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
import { ContextmenuItem, Axis } from './types'
|
||||
import type { ContextmenuItem, Axis } from './types'
|
||||
|
||||
import MenuContent from './MenuContent.vue'
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { ChartType } from '@/types/slides'
|
||||
import type { ChartType } from '@/types/slides'
|
||||
|
||||
interface ChartTypes {
|
||||
[propName: string]: ChartType
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { LinePoint } from '@/types/slides'
|
||||
import type { LinePoint } from '@/types/slides'
|
||||
|
||||
|
||||
export interface LinePoolItem {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { nanoid } from 'nanoid'
|
||||
import { useSlidesStore, useMainStore } from '@/store'
|
||||
import { PPTElement, Slide } from '@/types/slides'
|
||||
import type { PPTElement, Slide } from '@/types/slides'
|
||||
import { createSlideIdMap, createElementIdMap } from '@/utils/element'
|
||||
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore, useSlidesStore } from '@/store'
|
||||
import { PPTElement } from '@/types/slides'
|
||||
import type { PPTElement } from '@/types/slides'
|
||||
import { ElementAlignCommands } from '@/types/edit'
|
||||
import { getElementListRange, getRectRotatedOffset } from '@/utils/element'
|
||||
import useHistorySnapshot from './useHistorySnapshot'
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore, useSlidesStore } from '@/store'
|
||||
import { PPTElement } from '@/types/slides'
|
||||
import type { PPTElement } from '@/types/slides'
|
||||
import { ElementAlignCommands } from '@/types/edit'
|
||||
import { getElementListRange } from '@/utils/element'
|
||||
import { VIEWPORT_SIZE } from '@/configs/canvas'
|
||||
|
@ -2,7 +2,7 @@ import { computed } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { nanoid } from 'nanoid'
|
||||
import { useMainStore, useSlidesStore } from '@/store'
|
||||
import { PPTElement } from '@/types/slides'
|
||||
import type { PPTElement } from '@/types/slides'
|
||||
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
||||
|
||||
export default () => {
|
||||
|
@ -3,9 +3,9 @@ import { nanoid } from 'nanoid'
|
||||
import { useMainStore, useSlidesStore } from '@/store'
|
||||
import { getImageSize } from '@/utils/image'
|
||||
import { VIEWPORT_SIZE } from '@/configs/canvas'
|
||||
import { PPTLineElement, PPTElement, TableCell, TableCellStyle, PPTShapeElement, PPTChartElement, ChartOptions, PresetChartType } from '@/types/slides'
|
||||
import { ShapePoolItem, SHAPE_PATH_FORMULAS } from '@/configs/shapes'
|
||||
import { LinePoolItem } from '@/configs/lines'
|
||||
import type { PPTLineElement, PPTElement, TableCell, TableCellStyle, PPTShapeElement, PPTChartElement, ChartOptions, PresetChartType } from '@/types/slides'
|
||||
import { type ShapePoolItem, SHAPE_PATH_FORMULAS } from '@/configs/shapes'
|
||||
import type { LinePoolItem } from '@/configs/lines'
|
||||
import { CHART_TYPES } from '@/configs/chartTypes'
|
||||
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore, useSlidesStore } from '@/store'
|
||||
import { PPTElement } from '@/types/slides'
|
||||
import type { PPTElement } from '@/types/slides'
|
||||
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
||||
|
||||
export default () => {
|
||||
|
@ -6,10 +6,10 @@ import pptxgen from 'pptxgenjs'
|
||||
import tinycolor from 'tinycolor2'
|
||||
import { toPng, toJpeg } from 'html-to-image'
|
||||
import { useSlidesStore } from '@/store'
|
||||
import { PPTElementOutline, PPTElementShadow, PPTElementLink, Slide } from '@/types/slides'
|
||||
import type { PPTElementOutline, PPTElementShadow, PPTElementLink, Slide } from '@/types/slides'
|
||||
import { getElementRange, getLineElementPath, getTableSubThemeColor } from '@/utils/element'
|
||||
import { AST, toAST } from '@/utils/htmlParser'
|
||||
import { SvgPoints, toPoints } from '@/utils/svgPathParser'
|
||||
import { type AST, toAST } from '@/utils/htmlParser'
|
||||
import { type SvgPoints, toPoints } from '@/utils/svgPathParser'
|
||||
import { encrypt } from '@/utils/crypto'
|
||||
import { svg2Base64 } from '@/utils/svg2Base64'
|
||||
import { message } from 'ant-design-vue'
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { ref } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { parse, Shape, Element } from 'pptxtojson'
|
||||
import { parse, type Shape, type Element } from 'pptxtojson'
|
||||
import { nanoid } from 'nanoid'
|
||||
import { Slide, TableCellStyle, TableCell, ChartType, ChartOptions, SlideBackground, PPTShapeElement, PPTLineElement } from '@/types/slides'
|
||||
import type { Slide, TableCellStyle, TableCell, ChartType, ChartOptions, SlideBackground, PPTShapeElement, PPTLineElement } from '@/types/slides'
|
||||
import { useSlidesStore } from '@/store'
|
||||
import { decrypt } from '@/utils/crypto'
|
||||
import { ShapePoolItem, SHAPE_LIST, SHAPE_PATH_FORMULAS } from '@/configs/shapes'
|
||||
import { type ShapePoolItem, SHAPE_LIST, SHAPE_PATH_FORMULAS } from '@/configs/shapes'
|
||||
import { VIEWPORT_SIZE } from '@/configs/canvas'
|
||||
import useAddSlidesOrElements from '@/hooks/useAddSlidesOrElements'
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { useSlidesStore } from '@/store'
|
||||
import { PPTElement, PPTElementLink } from '@/types/slides'
|
||||
import type { PPTElement, PPTElementLink } from '@/types/slides'
|
||||
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
||||
import { message } from 'ant-design-vue'
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore, useSlidesStore } from '@/store'
|
||||
import { PPTElement } from '@/types/slides'
|
||||
import type { PPTElement } from '@/types/slides'
|
||||
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
||||
|
||||
export default () => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore, useSlidesStore } from '@/store'
|
||||
import { PPTElement } from '@/types/slides'
|
||||
import type { PPTElement } from '@/types/slides'
|
||||
import { KEYS } from '@/configs/hotkey'
|
||||
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useSlidesStore } from '@/store'
|
||||
import { PPTElement } from '@/types/slides'
|
||||
import type { PPTElement } from '@/types/slides'
|
||||
import { ElementOrderCommands } from '@/types/edit'
|
||||
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Ref, computed } from 'vue'
|
||||
import { SlideBackground } from '@/types/slides'
|
||||
import { type Ref, computed } from 'vue'
|
||||
import type { SlideBackground } from '@/types/slides'
|
||||
|
||||
// 将页面背景数据转换为css样式
|
||||
export default (background: Ref<SlideBackground | undefined>) => {
|
||||
|
@ -2,7 +2,7 @@ import { computed } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { nanoid } from 'nanoid'
|
||||
import { useMainStore, useSlidesStore } from '@/store'
|
||||
import { Slide } from '@/types/slides'
|
||||
import type { Slide } from '@/types/slides'
|
||||
import { copyText, readClipboard } from '@/utils/clipboard'
|
||||
import { encrypt } from '@/utils/crypto'
|
||||
import { createElementIdMap } from '@/utils/element'
|
||||
|
@ -1,8 +1,8 @@
|
||||
import tinycolor from 'tinycolor2'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useSlidesStore } from '@/store'
|
||||
import { Slide } from '@/types/slides'
|
||||
import { PresetTheme } from '@/configs/theme'
|
||||
import type { Slide } from '@/types/slides'
|
||||
import type { PresetTheme } from '@/configs/theme'
|
||||
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
||||
|
||||
export default () => {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { computed } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore, useSlidesStore } from '@/store'
|
||||
import { PPTElement } from '@/types/slides'
|
||||
import type { PPTElement } from '@/types/slides'
|
||||
import { getElementRange, getElementListRange, getRectRotatedOffset } from '@/utils/element'
|
||||
import useHistorySnapshot from './useHistorySnapshot'
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* eslint-disable max-lines */
|
||||
|
||||
import { Slide } from '@/types/slides'
|
||||
import type { Slide } from '@/types/slides'
|
||||
|
||||
export const layouts: Slide[] = [
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Slide } from '@/types/slides'
|
||||
import type { Slide } from '@/types/slides'
|
||||
|
||||
export const slides: Slide[] = [
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { SlideTheme } from '@/types/slides'
|
||||
import type { SlideTheme } from '@/types/slides'
|
||||
|
||||
export const theme: SlideTheme = {
|
||||
themeColor: '#5b9bd5',
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Directive, DirectiveBinding } from 'vue'
|
||||
import type { Directive, DirectiveBinding } from 'vue'
|
||||
|
||||
const CTX_CLICK_OUTSIDE_HANDLER = 'CTX_CLICK_OUTSIDE_HANDLER'
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Directive, createVNode, render, DirectiveBinding } from 'vue'
|
||||
import { type Directive, type DirectiveBinding, createVNode, render } from 'vue'
|
||||
import ContextmenuComponent from '@/components/Contextmenu/index.vue'
|
||||
|
||||
const CTX_CONTEXTMENU_HANDLER = 'CTX_CONTEXTMENU_HANDLER'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { App } from 'vue'
|
||||
import type { App } from 'vue'
|
||||
|
||||
import Contextmenu from './contextmenu'
|
||||
import ClickOutside from './clickOutside'
|
||||
|
@ -1,6 +1,6 @@
|
||||
// https://iconpark.bytedance.com/official
|
||||
|
||||
import { App } from 'vue'
|
||||
import type { App } from 'vue'
|
||||
import {
|
||||
PlayOne,
|
||||
FullScreenPlay,
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { customAlphabet } from 'nanoid'
|
||||
import { defineStore } from 'pinia'
|
||||
import { CreatingElement, TextFormatPainter } from '@/types/edit'
|
||||
import { ToolbarStates } from '@/types/toolbar'
|
||||
import { DialogForExportTypes } from '@/types/export'
|
||||
import type { CreatingElement, TextFormatPainter } from '@/types/edit'
|
||||
import type { DialogForExportTypes } from '@/types/export'
|
||||
import { type TextAttrs, defaultRichTextAttrs } from '@/utils/prosemirror/utils'
|
||||
import { SYS_FONTS } from '@/configs/font'
|
||||
import { TextAttrs, defaultRichTextAttrs } from '@/utils/prosemirror/utils'
|
||||
import { isSupportFont } from '@/utils/font'
|
||||
|
||||
import { useSlidesStore } from './slides'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import tinycolor from 'tinycolor2'
|
||||
import { omit } from 'lodash'
|
||||
import { Slide, SlideTheme, PPTElement, PPTAnimation } from '@/types/slides'
|
||||
import type { Slide, SlideTheme, PPTElement, PPTAnimation } from '@/types/slides'
|
||||
import { slides } from '@/mocks/slides'
|
||||
import { theme } from '@/mocks/theme'
|
||||
import { layouts } from '@/mocks/layout'
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { IndexableTypeArray } from 'dexie'
|
||||
import { db, Snapshot } from '@/utils/database'
|
||||
import type { IndexableTypeArray } from 'dexie'
|
||||
import { db, type Snapshot } from '@/utils/database'
|
||||
|
||||
import { useSlidesStore } from './slides'
|
||||
import { useMainStore } from './main'
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { ShapePoolItem } from '@/configs/shapes'
|
||||
import { LinePoolItem } from '@/configs/lines'
|
||||
import { ImageClipDataRange } from './slides'
|
||||
import type { ShapePoolItem } from '@/configs/shapes'
|
||||
import type { LinePoolItem } from '@/configs/lines'
|
||||
import type { ImageClipDataRange } from './slides'
|
||||
|
||||
export enum ElementOrderCommands {
|
||||
UP = 'up',
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { InjectionKey, Ref } from 'vue'
|
||||
import type { InjectionKey, Ref } from 'vue'
|
||||
|
||||
export type SlideScale = Ref<number>
|
||||
export type SlideId = Ref<string>
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { BarChartOptions, LineChartOptions, PieChartOptions } from 'chartist'
|
||||
import type { BarChartOptions, LineChartOptions, PieChartOptions } from 'chartist'
|
||||
|
||||
export const enum ShapePathFormulasKeys {
|
||||
ROUND_RECT = 'roundRect',
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Dexie from 'dexie'
|
||||
import { databaseId } from '@/store/main'
|
||||
import { Slide } from '@/types/slides'
|
||||
import type { Slide } from '@/types/slides'
|
||||
import { LOCALSTORAGE_KEY_DISCARDED_DB } from '@/configs/storage'
|
||||
|
||||
export interface writingBoardImg {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import tinycolor from 'tinycolor2'
|
||||
import { nanoid } from 'nanoid'
|
||||
import { PPTElement, PPTLineElement, Slide } from '@/types/slides'
|
||||
import type { PPTElement, PPTLineElement, Slide } from '@/types/slides'
|
||||
|
||||
interface RotatedElementData {
|
||||
left: number
|
||||
|
@ -1,4 +1,4 @@
|
||||
import mitt, { Emitter } from 'mitt'
|
||||
import mitt, { type Emitter } from 'mitt'
|
||||
|
||||
export const enum EmitterEvents {
|
||||
RICH_TEXT_COMMAND = 'RICH_TEXT_COMMAND',
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { HTMLNode, CommentOrTextAST, ElementAST, AST } from './types'
|
||||
import type { HTMLNode, CommentOrTextAST, ElementAST, AST } from './types'
|
||||
|
||||
export const splitHead = (str: string, sep: string) => {
|
||||
const idx = str.indexOf(sep)
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { startsWith, endsWith } from 'lodash'
|
||||
import { Token } from './types'
|
||||
import type { Token } from './types'
|
||||
import { childlessTags } from './tags'
|
||||
|
||||
interface State {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Token, HTMLNode, TagToken, NormalElement, TagEndToken, AttributeToken, TextToken } from './types'
|
||||
import type { Token, HTMLNode, TagToken, NormalElement, TagEndToken, AttributeToken, TextToken } from './types'
|
||||
import { closingTags, closingTagAncestorBreakers, voidTags } from './tags'
|
||||
|
||||
interface StackItem {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { AST, ElementAST, ElementAttribute } from './types'
|
||||
import type { AST, ElementAST, ElementAttribute } from './types'
|
||||
import { voidTags } from './tags'
|
||||
|
||||
export const formatAttributes = (attributes: ElementAttribute[]) => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Schema, Node, NodeType } from 'prosemirror-model'
|
||||
import { Transaction } from 'prosemirror-state'
|
||||
import { EditorView } from 'prosemirror-view'
|
||||
import type { Schema, Node, NodeType } from 'prosemirror-model'
|
||||
import type { Transaction } from 'prosemirror-state'
|
||||
import type { EditorView } from 'prosemirror-view'
|
||||
|
||||
export const setTextAlign = (tr: Transaction, schema: Schema, alignment: string) => {
|
||||
const { selection, doc } = tr
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Schema } from 'prosemirror-model'
|
||||
import { TextSelection, AllSelection, Transaction } from 'prosemirror-state'
|
||||
import { EditorView } from 'prosemirror-view'
|
||||
import type { Schema } from 'prosemirror-model'
|
||||
import { type Transaction, TextSelection, AllSelection } from 'prosemirror-state'
|
||||
import type { EditorView } from 'prosemirror-view'
|
||||
import { isList } from './toggleList'
|
||||
|
||||
function setNodeIndentMarkup(tr: Transaction, pos: number, delta: number): Transaction {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { wrapInList, liftListItem } from 'prosemirror-schema-list'
|
||||
import { Schema, Node, NodeType } from 'prosemirror-model'
|
||||
import { Transaction, EditorState } from 'prosemirror-state'
|
||||
import type { Schema, Node, NodeType } from 'prosemirror-model'
|
||||
import type { Transaction, EditorState } from 'prosemirror-state'
|
||||
import { findParentNode } from '../utils'
|
||||
|
||||
export const isList = (node: Node, schema: Schema) => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { keymap } from 'prosemirror-keymap'
|
||||
import { Schema } from 'prosemirror-model'
|
||||
import type { Schema } from 'prosemirror-model'
|
||||
import { history } from 'prosemirror-history'
|
||||
import { baseKeymap } from 'prosemirror-commands'
|
||||
import { dropCursor } from 'prosemirror-dropcursor'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { NodeType, Schema } from 'prosemirror-model'
|
||||
import type { NodeType, Schema } from 'prosemirror-model'
|
||||
import {
|
||||
inputRules,
|
||||
wrappingInputRule,
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { splitListItem, liftListItem, sinkListItem } from 'prosemirror-schema-list'
|
||||
import { Schema } from 'prosemirror-model'
|
||||
import type { Schema } from 'prosemirror-model'
|
||||
import { undo, redo } from 'prosemirror-history'
|
||||
import { undoInputRule } from 'prosemirror-inputrules'
|
||||
import { Command } from 'prosemirror-state'
|
||||
import type { Command } from 'prosemirror-state'
|
||||
import {
|
||||
toggleMark,
|
||||
selectParentNode,
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { marks } from 'prosemirror-schema-basic'
|
||||
import { MarkSpec } from 'prosemirror-model'
|
||||
import type { MarkSpec } from 'prosemirror-model'
|
||||
|
||||
const subscript: MarkSpec = {
|
||||
excludes: 'subscript',
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { nodes } from 'prosemirror-schema-basic'
|
||||
import { Node, NodeSpec } from 'prosemirror-model'
|
||||
import type { Node, NodeSpec } from 'prosemirror-model'
|
||||
import { listItem as _listItem } from 'prosemirror-schema-list'
|
||||
|
||||
interface Attr {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Node, NodeType, ResolvedPos, Mark, MarkType } from 'prosemirror-model'
|
||||
import { EditorState, Selection } from 'prosemirror-state'
|
||||
import { EditorView } from 'prosemirror-view'
|
||||
import type { Node, NodeType, ResolvedPos, Mark, MarkType } from 'prosemirror-model'
|
||||
import type { EditorState, Selection } from 'prosemirror-state'
|
||||
import type { EditorView } from 'prosemirror-view'
|
||||
import { selectAll } from 'prosemirror-commands'
|
||||
|
||||
export const autoSelectAll = (view: EditorView) => {
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
import { AlignmentLineAxis } from '@/types/edit'
|
||||
import type { AlignmentLineAxis } from '@/types/edit'
|
||||
|
||||
const props = defineProps<{
|
||||
type: 'vertical' | 'horizontal'
|
||||
|
@ -18,8 +18,8 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
import { ElementTypes, PPTElement } from '@/types/slides'
|
||||
import { ContextmenuItem } from '@/components/Contextmenu/types'
|
||||
import { ElementTypes, type PPTElement } from '@/types/slides'
|
||||
import type { ContextmenuItem } from '@/components/Contextmenu/types'
|
||||
|
||||
import useLockElement from '@/hooks/useLockElement'
|
||||
import useDeleteElement from '@/hooks/useDeleteElement'
|
||||
|
@ -29,7 +29,7 @@
|
||||
import { computed, onMounted, ref } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore, useKeyboardStore } from '@/store'
|
||||
import { CreateElementSelectionData } from '@/types/edit'
|
||||
import type { CreateElementSelectionData } from '@/types/edit'
|
||||
|
||||
const emit = defineEmits<{
|
||||
(event: 'created', payload: CreateElementSelectionData): void
|
||||
|
@ -19,7 +19,7 @@ import tinycolor from 'tinycolor2'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore, useSlidesStore } from '@/store'
|
||||
import { VIEWPORT_SIZE } from '@/configs/canvas'
|
||||
import { SlideBackground } from '@/types/slides'
|
||||
import type { SlideBackground } from '@/types/slides'
|
||||
|
||||
const { canvasScale, gridLineSize } = storeToRefs(useMainStore())
|
||||
const { currentSlide, viewportRatio } = storeToRefs(useSlidesStore())
|
||||
|
@ -46,7 +46,7 @@
|
||||
import { computed, onMounted, ref } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore, useSlidesStore } from '@/store'
|
||||
import { PPTElementLink } from '@/types/slides'
|
||||
import type { PPTElementLink } from '@/types/slides'
|
||||
import useLink from '@/hooks/useLink'
|
||||
|
||||
import ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'
|
||||
|
@ -15,7 +15,7 @@ defineProps<{
|
||||
left: number
|
||||
width: number
|
||||
height: number
|
||||
quadrant: 1 | 2 | 3 | 4
|
||||
quadrant: number
|
||||
}>()
|
||||
</script>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { OperateBorderLines } from '@/types/edit'
|
||||
import type { OperateBorderLines } from '@/types/edit'
|
||||
|
||||
withDefaults(defineProps<{
|
||||
type: OperateBorderLines
|
||||
|
@ -37,8 +37,8 @@ export default {
|
||||
import { computed } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore } from '@/store'
|
||||
import { PPTShapeElement, PPTVideoElement, PPTLatexElement, PPTAudioElement } from '@/types/slides'
|
||||
import { OperateResizeHandlers } from '@/types/edit'
|
||||
import type { PPTShapeElement, PPTVideoElement, PPTLatexElement, PPTAudioElement } from '@/types/slides'
|
||||
import type { OperateResizeHandlers } from '@/types/edit'
|
||||
import useCommonOperate from '../hooks/useCommonOperate'
|
||||
|
||||
import RotateHandler from './RotateHandler.vue'
|
||||
|
@ -36,8 +36,8 @@ export default {
|
||||
import { computed } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore } from '@/store'
|
||||
import { PPTImageElement } from '@/types/slides'
|
||||
import { OperateResizeHandlers } from '@/types/edit'
|
||||
import type { PPTImageElement } from '@/types/slides'
|
||||
import type { OperateResizeHandlers } from '@/types/edit'
|
||||
import useCommonOperate from '../hooks/useCommonOperate'
|
||||
|
||||
import RotateHandler from './RotateHandler.vue'
|
||||
|
@ -43,7 +43,7 @@ export default {
|
||||
import { computed } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore } from '@/store'
|
||||
import { PPTLineElement } from '@/types/slides'
|
||||
import type { PPTLineElement } from '@/types/slides'
|
||||
import { OperateLineHandlers } from '@/types/edit'
|
||||
|
||||
import ResizeHandler from './ResizeHandler.vue'
|
||||
|
@ -14,7 +14,7 @@
|
||||
import { computed } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore, useSlidesStore } from '@/store'
|
||||
import { PPTElement, PPTElementLink } from '@/types/slides'
|
||||
import type { PPTElement, PPTElementLink } from '@/types/slides'
|
||||
import useLink from '@/hooks/useLink'
|
||||
|
||||
import { Divider } from 'ant-design-vue'
|
||||
|
@ -24,9 +24,9 @@
|
||||
import { computed, ref, watchEffect } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore } from '@/store'
|
||||
import { PPTElement } from '@/types/slides'
|
||||
import type { PPTElement } from '@/types/slides'
|
||||
import { getElementListRange } from '@/utils/element'
|
||||
import { OperateResizeHandlers, MultiSelectRange } from '@/types/edit'
|
||||
import type { OperateResizeHandlers, MultiSelectRange } from '@/types/edit'
|
||||
import useCommonOperate from '../hooks/useCommonOperate'
|
||||
|
||||
import ResizeHandler from './ResizeHandler.vue'
|
||||
|
@ -4,10 +4,10 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
import { OperateResizeHandlers } from '@/types/edit'
|
||||
import type { OperateResizeHandlers } from '@/types/edit'
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
type: OperateResizeHandlers
|
||||
type?: OperateResizeHandlers
|
||||
rotate?: number
|
||||
}>(), {
|
||||
rotate: 0,
|
||||
|
@ -42,8 +42,8 @@ export default {
|
||||
import { computed } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore } from '@/store'
|
||||
import { PPTShapeElement } from '@/types/slides'
|
||||
import { OperateResizeHandlers } from '@/types/edit'
|
||||
import type { PPTShapeElement } from '@/types/slides'
|
||||
import type { OperateResizeHandlers } from '@/types/edit'
|
||||
import { SHAPE_PATH_FORMULAS } from '@/configs/shapes'
|
||||
import useCommonOperate from '../hooks/useCommonOperate'
|
||||
|
||||
|
@ -36,8 +36,8 @@ export default {
|
||||
import { computed } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore } from '@/store'
|
||||
import { PPTTableElement } from '@/types/slides'
|
||||
import { OperateResizeHandlers } from '@/types/edit'
|
||||
import type { PPTTableElement } from '@/types/slides'
|
||||
import type { OperateResizeHandlers } from '@/types/edit'
|
||||
import useCommonOperate from '../hooks/useCommonOperate'
|
||||
|
||||
import RotateHandler from './RotateHandler.vue'
|
||||
|
@ -36,8 +36,8 @@ export default {
|
||||
import { computed } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore } from '@/store'
|
||||
import { PPTTextElement } from '@/types/slides'
|
||||
import { OperateResizeHandlers } from '@/types/edit'
|
||||
import type { PPTTextElement } from '@/types/slides'
|
||||
import type { OperateResizeHandlers } from '@/types/edit'
|
||||
import useCommonOperate from '../hooks/useCommonOperate'
|
||||
|
||||
import RotateHandler from './RotateHandler.vue'
|
||||
|
@ -41,8 +41,8 @@
|
||||
import { computed } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore, useSlidesStore } from '@/store'
|
||||
import { ElementTypes, PPTElement, PPTLineElement, PPTVideoElement, PPTAudioElement, PPTShapeElement } from '@/types/slides'
|
||||
import { OperateLineHandlers, OperateResizeHandlers } from '@/types/edit'
|
||||
import { ElementTypes, type PPTElement, type PPTLineElement, type PPTVideoElement, type PPTAudioElement, type PPTShapeElement } from '@/types/slides'
|
||||
import type { OperateLineHandlers, OperateResizeHandlers } from '@/types/edit'
|
||||
|
||||
import ImageElementOperate from './ImageElementOperate.vue'
|
||||
import TextElementOperate from './TextElementOperate.vue'
|
||||
|
@ -11,7 +11,7 @@
|
||||
import { computed } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore, useSlidesStore } from '@/store'
|
||||
import { SlideBackground } from '@/types/slides'
|
||||
import type { SlideBackground } from '@/types/slides'
|
||||
import GridLines from './GridLines.vue'
|
||||
import useSlideBackgroundStyle from '@/hooks/useSlideBackgroundStyle'
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { computed, Ref } from 'vue'
|
||||
import { computed, type Ref } from 'vue'
|
||||
import { OperateResizeHandlers, OperateBorderLines } from '@/types/edit'
|
||||
|
||||
export default (width: Ref<number>, height: Ref<number>) => {
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { Ref } from 'vue'
|
||||
import type { Ref } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore, useSlidesStore, useKeyboardStore } from '@/store'
|
||||
import { PPTElement } from '@/types/slides'
|
||||
import { AlignmentLineProps } from '@/types/edit'
|
||||
import type { PPTElement } from '@/types/slides'
|
||||
import type { AlignmentLineProps } from '@/types/edit'
|
||||
import { VIEWPORT_SIZE } from '@/configs/canvas'
|
||||
import { getRectRotatedRange, AlignLine, uniqAlignLines } from '@/utils/element'
|
||||
import { getRectRotatedRange, uniqAlignLines, type AlignLine } from '@/utils/element'
|
||||
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
||||
|
||||
export default (
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Ref } from 'vue'
|
||||
import type { Ref } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore, useSlidesStore } from '@/store'
|
||||
import { PPTElement, PPTLineElement } from '@/types/slides'
|
||||
import type { PPTElement, PPTLineElement } from '@/types/slides'
|
||||
import { OperateLineHandlers } from '@/types/edit'
|
||||
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { onMounted, onUnmounted, Ref } from 'vue'
|
||||
import { onMounted, onUnmounted, type Ref } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore } from '@/store'
|
||||
import { getImageDataURL } from '@/utils/image'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Ref } from 'vue'
|
||||
import type { Ref } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore } from '@/store'
|
||||
import { CreateElementSelectionData } from '@/types/edit'
|
||||
import type { CreateElementSelectionData } from '@/types/edit'
|
||||
import useCreateElement from '@/hooks/useCreateElement'
|
||||
|
||||
export default (viewportRef: Ref<HTMLElement | undefined>) => {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Ref, ref } from 'vue'
|
||||
import { type Ref, ref } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore } from '@/store'
|
||||
import { PPTElement } from '@/types/slides'
|
||||
import type { PPTElement } from '@/types/slides'
|
||||
import { getElementRange } from '@/utils/element'
|
||||
|
||||
export default (elementList: Ref<PPTElement[]>, viewportRef: Ref<HTMLElement | undefined>) => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Ref } from 'vue'
|
||||
import type { Ref } from 'vue'
|
||||
import { useSlidesStore } from '@/store'
|
||||
import { PPTElement, PPTShapeElement } from '@/types/slides'
|
||||
import type { PPTElement, PPTShapeElement } from '@/types/slides'
|
||||
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
||||
import { SHAPE_PATH_FORMULAS } from '@/configs/shapes'
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Ref } from 'vue'
|
||||
import type { Ref } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore, useSlidesStore } from '@/store'
|
||||
import { PPTElement, PPTLineElement, PPTVideoElement, PPTAudioElement } from '@/types/slides'
|
||||
import type { PPTElement, PPTLineElement, PPTVideoElement, PPTAudioElement } from '@/types/slides'
|
||||
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
||||
|
||||
/**
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { Ref } from 'vue'
|
||||
import type { Ref } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore, useSlidesStore, useKeyboardStore } from '@/store'
|
||||
import { PPTElement, PPTImageElement, PPTLineElement, PPTShapeElement } from '@/types/slides'
|
||||
import { OperateResizeHandlers, AlignmentLineProps, MultiSelectRange } from '@/types/edit'
|
||||
import type { PPTElement, PPTImageElement, PPTLineElement, PPTShapeElement } from '@/types/slides'
|
||||
import { OperateResizeHandlers, type AlignmentLineProps, type MultiSelectRange } from '@/types/edit'
|
||||
import { VIEWPORT_SIZE } from '@/configs/canvas'
|
||||
import { MIN_SIZE } from '@/configs/element'
|
||||
import { SHAPE_PATH_FORMULAS } from '@/configs/shapes'
|
||||
import { AlignLine, uniqAlignLines } from '@/utils/element'
|
||||
import { type AlignLine, uniqAlignLines } from '@/utils/element'
|
||||
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
||||
|
||||
interface RotateElementData {
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Ref } from 'vue'
|
||||
import type { Ref } from 'vue'
|
||||
import { uniq } from 'lodash'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore, useKeyboardStore } from '@/store'
|
||||
import { PPTElement } from '@/types/slides'
|
||||
import type { PPTElement } from '@/types/slides'
|
||||
|
||||
export default (
|
||||
elementList: Ref<PPTElement[]>,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { ref, computed, onMounted, onUnmounted, Ref, watch } from 'vue'
|
||||
import { ref, computed, onMounted, onUnmounted, watch, type Ref } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore, useSlidesStore } from '@/store'
|
||||
import { VIEWPORT_SIZE } from '@/configs/canvas'
|
||||
|
@ -99,9 +99,9 @@ import { nextTick, onMounted, onUnmounted, provide, ref, watch, watchEffect } fr
|
||||
import { throttle } from 'lodash'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore, useSlidesStore, useKeyboardStore } from '@/store'
|
||||
import { ContextmenuItem } from '@/components/Contextmenu/types'
|
||||
import { PPTElement } from '@/types/slides'
|
||||
import { AlignmentLineProps } from '@/types/edit'
|
||||
import type { ContextmenuItem } from '@/components/Contextmenu/types'
|
||||
import type { PPTElement } from '@/types/slides'
|
||||
import type { AlignmentLineProps } from '@/types/edit'
|
||||
import { injectKeySlideScale } from '@/types/injectKey'
|
||||
import { removeAllRanges } from '@/utils/selection'
|
||||
import { KEYS } from '@/configs/hotkey'
|
||||
|
@ -15,7 +15,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { PresetChartType } from '@/types/slides'
|
||||
import type { PresetChartType } from '@/types/slides'
|
||||
|
||||
const emit = defineEmits<{
|
||||
(event: 'select', payload: PresetChartType): void
|
||||
|
@ -49,7 +49,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { LINE_LIST, LinePoolItem } from '@/configs/lines'
|
||||
import { LINE_LIST, type LinePoolItem } from '@/configs/lines'
|
||||
|
||||
import LinePointMarker from '@/views/components/element/LineElement/LinePointMarker.vue'
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ShapePoolItem } from '@/configs/shapes'
|
||||
import type { ShapePoolItem } from '@/configs/shapes'
|
||||
|
||||
defineProps<{
|
||||
shape: ShapePoolItem
|
||||
|
@ -16,7 +16,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { SHAPE_LIST, ShapePoolItem } from '@/configs/shapes'
|
||||
import { SHAPE_LIST, type ShapePoolItem } from '@/configs/shapes'
|
||||
import ShapeItemThumbnail from './ShapeItemThumbnail.vue'
|
||||
|
||||
const emit = defineEmits<{
|
||||
|
@ -121,8 +121,8 @@ import { ref } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore, useSnapshotStore } from '@/store'
|
||||
import { getImageDataURL } from '@/utils/image'
|
||||
import { ShapePoolItem } from '@/configs/shapes'
|
||||
import { LinePoolItem } from '@/configs/lines'
|
||||
import type { ShapePoolItem } from '@/configs/shapes'
|
||||
import type { LinePoolItem } from '@/configs/lines'
|
||||
import useScaleCanvas from '@/hooks/useScaleCanvas'
|
||||
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
||||
import useCreateElement from '@/hooks/useCreateElement'
|
||||
|
@ -19,7 +19,7 @@
|
||||
import { computed } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore } from '@/store'
|
||||
import { DialogForExportTypes } from '@/types/export'
|
||||
import type { DialogForExportTypes } from '@/types/export'
|
||||
|
||||
import ExportImage from './ExportImage.vue'
|
||||
import ExportJSON from './ExportJSON.vue'
|
||||
|
@ -80,7 +80,7 @@
|
||||
import { computed, nextTick, ref } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useSlidesStore, useMainStore } from '@/store'
|
||||
import { PPTElement } from '@/types/slides'
|
||||
import type { PPTElement } from '@/types/slides'
|
||||
import { ELEMENT_TYPE_ZH } from '@/configs/element'
|
||||
import useOrderElement from '@/hooks/useOrderElement'
|
||||
import { ElementOrderCommands } from '@/types/edit'
|
||||
|
@ -14,7 +14,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useSlidesStore } from '@/store'
|
||||
import { Slide } from '@/types/slides'
|
||||
import type { Slide } from '@/types/slides'
|
||||
|
||||
import ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'
|
||||
|
||||
|
@ -49,7 +49,7 @@ import { computed, ref } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore, useSlidesStore, useKeyboardStore } from '@/store'
|
||||
import { fillDigit } from '@/utils/common'
|
||||
import { ContextmenuItem } from '@/components/Contextmenu/types'
|
||||
import type { ContextmenuItem } from '@/components/Contextmenu/types'
|
||||
import useSlideHandler from '@/hooks/useSlideHandler'
|
||||
import useScreening from '@/hooks/useScreening'
|
||||
import useLoadSlides from '@/hooks/useLoadSlides'
|
||||
|
@ -118,7 +118,7 @@ import { computed, ref, watch } from 'vue'
|
||||
import { nanoid } from 'nanoid'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore, useSlidesStore } from '@/store'
|
||||
import { PPTAnimation } from '@/types/slides'
|
||||
import type { PPTAnimation } from '@/types/slides'
|
||||
import {
|
||||
ENTER_ANIMATIONS,
|
||||
EXIT_ANIMATIONS,
|
||||
|
@ -36,10 +36,10 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { Ref } from 'vue'
|
||||
import type { Ref } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore, useSlidesStore } from '@/store'
|
||||
import { PPTAudioElement } from '@/types/slides'
|
||||
import type { PPTAudioElement } from '@/types/slides'
|
||||
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
||||
|
||||
import ColorButton from '../common/ColorButton.vue'
|
||||
|
@ -56,7 +56,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, onMounted, onUnmounted, ref } from 'vue'
|
||||
import { ChartData } from '@/types/slides'
|
||||
import type { ChartData } from '@/types/slides'
|
||||
import { KEYS } from '@/configs/hotkey'
|
||||
import { pasteCustomClipboardString, pasteExcelClipboardString } from '@/utils/clipboard'
|
||||
|
||||
|
@ -152,10 +152,10 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onUnmounted, Ref, ref, watch } from 'vue'
|
||||
import { onUnmounted, ref, watch, type Ref } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore, useSlidesStore } from '@/store'
|
||||
import { ChartData, ChartOptions, PPTChartElement } from '@/types/slides'
|
||||
import type { ChartData, ChartOptions, PPTChartElement } from '@/types/slides'
|
||||
import emitter, { EmitterEvents } from '@/utils/emitter'
|
||||
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
||||
|
||||
|
@ -60,10 +60,10 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { Ref, ref } from 'vue'
|
||||
import { type Ref, ref } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore, useSlidesStore } from '@/store'
|
||||
import { PPTImageElement, SlideBackground } from '@/types/slides'
|
||||
import type { PPTImageElement, SlideBackground } from '@/types/slides'
|
||||
import { CLIPPATHS } from '@/configs/imageClip'
|
||||
import { getImageDataURL } from '@/utils/image'
|
||||
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
||||
|
@ -44,10 +44,10 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onUnmounted, Ref, ref } from 'vue'
|
||||
import { onUnmounted, ref, type Ref } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useMainStore, useSlidesStore } from '@/store'
|
||||
import { PPTLatexElement } from '@/types/slides'
|
||||
import type { PPTLatexElement } from '@/types/slides'
|
||||
import emitter, { EmitterEvents } from '@/utils/emitter'
|
||||
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user