@dineug/erd-editor 3.4.0 → 3.5.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 (140) hide show
  1. package/dist/components/appContext.d.ts +8 -1
  2. package/dist/components/erd/automatic-table-placement/createAutomaticTablePlacement.d.ts +17 -1
  3. package/dist/components/erd/canvas/Canvas.d.ts +5 -0
  4. package/dist/components/erd/canvas/Canvas.styles.d.ts +11 -0
  5. package/dist/components/erd/canvas/CanvasScene.d.ts +18 -0
  6. package/dist/components/erd/canvas/EditOverlay.d.ts +8 -0
  7. package/dist/components/erd/canvas/EditOverlay.styles.d.ts +6 -0
  8. package/dist/components/erd/canvas/SceneIcon.template.d.ts +21 -0
  9. package/dist/components/erd/canvas/drag-select/DragSelect.d.ts +11 -0
  10. package/dist/components/erd/canvas/duplicate-ghost/DuplicateGhost.d.ts +5 -0
  11. package/dist/components/erd/canvas/entityDrag.d.ts +4 -0
  12. package/dist/components/erd/canvas/high-level-table/HighLevelTable.d.ts +4 -0
  13. package/dist/components/erd/canvas/memo/Memo.d.ts +2 -0
  14. package/dist/components/erd/canvas/memo/memo-sash/MemoSash.d.ts +11 -1
  15. package/dist/components/erd/canvas/memo/memoCaret.d.ts +26 -0
  16. package/dist/components/erd/canvas/memo/memoScroll.d.ts +28 -0
  17. package/dist/components/erd/canvas/memo/memoText.d.ts +33 -0
  18. package/dist/components/erd/canvas/memo/useMoveMemo.d.ts +6 -0
  19. package/dist/components/erd/canvas/relationship-group/RelationshipGroup.d.ts +15 -0
  20. package/dist/components/erd/canvas/relationship-group/relationship/Relationship.template.d.ts +17 -0
  21. package/dist/components/erd/canvas/sceneHit.d.ts +18 -0
  22. package/dist/components/erd/canvas/sceneKind.d.ts +11 -0
  23. package/dist/components/erd/canvas/sceneRetention.d.ts +31 -0
  24. package/dist/components/erd/canvas/sceneTokens.d.ts +67 -0
  25. package/dist/components/erd/canvas/shared-drag-select/SharedDragSelect.d.ts +4 -0
  26. package/dist/components/erd/canvas/shared-mouse-tracker/SharedMouseTracker.d.ts +1 -0
  27. package/dist/components/erd/canvas/shared-mouse-tracker/shared-mouse-cursor/SharedMouseCursor.d.ts +5 -0
  28. package/dist/components/erd/canvas/table/Table.d.ts +8 -0
  29. package/dist/components/erd/canvas/table/cellLayout.d.ts +63 -0
  30. package/dist/components/erd/canvas/table/column/Column.d.ts +16 -6
  31. package/dist/components/erd/canvas/table/doubleClick.d.ts +14 -0
  32. package/dist/components/erd/canvas/table/useMoveTable.d.ts +1 -1
  33. package/dist/components/erd/canvas/useMoveEntity.d.ts +18 -0
  34. package/dist/components/erd/erd-context-menu/ErdContextMenu.d.ts +1 -2
  35. package/dist/components/erd/erd-context-menu/menus/drawRelationshipMenus.d.ts +2 -2
  36. package/dist/components/erd/erd-context-menu/menus/exportMenus.d.ts +2 -1
  37. package/dist/components/erd/hide-sign/hideSignBounds.d.ts +9 -0
  38. package/dist/components/erd/hitTest.d.ts +22 -0
  39. package/dist/components/erd/minimap/Minimap.styles.d.ts +0 -1
  40. package/dist/components/erd/minimap/MinimapScene.d.ts +16 -0
  41. package/dist/components/erd/minimap/memo/Memo.d.ts +5 -0
  42. package/dist/components/erd/minimap/minimapGeometry.d.ts +52 -0
  43. package/dist/components/erd/minimap/table/Table.d.ts +5 -0
  44. package/dist/components/erd/virtual-scroll/useVirtualScroll.d.ts +19 -0
  45. package/dist/components/global-styles/GlobalStyles.d.ts +3 -12
  46. package/dist/components/primitives/code-block/CodeBlock.styles.d.ts +1 -1
  47. package/dist/components/primitives/icon/icons.d.ts +50 -25
  48. package/dist/components/primitives/sash/Sash.stories.d.ts +1 -1
  49. package/dist/components/primitives/toast/Toast.d.ts +4 -0
  50. package/dist/components/primitives/toast/Toast.stories.d.ts +13 -0
  51. package/dist/components/primitives/toast/Toast.styles.d.ts +5 -0
  52. package/dist/components/{erd/canvas/table → table-view}/column/column-data-type/ColumnDataType.d.ts +1 -1
  53. package/dist/components/table-view/column/useColumnCell.d.ts +23 -0
  54. package/dist/components/themeContext.d.ts +9 -0
  55. package/dist/components/toast-container/openToastWhileRunning.d.ts +11 -0
  56. package/dist/components/visualization/Visualization.d.ts +6 -0
  57. package/dist/components/visualization/Visualization.styles.d.ts +6 -0
  58. package/dist/components/visualization/VisualizationScene.d.ts +21 -0
  59. package/dist/components/visualization/createVisualization.d.ts +67 -8
  60. package/dist/components/visualization/graph-node/GraphNode.d.ts +23 -0
  61. package/dist/components/visualization/table/Table.d.ts +0 -1
  62. package/dist/components/visualization/table/column/Column.d.ts +0 -1
  63. package/dist/components/visualization/visualizationView.d.ts +90 -0
  64. package/dist/constants/language.d.ts +2 -2
  65. package/dist/constants/layout.d.ts +6 -13
  66. package/dist/constants/schema.d.ts +1 -1
  67. package/dist/engine/modules/editor/actions.d.ts +12 -0
  68. package/dist/engine/modules/editor/atom.actions.d.ts +53 -0
  69. package/dist/engine/modules/editor/state.d.ts +20 -0
  70. package/dist/engine/modules/settings/atom.actions.d.ts +24 -0
  71. package/dist/engine.js +10 -10
  72. package/dist/erd-editor.js +23476 -13675
  73. package/dist/konva/batchDraw.d.ts +41 -0
  74. package/dist/konva/host.d.ts +29 -0
  75. package/dist/konva/scene/columnDropTarget.d.ts +13 -0
  76. package/dist/konva/scene/konvaFlip.d.ts +18 -0
  77. package/dist/konva/scene/metrics.d.ts +29 -0
  78. package/dist/konva/scene/renderScene.d.ts +34 -0
  79. package/dist/konva/scene/viewport.d.ts +38 -0
  80. package/dist/konva/testHandle.d.ts +22 -0
  81. package/dist/konva/theme.d.ts +31 -0
  82. package/dist/konva/workerDomStubs.d.ts +1 -0
  83. package/dist/{schemaGCService-DAGNq0wk.js → schemaGCService-DrlqIen8.js} +5246 -4789
  84. package/dist/services/export-png/ExportScene.d.ts +9 -0
  85. package/dist/services/export-png/documentScene.d.ts +20 -0
  86. package/dist/services/export-png/exportPng.shared-worker.d.ts +0 -0
  87. package/dist/services/export-png/exportPngService.d.ts +24 -0
  88. package/dist/services/export-png/index.d.ts +48 -0
  89. package/dist/services/export-png/pixelRatio.d.ts +21 -0
  90. package/dist/services/export-png/renderPng.d.ts +37 -0
  91. package/dist/services/export-png/textWidth.d.ts +27 -0
  92. package/dist/services/schema-gc/index.d.ts +5 -0
  93. package/dist/styles/colorPicker.style.d.ts +3 -7
  94. package/dist/styles/fonts.styles.d.ts +1 -1
  95. package/dist/styles/reset.styles.d.ts +1 -1
  96. package/dist/styles/scrollbar.styles.d.ts +3 -3
  97. package/dist/styles/typography.styles.d.ts +1 -1
  98. package/dist/themes/tokens.d.ts +4 -0
  99. package/dist/utils/calcTable.d.ts +1 -1
  100. package/dist/utils/draw-relationship/incremental.d.ts +70 -0
  101. package/dist/utils/draw-relationship/index.d.ts +47 -42
  102. package/dist/utils/draw-relationship/nudge.d.ts +2 -1
  103. package/dist/utils/draw-relationship/pathFinding.d.ts +3 -5
  104. package/dist/utils/draw-relationship/route.d.ts +4 -9
  105. package/dist/utils/draw-relationship/stub.d.ts +5 -16
  106. package/dist/utils/emitter.d.ts +16 -0
  107. package/dist/utils/file/exportFile.d.ts +10 -1
  108. package/dist/utils/focus.d.ts +1 -1
  109. package/dist/utils/globalEventObservable.d.ts +13 -12
  110. package/dist/utils/icon.d.ts +9 -1
  111. package/dist/utils/keyboard-shortcut/index.d.ts +6 -0
  112. package/dist/utils/schema-aml-parser/dataType.d.ts +5 -6
  113. package/dist/utils/schema-aml-parser/tokenizer.d.ts +3 -5
  114. package/dist/utils/schema-aml-parser/types.d.ts +13 -14
  115. package/dist/utils/schema-dbml-parser/dataType.d.ts +2 -2
  116. package/dist/utils/schema-dbml-parser/types.d.ts +5 -5
  117. package/dist/utils/schema-graphql-parser/dataType.d.ts +2 -2
  118. package/dist/utils/schema-graphql-parser/types.d.ts +7 -7
  119. package/package.json +6 -5
  120. package/dist/components/erd/canvas/canvas-svg/CanvasSvg.d.ts +0 -7
  121. package/dist/components/erd/canvas/canvas-svg/relationship/Relationship.template.d.ts +0 -3
  122. package/dist/components/erd/canvas/draw-relationship/DrawRelationship.styles.d.ts +0 -1
  123. package/dist/components/erd/canvas/duplicate-ghost/DuplicateGhost.styles.d.ts +0 -2
  124. package/dist/components/erd/canvas/high-level-table/HighLevelTable.styles.d.ts +0 -1
  125. package/dist/components/erd/canvas/memo/Memo.styles.d.ts +0 -6
  126. package/dist/components/erd/canvas/shared-mouse-tracker/shared-mouse-cursor/SharedMouseCursor.styles.d.ts +0 -1
  127. package/dist/components/erd/canvas/table/column/Column.styles.d.ts +0 -2
  128. package/dist/components/erd/drag-select/DragSelect.d.ts +0 -9
  129. package/dist/components/erd/drag-select/DragSelect.styles.d.ts +0 -1
  130. /package/dist/components/erd/canvas/{canvas-svg → relationship-group}/relationship/Relationship.d.ts +0 -0
  131. /package/dist/components/{erd/canvas/table → table-view}/Table.styles.d.ts +0 -0
  132. /package/dist/components/{erd/canvas/canvas-svg/CanvasSvg.styles.d.ts → table-view/column/Column.styles.d.ts} +0 -0
  133. /package/dist/components/{erd/canvas/table → table-view}/column/column-data-type/ColumnDataType.styles.d.ts +0 -0
  134. /package/dist/components/{erd/canvas/table → table-view}/column/column-key/ColumnKey.d.ts +0 -0
  135. /package/dist/components/{erd/canvas/table → table-view}/column/column-key/ColumnKey.styles.d.ts +0 -0
  136. /package/dist/components/{erd/canvas/table → table-view}/column/column-not-null/ColumnNotNull.d.ts +0 -0
  137. /package/dist/components/{erd/canvas/table → table-view}/column/column-not-null/ColumnNotNull.styles.d.ts +0 -0
  138. /package/dist/components/{erd/canvas/table → table-view}/column/column-option/ColumnOption.d.ts +0 -0
  139. /package/dist/components/{erd/canvas/table → table-view}/column/column-option/ColumnOption.styles.d.ts +0 -0
  140. /package/dist/{services/schema-gc/schemaGC.worker.d.ts → konva/jsx-types.test-d.d.ts} +0 -0
@@ -0,0 +1,18 @@
1
+ import { ScenePointerEvent } from './sceneTokens';
2
+ import { SelectType } from '../../../engine/modules/editor/state';
3
+ import { Ctx } from '../../../internal-types';
4
+ export type MoveEntityOptions = {
5
+ /** Read late, because repeat hands a component a new entity in place. */
6
+ entityId: () => string;
7
+ selectType: SelectType;
8
+ /** The scene kinds a drag never starts from, as closest read their classes. */
9
+ blockedKinds: readonly string[];
10
+ };
11
+ /**
12
+ * The pointer start every draggable entity shares: select it, hand an Alt drag
13
+ * to the duplicate ghost, and otherwise move the whole selection with the
14
+ * pointer. Only the entity kind and the blocked areas differ between them.
15
+ */
16
+ export declare function useMoveEntity(ctx: Ctx, options: MoveEntityOptions): {
17
+ onMoveStart: (event: ScenePointerEvent) => void;
18
+ };
@@ -1,4 +1,4 @@
1
- import { FC, Ref } from '@dineug/r-html';
1
+ import { FC } from '@dineug/r-html';
2
2
  import { ValuesType } from '../../../internal-types';
3
3
  export declare const ErdContextMenuType: {
4
4
  readonly ERD: "ERD";
@@ -8,7 +8,6 @@ export declare const ErdContextMenuType: {
8
8
  export type ErdContextMenuType = ValuesType<typeof ErdContextMenuType>;
9
9
  export type ErdContextMenuProps = {
10
10
  type: ErdContextMenuType;
11
- canvas: Ref<HTMLDivElement>;
12
11
  relationshipId?: string;
13
12
  tableId?: string;
14
13
  onClose: () => void;
@@ -1,8 +1,8 @@
1
1
  import { AppContext } from '../../../appContext';
2
- import { Base64IconName } from '../../../primitives/icon/icons';
2
+ import { NotationIconName } from '../../../primitives/icon/icons';
3
3
  import { KeyBindingName } from '../../../../utils/keyboard-shortcut';
4
4
  type Menu = {
5
- iconName: Base64IconName;
5
+ iconName: NotationIconName;
6
6
  name: string;
7
7
  keyBindingName: KeyBindingName;
8
8
  relationshipType: number;
@@ -1,9 +1,10 @@
1
1
  import { AppContext } from '../../../appContext';
2
2
  import { IconName } from '../../../primitives/icon/icons';
3
+ import { Theme } from '../../../../themes/tokens';
3
4
  type Menu = {
4
5
  icon: IconName;
5
6
  name: string;
6
7
  onClick: () => void;
7
8
  };
8
- export declare function createExportMenus(app: AppContext, onClose: () => void, root: HTMLElement): Menu[];
9
+ export declare function createExportMenus(app: AppContext, onClose: () => void, theme: Theme): Menu[];
9
10
  export {};
@@ -0,0 +1,9 @@
1
+ import { Viewport } from '../../../engine/modules/editor/state';
2
+ import { ScrollTransform } from '../../../engine/modules/settings/atom.actions';
3
+ import { Rect } from '../../../utils/dragSelect';
4
+ /**
5
+ * The scene a reader can still get to: what the screen shows, taken over every
6
+ * scroll offset the current zoom allows. A magnifying zoom sees less at once
7
+ * but reaches the same document, so the bound has to follow the travel.
8
+ */
9
+ export declare function getReachableRect(settings: ScrollTransform, viewport: Viewport): Rect;
@@ -0,0 +1,22 @@
1
+ import { Stage } from 'konva/lib/Stage';
2
+ /** The scene entities the erd routing tells apart from one another. */
3
+ export type SceneEntityKind = 'table' | 'memo' | 'relationship';
4
+ export type SceneHit = {
5
+ kind: SceneEntityKind;
6
+ id: string;
7
+ };
8
+ /**
9
+ * Records the entity konva hit for every press a stage dispatches, and returns
10
+ * the teardown. Konva resolves the node while the hit canvas still matches the
11
+ * scene, so the walk up to the entity runs there too.
12
+ *
13
+ * @example
14
+ * addUnsubscribe(trackSceneHits(stage));
15
+ */
16
+ export declare function trackSceneHits(stage: Stage): () => void;
17
+ /**
18
+ * The scene entity a pointer event landed on, or null for bare canvas and for a
19
+ * target outside the stage. Konva resolved it as it dispatched that same event,
20
+ * because the press has re-rendered the scene by the time this is asked.
21
+ */
22
+ export declare function sceneHit(container: HTMLElement | null | undefined, event: MouseEvent | TouchEvent): SceneHit | null;
@@ -1,3 +1,2 @@
1
1
  export declare const minimap: import('@dineug/r-html').CSSTemplateLiterals;
2
2
  export declare const border: import('@dineug/r-html').CSSTemplateLiterals;
3
- export declare const canvasSvg: import('@dineug/r-html').CSSTemplateLiterals;
@@ -0,0 +1,16 @@
1
+ import { FC } from '@dineug/r-html';
2
+ import { Stage } from 'konva/lib/Stage';
3
+ export type MinimapSceneProps = {};
4
+ /**
5
+ * The whole document on one layer, with no culling: a thumbnail that dropped
6
+ * what is off screen would stop being a map of where the rest of it is. Boxes
7
+ * only, because a connector between two of them is noise at this size.
8
+ */
9
+ declare const MinimapScene: FC<MinimapSceneProps>;
10
+ /**
11
+ * Renders the minimap scene as the root of its Stage. Named in lower case on
12
+ * purpose: an all-upper-case export list makes r-html's refresh treat this as a
13
+ * component module and self-accept it, which kills hmr for the whole scene.
14
+ */
15
+ export declare function renderMinimapScene(stage: Stage): void;
16
+ export default MinimapScene;
@@ -3,5 +3,10 @@ import { Memo } from '../../../../internal-types';
3
3
  export type MemoProps = {
4
4
  memo: Memo;
5
5
  };
6
+ /**
7
+ * A memo as the minimap draws it: the box and nothing in it. The id rides in
8
+ * the name, the way a relationship carries its own, because an id on a second
9
+ * stage would make an id scan over the live stages ambiguous.
10
+ */
6
11
  declare const Memo: FC<MemoProps>;
7
12
  export default Memo;
@@ -0,0 +1,52 @@
1
+ import { Point } from '../../../internal-types';
2
+ import { SceneTransform } from '../../../konva/scene/viewport';
3
+ /** The canvas box the minimap draws, plus the screen that is looking at it. */
4
+ export type MinimapTransform = SceneTransform & {
5
+ viewportWidth: number;
6
+ viewportHeight: number;
7
+ };
8
+ export type MinimapRect = {
9
+ x: number;
10
+ y: number;
11
+ width: number;
12
+ height: number;
13
+ };
14
+ /**
15
+ * The whole canvas box scaled into the minimap square, with no zoom term. Fixed
16
+ * on purpose: the thumbnail stays a map of the document at one size, and the
17
+ * zoom shows up in the rectangle drawn over it instead.
18
+ */
19
+ export declare function getMinimapRatio(width: number): number;
20
+ /**
21
+ * The canvas the screen actually covers, read back through the very origin
22
+ * getSceneOrigin places the scene layer at. One screen pixel buys one over the
23
+ * zoom in canvas units, so zooming out widens this with the scroll standing still.
24
+ */
25
+ export declare function getVisibleCanvasRect(transform: MinimapTransform): MinimapRect;
26
+ /** That same rectangle in the minimap's own pixels, which is where it is drawn. */
27
+ export declare function getMinimapViewportRect(transform: MinimapTransform): MinimapRect;
28
+ /** The thumbnail's own box: the canvas box at the minimap ratio, 150 wide. */
29
+ export declare function getMinimapBoxSize(width: number, height: number): {
30
+ width: number;
31
+ height: number;
32
+ };
33
+ /**
34
+ * The rectangle as drawn, trimmed to the thumbnail box. Zooming out far enough
35
+ * makes the screen reach past the canvas on every side, and this box is a
36
+ * pointer target, so what leaves the map is dropped instead of laid over it.
37
+ */
38
+ export declare function getMinimapHandleRect(transform: MinimapTransform): MinimapRect;
39
+ /**
40
+ * A canvas distance as the scroll that travels it. Scroll is measured in screen
41
+ * pixels and moves the view the opposite way, so it carries both the zoom and
42
+ * the sign that a minimap coordinate does not.
43
+ */
44
+ export declare function toScrollDistance(distance: number, zoomLevel: number): number;
45
+ /** Minimap travel as the scroll that keeps the rectangle under the pointer. */
46
+ export declare function toScrollMovement(movement: number, ratio: number, zoomLevel: number): number;
47
+ /**
48
+ * The scroll that puts a canvas point in the middle of the screen. Stated as a
49
+ * step away from where the scroll stands now, so the origin is read once through
50
+ * getVisibleCanvasRect rather than restated inverted here.
51
+ */
52
+ export declare function getScrollToCenter(transform: MinimapTransform, center: Point): Point;
@@ -3,5 +3,10 @@ import { Table } from '../../../../internal-types';
3
3
  export type TableProps = {
4
4
  table: Table;
5
5
  };
6
+ /**
7
+ * A table as the minimap draws it: the box and nothing in it. The id stays off
8
+ * the node because two stages spelling one id make an id scan ambiguous, so a
9
+ * minimap node is found by its name and the table it carries.
10
+ */
6
11
  declare const Table: FC<TableProps>;
7
12
  export default Table;
@@ -1,4 +1,21 @@
1
+ import { ScrollRange } from '../../../engine/modules/settings/atom.actions';
1
2
  import { Ctx } from '../../../internal-types';
3
+ /** One scrollbar as drawn: a track a viewport wide over the content behind it. */
4
+ export type ScrollbarTrack = {
5
+ range: ScrollRange;
6
+ ratio: number;
7
+ thumb: number;
8
+ offset: number;
9
+ scrollable: boolean;
10
+ };
11
+ /**
12
+ * The bar for one axis, sized from the travel the engine allows rather than from
13
+ * the canvas box. The content behind the track is a viewport plus that travel,
14
+ * which is the only place the zoom enters, and at zoom 1 the two read the same.
15
+ */
16
+ export declare function getScrollbarTrack(range: ScrollRange, scroll: number, viewportLength: number): ScrollbarTrack;
17
+ /** The scroll that centres the viewport on a point pressed on a track. */
18
+ export declare function trackPointToScroll({ range, ratio }: ScrollbarTrack, point: number, viewportLength: number): number;
2
19
  export declare function useVirtualScroll(ctx: Ctx): {
3
20
  state: {
4
21
  selected: null | "horizontal" | "vertical";
@@ -7,4 +24,6 @@ export declare function useVirtualScroll(ctx: Ctx): {
7
24
  onScrollTopStart: (event: MouseEvent) => void;
8
25
  getWidthRatio: () => number;
9
26
  getHeightRatio: () => number;
27
+ getHorizontalTrack: () => ScrollbarTrack;
28
+ getVerticalTrack: () => ScrollbarTrack;
10
29
  };
@@ -1,18 +1,9 @@
1
1
  import { FC } from '@dineug/r-html';
2
2
  export type GlobalStylesProps = {};
3
3
  /**
4
- * Renders nothing, and stays anyway.
5
- *
6
- * Every sheet it used to be responsible for is an adopted global literal now, so there is no
7
- * markup left to emit. What is left is the `setGlobalStyleOrder` call above, which is a module
8
- * side effect — it only runs if something imports this module, and the bucket order is the one
9
- * thing in the style layer with no test-visible symptom until the cascade is already wrong.
10
- *
11
- * Being a component is what makes that import load-bearing on its face. `ErdEditor` renders
12
- * `<${GlobalStyles} />`, which no bundler will drop and no `no-unused-imports` pass will offer to
13
- * delete; a bare `import '@/components/global-styles/GlobalStyles'` in its place would be a naked
14
- * side-effect import that `simple-import-sort` is free to move and a future cleanup is free to
15
- * mistake for dead weight. The empty render is the cheaper half of that trade.
4
+ * Renders nothing, and stays anyway. What is left is the setGlobalStyleOrder
5
+ * call above, a module side effect, and being a component is what keeps its
6
+ * import load-bearing on its face rather than a naked side-effect import.
16
7
  */
17
8
  declare const GlobalStyles: FC<GlobalStylesProps>;
18
9
  export default GlobalStyles;
@@ -1,6 +1,6 @@
1
1
  export declare const clipboard: import('@dineug/r-html').CSSTemplateLiterals;
2
2
  export declare const root: import('@dineug/r-html').CSSTemplateLiterals;
3
- /** Out of flow, the root loses its content height and collapses to `min-height`. */
3
+ /** Out of flow, the root loses its content height and collapses to min-height. */
4
4
  export declare const scroller: import('@dineug/r-html').CSSTemplateLiterals;
5
5
  /** Sized by the preview, so the overlay stretched onto it has no scroll of its own to desync. */
6
6
  export declare const layers: import('@dineug/r-html').CSSTemplateLiterals;
@@ -1,22 +1,9 @@
1
1
  import { IconNode } from 'lucide';
2
- import { ValuesType } from '../../../internal-types';
3
- /** Raster crow's-foot notation; `@/utils/icon` reads the data URIs back as strings. */
4
- export declare const BASE_64_ICON: {
5
- /** @deprecated */
6
- readonly ZeroOneN: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6Q0RFRDI1RjI0ODY0MTFFN0JEQTA4NTA5QjY4NEI4Mz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ieG1wLmlpZDozNDQwRjc3NTQ4M0MxMUU3QkRBMDg1MDlCNjg0QjgzMCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozNDQwRjc3NjQ4M0MxMUU3QkRBMDg1MDlCNjg0QjgzMCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkbQDKwAAAGjSURBVHja7Jcxb4JQEMefLl272cjSUbYu0g+gSVemdpPZwKzRRSf4AGg70k8AfACTdqx+ibYJLp2MfoDr/wg0vJp2Al6TeskFeQ+4e/fufvdsEJFQKU2hWE4OKHeg0el0TlugQi6h5+kW1MkBXddbuMw0TRvu93txOBwumjUaH+Hy4jjOcLVaCcuyeHgmOAJVKpLcgAaDwYCSJKGi9Hq9yo273W6XwjCUDCP8NJlMCPP3VRm+hT6xETZWlCiKiJ3CvJfmX8mGW7wqDu16vZYMb7db4m3A/CP0On+HQTRHMpRVCiaS7Mq2bWlwuVyKxWLxjp/BEQkxQWWVYr/fF9/JipALrP5nFJPiA0EagbI+BsAI0zSlMV59HMe/NqN5mYg1DMPyPE+02+2vwc1mI6bTKTvzgNsP6Y0KSnAMfctySxLf97kKXqGj/PmqOJCWI7aDsHrJCaZhVo4BU7JqEt5Bn13XPQIS05GBVEcvOGPqsTE0IQnHtThQcOQGGnP4mYpZL/Bqc6CYpFkvGOcoVsEfPg3tVB7Jdn/nWH76b/jvHfgUYADeZNmzPgOYQQAAAABJRU5ErkJggg==";
15
- };
16
- export type BASE_64_ICON = ValuesType<typeof BASE_64_ICON>;
17
2
  export declare const ICON_VIEW_BOX = "0 0 24 24";
3
+ /** The stroke lucide draws with, in the box its path data is written in. */
4
+ export declare const ICON_STROKE_WIDTH = 2;
18
5
  export type IconNodeChild = IconNode[number];
19
- declare const SVG_ICON: {
6
+ declare const LUCIDE_ICON: {
20
7
  atom: IconNode;
21
8
  braces: IconNode;
22
9
  brackets: IconNode;
@@ -56,17 +43,55 @@ declare const SVG_ICON: {
56
43
  workflow: IconNode;
57
44
  x: IconNode;
58
45
  };
59
- export type SvgIconName = keyof typeof SVG_ICON;
60
- export type Base64IconName = keyof typeof BASE_64_ICON;
61
- export type IconName = SvgIconName | Base64IconName;
46
+ /**
47
+ * Crow's-foot notation on lucide's grid, named after the v2 RelationshipType
48
+ * members: a connector along y 12 carrying a ring, one or two bars and a fork,
49
+ * each glyph spanning the safe area so the seven line up in a menu.
50
+ */
51
+ export declare const NOTATION_ICON: {
52
+ /** @deprecated The one glyph carrying all three marks, so its ring sits flush left for room. */
53
+ ZeroOneN: ([string, {
54
+ cx: string;
55
+ cy: string;
56
+ r: string;
57
+ }] | [string, {
58
+ d: string;
59
+ }])[];
60
+ ZeroOne: ([string, {
61
+ d: string;
62
+ }] | [string, {
63
+ cx: string;
64
+ cy: string;
65
+ r: string;
66
+ }])[];
67
+ ZeroN: ([string, {
68
+ d: string;
69
+ }] | [string, {
70
+ cx: string;
71
+ cy: string;
72
+ r: string;
73
+ }])[];
74
+ OneOnly: [string, {
75
+ d: string;
76
+ }][];
77
+ OneN: [string, {
78
+ d: string;
79
+ }][];
80
+ /** @deprecated */
81
+ One: [string, {
82
+ d: string;
83
+ }][];
84
+ /** @deprecated */
85
+ N: [string, {
86
+ d: string;
87
+ }][];
88
+ };
89
+ export type LucideIconName = keyof typeof LUCIDE_ICON;
90
+ export type NotationIconName = keyof typeof NOTATION_ICON;
91
+ export type IconName = LucideIconName | NotationIconName;
62
92
  export type IconDefinition = {
63
- type: 'svg';
64
- name: SvgIconName;
93
+ name: IconName;
65
94
  node: IconNode;
66
- } | {
67
- type: 'base64';
68
- name: Base64IconName;
69
- src: string;
70
95
  };
71
96
  export declare const iconMap: Record<IconName, IconDefinition>;
72
97
  export declare function getIcon(name: string): IconDefinition | undefined;
@@ -9,7 +9,7 @@ declare const meta: {
9
9
  control: "radio";
10
10
  };
11
11
  cursor: {
12
- options: ("default" | "ew-resize" | "ns-resize" | "nesw-resize" | "nwse-resize")[];
12
+ options: ("default" | "ew-resize" | "ns-resize" | "nwse-resize" | "nesw-resize")[];
13
13
  control: "select";
14
14
  };
15
15
  top: {
@@ -3,6 +3,10 @@ export type ToastProps = {
3
3
  title?: DOMTemplateLiterals | string;
4
4
  description?: DOMTemplateLiterals | string;
5
5
  action?: DOMTemplateLiterals | string;
6
+ /** The thing reported is still running, which a turning ring says. */
7
+ busy?: boolean;
8
+ /** How far along it is, from 0 to 1, which the ring fills up by. */
9
+ progress?: number;
6
10
  };
7
11
  declare const Toast: FC<ToastProps>;
8
12
  export default Toast;
@@ -13,8 +13,21 @@ declare const meta: {
13
13
  action: {
14
14
  control: "text";
15
15
  };
16
+ busy: {
17
+ control: "boolean";
18
+ };
19
+ progress: {
20
+ control: {
21
+ type: "range";
22
+ min: number;
23
+ max: number;
24
+ step: number;
25
+ };
26
+ };
16
27
  };
17
28
  };
18
29
  export default meta;
19
30
  type Story = StoryObj<ToastProps>;
20
31
  export declare const Normal: Story;
32
+ export declare const Busy: Story;
33
+ export declare const Progress: Story;
@@ -1,4 +1,9 @@
1
1
  export declare const root: import('@dineug/r-html').CSSTemplateLiterals;
2
+ /**
3
+ * The ring beside the text of a toast that reports something still running.
4
+ * A busy one turns a quarter of it; one with a progress fills it from the top.
5
+ */
6
+ export declare const indicator: import('@dineug/r-html').CSSTemplateLiterals;
2
7
  export declare const textWrap: import('@dineug/r-html').CSSTemplateLiterals;
3
8
  export declare const title: import('@dineug/r-html').CSSTemplateLiterals;
4
9
  export declare const description: import('@dineug/r-html').CSSTemplateLiterals;
@@ -1,5 +1,5 @@
1
1
  import { FC, Ref } from '@dineug/r-html';
2
- import { AppContext } from '../../../../../appContext';
2
+ import { AppContext } from '../../../appContext';
3
3
  export type ColumnDataTypeProps = {
4
4
  app?: Ref<AppContext>;
5
5
  tableId: string;
@@ -0,0 +1,23 @@
1
+ import { Ref } from '@dineug/r-html';
2
+ import { AppContext } from '../../appContext';
3
+ import { DataTypeHint } from '../../../constants/sql/dataType';
4
+ export type ColumnCellProps = {
5
+ tableId: string;
6
+ columnId: string;
7
+ edit?: boolean;
8
+ value: string;
9
+ onEditEnd?: () => void;
10
+ };
11
+ /**
12
+ * Data type autocomplete state and key handling for a column cell, shared by
13
+ * the DOM cell and by the Konva cell that replaces it.
14
+ */
15
+ export declare function useColumnCell(props: ColumnCellProps, app: Ref<AppContext>): {
16
+ state: {
17
+ hints: DataTypeHint[];
18
+ index: number;
19
+ };
20
+ setHints: (value: string) => void;
21
+ handleSelectHint: (index: number) => void;
22
+ handleKeydown: (event: KeyboardEvent) => void;
23
+ };
@@ -0,0 +1,9 @@
1
+ import { Ctx } from '../internal-types';
2
+ import { Theme } from '../themes/tokens';
3
+ /**
4
+ * The scene's colours as values. A stylesheet resolved a custom property per
5
+ * node and konva resolves none, so the whole palette reaches every scene node
6
+ * through one context and a theme change is one provider set away from a repaint.
7
+ */
8
+ export declare const themeContext: import('@dineug/r-html').Context<Theme>;
9
+ export declare const useThemeContext: (ctx: Ctx) => import('@dineug/r-html').Ref<Theme>;
@@ -0,0 +1,11 @@
1
+ import { DOMTemplateLiterals } from '@dineug/r-html';
2
+ import { Emitter } from '../../utils/emitter';
3
+ /**
4
+ * Says that something is running, but only when it runs long enough to be
5
+ * worth a message. Resolves once nothing is left on screen for it, which lets
6
+ * a caller report the outcome after this toast rather than on top of it.
7
+ *
8
+ * @example
9
+ * await openToastWhileRunning(emitter, running, html`<${Toast} description=${'Working'} />`);
10
+ */
11
+ export declare function openToastWhileRunning(emitter: Emitter, running: Promise<unknown>, message: DOMTemplateLiterals): Promise<void>;
@@ -1,4 +1,10 @@
1
1
  import { FC } from '@dineug/r-html';
2
+ import { Visualization } from './createVisualization';
2
3
  export type VisualizationProps = {};
4
+ /**
5
+ * The dom shell around the graph: the Stage container, the wheel that zooms
6
+ * it, and the table preview that opens over a hovered table dot. The layout,
7
+ * the view and the hover live in one observable here and never reach the store.
8
+ */
3
9
  declare const Visualization: FC<VisualizationProps>;
4
10
  export default Visualization;
@@ -1 +1,7 @@
1
+ /**
2
+ * Overflow is hidden rather than scrolled: the graph pans and zooms on its own
3
+ * Stage, so nothing here is ever larger than the box it sits in.
4
+ */
1
5
  export declare const root: import('@dineug/r-html').CSSTemplateLiterals;
6
+ /** The Stage container, viewport sized, which konva fills with its own canvas. */
7
+ export declare const stage: import('@dineug/r-html').CSSTemplateLiterals;
@@ -0,0 +1,21 @@
1
+ import { FC } from '@dineug/r-html';
2
+ import { Stage } from 'konva/lib/Stage';
3
+ import { Visualization } from './createVisualization';
4
+ import { VisualizationState } from './visualizationView';
5
+ export type VisualizationSceneProps = {
6
+ graph: Visualization;
7
+ state: VisualizationState;
8
+ };
9
+ /**
10
+ * The graph on two layers: a stage sized box that takes a pan, and the scene
11
+ * itself under the view transform, links below dots below labels. Only a table
12
+ * carries a name, and a hovered table lights its neighbourhood over the rest.
13
+ */
14
+ declare const VisualizationScene: FC<VisualizationSceneProps>;
15
+ /**
16
+ * Renders the graph as the root of its Stage. Named in lower case on purpose:
17
+ * an all-upper-case export list makes r-html's refresh treat this as a
18
+ * component module and self-accept it, which kills hmr for the whole scene.
19
+ */
20
+ export declare function renderVisualizationScene(stage: Stage, props: VisualizationSceneProps): void;
21
+ export default VisualizationScene;
@@ -1,9 +1,68 @@
1
+ import { Simulation } from 'd3-force';
1
2
  import { RootState } from '../../engine/state';
2
- type Props = {
3
- onDragStart: () => void;
4
- onDragEnd: () => void;
5
- onStartPreview: (event: MouseEvent, tableId: string | null, columnId: string | null) => void;
6
- onEndPreview: () => void;
7
- };
8
- export declare function createVisualization(state: RootState, props: Props): import('d3-selection').Selection<SVGSVGElement, undefined, null, undefined>;
9
- export {};
3
+ import { ValuesType } from '../../internal-types';
4
+ export declare const Group: {
5
+ readonly table: "table";
6
+ readonly column: "column";
7
+ };
8
+ export type Group = ValuesType<typeof Group>;
9
+ /**
10
+ * One dot of the graph. d3 owns the position fields from the first step on,
11
+ * and a pinned node is one whose fixed pair is set, which is how a drag holds
12
+ * it against the forces the way the svg drag did.
13
+ */
14
+ export type VisualizationNode = {
15
+ id: string;
16
+ group: Group;
17
+ name: string;
18
+ /** The table a column hangs off; a table node has none. */
19
+ tableId: string | null;
20
+ x: number;
21
+ y: number;
22
+ fx: number | null;
23
+ fy: number | null;
24
+ };
25
+ export declare const LinkKind: {
26
+ readonly column: "column";
27
+ readonly relationship: "relationship";
28
+ };
29
+ export type LinkKind = ValuesType<typeof LinkKind>;
30
+ /**
31
+ * One line of the graph. Each end is an id when the link is built and the node
32
+ * it named once the link force has resolved it, which createVisualization does
33
+ * before it returns; linkEnds is the read that takes that for granted.
34
+ */
35
+ export type VisualizationLink = {
36
+ id: string;
37
+ kind: LinkKind;
38
+ source: VisualizationNode | string;
39
+ target: VisualizationNode | string;
40
+ };
41
+ export type VisualizationGraph = {
42
+ nodes: VisualizationNode[];
43
+ links: VisualizationLink[];
44
+ };
45
+ export type Visualization = VisualizationGraph & {
46
+ simulation: Simulation<VisualizationNode, VisualizationLink>;
47
+ };
48
+ /**
49
+ * The document as a graph: a node per table and per column, a link from each
50
+ * column to its table and one per pair of tables a relationship joins. The
51
+ * pair is ordered, so the same two tables joined both ways draw two lines.
52
+ */
53
+ export declare function convertVisualization({ doc: { tableIds, relationshipIds }, collections, }: RootState): VisualizationGraph;
54
+ /**
55
+ * Both ends of a link as nodes. The link force rewrote each id to its node when
56
+ * createVisualization installed it, and no link reaches a scene before that.
57
+ */
58
+ export declare function linkEnds(link: VisualizationLink): [VisualizationNode, VisualizationNode];
59
+ /**
60
+ * The graph with the force layout running over it. The forces are the ones the
61
+ * svg graph ran, links holding their length, nodes repelling and both axes
62
+ * pulling toward the origin, which the view puts at the middle of the stage.
63
+ *
64
+ * @example
65
+ * const { nodes, links, simulation } = createVisualization(store.state);
66
+ * simulation.on('tick', redraw);
67
+ */
68
+ export declare function createVisualization(state: RootState): Visualization;
@@ -0,0 +1,23 @@
1
+ import { FC } from '@dineug/r-html';
2
+ import { Visualization, VisualizationNode } from '../createVisualization';
3
+ import { VisualizationState } from '../visualizationView';
4
+ export type GraphNodeProps = {
5
+ node: VisualizationNode;
6
+ /**
7
+ * The node's place, handed down rather than read off the node, so a step of
8
+ * the simulation the scene saw reaches this dot as a changed prop.
9
+ */
10
+ x: number;
11
+ y: number;
12
+ /** Outside the neighbourhood of the hovered table, which the scene decides. */
13
+ dimmed: boolean;
14
+ graph: Visualization;
15
+ state: VisualizationState;
16
+ };
17
+ /**
18
+ * One dot, owning its own hover and drag. A hovered table opens its preview
19
+ * and lights its neighbourhood, a hovered column only wears a ring, and a
20
+ * press pins the node under the pointer and reheats the layout around it.
21
+ */
22
+ declare const GraphNode: FC<GraphNodeProps>;
23
+ export default GraphNode;
@@ -2,7 +2,6 @@ import { FC } from '@dineug/r-html';
2
2
  import { Table } from '../../../internal-types';
3
3
  export type TableProps = {
4
4
  table: Table;
5
- columnId: string | null;
6
5
  x: number;
7
6
  y: number;
8
7
  };