@dineug/erd-editor 3.4.0 → 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/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/drag-select/DragSelect.d.ts +11 -0
- package/dist/components/erd/canvas/duplicate-ghost/DuplicateGhost.d.ts +5 -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 +4 -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 +16 -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/useMoveEntity.d.ts +18 -0
- package/dist/components/erd/erd-context-menu/ErdContextMenu.d.ts +1 -2
- package/dist/components/erd/erd-context-menu/menus/drawRelationshipMenus.d.ts +2 -2
- package/dist/components/erd/erd-context-menu/menus/exportMenus.d.ts +2 -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/virtual-scroll/useVirtualScroll.d.ts +19 -0
- package/dist/components/global-styles/GlobalStyles.d.ts +3 -12
- package/dist/components/primitives/code-block/CodeBlock.styles.d.ts +1 -1
- package/dist/components/primitives/icon/icons.d.ts +50 -25
- package/dist/components/primitives/sash/Sash.stories.d.ts +1 -1
- package/dist/components/primitives/toast/Toast.d.ts +4 -0
- package/dist/components/primitives/toast/Toast.stories.d.ts +13 -0
- 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 +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 +2 -2
- package/dist/constants/layout.d.ts +6 -13
- package/dist/constants/schema.d.ts +1 -1
- package/dist/engine/modules/editor/actions.d.ts +12 -0
- package/dist/engine/modules/editor/atom.actions.d.ts +53 -0
- package/dist/engine/modules/editor/state.d.ts +20 -0
- package/dist/engine/modules/settings/atom.actions.d.ts +24 -0
- package/dist/engine.js +10 -10
- package/dist/erd-editor.js +23476 -13675
- 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-DAGNq0wk.js → schemaGCService-DrlqIen8.js} +5246 -4789
- 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/styles/colorPicker.style.d.ts +3 -7
- package/dist/styles/fonts.styles.d.ts +1 -1
- package/dist/styles/reset.styles.d.ts +1 -1
- package/dist/styles/scrollbar.styles.d.ts +3 -3
- package/dist/styles/typography.styles.d.ts +1 -1
- package/dist/themes/tokens.d.ts +4 -0
- package/dist/utils/calcTable.d.ts +1 -1
- package/dist/utils/draw-relationship/incremental.d.ts +70 -0
- package/dist/utils/draw-relationship/index.d.ts +47 -42
- package/dist/utils/draw-relationship/nudge.d.ts +2 -1
- package/dist/utils/draw-relationship/pathFinding.d.ts +3 -5
- package/dist/utils/draw-relationship/route.d.ts +4 -9
- package/dist/utils/draw-relationship/stub.d.ts +5 -16
- package/dist/utils/emitter.d.ts +16 -0
- package/dist/utils/file/exportFile.d.ts +10 -1
- package/dist/utils/focus.d.ts +1 -1
- package/dist/utils/globalEventObservable.d.ts +13 -12
- package/dist/utils/icon.d.ts +9 -1
- package/dist/utils/keyboard-shortcut/index.d.ts +6 -0
- package/dist/utils/schema-aml-parser/dataType.d.ts +5 -6
- package/dist/utils/schema-aml-parser/tokenizer.d.ts +3 -5
- package/dist/utils/schema-aml-parser/types.d.ts +13 -14
- package/dist/utils/schema-dbml-parser/dataType.d.ts +2 -2
- package/dist/utils/schema-dbml-parser/types.d.ts +5 -5
- package/dist/utils/schema-graphql-parser/dataType.d.ts +2 -2
- package/dist/utils/schema-graphql-parser/types.d.ts +7 -7
- package/package.json +6 -5
- 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/duplicate-ghost/DuplicateGhost.styles.d.ts +0 -2
- 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/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.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.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,16 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
export declare const keyup$: Observable<KeyboardEvent>;
|
|
3
|
+
export declare const mousedown$: Observable<MouseEvent>;
|
|
4
|
+
export declare const mousemove$: Observable<MouseEvent>;
|
|
5
|
+
export declare const mouseup$: Observable<MouseEvent>;
|
|
6
|
+
export declare const touchstart$: Observable<TouchEvent>;
|
|
7
|
+
export declare const touchmove$: Observable<TouchEvent>;
|
|
8
|
+
export declare const touchend$: Observable<TouchEvent>;
|
|
9
|
+
export declare const animationFrames$: Observable<{
|
|
9
10
|
timestamp: number;
|
|
10
11
|
elapsed: number;
|
|
11
12
|
}>;
|
|
12
|
-
export declare const moveStart$:
|
|
13
|
-
export declare const moveEnd$:
|
|
13
|
+
export declare const moveStart$: Observable<MouseEvent | TouchEvent>;
|
|
14
|
+
export declare const moveEnd$: Observable<MouseEvent | TouchEvent>;
|
|
14
15
|
export type DragMove = {
|
|
15
16
|
movementX: number;
|
|
16
17
|
movementY: number;
|
|
@@ -18,7 +19,7 @@ export type DragMove = {
|
|
|
18
19
|
y: number;
|
|
19
20
|
event: MouseEvent | TouchEvent;
|
|
20
21
|
};
|
|
21
|
-
export declare const move$:
|
|
22
|
+
export declare const move$: Observable<{
|
|
22
23
|
event: MouseEvent;
|
|
23
24
|
movementX: number;
|
|
24
25
|
movementY: number;
|
|
@@ -31,7 +32,7 @@ export declare const move$: import('rxjs').Observable<{
|
|
|
31
32
|
x: number;
|
|
32
33
|
y: number;
|
|
33
34
|
}>;
|
|
34
|
-
export declare const drag$:
|
|
35
|
+
export declare const drag$: Observable<{
|
|
35
36
|
event: MouseEvent;
|
|
36
37
|
movementX: number;
|
|
37
38
|
movementY: number;
|
package/dist/utils/icon.d.ts
CHANGED
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { IconNode } from 'lucide';
|
|
2
|
+
/**
|
|
3
|
+
* An icon node as an svg data uri, which is what css cursor takes. The glyph
|
|
4
|
+
* is drawn twice, the halo under the ink, with the caps and joins Icon.tsx puts
|
|
5
|
+
* on its svg so the cursor matches the menu item.
|
|
6
|
+
*/
|
|
7
|
+
export declare function toCursorImage(node: IconNode, isDarkMode: boolean): string;
|
|
8
|
+
/** The draw-relationship cursor for a relationship type, or null for a type with no glyph. */
|
|
9
|
+
export declare function getRelationshipIcon(relationshipType: number, isDarkMode: boolean): string | null;
|
|
@@ -33,4 +33,10 @@ export type KeyBindingMap = Record<KeyBindingName, ShortcutOption[]>;
|
|
|
33
33
|
export declare const createKeyBindingMap: () => KeyBindingMap;
|
|
34
34
|
export declare function shortcutToTuple(shortcut?: string): KeyBindingPress[];
|
|
35
35
|
export declare function isMod(event: MouseEvent | TouchEvent | KeyboardEvent): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Whether the press still belongs to an IME composition. The browser finishes
|
|
38
|
+
* the composition on its own, so a binding that fired here would spend a key
|
|
39
|
+
* the text editor was owed and leave a half-formed syllable behind.
|
|
40
|
+
*/
|
|
41
|
+
export declare function isComposing(event: KeyboardEvent): boolean;
|
|
36
42
|
export declare function simpleShortcutToString(shortcut?: string): string;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { AMLModel } from './types';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* inline members take precedence over anything the name would resolve to.
|
|
3
|
+
* enumValues carries the inline members, which never reach model.types. Both
|
|
4
|
+
* entry points take them as a trailing optional argument, and inline members
|
|
5
|
+
* take precedence over anything the name would resolve to.
|
|
7
6
|
*/
|
|
8
7
|
export declare function resolveDataType(typeName: string, database: number, model: AMLModel, enumValues?: string[]): string;
|
|
9
8
|
/**
|
|
10
|
-
* Keeps the members where the column type cannot hold them. Pass
|
|
11
|
-
* drop it on the dialects whose
|
|
9
|
+
* Keeps the members where the column type cannot hold them. Pass database to
|
|
10
|
+
* drop it on the dialects whose ENUM(...) column already spells them out.
|
|
12
11
|
*/
|
|
13
12
|
export declare function enumCommentSuffix(typeName: string, model: AMLModel, database: number, enumValues?: string[]): string;
|
|
@@ -10,11 +10,9 @@ export declare const TokenKind: {
|
|
|
10
10
|
readonly newline: 9;
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
|
-
* AML is indentation-sensitive, so every token carries
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* the stream always starts with a synthetic one (`value: ''`, `line: 0`), so
|
|
17
|
-
* `parser.ts` reads the first line's depth the same way as every other line's.
|
|
13
|
+
* AML is indentation-sensitive, so every token carries its line's depth. A
|
|
14
|
+
* newline token opens the line that follows and holds that line's depth, and a
|
|
15
|
+
* synthetic one starts the stream so the first line reads like every other.
|
|
18
16
|
*/
|
|
19
17
|
export type Token = {
|
|
20
18
|
kind: number;
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* quoting and the constraint grammar
|
|
4
|
-
* so
|
|
5
|
-
* nested attribute reaches `convert.ts` as one entry whose `path` is dotted.
|
|
2
|
+
* tokenizer.ts and parser.ts own every AML syntax concern, resolving
|
|
3
|
+
* indentation, quoting and the constraint grammar into the flat fields below,
|
|
4
|
+
* so convert.ts never sees a token and a nested attribute arrives dotted.
|
|
6
5
|
*/
|
|
7
6
|
export type AMLNamespace = {
|
|
8
7
|
database: string;
|
|
9
8
|
catalog: string;
|
|
10
9
|
schema: string;
|
|
11
10
|
};
|
|
12
|
-
/**
|
|
11
|
+
/** A dash on either end reads as 1, an angle bracket as n. */
|
|
13
12
|
export type AMLCardinality = '1' | 'n';
|
|
14
13
|
export type AMLEndpoint = {
|
|
15
14
|
namespace: AMLNamespace;
|
|
16
15
|
entityName: string;
|
|
17
|
-
/** Dotted from the entity root, so a nested endpoint keeps
|
|
16
|
+
/** Dotted from the entity root, so a nested endpoint keeps settings.slug. */
|
|
18
17
|
attributePaths: string[];
|
|
19
18
|
};
|
|
20
19
|
export type AMLRelation = {
|
|
@@ -22,12 +21,12 @@ export type AMLRelation = {
|
|
|
22
21
|
ref: AMLEndpoint;
|
|
23
22
|
srcCardinality: AMLCardinality;
|
|
24
23
|
refCardinality: AMLCardinality;
|
|
25
|
-
/**
|
|
24
|
+
/** -item_kind=User>; the discriminator has no editor slot and is dropped. */
|
|
26
25
|
polymorphic: boolean;
|
|
27
26
|
};
|
|
28
27
|
/**
|
|
29
|
-
* One
|
|
30
|
-
*
|
|
28
|
+
* One unique / unique=name / index / index=name constraint. A bare
|
|
29
|
+
* unique is a column flag; every other spelling groups by name.
|
|
31
30
|
*/
|
|
32
31
|
export type AMLAttributeIndex = {
|
|
33
32
|
name: string;
|
|
@@ -39,9 +38,9 @@ export type AMLAttribute = {
|
|
|
39
38
|
comment: string;
|
|
40
39
|
/** Holds the argument list and any array suffix; never the namespace. */
|
|
41
40
|
typeName: string;
|
|
42
|
-
/** Inline
|
|
41
|
+
/** Inline status post_status(draft, published) members. */
|
|
43
42
|
enumValues: string[];
|
|
44
|
-
/** AML is NOT NULL by default, so
|
|
43
|
+
/** AML is NOT NULL by default, so nullable is what clears this. */
|
|
45
44
|
notNull: boolean;
|
|
46
45
|
primaryKey: boolean;
|
|
47
46
|
indexes: AMLAttributeIndex[];
|
|
@@ -58,14 +57,14 @@ export type AMLEntity = {
|
|
|
58
57
|
/** A struct and a custom type carry neither field, which is what stops a lookup. */
|
|
59
58
|
export type AMLType = {
|
|
60
59
|
values: string[];
|
|
61
|
-
/**
|
|
60
|
+
/** type uid int -- the aliased name. */
|
|
62
61
|
alias: string;
|
|
63
62
|
};
|
|
64
63
|
export type AMLModel = {
|
|
65
64
|
entities: AMLEntity[];
|
|
66
|
-
/** Inline and standalone relations in source order, both with
|
|
65
|
+
/** Inline and standalone relations in source order, both with src filled. */
|
|
67
66
|
relations: AMLRelation[];
|
|
68
|
-
/** Keyed by the qualified name, so
|
|
67
|
+
/** Keyed by the qualified name, so cms.post_status and post_status stay apart. */
|
|
69
68
|
types: Record<string, AMLType>;
|
|
70
69
|
skipped: string[];
|
|
71
70
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DBMLModel } from './types';
|
|
2
2
|
export declare function resolveDataType(typeName: string, typeSchemaName: string, database: number, model: DBMLModel): string;
|
|
3
3
|
/**
|
|
4
|
-
* Keeps the members where the column type cannot hold them. Pass
|
|
5
|
-
* drop it on the dialects whose
|
|
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
6
|
*/
|
|
7
7
|
export declare function enumCommentSuffix(typeName: string, typeSchemaName: string, model: DBMLModel, database: number): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* resolved into the flat fields below, so
|
|
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
4
|
*/
|
|
5
5
|
export type DBMLEndpoint = {
|
|
6
6
|
schemaName: string;
|
|
@@ -8,7 +8,7 @@ export type DBMLEndpoint = {
|
|
|
8
8
|
columnNames: string[];
|
|
9
9
|
};
|
|
10
10
|
export type DBMLInlineRef = {
|
|
11
|
-
/**
|
|
11
|
+
/** -, <, > or <>, with the ? optionality markers dropped. */
|
|
12
12
|
operator: string;
|
|
13
13
|
target: DBMLEndpoint;
|
|
14
14
|
};
|
|
@@ -28,7 +28,7 @@ export type DBMLColumn = {
|
|
|
28
28
|
export type DBMLIndex = {
|
|
29
29
|
name: string;
|
|
30
30
|
unique: boolean;
|
|
31
|
-
/**
|
|
31
|
+
/** [pk], which is DBML's only composite primary key spelling. */
|
|
32
32
|
primaryKey: boolean;
|
|
33
33
|
/** Expression columns are dropped, so these are column names only. */
|
|
34
34
|
columnNames: string[];
|
|
@@ -49,7 +49,7 @@ export type DBMLRef = {
|
|
|
49
49
|
export type DBMLModel = {
|
|
50
50
|
tables: DBMLTable[];
|
|
51
51
|
refs: DBMLRef[];
|
|
52
|
-
/** Keyed by the qualified name, so
|
|
52
|
+
/** Keyed by the qualified name, so s.status and status stay apart. */
|
|
53
53
|
enums: Record<string, string[]>;
|
|
54
54
|
skipped: string[];
|
|
55
55
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GraphQLModel } from './types';
|
|
2
2
|
export declare function resolveDataType(named: string, database: number, model: GraphQLModel): string;
|
|
3
3
|
/**
|
|
4
|
-
* Keeps the members where the column type cannot hold them. Pass
|
|
5
|
-
* drop it on the dialects whose
|
|
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
6
|
*/
|
|
7
7
|
export declare function enumCommentSuffix(named: string, model: GraphQLModel, database?: number): string;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* the flat fields below, so
|
|
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
4
|
*/
|
|
5
5
|
export type GraphQLTypeRef = {
|
|
6
6
|
named: string;
|
|
7
|
-
/** The outermost wrapper is
|
|
7
|
+
/** The outermost wrapper is NonNull -- the column-level NOT NULL signal. */
|
|
8
8
|
nonNull: boolean;
|
|
9
9
|
isList: boolean;
|
|
10
|
-
/** The
|
|
10
|
+
/** The ! inside [T!] -- a cardinality signal, never a column one. */
|
|
11
11
|
itemNonNull: boolean;
|
|
12
12
|
};
|
|
13
13
|
export type GraphQLField = {
|
|
14
|
-
/** Already rewritten by
|
|
14
|
+
/** Already rewritten by @map / @column(name:) when either is present. */
|
|
15
15
|
name: string;
|
|
16
16
|
comment: string;
|
|
17
17
|
typeRef: GraphQLTypeRef;
|
|
@@ -19,7 +19,7 @@ export type GraphQLField = {
|
|
|
19
19
|
unique: boolean;
|
|
20
20
|
autoIncrement: boolean;
|
|
21
21
|
default: string;
|
|
22
|
-
/**
|
|
22
|
+
/** @db.* or @column(dataType:); wins over the scalar lookup when set. */
|
|
23
23
|
dataType: string;
|
|
24
24
|
relationName: string;
|
|
25
25
|
/** Columns on this type. */
|
|
@@ -43,7 +43,7 @@ export type GraphQLTable = {
|
|
|
43
43
|
export type GraphQLModel = {
|
|
44
44
|
tables: GraphQLTable[];
|
|
45
45
|
enums: Record<string, string[]>;
|
|
46
|
-
/**
|
|
46
|
+
/** scalar X declarations, so an unknown name can be told from a typo. */
|
|
47
47
|
customScalars: string[];
|
|
48
48
|
unions: Record<string, string[]>;
|
|
49
49
|
/** Pruned type names, so a field pointing at one is dropped rather than read. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dineug/erd-editor",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"description": "Entity-Relationship Diagram Editor",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/erd-editor.js",
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"e2e:typecheck": "tsc -p e2e/tsconfig.json"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
+
"@chenglou/pretext": "0.0.8",
|
|
58
59
|
"@dbml/parse": "10.1.1",
|
|
59
60
|
"@dineug/erd-editor-schema": "workspace:*",
|
|
60
61
|
"@dineug/erd-editor-shiki-worker": "workspace:*",
|
|
@@ -71,15 +72,16 @@
|
|
|
71
72
|
"@storybook/addon-links": "^10.5.8",
|
|
72
73
|
"@storybook/html-vite": "^10.5.8",
|
|
73
74
|
"@types/color": "^3.0.6",
|
|
74
|
-
"@types/d3": "
|
|
75
|
+
"@types/d3-force": "3.0.9",
|
|
75
76
|
"@types/highlight-words-core": "^1.2.3",
|
|
76
77
|
"@types/luxon": "^3.4.2",
|
|
77
78
|
"@types/node": "^22.20.1",
|
|
78
79
|
"@typescript/typescript6": "6.0.2",
|
|
80
|
+
"@vitest/browser-playwright": "catalog:",
|
|
79
81
|
"@vitest/coverage-v8": "catalog:",
|
|
80
82
|
"color": "^4.2.3",
|
|
81
83
|
"comlink": "4.4.1",
|
|
82
|
-
"d3": "
|
|
84
|
+
"d3-force": "3.0.0",
|
|
83
85
|
"deepmerge": "^4.3.1",
|
|
84
86
|
"es-toolkit": "^1.50.0",
|
|
85
87
|
"framer-motion": "^11.0.28",
|
|
@@ -87,14 +89,13 @@
|
|
|
87
89
|
"graphql": "^16.14.2",
|
|
88
90
|
"happy-dom": "^20.11.2",
|
|
89
91
|
"highlight-words-core": "^1.2.2",
|
|
90
|
-
"
|
|
92
|
+
"konva": "10.3.2",
|
|
91
93
|
"lucide": "1.35.0",
|
|
92
94
|
"luxon": "^3.4.4",
|
|
93
95
|
"rxjs": "^7.8.1",
|
|
94
96
|
"stats.js": "^0.17.0",
|
|
95
97
|
"storybook": "^10.5.8",
|
|
96
98
|
"tinykeys": "^2.1.0",
|
|
97
|
-
"tslib": "^2.8.1",
|
|
98
99
|
"typescript": "7.0.2",
|
|
99
100
|
"vite": "catalog:",
|
|
100
101
|
"vite-plugin-dts": "^5.0.3",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const root: import('@dineug/r-html').CSSTemplateLiterals;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const name: import('@dineug/r-html').CSSTemplateLiterals;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const root: import('@dineug/r-html').CSSTemplateLiterals;
|
|
2
|
-
export declare const container: import('@dineug/r-html').CSSTemplateLiterals;
|
|
3
|
-
export declare const header: import('@dineug/r-html').CSSTemplateLiterals;
|
|
4
|
-
export declare const headerColor: import('@dineug/r-html').CSSTemplateLiterals;
|
|
5
|
-
export declare const headerButtonWrap: import('@dineug/r-html').CSSTemplateLiterals;
|
|
6
|
-
export declare const textarea: import('@dineug/r-html').CSSTemplateLiterals;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const cursor: import('@dineug/r-html').CSSTemplateLiterals;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const dragSelect: import('@dineug/r-html').CSSTemplateLiterals;
|
/package/dist/components/erd/canvas/{canvas-svg → relationship-group}/relationship/Relationship.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/components/{erd/canvas/table → table-view}/column/column-key/ColumnKey.styles.d.ts
RENAMED
|
File without changes
|
/package/dist/components/{erd/canvas/table → table-view}/column/column-not-null/ColumnNotNull.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/components/{erd/canvas/table → table-view}/column/column-option/ColumnOption.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|