@dineug/erd-editor 3.7.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.
Files changed (91) hide show
  1. package/dist/components/erd/automatic-table-placement/AutomaticTablePlacement.d.ts +0 -15
  2. package/dist/components/erd/automatic-table-placement/runElkPlacement.d.ts +11 -0
  3. package/dist/components/erd/canvas/CanvasScene.d.ts +3 -3
  4. package/dist/components/erd/canvas/entityDrag.d.ts +5 -4
  5. package/dist/components/erd/canvas/highlightTransition.d.ts +35 -0
  6. package/dist/components/erd/canvas/memo/useMoveMemo.d.ts +3 -1
  7. package/dist/components/erd/canvas/mixColor.d.ts +7 -0
  8. package/dist/components/erd/canvas/relationship-group/RelationshipGroup.d.ts +2 -0
  9. package/dist/components/erd/canvas/relationship-group/relationship/Relationship.d.ts +2 -0
  10. package/dist/components/erd/canvas/relationship-group/relationship/Relationship.template.d.ts +3 -3
  11. package/dist/components/erd/canvas/sceneHit.d.ts +7 -6
  12. package/dist/components/erd/canvas/sceneTokens.d.ts +30 -4
  13. package/dist/components/erd/canvas/table/Table.d.ts +7 -0
  14. package/dist/components/erd/canvas/table/cellLayout.d.ts +48 -18
  15. package/dist/components/erd/canvas/table/column/Column.d.ts +26 -0
  16. package/dist/components/erd/canvas/table/goToErd.d.ts +18 -0
  17. package/dist/components/erd/canvas/table/useMoveTable.d.ts +3 -1
  18. package/dist/components/erd/canvas/table/useViewPin.d.ts +19 -0
  19. package/dist/components/erd/canvas/useMoveEntity.d.ts +9 -2
  20. package/dist/components/erd/content-compass/ContentCompass.d.ts +1 -1
  21. package/dist/components/erd/content-compass/compassGeometry.d.ts +27 -4
  22. package/dist/components/erd/floating-toolbar/FloatingToolbar.d.ts +3 -3
  23. package/dist/components/erd/floating-toolbar/FloatingToolbar.styles.d.ts +3 -0
  24. package/dist/components/erd/floating-toolbar/ToolbarCompass.template.d.ts +14 -0
  25. package/dist/components/erd/minimap/MinimapScene.d.ts +1 -1
  26. package/dist/components/erd/minimap/minimapGeometry.d.ts +4 -3
  27. package/dist/components/flowCenters.d.ts +10 -0
  28. package/dist/components/primitives/icon/icons.d.ts +5 -2
  29. package/dist/components/sceneSourceContext.d.ts +10 -0
  30. package/dist/components/theme-builder/ThemeBuilder.styles.d.ts +5 -0
  31. package/dist/components/visualization/Visualization.d.ts +3 -4
  32. package/dist/components/visualization/VisualizationFlow.d.ts +10 -0
  33. package/dist/components/visualization/VisualizationGraph.d.ts +10 -0
  34. package/dist/components/visualization/flowLayout.d.ts +29 -0
  35. package/dist/components/visualization/graphViewHandle.d.ts +33 -0
  36. package/dist/components/visualization/particles/ParticleLayer.d.ts +10 -0
  37. package/dist/components/visualization/particles/particleEdges.d.ts +15 -0
  38. package/dist/components/visualization/particles/particleLoop.d.ts +28 -0
  39. package/dist/components/visualization/particles/particlePath.d.ts +83 -0
  40. package/dist/components/visualization/useViewGestures.d.ts +24 -0
  41. package/dist/components/visualization/visualization-toolbar/VisualizationToolbar.d.ts +10 -0
  42. package/dist/components/visualization/visualization-toolbar/VisualizationToolbar.styles.d.ts +4 -0
  43. package/dist/components/visualization/visualizationView.d.ts +29 -5
  44. package/dist/components/visualization/zoomVisualization.d.ts +20 -0
  45. package/dist/constants/layout.d.ts +50 -0
  46. package/dist/constants/tablePlacement.d.ts +4 -3
  47. package/dist/constants/zoom.d.ts +7 -0
  48. package/dist/engine/actions.d.ts +6 -0
  49. package/dist/engine/index.js +12 -12
  50. package/dist/engine/modules/editor/actions.d.ts +60 -2
  51. package/dist/engine/modules/editor/atom.actions.d.ts +136 -0
  52. package/dist/engine/modules/editor/generator.actions.d.ts +16 -4
  53. package/dist/engine/modules/editor/state.d.ts +41 -0
  54. package/dist/engine/modules/editor/view.actions.d.ts +270 -0
  55. package/dist/engine/modules/editor/view.d.ts +28 -0
  56. package/dist/engine/modules/editor/view.generator.actions.d.ts +24 -0
  57. package/dist/engine/modules/settings/atom.actions.d.ts +17 -3
  58. package/dist/engine/modules/settings/generator.actions.d.ts +6 -4
  59. package/dist/engine/rx-operators/viewActionRedirect.d.ts +10 -0
  60. package/dist/engine/rx-operators/viewIgnoreFilter.d.ts +10 -0
  61. package/dist/erd-editor.umd.js +319 -282
  62. package/dist/index.js +6077 -4995
  63. package/dist/konva/scene/columnDropTarget.d.ts +2 -1
  64. package/dist/konva/scene/contentBounds.d.ts +12 -5
  65. package/dist/konva/scene/fitZoom.d.ts +16 -0
  66. package/dist/konva/scene/metrics.d.ts +6 -5
  67. package/dist/konva/scene/viewFreeze.d.ts +10 -7
  68. package/dist/konva/scene/viewLayout.d.ts +89 -0
  69. package/dist/konva/scene/viewport.d.ts +17 -4
  70. package/dist/{schemaGCService--wGet5O7.js → schemaGCService-CXVjeF9p.js} +3145 -2655
  71. package/dist/services/elk-layout/elkGraph.d.ts +40 -1
  72. package/dist/services/elk-layout/elkLayoutOptions.d.ts +22 -1
  73. package/dist/services/elk-layout/elkLayoutService.d.ts +5 -1
  74. package/dist/services/elk-layout/index.d.ts +10 -4
  75. package/dist/utils/calcTable.d.ts +27 -1
  76. package/dist/utils/clickGesture.d.ts +19 -0
  77. package/dist/utils/domEvent.d.ts +6 -0
  78. package/dist/utils/draw-relationship/bezier.d.ts +32 -0
  79. package/dist/utils/draw-relationship/calc.d.ts +6 -1
  80. package/dist/utils/draw-relationship/geometrySource.d.ts +9 -0
  81. package/dist/utils/draw-relationship/incremental.d.ts +7 -1
  82. package/dist/utils/draw-relationship/index.d.ts +37 -11
  83. package/dist/utils/draw-relationship/pathFinding.d.ts +2 -1
  84. package/dist/utils/draw-relationship/route.d.ts +5 -3
  85. package/dist/utils/draw-relationship/sort.d.ts +2 -1
  86. package/dist/utils/draw-relationship/stub.d.ts +9 -4
  87. package/dist/utils/emitter.d.ts +4 -0
  88. package/dist/utils/keyboard-shortcut/index.d.ts +2 -1
  89. package/dist/workers/elkLayout.shared-worker.js +1 -1
  90. package/dist/workers/exportPng.shared-worker.js +26 -26
  91. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  import { Reducer } from '@dineug/r-html';
2
2
  import { EngineContext } from '../../context';
3
3
  import { RootState } from '../../state';
4
- import { LWW, ValuesType } from '../../../internal-types';
4
+ import { LWW, Point, ValuesType } from '../../../internal-types';
5
5
  import { Rect } from '../../../utils/dragSelect';
6
- import { FocusType, MoveKey, SelectType, SharedFocus } from './state';
6
+ import { FocusType, MoveKey, SelectType, SharedFocus, ShowMode, ViewKind, VisualizationMode } from './state';
7
7
  export declare const ActionType: {
8
8
  readonly changeHasHistory: "editor.changeHasHistory";
9
9
  readonly selectAll: "editor.selectAll";
@@ -43,6 +43,17 @@ export declare const ActionType: {
43
43
  readonly validationIds: "editor.validationIds";
44
44
  readonly getLWW: "editor.getLWW";
45
45
  readonly mergeLWW: "editor.mergeLWW";
46
+ readonly viewOpen: "editor.viewOpen";
47
+ readonly viewClose: "editor.viewClose";
48
+ readonly viewScrollTo: "editor.viewScrollTo";
49
+ readonly viewStreamScrollTo: "editor.viewStreamScrollTo";
50
+ readonly viewChangeZoomLevel: "editor.viewChangeZoomLevel";
51
+ readonly viewStreamZoomLevel: "editor.viewStreamZoomLevel";
52
+ readonly viewMoveTable: "editor.viewMoveTable";
53
+ readonly viewSetLayout: "editor.viewSetLayout";
54
+ readonly viewChangeShowMode: "editor.viewChangeShowMode";
55
+ readonly viewSetCenters: "editor.viewSetCenters";
56
+ readonly changeVisualizationMode: "editor.changeVisualizationMode";
46
57
  };
47
58
  export type ActionType = ValuesType<typeof ActionType>;
48
59
  export type ActionMap = {
@@ -143,6 +154,53 @@ export type ActionMap = {
143
154
  [ActionType.mergeLWW]: {
144
155
  lww: LWW;
145
156
  };
157
+ [ActionType.viewOpen]: {
158
+ kind: ViewKind;
159
+ /** The tables the view opens narrowed to; none and it opens on the whole document. */
160
+ centerIds?: string[];
161
+ };
162
+ [ActionType.viewClose]: {
163
+ kind: ViewKind;
164
+ };
165
+ [ActionType.viewScrollTo]: {
166
+ originX: number;
167
+ originY: number;
168
+ kind?: ViewKind;
169
+ };
170
+ [ActionType.viewStreamScrollTo]: {
171
+ movementX: number;
172
+ movementY: number;
173
+ kind?: ViewKind;
174
+ };
175
+ [ActionType.viewChangeZoomLevel]: {
176
+ value: number;
177
+ kind?: ViewKind;
178
+ };
179
+ [ActionType.viewStreamZoomLevel]: {
180
+ value: number;
181
+ kind?: ViewKind;
182
+ };
183
+ [ActionType.viewMoveTable]: {
184
+ ids: string[];
185
+ movementX: number;
186
+ movementY: number;
187
+ kind?: ViewKind;
188
+ };
189
+ [ActionType.viewSetLayout]: {
190
+ kind: ViewKind;
191
+ positions: Record<string, Point>;
192
+ };
193
+ [ActionType.viewChangeShowMode]: {
194
+ value: ShowMode;
195
+ kind?: ViewKind;
196
+ };
197
+ [ActionType.viewSetCenters]: {
198
+ tableIds: string[];
199
+ kind?: ViewKind;
200
+ };
201
+ [ActionType.changeVisualizationMode]: {
202
+ value: VisualizationMode;
203
+ };
146
204
  };
147
205
  export type ReducerType<T extends keyof ActionMap> = Reducer<RootState, T, ActionMap, EngineContext>;
148
206
  //# sourceMappingURL=actions.d.ts.map
@@ -309,6 +309,17 @@ export declare const mergeLWWAction: {
309
309
  type: string;
310
310
  };
311
311
  export declare const editorReducers: {
312
+ "editor.viewOpen": ReducerType<"editor.viewOpen">;
313
+ "editor.viewClose": ReducerType<"editor.viewClose">;
314
+ "editor.viewScrollTo": ReducerType<"editor.viewScrollTo">;
315
+ "editor.viewStreamScrollTo": ReducerType<"editor.viewStreamScrollTo">;
316
+ "editor.viewChangeZoomLevel": ReducerType<"editor.viewChangeZoomLevel">;
317
+ "editor.viewStreamZoomLevel": ReducerType<"editor.viewStreamZoomLevel">;
318
+ "editor.viewMoveTable": ReducerType<"editor.viewMoveTable">;
319
+ "editor.viewSetLayout": ReducerType<"editor.viewSetLayout">;
320
+ "editor.viewChangeShowMode": ReducerType<"editor.viewChangeShowMode">;
321
+ "editor.viewSetCenters": ReducerType<"editor.viewSetCenters">;
322
+ "editor.changeVisualizationMode": ReducerType<"editor.changeVisualizationMode">;
312
323
  "editor.changeHasHistory": ReducerType<"editor.changeHasHistory">;
313
324
  "editor.selectAll": ReducerType<"editor.selectAll">;
314
325
  "editor.unselectAll": ReducerType<"editor.unselectAll">;
@@ -349,6 +360,131 @@ export declare const editorReducers: {
349
360
  "editor.mergeLWW": ReducerType<"editor.mergeLWW">;
350
361
  };
351
362
  export declare const actions: {
363
+ viewOpenAction: {
364
+ (payload: {
365
+ kind: import('./state').ViewKind;
366
+ centerIds?: string[];
367
+ }): import('@dineug/r-html').AnyAction<{
368
+ kind: import('./state').ViewKind;
369
+ centerIds?: string[];
370
+ }>;
371
+ toString(): string;
372
+ type: string;
373
+ };
374
+ viewCloseAction: {
375
+ (payload: {
376
+ kind: import('./state').ViewKind;
377
+ }): import('@dineug/r-html').AnyAction<{
378
+ kind: import('./state').ViewKind;
379
+ }>;
380
+ toString(): string;
381
+ type: string;
382
+ };
383
+ viewScrollToAction: {
384
+ (payload: {
385
+ originX: number;
386
+ originY: number;
387
+ kind?: import('./state').ViewKind;
388
+ }): import('@dineug/r-html').AnyAction<{
389
+ originX: number;
390
+ originY: number;
391
+ kind?: import('./state').ViewKind;
392
+ }>;
393
+ toString(): string;
394
+ type: string;
395
+ };
396
+ viewStreamScrollToAction: {
397
+ (payload: {
398
+ movementX: number;
399
+ movementY: number;
400
+ kind?: import('./state').ViewKind;
401
+ }): import('@dineug/r-html').AnyAction<{
402
+ movementX: number;
403
+ movementY: number;
404
+ kind?: import('./state').ViewKind;
405
+ }>;
406
+ toString(): string;
407
+ type: string;
408
+ };
409
+ viewChangeZoomLevelAction: {
410
+ (payload: {
411
+ value: number;
412
+ kind?: import('./state').ViewKind;
413
+ }): import('@dineug/r-html').AnyAction<{
414
+ value: number;
415
+ kind?: import('./state').ViewKind;
416
+ }>;
417
+ toString(): string;
418
+ type: string;
419
+ };
420
+ viewStreamZoomLevelAction: {
421
+ (payload: {
422
+ value: number;
423
+ kind?: import('./state').ViewKind;
424
+ }): import('@dineug/r-html').AnyAction<{
425
+ value: number;
426
+ kind?: import('./state').ViewKind;
427
+ }>;
428
+ toString(): string;
429
+ type: string;
430
+ };
431
+ viewMoveTableAction: {
432
+ (payload: {
433
+ ids: string[];
434
+ movementX: number;
435
+ movementY: number;
436
+ kind?: import('./state').ViewKind;
437
+ }): import('@dineug/r-html').AnyAction<{
438
+ ids: string[];
439
+ movementX: number;
440
+ movementY: number;
441
+ kind?: import('./state').ViewKind;
442
+ }>;
443
+ toString(): string;
444
+ type: string;
445
+ };
446
+ viewSetLayoutAction: {
447
+ (payload: {
448
+ kind: import('./state').ViewKind;
449
+ positions: Record<string, import('../../../internal-types').Point>;
450
+ }): import('@dineug/r-html').AnyAction<{
451
+ kind: import('./state').ViewKind;
452
+ positions: Record<string, import('../../../internal-types').Point>;
453
+ }>;
454
+ toString(): string;
455
+ type: string;
456
+ };
457
+ viewChangeShowModeAction: {
458
+ (payload: {
459
+ value: import('./state').ShowMode;
460
+ kind?: import('./state').ViewKind;
461
+ }): import('@dineug/r-html').AnyAction<{
462
+ value: import('./state').ShowMode;
463
+ kind?: import('./state').ViewKind;
464
+ }>;
465
+ toString(): string;
466
+ type: string;
467
+ };
468
+ viewSetCentersAction: {
469
+ (payload: {
470
+ tableIds: string[];
471
+ kind?: import('./state').ViewKind;
472
+ }): import('@dineug/r-html').AnyAction<{
473
+ tableIds: string[];
474
+ kind?: import('./state').ViewKind;
475
+ }>;
476
+ toString(): string;
477
+ type: string;
478
+ };
479
+ changeVisualizationModeAction: {
480
+ (payload: {
481
+ value: import('./state').VisualizationMode;
482
+ }): import('@dineug/r-html').AnyAction<{
483
+ value: import('./state').VisualizationMode;
484
+ }>;
485
+ toString(): string;
486
+ type: string;
487
+ };
352
488
  changeHasHistoryAction: {
353
489
  (payload: {
354
490
  hasUndo: boolean;
@@ -1,11 +1,17 @@
1
1
  import { GeneratorAction } from '../../generator.actions';
2
2
  import { Point } from '../../../internal-types';
3
3
  import { Rect } from '../../../utils/dragSelect';
4
+ import { GeometrySource } from '../../../utils/draw-relationship/geometrySource';
4
5
  import { ClipboardPayload } from '../../../utils/table-clipboard';
5
6
  import { MoveKey } from './state';
6
7
  export declare const loadJsonAction$: (value: string) => GeneratorAction;
7
8
  export declare const initialLoadJsonAction$: (value: string) => GeneratorAction;
8
- export declare const moveAllAction$: (movementX: number, movementY: number) => GeneratorAction;
9
+ /**
10
+ * Moves the selection by a pointer step, scaled by the zoom of the scene the
11
+ * drag runs in. From a view scene the step goes to that view's own placement,
12
+ * which holds tables alone, and the document's placement is left where it is.
13
+ */
14
+ export declare const moveAllAction$: (movementX: number, movementY: number, source?: GeometrySource) => GeneratorAction;
9
15
  export declare const removeSelectedAction$: () => GeneratorAction;
10
16
  export type DuplicateConfig = {
11
17
  tableIds?: string[];
@@ -15,7 +21,12 @@ export type DuplicateConfig = {
15
21
  };
16
22
  export declare const pasteEntitiesAction$: (payload: ClipboardPayload, pasteRound: number) => GeneratorAction;
17
23
  export declare const duplicateAction$: ({ tableIds, memoIds, offset, escapeCollision, }: DuplicateConfig) => GeneratorAction;
18
- export declare const dragSelectAction$: (dragRect: Rect) => GeneratorAction;
24
+ /**
25
+ * Selects what the rect covers among what the source shows, each entity read
26
+ * at the point and the size that source draws it: a view places its tables
27
+ * and shows no memo, so a marquee drawn over it picks by the view, not the document.
28
+ */
29
+ export declare const dragSelectAction$: (dragRect: Rect, source?: GeometrySource) => GeneratorAction;
19
30
  export declare const unselectAllAction$: () => GeneratorAction;
20
31
  export declare const focusMoveTableAction$: (moveKey: MoveKey, shiftKey: boolean) => GeneratorAction;
21
32
  export declare const drawStartRelationshipAction$: (relationshipType: number) => GeneratorAction;
@@ -30,13 +41,14 @@ export declare const dragoverColumnAction$: (targetId: string, targetTableId: st
30
41
  export declare const columnKeyHoverStartAction$: (columnId: string) => GeneratorAction;
31
42
  export declare const columnKeyHoverEndAction$: () => GeneratorAction;
32
43
  export declare const actions$: {
44
+ focusFlowTableAction$: (tableIds: string[]) => GeneratorAction;
33
45
  loadJsonAction$: (value: string) => GeneratorAction;
34
46
  initialLoadJsonAction$: (value: string) => GeneratorAction;
35
- moveAllAction$: (movementX: number, movementY: number) => GeneratorAction;
47
+ moveAllAction$: (movementX: number, movementY: number, source?: GeometrySource) => GeneratorAction;
36
48
  removeSelectedAction$: () => GeneratorAction;
37
49
  pasteEntitiesAction$: (payload: ClipboardPayload, pasteRound: number) => GeneratorAction;
38
50
  duplicateAction$: ({ tableIds, memoIds, offset, escapeCollision, }: DuplicateConfig) => GeneratorAction;
39
- dragSelectAction$: (dragRect: Rect) => GeneratorAction;
51
+ dragSelectAction$: (dragRect: Rect, source?: GeometrySource) => GeneratorAction;
40
52
  unselectAllAction$: () => GeneratorAction;
41
53
  focusMoveTableAction$: (moveKey: MoveKey, shiftKey: boolean) => GeneratorAction;
42
54
  drawStartRelationshipAction$: (relationshipType: number) => GeneratorAction;
@@ -36,6 +36,14 @@ export type Editor = {
36
36
  sharedSelectionTrackerMap: Record<string, SharedSelectionTracker>;
37
37
  sharedDragSelectTrackerMap: Record<string, SharedDragSelectTracker>;
38
38
  dragSelect: Rect | null;
39
+ /**
40
+ * The scene view a reader can stand in over the document: the Flow mode of
41
+ * the visualization tab, null while it is not open. Local to this client,
42
+ * never the file, the history or a peer.
43
+ */
44
+ views: EditorViews;
45
+ /** Which of its two modes the visualization tab shows. Remembered for the session. */
46
+ visualizationMode: VisualizationMode;
39
47
  };
40
48
  export type Viewport = {
41
49
  width: number;
@@ -90,6 +98,39 @@ export declare const SelectType: {
90
98
  readonly memo: "memo";
91
99
  };
92
100
  export type SelectType = ValuesType<typeof SelectType>;
101
+ export declare const ShowMode: {
102
+ readonly nameOnly: "nameOnly";
103
+ readonly keysOnly: "keysOnly";
104
+ readonly allFields: "allFields";
105
+ };
106
+ export type ShowMode = ValuesType<typeof ShowMode>;
107
+ export declare const ViewKind: {
108
+ readonly flow: "flow";
109
+ };
110
+ export type ViewKind = ValuesType<typeof ViewKind>;
111
+ export declare const VisualizationMode: {
112
+ readonly graph: "graph";
113
+ readonly flow: "flow";
114
+ };
115
+ export type VisualizationMode = ValuesType<typeof VisualizationMode>;
116
+ /**
117
+ * A scene drawn over the document in its own coordinates: the tables it places
118
+ * by id, the placement it is looked at through, and what it shows of each
119
+ * table. Memos are never placed, so a view draws none.
120
+ */
121
+ export type SceneView = {
122
+ kind: ViewKind;
123
+ showMode: ShowMode;
124
+ positions: Record<string, Point>;
125
+ originX: number;
126
+ originY: number;
127
+ zoomLevel: number;
128
+ /** The tables the view narrows to, and none while it shows the whole document. */
129
+ centerIds: string[];
130
+ };
131
+ export type EditorViews = {
132
+ flow: SceneView | null;
133
+ };
93
134
  export declare const FocusType: {
94
135
  readonly tableName: "tableName";
95
136
  readonly tableComment: "tableComment";
@@ -0,0 +1,270 @@
1
+ import { ReducerType } from './actions';
2
+ import { Editor, ViewKind } from './state';
3
+ /** Drops the view, which is what any replacement of the document owes it. */
4
+ export declare function clearViews(editor: Editor): void;
5
+ export declare const viewOpenAction: {
6
+ (payload: {
7
+ kind: ViewKind;
8
+ centerIds?: string[];
9
+ }): import('@dineug/r-html').AnyAction<{
10
+ kind: ViewKind;
11
+ centerIds?: string[];
12
+ }>;
13
+ toString(): string;
14
+ type: string;
15
+ };
16
+ export declare const viewCloseAction: {
17
+ (payload: {
18
+ kind: ViewKind;
19
+ }): import('@dineug/r-html').AnyAction<{
20
+ kind: ViewKind;
21
+ }>;
22
+ toString(): string;
23
+ type: string;
24
+ };
25
+ export declare const viewScrollToAction: {
26
+ (payload: {
27
+ originX: number;
28
+ originY: number;
29
+ kind?: ViewKind;
30
+ }): import('@dineug/r-html').AnyAction<{
31
+ originX: number;
32
+ originY: number;
33
+ kind?: ViewKind;
34
+ }>;
35
+ toString(): string;
36
+ type: string;
37
+ };
38
+ export declare const viewStreamScrollToAction: {
39
+ (payload: {
40
+ movementX: number;
41
+ movementY: number;
42
+ kind?: ViewKind;
43
+ }): import('@dineug/r-html').AnyAction<{
44
+ movementX: number;
45
+ movementY: number;
46
+ kind?: ViewKind;
47
+ }>;
48
+ toString(): string;
49
+ type: string;
50
+ };
51
+ export declare const viewChangeZoomLevelAction: {
52
+ (payload: {
53
+ value: number;
54
+ kind?: ViewKind;
55
+ }): import('@dineug/r-html').AnyAction<{
56
+ value: number;
57
+ kind?: ViewKind;
58
+ }>;
59
+ toString(): string;
60
+ type: string;
61
+ };
62
+ export declare const viewStreamZoomLevelAction: {
63
+ (payload: {
64
+ value: number;
65
+ kind?: ViewKind;
66
+ }): import('@dineug/r-html').AnyAction<{
67
+ value: number;
68
+ kind?: ViewKind;
69
+ }>;
70
+ toString(): string;
71
+ type: string;
72
+ };
73
+ export declare const viewMoveTableAction: {
74
+ (payload: {
75
+ ids: string[];
76
+ movementX: number;
77
+ movementY: number;
78
+ kind?: ViewKind;
79
+ }): import('@dineug/r-html').AnyAction<{
80
+ ids: string[];
81
+ movementX: number;
82
+ movementY: number;
83
+ kind?: ViewKind;
84
+ }>;
85
+ toString(): string;
86
+ type: string;
87
+ };
88
+ export declare const viewSetLayoutAction: {
89
+ (payload: {
90
+ kind: ViewKind;
91
+ positions: Record<string, import('../../../internal-types').Point>;
92
+ }): import('@dineug/r-html').AnyAction<{
93
+ kind: ViewKind;
94
+ positions: Record<string, import('../../../internal-types').Point>;
95
+ }>;
96
+ toString(): string;
97
+ type: string;
98
+ };
99
+ export declare const viewChangeShowModeAction: {
100
+ (payload: {
101
+ value: import('./state').ShowMode;
102
+ kind?: ViewKind;
103
+ }): import('@dineug/r-html').AnyAction<{
104
+ value: import('./state').ShowMode;
105
+ kind?: ViewKind;
106
+ }>;
107
+ toString(): string;
108
+ type: string;
109
+ };
110
+ export declare const viewSetCentersAction: {
111
+ (payload: {
112
+ tableIds: string[];
113
+ kind?: ViewKind;
114
+ }): import('@dineug/r-html').AnyAction<{
115
+ tableIds: string[];
116
+ kind?: ViewKind;
117
+ }>;
118
+ toString(): string;
119
+ type: string;
120
+ };
121
+ export declare const changeVisualizationModeAction: {
122
+ (payload: {
123
+ value: import('./state').VisualizationMode;
124
+ }): import('@dineug/r-html').AnyAction<{
125
+ value: import('./state').VisualizationMode;
126
+ }>;
127
+ toString(): string;
128
+ type: string;
129
+ };
130
+ export declare const viewReducers: {
131
+ "editor.viewOpen": ReducerType<"editor.viewOpen">;
132
+ "editor.viewClose": ReducerType<"editor.viewClose">;
133
+ "editor.viewScrollTo": ReducerType<"editor.viewScrollTo">;
134
+ "editor.viewStreamScrollTo": ReducerType<"editor.viewStreamScrollTo">;
135
+ "editor.viewChangeZoomLevel": ReducerType<"editor.viewChangeZoomLevel">;
136
+ "editor.viewStreamZoomLevel": ReducerType<"editor.viewStreamZoomLevel">;
137
+ "editor.viewMoveTable": ReducerType<"editor.viewMoveTable">;
138
+ "editor.viewSetLayout": ReducerType<"editor.viewSetLayout">;
139
+ "editor.viewChangeShowMode": ReducerType<"editor.viewChangeShowMode">;
140
+ "editor.viewSetCenters": ReducerType<"editor.viewSetCenters">;
141
+ "editor.changeVisualizationMode": ReducerType<"editor.changeVisualizationMode">;
142
+ };
143
+ export declare const viewActions: {
144
+ viewOpenAction: {
145
+ (payload: {
146
+ kind: ViewKind;
147
+ centerIds?: string[];
148
+ }): import('@dineug/r-html').AnyAction<{
149
+ kind: ViewKind;
150
+ centerIds?: string[];
151
+ }>;
152
+ toString(): string;
153
+ type: string;
154
+ };
155
+ viewCloseAction: {
156
+ (payload: {
157
+ kind: ViewKind;
158
+ }): import('@dineug/r-html').AnyAction<{
159
+ kind: ViewKind;
160
+ }>;
161
+ toString(): string;
162
+ type: string;
163
+ };
164
+ viewScrollToAction: {
165
+ (payload: {
166
+ originX: number;
167
+ originY: number;
168
+ kind?: ViewKind;
169
+ }): import('@dineug/r-html').AnyAction<{
170
+ originX: number;
171
+ originY: number;
172
+ kind?: ViewKind;
173
+ }>;
174
+ toString(): string;
175
+ type: string;
176
+ };
177
+ viewStreamScrollToAction: {
178
+ (payload: {
179
+ movementX: number;
180
+ movementY: number;
181
+ kind?: ViewKind;
182
+ }): import('@dineug/r-html').AnyAction<{
183
+ movementX: number;
184
+ movementY: number;
185
+ kind?: ViewKind;
186
+ }>;
187
+ toString(): string;
188
+ type: string;
189
+ };
190
+ viewChangeZoomLevelAction: {
191
+ (payload: {
192
+ value: number;
193
+ kind?: ViewKind;
194
+ }): import('@dineug/r-html').AnyAction<{
195
+ value: number;
196
+ kind?: ViewKind;
197
+ }>;
198
+ toString(): string;
199
+ type: string;
200
+ };
201
+ viewStreamZoomLevelAction: {
202
+ (payload: {
203
+ value: number;
204
+ kind?: ViewKind;
205
+ }): import('@dineug/r-html').AnyAction<{
206
+ value: number;
207
+ kind?: ViewKind;
208
+ }>;
209
+ toString(): string;
210
+ type: string;
211
+ };
212
+ viewMoveTableAction: {
213
+ (payload: {
214
+ ids: string[];
215
+ movementX: number;
216
+ movementY: number;
217
+ kind?: ViewKind;
218
+ }): import('@dineug/r-html').AnyAction<{
219
+ ids: string[];
220
+ movementX: number;
221
+ movementY: number;
222
+ kind?: ViewKind;
223
+ }>;
224
+ toString(): string;
225
+ type: string;
226
+ };
227
+ viewSetLayoutAction: {
228
+ (payload: {
229
+ kind: ViewKind;
230
+ positions: Record<string, import('../../../internal-types').Point>;
231
+ }): import('@dineug/r-html').AnyAction<{
232
+ kind: ViewKind;
233
+ positions: Record<string, import('../../../internal-types').Point>;
234
+ }>;
235
+ toString(): string;
236
+ type: string;
237
+ };
238
+ viewChangeShowModeAction: {
239
+ (payload: {
240
+ value: import('./state').ShowMode;
241
+ kind?: ViewKind;
242
+ }): import('@dineug/r-html').AnyAction<{
243
+ value: import('./state').ShowMode;
244
+ kind?: ViewKind;
245
+ }>;
246
+ toString(): string;
247
+ type: string;
248
+ };
249
+ viewSetCentersAction: {
250
+ (payload: {
251
+ tableIds: string[];
252
+ kind?: ViewKind;
253
+ }): import('@dineug/r-html').AnyAction<{
254
+ tableIds: string[];
255
+ kind?: ViewKind;
256
+ }>;
257
+ toString(): string;
258
+ type: string;
259
+ };
260
+ changeVisualizationModeAction: {
261
+ (payload: {
262
+ value: import('./state').VisualizationMode;
263
+ }): import('@dineug/r-html').AnyAction<{
264
+ value: import('./state').VisualizationMode;
265
+ }>;
266
+ toString(): string;
267
+ type: string;
268
+ };
269
+ };
270
+ //# sourceMappingURL=view.actions.d.ts.map
@@ -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