@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
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `tokenizer.ts` and `parser.ts` own every DBML syntax concern -- settings are
|
|
3
|
+
* resolved into the flat fields below, so `convert.ts` never sees a token.
|
|
4
|
+
*/
|
|
5
|
+
export type DBMLEndpoint = {
|
|
6
|
+
schemaName: string;
|
|
7
|
+
tableName: string;
|
|
8
|
+
columnNames: string[];
|
|
9
|
+
};
|
|
10
|
+
export type DBMLInlineRef = {
|
|
11
|
+
/** `-`, `<`, `>` or `<>`, with the `?` optionality markers dropped. */
|
|
12
|
+
operator: string;
|
|
13
|
+
target: DBMLEndpoint;
|
|
14
|
+
};
|
|
15
|
+
export type DBMLColumn = {
|
|
16
|
+
name: string;
|
|
17
|
+
comment: string;
|
|
18
|
+
/** Holds the argument list and any array suffix; never the schema. */
|
|
19
|
+
typeName: string;
|
|
20
|
+
typeSchemaName: string;
|
|
21
|
+
primaryKey: boolean;
|
|
22
|
+
unique: boolean;
|
|
23
|
+
notNull: boolean;
|
|
24
|
+
autoIncrement: boolean;
|
|
25
|
+
default: string;
|
|
26
|
+
inlineRefs: DBMLInlineRef[];
|
|
27
|
+
};
|
|
28
|
+
export type DBMLIndex = {
|
|
29
|
+
name: string;
|
|
30
|
+
unique: boolean;
|
|
31
|
+
/** `[pk]`, which is DBML's only composite primary key spelling. */
|
|
32
|
+
primaryKey: boolean;
|
|
33
|
+
/** Expression columns are dropped, so these are column names only. */
|
|
34
|
+
columnNames: string[];
|
|
35
|
+
};
|
|
36
|
+
export type DBMLTable = {
|
|
37
|
+
schemaName: string;
|
|
38
|
+
name: string;
|
|
39
|
+
alias: string;
|
|
40
|
+
comment: string;
|
|
41
|
+
columns: DBMLColumn[];
|
|
42
|
+
indexes: DBMLIndex[];
|
|
43
|
+
};
|
|
44
|
+
export type DBMLRef = {
|
|
45
|
+
operator: string;
|
|
46
|
+
left: DBMLEndpoint;
|
|
47
|
+
right: DBMLEndpoint;
|
|
48
|
+
};
|
|
49
|
+
export type DBMLModel = {
|
|
50
|
+
tables: DBMLTable[];
|
|
51
|
+
refs: DBMLRef[];
|
|
52
|
+
/** Keyed by the qualified name, so `s.status` and `status` stay apart. */
|
|
53
|
+
enums: Record<string, string[]>;
|
|
54
|
+
skipped: string[];
|
|
55
|
+
};
|
|
56
|
+
export type DBMLParseResult = {
|
|
57
|
+
ok: true;
|
|
58
|
+
model: DBMLModel;
|
|
59
|
+
} | {
|
|
60
|
+
ok: false;
|
|
61
|
+
message: string;
|
|
62
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ERDEditorSchemaV3 } from '@dineug/erd-editor-schema';
|
|
2
|
+
import { EngineContext } from '../../engine/context';
|
|
3
|
+
import { GraphQLModel } from './types';
|
|
4
|
+
export declare function convertToSchema(model: GraphQLModel, ctx: EngineContext, database: number): ERDEditorSchemaV3;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GraphQLModel } from './types';
|
|
2
|
+
export declare function resolveDataType(named: string, database: number, model: GraphQLModel): string;
|
|
3
|
+
/**
|
|
4
|
+
* Keeps the members where the column type cannot hold them. Pass `database` to
|
|
5
|
+
* drop it on the dialects whose `ENUM(...)` column already spells them out.
|
|
6
|
+
*/
|
|
7
|
+
export declare function enumCommentSuffix(named: string, model: GraphQLModel, database?: number): string;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ERDEditorSchemaV3 } from '@dineug/erd-editor-schema';
|
|
2
|
+
import { EngineContext } from '../../engine/context';
|
|
3
|
+
export declare function schemaGraphQLParserToSchemaJson(sdl: string, ctx: EngineContext, prepare?: (schema: ERDEditorSchemaV3) => ERDEditorSchemaV3): string;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `parser.ts` owns every `graphql` AST concern -- directives are resolved into
|
|
3
|
+
* the flat fields below, so `convert.ts` never imports from `graphql`.
|
|
4
|
+
*/
|
|
5
|
+
export type GraphQLTypeRef = {
|
|
6
|
+
named: string;
|
|
7
|
+
/** The outermost wrapper is `NonNull` -- the column-level NOT NULL signal. */
|
|
8
|
+
nonNull: boolean;
|
|
9
|
+
isList: boolean;
|
|
10
|
+
/** The `!` inside `[T!]` -- a cardinality signal, never a column one. */
|
|
11
|
+
itemNonNull: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type GraphQLField = {
|
|
14
|
+
/** Already rewritten by `@map` / `@column(name:)` when either is present. */
|
|
15
|
+
name: string;
|
|
16
|
+
comment: string;
|
|
17
|
+
typeRef: GraphQLTypeRef;
|
|
18
|
+
primaryKey: boolean;
|
|
19
|
+
unique: boolean;
|
|
20
|
+
autoIncrement: boolean;
|
|
21
|
+
default: string;
|
|
22
|
+
/** `@db.*` or `@column(dataType:)`; wins over the scalar lookup when set. */
|
|
23
|
+
dataType: string;
|
|
24
|
+
relationName: string;
|
|
25
|
+
/** Columns on this type. */
|
|
26
|
+
relationFields: string[];
|
|
27
|
+
/** Columns on the target type. */
|
|
28
|
+
relationReferences: string[];
|
|
29
|
+
/** Resolver fields keep their arguments; the target type decides the rest. */
|
|
30
|
+
hasArguments: boolean;
|
|
31
|
+
};
|
|
32
|
+
export type GraphQLIndex = {
|
|
33
|
+
name: string;
|
|
34
|
+
unique: boolean;
|
|
35
|
+
fieldNames: string[];
|
|
36
|
+
};
|
|
37
|
+
export type GraphQLTable = {
|
|
38
|
+
name: string;
|
|
39
|
+
comment: string;
|
|
40
|
+
fields: GraphQLField[];
|
|
41
|
+
indexes: GraphQLIndex[];
|
|
42
|
+
};
|
|
43
|
+
export type GraphQLModel = {
|
|
44
|
+
tables: GraphQLTable[];
|
|
45
|
+
enums: Record<string, string[]>;
|
|
46
|
+
/** `scalar X` declarations, so an unknown name can be told from a typo. */
|
|
47
|
+
customScalars: string[];
|
|
48
|
+
unions: Record<string, string[]>;
|
|
49
|
+
/** Pruned type names, so a field pointing at one is dropped rather than read. */
|
|
50
|
+
skipped: string[];
|
|
51
|
+
};
|
|
52
|
+
export type GraphQLParseResult = {
|
|
53
|
+
ok: true;
|
|
54
|
+
model: GraphQLModel;
|
|
55
|
+
} | {
|
|
56
|
+
ok: false;
|
|
57
|
+
message: string;
|
|
58
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { FormatIndexOptions, FormatTableOptions } from './utils';
|
|
3
|
+
export declare function createSchema(state: RootState): string;
|
|
4
|
+
export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
|
|
5
|
+
export declare function formatIndex({ collections }: RootState, { buffer, index, indexNames }: FormatIndexOptions): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { FormatIndexOptions, FormatTableOptions } from './utils';
|
|
3
|
+
export declare function createSchema(state: RootState): string;
|
|
4
|
+
export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
|
|
5
|
+
export declare function formatIndex({ collections, settings: { bracketType } }: RootState, { buffer, index, indexNames }: FormatIndexOptions): void;
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import { RootState } from '../../engine/state';
|
|
2
|
+
import { Settings } from '../../internal-types';
|
|
3
|
+
import { ClipboardPayload } from '.';
|
|
2
4
|
export declare function tableCopyToText(state: RootState): string;
|
|
3
5
|
export declare function tableCopyToHtml(state: RootState): string;
|
|
6
|
+
export declare function entitiesCopyToPayload({ editor: { selectedMap }, collections, }: RootState): ClipboardPayload | null;
|
|
7
|
+
export declare function columnsCopyToPayload({ editor: { focusTable }, collections, }: RootState): ClipboardPayload | null;
|
|
8
|
+
export declare function entitiesToTsv(payload: ClipboardPayload, settings: Settings): string;
|
|
9
|
+
export declare function entitiesToHtmlTable(payload: ClipboardPayload, settings: Settings): string;
|
|
10
|
+
export declare function payloadToHtml(payload: ClipboardPayload, tableHtml: string): string;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { RootState } from '../../engine/state';
|
|
2
2
|
import { Column } from '../../internal-types';
|
|
3
|
+
import { ClipboardPayload, ParseResult } from './payload';
|
|
3
4
|
export declare function tablePasteFromTextToColumns({ settings: { show, columnOrder } }: RootState, text: string): Column[];
|
|
4
5
|
export declare function tablePasteFromHtmlToColumns({ settings: { show, columnOrder } }: RootState, html: string): Column[];
|
|
6
|
+
export declare function readClipboardPayload(dataTransfer: DataTransfer): ParseResult;
|
|
7
|
+
export declare function payloadToColumns({ columns }: ClipboardPayload): Column[];
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { ValuesType } from '../../internal-types';
|
|
2
|
+
export declare const CLIPBOARD_MIME = "application/x-erd-editor";
|
|
3
|
+
export declare const CLIPBOARD_FORMAT = "erd-editor-clipboard";
|
|
4
|
+
export declare const CLIPBOARD_VERSION = 1;
|
|
5
|
+
export declare const CLIPBOARD_HTML_ATTR = "data-erd-editor";
|
|
6
|
+
export declare const CLIPBOARD_HTML_TRUNCATED_ATTR = "data-erd-editor-truncated";
|
|
7
|
+
export declare const HTML_PAYLOAD_MAX_BYTES = 1000000;
|
|
8
|
+
export declare const PayloadKind: {
|
|
9
|
+
readonly tables: "tables";
|
|
10
|
+
readonly columns: "columns";
|
|
11
|
+
};
|
|
12
|
+
export type PayloadKind = ValuesType<typeof PayloadKind>;
|
|
13
|
+
export type ClipboardTable = {
|
|
14
|
+
sourceId: string;
|
|
15
|
+
name: string;
|
|
16
|
+
comment: string;
|
|
17
|
+
columnIds: string[];
|
|
18
|
+
ui: {
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
zIndex: number;
|
|
22
|
+
widthName: number;
|
|
23
|
+
widthComment: number;
|
|
24
|
+
color: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export type ClipboardColumn = {
|
|
28
|
+
sourceId: string;
|
|
29
|
+
tableId: string;
|
|
30
|
+
name: string;
|
|
31
|
+
comment: string;
|
|
32
|
+
dataType: string;
|
|
33
|
+
default: string;
|
|
34
|
+
options: number;
|
|
35
|
+
ui: {
|
|
36
|
+
keys: number;
|
|
37
|
+
widthName: number;
|
|
38
|
+
widthComment: number;
|
|
39
|
+
widthDataType: number;
|
|
40
|
+
widthDefault: number;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export type ClipboardMemo = {
|
|
44
|
+
sourceId: string;
|
|
45
|
+
value: string;
|
|
46
|
+
ui: {
|
|
47
|
+
x: number;
|
|
48
|
+
y: number;
|
|
49
|
+
width: number;
|
|
50
|
+
height: number;
|
|
51
|
+
zIndex: number;
|
|
52
|
+
color: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
export type ClipboardPayload = {
|
|
56
|
+
format: typeof CLIPBOARD_FORMAT;
|
|
57
|
+
version: number;
|
|
58
|
+
copyId: string;
|
|
59
|
+
kind: PayloadKind;
|
|
60
|
+
tables: ClipboardTable[];
|
|
61
|
+
columns: ClipboardColumn[];
|
|
62
|
+
memos: ClipboardMemo[];
|
|
63
|
+
};
|
|
64
|
+
export type ParseResult = {
|
|
65
|
+
status: 'ok';
|
|
66
|
+
payload: ClipboardPayload;
|
|
67
|
+
} | {
|
|
68
|
+
status: 'foreign';
|
|
69
|
+
} | {
|
|
70
|
+
status: 'unsupported';
|
|
71
|
+
version: number;
|
|
72
|
+
};
|
|
73
|
+
type CreatePayloadConfig = {
|
|
74
|
+
kind: PayloadKind;
|
|
75
|
+
copyId?: string;
|
|
76
|
+
tables?: ClipboardTable[];
|
|
77
|
+
columns?: ClipboardColumn[];
|
|
78
|
+
memos?: ClipboardMemo[];
|
|
79
|
+
};
|
|
80
|
+
export declare function createPayload({ kind, copyId, tables, columns, memos, }: CreatePayloadConfig): ClipboardPayload;
|
|
81
|
+
export declare function parsePayload(json: string): ParseResult;
|
|
82
|
+
export declare function migratePayload(payload: ClipboardPayload): ClipboardPayload;
|
|
83
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Memo, Point, Settings, Table } from '../../internal-types';
|
|
2
|
+
export type PlacementEntity = {
|
|
3
|
+
sourceId: string;
|
|
4
|
+
ui: {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
zIndex?: number;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export type PlacementSource = {
|
|
11
|
+
ui: {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export type PlacementPoint = {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
zIndex: number;
|
|
20
|
+
};
|
|
21
|
+
export type ResolvePlacementConfig = {
|
|
22
|
+
entities: PlacementEntity[];
|
|
23
|
+
offset: Point;
|
|
24
|
+
escapeCollision: boolean;
|
|
25
|
+
settings: Settings;
|
|
26
|
+
tables: Table[];
|
|
27
|
+
memos: Memo[];
|
|
28
|
+
findSource: (sourceId: string) => PlacementSource | undefined | null;
|
|
29
|
+
};
|
|
30
|
+
export declare function resolvePlacement({ entities, offset, escapeCollision, settings, tables, memos, findSource, }: ResolvePlacementConfig): Map<string, PlacementPoint>;
|
|
@@ -14,3 +14,4 @@ export declare const hasCanvasType: (value: string) => boolean;
|
|
|
14
14
|
export declare function textInRange(width: number): number;
|
|
15
15
|
export declare function toSafeString(value: any): string;
|
|
16
16
|
export declare function isHighLevelTable(zoomLevel: number): boolean;
|
|
17
|
+
export declare function isEditableTarget(target: EventTarget | null): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dineug/erd-editor",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Entity-Relationship Diagram Editor",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/erd-editor.js",
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
|
-
"dist
|
|
21
|
-
"dist/**/*.ts"
|
|
20
|
+
"dist"
|
|
22
21
|
],
|
|
23
22
|
"keywords": [
|
|
24
23
|
"vuerd",
|
|
@@ -43,17 +42,22 @@
|
|
|
43
42
|
"author": "SeungHwan-Lee <dineug2@gmail.com>",
|
|
44
43
|
"license": "MIT",
|
|
45
44
|
"scripts": {
|
|
46
|
-
"dev": "
|
|
45
|
+
"dev": "vp run --filter @dineug/erd-editor... --filter !@dineug/erd-editor build && vp dev",
|
|
47
46
|
"dev:storybook": "storybook dev -p 6006",
|
|
48
|
-
"build": "vite build --mode lib",
|
|
49
47
|
"build:storybook": "storybook build",
|
|
50
|
-
"
|
|
51
|
-
"
|
|
48
|
+
"test:dev": "vp test dev",
|
|
49
|
+
"test:coverage": "vp test run --coverage",
|
|
50
|
+
"e2e": "vp run --filter @dineug/erd-editor build && playwright test",
|
|
51
|
+
"e2e:dev": "playwright test --ui",
|
|
52
|
+
"e2e:headed": "playwright test --headed",
|
|
53
|
+
"e2e:report": "playwright show-report e2e/.report",
|
|
54
|
+
"e2e:bench": "vp run --filter @dineug/erd-editor build && playwright test -c playwright.bench.config.ts",
|
|
55
|
+
"e2e:typecheck": "tsc -p e2e/tsconfig.json"
|
|
52
56
|
},
|
|
53
57
|
"devDependencies": {
|
|
58
|
+
"@dbml/parse": "10.1.1",
|
|
54
59
|
"@dineug/erd-editor-schema": "workspace:*",
|
|
55
60
|
"@dineug/erd-editor-shiki-worker": "workspace:*",
|
|
56
|
-
"@dineug/go": "workspace:*",
|
|
57
61
|
"@dineug/r-html": "workspace:*",
|
|
58
62
|
"@dineug/schema-sql-parser": "workspace:*",
|
|
59
63
|
"@dineug/shared": "workspace:*",
|
|
@@ -61,40 +65,40 @@
|
|
|
61
65
|
"@easylogic/colorpicker": "1.10.11",
|
|
62
66
|
"@egjs/agent": "^2.4.3",
|
|
63
67
|
"@floating-ui/dom": "1.6.3",
|
|
64
|
-
"@
|
|
65
|
-
"@fortawesome/free-solid-svg-icons": "6.5.2",
|
|
66
|
-
"@mdi/js": "7.4.47",
|
|
68
|
+
"@playwright/test": "^1.62.1",
|
|
67
69
|
"@radix-ui/colors": "3.0.0",
|
|
68
|
-
"@
|
|
69
|
-
"@storybook/addon-
|
|
70
|
-
"@storybook/
|
|
71
|
-
"@storybook/addon-links": "^8.0.8",
|
|
72
|
-
"@storybook/blocks": "^8.0.8",
|
|
73
|
-
"@storybook/html": "^8.0.8",
|
|
74
|
-
"@storybook/html-vite": "^8.0.8",
|
|
75
|
-
"@storybook/test": "^8.0.8",
|
|
70
|
+
"@storybook/addon-docs": "^10.5.8",
|
|
71
|
+
"@storybook/addon-links": "^10.5.8",
|
|
72
|
+
"@storybook/html-vite": "^10.5.8",
|
|
76
73
|
"@types/color": "^3.0.6",
|
|
77
74
|
"@types/d3": "7.4.3",
|
|
78
75
|
"@types/highlight-words-core": "^1.2.3",
|
|
79
|
-
"@types/lodash-es": "^4.17.12",
|
|
80
76
|
"@types/luxon": "^3.4.2",
|
|
77
|
+
"@types/node": "^22.20.1",
|
|
78
|
+
"@typescript/typescript6": "6.0.2",
|
|
79
|
+
"@vitest/coverage-v8": "catalog:",
|
|
81
80
|
"color": "^4.2.3",
|
|
82
81
|
"comlink": "4.4.1",
|
|
83
82
|
"d3": "7.9.0",
|
|
84
83
|
"deepmerge": "^4.3.1",
|
|
84
|
+
"es-toolkit": "^1.50.0",
|
|
85
85
|
"framer-motion": "^11.0.28",
|
|
86
86
|
"fuse.js": "^7.0.0",
|
|
87
|
+
"graphql": "^16.14.2",
|
|
88
|
+
"happy-dom": "^20.11.2",
|
|
87
89
|
"highlight-words-core": "^1.2.2",
|
|
88
90
|
"html-to-image": "^1.11.11",
|
|
89
|
-
"
|
|
91
|
+
"lucide": "1.35.0",
|
|
90
92
|
"luxon": "^3.4.4",
|
|
91
93
|
"rxjs": "^7.8.1",
|
|
92
94
|
"stats.js": "^0.17.0",
|
|
93
|
-
"storybook": "^
|
|
95
|
+
"storybook": "^10.5.8",
|
|
94
96
|
"tinykeys": "^2.1.0",
|
|
95
97
|
"tslib": "^2.8.1",
|
|
96
|
-
"typescript": "
|
|
97
|
-
"vite": "
|
|
98
|
-
"vite-plugin-dts": "^
|
|
98
|
+
"typescript": "7.0.2",
|
|
99
|
+
"vite": "catalog:",
|
|
100
|
+
"vite-plugin-dts": "^5.0.3",
|
|
101
|
+
"vite-plus": "catalog:",
|
|
102
|
+
"vitest": "catalog:"
|
|
99
103
|
}
|
|
100
104
|
}
|