@dineug/erd-editor 3.2.0 → 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 (167) hide show
  1. package/README.md +2 -2
  2. package/dist/components/appContext.d.ts +7 -7
  3. package/dist/components/customElementRegistry.d.ts +0 -1
  4. package/dist/components/erd/automatic-table-placement/AutomaticTablePlacement.d.ts +1 -1
  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 +1 -1
  19. package/dist/components/erd/diff-viewer/diff.d.ts +2 -2
  20. package/dist/components/erd/diff-viewer/erd-viewer/ErdViewer.d.ts +2 -2
  21. package/dist/components/erd/diff-viewer/tree-viewer/TreeViewer.d.ts +2 -2
  22. package/dist/components/erd/erd-context-menu/ErdContextMenu.d.ts +1 -1
  23. package/dist/components/erd/erd-context-menu/menus/databaseMenus.d.ts +1 -1
  24. package/dist/components/erd/erd-context-menu/menus/drawRelationshipMenus.d.ts +2 -2
  25. package/dist/components/erd/erd-context-menu/menus/exportMenus.d.ts +1 -1
  26. package/dist/components/erd/erd-context-menu/menus/importMenus.d.ts +1 -1
  27. package/dist/components/erd/erd-context-menu/menus/relationshipMenus.d.ts +1 -1
  28. package/dist/components/erd/erd-context-menu/menus/showMenus.d.ts +1 -1
  29. package/dist/components/erd/erdShortcutPerformCheck.d.ts +1 -1
  30. package/dist/components/erd/minimap/memo/Memo.d.ts +1 -1
  31. package/dist/components/erd/minimap/table/Table.d.ts +1 -1
  32. package/dist/components/erd/minimap/useMinimapScroll.d.ts +1 -1
  33. package/dist/components/erd/table-properties/table-properties-indexes/indexes-checkbox-column/IndexesCheckboxColumn.d.ts +1 -1
  34. package/dist/components/erd/table-properties/table-properties-indexes/indexes-column/IndexesColumn.d.ts +1 -1
  35. package/dist/components/erd/table-properties/table-properties-indexes/indexes-index/IndexesIndex.d.ts +1 -1
  36. package/dist/components/erd/table-properties/table-properties-tabs/TablePropertiesTabs.d.ts +1 -1
  37. package/dist/components/erd/time-travel/TimeTravel.d.ts +9 -0
  38. package/dist/components/erd/time-travel/TimeTravel.styles.d.ts +4 -0
  39. package/dist/components/erd/useErdShortcut.d.ts +1 -1
  40. package/dist/components/erd/virtual-scroll/useVirtualScroll.d.ts +1 -1
  41. package/dist/components/erd-editor/ErdEditor.d.ts +5 -5
  42. package/dist/components/erd-editor/ErdEditor.stories.d.ts +0 -1
  43. package/dist/components/erd-editor/useErdEditorAttachElement.d.ts +4 -4
  44. package/dist/components/generator-code/generator-code-context-menu/menus/columnNameCaseMenus.d.ts +1 -1
  45. package/dist/components/generator-code/generator-code-context-menu/menus/languageMenus.d.ts +1 -1
  46. package/dist/components/generator-code/generator-code-context-menu/menus/tableNameCaseMenus.d.ts +1 -1
  47. package/dist/components/primitives/code-block/CodeBlock.d.ts +1 -1
  48. package/dist/components/primitives/color-picker/ColorPicker.d.ts +1 -1
  49. package/dist/components/primitives/context-menu/context-menu-root/contextMenuRootContext.d.ts +1 -1
  50. package/dist/components/primitives/icon/icons.d.ts +1 -1
  51. package/dist/components/primitives/sash/Sash.d.ts +2 -2
  52. package/dist/components/primitives/slider/Slider.d.ts +9 -0
  53. package/dist/components/primitives/slider/Slider.stories.d.ts +23 -0
  54. package/dist/components/primitives/slider/Slider.styles.d.ts +4 -0
  55. package/dist/components/quick-search/actions.d.ts +1 -1
  56. package/dist/components/schema-sql/schema-sql-context-menu/menus/bracketMenus.d.ts +1 -1
  57. package/dist/components/settings/settings-lnb/SettingsLnb.d.ts +1 -1
  58. package/dist/components/theme/Theme.d.ts +1 -1
  59. package/dist/components/theme-builder/ThemeBuilder.d.ts +1 -1
  60. package/dist/components/visualization/createVisualization.d.ts +1 -1
  61. package/dist/components/visualization/table/Table.d.ts +1 -1
  62. package/dist/components/visualization/table/column/Column.d.ts +1 -1
  63. package/dist/constants/open.d.ts +2 -1
  64. package/dist/constants/sql/dataType/MSSQL.d.ts +1 -1
  65. package/dist/constants/sql/dataType/MariaDB.d.ts +1 -1
  66. package/dist/constants/sql/dataType/MySQL.d.ts +1 -1
  67. package/dist/constants/sql/dataType/Oracle.d.ts +1 -1
  68. package/dist/constants/sql/dataType/PostgreSQL.d.ts +1 -1
  69. package/dist/constants/sql/dataType/SQLite.d.ts +1 -1
  70. package/dist/constants/sql/dataType/index.d.ts +1 -1
  71. package/dist/constants/sql/database.d.ts +1 -1
  72. package/dist/engine/actions.d.ts +24 -24
  73. package/dist/engine/generator.actions.d.ts +2 -2
  74. package/dist/engine/history.actions.d.ts +3 -3
  75. package/dist/engine/history.d.ts +24 -10
  76. package/dist/engine/hooks.d.ts +2 -2
  77. package/dist/engine/modules/editor/actions.d.ts +3 -3
  78. package/dist/engine/modules/editor/generator.actions.d.ts +2 -2
  79. package/dist/engine/modules/editor/history.d.ts +1 -1
  80. package/dist/engine/modules/editor/state.d.ts +1 -1
  81. package/dist/engine/modules/editor/utils/focus.d.ts +3 -3
  82. package/dist/engine/modules/index/actions.d.ts +3 -3
  83. package/dist/engine/modules/index/generator.actions.d.ts +1 -1
  84. package/dist/engine/modules/index/history.d.ts +1 -1
  85. package/dist/engine/modules/index-column/actions.d.ts +3 -3
  86. package/dist/engine/modules/index-column/generator.actions.d.ts +1 -1
  87. package/dist/engine/modules/index-column/history.d.ts +1 -1
  88. package/dist/engine/modules/memo/actions.d.ts +3 -3
  89. package/dist/engine/modules/memo/generator.actions.d.ts +1 -1
  90. package/dist/engine/modules/memo/history.d.ts +1 -1
  91. package/dist/engine/modules/relationship/actions.d.ts +3 -3
  92. package/dist/engine/modules/relationship/history.d.ts +1 -1
  93. package/dist/engine/modules/relationship/hooks.d.ts +1 -1
  94. package/dist/engine/modules/settings/actions.d.ts +3 -3
  95. package/dist/engine/modules/settings/generator.actions.d.ts +1 -1
  96. package/dist/engine/modules/settings/history.d.ts +1 -1
  97. package/dist/engine/modules/table/actions.d.ts +3 -3
  98. package/dist/engine/modules/table/generator.actions.d.ts +2 -2
  99. package/dist/engine/modules/table/history.d.ts +1 -1
  100. package/dist/engine/modules/table/hooks.d.ts +1 -1
  101. package/dist/engine/modules/table-column/actions.d.ts +3 -3
  102. package/dist/engine/modules/table-column/generator.actions.d.ts +2 -2
  103. package/dist/engine/modules/table-column/history.d.ts +1 -1
  104. package/dist/engine/modules/table-column/hooks.d.ts +1 -1
  105. package/dist/engine/modules/table-column/utils/dataType.d.ts +2 -2
  106. package/dist/engine/replication-store.d.ts +2 -2
  107. package/dist/engine/rx-store.d.ts +10 -3
  108. package/dist/engine/shared-store.d.ts +2 -2
  109. package/dist/engine/state.d.ts +1 -1
  110. package/dist/engine/store-hooks.d.ts +1 -1
  111. package/dist/engine/store.d.ts +2 -2
  112. package/dist/engine/tag.d.ts +1 -1
  113. package/dist/engine.js +8 -8
  114. package/dist/erd-editor.js +6950 -6738
  115. package/dist/hooks/useKeyBindingMap.d.ts +1 -1
  116. package/dist/hooks/useUnmounted.d.ts +1 -1
  117. package/dist/index.d.ts +4 -5
  118. package/dist/{schemaGCService-8ppNbFYF.js → schemaGCService-tEI4URA5.js} +21 -21
  119. package/dist/services/schema-gc/procGC.d.ts +1 -1
  120. package/dist/services/schema-gc/schemaGCService.d.ts +1 -1
  121. package/dist/themes/radix-ui-theme.config.d.ts +1 -1
  122. package/dist/themes/radix-ui-theme.d.ts +2 -2
  123. package/dist/utils/calcMemo.d.ts +1 -1
  124. package/dist/utils/calcTable.d.ts +3 -3
  125. package/dist/utils/collection/index.entity.d.ts +1 -1
  126. package/dist/utils/collection/indexColumn.entity.d.ts +1 -1
  127. package/dist/utils/collection/memo.entity.d.ts +1 -1
  128. package/dist/utils/collection/relationship.entity.d.ts +1 -1
  129. package/dist/utils/collection/table.entity.d.ts +1 -1
  130. package/dist/utils/collection/tableColumn.entity.d.ts +1 -1
  131. package/dist/utils/dragSelect.d.ts +1 -1
  132. package/dist/utils/draw-relationship/calc.d.ts +3 -3
  133. package/dist/utils/draw-relationship/draw.d.ts +3 -3
  134. package/dist/utils/draw-relationship/index.d.ts +1 -1
  135. package/dist/utils/draw-relationship/pathFinding.d.ts +2 -2
  136. package/dist/utils/draw-relationship/sort.d.ts +1 -1
  137. package/dist/utils/emitter.d.ts +2 -2
  138. package/dist/utils/file/importFile.d.ts +1 -1
  139. package/dist/utils/focus.d.ts +1 -1
  140. package/dist/utils/generator-code/csharp.d.ts +1 -1
  141. package/dist/utils/generator-code/graphql.d.ts +1 -1
  142. package/dist/utils/generator-code/index.d.ts +2 -2
  143. package/dist/utils/generator-code/java.d.ts +1 -1
  144. package/dist/utils/generator-code/jpa.d.ts +1 -1
  145. package/dist/utils/generator-code/kotlin.d.ts +1 -1
  146. package/dist/utils/generator-code/scala.d.ts +1 -1
  147. package/dist/utils/generator-code/typescript.d.ts +1 -1
  148. package/dist/utils/generator-code/utils.d.ts +2 -2
  149. package/dist/utils/globalEmitter.d.ts +1 -1
  150. package/dist/utils/index.d.ts +1 -1
  151. package/dist/utils/internalEvents.d.ts +1 -1
  152. package/dist/utils/keyboard-shortcut/index.d.ts +1 -1
  153. package/dist/utils/rx-operators/fromCopy.d.ts +1 -1
  154. package/dist/utils/rx-operators/fromPaste.d.ts +1 -1
  155. package/dist/utils/schema-sql/MSSQL.d.ts +1 -1
  156. package/dist/utils/schema-sql/MariaDB.d.ts +1 -1
  157. package/dist/utils/schema-sql/MySQL.d.ts +1 -1
  158. package/dist/utils/schema-sql/Oracle.d.ts +1 -1
  159. package/dist/utils/schema-sql/PostgreSQL.d.ts +1 -1
  160. package/dist/utils/schema-sql/SQLite.d.ts +1 -1
  161. package/dist/utils/schema-sql/index.d.ts +2 -2
  162. package/dist/utils/schema-sql/utils.d.ts +1 -1
  163. package/dist/utils/schema-sql-parser/index.d.ts +1 -1
  164. package/dist/utils/table-clipboard/copy.d.ts +1 -1
  165. package/dist/utils/table-clipboard/index.d.ts +1 -1
  166. package/dist/utils/table-clipboard/paste.d.ts +2 -2
  167. package/package.json +14 -13
@@ -1,4 +1,4 @@
1
- import { DataTypeHint } from "./";
1
+ import { DataTypeHint } from '.';
2
2
  /**
3
3
  * https://www.postgresql.org/docs/current/datatype.html
4
4
  */
@@ -1,4 +1,4 @@
1
- import { DataTypeHint } from "./";
1
+ import { DataTypeHint } from '.';
2
2
  /**
3
3
  * https://www.sqlite.org/datatype3.html
4
4
  */
@@ -1,4 +1,4 @@
1
- import { ValuesType } from "../../../internal-types";
1
+ import { ValuesType } from '../../../internal-types';
2
2
  export declare const PrimitiveType: {
3
3
  readonly int: "int";
4
4
  readonly long: "long";
@@ -1,4 +1,4 @@
1
- import { ValuesType } from "../../internal-types";
1
+ import { ValuesType } from '../../internal-types';
2
2
  export declare const DatabaseVendor: {
3
3
  readonly MariaDB: "MariaDB";
4
4
  readonly MSSQL: "MSSQL";
@@ -1,27 +1,27 @@
1
- import { ActionMap as EditorActionMap } from "./modules/editor/actions";
2
- import { actions as editorActions } from "./modules/editor/atom.actions";
3
- import { actions$ as editorActions$ } from "./modules/editor/generator.actions";
4
- import { ActionMap as IndexActionMap } from "./modules/index/actions";
5
- import { actions as indexActions } from "./modules/index/atom.actions";
6
- import { actions$ as indexActions$ } from "./modules/index/generator.actions";
7
- import { ActionMap as IndexColumnActionMap } from "./modules/index-column/actions";
8
- import { actions as indexColumnActions } from "./modules/index-column/atom.actions";
9
- import { actions$ as indexColumnActions$ } from "./modules/index-column/generator.actions";
10
- import { ActionMap as MemoActionMap } from "./modules/memo/actions";
11
- import { actions as memoActions } from "./modules/memo/atom.actions";
12
- import { actions$ as memoActions$ } from "./modules/memo/generator.actions";
13
- import { ActionMap as RelationshipActionMap } from "./modules/relationship/actions";
14
- import { actions as relationshipActions } from "./modules/relationship/atom.actions";
15
- import { actions$ as relationshipActions$ } from "./modules/relationship/generator.actions";
16
- import { ActionMap as SettingsActionMap } from "./modules/settings/actions";
17
- import { actions as settingsActions } from "./modules/settings/atom.actions";
18
- import { actions$ as settingsActions$ } from "./modules/settings/generator.actions";
19
- import { ActionMap as TableActionMap } from "./modules/table/actions";
20
- import { actions as tableActions } from "./modules/table/atom.actions";
21
- import { actions$ as tableActions$ } from "./modules/table/generator.actions";
22
- import { ActionMap as TableColumnActionMap } from "./modules/table-column/actions";
23
- import { actions as tableColumnActions } from "./modules/table-column/atom.actions";
24
- import { actions$ as tableColumnActions$ } from "./modules/table-column/generator.actions";
1
+ import { ActionMap as EditorActionMap } from './modules/editor/actions';
2
+ import { actions as editorActions } from './modules/editor/atom.actions';
3
+ import { actions$ as editorActions$ } from './modules/editor/generator.actions';
4
+ import { ActionMap as IndexActionMap } from './modules/index/actions';
5
+ import { actions as indexActions } from './modules/index/atom.actions';
6
+ import { actions$ as indexActions$ } from './modules/index/generator.actions';
7
+ import { ActionMap as IndexColumnActionMap } from './modules/index-column/actions';
8
+ import { actions as indexColumnActions } from './modules/index-column/atom.actions';
9
+ import { actions$ as indexColumnActions$ } from './modules/index-column/generator.actions';
10
+ import { ActionMap as MemoActionMap } from './modules/memo/actions';
11
+ import { actions as memoActions } from './modules/memo/atom.actions';
12
+ import { actions$ as memoActions$ } from './modules/memo/generator.actions';
13
+ import { ActionMap as RelationshipActionMap } from './modules/relationship/actions';
14
+ import { actions as relationshipActions } from './modules/relationship/atom.actions';
15
+ import { actions$ as relationshipActions$ } from './modules/relationship/generator.actions';
16
+ import { ActionMap as SettingsActionMap } from './modules/settings/actions';
17
+ import { actions as settingsActions } from './modules/settings/atom.actions';
18
+ import { actions$ as settingsActions$ } from './modules/settings/generator.actions';
19
+ import { ActionMap as TableActionMap } from './modules/table/actions';
20
+ import { actions as tableActions } from './modules/table/atom.actions';
21
+ import { actions$ as tableActions$ } from './modules/table/generator.actions';
22
+ import { ActionMap as TableColumnActionMap } from './modules/table-column/actions';
23
+ import { actions as tableColumnActions } from './modules/table-column/atom.actions';
24
+ import { actions$ as tableColumnActions$ } from './modules/table-column/generator.actions';
25
25
  export type Actions = typeof editorActions & typeof editorActions$ & typeof indexActions & typeof indexActions$ & typeof indexColumnActions & typeof indexColumnActions$ & typeof memoActions & typeof memoActions$ & typeof relationshipActions & typeof relationshipActions$ & typeof settingsActions & typeof settingsActions$ & typeof tableActions & typeof tableActions$ & typeof tableColumnActions & typeof tableColumnActions$;
26
26
  export type RootActionMap = EditorActionMap & TableActionMap & TableColumnActionMap & MemoActionMap & RelationshipActionMap & SettingsActionMap & IndexActionMap & IndexColumnActionMap;
27
27
  export type ActionType = keyof RootActionMap;
@@ -1,4 +1,4 @@
1
1
  import { AnyAction, GeneratorActionCreator } 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 GeneratorAction = GeneratorActionCreator<AnyAction, RootState, EngineContext>;
@@ -1,7 +1,7 @@
1
1
  import { AnyAction } from '@dineug/r-html';
2
- import { History } from "./history";
3
- import { RootState } from "./state";
4
- import { Store } from "./store";
2
+ import { History } from './history';
3
+ import { RootState } from './state';
4
+ import { Store } from './store';
5
5
  export type PushUndoHistory = (undoActions: AnyAction[], action: AnyAction, state: RootState) => void;
6
6
  export type PushStreamHistory = (undoActions: AnyAction[], redoActions: AnyAction[], actions: AnyAction[]) => void;
7
7
  export declare const pushUndoHistoryMap: Record<string, PushUndoHistory>;
@@ -1,20 +1,34 @@
1
+ import { AnyAction } from '@dineug/r-html';
2
+ type Dispatch = (actions: AnyAction[]) => void;
1
3
  export type Command = {
2
- undo(): void;
3
- redo(): void;
4
+ undo: (dispatch: Dispatch) => void;
5
+ redo: (dispatch: Dispatch) => void;
4
6
  };
5
7
  export type CommandKey = keyof Command;
6
8
  export type History = {
7
- hasUndo(): boolean;
8
- hasRedo(): boolean;
9
- undo(): void;
10
- redo(): void;
11
- push(command: Command): void;
12
- clear(): void;
13
- setLimit(limit: number): void;
9
+ readonly cursor: number;
10
+ readonly size: number;
11
+ hasUndo: () => boolean;
12
+ hasRedo: () => boolean;
13
+ undo: () => void;
14
+ redo: () => void;
15
+ push: (command: Command) => void;
16
+ clear: () => void;
17
+ setLimit: (limit: number) => void;
18
+ clone: (options: HistoryOptions) => History;
14
19
  };
15
20
  type HasHistory = {
16
21
  hasRedo: boolean;
17
22
  hasUndo: boolean;
18
23
  };
19
- export declare function createHistory(notify: (has: HasHistory) => void): History;
24
+ export type HistoryOptions = {
25
+ notify: (has: HasHistory) => void;
26
+ dispatch: Dispatch;
27
+ };
28
+ type HistoryState = {
29
+ commands: Command[];
30
+ cursor: number;
31
+ limit: number;
32
+ };
33
+ export declare function createHistory({ notify, dispatch }: HistoryOptions, initialState?: HistoryState): History;
20
34
  export {};
@@ -1,7 +1,7 @@
1
1
  import type { Channel, CoroutineCreator } from '@dineug/go';
2
2
  import { type AnyAction, createAction } from '@dineug/r-html';
3
- import type { EngineContext } from "./context";
4
- import type { RootState } from "./state";
3
+ import type { EngineContext } from './context';
4
+ import type { RootState } from './state';
5
5
  type ActionCreator = ReturnType<typeof createAction<any>>;
6
6
  export type CO = (channel: Channel<AnyAction>, state: RootState, ctx: EngineContext) => ReturnType<CoroutineCreator>;
7
7
  export type Hook = [Array<ActionCreator | string>, CO];
@@ -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
  import { FocusType, MoveKey, SelectType } from './state';
6
6
  export declare const ActionType: {
7
7
  readonly changeHasHistory: "editor.changeHasHistory";
@@ -1,5 +1,5 @@
1
- import { GeneratorAction } from "../../generator.actions";
2
- import { Rect } from "../../../utils/dragSelect";
1
+ import { GeneratorAction } from '../../generator.actions';
2
+ import { Rect } from '../../../utils/dragSelect';
3
3
  import { MoveKey } from './state';
4
4
  export declare const loadJsonAction$: (value: string) => GeneratorAction;
5
5
  export declare const initialLoadJsonAction$: (value: string) => GeneratorAction;
@@ -1,4 +1,4 @@
1
- import { PushUndoHistory } from "../../history.actions";
1
+ import { PushUndoHistory } from '../../history.actions';
2
2
  export declare const editorPushUndoHistoryMap: {
3
3
  "editor.loadJson": PushUndoHistory;
4
4
  "editor.clear": PushUndoHistory;
@@ -1,4 +1,4 @@
1
- import { Point, ValuesType } from "../../../internal-types";
1
+ import { Point, ValuesType } from '../../../internal-types';
2
2
  export type Editor = {
3
3
  id: string;
4
4
  selectedMap: Record<string, SelectType>;
@@ -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,15 +1,15 @@
1
- import { D as A, E as w, u as x, O as E, F as d, J as I, p as G, bs as l, I as p, Y as O, d0 as T, br as $, aB as j, d5 as k, d6 as F, U as J, d7 as R, cU as U } from "./schemaGCService-8ppNbFYF.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.2.0 | Fri Feb 09 2024
4
+ * @version 3.2.1 | Wed Mar 20 2024
5
5
  * @author SeungHwan-Lee <dineug2@gmail.com>
6
6
  * @license MIT
7
7
  */
8
8
  const b = {
9
9
  change: "change"
10
10
  };
11
- function z(u) {
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), I(200)), n = /* @__PURE__ */ new Set(), f = new U(), g = (e) => (n.has(e) || n.add(e), () => {
11
+ function D(u) {
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,8 +18,8 @@ function z(u) {
18
18
  });
19
19
  }, y = (e) => {
20
20
  const a = T(e);
21
- t.dispatchSync($(j(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) && (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());
@@ -28,7 +28,7 @@ function z(u) {
28
28
  }, C = () => {
29
29
  Array.from(o).forEach((e) => e.unsubscribe()), o.clear(), n.clear(), t.destroy(), m.destroy();
30
30
  };
31
- return o.add(S.subscribe(() => i(b.change, void 0))).add(c.pipe(d(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
33
  return l(t.state);
34
34
  },
@@ -40,5 +40,5 @@ function z(u) {
40
40
  });
41
41
  }
42
42
  export {
43
- z as createReplicationStore
43
+ D as createReplicationStore
44
44
  };