@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.
- package/README.md +1 -1
- 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/sceneTokens.d.ts +31 -5
- package/dist/components/erd/canvas/table/cellLayout.d.ts +6 -6
- package/dist/components/erd/canvas/table/colorEdge.d.ts +10 -0
- package/dist/components/erd/canvas/table/column/Column.d.ts +12 -3
- package/dist/components/erd/canvas/useMoveEntity.d.ts +6 -0
- 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/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/table-view/Table.styles.d.ts +6 -1
- package/dist/components/table-view/column/useColumnCell.d.ts +5 -0
- package/dist/components/visualization/Visualization.styles.d.ts +4 -1
- package/dist/components/visualization/captureDrag.d.ts +14 -0
- package/dist/components/visualization/useViewGestures.d.ts +2 -2
- package/dist/constants/layout.d.ts +29 -6
- package/dist/engine/index.js +8 -8
- package/dist/engine/modules/editor/generator.actions.d.ts +3 -2
- package/dist/engine/modules/settings/generator.actions.d.ts +15 -0
- package/dist/engine/rx-store.d.ts +1 -0
- package/dist/engine/tag.d.ts +2 -0
- package/dist/erd-editor.umd.js +328 -314
- package/dist/hooks/usePinchZoom.d.ts +27 -0
- package/dist/index.js +5893 -5427
- package/dist/konva/scene/columnDropTarget.d.ts +10 -3
- package/dist/konva/scene/viewLayout.d.ts +10 -5
- package/dist/konva/scene/viewport.d.ts +6 -0
- package/dist/{schemaGCService-CXVjeF9p.js → schemaGCService-CFiz1xOG.js} +3089 -2986
- 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 +1 -5
- package/dist/utils/domEvent.d.ts +2 -0
- package/dist/utils/pinch.d.ts +34 -0
- package/dist/utils/validation.d.ts +1 -0
- package/dist/workers/exportPng.shared-worker.js +26 -26
- package/package.json +3 -3
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shadow a panel floating over the canvas casts, the pair radix gives its
|
|
3
|
+
* dropdowns and dialogs. A light panel reads pasted on without it, its border
|
|
4
|
+
* sitting only a few luminance points off the ground behind.
|
|
5
|
+
*/
|
|
6
|
+
export declare const floatingShadow: import('@dineug/r-html').CSSTemplateLiterals;
|
|
7
|
+
//# sourceMappingURL=elevation.styles.d.ts.map
|
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
import { Theme } from './tokens';
|
|
2
2
|
export declare const ThemeConfig: Theme;
|
|
3
|
+
/**
|
|
4
|
+
* What the gray, gold and bronze accents take instead: their low steps sit on
|
|
5
|
+
* the gray-4 hover, so a selected row stays on gray-6 and a hovered one eases
|
|
6
|
+
* back to gray-5, as gray-7 would take gray-11 text in light down to 3.76:1.
|
|
7
|
+
*/
|
|
8
|
+
export declare const NeutralAccentThemeConfig: Partial<Theme>;
|
|
9
|
+
/**
|
|
10
|
+
* What the light appearance takes instead: its gray 1 to 3 sit too close to lift
|
|
11
|
+
* a table off the canvas, and a step 9 key or line reads under 3:1 on them, so
|
|
12
|
+
* the boxes go white with a gray-8 edge and the keys drop to step 11.
|
|
13
|
+
*/
|
|
14
|
+
export declare const LightThemeConfig: Partial<Theme>;
|
|
3
15
|
//# sourceMappingURL=radix-ui-theme.config.d.ts.map
|
package/dist/themes/tokens.d.ts
CHANGED
|
@@ -26,14 +26,21 @@ export type Theme = {
|
|
|
26
26
|
canvasBackground: string;
|
|
27
27
|
canvasBoundaryBackground: string;
|
|
28
28
|
tableBackground: string;
|
|
29
|
+
tableHeaderBackground: string;
|
|
29
30
|
tableSelect: string;
|
|
30
31
|
tableBorder: string;
|
|
32
|
+
tableShadow: string;
|
|
31
33
|
memoBackground: string;
|
|
32
34
|
memoSelect: string;
|
|
33
35
|
memoBorder: string;
|
|
36
|
+
memoShadow: string;
|
|
34
37
|
columnSelect: string;
|
|
38
|
+
columnSelectHover: string;
|
|
35
39
|
columnHover: string;
|
|
36
40
|
relationshipHover: string;
|
|
41
|
+
visualizationLink: string;
|
|
42
|
+
visualizationColumn: string;
|
|
43
|
+
visualizationRelationship: string;
|
|
37
44
|
toolbarBackground: string;
|
|
38
45
|
contextMenuBackground: string;
|
|
39
46
|
contextMenuSelect: string;
|
|
@@ -32,11 +32,7 @@ export declare function calcViewTableWidths(table: Table, state: RootState, colu
|
|
|
32
32
|
* so the measured width is scaled by both rather than measured a second time.
|
|
33
33
|
*/
|
|
34
34
|
export declare function viewHeaderNameWidth(widthName: number): number;
|
|
35
|
-
/**
|
|
36
|
-
* The header band a source draws above its rows. A view has no icon band over
|
|
37
|
-
* the name, so its card is that much shorter than the same table in the
|
|
38
|
-
* document.
|
|
39
|
-
*/
|
|
35
|
+
/** The header band a source draws above its rows, each at its own line height. */
|
|
40
36
|
export declare function tableHeaderHeight(source?: GeometrySource): number;
|
|
41
37
|
/**
|
|
42
38
|
* The height of one row a source draws. The document row is sized around the
|
package/dist/utils/domEvent.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export declare function onStop(event: Event): void;
|
|
|
4
4
|
export declare function onStopImmediate(event: Event): void;
|
|
5
5
|
export declare function isMouseEvent(event: Event): event is MouseEvent;
|
|
6
6
|
export declare function isTouchEvent(event: Event): event is TouchEvent;
|
|
7
|
+
/** A touch that puts a finger down beside another: a pinch, never a press of its own. */
|
|
8
|
+
export declare function isMultiTouch(event: Event): boolean;
|
|
7
9
|
/**
|
|
8
10
|
* The editor root, which is where a pan has to take the selection off: the top
|
|
9
11
|
* toolbar is a sibling of the scene that pans, so suppressing it any lower
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Subscription } from 'rxjs';
|
|
2
|
+
import { Point } from '../internal-types';
|
|
3
|
+
/**
|
|
4
|
+
* Whether a wheel is a trackpad pinch, which a browser sends as a ctrl wheel.
|
|
5
|
+
* On Apple devices the zoom chord is the command key, so every ctrl wheel is
|
|
6
|
+
* one; elsewhere ctrl is the chord too, and only a wheel short of a notch is.
|
|
7
|
+
*/
|
|
8
|
+
export declare function isPinchWheel(event: WheelEvent): boolean;
|
|
9
|
+
/** How much a pinch wheel scales the zoom: the scale the browser encoded in it. */
|
|
10
|
+
export declare function pinchWheelScale({ deltaY }: WheelEvent): number;
|
|
11
|
+
/** Where a pinch stands: how far it has scaled since it began, and its centre now. */
|
|
12
|
+
export type Pinch = {
|
|
13
|
+
scale: number;
|
|
14
|
+
center: Point;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* What a scene makes of a pinch beginning at the point given, in its own box:
|
|
18
|
+
* the step to take on every move after, or null to let the pinch go by.
|
|
19
|
+
*/
|
|
20
|
+
export type PinchStart = (center: Point) => ((pinch: Pinch) => void) | null;
|
|
21
|
+
/**
|
|
22
|
+
* The pinches a scene box takes besides the wheel: two fingers on a touch
|
|
23
|
+
* screen, and Safari's trackpad pinch, which reaches a page as gesture events.
|
|
24
|
+
* iOS sends both for one pinch, so the fingers win and the gestures stand down.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* const pinch = createPinch(() => root.value, center => step);
|
|
28
|
+
* onMounted(() => addUnsubscribe(pinch.listen()));
|
|
29
|
+
*/
|
|
30
|
+
export declare function createPinch(box: () => HTMLElement, start: PinchStart): {
|
|
31
|
+
handleTouchstart: (event: MouseEvent | TouchEvent) => boolean;
|
|
32
|
+
listen: () => Subscription;
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=pinch.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const toNumString: (value: string) => string;
|
|
2
|
+
export declare const zoomInRange: (value: number) => number;
|
|
2
3
|
export declare const maxWidthCommentInRange: (value: number) => number;
|
|
3
4
|
export declare function canvasSizeInRange(size: number | string): number;
|
|
4
5
|
export declare function zoomLevelInRange(zoom: number): number;
|