Skip to content

Commit

Permalink
feat: up IDOC
Browse files Browse the repository at this point in the history
  • Loading branch information
qq15725 committed Dec 25, 2024
1 parent c5e0e8f commit adb985c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
},
"dependencies": {
"modern-font": "^0.3.4",
"modern-idoc": "^0.0.2",
"modern-idoc": "^0.0.3",
"modern-path2d": "^1.0.0"
},
"devDependencies": {
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Fonts } from 'modern-font'
import type { ITextContent, ITextStyle } from 'modern-idoc'
import type { IText } from 'modern-idoc'
import type { BoundingBox, Path2D } from 'modern-path2d'
import type { Text } from './Text'

Expand All @@ -14,11 +14,8 @@ export interface TextPlugin {
load?: (text: Text) => Promise<void>
}

export interface TextOptions {
export interface TextOptions extends Partial<Omit<IText, 'type'>> {
debug?: boolean
content?: ITextContent
style?: Partial<ITextStyle>
measureDom?: HTMLElement
effects?: Partial<ITextStyle>[]
fonts?: Fonts
}

0 comments on commit adb985c

Please sign in to comment.