@mce/gaoding 0.11.1 → 0.11.3

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 (2) hide show
  1. package/dist/index.js +18 -14
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,24 +1,28 @@
1
- import { definePlugin as a } from "mce";
2
- function o() {
3
- return a((e) => ({
4
- name: "gaoding"
5
- }));
1
+ import { definePlugin } from "mce";
2
+ function plugin() {
3
+ return definePlugin((_editor) => {
4
+ return {
5
+ name: "gaoding"
6
+ };
7
+ });
6
8
  }
7
- function d(e) {
8
- const t = e.querySelector('span[data-app="editor-next"]');
9
- if (t)
9
+ function parseClipboard(dom) {
10
+ const data = dom.querySelector('span[data-app="editor-next"]');
11
+ if (data) {
10
12
  return decodeURIComponent(
11
- new TextDecoder("utf-8", { fatal: !1 }).decode(
13
+ new TextDecoder("utf-8", { fatal: false }).decode(
12
14
  new Uint8Array(
13
15
  atob(
14
- t.getAttribute("data-clipboard")?.replace(/\s+/g, "") ?? ""
15
- ).split("").map((r) => r.charCodeAt(0))
16
+ data.getAttribute("data-clipboard")?.replace(/\s+/g, "") ?? ""
17
+ ).split("").map((c) => c.charCodeAt(0))
16
18
  )
17
19
  )
18
20
  );
21
+ }
22
+ return void 0;
19
23
  }
20
24
  export {
21
- o as default,
22
- d as parseClipboard,
23
- o as plugin
25
+ plugin as default,
26
+ parseClipboard,
27
+ plugin
24
28
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mce/gaoding",
3
3
  "type": "module",
4
- "version": "0.11.1",
4
+ "version": "0.11.3",
5
5
  "description": "Plugin for mce",
6
6
  "author": "wxm",
7
7
  "license": "MIT",
@@ -45,7 +45,7 @@
45
45
  "dist"
46
46
  ],
47
47
  "devDependencies": {
48
- "mce": "0.11.1"
48
+ "mce": "0.11.3"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "mce": "^0"