@ebl-vue/editor-full 1.1.6 → 1.1.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/dist/index.d.ts +48 -4
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -9
- package/src/components/Editor/Editor.vue +1 -1
- package/src/index.ts +10 -7
- package/src/installer.ts +4 -6
- package/src/types.ts +3 -0
- package/types/index.d.ts +1 -5
- package/vite.config.ts +1 -1
package/package.json
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ebl-vue/editor-full",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "lrj525@sina.com",
|
|
6
6
|
"description": "结构化编辑器",
|
|
7
7
|
"homepage": "",
|
|
8
8
|
"license": "MIT",
|
|
9
|
-
"scripts": {
|
|
10
|
-
"dev": "rimraf dist && vite build --watch",
|
|
11
|
-
"build": "rimraf dist && vite build"
|
|
12
|
-
},
|
|
13
9
|
"exports": {
|
|
14
10
|
".": {
|
|
15
|
-
"types": "./
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
16
12
|
"import": "./dist/index.mjs"
|
|
17
|
-
}
|
|
18
|
-
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"dev": "rimraf dist && vite build --watch",
|
|
18
|
+
"build": "rimraf dist && vite build"
|
|
19
19
|
},
|
|
20
|
+
|
|
20
21
|
"main": "./dist/index.mjs",
|
|
21
22
|
"module": "./dist/indexs.mjs",
|
|
22
|
-
"types": "./
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
23
24
|
"typesVersions": {
|
|
24
25
|
"*": {
|
|
25
26
|
".": [
|
package/src/index.ts
CHANGED
|
@@ -4,15 +4,18 @@ import './style.css'
|
|
|
4
4
|
import { createInstaller } from './installer'
|
|
5
5
|
import Components from './components';
|
|
6
6
|
import zhCn from './i18n/zh-cn';
|
|
7
|
-
import type { OutputData } from '@ebl-vue/editorjs';
|
|
8
7
|
import Editor from './components/Editor/Editor.vue';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export const
|
|
8
|
+
|
|
9
|
+
const installer = createInstaller(Components);
|
|
10
|
+
export const install = installer.install;
|
|
11
|
+
export const version = installer.version;
|
|
12
|
+
|
|
12
13
|
export default installer;
|
|
13
14
|
|
|
14
15
|
export {
|
|
15
|
-
zhCn
|
|
16
|
-
Editor as EblEditor
|
|
16
|
+
zhCn
|
|
17
17
|
};
|
|
18
|
-
export type
|
|
18
|
+
export type * from "./types";
|
|
19
|
+
export {
|
|
20
|
+
Editor as EblEditor
|
|
21
|
+
}
|
package/src/installer.ts
CHANGED
|
@@ -2,17 +2,15 @@ import type { App, Plugin } from 'vue'
|
|
|
2
2
|
import { version } from '../package.json'
|
|
3
3
|
|
|
4
4
|
import { INSTALLED_KEY } from "./constants";
|
|
5
|
-
import { IEblEditorSettings } from
|
|
5
|
+
import type { IEblEditorSettings } from "./types";
|
|
6
6
|
|
|
7
7
|
export const createInstaller = (components: Plugin[] = []) => {
|
|
8
|
-
const install = (app: App,config
|
|
8
|
+
const install = (app: App, config: IEblEditorSettings) => {
|
|
9
9
|
if (app[INSTALLED_KEY]) return
|
|
10
10
|
|
|
11
11
|
app[INSTALLED_KEY] = true
|
|
12
|
-
components.forEach((c) => app.use(c))
|
|
13
|
-
|
|
14
|
-
app.provide("EblEditorSettings",config);
|
|
15
|
-
}
|
|
12
|
+
components.forEach((c) => app.use(c))
|
|
13
|
+
app.provide("EblEditorSettings", config);
|
|
16
14
|
|
|
17
15
|
}
|
|
18
16
|
|
package/src/types.ts
ADDED
package/types/index.d.ts
CHANGED
package/vite.config.ts
CHANGED
|
@@ -37,7 +37,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
|
|
|
37
37
|
sourcemap:true,
|
|
38
38
|
lib: {
|
|
39
39
|
entry: path.resolve(__dirname,"src","index.ts"),
|
|
40
|
-
name: '@ebl-vue/editor',
|
|
40
|
+
name: '@ebl-vue/editor-full',
|
|
41
41
|
formats:['es'],
|
|
42
42
|
fileName: format => `index.mjs`,
|
|
43
43
|
cssFileName: 'style',
|