@dineug/erd-editor 3.6.0 → 3.8.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.
Files changed (107) hide show
  1. package/README.md +21 -24
  2. package/dist/components/erd/automatic-table-placement/AutomaticTablePlacement.d.ts +5 -15
  3. package/dist/components/erd/automatic-table-placement/runElkPlacement.d.ts +23 -0
  4. package/dist/components/erd/canvas/CanvasScene.d.ts +3 -3
  5. package/dist/components/erd/canvas/entityDrag.d.ts +5 -4
  6. package/dist/components/erd/canvas/highlightTransition.d.ts +35 -0
  7. package/dist/components/erd/canvas/memo/useMoveMemo.d.ts +3 -1
  8. package/dist/components/erd/canvas/mixColor.d.ts +7 -0
  9. package/dist/components/erd/canvas/relationship-group/RelationshipGroup.d.ts +2 -0
  10. package/dist/components/erd/canvas/relationship-group/relationship/Relationship.d.ts +2 -0
  11. package/dist/components/erd/canvas/relationship-group/relationship/Relationship.template.d.ts +3 -3
  12. package/dist/components/erd/canvas/sceneHit.d.ts +7 -6
  13. package/dist/components/erd/canvas/sceneTokens.d.ts +30 -4
  14. package/dist/components/erd/canvas/table/Table.d.ts +7 -0
  15. package/dist/components/erd/canvas/table/cellLayout.d.ts +48 -18
  16. package/dist/components/erd/canvas/table/column/Column.d.ts +26 -0
  17. package/dist/components/erd/canvas/table/goToErd.d.ts +18 -0
  18. package/dist/components/erd/canvas/table/useMoveTable.d.ts +3 -1
  19. package/dist/components/erd/canvas/table/useViewPin.d.ts +19 -0
  20. package/dist/components/erd/canvas/useMoveEntity.d.ts +9 -2
  21. package/dist/components/erd/content-compass/ContentCompass.d.ts +1 -1
  22. package/dist/components/erd/content-compass/compassGeometry.d.ts +27 -4
  23. package/dist/components/erd/erd-context-menu/menus/tablePlacementMenus.d.ts +24 -0
  24. package/dist/components/erd/floating-toolbar/FloatingToolbar.d.ts +3 -3
  25. package/dist/components/erd/floating-toolbar/FloatingToolbar.styles.d.ts +3 -0
  26. package/dist/components/erd/floating-toolbar/ToolbarCompass.template.d.ts +14 -0
  27. package/dist/components/erd/minimap/MinimapScene.d.ts +1 -1
  28. package/dist/components/erd/minimap/minimapGeometry.d.ts +4 -3
  29. package/dist/components/flowCenters.d.ts +10 -0
  30. package/dist/components/primitives/code-block/CodeBlock.d.ts +2 -2
  31. package/dist/components/primitives/icon/icons.d.ts +7 -0
  32. package/dist/components/sceneSourceContext.d.ts +10 -0
  33. package/dist/components/theme-builder/ThemeBuilder.styles.d.ts +5 -0
  34. package/dist/components/visualization/Visualization.d.ts +3 -4
  35. package/dist/components/visualization/VisualizationFlow.d.ts +10 -0
  36. package/dist/components/visualization/VisualizationGraph.d.ts +10 -0
  37. package/dist/components/visualization/flowLayout.d.ts +29 -0
  38. package/dist/components/visualization/graphViewHandle.d.ts +33 -0
  39. package/dist/components/visualization/particles/ParticleLayer.d.ts +10 -0
  40. package/dist/components/visualization/particles/particleEdges.d.ts +15 -0
  41. package/dist/components/visualization/particles/particleLoop.d.ts +28 -0
  42. package/dist/components/visualization/particles/particlePath.d.ts +83 -0
  43. package/dist/components/visualization/useViewGestures.d.ts +24 -0
  44. package/dist/components/visualization/visualization-toolbar/VisualizationToolbar.d.ts +10 -0
  45. package/dist/components/visualization/visualization-toolbar/VisualizationToolbar.styles.d.ts +4 -0
  46. package/dist/components/visualization/visualizationView.d.ts +29 -5
  47. package/dist/components/visualization/zoomVisualization.d.ts +20 -0
  48. package/dist/constants/layout.d.ts +50 -0
  49. package/dist/constants/tablePlacement.d.ts +16 -0
  50. package/dist/constants/zoom.d.ts +7 -0
  51. package/dist/engine/actions.d.ts +6 -0
  52. package/dist/engine/index.js +12 -12
  53. package/dist/engine/modules/editor/actions.d.ts +60 -2
  54. package/dist/engine/modules/editor/atom.actions.d.ts +136 -0
  55. package/dist/engine/modules/editor/generator.actions.d.ts +16 -4
  56. package/dist/engine/modules/editor/state.d.ts +41 -0
  57. package/dist/engine/modules/editor/view.actions.d.ts +270 -0
  58. package/dist/engine/modules/editor/view.d.ts +28 -0
  59. package/dist/engine/modules/editor/view.generator.actions.d.ts +24 -0
  60. package/dist/engine/modules/settings/atom.actions.d.ts +17 -3
  61. package/dist/engine/modules/settings/generator.actions.d.ts +6 -4
  62. package/dist/engine/rx-operators/viewActionRedirect.d.ts +10 -0
  63. package/dist/engine/rx-operators/viewIgnoreFilter.d.ts +10 -0
  64. package/dist/erd-editor.umd.js +319 -282
  65. package/dist/index.d.ts +0 -1
  66. package/dist/index.dev.d.ts +0 -1
  67. package/dist/index.js +6238 -4937
  68. package/dist/konva/scene/columnDropTarget.d.ts +2 -1
  69. package/dist/konva/scene/contentBounds.d.ts +12 -5
  70. package/dist/konva/scene/fitZoom.d.ts +16 -0
  71. package/dist/konva/scene/metrics.d.ts +6 -5
  72. package/dist/konva/scene/viewFreeze.d.ts +10 -7
  73. package/dist/konva/scene/viewLayout.d.ts +89 -0
  74. package/dist/konva/scene/viewport.d.ts +17 -4
  75. package/dist/{schemaGCService--wGet5O7.js → schemaGCService-CXVjeF9p.js} +3145 -2655
  76. package/dist/services/elk-layout/elkGraph.d.ts +83 -0
  77. package/dist/services/elk-layout/elkLayout.shared-worker.d.ts +2 -0
  78. package/dist/services/elk-layout/elkLayoutOptions.d.ts +46 -0
  79. package/dist/services/elk-layout/elkLayoutService.d.ts +25 -0
  80. package/dist/services/elk-layout/elkWorkerRealm.d.ts +2 -0
  81. package/dist/services/elk-layout/index.d.ts +19 -0
  82. package/dist/services/shiki/index.d.ts +10 -0
  83. package/dist/services/shiki/shiki.shared-worker.d.ts +2 -0
  84. package/dist/services/shiki/shikiService.d.ts +18 -0
  85. package/dist/utils/calcTable.d.ts +27 -1
  86. package/dist/utils/clickGesture.d.ts +19 -0
  87. package/dist/utils/domEvent.d.ts +12 -0
  88. package/dist/utils/draw-relationship/bezier.d.ts +32 -0
  89. package/dist/utils/draw-relationship/calc.d.ts +6 -1
  90. package/dist/utils/draw-relationship/geometrySource.d.ts +9 -0
  91. package/dist/utils/draw-relationship/incremental.d.ts +7 -1
  92. package/dist/utils/draw-relationship/index.d.ts +37 -11
  93. package/dist/utils/draw-relationship/pathFinding.d.ts +2 -1
  94. package/dist/utils/draw-relationship/route.d.ts +5 -3
  95. package/dist/utils/draw-relationship/sort.d.ts +2 -1
  96. package/dist/utils/draw-relationship/stub.d.ts +9 -4
  97. package/dist/utils/emitter.d.ts +18 -7
  98. package/dist/utils/globalEventObservable.d.ts +6 -1
  99. package/dist/utils/keyboard-shortcut/index.d.ts +2 -1
  100. package/dist/utils/promise.d.ts +6 -0
  101. package/dist/workers/elkLayout.shared-worker.js +1 -0
  102. package/dist/workers/exportPng.shared-worker.js +26 -26
  103. package/dist/workers/shiki.shared-worker.js +1 -0
  104. package/dist/workers/spawn.d.ts +5 -3
  105. package/dist/workers/spawn.inline.d.ts +2 -0
  106. package/package.json +7 -4
  107. 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)};
@@ -1,8 +1,10 @@
1
1
  /**
2
- * Where the two SharedWorkers are constructed, in the one spelling a consumer's
3
- * bundler bundles from inside a dependency. The umd build swaps this module for
4
- * spawn.inline.ts through an alias, so nothing else in src names a worker.
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.6.0",
3
+ "version": "3.8.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/schema-sql-parser": "0.1.0",
92
+ "@dineug/r-html": "0.1.3",
90
93
  "@dineug/vite-plugin-r-html": "0.1.0",
91
- "@dineug/r-html": "0.1.3"
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