@dineug/erd-editor 3.6.0 → 3.7.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.
- package/README.md +21 -24
- package/dist/components/erd/automatic-table-placement/AutomaticTablePlacement.d.ts +5 -0
- package/dist/components/erd/automatic-table-placement/runElkPlacement.d.ts +12 -0
- package/dist/components/erd/erd-context-menu/menus/tablePlacementMenus.d.ts +24 -0
- package/dist/components/primitives/code-block/CodeBlock.d.ts +2 -2
- package/dist/components/primitives/icon/icons.d.ts +4 -0
- package/dist/constants/tablePlacement.d.ts +15 -0
- package/dist/erd-editor.umd.js +260 -260
- package/dist/index.d.ts +0 -1
- package/dist/index.dev.d.ts +0 -1
- package/dist/index.js +3556 -3337
- package/dist/services/elk-layout/elkGraph.d.ts +44 -0
- package/dist/services/elk-layout/elkLayout.shared-worker.d.ts +2 -0
- package/dist/services/elk-layout/elkLayoutOptions.d.ts +25 -0
- package/dist/services/elk-layout/elkLayoutService.d.ts +21 -0
- package/dist/services/elk-layout/elkWorkerRealm.d.ts +2 -0
- package/dist/services/elk-layout/index.d.ts +13 -0
- package/dist/services/shiki/index.d.ts +10 -0
- package/dist/services/shiki/shiki.shared-worker.d.ts +2 -0
- package/dist/services/shiki/shikiService.d.ts +18 -0
- package/dist/utils/domEvent.d.ts +6 -0
- package/dist/utils/emitter.d.ts +14 -7
- package/dist/utils/globalEventObservable.d.ts +6 -1
- package/dist/utils/promise.d.ts +6 -0
- package/dist/workers/elkLayout.shared-worker.js +1 -0
- package/dist/workers/exportPng.shared-worker.js +26 -26
- package/dist/workers/shiki.shared-worker.js +1 -0
- package/dist/workers/spawn.d.ts +5 -3
- package/dist/workers/spawn.inline.d.ts +2 -0
- package/package.json +7 -4
- package/dist/services/shikiService.d.ts +0 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"comlink";import t from"@shikijs/langs/csharp";import n from"@shikijs/langs/go";import r from"@shikijs/langs/graphql";import i from"@shikijs/langs/java";import a from"@shikijs/langs/kotlin";import o from"@shikijs/langs/python";import s from"@shikijs/langs/scala";import c from"@shikijs/langs/sql";import l from"@shikijs/langs/typescript";import u from"@shikijs/themes/github-dark";import d from"@shikijs/themes/github-light";import{createHighlighterCore as f}from"shiki/core";import{createJavaScriptRegexEngine as p}from"shiki/engine/javascript";function m(e){"@babel/helpers - typeof";return m=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},m(e)}function h(e,t){if(m(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(m(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function g(e){var t=h(e,`string`);return m(t)==`symbol`?t:t+``}function _(e,t,n){return(t=g(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const v={dark:`github-dark`,light:`github-light`};function y(e){return e===`dark`||e===`light`?e:`dark`}const b=new class{constructor(){_(this,`highlighter`,void 0),this.highlighter=f({themes:[u,d],langs:[c,l,r,t,i,a,s,n,o],engine:p({forgiving:!0})})}async codeToHtml(e,{lang:t,theme:n}){return(await this.highlighter).codeToHtml(e,{lang:t,theme:v[y(n)]})}};self.onconnect=t=>{let n=t.ports[0];e.expose(b,n)};
|
package/dist/workers/spawn.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Where the
|
|
3
|
-
* bundler bundles from inside a dependency. The umd build swaps this
|
|
4
|
-
* spawn.inline.ts
|
|
2
|
+
* Where the four SharedWorkers are constructed, in the one spelling a
|
|
3
|
+
* consumer's bundler bundles from inside a dependency. The umd build swaps this
|
|
4
|
+
* module for spawn.inline.ts by alias, so nothing else in src names a worker.
|
|
5
5
|
*/
|
|
6
6
|
export declare function spawnSchemaGCWorker(name: string): SharedWorker;
|
|
7
7
|
export declare function spawnExportPngWorker(name: string): SharedWorker;
|
|
8
|
+
export declare function spawnElkLayoutWorker(name: string): SharedWorker;
|
|
9
|
+
export declare function spawnShikiWorker(name: string): SharedWorker;
|
|
8
10
|
//# sourceMappingURL=spawn.d.ts.map
|
|
@@ -5,4 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export declare function spawnSchemaGCWorker(name: string): SharedWorker;
|
|
7
7
|
export declare function spawnExportPngWorker(name: string): SharedWorker;
|
|
8
|
+
export declare function spawnElkLayoutWorker(name: string): SharedWorker;
|
|
9
|
+
export declare function spawnShikiWorker(name: string): SharedWorker;
|
|
8
10
|
//# sourceMappingURL=spawn.inline.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dineug/erd-editor",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"description": "Entity-Relationship Diagram Editor",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -48,9 +48,12 @@
|
|
|
48
48
|
"@easylogic/colorpicker": "^1.10.11",
|
|
49
49
|
"@egjs/agent": "^2.4.3",
|
|
50
50
|
"@radix-ui/colors": "^3.0.0",
|
|
51
|
+
"@shikijs/langs": "^4.4.3",
|
|
52
|
+
"@shikijs/themes": "^4.4.3",
|
|
51
53
|
"comlink": "^4.4.2",
|
|
52
54
|
"d3-force": "^3.0.0",
|
|
53
55
|
"deepmerge": "^4.3.1",
|
|
56
|
+
"elkjs": "^0.12.0",
|
|
54
57
|
"es-toolkit": "^1.50.0",
|
|
55
58
|
"fuse.js": "^7.0.0",
|
|
56
59
|
"graphql": "^17.0.2",
|
|
@@ -60,6 +63,7 @@
|
|
|
60
63
|
"luxon": "^3.4.4",
|
|
61
64
|
"nanoid": "^5.1.3",
|
|
62
65
|
"rxjs": "^7.8.1",
|
|
66
|
+
"shiki": "^4.4.3",
|
|
63
67
|
"stylis": "^4.4.0",
|
|
64
68
|
"tinykeys": "^2.1.0"
|
|
65
69
|
},
|
|
@@ -84,11 +88,10 @@
|
|
|
84
88
|
"vite-plugin-dts": "^5.0.3",
|
|
85
89
|
"vite-plus": "0.2.9",
|
|
86
90
|
"vitest": "4.1.10",
|
|
87
|
-
"@dineug/erd-editor-shiki-worker": "0.3.0",
|
|
88
91
|
"@dineug/erd-editor-schema": "0.1.0",
|
|
89
|
-
"@dineug/
|
|
92
|
+
"@dineug/r-html": "0.1.3",
|
|
90
93
|
"@dineug/vite-plugin-r-html": "0.1.0",
|
|
91
|
-
"@dineug/
|
|
94
|
+
"@dineug/schema-sql-parser": "0.1.0"
|
|
92
95
|
},
|
|
93
96
|
"scripts": {
|
|
94
97
|
"dev": "vp run --filter @dineug/erd-editor... --filter !@dineug/erd-editor build && vp dev",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export type ShikiService = {
|
|
2
|
-
codeToHtml(code: string, { lang, theme, }: {
|
|
3
|
-
lang: 'sql' | 'typescript' | 'graphql' | 'csharp' | 'java' | 'kotlin' | 'scala' | 'go' | 'python';
|
|
4
|
-
theme?: 'dark' | 'light';
|
|
5
|
-
}): Promise<string>;
|
|
6
|
-
};
|
|
7
|
-
export declare function setGetShikiServiceCallback(callback: () => ShikiService | null): void;
|
|
8
|
-
export declare function getShikiService(): ShikiService | null;
|
|
9
|
-
//# sourceMappingURL=shikiService.d.ts.map
|