@dineug/erd-editor 3.3.0 → 3.4.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/erd/canvas/altDragDuplicate.d.ts +3 -0
- package/dist/components/erd/canvas/duplicate-ghost/DuplicateGhost.d.ts +4 -0
- package/dist/components/erd/canvas/duplicate-ghost/DuplicateGhost.styles.d.ts +2 -0
- package/dist/components/erd/canvas/shared-drag-select/SharedDragSelect.d.ts +4 -0
- package/dist/components/erd/canvas/table/column/Column.d.ts +7 -0
- package/dist/components/erd/canvas/table/column/column-data-type/ColumnDataType.d.ts +3 -3
- package/dist/components/erd/canvas/table/column/column-not-null/ColumnNotNull.d.ts +1 -1
- package/dist/components/erd/canvas/table/column/column-option/ColumnOption.d.ts +1 -1
- package/dist/components/erd/canvas/table/useSharedFocusTable.d.ts +6 -0
- package/dist/components/erd/canvas/useSharedSelectEntity.d.ts +4 -0
- package/dist/components/erd/erd-context-menu/menus/drawRelationshipMenus.d.ts +3 -2
- package/dist/components/erd/erd-context-menu/menus/exportMenus.d.ts +6 -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/table-properties/table-properties-indexes/indexes-checkbox-column/IndexesCheckboxColumn.d.ts +1 -1
- 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 +14 -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 +59 -15
- package/dist/components/primitives/kbd/Kbd.stories.d.ts +3 -3
- package/dist/components/primitives/sash/Sash.stories.d.ts +5 -5
- 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.stories.d.ts +4 -4
- package/dist/constants/language.d.ts +7 -1
- package/dist/constants/layout.d.ts +20 -0
- package/dist/constants/schema.d.ts +11 -2
- 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 +18 -1
- package/dist/engine/modules/editor/atom.actions.d.ts +78 -0
- package/dist/engine/modules/editor/generator.actions.d.ts +18 -0
- package/dist/engine/modules/editor/state.d.ts +23 -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/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 +30677 -26598
- package/dist/schemaGCService-DAGNq0wk.js +17092 -0
- package/dist/services/shikiService.d.ts +1 -1
- package/dist/styles/colorPicker.style.d.ts +10 -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 +2 -2
- package/dist/utils/calcTable.d.ts +7 -0
- package/dist/utils/draw-relationship/chamfer.d.ts +2 -0
- package/dist/utils/draw-relationship/index.d.ts +73 -14
- package/dist/utils/draw-relationship/nudge.d.ts +3 -0
- package/dist/utils/draw-relationship/pathFinding.d.ts +9 -1
- package/dist/utils/draw-relationship/route.d.ts +32 -0
- package/dist/utils/draw-relationship/stub.d.ts +47 -0
- package/dist/utils/emitter.d.ts +16 -0
- package/dist/utils/file/importFile.d.ts +4 -1
- package/dist/utils/focus.d.ts +4 -2
- 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/keyboard-shortcut/index.d.ts +1 -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 +13 -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 +25 -0
- package/dist/utils/schema-aml-parser/types.d.ts +79 -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 +29 -25
- package/dist/schemaGCService-CLe8cLsy.js +0 -15866
|
@@ -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>;
|
|
@@ -13,6 +14,10 @@ export type Editor = {
|
|
|
13
14
|
draggableColumn: DraggableColumn | null;
|
|
14
15
|
draggingColumnMap: Record<string, boolean>;
|
|
15
16
|
sharedMouseTrackerMap: Record<string, SharedMouseTracker>;
|
|
17
|
+
sharedFocusTrackerMap: Record<string, SharedFocusTracker>;
|
|
18
|
+
sharedSelectionTrackerMap: Record<string, SharedSelectionTracker>;
|
|
19
|
+
sharedDragSelectTrackerMap: Record<string, SharedDragSelectTracker>;
|
|
20
|
+
dragSelect: Rect | null;
|
|
16
21
|
};
|
|
17
22
|
export type Viewport = {
|
|
18
23
|
width: number;
|
|
@@ -44,6 +49,24 @@ export type SharedMouseTracker = {
|
|
|
44
49
|
nickname: string;
|
|
45
50
|
timeoutId: any;
|
|
46
51
|
};
|
|
52
|
+
export type SharedFocus = {
|
|
53
|
+
tableId: string;
|
|
54
|
+
columnId: string | null;
|
|
55
|
+
focusType: FocusType;
|
|
56
|
+
};
|
|
57
|
+
export type SharedFocusTracker = SharedFocus & {
|
|
58
|
+
id: string;
|
|
59
|
+
timeoutId: any;
|
|
60
|
+
};
|
|
61
|
+
export type SharedSelectionTracker = {
|
|
62
|
+
id: string;
|
|
63
|
+
selectedIds: string[];
|
|
64
|
+
timeoutId: any;
|
|
65
|
+
};
|
|
66
|
+
export type SharedDragSelectTracker = Rect & {
|
|
67
|
+
id: string;
|
|
68
|
+
timeoutId: any;
|
|
69
|
+
};
|
|
47
70
|
export declare const SelectType: {
|
|
48
71
|
readonly table: "table";
|
|
49
72
|
readonly memo: "memo";
|
|
@@ -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;
|
|
@@ -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-CLe8cLsy.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.4.0 | Sat Aug 29 2026
|
|
4
|
+
* @author SeungHwan-Lee <dineug2@gmail.com>
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
import { $ as e, C as t, Di as n, E as r, Fr as i, Jn as a, Rr as o, Vr as s, g as c, i as l, ii as u, n as d, pi as f, sr as p, t as m, ti as h, vi as g, x as _, xi as v } from "./schemaGCService-DAGNq0wk.js";
|
|
8
|
+
//#region src/engine/replication-store.ts
|
|
9
|
+
var y = { change: "change" };
|
|
10
|
+
function b(b) {
|
|
11
|
+
let x = /* @__PURE__ */ new Set(), S = t(b), C = c(S, !1), w = l(C), T = new h(), E = new u((e) => C.subscribe((t) => e.next(t))).pipe(_(r), o(200)), D = /* @__PURE__ */ new Set(), O = new m(), 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
|
+
v(r, t);
|
|
17
|
+
});
|
|
18
|
+
}, j = (t) => {
|
|
19
|
+
let n = p(t);
|
|
20
|
+
C.dispatchSync(e(i(n) ? "{}" : n)), O.run(f(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(a()));
|
|
22
|
+
});
|
|
23
|
+
}, M = (e) => {
|
|
24
|
+
T.next([e].flat());
|
|
25
|
+
};
|
|
26
|
+
return x.add(E.subscribe(() => A(y.change, void 0))).add(T.pipe(_(r), s((e) => e.map((e) => n(e, ["tags"])))).subscribe(C.dispatchSync)), Object.freeze({
|
|
27
|
+
get value() {
|
|
28
|
+
return f(C.state);
|
|
29
|
+
},
|
|
30
|
+
on: k,
|
|
31
|
+
setInitialValue: j,
|
|
32
|
+
dispatch: (e) => {
|
|
33
|
+
g(() => 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 };
|