@hufe921/canvas-editor 0.9.9

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.
Files changed (112) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +53 -0
  3. package/dist/canvas-editor.es.js +11339 -0
  4. package/dist/canvas-editor.es.js.map +1 -0
  5. package/dist/canvas-editor.umd.js +59 -0
  6. package/dist/canvas-editor.umd.js.map +1 -0
  7. package/dist/src/editor/core/command/Command.d.ts +148 -0
  8. package/dist/src/editor/core/command/CommandAdapt.d.ts +91 -0
  9. package/dist/src/editor/core/contextmenu/ContextMenu.d.ts +25 -0
  10. package/dist/src/editor/core/contextmenu/menus/controlMenus.d.ts +2 -0
  11. package/dist/src/editor/core/contextmenu/menus/globalMenus.d.ts +2 -0
  12. package/dist/src/editor/core/contextmenu/menus/hyperlinkMenus.d.ts +2 -0
  13. package/dist/src/editor/core/contextmenu/menus/imageMenus.d.ts +2 -0
  14. package/dist/src/editor/core/contextmenu/menus/tableMenus.d.ts +2 -0
  15. package/dist/src/editor/core/cursor/Cursor.d.ts +15 -0
  16. package/dist/src/editor/core/cursor/CursorAgent.d.ts +15 -0
  17. package/dist/src/editor/core/draw/Draw.d.ts +134 -0
  18. package/dist/src/editor/core/draw/control/Control.d.ts +35 -0
  19. package/dist/src/editor/core/draw/control/checkbox/CheckboxControl.d.ts +15 -0
  20. package/dist/src/editor/core/draw/control/select/SelectControl.d.ts +21 -0
  21. package/dist/src/editor/core/draw/control/text/TextControl.d.ts +13 -0
  22. package/dist/src/editor/core/draw/frame/Background.d.ts +6 -0
  23. package/dist/src/editor/core/draw/frame/Header.d.ts +7 -0
  24. package/dist/src/editor/core/draw/frame/Margin.d.ts +7 -0
  25. package/dist/src/editor/core/draw/frame/PageNumber.d.ts +7 -0
  26. package/dist/src/editor/core/draw/frame/Watermark.d.ts +7 -0
  27. package/dist/src/editor/core/draw/interactive/Search.d.ts +26 -0
  28. package/dist/src/editor/core/draw/particle/CheckboxParticle.d.ts +7 -0
  29. package/dist/src/editor/core/draw/particle/HyperlinkParticle.d.ts +16 -0
  30. package/dist/src/editor/core/draw/particle/ImageParticle.d.ts +9 -0
  31. package/dist/src/editor/core/draw/particle/PageBreak.d.ts +12 -0
  32. package/dist/src/editor/core/draw/particle/Separator.d.ts +4 -0
  33. package/dist/src/editor/core/draw/particle/Subscript.d.ts +4 -0
  34. package/dist/src/editor/core/draw/particle/Superscript.d.ts +4 -0
  35. package/dist/src/editor/core/draw/particle/TextParticle.d.ts +18 -0
  36. package/dist/src/editor/core/draw/particle/block/BlockParticle.d.ts +14 -0
  37. package/dist/src/editor/core/draw/particle/block/modules/BaseBlock.d.ts +15 -0
  38. package/dist/src/editor/core/draw/particle/block/modules/IFrameBlock.d.ts +7 -0
  39. package/dist/src/editor/core/draw/particle/block/modules/VideoBlock.d.ts +6 -0
  40. package/dist/src/editor/core/draw/particle/date/DateParticle.d.ts +14 -0
  41. package/dist/src/editor/core/draw/particle/date/DatePicker.d.ts +41 -0
  42. package/dist/src/editor/core/draw/particle/latex/LaTexParticle.d.ts +7 -0
  43. package/dist/src/editor/core/draw/particle/latex/utils/LaTexUtils.d.ts +47 -0
  44. package/dist/src/editor/core/draw/particle/latex/utils/hershey.d.ts +10 -0
  45. package/dist/src/editor/core/draw/particle/latex/utils/symbols.d.ts +8 -0
  46. package/dist/src/editor/core/draw/particle/previewer/Previewer.d.ts +34 -0
  47. package/dist/src/editor/core/draw/particle/table/TableParticle.d.ts +11 -0
  48. package/dist/src/editor/core/draw/particle/table/TableTool.d.ts +22 -0
  49. package/dist/src/editor/core/draw/richtext/AbstractRichText.d.ts +14 -0
  50. package/dist/src/editor/core/draw/richtext/Highlight.d.ts +7 -0
  51. package/dist/src/editor/core/draw/richtext/Strikeout.d.ts +7 -0
  52. package/dist/src/editor/core/draw/richtext/Underline.d.ts +7 -0
  53. package/dist/src/editor/core/event/CanvasEvent.d.ts +37 -0
  54. package/dist/src/editor/core/event/GlobalEvent.d.ts +20 -0
  55. package/dist/src/editor/core/history/HistoryManager.d.ts +10 -0
  56. package/dist/src/editor/core/listener/Listener.d.ts +13 -0
  57. package/dist/src/editor/core/observer/ScrollObserver.d.ts +9 -0
  58. package/dist/src/editor/core/observer/SelectionObserver.d.ts +16 -0
  59. package/dist/src/editor/core/position/Position.d.ts +19 -0
  60. package/dist/src/editor/core/range/RangeManager.d.ts +21 -0
  61. package/dist/src/editor/core/register/Register.d.ts +14 -0
  62. package/dist/src/editor/core/shortcut/Shortcut.d.ts +14 -0
  63. package/dist/src/editor/core/shortcut/keys/richtextKeys.d.ts +2 -0
  64. package/dist/src/editor/core/worker/WorkerManager.d.ts +7 -0
  65. package/dist/src/editor/core/worker/works/wordCount.d.ts +1 -0
  66. package/dist/src/editor/dataset/constant/Checkbox.d.ts +2 -0
  67. package/dist/src/editor/dataset/constant/Common.d.ts +4 -0
  68. package/dist/src/editor/dataset/constant/ContextMenu.d.ts +3 -0
  69. package/dist/src/editor/dataset/constant/Control.d.ts +2 -0
  70. package/dist/src/editor/dataset/constant/Cursor.d.ts +1 -0
  71. package/dist/src/editor/dataset/constant/Editor.d.ts +1 -0
  72. package/dist/src/editor/dataset/constant/Element.d.ts +6 -0
  73. package/dist/src/editor/dataset/constant/Header.d.ts +2 -0
  74. package/dist/src/editor/dataset/constant/Regular.d.ts +4 -0
  75. package/dist/src/editor/dataset/constant/Watermark.d.ts +2 -0
  76. package/dist/src/editor/dataset/enum/Block.d.ts +4 -0
  77. package/dist/src/editor/dataset/enum/Control.d.ts +16 -0
  78. package/dist/src/editor/dataset/enum/Editor.d.ts +21 -0
  79. package/dist/src/editor/dataset/enum/Element.d.ts +16 -0
  80. package/dist/src/editor/dataset/enum/ElementStyle.d.ts +12 -0
  81. package/dist/src/editor/dataset/enum/Event.d.ts +5 -0
  82. package/dist/src/editor/dataset/enum/KeyMap.d.ts +82 -0
  83. package/dist/src/editor/dataset/enum/Observer.d.ts +6 -0
  84. package/dist/src/editor/dataset/enum/Row.d.ts +6 -0
  85. package/dist/src/editor/dataset/enum/table/TableTool.d.ts +4 -0
  86. package/dist/src/editor/index.d.ts +25 -0
  87. package/dist/src/editor/interface/Block.d.ts +12 -0
  88. package/dist/src/editor/interface/Checkbox.d.ts +13 -0
  89. package/dist/src/editor/interface/Common.d.ts +5 -0
  90. package/dist/src/editor/interface/Control.d.ts +50 -0
  91. package/dist/src/editor/interface/Draw.d.ts +30 -0
  92. package/dist/src/editor/interface/Editor.d.ts +55 -0
  93. package/dist/src/editor/interface/Element.d.ts +99 -0
  94. package/dist/src/editor/interface/Header.d.ts +6 -0
  95. package/dist/src/editor/interface/Listener.d.ts +29 -0
  96. package/dist/src/editor/interface/Margin.d.ts +1 -0
  97. package/dist/src/editor/interface/Position.d.ts +37 -0
  98. package/dist/src/editor/interface/Previewer.d.ts +11 -0
  99. package/dist/src/editor/interface/Range.d.ts +11 -0
  100. package/dist/src/editor/interface/Row.d.ts +14 -0
  101. package/dist/src/editor/interface/Search.d.ts +14 -0
  102. package/dist/src/editor/interface/Watermark.d.ts +7 -0
  103. package/dist/src/editor/interface/contextmenu/ContextMenu.d.ts +20 -0
  104. package/dist/src/editor/interface/shortcut/Shortcut.d.ts +10 -0
  105. package/dist/src/editor/interface/table/Colgroup.d.ts +4 -0
  106. package/dist/src/editor/interface/table/Td.d.ts +19 -0
  107. package/dist/src/editor/interface/table/Tr.d.ts +6 -0
  108. package/dist/src/editor/utils/clipboard.d.ts +5 -0
  109. package/dist/src/editor/utils/element.d.ts +10 -0
  110. package/dist/src/editor/utils/index.d.ts +8 -0
  111. package/dist/src/editor/utils/print.d.ts +1 -0
  112. package/package.json +60 -0
@@ -0,0 +1,55 @@
1
+ import { IElement } from '..';
2
+ import { EditorMode, PageMode } from '../dataset/enum/Editor';
3
+ import { ICheckboxOption } from './Checkbox';
4
+ import { IControlOption } from './Control';
5
+ import { IHeader } from './Header';
6
+ import { IMargin } from './Margin';
7
+ import { IWatermark } from './Watermark';
8
+ export interface IEditorOption {
9
+ mode?: EditorMode;
10
+ defaultType?: string;
11
+ defaultFont?: string;
12
+ defaultSize?: number;
13
+ defaultBasicRowMarginHeight?: number;
14
+ defaultRowMargin?: number;
15
+ defaultTabWidth?: number;
16
+ width?: number;
17
+ height?: number;
18
+ scale?: number;
19
+ pageGap?: number;
20
+ pageNumberBottom?: number;
21
+ pageNumberSize?: number;
22
+ pageNumberFont?: string;
23
+ underlineColor?: string;
24
+ strikeoutColor?: string;
25
+ rangeColor?: string;
26
+ rangeAlpha?: number;
27
+ rangeMinWidth?: number;
28
+ searchMatchColor?: string;
29
+ searchNavigateMatchColor?: string;
30
+ searchMatchAlpha?: number;
31
+ highlightAlpha?: number;
32
+ resizerColor?: string;
33
+ resizerSize?: number;
34
+ marginIndicatorSize?: number;
35
+ marginIndicatorColor?: string;
36
+ margins?: IMargin;
37
+ pageMode?: PageMode;
38
+ tdPadding?: number;
39
+ defaultTdHeight?: number;
40
+ defaultHyperlinkColor?: string;
41
+ headerTop?: number;
42
+ header?: IHeader;
43
+ watermark?: IWatermark;
44
+ control?: IControlOption;
45
+ checkbox?: ICheckboxOption;
46
+ }
47
+ export interface IEditorResult {
48
+ version: string;
49
+ width: number;
50
+ height: number;
51
+ margins: IMargin;
52
+ header?: IHeader;
53
+ watermark?: IWatermark;
54
+ data: IElement[];
55
+ }
@@ -0,0 +1,99 @@
1
+ import { ControlComponent, ImageDisplay } from '../dataset/enum/Control';
2
+ import { ElementType } from '../dataset/enum/Element';
3
+ import { RowFlex } from '../dataset/enum/Row';
4
+ import { IBlock } from './Block';
5
+ import { ICheckbox } from './Checkbox';
6
+ import { IControl } from './Control';
7
+ import { IColgroup } from './table/Colgroup';
8
+ import { ITr } from './table/Tr';
9
+ export interface IElementBasic {
10
+ id?: string;
11
+ type?: ElementType;
12
+ value: string;
13
+ }
14
+ export interface IElementStyle {
15
+ font?: string;
16
+ size?: number;
17
+ width?: number;
18
+ height?: number;
19
+ bold?: boolean;
20
+ color?: string;
21
+ highlight?: string;
22
+ italic?: boolean;
23
+ underline?: boolean;
24
+ strikeout?: boolean;
25
+ rowFlex?: RowFlex;
26
+ rowMargin?: number;
27
+ letterSpacing?: number;
28
+ }
29
+ export interface ITableAttr {
30
+ colgroup?: IColgroup[];
31
+ trList?: ITr[];
32
+ }
33
+ export interface ITableElement {
34
+ tdId?: string;
35
+ trId?: string;
36
+ tableId?: string;
37
+ }
38
+ export interface IHyperlinkElement {
39
+ valueList?: IElement[];
40
+ url?: string;
41
+ hyperlinkId?: string;
42
+ }
43
+ export declare type ITable = ITableAttr & ITableElement;
44
+ export interface ISuperscriptSubscript {
45
+ actualSize?: number;
46
+ }
47
+ export interface ISeparator {
48
+ dashArray?: number[];
49
+ }
50
+ export interface IControlElement {
51
+ control?: IControl;
52
+ controlId?: string;
53
+ controlComponent?: ControlComponent;
54
+ }
55
+ export interface ICheckboxElement {
56
+ checkbox?: ICheckbox;
57
+ }
58
+ export interface ILaTexElement {
59
+ laTexSVG?: string;
60
+ }
61
+ export interface IDateElement {
62
+ dateFormat?: string;
63
+ dateId?: string;
64
+ }
65
+ export interface IImageElement {
66
+ imgDisplay?: ImageDisplay;
67
+ }
68
+ export interface IBlockElement {
69
+ block?: IBlock;
70
+ }
71
+ export declare type IElement = IElementBasic & IElementStyle & ITable & IHyperlinkElement & ISuperscriptSubscript & ISeparator & IControlElement & ICheckboxElement & ILaTexElement & IDateElement & IImageElement & IBlockElement;
72
+ export interface IElementMetrics {
73
+ width: number;
74
+ height: number;
75
+ boundingBoxAscent: number;
76
+ boundingBoxDescent: number;
77
+ }
78
+ export interface IElementPosition {
79
+ pageNo: number;
80
+ index: number;
81
+ value: string;
82
+ rowNo: number;
83
+ ascent: number;
84
+ lineHeight: number;
85
+ metrics: IElementMetrics;
86
+ isLastLetter: boolean;
87
+ coordinate: {
88
+ leftTop: number[];
89
+ leftBottom: number[];
90
+ rightTop: number[];
91
+ rightBottom: number[];
92
+ };
93
+ }
94
+ export interface IElementFillRect {
95
+ x: number;
96
+ y: number;
97
+ width: number;
98
+ height: number;
99
+ }
@@ -0,0 +1,6 @@
1
+ export interface IHeader {
2
+ data: string;
3
+ color?: string;
4
+ size?: number;
5
+ font?: string;
6
+ }
@@ -0,0 +1,29 @@
1
+ import { ElementType, PageMode } from '..';
2
+ import { RowFlex } from '../dataset/enum/Row';
3
+ import { IControl } from './Control';
4
+ import { IEditorResult } from './Editor';
5
+ export interface IRangeStyle {
6
+ type: ElementType | null;
7
+ undo: boolean;
8
+ redo: boolean;
9
+ painter: boolean;
10
+ font: string;
11
+ bold: boolean;
12
+ italic: boolean;
13
+ underline: boolean;
14
+ strikeout: boolean;
15
+ color: string | null;
16
+ highlight: string | null;
17
+ rowFlex: RowFlex | null;
18
+ rowMargin: number;
19
+ dashArray: number[];
20
+ }
21
+ export declare type IRangeStyleChange = (payload: IRangeStyle) => void;
22
+ export declare type IVisiblePageNoListChange = (payload: number[]) => void;
23
+ export declare type IIntersectionPageNoChange = (payload: number) => void;
24
+ export declare type IPageSizeChange = (payload: number) => void;
25
+ export declare type IPageScaleChange = (payload: number) => void;
26
+ export declare type ISaved = (payload: IEditorResult) => void;
27
+ export declare type IContentChange = () => void;
28
+ export declare type IControlChange = (payload: IControl | null) => void;
29
+ export declare type IPageModeChange = (payload: PageMode) => void;
@@ -0,0 +1 @@
1
+ export declare type IMargin = [top: number, right: number, bottom: number, left: number];
@@ -0,0 +1,37 @@
1
+ import { IElement } from '..';
2
+ import { IElementPosition } from './Element';
3
+ import { ITd } from './table/Td';
4
+ export interface ICurrentPosition {
5
+ index: number;
6
+ isCheckbox?: boolean;
7
+ isControl?: boolean;
8
+ isImage?: boolean;
9
+ isTable?: boolean;
10
+ isDirectHit?: boolean;
11
+ trIndex?: number;
12
+ tdIndex?: number;
13
+ tdValueIndex?: number;
14
+ tdId?: string;
15
+ trId?: string;
16
+ tableId?: string;
17
+ }
18
+ export interface IGetPositionByXYPayload {
19
+ x: number;
20
+ y: number;
21
+ isTable?: boolean;
22
+ td?: ITd;
23
+ tablePosition?: IElementPosition;
24
+ elementList?: IElement[];
25
+ positionList?: IElementPosition[];
26
+ }
27
+ export interface IPositionContext {
28
+ isTable: boolean;
29
+ isCheckbox?: boolean;
30
+ isControl?: boolean;
31
+ index?: number;
32
+ trIndex?: number;
33
+ tdIndex?: number;
34
+ tdId?: string;
35
+ trId?: string;
36
+ tableId?: string;
37
+ }
@@ -0,0 +1,11 @@
1
+ import { IElement } from './Element';
2
+ export interface IPreviewerCreateResult {
3
+ resizerSelection: HTMLDivElement;
4
+ resizerHandleList: HTMLDivElement[];
5
+ resizerImageContainer: HTMLDivElement;
6
+ resizerImage: HTMLImageElement;
7
+ }
8
+ export interface IPreviewerDrawOption {
9
+ mime?: 'png' | 'jpg' | 'jpeg' | 'svg';
10
+ srcKey?: keyof Pick<IElement, 'value' | 'laTexSVG'>;
11
+ }
@@ -0,0 +1,11 @@
1
+ export interface IRange {
2
+ startIndex: number;
3
+ endIndex: number;
4
+ isCrossRowCol?: boolean;
5
+ tableId?: string;
6
+ startTdIndex?: number;
7
+ endTdIndex?: number;
8
+ startTrIndex?: number;
9
+ endTrIndex?: number;
10
+ }
11
+ export declare type RangeRowMap = Map<number, Set<number>>;
@@ -0,0 +1,14 @@
1
+ import { RowFlex } from '../dataset/enum/Row';
2
+ import { IElement, IElementMetrics } from './Element';
3
+ export declare type IRowElement = IElement & {
4
+ metrics: IElementMetrics;
5
+ style: string;
6
+ };
7
+ export interface IRow {
8
+ width: number;
9
+ height: number;
10
+ ascent: number;
11
+ rowFlex?: RowFlex;
12
+ isPageBreak?: boolean;
13
+ elementList: IRowElement[];
14
+ }
@@ -0,0 +1,14 @@
1
+ import { EditorContext } from '../dataset/enum/Editor';
2
+ export interface ISearchResultBasic {
3
+ type: EditorContext;
4
+ index: number;
5
+ groupId: string;
6
+ }
7
+ export interface ISearchResultRestArgs {
8
+ tableIndex?: number;
9
+ trIndex?: number;
10
+ tdIndex?: number;
11
+ tdId?: string;
12
+ startIndex?: number;
13
+ }
14
+ export declare type ISearchResult = ISearchResultBasic & ISearchResultRestArgs;
@@ -0,0 +1,7 @@
1
+ export interface IWatermark {
2
+ data: string;
3
+ color?: string;
4
+ opacity?: number;
5
+ size?: number;
6
+ font?: string;
7
+ }
@@ -0,0 +1,20 @@
1
+ import { Command } from '../../core/command/Command';
2
+ import { IElement } from '../Element';
3
+ export interface IContextMenuContext {
4
+ startElement: IElement | null;
5
+ endElement: IElement | null;
6
+ isReadonly: boolean;
7
+ editorHasSelection: boolean;
8
+ editorTextFocus: boolean;
9
+ isInTable: boolean;
10
+ isCrossRowCol: boolean;
11
+ }
12
+ export interface IRegisterContextMenu {
13
+ isDivider?: boolean;
14
+ icon?: string;
15
+ name?: string;
16
+ shortCut?: string;
17
+ when?: (payload: IContextMenuContext) => boolean;
18
+ callback?: (command: Command, context: IContextMenuContext) => any;
19
+ childMenus?: IRegisterContextMenu[];
20
+ }
@@ -0,0 +1,10 @@
1
+ import { Command } from '../../core/command/Command';
2
+ import { KeyMap } from '../../dataset/enum/KeyMap';
3
+ export interface IRegisterShortcut {
4
+ key: KeyMap;
5
+ ctrl?: boolean;
6
+ shift?: boolean;
7
+ alt?: boolean;
8
+ isGlobal?: boolean;
9
+ callback: (command: Command) => any;
10
+ }
@@ -0,0 +1,4 @@
1
+ export interface IColgroup {
2
+ id?: string;
3
+ width: number;
4
+ }
@@ -0,0 +1,19 @@
1
+ import { IElement, IElementPosition } from '../Element';
2
+ import { IRow } from '../Row';
3
+ export interface ITd {
4
+ id?: string;
5
+ x?: number;
6
+ y?: number;
7
+ width?: number;
8
+ height?: number;
9
+ colspan: number;
10
+ rowspan: number;
11
+ value: IElement[];
12
+ isLastRowTd?: boolean;
13
+ isLastColTd?: boolean;
14
+ isLastTd?: boolean;
15
+ rowIndex?: number;
16
+ colIndex?: number;
17
+ rowList?: IRow[];
18
+ positionList?: IElementPosition[];
19
+ }
@@ -0,0 +1,6 @@
1
+ import { ITd } from './Td';
2
+ export interface ITr {
3
+ id?: string;
4
+ height: number;
5
+ tdList: ITd[];
6
+ }
@@ -0,0 +1,5 @@
1
+ import { IEditorOption, IElement } from '..';
2
+ import { DeepRequired } from '../interface/Common';
3
+ export declare function writeClipboardItem(text: string, html: string): void;
4
+ export declare function writeElementList(elementList: IElement[], options: DeepRequired<IEditorOption>): void;
5
+ export declare function getElementListByHTML(htmlText: string): IElement[];
@@ -0,0 +1,10 @@
1
+ import { IEditorOption, IElement } from '..';
2
+ interface IFormatElementListOption {
3
+ isHandleFirstElement?: boolean;
4
+ editorOptions: Required<IEditorOption>;
5
+ }
6
+ export declare function formatElementList(elementList: IElement[], options: IFormatElementListOption): void;
7
+ export declare function isSameElementExceptValue(source: IElement, target: IElement): boolean;
8
+ export declare function pickElementAttr(payload: IElement): IElement;
9
+ export declare function zipElementList(payload: IElement[]): IElement[];
10
+ export {};
@@ -0,0 +1,8 @@
1
+ export declare function debounce(func: Function, delay: number): (...args: any) => void;
2
+ export declare function deepClone<T>(obj: T): T;
3
+ export declare function isBody(node: Element): boolean;
4
+ export declare function findParent(node: Element, filterFn: Function, includeSelf: boolean): Element | null;
5
+ export declare function getUUID(): string;
6
+ export declare function splitText(text: string): string[];
7
+ export declare function downloadFile(href: string, fileName: string): void;
8
+ export declare function threeClick(dom: HTMLElement, fn: (evt: MouseEvent) => any): void;
@@ -0,0 +1 @@
1
+ export declare function printImageBase64(base64List: string[], width: number, height: number): void;
package/package.json ADDED
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "@hufe921/canvas-editor",
3
+ "author": "Hufe",
4
+ "license": "MIT",
5
+ "version": "0.9.9",
6
+ "description": "rich text editor by canvas/svg",
7
+ "publishConfig": {
8
+ "registry": "https://registry.npmjs.org/",
9
+ "access": "public"
10
+ },
11
+ "files": [
12
+ "dist",
13
+ "README.md",
14
+ "LICENSE",
15
+ "package.json"
16
+ ],
17
+ "typings": "./dist/src/editor/index.d.ts",
18
+ "main": "./dist/canvas-editor.umd.js",
19
+ "module": "./dist/canvas-editor.es.js",
20
+ "homepage": "https://github.com/Hufe921/canvas-editor",
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://github.com/Hufe921/canvas-editor.git"
24
+ },
25
+ "keywords": [
26
+ "canvas-editor",
27
+ "editor",
28
+ "wysiwyg",
29
+ "emr"
30
+ ],
31
+ "engines": {
32
+ "node": ">=12.0.0"
33
+ },
34
+ "scripts": {
35
+ "dev": "vite",
36
+ "lib": "npm run lint && tsc && vite build --mode lib",
37
+ "build": "npm run lint && tsc && vite build --mode app",
38
+ "serve": "vite preview",
39
+ "lint": "eslint .",
40
+ "cypress:open": "cypress open",
41
+ "cypress:run": "cypress run",
42
+ "type:check": "tsc --noEmit"
43
+ },
44
+ "devDependencies": {
45
+ "@rollup/plugin-typescript": "^10.0.1",
46
+ "@types/node": "^16.11.12",
47
+ "@types/prismjs": "^1.26.0",
48
+ "@typescript-eslint/eslint-plugin": "4.33.0",
49
+ "@typescript-eslint/parser": "4.33.0",
50
+ "cypress": "^9.5.1",
51
+ "cypress-file-upload": "^5.0.8",
52
+ "eslint": "7.32.0",
53
+ "typescript": "^4.3.2",
54
+ "vite": "^2.4.2",
55
+ "vite-plugin-css-injected-by-js": "^2.1.1"
56
+ },
57
+ "dependencies": {
58
+ "prismjs": "^1.27.0"
59
+ }
60
+ }