@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.
- package/README.md +197 -17
- package/dist/components/appContext.d.ts +8 -1
- package/dist/components/erd/automatic-table-placement/createAutomaticTablePlacement.d.ts +17 -1
- package/dist/components/erd/canvas/Canvas.d.ts +5 -0
- package/dist/components/erd/canvas/Canvas.styles.d.ts +11 -0
- package/dist/components/erd/canvas/CanvasScene.d.ts +18 -0
- package/dist/components/erd/canvas/EditOverlay.d.ts +8 -0
- package/dist/components/erd/canvas/EditOverlay.styles.d.ts +6 -0
- package/dist/components/erd/canvas/SceneIcon.template.d.ts +21 -0
- package/dist/components/erd/canvas/altDragDuplicate.d.ts +3 -0
- package/dist/components/erd/canvas/drag-select/DragSelect.d.ts +11 -0
- package/dist/components/erd/canvas/duplicate-ghost/DuplicateGhost.d.ts +9 -0
- package/dist/components/erd/canvas/entityDrag.d.ts +4 -0
- package/dist/components/erd/canvas/high-level-table/HighLevelTable.d.ts +4 -0
- package/dist/components/erd/canvas/memo/Memo.d.ts +2 -0
- package/dist/components/erd/canvas/memo/memo-sash/MemoSash.d.ts +11 -1
- package/dist/components/erd/canvas/memo/memoCaret.d.ts +26 -0
- package/dist/components/erd/canvas/memo/memoScroll.d.ts +28 -0
- package/dist/components/erd/canvas/memo/memoText.d.ts +33 -0
- package/dist/components/erd/canvas/memo/useMoveMemo.d.ts +6 -0
- package/dist/components/erd/canvas/relationship-group/RelationshipGroup.d.ts +15 -0
- package/dist/components/erd/canvas/relationship-group/relationship/Relationship.template.d.ts +17 -0
- package/dist/components/erd/canvas/sceneHit.d.ts +18 -0
- package/dist/components/erd/canvas/sceneKind.d.ts +11 -0
- package/dist/components/erd/canvas/sceneRetention.d.ts +31 -0
- package/dist/components/erd/canvas/sceneTokens.d.ts +67 -0
- package/dist/components/erd/canvas/shared-drag-select/SharedDragSelect.d.ts +8 -0
- package/dist/components/erd/canvas/shared-mouse-tracker/SharedMouseTracker.d.ts +1 -0
- package/dist/components/erd/canvas/shared-mouse-tracker/shared-mouse-cursor/SharedMouseCursor.d.ts +5 -0
- package/dist/components/erd/canvas/table/Table.d.ts +8 -0
- package/dist/components/erd/canvas/table/cellLayout.d.ts +63 -0
- package/dist/components/erd/canvas/table/column/Column.d.ts +23 -6
- package/dist/components/erd/canvas/table/doubleClick.d.ts +14 -0
- package/dist/components/erd/canvas/table/useMoveTable.d.ts +1 -1
- package/dist/components/erd/canvas/table/useSharedFocusTable.d.ts +6 -0
- package/dist/components/erd/canvas/useMoveEntity.d.ts +18 -0
- package/dist/components/erd/canvas/useSharedSelectEntity.d.ts +4 -0
- package/dist/components/erd/erd-context-menu/ErdContextMenu.d.ts +1 -2
- package/dist/components/erd/erd-context-menu/menus/drawRelationshipMenus.d.ts +3 -2
- package/dist/components/erd/erd-context-menu/menus/exportMenus.d.ts +7 -6
- package/dist/components/erd/erd-context-menu/menus/importMenus.d.ts +6 -6
- package/dist/components/erd/erd-context-menu/menus/relationshipMenus.d.ts +1 -1
- package/dist/components/erd/hide-sign/hideSignBounds.d.ts +9 -0
- package/dist/components/erd/hitTest.d.ts +22 -0
- package/dist/components/erd/minimap/Minimap.styles.d.ts +0 -1
- package/dist/components/erd/minimap/MinimapScene.d.ts +16 -0
- package/dist/components/erd/minimap/memo/Memo.d.ts +5 -0
- package/dist/components/erd/minimap/minimapGeometry.d.ts +52 -0
- package/dist/components/erd/minimap/table/Table.d.ts +5 -0
- package/dist/components/erd/table-properties/table-properties-indexes/indexes-checkbox-column/IndexesCheckboxColumn.d.ts +1 -1
- package/dist/components/erd/virtual-scroll/useVirtualScroll.d.ts +19 -0
- package/dist/components/erd-editor/ErdEditor.d.ts +4 -0
- package/dist/components/erd-editor/ErdEditor.stories.d.ts +1 -1
- package/dist/components/global-styles/GlobalStyles.d.ts +5 -0
- package/dist/components/primitives/button/Button.stories.d.ts +4 -4
- package/dist/components/primitives/code-block/CodeBlock.stories.d.ts +4 -4
- package/dist/components/primitives/code-block/CodeBlock.styles.d.ts +6 -1
- package/dist/components/primitives/color-picker/ColorPicker.d.ts +1 -1
- package/dist/components/primitives/color-picker/ColorPicker.stories.d.ts +1 -1
- package/dist/components/primitives/context-menu/ContextMenu.stories.d.ts +1 -1
- package/dist/components/primitives/context-menu/context-menu-item/ContextMenuItem.d.ts +1 -1
- package/dist/components/primitives/context-menu/menu/Menu.d.ts +2 -2
- package/dist/components/primitives/edit-input/EditInput.d.ts +2 -2
- package/dist/components/primitives/edit-input/EditInput.stories.d.ts +6 -6
- package/dist/components/primitives/highlighted-text/HighlightedText.stories.d.ts +1 -1
- package/dist/components/primitives/icon/Icon.d.ts +2 -3
- package/dist/components/primitives/icon/Icon.stories.d.ts +3 -1
- package/dist/components/primitives/icon/icons.d.ts +95 -26
- package/dist/components/primitives/kbd/Kbd.stories.d.ts +3 -3
- package/dist/components/primitives/sash/Sash.stories.d.ts +6 -6
- package/dist/components/primitives/separator/Separator.stories.d.ts +3 -3
- package/dist/components/primitives/slider/Slider.stories.d.ts +4 -4
- package/dist/components/primitives/switch/Switch.stories.d.ts +3 -3
- package/dist/components/primitives/text-input/TextInput.d.ts +1 -1
- package/dist/components/primitives/text-input/TextInput.stories.d.ts +7 -7
- package/dist/components/primitives/toast/Toast.d.ts +4 -0
- package/dist/components/primitives/toast/Toast.stories.d.ts +17 -4
- package/dist/components/primitives/toast/Toast.styles.d.ts +5 -0
- package/dist/components/{erd/canvas/table → table-view}/column/column-data-type/ColumnDataType.d.ts +4 -4
- package/dist/components/{erd/canvas/table → table-view}/column/column-not-null/ColumnNotNull.d.ts +1 -1
- package/dist/components/{erd/canvas/table → table-view}/column/column-option/ColumnOption.d.ts +1 -1
- package/dist/components/table-view/column/useColumnCell.d.ts +23 -0
- package/dist/components/themeContext.d.ts +9 -0
- package/dist/components/toast-container/openToastWhileRunning.d.ts +11 -0
- package/dist/components/visualization/Visualization.d.ts +6 -0
- package/dist/components/visualization/Visualization.styles.d.ts +6 -0
- package/dist/components/visualization/VisualizationScene.d.ts +21 -0
- package/dist/components/visualization/createVisualization.d.ts +67 -8
- package/dist/components/visualization/graph-node/GraphNode.d.ts +23 -0
- package/dist/components/visualization/table/Table.d.ts +0 -1
- package/dist/components/visualization/table/column/Column.d.ts +0 -1
- package/dist/components/visualization/visualizationView.d.ts +90 -0
- package/dist/constants/language.d.ts +7 -1
- package/dist/constants/layout.d.ts +13 -0
- package/dist/constants/schema.d.ts +12 -3
- package/dist/constants/sql/dataType/Databricks.d.ts +5 -0
- package/dist/constants/sql/dataType/MSSQL.d.ts +1 -1
- package/dist/constants/sql/dataType/MySQL.d.ts +1 -1
- package/dist/constants/sql/dataType/Oracle.d.ts +1 -1
- package/dist/constants/sql/dataType/Snowflake.d.ts +5 -0
- package/dist/constants/sql/database.d.ts +2 -0
- package/dist/engine/history.d.ts +5 -3
- package/dist/engine/hooks.d.ts +3 -3
- package/dist/engine/modules/editor/actions.d.ts +30 -1
- package/dist/engine/modules/editor/atom.actions.d.ts +131 -0
- package/dist/engine/modules/editor/generator.actions.d.ts +18 -0
- package/dist/engine/modules/editor/state.d.ts +43 -0
- package/dist/engine/modules/editor/utils/duplicate.d.ts +13 -0
- package/dist/engine/modules/memo/actions.d.ts +3 -0
- package/dist/engine/modules/memo/atom.actions.d.ts +12 -0
- package/dist/engine/modules/settings/atom.actions.d.ts +24 -0
- package/dist/engine/modules/table/actions.d.ts +1 -0
- package/dist/engine/modules/table/atom.actions.d.ts +4 -0
- package/dist/engine.js +40 -51
- package/dist/erd-editor.js +40775 -26895
- package/dist/konva/batchDraw.d.ts +41 -0
- package/dist/konva/host.d.ts +29 -0
- package/dist/konva/scene/columnDropTarget.d.ts +13 -0
- package/dist/konva/scene/konvaFlip.d.ts +18 -0
- package/dist/konva/scene/metrics.d.ts +29 -0
- package/dist/konva/scene/renderScene.d.ts +34 -0
- package/dist/konva/scene/viewport.d.ts +38 -0
- package/dist/konva/testHandle.d.ts +22 -0
- package/dist/konva/theme.d.ts +31 -0
- package/dist/konva/workerDomStubs.d.ts +1 -0
- package/dist/schemaGCService-DrlqIen8.js +17549 -0
- package/dist/services/export-png/ExportScene.d.ts +9 -0
- package/dist/services/export-png/documentScene.d.ts +20 -0
- package/dist/services/export-png/exportPng.shared-worker.d.ts +0 -0
- package/dist/services/export-png/exportPngService.d.ts +24 -0
- package/dist/services/export-png/index.d.ts +48 -0
- package/dist/services/export-png/pixelRatio.d.ts +21 -0
- package/dist/services/export-png/renderPng.d.ts +37 -0
- package/dist/services/export-png/textWidth.d.ts +27 -0
- package/dist/services/schema-gc/index.d.ts +5 -0
- package/dist/services/shikiService.d.ts +1 -1
- package/dist/styles/colorPicker.style.d.ts +6 -1
- package/dist/styles/fonts.styles.d.ts +2 -1
- package/dist/styles/reset.styles.d.ts +5 -1
- package/dist/styles/scrollbar.styles.d.ts +6 -1
- package/dist/styles/typography.styles.d.ts +2 -1
- package/dist/themes/radix-ui-theme.d.ts +1 -1
- package/dist/themes/tokens.d.ts +6 -2
- package/dist/utils/calcTable.d.ts +7 -0
- package/dist/utils/draw-relationship/chamfer.d.ts +2 -0
- package/dist/utils/draw-relationship/incremental.d.ts +70 -0
- package/dist/utils/draw-relationship/index.d.ts +78 -14
- package/dist/utils/draw-relationship/nudge.d.ts +4 -0
- package/dist/utils/draw-relationship/pathFinding.d.ts +7 -1
- package/dist/utils/draw-relationship/route.d.ts +27 -0
- package/dist/utils/draw-relationship/stub.d.ts +36 -0
- package/dist/utils/emitter.d.ts +32 -0
- package/dist/utils/file/exportFile.d.ts +10 -1
- package/dist/utils/file/importFile.d.ts +4 -1
- package/dist/utils/focus.d.ts +5 -3
- package/dist/utils/generator-code/aml.d.ts +4 -0
- package/dist/utils/generator-code/dbml.d.ts +4 -0
- package/dist/utils/generator-code/drizzle.d.ts +4 -0
- package/dist/utils/generator-code/go.d.ts +4 -0
- package/dist/utils/generator-code/sequelize.d.ts +4 -0
- package/dist/utils/generator-code/sqlalchemy.d.ts +4 -0
- package/dist/utils/generator-code/typeorm.d.ts +4 -0
- package/dist/utils/globalEventObservable.d.ts +13 -12
- package/dist/utils/icon.d.ts +9 -1
- package/dist/utils/keyboard-shortcut/index.d.ts +7 -1
- package/dist/utils/promise.d.ts +1 -0
- package/dist/utils/schema-aml-parser/convert.d.ts +4 -0
- package/dist/utils/schema-aml-parser/dataType.d.ts +12 -0
- package/dist/utils/schema-aml-parser/index.d.ts +3 -0
- package/dist/utils/schema-aml-parser/parser.d.ts +2 -0
- package/dist/utils/schema-aml-parser/tokenizer.d.ts +23 -0
- package/dist/utils/schema-aml-parser/types.d.ts +78 -0
- package/dist/utils/schema-dbml-parser/convert.d.ts +4 -0
- package/dist/utils/schema-dbml-parser/dataType.d.ts +7 -0
- package/dist/utils/schema-dbml-parser/index.d.ts +3 -0
- package/dist/utils/schema-dbml-parser/parser.d.ts +2 -0
- package/dist/utils/schema-dbml-parser/tokenizer.d.ts +16 -0
- package/dist/utils/schema-dbml-parser/types.d.ts +62 -0
- package/dist/utils/schema-graphql-parser/convert.d.ts +4 -0
- package/dist/utils/schema-graphql-parser/dataType.d.ts +7 -0
- package/dist/utils/schema-graphql-parser/index.d.ts +3 -0
- package/dist/utils/schema-graphql-parser/parser.d.ts +2 -0
- package/dist/utils/schema-graphql-parser/types.d.ts +58 -0
- package/dist/utils/schema-sql/Databricks.d.ts +5 -0
- package/dist/utils/schema-sql/Snowflake.d.ts +5 -0
- package/dist/utils/sharedColor.d.ts +2 -0
- package/dist/utils/table-clipboard/copy.d.ts +7 -0
- package/dist/utils/table-clipboard/index.d.ts +2 -0
- package/dist/utils/table-clipboard/paste.d.ts +3 -0
- package/dist/utils/table-clipboard/payload.d.ts +83 -0
- package/dist/utils/table-clipboard/placement.d.ts +30 -0
- package/dist/utils/validation.d.ts +1 -0
- package/package.json +34 -29
- package/dist/components/erd/canvas/canvas-svg/CanvasSvg.d.ts +0 -7
- package/dist/components/erd/canvas/canvas-svg/relationship/Relationship.template.d.ts +0 -3
- package/dist/components/erd/canvas/draw-relationship/DrawRelationship.styles.d.ts +0 -1
- package/dist/components/erd/canvas/high-level-table/HighLevelTable.styles.d.ts +0 -1
- package/dist/components/erd/canvas/memo/Memo.styles.d.ts +0 -6
- package/dist/components/erd/canvas/shared-mouse-tracker/shared-mouse-cursor/SharedMouseCursor.styles.d.ts +0 -1
- package/dist/components/erd/canvas/table/column/Column.styles.d.ts +0 -2
- package/dist/components/erd/drag-select/DragSelect.d.ts +0 -9
- package/dist/components/erd/drag-select/DragSelect.styles.d.ts +0 -1
- package/dist/schemaGCService-Br6jn6B2.js +0 -15866
- /package/dist/components/erd/canvas/{canvas-svg → relationship-group}/relationship/Relationship.d.ts +0 -0
- /package/dist/components/{erd/canvas/table → table-view}/Table.styles.d.ts +0 -0
- /package/dist/components/{erd/canvas/canvas-svg/CanvasSvg.styles.d.ts → table-view/column/Column.styles.d.ts} +0 -0
- /package/dist/components/{erd/canvas/table → table-view}/column/column-data-type/ColumnDataType.styles.d.ts +0 -0
- /package/dist/components/{erd/canvas/table → table-view}/column/column-key/ColumnKey.d.ts +0 -0
- /package/dist/components/{erd/canvas/table → table-view}/column/column-key/ColumnKey.styles.d.ts +0 -0
- /package/dist/components/{erd/canvas/table → table-view}/column/column-not-null/ColumnNotNull.styles.d.ts +0 -0
- /package/dist/components/{erd/canvas/table → table-view}/column/column-option/ColumnOption.styles.d.ts +0 -0
- /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;
|
|
@@ -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;
|
|
@@ -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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
|
|
52
|
-
|
|
53
|
-
};
|
|
41
|
+
//#endregion
|
|
42
|
+
export { b as createReplicationStore };
|