@dineug/erd-editor 3.1.8 → 3.2.1

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 (172) hide show
  1. package/README.md +2 -429
  2. package/dist/components/appContext.d.ts +8 -7
  3. package/dist/components/customElementRegistry.d.ts +0 -1
  4. package/dist/components/erd/automatic-table-placement/AutomaticTablePlacement.d.ts +1 -2
  5. package/dist/components/erd/automatic-table-placement/createAutomaticTablePlacement.d.ts +2 -2
  6. package/dist/components/erd/canvas/canvas-svg/relationship/Relationship.d.ts +1 -1
  7. package/dist/components/erd/canvas/canvas-svg/relationship/Relationship.template.d.ts +1 -1
  8. package/dist/components/erd/canvas/draw-relationship/DrawRelationship.d.ts +1 -1
  9. package/dist/components/erd/canvas/high-level-table/HighLevelTable.d.ts +1 -1
  10. package/dist/components/erd/canvas/memo/Memo.d.ts +1 -1
  11. package/dist/components/erd/canvas/memo/memo-sash/MemoSash.d.ts +1 -1
  12. package/dist/components/erd/canvas/shared-mouse-tracker/shared-mouse-cursor/SharedMouseCursor.d.ts +1 -1
  13. package/dist/components/erd/canvas/table/Table.d.ts +1 -1
  14. package/dist/components/erd/canvas/table/column/Column.d.ts +2 -2
  15. package/dist/components/erd/canvas/table/column/column-data-type/ColumnDataType.d.ts +1 -1
  16. package/dist/components/erd/canvas/table/useFocusTable.d.ts +2 -2
  17. package/dist/components/erd/canvas/table/useMoveTable.d.ts +1 -1
  18. package/dist/components/erd/diff-viewer/DiffViewer.d.ts +9 -0
  19. package/dist/components/erd/diff-viewer/DiffViewer.styles.d.ts +3 -0
  20. package/dist/components/erd/diff-viewer/diff.d.ts +19 -0
  21. package/dist/components/erd/diff-viewer/erd-viewer/ErdViewer.d.ts +10 -0
  22. package/dist/components/erd/diff-viewer/erd-viewer/ErdViewer.styles.d.ts +1 -0
  23. package/dist/components/erd/diff-viewer/tree-viewer/TreeViewer.d.ts +11 -0
  24. package/dist/components/erd/diff-viewer/tree-viewer/TreeViewer.styles.d.ts +5 -0
  25. package/dist/components/erd/erd-context-menu/ErdContextMenu.d.ts +1 -1
  26. package/dist/components/erd/erd-context-menu/menus/databaseMenus.d.ts +1 -1
  27. package/dist/components/erd/erd-context-menu/menus/drawRelationshipMenus.d.ts +2 -2
  28. package/dist/components/erd/erd-context-menu/menus/exportMenus.d.ts +1 -1
  29. package/dist/components/erd/erd-context-menu/menus/importMenus.d.ts +1 -1
  30. package/dist/components/erd/erd-context-menu/menus/relationshipMenus.d.ts +1 -1
  31. package/dist/components/erd/erd-context-menu/menus/showMenus.d.ts +1 -1
  32. package/dist/components/erd/erdShortcutPerformCheck.d.ts +1 -1
  33. package/dist/components/erd/minimap/memo/Memo.d.ts +1 -1
  34. package/dist/components/erd/minimap/table/Table.d.ts +1 -1
  35. package/dist/components/erd/minimap/useMinimapScroll.d.ts +1 -1
  36. package/dist/components/erd/table-properties/table-properties-indexes/indexes-checkbox-column/IndexesCheckboxColumn.d.ts +1 -1
  37. package/dist/components/erd/table-properties/table-properties-indexes/indexes-column/IndexesColumn.d.ts +1 -1
  38. package/dist/components/erd/table-properties/table-properties-indexes/indexes-index/IndexesIndex.d.ts +1 -1
  39. package/dist/components/erd/table-properties/table-properties-tabs/TablePropertiesTabs.d.ts +1 -1
  40. package/dist/components/erd/time-travel/TimeTravel.d.ts +9 -0
  41. package/dist/components/erd/time-travel/TimeTravel.styles.d.ts +4 -0
  42. package/dist/components/erd/useErdShortcut.d.ts +1 -1
  43. package/dist/components/erd/virtual-scroll/useVirtualScroll.d.ts +1 -1
  44. package/dist/components/erd-editor/ErdEditor.d.ts +6 -5
  45. package/dist/components/erd-editor/ErdEditor.stories.d.ts +0 -1
  46. package/dist/components/erd-editor/useErdEditorAttachElement.d.ts +5 -5
  47. package/dist/components/generator-code/generator-code-context-menu/menus/columnNameCaseMenus.d.ts +1 -1
  48. package/dist/components/generator-code/generator-code-context-menu/menus/languageMenus.d.ts +1 -1
  49. package/dist/components/generator-code/generator-code-context-menu/menus/tableNameCaseMenus.d.ts +1 -1
  50. package/dist/components/primitives/code-block/CodeBlock.d.ts +1 -1
  51. package/dist/components/primitives/color-picker/ColorPicker.d.ts +1 -1
  52. package/dist/components/primitives/context-menu/context-menu-root/contextMenuRootContext.d.ts +1 -1
  53. package/dist/components/primitives/icon/icons.d.ts +1 -1
  54. package/dist/components/primitives/sash/Sash.d.ts +2 -2
  55. package/dist/components/primitives/slider/Slider.d.ts +9 -0
  56. package/dist/components/primitives/slider/Slider.stories.d.ts +23 -0
  57. package/dist/components/primitives/slider/Slider.styles.d.ts +4 -0
  58. package/dist/components/quick-search/actions.d.ts +1 -1
  59. package/dist/components/schema-sql/schema-sql-context-menu/menus/bracketMenus.d.ts +1 -1
  60. package/dist/components/settings/settings-lnb/SettingsLnb.d.ts +1 -1
  61. package/dist/components/theme/Theme.d.ts +1 -1
  62. package/dist/components/theme-builder/ThemeBuilder.d.ts +1 -1
  63. package/dist/components/visualization/createVisualization.d.ts +1 -1
  64. package/dist/components/visualization/table/Table.d.ts +1 -1
  65. package/dist/components/visualization/table/column/Column.d.ts +1 -1
  66. package/dist/constants/layout.d.ts +1 -0
  67. package/dist/constants/open.d.ts +3 -1
  68. package/dist/constants/sql/dataType/MSSQL.d.ts +1 -1
  69. package/dist/constants/sql/dataType/MariaDB.d.ts +1 -1
  70. package/dist/constants/sql/dataType/MySQL.d.ts +1 -1
  71. package/dist/constants/sql/dataType/Oracle.d.ts +1 -1
  72. package/dist/constants/sql/dataType/PostgreSQL.d.ts +1 -1
  73. package/dist/constants/sql/dataType/SQLite.d.ts +1 -1
  74. package/dist/constants/sql/dataType/index.d.ts +1 -1
  75. package/dist/constants/sql/database.d.ts +1 -1
  76. package/dist/engine/actions.d.ts +24 -24
  77. package/dist/engine/generator.actions.d.ts +2 -2
  78. package/dist/engine/history.actions.d.ts +3 -3
  79. package/dist/engine/history.d.ts +24 -10
  80. package/dist/engine/hooks.d.ts +2 -2
  81. package/dist/engine/modules/editor/actions.d.ts +3 -3
  82. package/dist/engine/modules/editor/generator.actions.d.ts +2 -2
  83. package/dist/engine/modules/editor/history.d.ts +1 -1
  84. package/dist/engine/modules/editor/state.d.ts +1 -1
  85. package/dist/engine/modules/editor/utils/focus.d.ts +3 -3
  86. package/dist/engine/modules/index/actions.d.ts +3 -3
  87. package/dist/engine/modules/index/generator.actions.d.ts +1 -1
  88. package/dist/engine/modules/index/history.d.ts +1 -1
  89. package/dist/engine/modules/index-column/actions.d.ts +3 -3
  90. package/dist/engine/modules/index-column/generator.actions.d.ts +1 -1
  91. package/dist/engine/modules/index-column/history.d.ts +1 -1
  92. package/dist/engine/modules/memo/actions.d.ts +3 -3
  93. package/dist/engine/modules/memo/generator.actions.d.ts +1 -1
  94. package/dist/engine/modules/memo/history.d.ts +1 -1
  95. package/dist/engine/modules/relationship/actions.d.ts +3 -3
  96. package/dist/engine/modules/relationship/history.d.ts +1 -1
  97. package/dist/engine/modules/relationship/hooks.d.ts +1 -1
  98. package/dist/engine/modules/settings/actions.d.ts +3 -3
  99. package/dist/engine/modules/settings/generator.actions.d.ts +1 -1
  100. package/dist/engine/modules/settings/history.d.ts +1 -1
  101. package/dist/engine/modules/table/actions.d.ts +3 -3
  102. package/dist/engine/modules/table/generator.actions.d.ts +2 -2
  103. package/dist/engine/modules/table/history.d.ts +1 -1
  104. package/dist/engine/modules/table/hooks.d.ts +1 -1
  105. package/dist/engine/modules/table-column/actions.d.ts +3 -3
  106. package/dist/engine/modules/table-column/generator.actions.d.ts +2 -2
  107. package/dist/engine/modules/table-column/history.d.ts +1 -1
  108. package/dist/engine/modules/table-column/hooks.d.ts +1 -1
  109. package/dist/engine/modules/table-column/utils/dataType.d.ts +2 -2
  110. package/dist/engine/replication-store.d.ts +2 -2
  111. package/dist/engine/rx-store.d.ts +10 -3
  112. package/dist/engine/shared-store.d.ts +2 -2
  113. package/dist/engine/state.d.ts +1 -1
  114. package/dist/engine/store-hooks.d.ts +1 -1
  115. package/dist/engine/store.d.ts +2 -2
  116. package/dist/engine/tag.d.ts +1 -1
  117. package/dist/engine.js +8 -8
  118. package/dist/erd-editor.js +8876 -8205
  119. package/dist/hooks/useKeyBindingMap.d.ts +1 -1
  120. package/dist/hooks/useUnmounted.d.ts +1 -1
  121. package/dist/index.d.ts +4 -5
  122. package/dist/{schemaGCService-Cyip5lJB.js → schemaGCService-tEI4URA5.js} +500 -499
  123. package/dist/services/schema-gc/procGC.d.ts +1 -1
  124. package/dist/services/schema-gc/schemaGCService.d.ts +1 -1
  125. package/dist/themes/radix-ui-theme.config.d.ts +1 -1
  126. package/dist/themes/radix-ui-theme.d.ts +2 -2
  127. package/dist/themes/tokens.d.ts +6 -0
  128. package/dist/utils/calcMemo.d.ts +1 -1
  129. package/dist/utils/calcTable.d.ts +3 -3
  130. package/dist/utils/collection/index.entity.d.ts +1 -1
  131. package/dist/utils/collection/indexColumn.entity.d.ts +1 -1
  132. package/dist/utils/collection/memo.entity.d.ts +1 -1
  133. package/dist/utils/collection/relationship.entity.d.ts +1 -1
  134. package/dist/utils/collection/table.entity.d.ts +1 -1
  135. package/dist/utils/collection/tableColumn.entity.d.ts +1 -1
  136. package/dist/utils/dragSelect.d.ts +1 -1
  137. package/dist/utils/draw-relationship/calc.d.ts +3 -3
  138. package/dist/utils/draw-relationship/draw.d.ts +3 -3
  139. package/dist/utils/draw-relationship/index.d.ts +1 -1
  140. package/dist/utils/draw-relationship/pathFinding.d.ts +2 -2
  141. package/dist/utils/draw-relationship/sort.d.ts +1 -1
  142. package/dist/utils/emitter.d.ts +15 -2
  143. package/dist/utils/file/importFile.d.ts +3 -1
  144. package/dist/utils/focus.d.ts +1 -1
  145. package/dist/utils/generator-code/csharp.d.ts +1 -1
  146. package/dist/utils/generator-code/graphql.d.ts +1 -1
  147. package/dist/utils/generator-code/index.d.ts +2 -2
  148. package/dist/utils/generator-code/java.d.ts +1 -1
  149. package/dist/utils/generator-code/jpa.d.ts +1 -1
  150. package/dist/utils/generator-code/kotlin.d.ts +1 -1
  151. package/dist/utils/generator-code/scala.d.ts +1 -1
  152. package/dist/utils/generator-code/typescript.d.ts +1 -1
  153. package/dist/utils/generator-code/utils.d.ts +2 -2
  154. package/dist/utils/globalEmitter.d.ts +4 -1
  155. package/dist/utils/index.d.ts +1 -1
  156. package/dist/utils/internalEvents.d.ts +1 -1
  157. package/dist/utils/keyboard-shortcut/index.d.ts +1 -1
  158. package/dist/utils/rx-operators/fromCopy.d.ts +1 -1
  159. package/dist/utils/rx-operators/fromPaste.d.ts +1 -1
  160. package/dist/utils/schema-sql/MSSQL.d.ts +1 -1
  161. package/dist/utils/schema-sql/MariaDB.d.ts +1 -1
  162. package/dist/utils/schema-sql/MySQL.d.ts +1 -1
  163. package/dist/utils/schema-sql/Oracle.d.ts +1 -1
  164. package/dist/utils/schema-sql/PostgreSQL.d.ts +1 -1
  165. package/dist/utils/schema-sql/SQLite.d.ts +1 -1
  166. package/dist/utils/schema-sql/index.d.ts +2 -2
  167. package/dist/utils/schema-sql/utils.d.ts +4 -2
  168. package/dist/utils/schema-sql-parser/index.d.ts +1 -1
  169. package/dist/utils/table-clipboard/copy.d.ts +1 -1
  170. package/dist/utils/table-clipboard/index.d.ts +1 -1
  171. package/dist/utils/table-clipboard/paste.d.ts +2 -2
  172. package/package.json +14 -13
@@ -1,3 +1,3 @@
1
1
  import { ERDEditorSchemaV3 } from '@dineug/erd-editor-schema';
2
- import { GCIds } from "./";
2
+ import { GCIds } from '.';
3
3
  export declare function procGC({ collections, lww }: ERDEditorSchemaV3, { tableIds, tableColumnIds, relationshipIds, indexIds, indexColumnIds, memoIds, }: GCIds): void;
@@ -1,4 +1,4 @@
1
- import type { GCIds } from "./";
1
+ import type { GCIds } from '.';
2
2
  export declare class SchemaGCService {
3
3
  run(source: string): Promise<GCIds>;
4
4
  }
@@ -1,2 +1,2 @@
1
- import { Theme } from "./tokens";
1
+ import { Theme } from './tokens';
2
2
  export declare const ThemeConfig: Theme;
@@ -1,5 +1,5 @@
1
- import { ValuesType } from "../internal-types";
2
- import { Theme } from "./tokens";
1
+ import { ValuesType } from '../internal-types';
2
+ import { Theme } from './tokens';
3
3
  export declare const Palette: {
4
4
  readonly amber: {
5
5
  amber1: string;
@@ -58,6 +58,12 @@ export type Theme = {
58
58
  keyPK: string;
59
59
  keyFK: string;
60
60
  keyPFK: string;
61
+ diffInsertBackground: string;
62
+ diffDeleteBackground: string;
63
+ diffCrossBackground: string;
64
+ diffInsertForeground: string;
65
+ diffDeleteForeground: string;
66
+ diffCrossForeground: string;
61
67
  };
62
68
  export declare const ThemeTokens: ReadonlyArray<keyof Theme>;
63
69
  export declare const themeToTokensString: (theme: Theme) => string;
@@ -1,3 +1,3 @@
1
- import { Memo } from "../internal-types";
1
+ import { Memo } from '../internal-types';
2
2
  export declare function calcMemoWidth(memo: Memo): number;
3
3
  export declare function calcMemoHeight(memo: Memo): number;
@@ -1,6 +1,6 @@
1
- import { EngineContext } from "../engine/context";
2
- import { RootState } from "../engine/state";
3
- import { Table } from "../internal-types";
1
+ import { EngineContext } from '../engine/context';
2
+ import { RootState } from '../engine/state';
3
+ import { Table } from '../internal-types';
4
4
  export declare function calcTableWidths(table: Table, { settings: { show, maxWidthComment }, collections }: RootState): ColumnWidth;
5
5
  export type ColumnWidth = {
6
6
  width: number;
@@ -1,2 +1,2 @@
1
- import { DeepPartial, Index } from "../../internal-types";
1
+ import { DeepPartial, Index } from '../../internal-types';
2
2
  export declare const createIndex: (value?: DeepPartial<Index>) => Index;
@@ -1,2 +1,2 @@
1
- import { DeepPartial, IndexColumn } from "../../internal-types";
1
+ import { DeepPartial, IndexColumn } from '../../internal-types';
2
2
  export declare const createIndexColumn: (value?: DeepPartial<IndexColumn>) => IndexColumn;
@@ -1,2 +1,2 @@
1
- import { DeepPartial, Memo } from "../../internal-types";
1
+ import { DeepPartial, Memo } from '../../internal-types';
2
2
  export declare const createMemo: (value?: DeepPartial<Memo>) => Memo;
@@ -1,2 +1,2 @@
1
- import { DeepPartial, Relationship } from "../../internal-types";
1
+ import { DeepPartial, Relationship } from '../../internal-types';
2
2
  export declare const createRelationship: (value?: DeepPartial<Relationship>) => Relationship;
@@ -1,2 +1,2 @@
1
- import { DeepPartial, Table } from "../../internal-types";
1
+ import { DeepPartial, Table } from '../../internal-types';
2
2
  export declare const createTable: (value?: DeepPartial<Table>) => Table;
@@ -1,2 +1,2 @@
1
- import { Column, DeepPartial } from "../../internal-types";
1
+ import { Column, DeepPartial } from '../../internal-types';
2
2
  export declare const createColumn: (value?: DeepPartial<Column>) => Column;
@@ -1,4 +1,4 @@
1
- import { Point } from "../internal-types";
1
+ import { Point } from '../internal-types';
2
2
  type PointToPoint = {
3
3
  x1: number;
4
4
  y1: number;
@@ -1,6 +1,6 @@
1
- import { RootState } from "../../engine/state";
2
- import { Point, Table } from "../../internal-types";
3
- import { ObjectPoint } from "./";
1
+ import { RootState } from '../../engine/state';
2
+ import { Point, Table } from '../../internal-types';
3
+ import { ObjectPoint } from '.';
4
4
  export declare function tableToObjectPoint(state: RootState, table: Table): ObjectPoint;
5
5
  export declare function euclideanDistance(a: Point, b: Point): number;
6
6
  export declare function manhattanDistance(a: Point, b: Point): number;
@@ -1,4 +1,4 @@
1
- import { DrawRelationship } from "../../engine/modules/editor/state";
2
- import { RootState } from "../../engine/state";
3
- import { DrawPath } from "./";
1
+ import { DrawRelationship } from '../../engine/modules/editor/state';
2
+ import { RootState } from '../../engine/state';
3
+ import { DrawPath } from '.';
4
4
  export declare function getDraw(state: RootState, draw: DrawRelationship): DrawPath;
@@ -1,4 +1,4 @@
1
- import { Point, RelationshipPoint, ValuesType } from "../../internal-types";
1
+ import { Point, RelationshipPoint, ValuesType } from '../../internal-types';
2
2
  export declare const DirectionName: {
3
3
  readonly left: "left";
4
4
  readonly right: "right";
@@ -1,3 +1,3 @@
1
- import { Relationship } from "../../internal-types";
2
- import { RelationshipPath } from "./";
1
+ import { Relationship } from '../../internal-types';
2
+ import { RelationshipPath } from '.';
3
3
  export declare function getRelationshipPath(relationship: Relationship): RelationshipPath;
@@ -1,2 +1,2 @@
1
- import { RootState } from "../../engine/state";
1
+ import { RootState } from '../../engine/state';
2
2
  export declare function relationshipSort(state: RootState): void;
@@ -1,6 +1,6 @@
1
1
  import { Action, AnyAction, DOMTemplateLiterals } from '@dineug/r-html';
2
- import { ValuesType } from "../internal-types";
3
- import { ThemeOptions } from "../themes/radix-ui-theme";
2
+ import { ValuesType } from '../internal-types';
3
+ import { ThemeOptions } from '../themes/radix-ui-theme';
4
4
  declare const InternalActionType: {
5
5
  readonly openColorPicker: "openColorPicker";
6
6
  readonly closeColorPicker: "closeColorPicker";
@@ -16,6 +16,7 @@ declare const InternalActionType: {
16
16
  readonly setThemeOptions: "setThemeOptions";
17
17
  readonly mouseTrackerStart: "mouseTrackerStart";
18
18
  readonly mouseTrackerEnd: "mouseTrackerEnd";
19
+ readonly openDiffViewer: "openDiffViewer";
19
20
  };
20
21
  type InternalActionType = ValuesType<typeof InternalActionType>;
21
22
  type InternalActionMap = {
@@ -46,6 +47,9 @@ type InternalActionMap = {
46
47
  [InternalActionType.setThemeOptions]: Partial<ThemeOptions>;
47
48
  [InternalActionType.mouseTrackerStart]: void;
48
49
  [InternalActionType.mouseTrackerEnd]: void;
50
+ [InternalActionType.openDiffViewer]: {
51
+ value: string;
52
+ };
49
53
  };
50
54
  type Reducer<K extends keyof M, M> = (action: Action<K, M>) => void;
51
55
  type ReducerRecord<K extends keyof M, M> = {
@@ -153,4 +157,13 @@ export declare const mouseTrackerEndAction: {
153
157
  toString(): string;
154
158
  type: string;
155
159
  };
160
+ export declare const openDiffViewerAction: {
161
+ (payload: {
162
+ value: string;
163
+ }): AnyAction<{
164
+ value: string;
165
+ }>;
166
+ toString(): string;
167
+ type: string;
168
+ };
156
169
  export {};
@@ -1,10 +1,12 @@
1
- import { AppContext } from "../../components/appContext";
1
+ import { AppContext } from '../../components/appContext';
2
2
  type ImportOptions = {
3
3
  type: 'json' | 'sql';
4
+ op: 'set' | 'diff';
4
5
  accept: string;
5
6
  };
6
7
  type ImportFileCallback = (options: ImportOptions) => void;
7
8
  export declare function setImportFileCallback(callback: ImportFileCallback | null): void;
8
9
  export declare function importJSON({ store, emitter }: AppContext): void;
9
10
  export declare function importSchemaSQL({ store, emitter }: AppContext): void;
11
+ export declare function importDiffJSON({ emitter }: AppContext): void;
10
12
  export {};
@@ -1,4 +1,4 @@
1
- import { FocusTable, FocusType } from "../engine/modules/editor/state";
1
+ import { FocusTable, FocusType } from '../engine/modules/editor/state';
2
2
  export declare function isFocus(focusTable: FocusTable | null, focusType: FocusType, tableId: string, columnId?: string | null): boolean;
3
3
  export declare const isSelectColumn: (focusTable: FocusTable | null, tableId: string, columnId: string) => boolean;
4
4
  export declare function isEdit(focusTable: FocusTable | null, focusType: FocusType, tableId: string, columnId?: string | null): boolean;
@@ -1,4 +1,4 @@
1
- import { RootState } from "../../engine/state";
1
+ import { RootState } from '../../engine/state';
2
2
  import { FormatTableOptions } from './utils';
3
3
  export declare function createCode(state: RootState): string;
4
4
  export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
@@ -1,4 +1,4 @@
1
- import { RootState } from "../../engine/state";
1
+ import { RootState } from '../../engine/state';
2
2
  import { FormatTableOptions } from './utils';
3
3
  export declare function createCode(state: RootState): string;
4
4
  export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
@@ -1,4 +1,4 @@
1
- import { RootState } from "../../engine/state";
2
- import { Table } from "../../internal-types";
1
+ import { RootState } from '../../engine/state';
2
+ import { Table } from '../../internal-types';
3
3
  export declare function createGeneratorCode(state: RootState): string;
4
4
  export declare function createGeneratorCodeTable(state: RootState, table: Table): string;
@@ -1,4 +1,4 @@
1
- import { RootState } from "../../engine/state";
1
+ import { RootState } from '../../engine/state';
2
2
  import { FormatTableOptions } from './utils';
3
3
  export declare function createCode(state: RootState): string;
4
4
  export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
@@ -1,4 +1,4 @@
1
- import { RootState } from "../../engine/state";
1
+ import { RootState } from '../../engine/state';
2
2
  import { FormatTableOptions } from './utils';
3
3
  export declare function createCode(state: RootState): string;
4
4
  export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
@@ -1,4 +1,4 @@
1
- import { RootState } from "../../engine/state";
1
+ import { RootState } from '../../engine/state';
2
2
  import { FormatTableOptions } from './utils';
3
3
  export declare function createCode(state: RootState): string;
4
4
  export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
@@ -1,4 +1,4 @@
1
- import { RootState } from "../../engine/state";
1
+ import { RootState } from '../../engine/state';
2
2
  import { FormatTableOptions } from './utils';
3
3
  export declare function createCode(state: RootState): string;
4
4
  export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
@@ -1,4 +1,4 @@
1
- import { RootState } from "../../engine/state";
1
+ import { RootState } from '../../engine/state';
2
2
  import { FormatTableOptions } from './utils';
3
3
  export declare function createCode(state: RootState): string;
4
4
  export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
@@ -1,5 +1,5 @@
1
- import { DataTypeHint, PrimitiveType } from "../../constants/sql/dataType";
2
- import { Column, Table } from "../../internal-types";
1
+ import { DataTypeHint, PrimitiveType } from '../../constants/sql/dataType';
2
+ import { Column, Table } from '../../internal-types';
3
3
  export interface FormatTableOptions {
4
4
  buffer: string[];
5
5
  table: Table;
@@ -1,4 +1,4 @@
1
- import { Emitter } from "./emitter";
1
+ import { Emitter } from './emitter';
2
2
  export declare const globalEmitter: Emitter<{
3
3
  openColorPicker: {
4
4
  x: number;
@@ -27,4 +27,7 @@ export declare const globalEmitter: Emitter<{
27
27
  setThemeOptions: Partial<import("../themes/radix-ui-theme").ThemeOptions>;
28
28
  mouseTrackerStart: void;
29
29
  mouseTrackerEnd: void;
30
+ openDiffViewer: {
31
+ value: string;
32
+ };
30
33
  }>;
@@ -1,4 +1,4 @@
1
- import { EntityMeta, Memo, Point, Settings, Table } from "../internal-types";
1
+ import { EntityMeta, Memo, Point, Settings, Table } from '../internal-types';
2
2
  export declare const nextZIndex: (tables: Table[], memos: Memo[]) => number;
3
3
  export declare function nextPoint({ width, height, zoomLevel, scrollLeft, scrollTop }: Settings, tables: Table[], memos: Memo[]): Point;
4
4
  export declare const toList: <T>(ids: string[], entities: Record<string, T>) => T[];
@@ -1,4 +1,4 @@
1
- import { ValuesType } from "../internal-types";
1
+ import { ValuesType } from '../internal-types';
2
2
  export declare const InternalEventType: {
3
3
  readonly focus: "@dineug/erd-editor/internal-focus";
4
4
  readonly forceFocus: "@dineug/erd-editor/internal-force-focus";
@@ -1,4 +1,4 @@
1
- import { ValuesType } from "../../internal-types";
1
+ import { ValuesType } from '../../internal-types';
2
2
  import { KeyBindingPress } from './utils';
3
3
  export type ShortcutOption = {
4
4
  shortcut: string;
@@ -1,3 +1,3 @@
1
1
  import { Observable } from 'rxjs';
2
- import { Emitter } from "../emitter";
2
+ import { Emitter } from '../emitter';
3
3
  export declare const fromCopy: (emitter: Emitter) => Observable<ClipboardEvent>;
@@ -1,3 +1,3 @@
1
1
  import { Observable } from 'rxjs';
2
- import { Emitter } from "../emitter";
2
+ import { Emitter } from '../emitter';
3
3
  export declare const fromPaste: (emitter: Emitter) => Observable<ClipboardEvent>;
@@ -1,4 +1,4 @@
1
- import { RootState } from "../../engine/state";
1
+ import { RootState } from '../../engine/state';
2
2
  import { FormatIndexOptions, FormatTableOptions } from './utils';
3
3
  export declare function createSchema(state: RootState): string;
4
4
  export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
@@ -1,4 +1,4 @@
1
- import { RootState } from "../../engine/state";
1
+ import { RootState } from '../../engine/state';
2
2
  import { FormatIndexOptions, FormatTableOptions } from './utils';
3
3
  export declare function createSchema(state: RootState): string;
4
4
  export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
@@ -1,4 +1,4 @@
1
- import { RootState } from "../../engine/state";
1
+ import { RootState } from '../../engine/state';
2
2
  import { FormatIndexOptions, FormatTableOptions } from './utils';
3
3
  export declare function createSchema(state: RootState): string;
4
4
  export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
@@ -1,4 +1,4 @@
1
- import { RootState } from "../../engine/state";
1
+ import { RootState } from '../../engine/state';
2
2
  import { FormatIndexOptions, FormatTableOptions } from './utils';
3
3
  export declare function createSchema(state: RootState): string;
4
4
  export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
@@ -1,4 +1,4 @@
1
- import { RootState } from "../../engine/state";
1
+ import { RootState } from '../../engine/state';
2
2
  import { FormatIndexOptions, FormatTableOptions } from './utils';
3
3
  export declare function createSchema(state: RootState): string;
4
4
  export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
@@ -1,4 +1,4 @@
1
- import { RootState } from "../../engine/state";
1
+ import { RootState } from '../../engine/state';
2
2
  import { FormatIndexOptions, FormatTableOptions } from './utils';
3
3
  export declare function createSchema(state: RootState): string;
4
4
  export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
@@ -1,4 +1,4 @@
1
- import { RootState } from "../../engine/state";
2
- import { Table } from "../../internal-types";
1
+ import { RootState } from '../../engine/state';
2
+ import { Table } from '../../internal-types';
3
3
  export declare function createSchemaSQL(state: RootState, database?: number): string;
4
4
  export declare function createSchemaSQLTable(state: RootState, table: Table): string;
@@ -1,4 +1,4 @@
1
- import { Column, Index, Relationship, Table } from "../../internal-types";
1
+ import { Column, Index, Relationship, Table } from '../../internal-types';
2
2
  export interface FormatTableOptions {
3
3
  buffer: string[];
4
4
  table: Table;
@@ -45,7 +45,9 @@ export declare function primaryKeyColumns(columns: Column[]): Column[];
45
45
  export declare function unique(columns: Column[]): boolean;
46
46
  export declare function uniqueColumns(columns: Column[]): Column[];
47
47
  export declare function getBracket(bracketType: number): string;
48
- export declare function orderByNameASC(a: Table, b: Table): 1 | -1 | 0;
48
+ export declare function orderByNameASC<T extends {
49
+ name: string;
50
+ }>(a: T, b: T): 1 | -1 | 0;
49
51
  export declare function autoName<T extends {
50
52
  id: string;
51
53
  name: string;
@@ -1,3 +1,3 @@
1
1
  import { ERDEditorSchemaV3 } from '@dineug/erd-editor-schema';
2
- import { EngineContext } from "../../engine/context";
2
+ import { EngineContext } from '../../engine/context';
3
3
  export declare function schemaSQLParserToSchemaJson(sql: string, ctx: EngineContext, prepare?: (schema: ERDEditorSchemaV3) => ERDEditorSchemaV3): string;
@@ -1,3 +1,3 @@
1
- import { RootState } from "../../engine/state";
1
+ import { RootState } from '../../engine/state';
2
2
  export declare function tableCopyToText(state: RootState): string;
3
3
  export declare function tableCopyToHtml(state: RootState): string;
@@ -1,4 +1,4 @@
1
- import { ValuesType } from "../../internal-types";
1
+ import { ValuesType } from '../../internal-types';
2
2
  export type Cell = [CellType | '', string];
3
3
  export type Row = Cell[];
4
4
  export declare const CellType: {
@@ -1,4 +1,4 @@
1
- import { RootState } from "../../engine/state";
2
- import { Column } from "../../internal-types";
1
+ import { RootState } from '../../engine/state';
2
+ import { Column } from '../../internal-types';
3
3
  export declare function tablePasteFromTextToColumns({ settings: { show, columnOrder } }: RootState, text: string): Column[];
4
4
  export declare function tablePasteFromHtmlToColumns({ settings: { show, columnOrder } }: RootState, html: string): Column[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dineug/erd-editor",
3
- "version": "3.1.8",
3
+ "version": "3.2.1",
4
4
  "description": "Entity-Relationship Diagram Editor",
5
5
  "type": "module",
6
6
  "main": "./dist/erd-editor.js",
@@ -46,7 +46,9 @@
46
46
  "dev": "vite serve --mode lib",
47
47
  "dev:storybook": "storybook dev -p 6006",
48
48
  "build": "vite build --mode lib",
49
- "build:storybook": "storybook build"
49
+ "build:storybook": "storybook build",
50
+ "nx:dev": "nx dev",
51
+ "nx:build": "nx build"
50
52
  },
51
53
  "devDependencies": {
52
54
  "@dineug/erd-editor-schema": "workspace:*",
@@ -64,13 +66,13 @@
64
66
  "@mdi/js": "7.3.67",
65
67
  "@radix-ui/colors": "3.0.0",
66
68
  "@rollup/plugin-typescript": "^11.1.5",
67
- "@storybook/addon-essentials": "^7.6.5",
68
- "@storybook/addon-interactions": "^7.6.5",
69
- "@storybook/addon-links": "^7.6.5",
70
- "@storybook/blocks": "^7.6.5",
71
- "@storybook/html": "^7.6.5",
72
- "@storybook/html-vite": "^7.6.5",
73
- "@storybook/testing-library": "^0.2.2",
69
+ "@storybook/addon-essentials": "^8.0.0",
70
+ "@storybook/addon-interactions": "^8.0.0",
71
+ "@storybook/addon-links": "^8.0.0",
72
+ "@storybook/blocks": "^8.0.0",
73
+ "@storybook/html": "^8.0.0",
74
+ "@storybook/html-vite": "^8.0.0",
75
+ "@storybook/test": "^8.0.0",
74
76
  "@types/color": "^3.0.6",
75
77
  "@types/d3": "7.4.3",
76
78
  "@types/highlight-words-core": "^1.2.3",
@@ -89,12 +91,11 @@
89
91
  "rollup-plugin-visualizer": "^5.11.0",
90
92
  "rxjs": "^7.8.1",
91
93
  "stats.js": "^0.17.0",
92
- "storybook": "^7.6.5",
94
+ "storybook": "^8.0.0",
93
95
  "tinykeys": "^2.1.0",
94
- "ts-patch": "^3.1.1",
95
96
  "tslib": "^2.6.2",
96
97
  "typescript": "5.3.3",
97
- "typescript-transform-paths": "^3.4.6",
98
- "vite": "^5.0.12"
98
+ "vite": "^5.0.12",
99
+ "vite-plugin-dts": "^3.7.3"
99
100
  }
100
101
  }