dragon-editor 3.5.4 → 3.5.6

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/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "nuxt": ">=3.0.0"
5
5
  },
6
6
  "configKey": "dragon-editor",
7
- "version": "3.5.4",
7
+ "version": "3.5.6",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
package/dist/module.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { defineNuxtModule, createResolver, addComponent, addTypeTemplate, addPluginTemplate } from '@nuxt/kit';
1
+ import { defineNuxtModule, createResolver, addComponent, addTypeTemplate, addPlugin } from '@nuxt/kit';
2
2
 
3
3
 
4
4
 
@@ -31,14 +31,7 @@ const module = defineNuxtModule({
31
31
  src: resolver.resolve(__dirname, "./runtime/type.d.ts"),
32
32
  write: true
33
33
  });
34
- addPluginTemplate({
35
- src: resolver.resolve(__dirname, "./runtime/plugin.mjs"),
36
- filename: "plugin.js",
37
- options: {
38
- name: "DragonEditor"
39
- }
40
- });
41
- nuxt.options.plugins.push(resolver.resolve(nuxt.options.buildDir, "plugin.js"));
34
+ addPlugin(resolver.resolve(__dirname, "./runtime/plugin"));
42
35
  nuxt.options.build.transpile.push("highlight.js");
43
36
  }
44
37
  });
@@ -0,0 +1,2 @@
1
+ declare const _default: import("nuxt/app").Plugin<Record<string, unknown>> & import("nuxt/app").ObjectPlugin<Record<string, unknown>>;
2
+ export default _default;
@@ -1,6 +1,6 @@
1
- import hljs from "highlight.js";
2
-
1
+ import hljs from "highlight.js/lib/core";
2
+ import { defineNuxtPlugin } from "nuxt/app";
3
3
  export default defineNuxtPlugin((nuxtApp) => {
4
- nuxtApp.vueApp.provide("hljs", hljs);
5
- nuxtApp.provide("hljs", hljs);
4
+ nuxtApp.vueApp.provide("hljs", hljs);
5
+ nuxtApp.provide("hljs", hljs);
6
6
  });
@@ -1,5 +1,5 @@
1
1
  import { _getDefaultBlockData, _generateId, _updateModelData, _updateCursorData, _decideWhetherOpenControlBar, _updateControlBarStatus, CODEBLOCKLANG } from "../event/index.js";
2
- import hljs from "highlight.js";
2
+ import hljs from "highlight.js/lib/core";
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.4",
3
+ "version": "3.5.6",
4
4
  "description": "Javascript WYSIWYG editor in Nuxt3!",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,2 +0,0 @@
1
- declare const _default: any;
2
- export default _default;