@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/package.json CHANGED
@@ -1,25 +1,26 @@
1
1
  {
2
2
  "name": "@ebl-vue/editor-full",
3
- "version": "1.1.6",
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": "./types/index.d.ts",
11
+ "types": "./dist/index.d.ts",
16
12
  "import": "./dist/index.mjs"
17
- },
18
- "./dist/style.css": "./dist/style.css"
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": "./types/index.d.ts",
23
+ "types": "./dist/index.d.ts",
23
24
  "typesVersions": {
24
25
  "*": {
25
26
  ".": [
@@ -18,7 +18,7 @@ import EditorJS from '@ebl-vue/editorjs';
18
18
 
19
19
  import { onMounted, onUnmounted, ref, inject } from 'vue';
20
20
  import { toRaw } from 'vue';
21
- import { IEblEditorSettings } from '@/types';
21
+ import { IEblEditorSettings } from '../../types';
22
22
 
23
23
  /**
24
24
  * 插件
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
- const installer = createInstaller(Components)
10
- export const install = installer.install
11
- export const version = installer.version
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 { OutputData };
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 '@/types';
5
+ import type { IEblEditorSettings } from "./types";
6
6
 
7
7
  export const createInstaller = (components: Plugin[] = []) => {
8
- const install = (app: App,config?: IEblEditorSettings) => {
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
- if(config) {
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
@@ -0,0 +1,3 @@
1
+ export interface IEblEditorSettings{
2
+ fileUploadEndpoint: string;
3
+ }
package/types/index.d.ts CHANGED
@@ -16,8 +16,4 @@ declare module 'vue' {
16
16
  };
17
17
 
18
18
 
19
- export interface IEblEditorSettings{
20
- fileUploadEndpoint: string;
21
- urlUploadEndpoint: string;
22
- userStore: any;
23
- }
19
+ export {}
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',