dragon-editor 3.5.6 → 3.5.8

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/README.md CHANGED
@@ -31,7 +31,7 @@ This module support only Nuxt3.
31
31
 
32
32
  # Dependencies
33
33
 
34
- - highlight.js
34
+ - highlight.js
35
35
 
36
36
  # Font
37
37
 
@@ -54,6 +54,11 @@ First. Set module
54
54
  ```typescript
55
55
  export default defineNuxtConfig({
56
56
  modules: ["dragon-editor"],
57
+ vite: {
58
+ optimizeDeps: {
59
+ include: ["highlight.js/lib/core"],
60
+ },
61
+ },
57
62
  });
58
63
  ```
59
64
 
package/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "nuxt": ">=3.0.0"
5
5
  },
6
6
  "configKey": "dragon-editor",
7
- "version": "3.5.6",
7
+ "version": "3.5.8",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
@@ -1,4 +1,4 @@
1
- import hljs from "highlight.js/lib/core";
1
+ import hljs from "highlight.js/lib/common";
2
2
  import { defineNuxtPlugin } from "nuxt/app";
3
3
  export default defineNuxtPlugin((nuxtApp) => {
4
4
  nuxtApp.vueApp.provide("hljs", hljs);
@@ -1,28 +1,28 @@
1
- export type DEContentData = DEBlockData[];
1
+ type DEContentData = DEBlockData[];
2
2
 
3
- export type DEBlockData = DETextBlock | DEHeadingBlock | DEListBlock | DEImageBlock | DECodeBlock | DECustomBlock;
3
+ type DEBlockData = DETextBlock | DEHeadingBlock | DEListBlock | DEImageBlock | DECodeBlock | DECustomBlock;
4
4
 
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";
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";
6
6
 
7
- export type DEDecoration = "bold" | "italic" | "underline" | "strikethrough" | "code";
7
+ type DEDecoration = "bold" | "italic" | "underline" | "strikethrough" | "code";
8
8
 
9
- export type DETextalign = "left" | "right" | "center" | "justify";
9
+ type DETextalign = "left" | "right" | "center" | "justify";
10
10
 
11
- export type DEBlock = "text" | "heading" | "ul" | "ol" | "image" | "code" | "custom";
11
+ type DEBlock = "text" | "heading" | "ul" | "ol" | "image" | "code" | "custom";
12
12
 
13
- export type DEBlockMenutype = "text" | "heading1" | "heading2" | "heading3" | "ul" | "ol" | "image" | "code" | "custom";
13
+ type DEBlockMenutype = "text" | "heading1" | "heading2" | "heading3" | "ul" | "ol" | "image" | "code" | "custom";
14
14
 
15
- export type DEListStyle = "disc" | "square" | "decimal" | "lower-alpha" | "upper-alpha" | "lower-roman" | "upper-roman";
15
+ type DEListStyle = "disc" | "square" | "decimal" | "lower-alpha" | "upper-alpha" | "lower-roman" | "upper-roman";
16
16
 
17
- export type DECodeblockTheme = "github" | "github-dark-dimmed";
17
+ type DECodeblockTheme = "github" | "github-dark-dimmed";
18
18
 
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";
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";
20
20
 
21
- export type DEBlockElement = HTMLParagraphElement | HTMLHeadingElement | HTMLElement | HTMLDivElement;
21
+ type DEBlockElement = HTMLParagraphElement | HTMLHeadingElement | HTMLElement | HTMLDivElement;
22
22
 
23
- export type DEListElementName = "ul" | "ol";
23
+ type DEListElementName = "ul" | "ol";
24
24
 
25
- export interface DragonEditorStore {
25
+ interface DragonEditorStore {
26
26
  cursorData: DEditorCursor | null;
27
27
  message: { [key: string]: string };
28
28
  controlBar: {
@@ -79,7 +79,7 @@ export interface DragonEditorStore {
79
79
  };
80
80
  }
81
81
 
82
- export interface DEditorCursor {
82
+ interface DEditorCursor {
83
83
  type: "Range" | "Caret" | "None";
84
84
  startNode: Node;
85
85
  startOffset: number;
@@ -87,7 +87,7 @@ export interface DEditorCursor {
87
87
  endOffset: number;
88
88
  }
89
89
 
90
- export interface DEArrangeCursorData {
90
+ interface DEArrangeCursorData {
91
91
  startNode: Node;
92
92
  startNodeIdx: number;
93
93
  startOffset: number;
@@ -96,31 +96,31 @@ export interface DEArrangeCursorData {
96
96
  endOffset: number;
97
97
  }
98
98
 
99
- export interface DECodeItem<T = string> {
99
+ interface DECodeItem<T = string> {
100
100
  text: string;
101
101
  code: T;
102
102
  }
103
103
 
104
- export interface DEHeadingItem {
104
+ interface DEHeadingItem {
105
105
  name: string;
106
106
  id: string;
107
107
  }
108
108
 
109
109
  // 컴포넌트 메서드용 타입
110
- export interface DragonEditor {
110
+ interface DragonEditor {
111
111
  addBlock: (type: DEBlockData) => void;
112
112
  setDecoration: (data: DEDecoration) => void;
113
113
  setTextAlign: (type: DETextalign) => void;
114
114
  }
115
115
 
116
- export interface DETextBlock {
116
+ interface DETextBlock {
117
117
  type: "text";
118
118
  classList: string[];
119
119
  depth?: number;
120
120
  textContent: string;
121
121
  }
122
122
 
123
- export interface DEHeadingBlock {
123
+ interface DEHeadingBlock {
124
124
  type: "heading";
125
125
  level: number;
126
126
  id: string;
@@ -129,12 +129,12 @@ export interface DEHeadingBlock {
129
129
  textContent: string;
130
130
  }
131
131
 
132
- export interface DEListItem {
132
+ interface DEListItem {
133
133
  classList: string[];
134
134
  textContent: string;
135
135
  }
136
136
 
137
- export interface DEListBlock {
137
+ interface DEListBlock {
138
138
  type: "list";
139
139
  element: DEListElementName;
140
140
  depth?: number;
@@ -142,7 +142,7 @@ export interface DEListBlock {
142
142
  child: DEListItem[];
143
143
  }
144
144
 
145
- export interface DEImageBlock {
145
+ interface DEImageBlock {
146
146
  type: "image";
147
147
  maxWidth: number;
148
148
  src: string;
@@ -152,7 +152,7 @@ export interface DEImageBlock {
152
152
  classList: string[];
153
153
  }
154
154
 
155
- export interface DECodeBlock {
155
+ interface DECodeBlock {
156
156
  type: "code";
157
157
  language: DECodeblockLang;
158
158
  theme: DECodeblockTheme;
@@ -160,7 +160,7 @@ export interface DECodeBlock {
160
160
  textContent: string;
161
161
  }
162
162
 
163
- export interface DECustomBlock {
163
+ interface DECustomBlock {
164
164
  type: "custom";
165
165
  classList: string[];
166
166
  textContent: string;
@@ -1,5 +1,5 @@
1
1
  import { _getDefaultBlockData, _generateId, _updateModelData, _updateCursorData, _decideWhetherOpenControlBar, _updateControlBarStatus, CODEBLOCKLANG } from "../event/index.js";
2
- import hljs from "highlight.js/lib/core";
2
+ import hljs from "highlight.js/lib/common";
3
3
  export function _addBlock(type, store, data) {
4
4
  const blockData = data === void 0 ? _getDefaultBlockData(type) : data;
5
5
  let $block = _createTextBlock(_getDefaultBlockData("text"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dragon-editor",
3
- "version": "3.5.6",
3
+ "version": "3.5.8",
4
4
  "description": "Javascript WYSIWYG editor in Nuxt3!",
5
5
  "repository": {
6
6
  "type": "git",