@ebl-vue/editor-full 2.31.24 → 2.31.28

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 (114) hide show
  1. package/dist/index.d.ts +1 -28
  2. package/dist/index.mjs +540 -702
  3. package/dist/index.mjs.map +1 -1
  4. package/package.json +3 -3
  5. package/types/index.d.ts +5 -1
  6. package/.postcssrc.yml +0 -33
  7. package/postcss.config.js +0 -15
  8. package/src/components/Editor/Editor.vue +0 -293
  9. package/src/components/Editor/EditorRender.vue +0 -274
  10. package/src/components/index.ts +0 -29
  11. package/src/constants/index.ts +0 -1
  12. package/src/i18n/zh-cn.ts +0 -158
  13. package/src/icons/index.ts +0 -93
  14. package/src/index.ts +0 -22
  15. package/src/installer.ts +0 -21
  16. package/src/plugins/alert/index.css +0 -150
  17. package/src/plugins/alert/index.ts +0 -456
  18. package/src/plugins/block-alignment/index.css +0 -9
  19. package/src/plugins/block-alignment/index.ts +0 -117
  20. package/src/plugins/block-alignment/readme.md +0 -1
  21. package/src/plugins/code/LICENSE +0 -21
  22. package/src/plugins/code/index.css +0 -158
  23. package/src/plugins/code/index.ts +0 -573
  24. package/src/plugins/code/utils/string.ts +0 -34
  25. package/src/plugins/color-picker/index.ts +0 -130
  26. package/src/plugins/color-picker/styles.css +0 -27
  27. package/src/plugins/delimiter/index.css +0 -14
  28. package/src/plugins/delimiter/index.ts +0 -121
  29. package/src/plugins/drag-drop/index.css +0 -19
  30. package/src/plugins/drag-drop/index.ts +0 -151
  31. package/src/plugins/drag-drop/readme.md +0 -1
  32. package/src/plugins/header/H1.ts +0 -404
  33. package/src/plugins/header/H2.ts +0 -403
  34. package/src/plugins/header/H3.ts +0 -404
  35. package/src/plugins/header/H4.ts +0 -404
  36. package/src/plugins/header/H5.ts +0 -403
  37. package/src/plugins/header/H6.ts +0 -404
  38. package/src/plugins/header/index.css +0 -20
  39. package/src/plugins/header/index.ts +0 -15
  40. package/src/plugins/header/types.d.ts +0 -46
  41. package/src/plugins/imageResizeCrop/ImageTune.ts +0 -916
  42. package/src/plugins/imageResizeCrop/index.css +0 -230
  43. package/src/plugins/imageResizeCrop/index.ts +0 -5
  44. package/src/plugins/imageResizeCrop/types.d.ts +0 -23
  45. package/src/plugins/imageTool/index.css +0 -156
  46. package/src/plugins/imageTool/index.ts +0 -538
  47. package/src/plugins/imageTool/types/codexteam__ajax.d.ts +0 -89
  48. package/src/plugins/imageTool/types/types.ts +0 -236
  49. package/src/plugins/imageTool/ui.ts +0 -313
  50. package/src/plugins/imageTool/uploader.ts +0 -272
  51. package/src/plugins/imageTool/utils/dom.ts +0 -24
  52. package/src/plugins/imageTool/utils/index.ts +0 -73
  53. package/src/plugins/imageTool/utils/isPromise.ts +0 -10
  54. package/src/plugins/indent/index.css +0 -86
  55. package/src/plugins/indent/index.ts +0 -695
  56. package/src/plugins/inline-code/index.css +0 -11
  57. package/src/plugins/inline-code/index.ts +0 -202
  58. package/src/plugins/list/ListRenderer/ChecklistRenderer.ts +0 -208
  59. package/src/plugins/list/ListRenderer/ListRenderer.ts +0 -73
  60. package/src/plugins/list/ListRenderer/OrderedListRenderer.ts +0 -123
  61. package/src/plugins/list/ListRenderer/UnorderedListRenderer.ts +0 -123
  62. package/src/plugins/list/ListRenderer/index.ts +0 -6
  63. package/src/plugins/list/ListTabulator/index.ts +0 -1179
  64. package/src/plugins/list/index.ts +0 -480
  65. package/src/plugins/list/styles/CssPrefix.ts +0 -4
  66. package/src/plugins/list/styles/input.css +0 -36
  67. package/src/plugins/list/styles/list.css +0 -165
  68. package/src/plugins/list/types/Elements.ts +0 -14
  69. package/src/plugins/list/types/ItemMeta.ts +0 -40
  70. package/src/plugins/list/types/ListParams.ts +0 -102
  71. package/src/plugins/list/types/ListRenderer.ts +0 -6
  72. package/src/plugins/list/types/OlCounterType.ts +0 -63
  73. package/src/plugins/list/types/index.ts +0 -14
  74. package/src/plugins/list/utils/focusItem.ts +0 -18
  75. package/src/plugins/list/utils/getChildItems.ts +0 -40
  76. package/src/plugins/list/utils/getItemChildWrapper.ts +0 -10
  77. package/src/plugins/list/utils/getItemContentElement.ts +0 -10
  78. package/src/plugins/list/utils/getSiblings.ts +0 -52
  79. package/src/plugins/list/utils/isLastItem.ts +0 -9
  80. package/src/plugins/list/utils/itemHasSublist.ts +0 -10
  81. package/src/plugins/list/utils/normalizeData.ts +0 -83
  82. package/src/plugins/list/utils/removeChildWrapperIfEmpty.ts +0 -31
  83. package/src/plugins/list/utils/renderToolboxInput.ts +0 -105
  84. package/src/plugins/list/utils/stripNumbers.ts +0 -7
  85. package/src/plugins/list/utils/type-guards.ts +0 -8
  86. package/src/plugins/marker/index.css +0 -4
  87. package/src/plugins/marker/index.ts +0 -199
  88. package/src/plugins/outline/index.css +0 -52
  89. package/src/plugins/outline/index.ts +0 -63
  90. package/src/plugins/paragraph/index.css +0 -23
  91. package/src/plugins/paragraph/index.ts +0 -381
  92. package/src/plugins/paragraph/types/icons.d.ts +0 -4
  93. package/src/plugins/paragraph/utils/makeFragment.ts +0 -17
  94. package/src/plugins/quote/index.css +0 -26
  95. package/src/plugins/quote/index.ts +0 -203
  96. package/src/plugins/table/index.ts +0 -4
  97. package/src/plugins/table/plugin.ts +0 -254
  98. package/src/plugins/table/style.css +0 -388
  99. package/src/plugins/table/table.ts +0 -1195
  100. package/src/plugins/table/toolbox.ts +0 -166
  101. package/src/plugins/table/utils/dom.ts +0 -130
  102. package/src/plugins/table/utils/popover.ts +0 -185
  103. package/src/plugins/table/utils/throttled.ts +0 -22
  104. package/src/plugins/underline/index.css +0 -3
  105. package/src/plugins/underline/index.ts +0 -214
  106. package/src/plugins/undo/index.ts +0 -524
  107. package/src/plugins/undo/observer.ts +0 -101
  108. package/src/style.css +0 -114
  109. package/src/types.ts +0 -3
  110. package/src/utils/AxiosService.ts +0 -87
  111. package/src/utils/index.ts +0 -15
  112. package/src/utils/install.ts +0 -19
  113. package/tsconfig.json +0 -37
  114. package/vite.config.ts +0 -81
package/src/style.css DELETED
@@ -1,114 +0,0 @@
1
- :root{
2
- --color-border: #EFF0F1;
3
- }
4
- .ebl-editor{
5
- cursor:text;
6
- font-size: 16px;
7
- font-weight: 400;
8
- background-color: #fff;
9
-
10
- height: 100%;
11
- overflow: hidden;
12
- position: relative;
13
-
14
- }
15
- .codex-editor{
16
- height: 100%;
17
- overflow: auto;
18
-
19
- }
20
- .ebl-editor.outline{
21
- padding-right: 280px;
22
- }
23
- .ebl-editor.outline .codex-editor{flex:1;}
24
-
25
-
26
- @media(max-width:1240px){
27
- .ebl-outline{
28
- display: none;
29
-
30
- }
31
- .ebl-editor.outline{
32
- padding-right: 0;
33
- }
34
- }
35
- @media(min-width:1240px){
36
- .ebl-editor.readonly .ce-block__content{
37
- max-width: 100%;
38
- padding-left: 100px;
39
- padding-right: 100px;
40
-
41
- }
42
-
43
- }
44
-
45
-
46
-
47
- .ce-toolbar,.ce-inline-toolbar{
48
- z-index: 1000;
49
- }
50
- .ce-toolbar__plus{
51
- border: 1px solid var(--color-border);
52
- }
53
- .ce-toolbar {
54
- .ce-popover__items{
55
- display: flex;
56
- flex-direction: row;
57
- flex-wrap: wrap
58
- }
59
-
60
-
61
- .ce-popover__items .ce-popover-item{
62
- position: relative;
63
- }
64
-
65
- .ce-popover__items .ce-popover-item__title{
66
- display: none;
67
- }
68
-
69
- .ce-popover-item-html,
70
- .ce-popover-item-separator,
71
- .ce-popover-item[data-item-name="convert-to"]
72
- {
73
- width: 100%;
74
- }
75
- .ce-popover-item[data-item-name="convert-to"] .ce-popover-item__title{
76
- display: block;
77
- }
78
- }
79
-
80
- .ce-inline-toolbar .ce-popover__items{
81
- display: flex!important;
82
- flex-direction: row;
83
- flex-wrap: wrap;
84
- }
85
-
86
- .ce-inline-toolbar .ce-popover__items .ce-popover-item__title{
87
- display: none
88
- }
89
-
90
-
91
-
92
- /* 滚动条整体部分 */
93
- .ebl-editor ::-webkit-scrollbar {
94
- width: 6px; /* 滚动条的宽度 */
95
- height: 6px; /* 滚动条的高度 */
96
- }
97
-
98
- /* 滚动条轨道 */
99
- .ebl-editor ::-webkit-scrollbar-track {
100
- background: #f1f1f1; /* 轨道颜色 */
101
- border-radius: 1px; /* 轨道圆角 */
102
- }
103
-
104
- /* 滚动条滑块 */
105
- .ebl-editor ::-webkit-scrollbar-thumb {
106
- background: #C0C0C0; /* 滑块颜色 */
107
- border-radius: 10px; /* 滑块圆角 */
108
- border: 1px solid #fff; /* 滑块边框 */
109
- }
110
-
111
- /* 滑块悬停时 */
112
- .ebl-editor ::-webkit-scrollbar-thumb:hover {
113
- background: #555; /* 滑块悬停时的颜色 */
114
- }
package/src/types.ts DELETED
@@ -1,3 +0,0 @@
1
- export interface IEblEditorSettings{
2
- fileUploadEndpoint: string;
3
- }
@@ -1,87 +0,0 @@
1
- import axios, { AxiosInstance, InternalAxiosRequestConfig, AxiosResponse } from "axios";
2
- import { ElMessage } from "element-plus"
3
-
4
-
5
- interface IAxiosServiceConstructorParams{
6
- appBaseApi?: string,
7
- timeout?:number,
8
- eblStoreUser?: any|undefined
9
- }
10
-
11
- class AxiosService {
12
- appBaseApi: string = "";
13
- timeout: number = 30000;
14
- eblStoreUser: any|undefined;
15
- axiosInstance: AxiosInstance | undefined;
16
-
17
- constructor(params?: IAxiosServiceConstructorParams | undefined ) {
18
- if (typeof params !== "undefined") {
19
- if (params.appBaseApi) {
20
- this.appBaseApi = params.appBaseApi;
21
- }
22
-
23
- if (params.timeout) {
24
- this.timeout = params.timeout;
25
- }
26
- if (params.eblStoreUser) {
27
- this.eblStoreUser = params.eblStoreUser;
28
- }
29
-
30
-
31
- }
32
- }
33
- createAxios():AxiosInstance {
34
- //创建实例
35
- this.axiosInstance = axios.create({
36
- baseURL: this.appBaseApi,
37
- timeout: this.timeout,
38
- headers: { "Content-Type": "application/json;charset=utf-8" },
39
- });
40
- //请求拦截
41
- this.axiosInstance.interceptors.request.use((config: InternalAxiosRequestConfig) => {
42
-
43
- if (this.eblStoreUser) {
44
- const token = this.eblStoreUser.token;
45
- const tokenName = this.eblStoreUser.tokenName;
46
- const tokenPrefix = this.eblStoreUser.tokenPrefix;
47
- if (token && tokenName) {
48
- config.headers[tokenName] = tokenPrefix + " " + token;
49
- }
50
- }
51
- return config;
52
- }, (error: any) => {
53
- return Promise.reject(error);
54
- });
55
-
56
- // 响应拦截器
57
- this.axiosInstance.interceptors.response.use((response: AxiosResponse) => {
58
- const { code, message } = response.data;
59
- if (code === 1) {
60
- return response.data;
61
- }
62
- ElMessage.error(message || "系统出错");
63
- return response.data;
64
- }, (error: any) => {
65
- if (error) {
66
- const { message } = error;
67
- ElMessage.error(message || "系统出错");
68
- }
69
- return Promise.reject(error.message);
70
- });
71
- return this.axiosInstance;
72
- }
73
-
74
- static instance(appBaseApi: string|undefined, timeout: number, eblStoreUser?: any) {
75
- let options:any = { appBaseApi: appBaseApi, timeout: timeout };
76
- if (eblStoreUser) {
77
- options.eblStoreUser = eblStoreUser;
78
- }
79
- let service = new AxiosService(options);
80
- return service.createAxios();
81
- }
82
-
83
-
84
- }
85
- export default AxiosService;
86
- type IAxiosService = InstanceType<typeof AxiosService>;
87
- export { IAxiosService }
@@ -1,15 +0,0 @@
1
-
2
-
3
- export default {
4
- copy: (o: any) => {
5
- return JSON.parse(JSON.stringify(o));
6
- },
7
- createUniqueString: () => {
8
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
9
- const r = Math.random() * 16 | 0;
10
- const v = c === 'x' ? r : (r & 0x3 | 0x8);
11
- console.log(v)
12
- return v.toString(16);
13
- });
14
- }
15
- }
@@ -1,19 +0,0 @@
1
- import type { SFCWithInstall } from 'types'
2
- import type {App} from 'vue'
3
- export const withInstall = <T, E extends Record<string, any>>(
4
- main: T,
5
- extra?: E
6
- ) => {
7
- ;(main as SFCWithInstall<T>).install = (app:App): void => {
8
- for (const comp of [main, ...Object.values(extra ?? {})]) {
9
- app.component(comp.name, comp)
10
- }
11
- }
12
-
13
- if (extra) {
14
- for (const [key, comp] of Object.entries(extra)) {
15
- ;(main as any)[key] = comp
16
- }
17
- }
18
- return main as SFCWithInstall<T> & E
19
- }
package/tsconfig.json DELETED
@@ -1,37 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "outDir": "dist",
4
- "target": "es2018",
5
- "module": "esnext",
6
- "moduleResolution": "node",
7
- "strict": true,
8
- "sourceMap": false,
9
- "allowJs": true,
10
- "noUnusedLocals": true,
11
- "resolveJsonModule": true,
12
- "esModuleInterop": true,
13
- "removeComments": false,
14
- "jsx": "preserve",
15
- "baseUrl": "./",
16
- "declaration":true,
17
- "declarationDir": "./types",
18
- "skipLibCheck":true,
19
- "rootDir": ".",
20
- "lib": [
21
- "ES2017",
22
- "ES2018",
23
- "ES2019",
24
- "DOM"
25
- ],
26
- "paths": {
27
- "@/*": ["./src/*"],
28
- "@/types": [ "./types/" ],
29
- "@/types/*": [ "./types/*" ],
30
- }
31
- },
32
- "include": [
33
- "./src/index.ts",
34
- "./src/**/*",
35
- "./types/index.d.ts"
36
- ]
37
- }
package/vite.config.ts DELETED
@@ -1,81 +0,0 @@
1
-
2
-
3
- import vue from '@vitejs/plugin-vue'
4
- import vueJsx from '@vitejs/plugin-vue-jsx'
5
- import { defineConfig, UserConfig, ConfigEnv } from 'vite'
6
- import path from 'path';
7
- import dts from "vite-plugin-dts";
8
- import terser from '@rollup/plugin-terser'
9
- import cssInjectedByJsPlugin from 'vite-plugin-css-injected-by-js';
10
-
11
-
12
- export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
13
-
14
- return {
15
- plugins: [
16
- cssInjectedByJsPlugin(),
17
- vue(),
18
- vueJsx(),
19
- dts({
20
- rollupTypes: true,
21
- tsconfigPath: "./tsconfig.json",
22
- insertTypesEntry: true,
23
- pathsToAliases:true
24
- })
25
-
26
- ],
27
- resolve: {
28
- alias: {
29
- "@": path.resolve(__dirname, "src"),
30
- '@/types': path.resolve(__dirname, './types'),
31
- },
32
- },
33
- build: {
34
- copyPublicDir: false,
35
- target: 'es2018',
36
- emptyOutDir: true,
37
- sourcemap:true,
38
- lib: {
39
- entry: path.resolve(__dirname,"src","index.ts"),
40
- name: '@ebl-vue/editor-full',
41
- formats:['es'],
42
- fileName: format => `index.mjs`,
43
- cssFileName: 'style',
44
- },
45
- rollupOptions: {
46
- plugins: [
47
- terser({
48
- compress: {
49
- drop_console:true,
50
- drop_debugger: true
51
- },
52
- format: {
53
- comments:false
54
- }
55
- }),
56
-
57
- ],
58
- external: [
59
- 'vue',
60
- '@ebl-vue/editorjs',
61
- 'shiki',
62
- '@editorjs/caret',
63
- '@editorjs/dom',
64
- 'vanilla-caret-js',
65
- '@codexteam/ajax',
66
- 'axios'
67
-
68
- ],
69
- output: [
70
- {
71
- exports: 'named',
72
- globals: {
73
- vue: 'Vue'
74
- }
75
- }
76
- ],
77
- },
78
-
79
- }
80
- }
81
- });