@umoteam/umo-editor-nuxt 0.0.2 → 0.1.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/README.md +7 -2
- package/dist/module.d.mts +7 -1
- package/dist/module.d.ts +9 -0
- package/dist/module.json +5 -5
- package/dist/module.mjs +60 -28
- package/dist/runtime/plugin.client.d.ts +2 -0
- package/dist/runtime/plugin.client.js +6 -0
- package/dist/types.d.mts +2 -0
- package/package.json +38 -26
- package/dist/runtime/components/index.vue +0 -13
- package/dist/runtime/components/index.vue.d.ts +0 -2
package/README.md
CHANGED
|
@@ -25,7 +25,12 @@ Umo Editor 最大的特点是代码完全开源且自主可控,支持私有部
|
|
|
25
25
|
Umo Editor is an open-source document editor based on Vue3 and Tiptap. It provides powerful document editing capabilities and AI-assisted creation features. Umo Editor supports pagination, Markdown syntax, rich text editing, insertion of various node types, page style settings, document export, and printing. Additionally, it supports custom extensions, multi-language settings, and a dark theme.
|
|
26
26
|
|
|
27
27
|
Umo Editor's largest feature is that its code is completely open source and controllable. It supports private deployment, allowing you to use it in an intranet environment without worrying about data security issues. At the same time, Umo Editor is based on Vue3 and Tiptap, both of which have rich ecosystems and communities, making it easy to solve problems when needed.
|
|
28
|
-
|
|
28
|
+
|
|
29
|
+

|
|
30
|
+
|
|
31
|
+

|
|
32
|
+
|
|
33
|
+

|
|
29
34
|
|
|
30
35
|
As an independent Vue3 plugin, Umo Editor can be easily integrated into various Vue3 projects with zero configuration. For non-Vue3 projects, you can embed Umo Editor into your project via an iframe.
|
|
31
36
|
|
|
@@ -71,4 +76,4 @@ const options = ref({
|
|
|
71
76
|
</script>
|
|
72
77
|
```
|
|
73
78
|
|
|
74
|
-
That's it! You can now use Umo Editor in your
|
|
79
|
+
That's it! You can now use Umo Editor in your Nuxt4 App ✨
|
package/dist/module.d.mts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
+
|
|
3
|
+
interface UmoEditorOptions {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: _nuxt_schema.NuxtModule<UmoEditorOptions, UmoEditorOptions, false>;
|
|
2
7
|
|
|
3
8
|
export { _default as default };
|
|
9
|
+
export type { UmoEditorOptions };
|
package/dist/module.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
+
|
|
3
|
+
interface UmoEditorOptions {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: _nuxt_schema.NuxtModule<UmoEditorOptions, UmoEditorOptions, false>;
|
|
7
|
+
|
|
8
|
+
export { _default as default };
|
|
9
|
+
export type { UmoEditorOptions };
|
package/dist/module.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "umo-editor",
|
|
2
|
+
"name": "@umoteam/umo-editor-nuxt",
|
|
3
3
|
"configKey": "umoEditor",
|
|
4
4
|
"compatibility": {
|
|
5
|
-
"nuxt": "
|
|
5
|
+
"nuxt": ">=4.0.0"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.1.1",
|
|
8
8
|
"builder": {
|
|
9
|
-
"@nuxt/module-builder": "1.0.
|
|
10
|
-
"unbuild": "3.
|
|
9
|
+
"@nuxt/module-builder": "1.0.2",
|
|
10
|
+
"unbuild": "3.6.1"
|
|
11
11
|
}
|
|
12
12
|
}
|
package/dist/module.mjs
CHANGED
|
@@ -1,50 +1,82 @@
|
|
|
1
|
-
import { defineNuxtModule, createResolver,
|
|
2
|
-
import serialize from 'serialize-javascript';
|
|
1
|
+
import { defineNuxtModule, createResolver, addPlugin, addComponent } from '@nuxt/kit';
|
|
3
2
|
|
|
4
|
-
const module = defineNuxtModule({
|
|
3
|
+
const module$1 = defineNuxtModule({
|
|
5
4
|
meta: {
|
|
6
|
-
name: "umo-editor",
|
|
5
|
+
name: "@umoteam/umo-editor-nuxt",
|
|
7
6
|
configKey: "umoEditor",
|
|
8
7
|
compatibility: {
|
|
9
|
-
nuxt: "
|
|
8
|
+
nuxt: ">=4.0.0"
|
|
10
9
|
}
|
|
11
10
|
},
|
|
12
|
-
defaults: {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const options = serialize(_options, {});
|
|
11
|
+
defaults: {
|
|
12
|
+
locale: "en-US"
|
|
13
|
+
},
|
|
14
|
+
async setup(moduleOptions, nuxt) {
|
|
17
15
|
const alias = {
|
|
18
16
|
"dayjs": "dayjs",
|
|
19
17
|
"debug": "debug",
|
|
20
18
|
"@braintree/sanitize-url": "@braintree/sanitize-url",
|
|
21
19
|
"ndarray": "ndarray",
|
|
22
|
-
"highlight.js": "highlight.js",
|
|
23
20
|
"jsbarcode": "jsbarcode",
|
|
24
21
|
"file-saver": "file-saver",
|
|
25
22
|
"dom-to-image-more": "dom-to-image-more",
|
|
26
23
|
"nzh": "nzh",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
24
|
+
"pure-svg-code": "pure-svg-code",
|
|
25
|
+
"file64": "file64",
|
|
26
|
+
"highlight.js": "highlight.js",
|
|
27
|
+
"plyr": "plyr"
|
|
30
28
|
};
|
|
31
|
-
|
|
32
|
-
...
|
|
29
|
+
nuxt.options.alias = {
|
|
30
|
+
...nuxt.options.alias,
|
|
33
31
|
...alias
|
|
34
32
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
33
|
+
nuxt.options.vite ||= {};
|
|
34
|
+
nuxt.options.vite.optimizeDeps ||= {};
|
|
35
|
+
nuxt.options.vite.optimizeDeps.include ||= [];
|
|
36
|
+
const optimizeInclude = nuxt.options.vite.optimizeDeps.include;
|
|
37
|
+
if (!optimizeInclude.includes("@tiptap-extend/columns")) {
|
|
38
|
+
optimizeInclude.push("@tiptap-extend/columns");
|
|
39
|
+
}
|
|
40
|
+
nuxt.options.vite.optimizeDeps.esbuildOptions ||= {};
|
|
41
|
+
if (nuxt.options.vite.optimizeDeps.esbuildOptions.sourcemap == null) {
|
|
42
|
+
nuxt.options.vite.optimizeDeps.esbuildOptions.sourcemap = false;
|
|
43
|
+
}
|
|
44
|
+
const publicRuntimeConfig = nuxt.options.runtimeConfig.public ||= {};
|
|
45
|
+
const existingConfig = publicRuntimeConfig.umoEditor ||= {};
|
|
46
|
+
publicRuntimeConfig.umoEditor = {
|
|
47
|
+
...existingConfig,
|
|
48
|
+
...moduleOptions
|
|
49
|
+
};
|
|
50
|
+
if (!nuxt.options.build.transpile.includes("@umoteam/editor")) {
|
|
51
|
+
nuxt.options.build.transpile.push("@umoteam/editor");
|
|
52
|
+
}
|
|
53
|
+
const resolver = createResolver(import.meta.url);
|
|
54
|
+
addPlugin(resolver.resolve("./runtime/plugin.client"));
|
|
55
|
+
addComponent({
|
|
56
|
+
name: "UmoEditor",
|
|
57
|
+
export: "UmoEditor",
|
|
58
|
+
filePath: "@umoteam/editor",
|
|
59
|
+
mode: "client"
|
|
60
|
+
});
|
|
61
|
+
addComponent({
|
|
62
|
+
name: "UmoDialog",
|
|
63
|
+
export: "UmoDialog",
|
|
64
|
+
filePath: "@umoteam/editor",
|
|
65
|
+
mode: "client"
|
|
66
|
+
});
|
|
67
|
+
addComponent({
|
|
68
|
+
name: "UmoMenuButton",
|
|
69
|
+
export: "UmoMenuButton",
|
|
70
|
+
filePath: "@umoteam/editor",
|
|
71
|
+
mode: "client"
|
|
72
|
+
});
|
|
73
|
+
addComponent({
|
|
74
|
+
name: "UmoTooltip",
|
|
75
|
+
export: "UmoTooltip",
|
|
76
|
+
filePath: "@umoteam/editor",
|
|
77
|
+
mode: "client"
|
|
46
78
|
});
|
|
47
79
|
}
|
|
48
80
|
});
|
|
49
81
|
|
|
50
|
-
export { module as default };
|
|
82
|
+
export { module$1 as default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { defineNuxtPlugin, useRuntimeConfig } from "#app";
|
|
2
|
+
import { useUmoEditor } from "@umoteam/editor";
|
|
3
|
+
export default defineNuxtPlugin((nuxtApp) => {
|
|
4
|
+
const runtimeConfig = useRuntimeConfig();
|
|
5
|
+
nuxtApp.vueApp.use(useUmoEditor, runtimeConfig.public.umoEditor || {});
|
|
6
|
+
});
|
package/dist/types.d.mts
CHANGED
package/package.json
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umoteam/umo-editor-nuxt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"private": false,
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
4
9
|
"author": {
|
|
5
10
|
"name": "umodoc",
|
|
6
11
|
"email": "contact@umodoc.com",
|
|
7
12
|
"url": "https://www.umodoc.com"
|
|
8
13
|
},
|
|
9
|
-
"description": "Quickly integrate Umo editor into your
|
|
10
|
-
"repository":
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
"description": "Quickly integrate Umo editor into your Nuxt4 applications",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/umodoc/editor-nuxt.git"
|
|
18
|
+
},
|
|
13
19
|
"keywords": [
|
|
14
20
|
"umo editor",
|
|
15
21
|
"umo editor nuxt",
|
|
@@ -30,6 +36,7 @@
|
|
|
30
36
|
"tiptap",
|
|
31
37
|
"nuxt module"
|
|
32
38
|
],
|
|
39
|
+
"license": "MIT",
|
|
33
40
|
"homepage": "https://editor.umodoc.com/en/docs",
|
|
34
41
|
"exports": {
|
|
35
42
|
".": {
|
|
@@ -38,34 +45,39 @@
|
|
|
38
45
|
}
|
|
39
46
|
},
|
|
40
47
|
"main": "./dist/module.mjs",
|
|
41
|
-
"
|
|
48
|
+
"typesVersions": {
|
|
49
|
+
"*": {
|
|
50
|
+
".": [
|
|
51
|
+
"./dist/types.d.mts"
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
},
|
|
42
55
|
"files": [
|
|
43
56
|
"dist"
|
|
44
57
|
],
|
|
45
58
|
"scripts": {
|
|
46
|
-
"
|
|
47
|
-
"dev": "
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
59
|
+
"dev:prepare": "nuxt build-module --build --stub && nuxt prepare playground",
|
|
60
|
+
"dev": "nuxt dev playground",
|
|
61
|
+
"prepack": "nuxt build-module --build",
|
|
62
|
+
"typecheck": "nuxt build-module --build --stub",
|
|
63
|
+
"lint": "eslint .",
|
|
64
|
+
"test": "vitest run"
|
|
52
65
|
},
|
|
53
66
|
"dependencies": {
|
|
54
|
-
"@nuxt/kit": "^
|
|
55
|
-
"@umoteam/editor": "latest"
|
|
56
|
-
"serialize-javascript": "^6.0.2"
|
|
67
|
+
"@nuxt/kit": "^4.0.0",
|
|
68
|
+
"@umoteam/editor": "latest"
|
|
57
69
|
},
|
|
58
70
|
"devDependencies": {
|
|
59
|
-
"@
|
|
60
|
-
"@nuxt/
|
|
61
|
-
"@
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"
|
|
71
|
+
"@eslint/js": "^9.19.0",
|
|
72
|
+
"@nuxt/module-builder": "^1.0.0",
|
|
73
|
+
"@types/node": "^22.13.5",
|
|
74
|
+
"eslint": "^9.19.0",
|
|
75
|
+
"nuxt": "^4.0.0",
|
|
76
|
+
"typescript": "^5.7.3",
|
|
77
|
+
"unbuild": "^3.3.1",
|
|
78
|
+
"vitest": "^2.1.8"
|
|
79
|
+
},
|
|
80
|
+
"peerDependencies": {
|
|
81
|
+
"nuxt": ">=4.0.0"
|
|
70
82
|
}
|
|
71
83
|
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { useNuxtApp } from "#imports";
|
|
3
|
-
import { UmoEditor } from "@umoteam/editor";
|
|
4
|
-
defineOptions({ name: "UmoEditor" });
|
|
5
|
-
const { vueApp } = useNuxtApp();
|
|
6
|
-
const options = vueApp.config.globalProperties.$umoEditorOptions;
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<template>
|
|
10
|
-
<client-only>
|
|
11
|
-
<umo-editor v-bind="options" />
|
|
12
|
-
</client-only>
|
|
13
|
-
</template>
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|