dragon-editor 3.5.0 → 3.5.1
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/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/type.d.ts +25 -33
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
package/dist/runtime/type.d.ts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
type DEContentData = DEBlockData[];
|
|
1
|
+
export type DEContentData = DEBlockData[];
|
|
2
2
|
|
|
3
|
-
type DEBlockData = DETextBlock | DEHeadingBlock | DEListBlock | DEImageBlock | DECodeBlock | DECustomBlock;
|
|
3
|
+
export type DEBlockData = DETextBlock | DEHeadingBlock | DEListBlock | DEImageBlock | DECodeBlock | DECustomBlock;
|
|
4
4
|
|
|
5
|
-
type DEIconKind = "plus" | "bold" | "italic" | "underline" | "strikethrough" | "codeblock" | "add-link" | "remove-link" | "image" | "align-center" | "align-left" | "align-right" | "align-justify" | "move-up" | "move-down" | "indent-decrease" | "indent-increase";
|
|
5
|
+
export type DEIconKind = "plus" | "bold" | "italic" | "underline" | "strikethrough" | "codeblock" | "add-link" | "remove-link" | "image" | "align-center" | "align-left" | "align-right" | "align-justify" | "move-up" | "move-down" | "indent-decrease" | "indent-increase";
|
|
6
6
|
|
|
7
|
-
type DEDecoration = "bold" | "italic" | "underline" | "strikethrough" | "code";
|
|
7
|
+
export type DEDecoration = "bold" | "italic" | "underline" | "strikethrough" | "code";
|
|
8
8
|
|
|
9
|
-
type DETextalign = "left" | "right" | "center" | "justify";
|
|
9
|
+
export type DETextalign = "left" | "right" | "center" | "justify";
|
|
10
10
|
|
|
11
|
-
type DEBlock = "text" | "heading" | "ul" | "ol" | "image" | "code" | "custom";
|
|
11
|
+
export type DEBlock = "text" | "heading" | "ul" | "ol" | "image" | "code" | "custom";
|
|
12
12
|
|
|
13
|
-
type DEBlockMenutype = "text" | "heading1" | "heading2" | "heading3" | "ul" | "ol" | "image" | "code" | "custom";
|
|
13
|
+
export type DEBlockMenutype = "text" | "heading1" | "heading2" | "heading3" | "ul" | "ol" | "image" | "code" | "custom";
|
|
14
14
|
|
|
15
|
-
type DEListStyle = "disc" | "square" | "decimal" | "lower-alpha" | "upper-alpha" | "lower-roman" | "upper-roman";
|
|
15
|
+
export type DEListStyle = "disc" | "square" | "decimal" | "lower-alpha" | "upper-alpha" | "lower-roman" | "upper-roman";
|
|
16
16
|
|
|
17
|
-
type DECodeblockTheme = "github" | "github-dark-dimmed";
|
|
17
|
+
export type DECodeblockTheme = "github" | "github-dark-dimmed";
|
|
18
18
|
|
|
19
|
-
type DECodeblockLang = "text" | "bash" | "csharp" | "c" | "cpp" | "css" | "django" | "dockerfile" | "go" | "html" | "json" | "java" | "js" | "ts" | "kotlin" | "lua" | "md" | "nginx" | "php" | "python" | "ruby" | "scss" | "sql" | "shell" | "swift" | "yml";
|
|
19
|
+
export type DECodeblockLang = "text" | "bash" | "csharp" | "c" | "cpp" | "css" | "django" | "dockerfile" | "go" | "html" | "json" | "java" | "js" | "ts" | "kotlin" | "lua" | "md" | "nginx" | "php" | "python" | "ruby" | "scss" | "sql" | "shell" | "swift" | "yml";
|
|
20
20
|
|
|
21
|
-
type DEBlockElement = HTMLParagraphElement | HTMLHeadingElement | HTMLElement | HTMLDivElement;
|
|
21
|
+
export type DEBlockElement = HTMLParagraphElement | HTMLHeadingElement | HTMLElement | HTMLDivElement;
|
|
22
22
|
|
|
23
|
-
type DEListElementName = "ul" | "ol";
|
|
23
|
+
export type DEListElementName = "ul" | "ol";
|
|
24
24
|
|
|
25
|
-
interface DragonEditorStore {
|
|
25
|
+
export interface DragonEditorStore {
|
|
26
26
|
cursorData: DEditorCursor | null;
|
|
27
27
|
message: { [key: string]: string };
|
|
28
28
|
controlBar: {
|
|
@@ -79,7 +79,7 @@ interface DragonEditorStore {
|
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
interface DEditorCursor {
|
|
82
|
+
export interface DEditorCursor {
|
|
83
83
|
type: "Range" | "Caret" | "None";
|
|
84
84
|
startNode: Node;
|
|
85
85
|
startOffset: number;
|
|
@@ -87,7 +87,7 @@ interface DEditorCursor {
|
|
|
87
87
|
endOffset: number;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
interface DEArrangeCursorData {
|
|
90
|
+
export interface DEArrangeCursorData {
|
|
91
91
|
startNode: Node;
|
|
92
92
|
startNodeIdx: number;
|
|
93
93
|
startOffset: number;
|
|
@@ -96,39 +96,31 @@ interface DEArrangeCursorData {
|
|
|
96
96
|
endOffset: number;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
interface
|
|
100
|
-
src: string;
|
|
101
|
-
width: number;
|
|
102
|
-
height: number;
|
|
103
|
-
classList?: string[];
|
|
104
|
-
caption?: string;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
interface DECodeItem<T = string> {
|
|
99
|
+
export interface DECodeItem<T = string> {
|
|
108
100
|
text: string;
|
|
109
101
|
code: T;
|
|
110
102
|
}
|
|
111
103
|
|
|
112
|
-
interface DEHeadingItem {
|
|
104
|
+
export interface DEHeadingItem {
|
|
113
105
|
name: string;
|
|
114
106
|
id: string;
|
|
115
107
|
}
|
|
116
108
|
|
|
117
109
|
// 컴포넌트 메서드용 타입
|
|
118
|
-
interface DragonEditor {
|
|
110
|
+
export interface DragonEditor {
|
|
119
111
|
addBlock: (type: DEBlockData) => void;
|
|
120
112
|
setDecoration: (data: DEDecoration) => void;
|
|
121
113
|
setTextAlign: (type: DETextalign) => void;
|
|
122
114
|
}
|
|
123
115
|
|
|
124
|
-
interface DETextBlock {
|
|
116
|
+
export interface DETextBlock {
|
|
125
117
|
type: "text";
|
|
126
118
|
classList: string[];
|
|
127
119
|
depth?: number;
|
|
128
120
|
textContent: string;
|
|
129
121
|
}
|
|
130
122
|
|
|
131
|
-
interface DEHeadingBlock {
|
|
123
|
+
export interface DEHeadingBlock {
|
|
132
124
|
type: "heading";
|
|
133
125
|
level: number;
|
|
134
126
|
id: string;
|
|
@@ -137,12 +129,12 @@ interface DEHeadingBlock {
|
|
|
137
129
|
textContent: string;
|
|
138
130
|
}
|
|
139
131
|
|
|
140
|
-
interface DEListItem {
|
|
132
|
+
export interface DEListItem {
|
|
141
133
|
classList: string[];
|
|
142
134
|
textContent: string;
|
|
143
135
|
}
|
|
144
136
|
|
|
145
|
-
interface DEListBlock {
|
|
137
|
+
export interface DEListBlock {
|
|
146
138
|
type: "list";
|
|
147
139
|
element: DEListElementName;
|
|
148
140
|
depth?: number;
|
|
@@ -150,7 +142,7 @@ interface DEListBlock {
|
|
|
150
142
|
child: DEListItem[];
|
|
151
143
|
}
|
|
152
144
|
|
|
153
|
-
interface DEImageBlock {
|
|
145
|
+
export interface DEImageBlock {
|
|
154
146
|
type: "image";
|
|
155
147
|
maxWidth: number;
|
|
156
148
|
src: string;
|
|
@@ -160,7 +152,7 @@ interface DEImageBlock {
|
|
|
160
152
|
classList: string[];
|
|
161
153
|
}
|
|
162
154
|
|
|
163
|
-
interface DECodeBlock {
|
|
155
|
+
export interface DECodeBlock {
|
|
164
156
|
type: "code";
|
|
165
157
|
language: DECodeblockLang;
|
|
166
158
|
theme: DECodeblockTheme;
|
|
@@ -168,7 +160,7 @@ interface DECodeBlock {
|
|
|
168
160
|
textContent: string;
|
|
169
161
|
}
|
|
170
162
|
|
|
171
|
-
interface DECustomBlock {
|
|
163
|
+
export interface DECustomBlock {
|
|
172
164
|
type: "custom";
|
|
173
165
|
classList: string[];
|
|
174
166
|
textContent: string;
|