@dineug/erd-editor 3.3.1 → 3.5.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 (212) hide show
  1. package/README.md +197 -17
  2. package/dist/components/appContext.d.ts +8 -1
  3. package/dist/components/erd/automatic-table-placement/createAutomaticTablePlacement.d.ts +17 -1
  4. package/dist/components/erd/canvas/Canvas.d.ts +5 -0
  5. package/dist/components/erd/canvas/Canvas.styles.d.ts +11 -0
  6. package/dist/components/erd/canvas/CanvasScene.d.ts +18 -0
  7. package/dist/components/erd/canvas/EditOverlay.d.ts +8 -0
  8. package/dist/components/erd/canvas/EditOverlay.styles.d.ts +6 -0
  9. package/dist/components/erd/canvas/SceneIcon.template.d.ts +21 -0
  10. package/dist/components/erd/canvas/altDragDuplicate.d.ts +3 -0
  11. package/dist/components/erd/canvas/drag-select/DragSelect.d.ts +11 -0
  12. package/dist/components/erd/canvas/duplicate-ghost/DuplicateGhost.d.ts +9 -0
  13. package/dist/components/erd/canvas/entityDrag.d.ts +4 -0
  14. package/dist/components/erd/canvas/high-level-table/HighLevelTable.d.ts +4 -0
  15. package/dist/components/erd/canvas/memo/Memo.d.ts +2 -0
  16. package/dist/components/erd/canvas/memo/memo-sash/MemoSash.d.ts +11 -1
  17. package/dist/components/erd/canvas/memo/memoCaret.d.ts +26 -0
  18. package/dist/components/erd/canvas/memo/memoScroll.d.ts +28 -0
  19. package/dist/components/erd/canvas/memo/memoText.d.ts +33 -0
  20. package/dist/components/erd/canvas/memo/useMoveMemo.d.ts +6 -0
  21. package/dist/components/erd/canvas/relationship-group/RelationshipGroup.d.ts +15 -0
  22. package/dist/components/erd/canvas/relationship-group/relationship/Relationship.template.d.ts +17 -0
  23. package/dist/components/erd/canvas/sceneHit.d.ts +18 -0
  24. package/dist/components/erd/canvas/sceneKind.d.ts +11 -0
  25. package/dist/components/erd/canvas/sceneRetention.d.ts +31 -0
  26. package/dist/components/erd/canvas/sceneTokens.d.ts +67 -0
  27. package/dist/components/erd/canvas/shared-drag-select/SharedDragSelect.d.ts +8 -0
  28. package/dist/components/erd/canvas/shared-mouse-tracker/SharedMouseTracker.d.ts +1 -0
  29. package/dist/components/erd/canvas/shared-mouse-tracker/shared-mouse-cursor/SharedMouseCursor.d.ts +5 -0
  30. package/dist/components/erd/canvas/table/Table.d.ts +8 -0
  31. package/dist/components/erd/canvas/table/cellLayout.d.ts +63 -0
  32. package/dist/components/erd/canvas/table/column/Column.d.ts +23 -6
  33. package/dist/components/erd/canvas/table/doubleClick.d.ts +14 -0
  34. package/dist/components/erd/canvas/table/useMoveTable.d.ts +1 -1
  35. package/dist/components/erd/canvas/table/useSharedFocusTable.d.ts +6 -0
  36. package/dist/components/erd/canvas/useMoveEntity.d.ts +18 -0
  37. package/dist/components/erd/canvas/useSharedSelectEntity.d.ts +4 -0
  38. package/dist/components/erd/erd-context-menu/ErdContextMenu.d.ts +1 -2
  39. package/dist/components/erd/erd-context-menu/menus/drawRelationshipMenus.d.ts +3 -2
  40. package/dist/components/erd/erd-context-menu/menus/exportMenus.d.ts +7 -6
  41. package/dist/components/erd/erd-context-menu/menus/importMenus.d.ts +6 -6
  42. package/dist/components/erd/erd-context-menu/menus/relationshipMenus.d.ts +1 -1
  43. package/dist/components/erd/hide-sign/hideSignBounds.d.ts +9 -0
  44. package/dist/components/erd/hitTest.d.ts +22 -0
  45. package/dist/components/erd/minimap/Minimap.styles.d.ts +0 -1
  46. package/dist/components/erd/minimap/MinimapScene.d.ts +16 -0
  47. package/dist/components/erd/minimap/memo/Memo.d.ts +5 -0
  48. package/dist/components/erd/minimap/minimapGeometry.d.ts +52 -0
  49. package/dist/components/erd/minimap/table/Table.d.ts +5 -0
  50. package/dist/components/erd/table-properties/table-properties-indexes/indexes-checkbox-column/IndexesCheckboxColumn.d.ts +1 -1
  51. package/dist/components/erd/virtual-scroll/useVirtualScroll.d.ts +19 -0
  52. package/dist/components/erd-editor/ErdEditor.d.ts +4 -0
  53. package/dist/components/erd-editor/ErdEditor.stories.d.ts +1 -1
  54. package/dist/components/global-styles/GlobalStyles.d.ts +5 -0
  55. package/dist/components/primitives/button/Button.stories.d.ts +4 -4
  56. package/dist/components/primitives/code-block/CodeBlock.stories.d.ts +4 -4
  57. package/dist/components/primitives/code-block/CodeBlock.styles.d.ts +6 -1
  58. package/dist/components/primitives/color-picker/ColorPicker.d.ts +1 -1
  59. package/dist/components/primitives/color-picker/ColorPicker.stories.d.ts +1 -1
  60. package/dist/components/primitives/context-menu/ContextMenu.stories.d.ts +1 -1
  61. package/dist/components/primitives/context-menu/context-menu-item/ContextMenuItem.d.ts +1 -1
  62. package/dist/components/primitives/context-menu/menu/Menu.d.ts +2 -2
  63. package/dist/components/primitives/edit-input/EditInput.d.ts +2 -2
  64. package/dist/components/primitives/edit-input/EditInput.stories.d.ts +6 -6
  65. package/dist/components/primitives/highlighted-text/HighlightedText.stories.d.ts +1 -1
  66. package/dist/components/primitives/icon/Icon.d.ts +2 -3
  67. package/dist/components/primitives/icon/Icon.stories.d.ts +3 -1
  68. package/dist/components/primitives/icon/icons.d.ts +95 -26
  69. package/dist/components/primitives/kbd/Kbd.stories.d.ts +3 -3
  70. package/dist/components/primitives/sash/Sash.stories.d.ts +6 -6
  71. package/dist/components/primitives/separator/Separator.stories.d.ts +3 -3
  72. package/dist/components/primitives/slider/Slider.stories.d.ts +4 -4
  73. package/dist/components/primitives/switch/Switch.stories.d.ts +3 -3
  74. package/dist/components/primitives/text-input/TextInput.d.ts +1 -1
  75. package/dist/components/primitives/text-input/TextInput.stories.d.ts +7 -7
  76. package/dist/components/primitives/toast/Toast.d.ts +4 -0
  77. package/dist/components/primitives/toast/Toast.stories.d.ts +17 -4
  78. package/dist/components/primitives/toast/Toast.styles.d.ts +5 -0
  79. package/dist/components/{erd/canvas/table → table-view}/column/column-data-type/ColumnDataType.d.ts +4 -4
  80. package/dist/components/{erd/canvas/table → table-view}/column/column-not-null/ColumnNotNull.d.ts +1 -1
  81. package/dist/components/{erd/canvas/table → table-view}/column/column-option/ColumnOption.d.ts +1 -1
  82. package/dist/components/table-view/column/useColumnCell.d.ts +23 -0
  83. package/dist/components/themeContext.d.ts +9 -0
  84. package/dist/components/toast-container/openToastWhileRunning.d.ts +11 -0
  85. package/dist/components/visualization/Visualization.d.ts +6 -0
  86. package/dist/components/visualization/Visualization.styles.d.ts +6 -0
  87. package/dist/components/visualization/VisualizationScene.d.ts +21 -0
  88. package/dist/components/visualization/createVisualization.d.ts +67 -8
  89. package/dist/components/visualization/graph-node/GraphNode.d.ts +23 -0
  90. package/dist/components/visualization/table/Table.d.ts +0 -1
  91. package/dist/components/visualization/table/column/Column.d.ts +0 -1
  92. package/dist/components/visualization/visualizationView.d.ts +90 -0
  93. package/dist/constants/language.d.ts +7 -1
  94. package/dist/constants/layout.d.ts +13 -0
  95. package/dist/constants/schema.d.ts +12 -3
  96. package/dist/constants/sql/dataType/Databricks.d.ts +5 -0
  97. package/dist/constants/sql/dataType/MSSQL.d.ts +1 -1
  98. package/dist/constants/sql/dataType/MySQL.d.ts +1 -1
  99. package/dist/constants/sql/dataType/Oracle.d.ts +1 -1
  100. package/dist/constants/sql/dataType/Snowflake.d.ts +5 -0
  101. package/dist/constants/sql/database.d.ts +2 -0
  102. package/dist/engine/history.d.ts +5 -3
  103. package/dist/engine/hooks.d.ts +3 -3
  104. package/dist/engine/modules/editor/actions.d.ts +30 -1
  105. package/dist/engine/modules/editor/atom.actions.d.ts +131 -0
  106. package/dist/engine/modules/editor/generator.actions.d.ts +18 -0
  107. package/dist/engine/modules/editor/state.d.ts +43 -0
  108. package/dist/engine/modules/editor/utils/duplicate.d.ts +13 -0
  109. package/dist/engine/modules/memo/actions.d.ts +3 -0
  110. package/dist/engine/modules/memo/atom.actions.d.ts +12 -0
  111. package/dist/engine/modules/settings/atom.actions.d.ts +24 -0
  112. package/dist/engine/modules/table/actions.d.ts +1 -0
  113. package/dist/engine/modules/table/atom.actions.d.ts +4 -0
  114. package/dist/engine.js +40 -51
  115. package/dist/erd-editor.js +40775 -26895
  116. package/dist/konva/batchDraw.d.ts +41 -0
  117. package/dist/konva/host.d.ts +29 -0
  118. package/dist/konva/scene/columnDropTarget.d.ts +13 -0
  119. package/dist/konva/scene/konvaFlip.d.ts +18 -0
  120. package/dist/konva/scene/metrics.d.ts +29 -0
  121. package/dist/konva/scene/renderScene.d.ts +34 -0
  122. package/dist/konva/scene/viewport.d.ts +38 -0
  123. package/dist/konva/testHandle.d.ts +22 -0
  124. package/dist/konva/theme.d.ts +31 -0
  125. package/dist/konva/workerDomStubs.d.ts +1 -0
  126. package/dist/schemaGCService-DrlqIen8.js +17549 -0
  127. package/dist/services/export-png/ExportScene.d.ts +9 -0
  128. package/dist/services/export-png/documentScene.d.ts +20 -0
  129. package/dist/services/export-png/exportPng.shared-worker.d.ts +0 -0
  130. package/dist/services/export-png/exportPngService.d.ts +24 -0
  131. package/dist/services/export-png/index.d.ts +48 -0
  132. package/dist/services/export-png/pixelRatio.d.ts +21 -0
  133. package/dist/services/export-png/renderPng.d.ts +37 -0
  134. package/dist/services/export-png/textWidth.d.ts +27 -0
  135. package/dist/services/schema-gc/index.d.ts +5 -0
  136. package/dist/services/shikiService.d.ts +1 -1
  137. package/dist/styles/colorPicker.style.d.ts +6 -1
  138. package/dist/styles/fonts.styles.d.ts +2 -1
  139. package/dist/styles/reset.styles.d.ts +5 -1
  140. package/dist/styles/scrollbar.styles.d.ts +6 -1
  141. package/dist/styles/typography.styles.d.ts +2 -1
  142. package/dist/themes/radix-ui-theme.d.ts +1 -1
  143. package/dist/themes/tokens.d.ts +6 -2
  144. package/dist/utils/calcTable.d.ts +7 -0
  145. package/dist/utils/draw-relationship/chamfer.d.ts +2 -0
  146. package/dist/utils/draw-relationship/incremental.d.ts +70 -0
  147. package/dist/utils/draw-relationship/index.d.ts +78 -14
  148. package/dist/utils/draw-relationship/nudge.d.ts +4 -0
  149. package/dist/utils/draw-relationship/pathFinding.d.ts +7 -1
  150. package/dist/utils/draw-relationship/route.d.ts +27 -0
  151. package/dist/utils/draw-relationship/stub.d.ts +36 -0
  152. package/dist/utils/emitter.d.ts +32 -0
  153. package/dist/utils/file/exportFile.d.ts +10 -1
  154. package/dist/utils/file/importFile.d.ts +4 -1
  155. package/dist/utils/focus.d.ts +5 -3
  156. package/dist/utils/generator-code/aml.d.ts +4 -0
  157. package/dist/utils/generator-code/dbml.d.ts +4 -0
  158. package/dist/utils/generator-code/drizzle.d.ts +4 -0
  159. package/dist/utils/generator-code/go.d.ts +4 -0
  160. package/dist/utils/generator-code/sequelize.d.ts +4 -0
  161. package/dist/utils/generator-code/sqlalchemy.d.ts +4 -0
  162. package/dist/utils/generator-code/typeorm.d.ts +4 -0
  163. package/dist/utils/globalEventObservable.d.ts +13 -12
  164. package/dist/utils/icon.d.ts +9 -1
  165. package/dist/utils/keyboard-shortcut/index.d.ts +7 -1
  166. package/dist/utils/promise.d.ts +1 -0
  167. package/dist/utils/schema-aml-parser/convert.d.ts +4 -0
  168. package/dist/utils/schema-aml-parser/dataType.d.ts +12 -0
  169. package/dist/utils/schema-aml-parser/index.d.ts +3 -0
  170. package/dist/utils/schema-aml-parser/parser.d.ts +2 -0
  171. package/dist/utils/schema-aml-parser/tokenizer.d.ts +23 -0
  172. package/dist/utils/schema-aml-parser/types.d.ts +78 -0
  173. package/dist/utils/schema-dbml-parser/convert.d.ts +4 -0
  174. package/dist/utils/schema-dbml-parser/dataType.d.ts +7 -0
  175. package/dist/utils/schema-dbml-parser/index.d.ts +3 -0
  176. package/dist/utils/schema-dbml-parser/parser.d.ts +2 -0
  177. package/dist/utils/schema-dbml-parser/tokenizer.d.ts +16 -0
  178. package/dist/utils/schema-dbml-parser/types.d.ts +62 -0
  179. package/dist/utils/schema-graphql-parser/convert.d.ts +4 -0
  180. package/dist/utils/schema-graphql-parser/dataType.d.ts +7 -0
  181. package/dist/utils/schema-graphql-parser/index.d.ts +3 -0
  182. package/dist/utils/schema-graphql-parser/parser.d.ts +2 -0
  183. package/dist/utils/schema-graphql-parser/types.d.ts +58 -0
  184. package/dist/utils/schema-sql/Databricks.d.ts +5 -0
  185. package/dist/utils/schema-sql/Snowflake.d.ts +5 -0
  186. package/dist/utils/sharedColor.d.ts +2 -0
  187. package/dist/utils/table-clipboard/copy.d.ts +7 -0
  188. package/dist/utils/table-clipboard/index.d.ts +2 -0
  189. package/dist/utils/table-clipboard/paste.d.ts +3 -0
  190. package/dist/utils/table-clipboard/payload.d.ts +83 -0
  191. package/dist/utils/table-clipboard/placement.d.ts +30 -0
  192. package/dist/utils/validation.d.ts +1 -0
  193. package/package.json +34 -29
  194. package/dist/components/erd/canvas/canvas-svg/CanvasSvg.d.ts +0 -7
  195. package/dist/components/erd/canvas/canvas-svg/relationship/Relationship.template.d.ts +0 -3
  196. package/dist/components/erd/canvas/draw-relationship/DrawRelationship.styles.d.ts +0 -1
  197. package/dist/components/erd/canvas/high-level-table/HighLevelTable.styles.d.ts +0 -1
  198. package/dist/components/erd/canvas/memo/Memo.styles.d.ts +0 -6
  199. package/dist/components/erd/canvas/shared-mouse-tracker/shared-mouse-cursor/SharedMouseCursor.styles.d.ts +0 -1
  200. package/dist/components/erd/canvas/table/column/Column.styles.d.ts +0 -2
  201. package/dist/components/erd/drag-select/DragSelect.d.ts +0 -9
  202. package/dist/components/erd/drag-select/DragSelect.styles.d.ts +0 -1
  203. package/dist/schemaGCService-Br6jn6B2.js +0 -15866
  204. /package/dist/components/erd/canvas/{canvas-svg → relationship-group}/relationship/Relationship.d.ts +0 -0
  205. /package/dist/components/{erd/canvas/table → table-view}/Table.styles.d.ts +0 -0
  206. /package/dist/components/{erd/canvas/canvas-svg/CanvasSvg.styles.d.ts → table-view/column/Column.styles.d.ts} +0 -0
  207. /package/dist/components/{erd/canvas/table → table-view}/column/column-data-type/ColumnDataType.styles.d.ts +0 -0
  208. /package/dist/components/{erd/canvas/table → table-view}/column/column-key/ColumnKey.d.ts +0 -0
  209. /package/dist/components/{erd/canvas/table → table-view}/column/column-key/ColumnKey.styles.d.ts +0 -0
  210. /package/dist/components/{erd/canvas/table → table-view}/column/column-not-null/ColumnNotNull.styles.d.ts +0 -0
  211. /package/dist/components/{erd/canvas/table → table-view}/column/column-option/ColumnOption.styles.d.ts +0 -0
  212. /package/dist/{services/schema-gc/schemaGC.worker.d.ts → konva/jsx-types.test-d.d.ts} +0 -0
@@ -1,4 +1,5 @@
1
1
  import { Point, ValuesType } from '../../../internal-types';
2
+ import { Rect } from '../../../utils/dragSelect';
2
3
  export type Editor = {
3
4
  id: string;
4
5
  selectedMap: Record<string, SelectType>;
@@ -6,6 +7,14 @@ export type Editor = {
6
7
  hasRedo: boolean;
7
8
  viewport: Viewport;
8
9
  focusTable: FocusTable | null;
10
+ /** The memo whose body an overlay editor is open on, and null while none is. */
11
+ editMemoId: string | null;
12
+ /**
13
+ * How far down its body each memo is shown from, by memo id. The scene and
14
+ * the overlay editor both read it, so the lines a body shows survive the
15
+ * editor opening and closing over it. Local to this client, never the file.
16
+ */
17
+ memoScrollTopMap: Record<string, number>;
9
18
  drawRelationship: DrawRelationship | null;
10
19
  hoverColumnMap: Record<string, boolean>;
11
20
  hoverRelationshipMap: Record<string, boolean>;
@@ -13,6 +22,10 @@ export type Editor = {
13
22
  draggableColumn: DraggableColumn | null;
14
23
  draggingColumnMap: Record<string, boolean>;
15
24
  sharedMouseTrackerMap: Record<string, SharedMouseTracker>;
25
+ sharedFocusTrackerMap: Record<string, SharedFocusTracker>;
26
+ sharedSelectionTrackerMap: Record<string, SharedSelectionTracker>;
27
+ sharedDragSelectTrackerMap: Record<string, SharedDragSelectTracker>;
28
+ dragSelect: Rect | null;
16
29
  };
17
30
  export type Viewport = {
18
31
  width: number;
@@ -44,6 +57,24 @@ export type SharedMouseTracker = {
44
57
  nickname: string;
45
58
  timeoutId: any;
46
59
  };
60
+ export type SharedFocus = {
61
+ tableId: string;
62
+ columnId: string | null;
63
+ focusType: FocusType;
64
+ };
65
+ export type SharedFocusTracker = SharedFocus & {
66
+ id: string;
67
+ timeoutId: any;
68
+ };
69
+ export type SharedSelectionTracker = {
70
+ id: string;
71
+ selectedIds: string[];
72
+ timeoutId: any;
73
+ };
74
+ export type SharedDragSelectTracker = Rect & {
75
+ id: string;
76
+ timeoutId: any;
77
+ };
47
78
  export declare const SelectType: {
48
79
  readonly table: "table";
49
80
  readonly memo: "memo";
@@ -70,4 +101,16 @@ export declare const MoveKey: {
70
101
  };
71
102
  export type MoveKey = ValuesType<typeof MoveKey>;
72
103
  export declare const hasMoveKeys: (value: string) => boolean;
104
+ /**
105
+ * Whether the memo body editor owns the keyboard. Its textarea covers no grid,
106
+ * so the traversal and edit keys a focused table would otherwise answer belong
107
+ * to the caret for as long as it is open.
108
+ */
109
+ export declare const isEditingMemo: ({ editMemoId }: Editor) => boolean;
110
+ /**
111
+ * Whether a live text editor owns the keyboard. A memo body and a table cell
112
+ * both open a real input over the scene, so a canvas shortcut stands down for
113
+ * either of them rather than for the cell alone.
114
+ */
115
+ export declare const isEditingText: (editor: Editor) => boolean;
73
116
  export declare const createEditor: () => Editor;
@@ -0,0 +1,13 @@
1
+ import { AnyAction } from '@dineug/r-html';
2
+ import { ClipboardColumn, ClipboardMemo, ClipboardTable, PlacementPoint } from '../../../../utils/table-clipboard';
3
+ export type CreateEntityInput = {
4
+ tables: ClipboardTable[];
5
+ columns: ClipboardColumn[];
6
+ memos: ClipboardMemo[];
7
+ };
8
+ export type CreateEntityActions = {
9
+ actions: AnyAction[];
10
+ tableIds: string[];
11
+ memoIds: string[];
12
+ };
13
+ export declare function toCreateEntityActions({ tables, columns, memos }: CreateEntityInput, placement: Map<string, PlacementPoint>): CreateEntityActions;
@@ -20,6 +20,9 @@ export type ActionMap = {
20
20
  x: number;
21
21
  y: number;
22
22
  zIndex: number;
23
+ color?: string;
24
+ width?: number;
25
+ height?: number;
23
26
  };
24
27
  };
25
28
  [ActionType.moveMemo]: {
@@ -6,6 +6,9 @@ export declare const addMemoAction: {
6
6
  x: number;
7
7
  y: number;
8
8
  zIndex: number;
9
+ color?: string;
10
+ width?: number;
11
+ height?: number;
9
12
  };
10
13
  }): import('@dineug/r-html').AnyAction<{
11
14
  id: string;
@@ -13,6 +16,9 @@ export declare const addMemoAction: {
13
16
  x: number;
14
17
  y: number;
15
18
  zIndex: number;
19
+ color?: string;
20
+ width?: number;
21
+ height?: number;
16
22
  };
17
23
  }>;
18
24
  toString(): string;
@@ -123,6 +129,9 @@ export declare const actions: {
123
129
  x: number;
124
130
  y: number;
125
131
  zIndex: number;
132
+ color?: string;
133
+ width?: number;
134
+ height?: number;
126
135
  };
127
136
  }): import('@dineug/r-html').AnyAction<{
128
137
  id: string;
@@ -130,6 +139,9 @@ export declare const actions: {
130
139
  x: number;
131
140
  y: number;
132
141
  zIndex: number;
142
+ color?: string;
143
+ width?: number;
144
+ height?: number;
133
145
  };
134
146
  }>;
135
147
  toString(): string;
@@ -1,3 +1,5 @@
1
+ import { Viewport } from '../editor/state';
2
+ import { Settings } from '../../../internal-types';
1
3
  import { ReducerType } from './actions';
2
4
  export declare const changeDatabaseNameAction: {
3
5
  (payload: {
@@ -37,6 +39,28 @@ export declare const streamZoomLevelAction: {
37
39
  toString(): string;
38
40
  type: string;
39
41
  };
42
+ /** How far the scroll may travel on one axis, measured in screen pixels. */
43
+ export type ScrollRange = {
44
+ min: number;
45
+ max: number;
46
+ };
47
+ export type ScrollRanges = {
48
+ left: ScrollRange;
49
+ top: ScrollRange;
50
+ };
51
+ /** The canvas box and the zoom that draws it, which is all a range needs. */
52
+ export type ScrollTransform = Pick<Settings, 'width' | 'height' | 'zoomLevel'>;
53
+ /**
54
+ * How far the scroll may travel on each axis. A scene layer sits at the scroll
55
+ * plus the zoom viewport offset, so magnifying reaches further both ways, while
56
+ * shrinking closes the travel in by the zoom instead of leaving the box's own.
57
+ */
58
+ export declare function getScrollRanges(settings: ScrollTransform, viewport: Viewport): ScrollRanges;
59
+ /** The clamps every reducer that writes a scroll offset shares. */
60
+ export declare function createScrollInRange(settings: ScrollTransform, viewport: Viewport): {
61
+ scrollLeftInRange: (num: number) => number;
62
+ scrollTopInRange: (num: number) => number;
63
+ };
40
64
  export declare const scrollToAction: {
41
65
  (payload: {
42
66
  scrollTop: number;
@@ -21,6 +21,7 @@ export type ActionMap = {
21
21
  x: number;
22
22
  y: number;
23
23
  zIndex: number;
24
+ color?: string;
24
25
  };
25
26
  };
26
27
  [ActionType.moveTable]: {
@@ -6,6 +6,7 @@ export declare const addTableAction: {
6
6
  x: number;
7
7
  y: number;
8
8
  zIndex: number;
9
+ color?: string;
9
10
  };
10
11
  }): import('@dineug/r-html').AnyAction<{
11
12
  id: string;
@@ -13,6 +14,7 @@ export declare const addTableAction: {
13
14
  x: number;
14
15
  y: number;
15
16
  zIndex: number;
17
+ color?: string;
16
18
  };
17
19
  }>;
18
20
  toString(): string;
@@ -123,6 +125,7 @@ export declare const actions: {
123
125
  x: number;
124
126
  y: number;
125
127
  zIndex: number;
128
+ color?: string;
126
129
  };
127
130
  }): import('@dineug/r-html').AnyAction<{
128
131
  id: string;
@@ -130,6 +133,7 @@ export declare const actions: {
130
133
  x: number;
131
134
  y: number;
132
135
  zIndex: number;
136
+ color?: string;
133
137
  };
134
138
  }>;
135
139
  toString(): string;
package/dist/engine.js CHANGED
@@ -1,53 +1,42 @@
1
- import { Z as x, D as w, E as A, w as E, O as G, F as d, J as I, s as O, bv as h, I as l, Y as T, V, d6 as $, bu as j, aB as k, cX as F, da as J, db as R, dc as z } from "./schemaGCService-Br6jn6B2.js";
2
1
  /*!
3
- * @dineug/erd-editor
4
- * @version 3.3.1 | Sat Aug 08 2026
5
- * @author SeungHwan-Lee <dineug2@gmail.com>
6
- * @license MIT
7
- */
8
- const B = {
9
- change: "change"
10
- };
11
- function H(p) {
12
- const o = /* @__PURE__ */ new Set(), b = x(p), t = w(b, !1), u = A(t), c = new E(), m = new G(
13
- (e) => t.subscribe((n) => e.next(n))
14
- ).pipe(d(l), I(200)), a = /* @__PURE__ */ new Set(), S = new F(), g = (e) => (a.has(e) || a.add(e), () => {
15
- a.delete(e);
16
- }), f = (e, n) => {
17
- a.forEach((s) => {
18
- const r = Reflect.get(s, e);
19
- T(r, n);
20
- });
21
- }, y = (e) => {
22
- const n = $(e);
23
- t.dispatchSync(
24
- j(k(n) ? "{}" : n)
25
- ), S.run(h(t.state)).then((s) => {
26
- (s.tableIds.length || s.tableColumnIds.length || s.relationshipIds.length || s.indexIds.length || s.indexColumnIds.length || s.memoIds.length) && (J(t.state, s), t.dispatchSync(R()));
27
- });
28
- }, i = (e) => {
29
- c.next([e].flat());
30
- }, C = (e) => {
31
- V(() => i(e));
32
- }, v = () => {
33
- Array.from(o).forEach((e) => e.unsubscribe()), o.clear(), a.clear(), t.destroy(), u.destroy();
34
- };
35
- return o.add(m.subscribe(() => f(B.change, void 0))).add(
36
- c.pipe(
37
- d(l),
38
- O((e) => e.map((n) => z(n, "tags")))
39
- ).subscribe(t.dispatchSync)
40
- ), Object.freeze({
41
- get value() {
42
- return h(t.state);
43
- },
44
- on: g,
45
- setInitialValue: y,
46
- dispatch: C,
47
- dispatchSync: i,
48
- destroy: v
49
- });
2
+ * @dineug/erd-editor
3
+ * @version 3.5.0 | Sat Sep 05 2026
4
+ * @author SeungHwan-Lee <dineug2@gmail.com>
5
+ * @license MIT
6
+ */
7
+ import { Ai as e, Fi as t, Kn as n, Qr as r, Ri as i, Wi as a, _ as o, b as s, h as c, i as l, ii as u, n as d, t as f, ti as p, u as m, ut as h, vi as g, wr as _, xi as v } from "./schemaGCService-DrlqIen8.js";
8
+ //#region src/engine/replication-store.ts
9
+ var y = { change: "change" };
10
+ function b(b) {
11
+ let x = /* @__PURE__ */ new Set(), S = o(b), C = m(S, !1), w = l(C), T = new g(), E = new v((e) => C.subscribe((t) => e.next(t))).pipe(c(s), p(200)), D = /* @__PURE__ */ new Set(), O = new f(), k = (e) => (D.has(e) || D.add(e), () => {
12
+ D.delete(e);
13
+ }), A = (e, t) => {
14
+ D.forEach((n) => {
15
+ let r = Reflect.get(n, e);
16
+ i(r, t);
17
+ });
18
+ }, j = (t) => {
19
+ let i = _(t);
20
+ C.dispatchSync(h(r(i) ? "{}" : i)), O.run(e(C.state)).then((e) => {
21
+ (e.tableIds.length || e.tableColumnIds.length || e.relationshipIds.length || e.indexIds.length || e.indexColumnIds.length || e.memoIds.length) && (d(C.state, e), C.dispatchSync(n()));
22
+ });
23
+ }, M = (e) => {
24
+ T.next([e].flat());
25
+ };
26
+ return x.add(E.subscribe(() => A(y.change, void 0))).add(T.pipe(c(s), u((e) => e.map((e) => a(e, ["tags"])))).subscribe(C.dispatchSync)), Object.freeze({
27
+ get value() {
28
+ return e(C.state);
29
+ },
30
+ on: k,
31
+ setInitialValue: j,
32
+ dispatch: (e) => {
33
+ t(() => M(e));
34
+ },
35
+ dispatchSync: M,
36
+ destroy: () => {
37
+ Array.from(x).forEach((e) => e.unsubscribe()), x.clear(), D.clear(), C.destroy(), w.destroy();
38
+ }
39
+ });
50
40
  }
51
- export {
52
- H as createReplicationStore
53
- };
41
+ //#endregion
42
+ export { b as createReplicationStore };