@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
|
@@ -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
|
|
@@ -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,25 @@
|
|
|
1
1
|
import { GeneratorAction } from '../../generator.actions';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { Point } from '../../../internal-types';
|
|
3
|
+
import { GeometrySource } from '../../../utils/draw-relationship/geometrySource';
|
|
4
|
+
/** The origin it adds the movement to is the one getMovementScrollTo solved against. */
|
|
5
|
+
export declare const changeZoomLevelAction$: (value: number, source?: GeometrySource) => GeneratorAction;
|
|
6
|
+
export declare const streamZoomLevelAction$: (value: number, source?: GeometrySource) => GeneratorAction;
|
|
7
|
+
export type PinchZoom = {
|
|
8
|
+
/** The zoom the pinch has reached, which the store rounds as it lands. */
|
|
9
|
+
zoomLevel: number;
|
|
10
|
+
/** Where the pinch is centred now, in the scene box. */
|
|
11
|
+
screen: Point;
|
|
12
|
+
/** The scene point the pinch holds, else the one under screen. */
|
|
13
|
+
scene?: Point;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* A step of a pinch: the zoom it has reached, with the scene point it holds put
|
|
17
|
+
* under where it is centred now, so two fingers zoom about their midpoint and
|
|
18
|
+
* pan as it travels. Streamed, so a whole pinch is one undo entry as a wheel is.
|
|
19
|
+
*/
|
|
20
|
+
export declare const pinchZoomAction$: ({ zoomLevel, screen, scene }: PinchZoom, source?: GeometrySource) => GeneratorAction;
|
|
4
21
|
export declare const actions$: {
|
|
5
|
-
changeZoomLevelAction$: (value: number) => GeneratorAction;
|
|
6
|
-
streamZoomLevelAction$: (value: number) => GeneratorAction;
|
|
22
|
+
changeZoomLevelAction$: (value: number, source?: GeometrySource) => GeneratorAction;
|
|
23
|
+
streamZoomLevelAction$: (value: number, source?: GeometrySource) => GeneratorAction;
|
|
7
24
|
};
|
|
8
25
|
//# 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
|
package/dist/engine/tag.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export declare const Tag: {
|
|
|
4
4
|
readonly shared: 1;
|
|
5
5
|
readonly changeOnly: 2;
|
|
6
6
|
readonly following: 4;
|
|
7
|
+
/** A step a pointer drag streams, where an undo of the same move is one jump. */
|
|
8
|
+
readonly drag: 8;
|
|
7
9
|
};
|
|
8
10
|
export declare function attachActionTag(tag: number, action: AnyAction): AnyAction;
|
|
9
11
|
export declare function attachActionsTag(tag: number, actions: AnyAction[]): AnyAction[];
|