@dineug/erd-editor 3.6.0 → 3.8.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 +21 -24
- package/dist/components/erd/automatic-table-placement/AutomaticTablePlacement.d.ts +5 -15
- package/dist/components/erd/automatic-table-placement/runElkPlacement.d.ts +23 -0
- package/dist/components/erd/canvas/CanvasScene.d.ts +3 -3
- package/dist/components/erd/canvas/entityDrag.d.ts +5 -4
- package/dist/components/erd/canvas/highlightTransition.d.ts +35 -0
- package/dist/components/erd/canvas/memo/useMoveMemo.d.ts +3 -1
- package/dist/components/erd/canvas/mixColor.d.ts +7 -0
- package/dist/components/erd/canvas/relationship-group/RelationshipGroup.d.ts +2 -0
- package/dist/components/erd/canvas/relationship-group/relationship/Relationship.d.ts +2 -0
- package/dist/components/erd/canvas/relationship-group/relationship/Relationship.template.d.ts +3 -3
- package/dist/components/erd/canvas/sceneHit.d.ts +7 -6
- package/dist/components/erd/canvas/sceneTokens.d.ts +30 -4
- package/dist/components/erd/canvas/table/Table.d.ts +7 -0
- package/dist/components/erd/canvas/table/cellLayout.d.ts +48 -18
- package/dist/components/erd/canvas/table/column/Column.d.ts +26 -0
- package/dist/components/erd/canvas/table/goToErd.d.ts +18 -0
- package/dist/components/erd/canvas/table/useMoveTable.d.ts +3 -1
- package/dist/components/erd/canvas/table/useViewPin.d.ts +19 -0
- package/dist/components/erd/canvas/useMoveEntity.d.ts +9 -2
- package/dist/components/erd/content-compass/ContentCompass.d.ts +1 -1
- package/dist/components/erd/content-compass/compassGeometry.d.ts +27 -4
- package/dist/components/erd/erd-context-menu/menus/tablePlacementMenus.d.ts +24 -0
- package/dist/components/erd/floating-toolbar/FloatingToolbar.d.ts +3 -3
- package/dist/components/erd/floating-toolbar/FloatingToolbar.styles.d.ts +3 -0
- package/dist/components/erd/floating-toolbar/ToolbarCompass.template.d.ts +14 -0
- package/dist/components/erd/minimap/MinimapScene.d.ts +1 -1
- package/dist/components/erd/minimap/minimapGeometry.d.ts +4 -3
- package/dist/components/flowCenters.d.ts +10 -0
- package/dist/components/primitives/code-block/CodeBlock.d.ts +2 -2
- package/dist/components/primitives/icon/icons.d.ts +7 -0
- package/dist/components/sceneSourceContext.d.ts +10 -0
- package/dist/components/theme-builder/ThemeBuilder.styles.d.ts +5 -0
- package/dist/components/visualization/Visualization.d.ts +3 -4
- package/dist/components/visualization/VisualizationFlow.d.ts +10 -0
- package/dist/components/visualization/VisualizationGraph.d.ts +10 -0
- package/dist/components/visualization/flowLayout.d.ts +29 -0
- package/dist/components/visualization/graphViewHandle.d.ts +33 -0
- package/dist/components/visualization/particles/ParticleLayer.d.ts +10 -0
- package/dist/components/visualization/particles/particleEdges.d.ts +15 -0
- package/dist/components/visualization/particles/particleLoop.d.ts +28 -0
- package/dist/components/visualization/particles/particlePath.d.ts +83 -0
- package/dist/components/visualization/useViewGestures.d.ts +24 -0
- package/dist/components/visualization/visualization-toolbar/VisualizationToolbar.d.ts +10 -0
- package/dist/components/visualization/visualization-toolbar/VisualizationToolbar.styles.d.ts +4 -0
- package/dist/components/visualization/visualizationView.d.ts +29 -5
- package/dist/components/visualization/zoomVisualization.d.ts +20 -0
- package/dist/constants/layout.d.ts +50 -0
- package/dist/constants/tablePlacement.d.ts +16 -0
- package/dist/constants/zoom.d.ts +7 -0
- package/dist/engine/actions.d.ts +6 -0
- package/dist/engine/index.js +12 -12
- package/dist/engine/modules/editor/actions.d.ts +60 -2
- package/dist/engine/modules/editor/atom.actions.d.ts +136 -0
- package/dist/engine/modules/editor/generator.actions.d.ts +16 -4
- package/dist/engine/modules/editor/state.d.ts +41 -0
- package/dist/engine/modules/editor/view.actions.d.ts +270 -0
- package/dist/engine/modules/editor/view.d.ts +28 -0
- package/dist/engine/modules/editor/view.generator.actions.d.ts +24 -0
- package/dist/engine/modules/settings/atom.actions.d.ts +17 -3
- package/dist/engine/modules/settings/generator.actions.d.ts +6 -4
- package/dist/engine/rx-operators/viewActionRedirect.d.ts +10 -0
- package/dist/engine/rx-operators/viewIgnoreFilter.d.ts +10 -0
- package/dist/erd-editor.umd.js +319 -282
- package/dist/index.d.ts +0 -1
- package/dist/index.dev.d.ts +0 -1
- package/dist/index.js +6238 -4937
- package/dist/konva/scene/columnDropTarget.d.ts +2 -1
- package/dist/konva/scene/contentBounds.d.ts +12 -5
- package/dist/konva/scene/fitZoom.d.ts +16 -0
- package/dist/konva/scene/metrics.d.ts +6 -5
- package/dist/konva/scene/viewFreeze.d.ts +10 -7
- package/dist/konva/scene/viewLayout.d.ts +89 -0
- package/dist/konva/scene/viewport.d.ts +17 -4
- package/dist/{schemaGCService--wGet5O7.js → schemaGCService-CXVjeF9p.js} +3145 -2655
- package/dist/services/elk-layout/elkGraph.d.ts +83 -0
- package/dist/services/elk-layout/elkLayout.shared-worker.d.ts +2 -0
- package/dist/services/elk-layout/elkLayoutOptions.d.ts +46 -0
- package/dist/services/elk-layout/elkLayoutService.d.ts +25 -0
- package/dist/services/elk-layout/elkWorkerRealm.d.ts +2 -0
- package/dist/services/elk-layout/index.d.ts +19 -0
- package/dist/services/shiki/index.d.ts +10 -0
- package/dist/services/shiki/shiki.shared-worker.d.ts +2 -0
- package/dist/services/shiki/shikiService.d.ts +18 -0
- package/dist/utils/calcTable.d.ts +27 -1
- package/dist/utils/clickGesture.d.ts +19 -0
- package/dist/utils/domEvent.d.ts +12 -0
- package/dist/utils/draw-relationship/bezier.d.ts +32 -0
- package/dist/utils/draw-relationship/calc.d.ts +6 -1
- package/dist/utils/draw-relationship/geometrySource.d.ts +9 -0
- package/dist/utils/draw-relationship/incremental.d.ts +7 -1
- package/dist/utils/draw-relationship/index.d.ts +37 -11
- package/dist/utils/draw-relationship/pathFinding.d.ts +2 -1
- package/dist/utils/draw-relationship/route.d.ts +5 -3
- package/dist/utils/draw-relationship/sort.d.ts +2 -1
- package/dist/utils/draw-relationship/stub.d.ts +9 -4
- package/dist/utils/emitter.d.ts +18 -7
- package/dist/utils/globalEventObservable.d.ts +6 -1
- package/dist/utils/keyboard-shortcut/index.d.ts +2 -1
- package/dist/utils/promise.d.ts +6 -0
- package/dist/workers/elkLayout.shared-worker.js +1 -0
- package/dist/workers/exportPng.shared-worker.js +26 -26
- package/dist/workers/shiki.shared-worker.js +1 -0
- package/dist/workers/spawn.d.ts +5 -3
- package/dist/workers/spawn.inline.d.ts +2 -0
- package/package.json +7 -4
- package/dist/services/shikiService.d.ts +0 -9
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { RootState } from '../../state';
|
|
2
|
+
import { GeometrySource, ViewSource } from '../../../utils/draw-relationship/geometrySource';
|
|
3
|
+
import { SceneView, ViewKind } from './state';
|
|
4
|
+
/**
|
|
5
|
+
* The view the reader stands in, or null in the document itself. A Flow view
|
|
6
|
+
* counts only while the visualization tab shows it, so one kept across tabs is
|
|
7
|
+
* open but not stood in.
|
|
8
|
+
*/
|
|
9
|
+
export declare const getActiveView: (state: RootState) => SceneView | null;
|
|
10
|
+
/**
|
|
11
|
+
* Whether a scene is drawing the view of the kind given: an open Flow view
|
|
12
|
+
* only while its tab shows Flow. One kept across tabs is open but unseen, and
|
|
13
|
+
* nothing reads its geometry until it is back.
|
|
14
|
+
*/
|
|
15
|
+
export declare const isViewShown: (state: RootState, kind: ViewSource) => boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The view a scene drawn from the source given reads, open or not: the slot
|
|
18
|
+
* of that kind, and null for the document. A scene reads its own slot and
|
|
19
|
+
* never the active one, so an export of the document is never drawn from a view.
|
|
20
|
+
*/
|
|
21
|
+
export declare const getSourceView: (state: RootState, source: GeometrySource) => SceneView | null;
|
|
22
|
+
/**
|
|
23
|
+
* A view just opened: nothing placed yet, the neutral placement a fit will
|
|
24
|
+
* replace, and the display its centers ask for. Narrowed to a few tables it
|
|
25
|
+
* opens on the key rows; over the whole document it draws name boxes.
|
|
26
|
+
*/
|
|
27
|
+
export declare function createSceneView(kind: ViewKind, centerIds?: string[]): SceneView;
|
|
28
|
+
//# sourceMappingURL=view.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { GeneratorAction } from '../../generator.actions';
|
|
2
|
+
import { SelectType } from './state';
|
|
3
|
+
/**
|
|
4
|
+
* The centers a focus from the ERD takes: every table the selection holds, and
|
|
5
|
+
* the one a menu was raised over alone when the selection does not hold it, so
|
|
6
|
+
* a group is focused as one exactly as it is dragged as one. A memo is no center.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* store.dispatch(focusFlowTableAction$(focusCentersOf(editor.selectedMap, tableId)));
|
|
10
|
+
*/
|
|
11
|
+
export declare function focusCentersOf(selectedMap: Record<string, SelectType>, tableId?: string): string[];
|
|
12
|
+
/**
|
|
13
|
+
* Stands the reader on the tables given in the Flow view: the visualization
|
|
14
|
+
* tab comes up on Flow, a view is opened if none is, and what it shows narrows
|
|
15
|
+
* to those centers and their neighbours. No ids and it stands.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* store.dispatch(focusFlowTableAction$(['orders']));
|
|
19
|
+
*/
|
|
20
|
+
export declare const focusFlowTableAction$: (tableIds: string[]) => GeneratorAction;
|
|
21
|
+
export declare const viewActions$: {
|
|
22
|
+
focusFlowTableAction$: (tableIds: string[]) => GeneratorAction;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=view.generator.actions.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Viewport } from '../editor/state';
|
|
2
2
|
import { RootState } from '../../state';
|
|
3
3
|
import { Point } from '../../../internal-types';
|
|
4
|
+
import { GeometrySource } from '../../../utils/draw-relationship/geometrySource';
|
|
4
5
|
import { ActionMap, ActionType, ReducerType } from './actions';
|
|
5
6
|
import { ScrollRange } from './scrollRange';
|
|
6
7
|
export type { ScrollRange } from './scrollRange';
|
|
@@ -42,7 +43,7 @@ export declare const hasViewport: ({ width, height }: Viewport) => boolean;
|
|
|
42
43
|
* edge meeting the near edge of the screen to its near edge meeting the far
|
|
43
44
|
* one. An empty document and an unmeasured screen have no travel to offer.
|
|
44
45
|
*/
|
|
45
|
-
export declare function getContentScrollRanges(state: RootState): ScrollRanges;
|
|
46
|
+
export declare function getContentScrollRanges(state: RootState, source?: GeometrySource): ScrollRanges;
|
|
46
47
|
/**
|
|
47
48
|
* The origin a load settles on: kept where the file put it while any of the
|
|
48
49
|
* content is drawn there, else pulled to where a screen's worth of it, or all
|
|
@@ -54,14 +55,14 @@ export declare function getOpeningOrigin(state: RootState): Point;
|
|
|
54
55
|
* content's own range widened to hold the origin where it stands and, while a
|
|
55
56
|
* drag holds the view, the origin it started from, so it never shifts under the drag.
|
|
56
57
|
*/
|
|
57
|
-
export declare function getScrollRanges(state: RootState): ScrollRanges;
|
|
58
|
+
export declare function getScrollRanges(state: RootState, source?: GeometrySource): ScrollRanges;
|
|
58
59
|
export type ScrollMovement = ActionMap[typeof ActionType.streamScrollTo];
|
|
59
60
|
/**
|
|
60
61
|
* The step of a thumb or handle drag cut to the hull it is drawn over, so the
|
|
61
62
|
* origin lands on the end of the travel rather than a step past it. An
|
|
62
63
|
* unmeasured screen has no travel to cut against and hands the step back as it is.
|
|
63
64
|
*/
|
|
64
|
-
export declare function clampScrollMovement(state: RootState, { movementX, movementY }: ScrollMovement): ScrollMovement;
|
|
65
|
+
export declare function clampScrollMovement(state: RootState, { movementX, movementY }: ScrollMovement, source?: GeometrySource): ScrollMovement;
|
|
65
66
|
export declare const scrollToAction: {
|
|
66
67
|
(payload: {
|
|
67
68
|
originX: number;
|
|
@@ -84,6 +85,19 @@ export declare const streamScrollToAction: {
|
|
|
84
85
|
toString(): string;
|
|
85
86
|
type: string;
|
|
86
87
|
};
|
|
88
|
+
/**
|
|
89
|
+
* The scroll a scene dispatches lands where that scene reads: the document's
|
|
90
|
+
* own for the document scene, and the view of the source's kind, named, for a
|
|
91
|
+
* view scene, so neither of two scenes on one page ever scrolls the other.
|
|
92
|
+
*/
|
|
93
|
+
export declare const sceneScrollToAction: (source: GeometrySource, payload: ActionMap[typeof ActionType.scrollTo]) => import('@dineug/r-html').AnyAction<{
|
|
94
|
+
originX: number;
|
|
95
|
+
originY: number;
|
|
96
|
+
}>;
|
|
97
|
+
export declare const sceneStreamScrollToAction: (source: GeometrySource, payload: ScrollMovement) => import('@dineug/r-html').AnyAction<{
|
|
98
|
+
movementX: number;
|
|
99
|
+
movementY: number;
|
|
100
|
+
}>;
|
|
87
101
|
export declare const changeShowAction: {
|
|
88
102
|
(payload: {
|
|
89
103
|
show: number;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { GeneratorAction } from '../../generator.actions';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { GeometrySource } from '../../../utils/draw-relationship/geometrySource';
|
|
3
|
+
/** The origin it adds the movement to is the one getMovementScrollTo solved against. */
|
|
4
|
+
export declare const changeZoomLevelAction$: (value: number, source?: GeometrySource) => GeneratorAction;
|
|
5
|
+
export declare const streamZoomLevelAction$: (value: number, source?: GeometrySource) => GeneratorAction;
|
|
4
6
|
export declare const actions$: {
|
|
5
|
-
changeZoomLevelAction$: (value: number) => GeneratorAction;
|
|
6
|
-
streamZoomLevelAction$: (value: number) => GeneratorAction;
|
|
7
|
+
changeZoomLevelAction$: (value: number, source?: GeometrySource) => GeneratorAction;
|
|
8
|
+
streamZoomLevelAction$: (value: number, source?: GeometrySource) => GeneratorAction;
|
|
7
9
|
};
|
|
8
10
|
//# sourceMappingURL=generator.actions.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AnyAction } from '@dineug/r-html';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { SceneView } from '../modules/editor/state';
|
|
4
|
+
/**
|
|
5
|
+
* Turns a scroll or zoom into the view's own while a view is active. Pure by
|
|
6
|
+
* contract: the chain it sits in is cold with two subscribers, so this runs
|
|
7
|
+
* twice per emission and must map the same input to the same output untouched.
|
|
8
|
+
*/
|
|
9
|
+
export declare const viewActionRedirect: (getActiveView: () => SceneView | null) => (source$: Observable<Array<AnyAction>>) => Observable<AnyAction[]>;
|
|
10
|
+
//# sourceMappingURL=viewActionRedirect.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AnyAction } from '@dineug/r-html';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { SceneView } from '../modules/editor/state';
|
|
4
|
+
/**
|
|
5
|
+
* Drops the document edits while a view is active, the way readonlyIgnoreFilter
|
|
6
|
+
* drops them for a readonly host, so the view a reader stands in never writes
|
|
7
|
+
* the document under it. A pass tag lets an action through regardless.
|
|
8
|
+
*/
|
|
9
|
+
export declare const viewIgnoreFilter: (getActiveView: () => SceneView | null, passTags?: number[]) => (source$: Observable<Array<AnyAction>>) => Observable<AnyAction[]>;
|
|
10
|
+
//# sourceMappingURL=viewIgnoreFilter.d.ts.map
|