@dineug/erd-editor 3.7.0 → 3.9.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 +1 -1
- package/dist/components/erd/automatic-table-placement/AutomaticTablePlacement.d.ts +0 -15
- package/dist/components/erd/automatic-table-placement/runElkPlacement.d.ts +11 -0
- package/dist/components/erd/canvas/CanvasScene.d.ts +3 -3
- package/dist/components/erd/canvas/column-drag-ghost/ColumnDragGhost.d.ts +10 -0
- package/dist/components/erd/canvas/column-drag-ghost/columnDragPointer.d.ts +28 -0
- 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 +58 -6
- package/dist/components/erd/canvas/table/Table.d.ts +7 -0
- package/dist/components/erd/canvas/table/cellLayout.d.ts +50 -20
- package/dist/components/erd/canvas/table/colorEdge.d.ts +10 -0
- package/dist/components/erd/canvas/table/column/Column.d.ts +35 -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 +15 -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/diff-viewer/diff.d.ts +9 -2
- package/dist/components/erd/diff-viewer/diffContext.d.ts +9 -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/context-menu/context-menu-content/ContextMenuContent.d.ts +2 -0
- package/dist/components/primitives/context-menu/context-menu-content/fitMenu.d.ts +20 -0
- package/dist/components/primitives/icon/icons.d.ts +5 -2
- package/dist/components/sceneSourceContext.d.ts +10 -0
- package/dist/components/table-view/Table.styles.d.ts +6 -1
- package/dist/components/table-view/column/useColumnCell.d.ts +5 -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/Visualization.styles.d.ts +4 -1
- package/dist/components/visualization/VisualizationFlow.d.ts +10 -0
- package/dist/components/visualization/VisualizationGraph.d.ts +10 -0
- package/dist/components/visualization/captureDrag.d.ts +14 -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 +74 -1
- package/dist/constants/tablePlacement.d.ts +4 -3
- 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 +19 -6
- 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 +21 -4
- package/dist/engine/rx-operators/viewActionRedirect.d.ts +10 -0
- package/dist/engine/rx-operators/viewIgnoreFilter.d.ts +10 -0
- package/dist/engine/rx-store.d.ts +1 -0
- package/dist/engine/tag.d.ts +2 -0
- package/dist/erd-editor.umd.js +365 -314
- package/dist/hooks/usePinchZoom.d.ts +27 -0
- package/dist/index.js +6750 -5202
- package/dist/konva/scene/columnDropTarget.d.ts +12 -4
- 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 +94 -0
- package/dist/konva/scene/viewport.d.ts +23 -4
- package/dist/{schemaGCService--wGet5O7.js → schemaGCService-CFiz1xOG.js} +3725 -3132
- package/dist/services/elk-layout/elkGraph.d.ts +40 -1
- package/dist/services/elk-layout/elkLayoutOptions.d.ts +22 -1
- package/dist/services/elk-layout/elkLayoutService.d.ts +5 -1
- package/dist/services/elk-layout/index.d.ts +10 -4
- package/dist/styles/elevation.styles.d.ts +7 -0
- package/dist/themes/radix-ui-theme.config.d.ts +12 -0
- package/dist/themes/tokens.d.ts +7 -0
- package/dist/utils/calcTable.d.ts +23 -1
- package/dist/utils/clickGesture.d.ts +19 -0
- package/dist/utils/domEvent.d.ts +8 -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 +4 -0
- package/dist/utils/keyboard-shortcut/index.d.ts +2 -1
- package/dist/utils/pinch.d.ts +34 -0
- package/dist/utils/validation.d.ts +1 -0
- package/dist/workers/elkLayout.shared-worker.js +1 -1
- package/dist/workers/exportPng.shared-worker.js +26 -26
- package/package.json +3 -3
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { RxStore } from '../../../engine/rx-store';
|
|
1
2
|
import { RootState } from '../../../engine/state';
|
|
2
3
|
import { Point } from '../../../internal-types';
|
|
4
|
+
import { Rect } from '../../../konva/scene/metrics';
|
|
5
|
+
import { GeometrySource } from '../../../utils/draw-relationship/geometrySource';
|
|
3
6
|
/** Which way the nearest entity lies and how far, while the screen holds none. */
|
|
4
7
|
export type ContentCompass = {
|
|
5
8
|
/** Degrees clockwise from east, which is the rotation the arrow is drawn at. */
|
|
@@ -10,11 +13,31 @@ export type ContentCompass = {
|
|
|
10
13
|
target: Point;
|
|
11
14
|
};
|
|
12
15
|
/**
|
|
13
|
-
* Where the nearest
|
|
14
|
-
* from the screen's own middle. Null while any
|
|
15
|
-
* touching it counting as reaching it, and null
|
|
16
|
+
* Where the nearest of the rects stands when the screen holds none of them,
|
|
17
|
+
* measured from the screen's own middle. Null while any of them reaches the
|
|
18
|
+
* screen, touching it counting as reaching it, and null where there are none.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* const compass = nearestContent(getContentRects(state, [], source), screen);
|
|
16
22
|
*/
|
|
17
|
-
export declare function
|
|
23
|
+
export declare function nearestContent(rects: Iterable<Rect>, screen: Rect): ContentCompass | null;
|
|
24
|
+
/**
|
|
25
|
+
* Where the nearest entity stands when the screen shows none of them, in the
|
|
26
|
+
* scene the source names. Null while any table or memo reaches the screen and
|
|
27
|
+
* null while nobody has measured one.
|
|
28
|
+
*/
|
|
29
|
+
export declare function getContentCompass(state: RootState, source?: GeometrySource): ContentCompass | null;
|
|
30
|
+
/** Small enough beside a label or a button to read as a mark rather than one. */
|
|
31
|
+
export declare const COMPASS_ARROW_SIZE = 14;
|
|
32
|
+
/**
|
|
33
|
+
* Puts the nearest entity in the middle of the screen of the source given, and
|
|
34
|
+
* does nothing while the screen holds one. Read on the press rather than closed
|
|
35
|
+
* over by the render that drew the arrow, since a wheel between the two moves the screen.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* scrollToNearestContent(store, ViewKind.flow);
|
|
39
|
+
*/
|
|
40
|
+
export declare function scrollToNearestContent(store: RxStore, source?: GeometrySource): void;
|
|
18
41
|
/**
|
|
19
42
|
* The gap as the pill prints it: whole scene units under a thousand, then
|
|
20
43
|
* thousands, millions and billions carrying one decimal under ten, so the label
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { RootState } from '../../../engine/state';
|
|
2
2
|
import { Column, Table } from '../../../internal-types';
|
|
3
|
+
import { Theme } from '../../../themes/tokens';
|
|
3
4
|
/**
|
|
4
5
|
* Map<uuid, [tag, Map<path, diff>]>
|
|
5
6
|
*/
|
|
6
7
|
export type DiffMap = Map<string, DiffTuple>;
|
|
7
|
-
|
|
8
|
+
/** Map<path, diff> for one entity, each path spelled as the FocusType of the cell showing it. */
|
|
9
|
+
export type DiffPaths = Map<string, number>;
|
|
10
|
+
type DiffTuple = [string, DiffPaths];
|
|
8
11
|
type NameToTableMap = Map<string, {
|
|
9
12
|
table: Table;
|
|
10
13
|
nameToColumnMap: Map<string, Column>;
|
|
@@ -15,6 +18,10 @@ export declare const Diff: {
|
|
|
15
18
|
};
|
|
16
19
|
export declare function diffState(prevState: RootState, state: RootState): [DiffMap, DiffMap];
|
|
17
20
|
export declare function getNameToTableMap({ doc: { tableIds }, collections, }: RootState): NameToTableMap;
|
|
18
|
-
|
|
21
|
+
/**
|
|
22
|
+
* The background a cell of one entity sits on in a diff pane: the insert or the
|
|
23
|
+
* delete colour its own path carries, and null for a path that did not change.
|
|
24
|
+
*/
|
|
25
|
+
export declare function diffFill(theme: Theme, paths: DiffPaths | null | undefined, path: string): string | null;
|
|
19
26
|
export {};
|
|
20
27
|
//# sourceMappingURL=diff.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DiffMap } from './diff';
|
|
2
|
+
import { Ctx } from '../../../internal-types';
|
|
3
|
+
/**
|
|
4
|
+
* The changes a diff pane tints its cells by. ErdViewer alone provides one, so
|
|
5
|
+
* every other scene reads null and draws no tint, and no node for one either.
|
|
6
|
+
*/
|
|
7
|
+
export declare const diffContext: import('@dineug/r-html').Context<DiffMap | null>;
|
|
8
|
+
export declare const useDiffMap: (ctx: Ctx) => import('@dineug/r-html').Ref<DiffMap | null>;
|
|
9
|
+
//# sourceMappingURL=diffContext.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FC } from '@dineug/r-html';
|
|
2
2
|
export type FloatingToolbarProps = {};
|
|
3
3
|
/**
|
|
4
|
-
* The
|
|
5
|
-
* next relationship is drawn in,
|
|
6
|
-
*
|
|
4
|
+
* The bar over the bottom of the canvas: which of the two a press means, the
|
|
5
|
+
* zoom, the notation the next relationship is drawn in, zen mode, and which
|
|
6
|
+
* way the content lies once the screen holds none. It is the one surface zen mode leaves standing.
|
|
7
7
|
*/
|
|
8
8
|
declare const FloatingToolbar: FC<FloatingToolbarProps>;
|
|
9
9
|
export default FloatingToolbar;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export declare const root: import('@dineug/r-html').CSSTemplateLiterals;
|
|
2
2
|
export declare const menu: import('@dineug/r-html').CSSTemplateLiterals;
|
|
3
|
+
export declare const readout: import('@dineug/r-html').CSSTemplateLiterals;
|
|
3
4
|
export declare const divider: import('@dineug/r-html').CSSTemplateLiterals;
|
|
5
|
+
export declare const compass: import('@dineug/r-html').CSSTemplateLiterals;
|
|
6
|
+
export declare const compassDistance: import('@dineug/r-html').CSSTemplateLiterals;
|
|
4
7
|
//# sourceMappingURL=FloatingToolbar.styles.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DOMTemplateLiterals } from '@dineug/r-html';
|
|
2
|
+
import { ContentCompass } from '../content-compass/compassGeometry';
|
|
3
|
+
export type ToolbarCompassOptions = {
|
|
4
|
+
compass: ContentCompass | null;
|
|
5
|
+
className?: string;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* The last group of a bottom bar once the screen holds no content: which way it
|
|
10
|
+
* lies and how far. A template rather than a component, so the label changes in
|
|
11
|
+
* the same pass as the bar and a menu anchored over it moves with it.
|
|
12
|
+
*/
|
|
13
|
+
export declare function toolbarCompass({ compass, className, onClick, }: ToolbarCompassOptions): DOMTemplateLiterals | null;
|
|
14
|
+
//# sourceMappingURL=ToolbarCompass.template.d.ts.map
|
|
@@ -2,7 +2,7 @@ import { FC } from '@dineug/r-html';
|
|
|
2
2
|
import { Stage } from 'konva/lib/Stage';
|
|
3
3
|
export type MinimapSceneProps = {};
|
|
4
4
|
/**
|
|
5
|
-
* The whole
|
|
5
|
+
* The whole scene on one layer, with no culling: a thumbnail that dropped
|
|
6
6
|
* what is off screen would stop being a map of where the rest of it is. Boxes
|
|
7
7
|
* only, because a connector between two of them is noise at this size.
|
|
8
8
|
*/
|
|
@@ -3,6 +3,7 @@ import { RootState } from '../../../engine/state';
|
|
|
3
3
|
import { Point } from '../../../internal-types';
|
|
4
4
|
import { Rect } from '../../../konva/scene/metrics';
|
|
5
5
|
import { SceneTransform } from '../../../konva/scene/viewport';
|
|
6
|
+
import { GeometrySource } from '../../../utils/draw-relationship/geometrySource';
|
|
6
7
|
/** The scene placement plus the screen looking at it, which is all a visible rect is read from. */
|
|
7
8
|
export type ViewTransform = SceneTransform & {
|
|
8
9
|
viewportWidth: number;
|
|
@@ -45,8 +46,8 @@ export type MinimapLayout = {
|
|
|
45
46
|
/** Where the box sits inside the MINIMAP_SIZE square, centred along its shorter side. */
|
|
46
47
|
offset: Point;
|
|
47
48
|
};
|
|
48
|
-
/** The
|
|
49
|
-
export declare function getViewTransform(state: RootState): ViewTransform;
|
|
49
|
+
/** The placement as the store holds it, for every reader that maps the screen onto the thumbnail. */
|
|
50
|
+
export declare function getViewTransform(state: RootState, source?: GeometrySource): ViewTransform;
|
|
50
51
|
/**
|
|
51
52
|
* The scene the screen actually covers, read back through the very origin
|
|
52
53
|
* getSceneOrigin places the scene layer at. One screen pixel buys one over the
|
|
@@ -64,7 +65,7 @@ export declare function getReachRect(view: ViewTransform, { left, top }: ScrollR
|
|
|
64
65
|
* around it, snapped to the grid, then widened along its shorter side where
|
|
65
66
|
* that would draw under MINIMAP_BOX_MIN_SIDE. A drag holds its content still.
|
|
66
67
|
*/
|
|
67
|
-
export declare function getMinimapLayout(state: RootState): MinimapLayout;
|
|
68
|
+
export declare function getMinimapLayout(state: RootState, source?: GeometrySource): MinimapLayout;
|
|
68
69
|
/** A scene point in the thumbnail's own pixels; scene zero lands where the layer is placed. */
|
|
69
70
|
export declare function toMinimapPoint({ map, ratio }: MinimapLayout, point: Point): Point;
|
|
70
71
|
/** The scene point under a thumbnail pixel, the mapping above inverted. */
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AppContext } from './appContext';
|
|
2
|
+
/**
|
|
3
|
+
* Narrows the Flow view to the tables given and their one hop. State alone:
|
|
4
|
+
* the placement loop reads the display set it names and asks for the layout,
|
|
5
|
+
* so this and the mount never hold two answers to the one question.
|
|
6
|
+
*/
|
|
7
|
+
export declare function focusFlowView(app: AppContext, tableIds: string[]): void;
|
|
8
|
+
/** Widens the Flow view back to everything it placed, through that same one channel: state alone. */
|
|
9
|
+
export declare function showAllFlowView(app: AppContext): void;
|
|
10
|
+
//# sourceMappingURL=flowCenters.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type MenuBox = {
|
|
2
|
+
left: number;
|
|
3
|
+
top: number;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
};
|
|
7
|
+
export type WindowSize = {
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* How far a menu drawn at box moves into the window: back from the right and
|
|
13
|
+
* bottom edges, never past the left and top. A submenu the right edge cuts
|
|
14
|
+
* flips to end at flipRight instead, unless the left edge would cut it more.
|
|
15
|
+
*/
|
|
16
|
+
export declare function fitMenu(box: MenuBox, view: WindowSize, flipRight?: number): {
|
|
17
|
+
dx: number;
|
|
18
|
+
dy: number;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=fitMenu.d.ts.map
|
|
@@ -4,25 +4,26 @@ export declare const ICON_VIEW_BOX = "0 0 24 24";
|
|
|
4
4
|
export declare const ICON_STROKE_WIDTH = 2;
|
|
5
5
|
export type IconNodeChild = IconNode[number];
|
|
6
6
|
declare const LUCIDE_ICON: {
|
|
7
|
-
'align-horizontal-distribute-center': IconNode;
|
|
8
|
-
'align-vertical-distribute-center': IconNode;
|
|
9
7
|
'arrow-right': IconNode;
|
|
10
8
|
atom: IconNode;
|
|
11
9
|
braces: IconNode;
|
|
12
10
|
brackets: IconNode;
|
|
13
11
|
'case-sensitive': IconNode;
|
|
14
12
|
check: IconNode;
|
|
13
|
+
'chevron-down': IconNode;
|
|
15
14
|
'chevron-right': IconNode;
|
|
16
15
|
code: IconNode;
|
|
17
16
|
contrast: IconNode;
|
|
18
17
|
copy: IconNode;
|
|
19
18
|
database: IconNode;
|
|
20
19
|
diff: IconNode;
|
|
20
|
+
'external-link': IconNode;
|
|
21
21
|
eye: IconNode;
|
|
22
22
|
'file-diff': IconNode;
|
|
23
23
|
'file-image': IconNode;
|
|
24
24
|
'file-input': IconNode;
|
|
25
25
|
'file-output': IconNode;
|
|
26
|
+
fullscreen: IconNode;
|
|
26
27
|
'grip-vertical': IconNode;
|
|
27
28
|
hand: IconNode;
|
|
28
29
|
'key-round': IconNode;
|
|
@@ -31,6 +32,7 @@ declare const LUCIDE_ICON: {
|
|
|
31
32
|
minus: IconNode;
|
|
32
33
|
'moon-star': IconNode;
|
|
33
34
|
'mouse-pointer-2': IconNode;
|
|
35
|
+
network: IconNode;
|
|
34
36
|
palette: IconNode;
|
|
35
37
|
plus: IconNode;
|
|
36
38
|
'redo-2': IconNode;
|
|
@@ -43,6 +45,7 @@ declare const LUCIDE_ICON: {
|
|
|
43
45
|
'sticky-note': IconNode;
|
|
44
46
|
sun: IconNode;
|
|
45
47
|
table: IconNode;
|
|
48
|
+
'table-2': IconNode;
|
|
46
49
|
'table-properties': IconNode;
|
|
47
50
|
'undo-2': IconNode;
|
|
48
51
|
'wand-sparkles': IconNode;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Ctx } from '../internal-types';
|
|
2
|
+
import { GeometrySource } from '../utils/draw-relationship/geometrySource';
|
|
3
|
+
/**
|
|
4
|
+
* Which coordinate system the scene a component sits in is drawn from. Each
|
|
5
|
+
* root that opens a scene provides its own inside its wrapper, so an export or
|
|
6
|
+
* a minimap of the document keeps it while a Flow scene beside them reads its view.
|
|
7
|
+
*/
|
|
8
|
+
export declare const sceneSourceContext: import('@dineug/r-html').Context<GeometrySource>;
|
|
9
|
+
export declare const useSceneSource: (ctx: Ctx) => import('@dineug/r-html').Ref<GeometrySource>;
|
|
10
|
+
//# sourceMappingURL=sceneSourceContext.d.ts.map
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
export declare const root: import('@dineug/r-html').CSSTemplateLiterals;
|
|
2
|
+
/** The band the name stands in, one input line and its room as in the scene. */
|
|
2
3
|
export declare const header: import('@dineug/r-html').CSSTemplateLiterals;
|
|
4
|
+
/**
|
|
5
|
+
* The colour along the left edge, over the border. The box is wider than the
|
|
6
|
+
* corner it rounds and cut back to the strip, since a radius wider than its
|
|
7
|
+
* own box is scaled down to fit and would no longer follow the card's.
|
|
8
|
+
*/
|
|
3
9
|
export declare const headerColor: import('@dineug/r-html').CSSTemplateLiterals;
|
|
4
|
-
export declare const headerButtonWrap: import('@dineug/r-html').CSSTemplateLiterals;
|
|
5
10
|
export declare const headerInputWrap: import('@dineug/r-html').CSSTemplateLiterals;
|
|
6
11
|
//# sourceMappingURL=Table.styles.d.ts.map
|
|
@@ -8,6 +8,11 @@ export type ColumnCellProps = {
|
|
|
8
8
|
value: string;
|
|
9
9
|
onEditEnd?: () => void;
|
|
10
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* The hints a typed data type offers: a fuzzy match over the names, or none
|
|
13
|
+
* for blank text and for text that has gone past a whole name.
|
|
14
|
+
*/
|
|
15
|
+
export declare function searchDataTypeHints(hints: DataTypeHint[], value: string): DataTypeHint[];
|
|
11
16
|
/**
|
|
12
17
|
* Data type autocomplete state and key handling for a column cell, shared by
|
|
13
18
|
* the DOM cell and by the Konva cell that replaces it.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A panel placed over whichever tab is up. The tab wrapper raises no stacking
|
|
3
|
+
* context of its own, so a raised descendant inside it would paint over an
|
|
4
|
+
* unraised sibling; the same step, later in the root, keeps this panel on top.
|
|
5
|
+
*/
|
|
1
6
|
export declare const root: import('@dineug/r-html').CSSTemplateLiterals;
|
|
2
7
|
export declare const title: import('@dineug/r-html').CSSTemplateLiterals;
|
|
3
8
|
export declare const subTitle: import('@dineug/r-html').CSSTemplateLiterals;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { FC } from '@dineug/r-html';
|
|
2
|
-
import { Visualization } from './createVisualization';
|
|
3
2
|
export type VisualizationProps = {};
|
|
4
3
|
/**
|
|
5
|
-
* The
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* The tab, which mounts one of its two modes at a time and the toolbar that
|
|
5
|
+
* picks between them. Each mode builds its own Stage on mount, so the choice
|
|
6
|
+
* is which sibling stands here rather than a branch inside one of them.
|
|
8
7
|
*/
|
|
9
8
|
declare const Visualization: FC<VisualizationProps>;
|
|
10
9
|
export default Visualization;
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
* Stage, so nothing here is ever larger than the box it sits in.
|
|
4
4
|
*/
|
|
5
5
|
export declare const root: import('@dineug/r-html').CSSTemplateLiterals;
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* The Stage container, viewport sized, which konva fills with its own canvas.
|
|
8
|
+
* It takes every touch itself, so a pinch on it zooms the graph and not the page.
|
|
9
|
+
*/
|
|
7
10
|
export declare const stage: import('@dineug/r-html').CSSTemplateLiterals;
|
|
8
11
|
//# sourceMappingURL=Visualization.styles.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC } from '@dineug/r-html';
|
|
2
|
+
export type VisualizationFlowProps = {};
|
|
3
|
+
/**
|
|
4
|
+
* The Flow mode of the tab: the tables of a display set, placed once by ELK
|
|
5
|
+
* and kept for the session, drawn by the same scene the ERD is. The wheel
|
|
6
|
+
* moves the screen and a drag on the background pans, as the ERD tab reads them.
|
|
7
|
+
*/
|
|
8
|
+
declare const VisualizationFlow: FC<VisualizationFlowProps>;
|
|
9
|
+
export default VisualizationFlow;
|
|
10
|
+
//# sourceMappingURL=VisualizationFlow.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC } from '@dineug/r-html';
|
|
2
|
+
export type VisualizationGraphProps = {};
|
|
3
|
+
/**
|
|
4
|
+
* The Graph mode of the tab, the force graph: the Stage container, the wheel
|
|
5
|
+
* that zooms it, and the table preview that opens over a hovered table dot.
|
|
6
|
+
* The layout, the view and the hover live in one observable here and never reach the store.
|
|
7
|
+
*/
|
|
8
|
+
declare const VisualizationGraph: FC<VisualizationGraphProps>;
|
|
9
|
+
export default VisualizationGraph;
|
|
10
|
+
//# sourceMappingURL=VisualizationGraph.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { KonvaEventObject } from 'konva/lib/Node';
|
|
2
|
+
import { Subscription } from 'rxjs';
|
|
3
|
+
import { DragMove } from '../../utils/globalEventObservable';
|
|
4
|
+
export type CapturedDragObserver = {
|
|
5
|
+
next: (move: DragMove) => void;
|
|
6
|
+
complete: () => void;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Follows a drag pressed on a konva shape, holding the pointer on that shape
|
|
10
|
+
* until the lift. Konva tests a move against the hit graph the last draw left,
|
|
11
|
+
* so a pointer faster than a draw would otherwise leave the shape it holds.
|
|
12
|
+
*/
|
|
13
|
+
export declare function captureDrag(event: KonvaEventObject<Event>, { next, complete }: CapturedDragObserver): Subscription;
|
|
14
|
+
//# sourceMappingURL=captureDrag.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AppContext } from '../appContext';
|
|
2
|
+
import { RxStore } from '../../engine/rx-store';
|
|
3
|
+
/**
|
|
4
|
+
* Fits what the Flow view shows into the screen, the way a placement preview
|
|
5
|
+
* opens, with no ceiling but the zoom's own: a view is read up close as
|
|
6
|
+
* readily as from afar, where a preview of the whole document is only ever the latter.
|
|
7
|
+
*/
|
|
8
|
+
export declare function fitFlowView(store: RxStore): void;
|
|
9
|
+
/**
|
|
10
|
+
* The one place a Flow placement is asked for. The landing the display set
|
|
11
|
+
* already has under this key is stood back on, an ask already out for it is
|
|
12
|
+
* joined, and anything else is one new ask; a Tidy up forces that ask and its fit.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* onMounted(() => ensureFlowPlaced(app.value));
|
|
16
|
+
*/
|
|
17
|
+
export declare function ensureFlowPlaced(app: AppContext, { force }?: {
|
|
18
|
+
force?: boolean;
|
|
19
|
+
}): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Keeps the Flow view placed for as long as the tab draws it: placed again
|
|
22
|
+
* after any batch that changed what it is placed over, and never at the
|
|
23
|
+
* subscription itself, which the mount has asked for already. Returns the teardown.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* onMounted(() => addUnsubscribe(keepFlowPlaced(app.value)));
|
|
27
|
+
*/
|
|
28
|
+
export declare function keepFlowPlaced(app: AppContext): () => void;
|
|
29
|
+
//# sourceMappingURL=flowLayout.d.ts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { VisualizationNode } from './createVisualization';
|
|
2
|
+
import { VisualizationState, VisualizationView } from './visualizationView';
|
|
3
|
+
/** What the graph lets the bar beside it reach: the view it draws with, and where its dots stand. */
|
|
4
|
+
export type GraphViewHandle = {
|
|
5
|
+
state: VisualizationState;
|
|
6
|
+
nodes: () => VisualizationNode[];
|
|
7
|
+
};
|
|
8
|
+
/** Hands the graph of the editor given to whatever reads it, for as long as it is mounted. */
|
|
9
|
+
export declare function registerGraphView(editorId: string, handle: GraphViewHandle): void;
|
|
10
|
+
/**
|
|
11
|
+
* Takes the handle back as the graph unmounts. Only its own: a second graph
|
|
12
|
+
* that registered in between owns the slot, and this must not empty it.
|
|
13
|
+
*/
|
|
14
|
+
export declare function unregisterGraphView(editorId: string, handle: GraphViewHandle): void;
|
|
15
|
+
/**
|
|
16
|
+
* The graph of the editor given, or the resting handle while none is mounted.
|
|
17
|
+
* The version is read rather than merely counted, so a render that reached
|
|
18
|
+
* this is redrawn once a graph registers.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* const { state, nodes } = getGraphView(store.state.editor.id);
|
|
22
|
+
*/
|
|
23
|
+
export declare function getGraphView(editorId: string): GraphViewHandle;
|
|
24
|
+
/**
|
|
25
|
+
* Moves the view of the graph of the editor given, and does nothing at all
|
|
26
|
+
* while none is mounted. The resting handle is one object every editor shares,
|
|
27
|
+
* so a press before the mount must not be written into it.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* updateGraphView(editor.id, ({ state }) => zoomAt(state, center, 1.04));
|
|
31
|
+
*/
|
|
32
|
+
export declare function updateGraphView(editorId: string, next: (handle: GraphViewHandle) => VisualizationView | null): void;
|
|
33
|
+
//# sourceMappingURL=graphViewHandle.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC } from '@dineug/r-html';
|
|
2
|
+
export type ParticleLayerProps = {};
|
|
3
|
+
/**
|
|
4
|
+
* The layer the particles of a view's lit connectors run on, under the scene,
|
|
5
|
+
* since a card hides the connectors behind it and a particle riding one goes
|
|
6
|
+
* with them. Its one empty layer is committed at mount and drawn by the loop alone.
|
|
7
|
+
*/
|
|
8
|
+
declare const ParticleLayer: FC<ParticleLayerProps>;
|
|
9
|
+
export default ParticleLayer;
|
|
10
|
+
//# sourceMappingURL=ParticleLayer.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { RootState } from '../../../engine/state';
|
|
2
|
+
import { GeometrySource } from '../../../utils/draw-relationship/geometrySource';
|
|
3
|
+
import { MeasuredPath } from './particlePath';
|
|
4
|
+
/** One lit connector as the particles ride it, from its PK end to its FK end. */
|
|
5
|
+
export type ParticleEdge = {
|
|
6
|
+
id: string;
|
|
7
|
+
path: MeasuredPath;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* The connectors a view lights, measured for the particles to ride: those the
|
|
11
|
+
* hover or the pin reaches, in the order the view shows them. None for the
|
|
12
|
+
* document, none at rest, and none past the cap, where the light stands alone.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getParticleEdges(state: RootState, source?: GeometrySource): ParticleEdge[];
|
|
15
|
+
//# sourceMappingURL=particleEdges.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Layer } from 'konva/lib/Layer';
|
|
2
|
+
import { Point } from '../../../internal-types';
|
|
3
|
+
import { ParticleEdge } from './particleEdges';
|
|
4
|
+
/** The time and the frame a loop runs on, so a spec can freeze a phase or count frames. */
|
|
5
|
+
export type ParticleClock = {
|
|
6
|
+
now(): number;
|
|
7
|
+
requestFrame(callback: () => void): number;
|
|
8
|
+
cancelFrame(handle: number): void;
|
|
9
|
+
};
|
|
10
|
+
/** The clock every shipped loop runs on: wall time and the browser's own animation frame. */
|
|
11
|
+
export declare const particleClock: ParticleClock;
|
|
12
|
+
export type ParticleLoop = {
|
|
13
|
+
/** The lit connectors to run particles on and the colour to paint them; an empty list clears the layer. */
|
|
14
|
+
setEdges(edges: ParticleEdge[], fill: string): void;
|
|
15
|
+
/** Where the scene layers stand, so the circles land over the connectors they ride. */
|
|
16
|
+
setPlacement(origin: Point, zoomLevel: number): void;
|
|
17
|
+
/** Cancels the frame out, if any, and takes every circle off the layer. */
|
|
18
|
+
stop(): void;
|
|
19
|
+
};
|
|
20
|
+
/** The name every group of one connector's particles carries, beside the connector's own id. */
|
|
21
|
+
export declare const PARTICLE_GROUP_NAME = "particle-edge";
|
|
22
|
+
/**
|
|
23
|
+
* One requestAnimationFrame loop that owns the drawing of one layer. It runs
|
|
24
|
+
* a frame only while there is something to move or clear, so a scene with
|
|
25
|
+
* nothing lit costs no frame, and the view has one loop for as long as the layer lives.
|
|
26
|
+
*/
|
|
27
|
+
export declare function createParticleLoop(layer: Layer, clock?: ParticleClock): ParticleLoop;
|
|
28
|
+
//# sourceMappingURL=particleLoop.d.ts.map
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Point } from '../../../internal-types';
|
|
2
|
+
/** How many particles ride one lit connector at a time, as the reference draws them. */
|
|
3
|
+
export declare const PARTICLE_COUNT = 6;
|
|
4
|
+
/** How long one particle takes from the PK end to the FK end, in milliseconds. */
|
|
5
|
+
export declare const ANIMATE_DURATION = 6000;
|
|
6
|
+
/**
|
|
7
|
+
* How long after the one before it each particle leaves the PK end: one
|
|
8
|
+
* second, which over six particles fills the six second run, so a connector
|
|
9
|
+
* carries all six at every moment rather than a bunch that thins out.
|
|
10
|
+
*/
|
|
11
|
+
export declare const PARTICLE_INTERVAL: number;
|
|
12
|
+
/**
|
|
13
|
+
* The most lit connectors a view animates. Past it the particles stay off and
|
|
14
|
+
* only the fade and the highlight remain, since six circles on each of more
|
|
15
|
+
* connectors than this is more than a frame has room for.
|
|
16
|
+
*/
|
|
17
|
+
export declare const PARTICLE_EDGE_MAX = 60;
|
|
18
|
+
/** How long one particle is along the run it rides, in scene units. */
|
|
19
|
+
export declare const PARTICLE_RX = 5;
|
|
20
|
+
/** How thick it is across that run, which is what makes the circle an elongated blur. */
|
|
21
|
+
export declare const PARTICLE_RY = 1.2;
|
|
22
|
+
/** How opaque the far edge of a particle's gradient is, against 1 at its centre. */
|
|
23
|
+
export declare const PARTICLE_EDGE_ALPHA = 0.4;
|
|
24
|
+
/**
|
|
25
|
+
* How far either side of a point the direction is measured over, as a fraction
|
|
26
|
+
* of the whole run, guide lines included: about one chord of the curve, so a
|
|
27
|
+
* window spans a bend and the angle turns through it rather than stepping.
|
|
28
|
+
*/
|
|
29
|
+
export declare const TANGENT_WINDOW: number;
|
|
30
|
+
/** A polyline with the distance along it each point sits at, so a distance names a point on it. */
|
|
31
|
+
export type MeasuredPath = {
|
|
32
|
+
points: Point[];
|
|
33
|
+
/** How far along the path each point is: zero for the first, the length for the last. */
|
|
34
|
+
distances: number[];
|
|
35
|
+
length: number;
|
|
36
|
+
};
|
|
37
|
+
/** Copies the polyline and measures it, so the path handed back shares nothing with the caller. */
|
|
38
|
+
export declare function measurePath(points: Point[]): MeasuredPath;
|
|
39
|
+
/**
|
|
40
|
+
* The point so far along the path from its first point. A distance past
|
|
41
|
+
* either end lands on that end, and a zero-length run between two points
|
|
42
|
+
* hands back the first of them rather than dividing by nothing.
|
|
43
|
+
*/
|
|
44
|
+
export declare function pointAlong(path: MeasuredPath, distance: number): Point;
|
|
45
|
+
/**
|
|
46
|
+
* How far along a connector each of its particles is at a moment: the first
|
|
47
|
+
* leaves the PK end at zero, each next one an interval later, and every one
|
|
48
|
+
* runs the whole length in a period and starts over, easing in and out of it.
|
|
49
|
+
*/
|
|
50
|
+
export declare function particlePhase(elapsedMs: number, edgeLength: number): number[];
|
|
51
|
+
/**
|
|
52
|
+
* Which way the path runs at a distance along it, in degrees, so a particle
|
|
53
|
+
* lies along the run it rides. Measured between the points a window either
|
|
54
|
+
* side of it, never off the one chord it sits in, which steps at every bend.
|
|
55
|
+
*/
|
|
56
|
+
export declare function tangentAt(path: MeasuredPath, distance: number): number;
|
|
57
|
+
/**
|
|
58
|
+
* The gradient one particle is filled with: its colour at the centre, the same
|
|
59
|
+
* colour at a fraction of its opacity at the edge. Handed to the node whole,
|
|
60
|
+
* so the loop that moves circles sets attributes and computes nothing.
|
|
61
|
+
*/
|
|
62
|
+
export declare function particleGradient(fill: string): {
|
|
63
|
+
fill: string;
|
|
64
|
+
fillPriority: string;
|
|
65
|
+
fillRadialGradientStartPoint: {
|
|
66
|
+
x: number;
|
|
67
|
+
y: number;
|
|
68
|
+
};
|
|
69
|
+
fillRadialGradientStartRadius: number;
|
|
70
|
+
fillRadialGradientEndPoint: {
|
|
71
|
+
x: number;
|
|
72
|
+
y: number;
|
|
73
|
+
};
|
|
74
|
+
fillRadialGradientEndRadius: number;
|
|
75
|
+
fillRadialGradientColorStops: (string | number)[];
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* The same colour carrying an alpha channel. Every palette token reaching here
|
|
79
|
+
* is a six digit hex, and a colour in any other spelling is handed back as it
|
|
80
|
+
* came rather than mangled into one the canvas would refuse.
|
|
81
|
+
*/
|
|
82
|
+
export declare function withAlpha(color: string, alpha: number): string;
|
|
83
|
+
//# sourceMappingURL=particlePath.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Ref } from '@dineug/r-html';
|
|
2
|
+
import { Ctx } from '../../internal-types';
|
|
3
|
+
import { ViewSource } from '../../utils/draw-relationship/geometrySource';
|
|
4
|
+
export type ViewGestureOptions = {
|
|
5
|
+
/** The box the scene hangs in, which a press and a wheel are measured against. */
|
|
6
|
+
root: Ref<HTMLDivElement>;
|
|
7
|
+
/** The Stage container, which says whether a press landed on a table. */
|
|
8
|
+
canvas: Ref<HTMLDivElement>;
|
|
9
|
+
/** The view the gestures land in, named so they never reach the active one. */
|
|
10
|
+
source: ViewSource;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The gestures a view scene takes on its box: the wheel moves the screen and
|
|
14
|
+
* with the modifier zooms it, as a pinch does, a press on the background pans,
|
|
15
|
+
* and with the modifier it opens the marquee. Every one lands in the view named.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* const { handleWheel, handleMousedown } = useViewGestures(ctx, { root, canvas, source });
|
|
19
|
+
*/
|
|
20
|
+
export declare function useViewGestures(ctx: Ctx, { root, canvas, source }: ViewGestureOptions): {
|
|
21
|
+
handleWheel: (event: WheelEvent) => void;
|
|
22
|
+
handleMousedown: (event: MouseEvent | TouchEvent) => void;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=useViewGestures.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC } from '@dineug/r-html';
|
|
2
|
+
export type VisualizationToolbarProps = {};
|
|
3
|
+
/**
|
|
4
|
+
* The bar over the bottom of the Visualization tab: which of the two modes is
|
|
5
|
+
* up, the zoom, the placement tools of the Flow, how much of a card it draws,
|
|
6
|
+
* the way back to the whole document, and which way the content lies and how far once the screen holds none.
|
|
7
|
+
*/
|
|
8
|
+
declare const VisualizationToolbar: FC<VisualizationToolbarProps>;
|
|
9
|
+
export default VisualizationToolbar;
|
|
10
|
+
//# sourceMappingURL=VisualizationToolbar.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const showModeTrigger: import('@dineug/r-html').CSSTemplateLiterals;
|
|
2
|
+
export declare const showModeLabel: import('@dineug/r-html').CSSTemplateLiterals;
|
|
3
|
+
export declare const showModeMenu: import('@dineug/r-html').CSSTemplateLiterals;
|
|
4
|
+
//# sourceMappingURL=VisualizationToolbar.styles.d.ts.map
|