@mce/svg 0.11.0

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.
@@ -0,0 +1,3 @@
1
+ import { plugin } from './plugin';
2
+ export * from './plugin';
3
+ export default plugin;
package/dist/index.js ADDED
@@ -0,0 +1,28 @@
1
+ import { definePlugin as s } from "mce";
2
+ import { docToSvgString as a } from "modern-idoc-svg";
3
+ function c() {
4
+ return s((n) => {
5
+ const {
6
+ to: o,
7
+ fonts: t
8
+ } = n;
9
+ return {
10
+ name: "mce:svg",
11
+ exporters: [
12
+ {
13
+ name: "svg",
14
+ copyAs: !0,
15
+ saveAs: (e) => new Blob([e], { type: "image/svg+xml" }),
16
+ handle: async (e) => {
17
+ const r = await o("json", e);
18
+ return a({ ...r, fonts: t });
19
+ }
20
+ }
21
+ ]
22
+ };
23
+ });
24
+ }
25
+ export {
26
+ c as default,
27
+ c as plugin
28
+ };
@@ -0,0 +1,8 @@
1
+ declare global {
2
+ namespace Mce {
3
+ interface Exporters {
4
+ svg: string;
5
+ }
6
+ }
7
+ }
8
+ export declare function plugin(): import("mce").Plugin;
package/package.json ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "@mce/svg",
3
+ "type": "module",
4
+ "version": "0.11.0",
5
+ "description": "SVG plugin for mce",
6
+ "author": "wxm",
7
+ "license": "MIT",
8
+ "homepage": "https://github.com/qq15725/mce",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/qq15725/mce.git"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/qq15725/mce/issues"
15
+ },
16
+ "keywords": [
17
+ "mce",
18
+ "svg",
19
+ "plugin"
20
+ ],
21
+ "sideEffects": true,
22
+ "exports": {
23
+ ".": {
24
+ "types": "./dist/index.d.ts",
25
+ "import": "./dist/index.js",
26
+ "require": "./dist/index.js"
27
+ },
28
+ "./*.mjs": "./*.js",
29
+ "./*": "./*"
30
+ },
31
+ "main": "./dist/index.js",
32
+ "module": "./dist/index.js",
33
+ "browser": "./dist/index.js",
34
+ "typings": "dist/index.d.ts",
35
+ "types": "dist/index.d.ts",
36
+ "typesVersions": {
37
+ "*": {
38
+ "*": [
39
+ "*",
40
+ "dist/*",
41
+ "dist/*.d.ts"
42
+ ]
43
+ }
44
+ },
45
+ "files": [
46
+ "dist"
47
+ ],
48
+ "dependencies": {
49
+ "modern-idoc-svg": "^0.1.0"
50
+ },
51
+ "devDependencies": {
52
+ "mce": "0.11.0"
53
+ },
54
+ "peerDependencies": {
55
+ "mce": "^0"
56
+ },
57
+ "scripts": {
58
+ "build:code": "vite build",
59
+ "build:tsc": "NODE_ENV=production tsc --emitDeclarationOnly --project tsconfig.json",
60
+ "build": "pnpm build:code && pnpm build:tsc",
61
+ "lint": "eslint src"
62
+ }
63
+ }