@dineug/erd-editor 3.8.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.
Files changed (39) hide show
  1. package/README.md +1 -1
  2. package/dist/components/erd/canvas/column-drag-ghost/ColumnDragGhost.d.ts +10 -0
  3. package/dist/components/erd/canvas/column-drag-ghost/columnDragPointer.d.ts +28 -0
  4. package/dist/components/erd/canvas/sceneTokens.d.ts +31 -5
  5. package/dist/components/erd/canvas/table/cellLayout.d.ts +6 -6
  6. package/dist/components/erd/canvas/table/colorEdge.d.ts +10 -0
  7. package/dist/components/erd/canvas/table/column/Column.d.ts +12 -3
  8. package/dist/components/erd/canvas/useMoveEntity.d.ts +6 -0
  9. package/dist/components/erd/diff-viewer/diff.d.ts +9 -2
  10. package/dist/components/erd/diff-viewer/diffContext.d.ts +9 -0
  11. package/dist/components/primitives/context-menu/context-menu-content/ContextMenuContent.d.ts +2 -0
  12. package/dist/components/primitives/context-menu/context-menu-content/fitMenu.d.ts +20 -0
  13. package/dist/components/table-view/Table.styles.d.ts +6 -1
  14. package/dist/components/table-view/column/useColumnCell.d.ts +5 -0
  15. package/dist/components/visualization/Visualization.styles.d.ts +4 -1
  16. package/dist/components/visualization/captureDrag.d.ts +14 -0
  17. package/dist/components/visualization/useViewGestures.d.ts +2 -2
  18. package/dist/constants/layout.d.ts +29 -6
  19. package/dist/engine/index.js +8 -8
  20. package/dist/engine/modules/editor/generator.actions.d.ts +3 -2
  21. package/dist/engine/modules/settings/generator.actions.d.ts +15 -0
  22. package/dist/engine/rx-store.d.ts +1 -0
  23. package/dist/engine/tag.d.ts +2 -0
  24. package/dist/erd-editor.umd.js +328 -314
  25. package/dist/hooks/usePinchZoom.d.ts +27 -0
  26. package/dist/index.js +5893 -5427
  27. package/dist/konva/scene/columnDropTarget.d.ts +10 -3
  28. package/dist/konva/scene/viewLayout.d.ts +10 -5
  29. package/dist/konva/scene/viewport.d.ts +6 -0
  30. package/dist/{schemaGCService-CXVjeF9p.js → schemaGCService-CFiz1xOG.js} +3089 -2986
  31. package/dist/styles/elevation.styles.d.ts +7 -0
  32. package/dist/themes/radix-ui-theme.config.d.ts +12 -0
  33. package/dist/themes/tokens.d.ts +7 -0
  34. package/dist/utils/calcTable.d.ts +1 -5
  35. package/dist/utils/domEvent.d.ts +2 -0
  36. package/dist/utils/pinch.d.ts +34 -0
  37. package/dist/utils/validation.d.ts +1 -0
  38. package/dist/workers/exportPng.shared-worker.js +26 -26
  39. package/package.json +3 -3
@@ -1,15 +1,22 @@
1
+ import { DraggableColumn } from '../../engine/modules/editor/state';
1
2
  import { RootState } from '../../engine/state';
2
3
  import { Point } from '../../internal-types';
3
4
  import { GeometrySource } from '../../utils/draw-relationship/geometrySource';
4
5
  export type ColumnDropTarget = {
5
6
  tableId: string;
6
- columnId: string;
7
+ /** The row dropped on, or null past the last one, where a drop appends. */
8
+ columnId: string | null;
7
9
  index: number;
8
10
  };
9
11
  /**
10
12
  * The row a column drag would drop on, in canvas coordinates, or null over a
11
- * header, over bare canvas and past the last row. Arithmetic on the rects the
12
- * scene lays rows out with, never a hit canvas read, which costs a frame.
13
+ * header and over bare canvas. A drop appends in a band under a card and
14
+ * anywhere on a table with no rows. Arithmetic, never a hit canvas read.
13
15
  */
14
16
  export declare function findColumnDropTarget(state: RootState, point: Point, source?: GeometrySource): ColumnDropTarget | null;
17
+ /**
18
+ * Whether a drop leaves the order as it stands: over a row the drag carries,
19
+ * or past the end of the table whose last rows are already the dragged ones.
20
+ */
21
+ export declare function isDropInPlace({ collections }: RootState, { tableId, columnIds }: DraggableColumn, target: ColumnDropTarget): boolean;
15
22
  //# sourceMappingURL=columnDropTarget.d.ts.map
@@ -24,8 +24,8 @@ export type HighlightIds = {
24
24
  export declare const DIM_OPACITY = 0.2;
25
25
  /**
26
26
  * Where a table stands in the source given: its own placement in the
27
- * document, or the point the view of that kind placed it at. A view that has
28
- * not placed it yet shows it where the document has it, until a layout lands.
27
+ * document, or the point the view of that kind placed it at. One the view has
28
+ * not placed is measured where the document has it, and drawn by no view.
29
29
  */
30
30
  export declare function getTablePoint(state: RootState, table: Table, source?: GeometrySource): Point;
31
31
  /**
@@ -44,9 +44,14 @@ export declare function relationshipColumnIdsByTable(state: RootState): Map<stri
44
44
  */
45
45
  export declare function getVisibleColumnIds(state: RootState, table: Table, source?: GeometrySource): string[];
46
46
  /**
47
- * What a scene drawn from the source given shows: the whole document, or a
48
- * view's centers with their neighbours one relationship out while it stands on
49
- * centers and what its layout placed while it stands on none, with no memo and only the joining relationships.
47
+ * The tables a view standing on the centers given is laid out over, placed or
48
+ * not: those centers and their neighbours one relationship out, in document order.
49
+ */
50
+ export declare function getReachedTableIds(state: RootState, centerIds: string[]): string[];
51
+ /**
52
+ * What a scene drawn from the source given shows: the whole document, or the
53
+ * tables a view's last layout landed whatever its centers reach now, so a
54
+ * narrowing draws the last landing until its own lands. No memo, and only the joining relationships.
50
55
  */
51
56
  export declare function getVisibleIds(state: RootState, source?: GeometrySource): VisibleIds;
52
57
  /**
@@ -21,6 +21,12 @@ export declare function getActiveTransform(state: RootState): SceneTransform;
21
21
  * document, so it draws something rather than nothing while one is opening.
22
22
  */
23
23
  export declare function getSceneTransform(state: RootState, source?: GeometrySource): SceneTransform;
24
+ /**
25
+ * The placement a zoom is solved against and lands in: the scene named, so a
26
+ * view scene zooms the view it draws whichever is active; with no scene named,
27
+ * the active view's else the document's, which is where the redirect sends the yield.
28
+ */
29
+ export declare function getZoomTransform(state: RootState, source?: GeometrySource): SceneTransform;
24
30
  /**
25
31
  * Where a scene layer sits on the stage, so screen equals scene times the zoom
26
32
  * plus this. The document stores it directly: settings.originX and originY are