@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,6 +1,6 @@
1
- import { ActionMap, ActionType } from "../actions";
2
- import { FocusType } from "../state";
3
- import { RootState } from "../../../state";
1
+ import { ActionMap, ActionType } from '../actions';
2
+ import { FocusType } from '../state';
3
+ import { RootState } from '../../../state';
4
4
  type Payload = ActionMap[typeof ActionType.focusMoveTable];
5
5
  export declare function isColumns({ collections, editor: { focusTable } }: RootState): boolean;
6
6
  export declare function isLastColumn(state: RootState): boolean;
@@ -1,7 +1,7 @@
1
1
  import { Reducer } from '@dineug/r-html';
2
- import { EngineContext } from "../../context";
3
- import { RootState } from "../../state";
4
- import { ValuesType } from "../../../internal-types";
2
+ import { EngineContext } from '../../context';
3
+ import { RootState } from '../../state';
4
+ import { ValuesType } from '../../../internal-types';
5
5
  export declare const ActionType: {
6
6
  readonly addIndex: "index.add";
7
7
  readonly removeIndex: "index.remove";
@@ -1,4 +1,4 @@
1
- import { GeneratorAction } from "../../generator.actions";
1
+ import { GeneratorAction } from '../../generator.actions';
2
2
  export declare const addIndexAction$: (tableId: string) => GeneratorAction;
3
3
  export declare const changeIndexUniqueAction$: (indexId: string) => GeneratorAction;
4
4
  export declare const actions$: {
@@ -1,4 +1,4 @@
1
- import { PushUndoHistory } from "../../history.actions";
1
+ import { PushUndoHistory } from '../../history.actions';
2
2
  export declare const indexPushUndoHistoryMap: {
3
3
  "index.add": PushUndoHistory;
4
4
  "index.remove": PushUndoHistory;
@@ -1,7 +1,7 @@
1
1
  import { Reducer } from '@dineug/r-html';
2
- import { EngineContext } from "../../context";
3
- import { RootState } from "../../state";
4
- import { ValuesType } from "../../../internal-types";
2
+ import { EngineContext } from '../../context';
3
+ import { RootState } from '../../state';
4
+ import { ValuesType } from '../../../internal-types';
5
5
  export declare const ActionType: {
6
6
  readonly addIndexColumn: "indexColumn.add";
7
7
  readonly removeIndexColumn: "indexColumn.remove";
@@ -1,4 +1,4 @@
1
- import { GeneratorAction } from "../../generator.actions";
1
+ import { GeneratorAction } from '../../generator.actions';
2
2
  export declare const addIndexColumnAction$: (indexId: string, columnId: string) => GeneratorAction;
3
3
  export declare const removeIndexColumnAction$: (indexId: string, columnId: string) => GeneratorAction;
4
4
  export declare const changeIndexColumnOrderTypeAction$: (indexColumnId: string) => GeneratorAction;
@@ -1,4 +1,4 @@
1
- import { PushUndoHistory } from "../../history.actions";
1
+ import { PushUndoHistory } from '../../history.actions';
2
2
  export declare const indexColumnPushUndoHistoryMap: {
3
3
  "indexColumn.add": PushUndoHistory;
4
4
  "indexColumn.remove": PushUndoHistory;
@@ -1,7 +1,7 @@
1
1
  import { Reducer } from '@dineug/r-html';
2
- import { EngineContext } from "../../context";
3
- import { RootState } from "../../state";
4
- import { ValuesType } from "../../../internal-types";
2
+ import { EngineContext } from '../../context';
3
+ import { RootState } from '../../state';
4
+ import { ValuesType } from '../../../internal-types';
5
5
  export declare const ActionType: {
6
6
  readonly addMemo: "memo.add";
7
7
  readonly moveMemo: "memo.move";
@@ -1,4 +1,4 @@
1
- import { GeneratorAction } from "../../generator.actions";
1
+ import { GeneratorAction } from '../../generator.actions';
2
2
  export declare const addMemoAction$: () => GeneratorAction;
3
3
  export declare const removeMemoAction$: (id?: string) => GeneratorAction;
4
4
  export declare const selectMemoAction$: (id: string, $mod: boolean) => GeneratorAction;
@@ -1,4 +1,4 @@
1
- import { PushStreamHistory, PushUndoHistory } from "../../history.actions";
1
+ import { PushStreamHistory, PushUndoHistory } from '../../history.actions';
2
2
  export declare const memoPushUndoHistoryMap: {
3
3
  "memo.add": PushUndoHistory;
4
4
  "memo.remove": PushUndoHistory;
@@ -1,7 +1,7 @@
1
1
  import { Reducer } from '@dineug/r-html';
2
- import { EngineContext } from "../../context";
3
- import { RootState } from "../../state";
4
- import { ValuesType } from "../../../internal-types";
2
+ import { EngineContext } from '../../context';
3
+ import { RootState } from '../../state';
4
+ import { ValuesType } from '../../../internal-types';
5
5
  export declare const ActionType: {
6
6
  readonly addRelationship: "relationship.add";
7
7
  readonly removeRelationship: "relationship.remove";
@@ -1,4 +1,4 @@
1
- import { PushUndoHistory } from "../../history.actions";
1
+ import { PushUndoHistory } from '../../history.actions';
2
2
  export declare const relationshipPushUndoHistoryMap: {
3
3
  "relationship.add": PushUndoHistory;
4
4
  "relationship.remove": PushUndoHistory;
@@ -1,2 +1,2 @@
1
- import type { Hook } from "../../hooks";
1
+ import type { Hook } from '../../hooks';
2
2
  export declare const hooks: Hook[];
@@ -1,7 +1,7 @@
1
1
  import { Reducer } from '@dineug/r-html';
2
- import { EngineContext } from "../../context";
3
- import { RootState } from "../../state";
4
- import { ValuesType } from "../../../internal-types";
2
+ import { EngineContext } from '../../context';
3
+ import { RootState } from '../../state';
4
+ import { ValuesType } from '../../../internal-types';
5
5
  export declare const ActionType: {
6
6
  readonly changeDatabaseName: "settings.changeDatabaseName";
7
7
  readonly resize: "settings.resize";
@@ -1,4 +1,4 @@
1
- import { GeneratorAction } from "../../generator.actions";
1
+ import { GeneratorAction } from '../../generator.actions';
2
2
  export declare const changeZoomLevelAction$: (value: number) => GeneratorAction;
3
3
  export declare const streamZoomLevelAction$: (value: number) => GeneratorAction;
4
4
  export declare const actions$: {
@@ -1,4 +1,4 @@
1
- import { PushStreamHistory, PushUndoHistory } from "../../history.actions";
1
+ import { PushStreamHistory, PushUndoHistory } from '../../history.actions';
2
2
  export declare const settingsPushUndoHistoryMap: {
3
3
  "settings.resize": PushUndoHistory;
4
4
  "settings.scrollTo": PushUndoHistory;
@@ -1,7 +1,7 @@
1
1
  import { Reducer } from '@dineug/r-html';
2
- import { EngineContext } from "../../context";
3
- import { RootState } from "../../state";
4
- import { ValuesType } from "../../../internal-types";
2
+ import { EngineContext } from '../../context';
3
+ import { RootState } from '../../state';
4
+ import { ValuesType } from '../../../internal-types';
5
5
  export declare const ActionType: {
6
6
  readonly addTable: "table.add";
7
7
  readonly moveTable: "table.move";
@@ -1,5 +1,5 @@
1
- import { GeneratorAction } from "../../generator.actions";
2
- import { Column } from "../../../internal-types";
1
+ import { GeneratorAction } from '../../generator.actions';
2
+ import { Column } from '../../../internal-types';
3
3
  export declare const addTableAction$: () => GeneratorAction;
4
4
  export declare const removeTableAction$: (id?: string) => GeneratorAction;
5
5
  export declare const selectTableAction$: (id: string, $mod: boolean) => GeneratorAction;
@@ -1,4 +1,4 @@
1
- import { PushStreamHistory, PushUndoHistory } from "../../history.actions";
1
+ import { PushStreamHistory, PushUndoHistory } from '../../history.actions';
2
2
  export declare const tablePushUndoHistoryMap: {
3
3
  "table.add": PushUndoHistory;
4
4
  "table.remove": PushUndoHistory;
@@ -1,2 +1,2 @@
1
- import type { Hook } from "../../hooks";
1
+ import type { Hook } from '../../hooks';
2
2
  export declare const hooks: Hook[];
@@ -1,7 +1,7 @@
1
1
  import { Reducer } from '@dineug/r-html';
2
- import { EngineContext } from "../../context";
3
- import { RootState } from "../../state";
4
- import { ValuesType } from "../../../internal-types";
2
+ import { EngineContext } from '../../context';
3
+ import { RootState } from '../../state';
4
+ import { ValuesType } from '../../../internal-types';
5
5
  export declare const ActionType: {
6
6
  readonly addColumn: "column.add";
7
7
  readonly removeColumn: "column.remove";
@@ -1,5 +1,5 @@
1
- import { GeneratorAction } from "../../generator.actions";
2
- import { FocusType } from "../editor/state";
1
+ import { GeneratorAction } from '../../generator.actions';
2
+ import { FocusType } from '../editor/state';
3
3
  import { ChangeColumnValuePayload } from './actions';
4
4
  export declare const isToggleColumnTypes: (value: FocusType) => boolean;
5
5
  export declare const isChangeColumnTypes: (value: FocusType) => boolean;
@@ -1,4 +1,4 @@
1
- import { PushUndoHistory } from "../../history.actions";
1
+ import { PushUndoHistory } from '../../history.actions';
2
2
  export declare const tableColumnPushUndoHistoryMap: {
3
3
  "column.add": PushUndoHistory;
4
4
  "column.remove": PushUndoHistory;
@@ -1,2 +1,2 @@
1
- import type { Hook } from "../../hooks";
1
+ import type { Hook } from '../../hooks';
2
2
  export declare const hooks: Hook[];
@@ -1,3 +1,3 @@
1
- import { ChangeColumnValuePayload } from "../actions";
2
- import { RootState } from "../../../state";
1
+ import { ChangeColumnValuePayload } from '../actions';
2
+ import { RootState } from '../../../state';
3
3
  export declare function getDataTypeSyncColumns(stack: ChangeColumnValuePayload[], state: RootState, payload: ChangeColumnValuePayload, payloads?: ChangeColumnValuePayload[]): ChangeColumnValuePayload[];
@@ -1,6 +1,6 @@
1
1
  import { AnyAction } from '@dineug/r-html';
2
- import { EngineContext } from "./context";
3
- import { Unsubscribe, ValuesType } from "../internal-types";
2
+ import { EngineContext } from './context';
3
+ import { Unsubscribe, ValuesType } from '../internal-types';
4
4
  type ReducerRecord = {
5
5
  [P in keyof InternalActionMap]: (payload: InternalActionMap[P]) => void;
6
6
  };
@@ -1,10 +1,17 @@
1
1
  import { AnyAction } from '@dineug/r-html';
2
2
  import { Observable } from 'rxjs';
3
- import { EngineContext } from "./context";
4
- import { Store } from "./store";
3
+ import { EngineContext } from './context';
4
+ import { History, HistoryOptions } from './history';
5
+ import { Store } from './store';
5
6
  export type RxStore = Store & {
6
7
  undo: () => void;
7
8
  redo: () => void;
9
+ history: History;
8
10
  change$: Observable<Array<AnyAction>>;
9
11
  };
10
- export declare function createRxStore(context: EngineContext, getReadonly?: () => boolean): RxStore;
12
+ export type RxStoreOptions = {
13
+ getReadonly?: () => boolean;
14
+ getHistory?: (options: HistoryOptions) => History;
15
+ };
16
+ export declare const HISTORY_LIMIT = 2048;
17
+ export declare function createRxStore(context: EngineContext, { getReadonly, getHistory }?: RxStoreOptions): RxStore;
@@ -1,6 +1,6 @@
1
1
  import { AnyAction } from '@dineug/r-html';
2
- import { RxStore } from "./rx-store";
3
- import { Unsubscribe } from "../internal-types";
2
+ import { RxStore } from './rx-store';
3
+ import { Unsubscribe } from '../internal-types';
4
4
  export type SharedStore = {
5
5
  connection: () => void;
6
6
  disconnect: () => void;
@@ -1,5 +1,5 @@
1
1
  import { ERDEditorSchemaV3 } from '@dineug/erd-editor-schema';
2
- import { Editor } from "./modules/editor/state";
2
+ import { Editor } from './modules/editor/state';
3
3
  export type RootState = ERDEditorSchemaV3 & {
4
4
  editor: Editor;
5
5
  };
@@ -1,4 +1,4 @@
1
- import type { Store } from "./store";
1
+ import type { Store } from './store';
2
2
  export declare function createHooks(store: Store): {
3
3
  destroy: () => void;
4
4
  };
@@ -1,5 +1,5 @@
1
1
  import { Store as StoreType } from '@dineug/r-html';
2
- import { EngineContext } from "./context";
3
- import { RootState } from "./state";
2
+ import { EngineContext } from './context';
3
+ import { RootState } from './state';
4
4
  export type Store = StoreType<RootState, EngineContext>;
5
5
  export declare function createStore(context: EngineContext, enableObservable?: boolean): Store;
@@ -1,5 +1,5 @@
1
1
  import { AnyAction, CompositionActions } from '@dineug/r-html';
2
- import { GeneratorAction } from "./generator.actions";
2
+ import { GeneratorAction } from './generator.actions';
3
3
  export declare const Tag: {
4
4
  readonly shared: 1;
5
5
  readonly changeOnly: 2;
package/dist/engine.js CHANGED
@@ -1,7 +1,7 @@
1
- import { D as A, E as w, u as x, O as E, F as l, J as I, p as G, bs as d, I as p, Y as O, c_ as T, br as $, aA as j, d4 as k, d5 as F, U as J, d6 as R, cS as V } from "./schemaGCService-Cyip5lJB.js";
1
+ import { D as A, E as w, u as x, O as E, G as d, K as G, p as I, bs as l, J as p, Y as O, d0 as T, br as V, aB as $, d5 as j, d6 as k, V as J, d7 as R, cU as z } from "./schemaGCService-tEI4URA5.js";
2
2
  /*!
3
3
  * @dineug/erd-editor
4
- * @version 3.1.8 | Sun Jan 28 2024
4
+ * @version 3.2.1 | Wed Mar 20 2024
5
5
  * @author SeungHwan-Lee <dineug2@gmail.com>
6
6
  * @license MIT
7
7
  */
@@ -9,7 +9,7 @@ const b = {
9
9
  change: "change"
10
10
  };
11
11
  function D(u) {
12
- const o = /* @__PURE__ */ new Set(), t = A(u, !1), S = w(t), c = new x(), m = new E((e) => t.subscribe((a) => e.next(a))).pipe(l(p), I(200)), n = /* @__PURE__ */ new Set(), f = new V(), g = (e) => (n.has(e) || n.add(e), () => {
12
+ const o = /* @__PURE__ */ new Set(), t = A(u, !1), m = w(t), c = new x(), S = new E((e) => t.subscribe((a) => e.next(a))).pipe(d(p), G(200)), n = /* @__PURE__ */ new Set(), f = new z(), g = (e) => (n.has(e) || n.add(e), () => {
13
13
  n.delete(e);
14
14
  }), i = (e, a) => {
15
15
  n.forEach((s) => {
@@ -18,19 +18,19 @@ function D(u) {
18
18
  });
19
19
  }, y = (e) => {
20
20
  const a = T(e);
21
- t.dispatchSync($(j(a) ? "{}" : a)), f.run(d(t.state)).then((s) => {
22
- (s.tableIds.length || s.tableColumnIds.length || s.relationshipIds.length || s.indexIds.length || s.indexColumnIds.length || s.memoIds.length) && (k(t.state, s), t.dispatchSync(F()), i(b.change, void 0));
21
+ t.dispatchSync(V($(a) ? "{}" : a)), f.run(l(t.state)).then((s) => {
22
+ (s.tableIds.length || s.tableColumnIds.length || s.relationshipIds.length || s.indexIds.length || s.indexColumnIds.length || s.memoIds.length) && (j(t.state, s), t.dispatchSync(k()), i(b.change, void 0));
23
23
  });
24
24
  }, r = (e) => {
25
25
  c.next([e].flat());
26
26
  }, v = (e) => {
27
27
  J(() => r(e));
28
28
  }, C = () => {
29
- Array.from(o).forEach((e) => e.unsubscribe()), o.clear(), n.clear(), t.destroy(), S.destroy();
29
+ Array.from(o).forEach((e) => e.unsubscribe()), o.clear(), n.clear(), t.destroy(), m.destroy();
30
30
  };
31
- return o.add(m.subscribe(() => i(b.change, void 0))).add(c.pipe(l(p), G((e) => e.map((a) => R(a, "tags")))).subscribe(t.dispatchSync)), Object.freeze({
31
+ return o.add(S.subscribe(() => i(b.change, void 0))).add(c.pipe(d(p), I((e) => e.map((a) => R(a, "tags")))).subscribe(t.dispatchSync)), Object.freeze({
32
32
  get value() {
33
- return d(t.state);
33
+ return l(t.state);
34
34
  },
35
35
  on: g,
36
36
  setInitialValue: y,