Skip to content

Commit db5c243

Browse files
committed
chore: invert preserve-modules mode
1 parent 28a102e commit db5c243

4 files changed

Lines changed: 13 additions & 8 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "embed-drawio",
3-
"version": "0.0.17",
3+
"version": "0.0.18",
44
"files": [
55
"dist",
66
"pnpm-lock.yaml"

rollup.config.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@ export default async () => {
1010
const external = Object.keys(require("./package.json").dependencies || {});
1111

1212
const entries = {
13-
index: "src/index.ts",
13+
"index": "src/index.ts",
14+
"utils/svg": "src/utils/svg.ts",
15+
"utils/xml": "src/utils/xml.ts",
16+
"event/index": "src/event/index.ts",
17+
"event/basic": "src/event/basic.ts",
18+
"utils/convert": "src/utils/convert.ts",
19+
"core/diagram-editor": "src/core/diagram-editor.ts",
20+
"core/diagram-viewer": "src/core/diagram-viewer.ts",
1421
};
1522

1623
/**
@@ -22,8 +29,6 @@ export default async () => {
2229
output: {
2330
dir: "./dist",
2431
format: "es",
25-
preserveModules: true,
26-
preserveModulesRoot: "src",
2732
},
2833
plugins: [
2934
resolve(),

src/core/diagram-editor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import { mxEvent, mxResources } from "./mxgraph";
88
import type { Language } from "../editor/i18n";
99
import { getLanguage } from "../editor/i18n";
1010

11-
export { stringToXml, getLanguage, xmlToString };
12-
1311
const themes: Record<string, Node> = {};
1412
themes[Graph.prototype.defaultThemeName] = (
1513
stringToXml(DEFAULT_STYLE_XML) as XMLDocument
@@ -57,3 +55,5 @@ export class DiagramEditor {
5755
this.container.removeChild(this.diagramContainer);
5856
};
5957
}
58+
59+
export { stringToXml, getLanguage, xmlToString };

src/core/diagram-viewer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import { Graph } from "../editor";
44
import { mxCodec, mxEvent } from "./mxgraph";
55
import { stringToSvg, svgToString } from "../utils/svg";
66

7-
export { stringToXml, svgToString, xmlToString, stringToSvg };
8-
97
const themes: Record<string, Node> = {};
108
themes[Graph.prototype.defaultThemeName] = (
119
stringToXml(DEFAULT_STYLE_XML) as XMLDocument
@@ -88,3 +86,5 @@ export const downloadSVG = (
8886
}
8987
});
9088
};
89+
90+
export { stringToXml, svgToString, xmlToString, stringToSvg };

0 commit comments

Comments
 (0)