@dineug/erd-editor 3.3.1 → 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.
- package/README.md +197 -17
- package/dist/components/appContext.d.ts +8 -1
- package/dist/components/erd/automatic-table-placement/createAutomaticTablePlacement.d.ts +17 -1
- package/dist/components/erd/canvas/Canvas.d.ts +5 -0
- package/dist/components/erd/canvas/Canvas.styles.d.ts +11 -0
- package/dist/components/erd/canvas/CanvasScene.d.ts +18 -0
- package/dist/components/erd/canvas/EditOverlay.d.ts +8 -0
- package/dist/components/erd/canvas/EditOverlay.styles.d.ts +6 -0
- package/dist/components/erd/canvas/SceneIcon.template.d.ts +21 -0
- package/dist/components/erd/canvas/altDragDuplicate.d.ts +3 -0
- package/dist/components/erd/canvas/drag-select/DragSelect.d.ts +11 -0
- package/dist/components/erd/canvas/duplicate-ghost/DuplicateGhost.d.ts +9 -0
- package/dist/components/erd/canvas/entityDrag.d.ts +4 -0
- package/dist/components/erd/canvas/high-level-table/HighLevelTable.d.ts +4 -0
- package/dist/components/erd/canvas/memo/Memo.d.ts +2 -0
- package/dist/components/erd/canvas/memo/memo-sash/MemoSash.d.ts +11 -1
- package/dist/components/erd/canvas/memo/memoCaret.d.ts +26 -0
- package/dist/components/erd/canvas/memo/memoScroll.d.ts +28 -0
- package/dist/components/erd/canvas/memo/memoText.d.ts +33 -0
- package/dist/components/erd/canvas/memo/useMoveMemo.d.ts +6 -0
- package/dist/components/erd/canvas/relationship-group/RelationshipGroup.d.ts +15 -0
- package/dist/components/erd/canvas/relationship-group/relationship/Relationship.template.d.ts +17 -0
- package/dist/components/erd/canvas/sceneHit.d.ts +18 -0
- package/dist/components/erd/canvas/sceneKind.d.ts +11 -0
- package/dist/components/erd/canvas/sceneRetention.d.ts +31 -0
- package/dist/components/erd/canvas/sceneTokens.d.ts +67 -0
- package/dist/components/erd/canvas/shared-drag-select/SharedDragSelect.d.ts +8 -0
- package/dist/components/erd/canvas/shared-mouse-tracker/SharedMouseTracker.d.ts +1 -0
- package/dist/components/erd/canvas/shared-mouse-tracker/shared-mouse-cursor/SharedMouseCursor.d.ts +5 -0
- package/dist/components/erd/canvas/table/Table.d.ts +8 -0
- package/dist/components/erd/canvas/table/cellLayout.d.ts +63 -0
- package/dist/components/erd/canvas/table/column/Column.d.ts +23 -6
- package/dist/components/erd/canvas/table/doubleClick.d.ts +14 -0
- package/dist/components/erd/canvas/table/useMoveTable.d.ts +1 -1
- package/dist/components/erd/canvas/table/useSharedFocusTable.d.ts +6 -0
- package/dist/components/erd/canvas/useMoveEntity.d.ts +18 -0
- package/dist/components/erd/canvas/useSharedSelectEntity.d.ts +4 -0
- package/dist/components/erd/erd-context-menu/ErdContextMenu.d.ts +1 -2
- package/dist/components/erd/erd-context-menu/menus/drawRelationshipMenus.d.ts +3 -2
- package/dist/components/erd/erd-context-menu/menus/exportMenus.d.ts +7 -6
- package/dist/components/erd/erd-context-menu/menus/importMenus.d.ts +6 -6
- package/dist/components/erd/erd-context-menu/menus/relationshipMenus.d.ts +1 -1
- package/dist/components/erd/hide-sign/hideSignBounds.d.ts +9 -0
- package/dist/components/erd/hitTest.d.ts +22 -0
- package/dist/components/erd/minimap/Minimap.styles.d.ts +0 -1
- package/dist/components/erd/minimap/MinimapScene.d.ts +16 -0
- package/dist/components/erd/minimap/memo/Memo.d.ts +5 -0
- package/dist/components/erd/minimap/minimapGeometry.d.ts +52 -0
- package/dist/components/erd/minimap/table/Table.d.ts +5 -0
- package/dist/components/erd/table-properties/table-properties-indexes/indexes-checkbox-column/IndexesCheckboxColumn.d.ts +1 -1
- package/dist/components/erd/virtual-scroll/useVirtualScroll.d.ts +19 -0
- package/dist/components/erd-editor/ErdEditor.d.ts +4 -0
- package/dist/components/erd-editor/ErdEditor.stories.d.ts +1 -1
- package/dist/components/global-styles/GlobalStyles.d.ts +5 -0
- package/dist/components/primitives/button/Button.stories.d.ts +4 -4
- package/dist/components/primitives/code-block/CodeBlock.stories.d.ts +4 -4
- package/dist/components/primitives/code-block/CodeBlock.styles.d.ts +6 -1
- package/dist/components/primitives/color-picker/ColorPicker.d.ts +1 -1
- package/dist/components/primitives/color-picker/ColorPicker.stories.d.ts +1 -1
- package/dist/components/primitives/context-menu/ContextMenu.stories.d.ts +1 -1
- package/dist/components/primitives/context-menu/context-menu-item/ContextMenuItem.d.ts +1 -1
- package/dist/components/primitives/context-menu/menu/Menu.d.ts +2 -2
- package/dist/components/primitives/edit-input/EditInput.d.ts +2 -2
- package/dist/components/primitives/edit-input/EditInput.stories.d.ts +6 -6
- package/dist/components/primitives/highlighted-text/HighlightedText.stories.d.ts +1 -1
- package/dist/components/primitives/icon/Icon.d.ts +2 -3
- package/dist/components/primitives/icon/Icon.stories.d.ts +3 -1
- package/dist/components/primitives/icon/icons.d.ts +95 -26
- package/dist/components/primitives/kbd/Kbd.stories.d.ts +3 -3
- package/dist/components/primitives/sash/Sash.stories.d.ts +6 -6
- package/dist/components/primitives/separator/Separator.stories.d.ts +3 -3
- package/dist/components/primitives/slider/Slider.stories.d.ts +4 -4
- package/dist/components/primitives/switch/Switch.stories.d.ts +3 -3
- package/dist/components/primitives/text-input/TextInput.d.ts +1 -1
- package/dist/components/primitives/text-input/TextInput.stories.d.ts +7 -7
- package/dist/components/primitives/toast/Toast.d.ts +4 -0
- package/dist/components/primitives/toast/Toast.stories.d.ts +17 -4
- package/dist/components/primitives/toast/Toast.styles.d.ts +5 -0
- package/dist/components/{erd/canvas/table → table-view}/column/column-data-type/ColumnDataType.d.ts +4 -4
- package/dist/components/{erd/canvas/table → table-view}/column/column-not-null/ColumnNotNull.d.ts +1 -1
- package/dist/components/{erd/canvas/table → table-view}/column/column-option/ColumnOption.d.ts +1 -1
- package/dist/components/table-view/column/useColumnCell.d.ts +23 -0
- package/dist/components/themeContext.d.ts +9 -0
- package/dist/components/toast-container/openToastWhileRunning.d.ts +11 -0
- package/dist/components/visualization/Visualization.d.ts +6 -0
- package/dist/components/visualization/Visualization.styles.d.ts +6 -0
- package/dist/components/visualization/VisualizationScene.d.ts +21 -0
- package/dist/components/visualization/createVisualization.d.ts +67 -8
- package/dist/components/visualization/graph-node/GraphNode.d.ts +23 -0
- package/dist/components/visualization/table/Table.d.ts +0 -1
- package/dist/components/visualization/table/column/Column.d.ts +0 -1
- package/dist/components/visualization/visualizationView.d.ts +90 -0
- package/dist/constants/language.d.ts +7 -1
- package/dist/constants/layout.d.ts +13 -0
- package/dist/constants/schema.d.ts +12 -3
- package/dist/constants/sql/dataType/Databricks.d.ts +5 -0
- package/dist/constants/sql/dataType/MSSQL.d.ts +1 -1
- package/dist/constants/sql/dataType/MySQL.d.ts +1 -1
- package/dist/constants/sql/dataType/Oracle.d.ts +1 -1
- package/dist/constants/sql/dataType/Snowflake.d.ts +5 -0
- package/dist/constants/sql/database.d.ts +2 -0
- package/dist/engine/history.d.ts +5 -3
- package/dist/engine/hooks.d.ts +3 -3
- package/dist/engine/modules/editor/actions.d.ts +30 -1
- package/dist/engine/modules/editor/atom.actions.d.ts +131 -0
- package/dist/engine/modules/editor/generator.actions.d.ts +18 -0
- package/dist/engine/modules/editor/state.d.ts +43 -0
- package/dist/engine/modules/editor/utils/duplicate.d.ts +13 -0
- package/dist/engine/modules/memo/actions.d.ts +3 -0
- package/dist/engine/modules/memo/atom.actions.d.ts +12 -0
- package/dist/engine/modules/settings/atom.actions.d.ts +24 -0
- package/dist/engine/modules/table/actions.d.ts +1 -0
- package/dist/engine/modules/table/atom.actions.d.ts +4 -0
- package/dist/engine.js +40 -51
- package/dist/erd-editor.js +40775 -26895
- package/dist/konva/batchDraw.d.ts +41 -0
- package/dist/konva/host.d.ts +29 -0
- package/dist/konva/scene/columnDropTarget.d.ts +13 -0
- package/dist/konva/scene/konvaFlip.d.ts +18 -0
- package/dist/konva/scene/metrics.d.ts +29 -0
- package/dist/konva/scene/renderScene.d.ts +34 -0
- package/dist/konva/scene/viewport.d.ts +38 -0
- package/dist/konva/testHandle.d.ts +22 -0
- package/dist/konva/theme.d.ts +31 -0
- package/dist/konva/workerDomStubs.d.ts +1 -0
- package/dist/schemaGCService-DrlqIen8.js +17549 -0
- package/dist/services/export-png/ExportScene.d.ts +9 -0
- package/dist/services/export-png/documentScene.d.ts +20 -0
- package/dist/services/export-png/exportPng.shared-worker.d.ts +0 -0
- package/dist/services/export-png/exportPngService.d.ts +24 -0
- package/dist/services/export-png/index.d.ts +48 -0
- package/dist/services/export-png/pixelRatio.d.ts +21 -0
- package/dist/services/export-png/renderPng.d.ts +37 -0
- package/dist/services/export-png/textWidth.d.ts +27 -0
- package/dist/services/schema-gc/index.d.ts +5 -0
- package/dist/services/shikiService.d.ts +1 -1
- package/dist/styles/colorPicker.style.d.ts +6 -1
- package/dist/styles/fonts.styles.d.ts +2 -1
- package/dist/styles/reset.styles.d.ts +5 -1
- package/dist/styles/scrollbar.styles.d.ts +6 -1
- package/dist/styles/typography.styles.d.ts +2 -1
- package/dist/themes/radix-ui-theme.d.ts +1 -1
- package/dist/themes/tokens.d.ts +6 -2
- package/dist/utils/calcTable.d.ts +7 -0
- package/dist/utils/draw-relationship/chamfer.d.ts +2 -0
- package/dist/utils/draw-relationship/incremental.d.ts +70 -0
- package/dist/utils/draw-relationship/index.d.ts +78 -14
- package/dist/utils/draw-relationship/nudge.d.ts +4 -0
- package/dist/utils/draw-relationship/pathFinding.d.ts +7 -1
- package/dist/utils/draw-relationship/route.d.ts +27 -0
- package/dist/utils/draw-relationship/stub.d.ts +36 -0
- package/dist/utils/emitter.d.ts +32 -0
- package/dist/utils/file/exportFile.d.ts +10 -1
- package/dist/utils/file/importFile.d.ts +4 -1
- package/dist/utils/focus.d.ts +5 -3
- package/dist/utils/generator-code/aml.d.ts +4 -0
- package/dist/utils/generator-code/dbml.d.ts +4 -0
- package/dist/utils/generator-code/drizzle.d.ts +4 -0
- package/dist/utils/generator-code/go.d.ts +4 -0
- package/dist/utils/generator-code/sequelize.d.ts +4 -0
- package/dist/utils/generator-code/sqlalchemy.d.ts +4 -0
- package/dist/utils/generator-code/typeorm.d.ts +4 -0
- package/dist/utils/globalEventObservable.d.ts +13 -12
- package/dist/utils/icon.d.ts +9 -1
- package/dist/utils/keyboard-shortcut/index.d.ts +7 -1
- package/dist/utils/promise.d.ts +1 -0
- package/dist/utils/schema-aml-parser/convert.d.ts +4 -0
- package/dist/utils/schema-aml-parser/dataType.d.ts +12 -0
- package/dist/utils/schema-aml-parser/index.d.ts +3 -0
- package/dist/utils/schema-aml-parser/parser.d.ts +2 -0
- package/dist/utils/schema-aml-parser/tokenizer.d.ts +23 -0
- package/dist/utils/schema-aml-parser/types.d.ts +78 -0
- package/dist/utils/schema-dbml-parser/convert.d.ts +4 -0
- package/dist/utils/schema-dbml-parser/dataType.d.ts +7 -0
- package/dist/utils/schema-dbml-parser/index.d.ts +3 -0
- package/dist/utils/schema-dbml-parser/parser.d.ts +2 -0
- package/dist/utils/schema-dbml-parser/tokenizer.d.ts +16 -0
- package/dist/utils/schema-dbml-parser/types.d.ts +62 -0
- package/dist/utils/schema-graphql-parser/convert.d.ts +4 -0
- package/dist/utils/schema-graphql-parser/dataType.d.ts +7 -0
- package/dist/utils/schema-graphql-parser/index.d.ts +3 -0
- package/dist/utils/schema-graphql-parser/parser.d.ts +2 -0
- package/dist/utils/schema-graphql-parser/types.d.ts +58 -0
- package/dist/utils/schema-sql/Databricks.d.ts +5 -0
- package/dist/utils/schema-sql/Snowflake.d.ts +5 -0
- package/dist/utils/sharedColor.d.ts +2 -0
- package/dist/utils/table-clipboard/copy.d.ts +7 -0
- package/dist/utils/table-clipboard/index.d.ts +2 -0
- package/dist/utils/table-clipboard/paste.d.ts +3 -0
- package/dist/utils/table-clipboard/payload.d.ts +83 -0
- package/dist/utils/table-clipboard/placement.d.ts +30 -0
- package/dist/utils/validation.d.ts +1 -0
- package/package.json +34 -29
- package/dist/components/erd/canvas/canvas-svg/CanvasSvg.d.ts +0 -7
- package/dist/components/erd/canvas/canvas-svg/relationship/Relationship.template.d.ts +0 -3
- package/dist/components/erd/canvas/draw-relationship/DrawRelationship.styles.d.ts +0 -1
- package/dist/components/erd/canvas/high-level-table/HighLevelTable.styles.d.ts +0 -1
- package/dist/components/erd/canvas/memo/Memo.styles.d.ts +0 -6
- package/dist/components/erd/canvas/shared-mouse-tracker/shared-mouse-cursor/SharedMouseCursor.styles.d.ts +0 -1
- package/dist/components/erd/canvas/table/column/Column.styles.d.ts +0 -2
- package/dist/components/erd/drag-select/DragSelect.d.ts +0 -9
- package/dist/components/erd/drag-select/DragSelect.styles.d.ts +0 -1
- package/dist/schemaGCService-Br6jn6B2.js +0 -15866
- /package/dist/components/erd/canvas/{canvas-svg → relationship-group}/relationship/Relationship.d.ts +0 -0
- /package/dist/components/{erd/canvas/table → table-view}/Table.styles.d.ts +0 -0
- /package/dist/components/{erd/canvas/canvas-svg/CanvasSvg.styles.d.ts → table-view/column/Column.styles.d.ts} +0 -0
- /package/dist/components/{erd/canvas/table → table-view}/column/column-data-type/ColumnDataType.styles.d.ts +0 -0
- /package/dist/components/{erd/canvas/table → table-view}/column/column-key/ColumnKey.d.ts +0 -0
- /package/dist/components/{erd/canvas/table → table-view}/column/column-key/ColumnKey.styles.d.ts +0 -0
- /package/dist/components/{erd/canvas/table → table-view}/column/column-not-null/ColumnNotNull.styles.d.ts +0 -0
- /package/dist/components/{erd/canvas/table → table-view}/column/column-option/ColumnOption.styles.d.ts +0 -0
- /package/dist/{services/schema-gc/schemaGC.worker.d.ts → konva/jsx-types.test-d.d.ts} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DOMTemplateLiterals, FC } from '@dineug/r-html';
|
|
2
2
|
export type MenuProps = {
|
|
3
|
-
icon
|
|
3
|
+
icon?: DOMTemplateLiterals | string | null;
|
|
4
4
|
name: DOMTemplateLiterals | string;
|
|
5
|
-
right?: DOMTemplateLiterals | string;
|
|
5
|
+
right?: DOMTemplateLiterals | string | null;
|
|
6
6
|
};
|
|
7
7
|
declare const Menu: FC<MenuProps>;
|
|
8
8
|
export default Menu;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/html';
|
|
1
|
+
import { StoryObj } from '@storybook/html-vite';
|
|
2
2
|
import { EditInputProps } from './EditInput';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
5
|
render: (args: EditInputProps) => DocumentFragment;
|
|
6
6
|
argTypes: {
|
|
7
7
|
placeholder: {
|
|
8
|
-
control:
|
|
8
|
+
control: "text";
|
|
9
9
|
};
|
|
10
10
|
edit: {
|
|
11
|
-
control:
|
|
11
|
+
control: "boolean";
|
|
12
12
|
};
|
|
13
13
|
focus: {
|
|
14
|
-
control:
|
|
14
|
+
control: "boolean";
|
|
15
15
|
};
|
|
16
16
|
width: {
|
|
17
|
-
control:
|
|
17
|
+
control: "number";
|
|
18
18
|
};
|
|
19
19
|
value: {
|
|
20
|
-
control:
|
|
20
|
+
control: "text";
|
|
21
21
|
};
|
|
22
22
|
onInput: {
|
|
23
23
|
action: string;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { FC } from '@dineug/r-html';
|
|
2
|
+
import { IconName } from './icons';
|
|
2
3
|
export type IconProps = {
|
|
3
4
|
class?: any;
|
|
4
|
-
|
|
5
|
-
name: string;
|
|
5
|
+
name: IconName;
|
|
6
6
|
size?: number;
|
|
7
|
-
color?: string;
|
|
8
7
|
useTransition?: boolean;
|
|
9
8
|
title?: string;
|
|
10
9
|
rotate?: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/html';
|
|
1
|
+
import { StoryObj } from '@storybook/html-vite';
|
|
2
2
|
import { IconProps } from './Icon';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
@@ -6,3 +6,5 @@ declare const meta: {
|
|
|
6
6
|
export default meta;
|
|
7
7
|
type Story = StoryObj<IconProps>;
|
|
8
8
|
export declare const Icons: Story;
|
|
9
|
+
export declare const RelationshipNotation: Story;
|
|
10
|
+
export declare const Sizes: Story;
|
|
@@ -1,29 +1,98 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { IconNode } from 'lucide';
|
|
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;
|
|
5
|
+
export type IconNodeChild = IconNode[number];
|
|
6
|
+
declare const LUCIDE_ICON: {
|
|
7
|
+
atom: IconNode;
|
|
8
|
+
braces: IconNode;
|
|
9
|
+
brackets: IconNode;
|
|
10
|
+
'case-sensitive': IconNode;
|
|
11
|
+
check: IconNode;
|
|
12
|
+
'chevron-right': IconNode;
|
|
13
|
+
code: IconNode;
|
|
14
|
+
contrast: IconNode;
|
|
15
|
+
copy: IconNode;
|
|
16
|
+
database: IconNode;
|
|
17
|
+
diff: IconNode;
|
|
18
|
+
eye: IconNode;
|
|
19
|
+
'file-diff': IconNode;
|
|
20
|
+
'file-image': IconNode;
|
|
21
|
+
'file-input': IconNode;
|
|
22
|
+
'file-output': IconNode;
|
|
23
|
+
'grip-vertical': IconNode;
|
|
24
|
+
'key-round': IconNode;
|
|
25
|
+
'map-pin': IconNode;
|
|
26
|
+
minus: IconNode;
|
|
27
|
+
'moon-star': IconNode;
|
|
28
|
+
'mouse-pointer-2': IconNode;
|
|
29
|
+
palette: IconNode;
|
|
30
|
+
plus: IconNode;
|
|
31
|
+
'redo-2': IconNode;
|
|
32
|
+
'refresh-cw': IconNode;
|
|
33
|
+
'rotate-ccw-clock': IconNode;
|
|
34
|
+
search: IconNode;
|
|
35
|
+
settings: IconNode;
|
|
36
|
+
'share-2': IconNode;
|
|
37
|
+
spline: IconNode;
|
|
38
|
+
'sticky-note': IconNode;
|
|
39
|
+
sun: IconNode;
|
|
40
|
+
table: IconNode;
|
|
41
|
+
'table-properties': IconNode;
|
|
42
|
+
'undo-2': IconNode;
|
|
43
|
+
workflow: IconNode;
|
|
44
|
+
x: IconNode;
|
|
45
|
+
};
|
|
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
|
+
}][];
|
|
9
80
|
/** @deprecated */
|
|
10
|
-
|
|
81
|
+
One: [string, {
|
|
82
|
+
d: string;
|
|
83
|
+
}][];
|
|
11
84
|
/** @deprecated */
|
|
12
|
-
|
|
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;
|
|
92
|
+
export type IconDefinition = {
|
|
93
|
+
name: IconName;
|
|
94
|
+
node: IconNode;
|
|
13
95
|
};
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
iconName: string;
|
|
18
|
-
icon: [
|
|
19
|
-
number,
|
|
20
|
-
number,
|
|
21
|
-
// height
|
|
22
|
-
string[] | undefined,
|
|
23
|
-
// ligatures
|
|
24
|
-
string | undefined,
|
|
25
|
-
string
|
|
26
|
-
];
|
|
27
|
-
}
|
|
28
|
-
export declare const iconMap: Record<string, IconDefinition>;
|
|
29
|
-
export declare function getIcon(prefix: string, iconName: string): IconDefinition | undefined;
|
|
96
|
+
export declare const iconMap: Record<IconName, IconDefinition>;
|
|
97
|
+
export declare function getIcon(name: string): IconDefinition | undefined;
|
|
98
|
+
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/html';
|
|
1
|
+
import { StoryObj } from '@storybook/html-vite';
|
|
2
2
|
import { KbdProps } from './Kbd';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
5
|
render: (args: KbdProps) => DocumentFragment;
|
|
6
6
|
argTypes: {
|
|
7
7
|
shortcut: {
|
|
8
|
-
control:
|
|
8
|
+
control: "text";
|
|
9
9
|
};
|
|
10
10
|
mini: {
|
|
11
|
-
control:
|
|
11
|
+
control: "boolean";
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/html';
|
|
1
|
+
import { StoryObj } from '@storybook/html-vite';
|
|
2
2
|
import { SashProps } from './Sash';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
@@ -6,17 +6,17 @@ declare const meta: {
|
|
|
6
6
|
argTypes: {
|
|
7
7
|
type: {
|
|
8
8
|
options: ("vertical" | "horizontal" | "edge")[];
|
|
9
|
-
control:
|
|
9
|
+
control: "radio";
|
|
10
10
|
};
|
|
11
11
|
cursor: {
|
|
12
|
-
options: ("default" | "ew-resize" | "ns-resize" | "
|
|
13
|
-
control:
|
|
12
|
+
options: ("default" | "ew-resize" | "ns-resize" | "nwse-resize" | "nesw-resize")[];
|
|
13
|
+
control: "select";
|
|
14
14
|
};
|
|
15
15
|
top: {
|
|
16
|
-
control:
|
|
16
|
+
control: "number";
|
|
17
17
|
};
|
|
18
18
|
left: {
|
|
19
|
-
control:
|
|
19
|
+
control: "number";
|
|
20
20
|
};
|
|
21
21
|
onMove: {
|
|
22
22
|
action: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/html';
|
|
1
|
+
import { StoryObj } from '@storybook/html-vite';
|
|
2
2
|
import { SeparatorProps } from './Separator';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
@@ -6,14 +6,14 @@ declare const meta: {
|
|
|
6
6
|
argTypes: {
|
|
7
7
|
space: {
|
|
8
8
|
control: {
|
|
9
|
-
type:
|
|
9
|
+
type: "range";
|
|
10
10
|
min: number;
|
|
11
11
|
max: number;
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
padding: {
|
|
15
15
|
control: {
|
|
16
|
-
type:
|
|
16
|
+
type: "range";
|
|
17
17
|
min: number;
|
|
18
18
|
max: number;
|
|
19
19
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/html';
|
|
1
|
+
import { StoryObj } from '@storybook/html-vite';
|
|
2
2
|
import { SliderProps } from './Slider';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
5
|
render: (args: SliderProps) => DocumentFragment;
|
|
6
6
|
argTypes: {
|
|
7
7
|
min: {
|
|
8
|
-
control:
|
|
8
|
+
control: "number";
|
|
9
9
|
};
|
|
10
10
|
max: {
|
|
11
|
-
control:
|
|
11
|
+
control: "number";
|
|
12
12
|
};
|
|
13
13
|
value: {
|
|
14
|
-
control:
|
|
14
|
+
control: "number";
|
|
15
15
|
};
|
|
16
16
|
onChange: {
|
|
17
17
|
action: string;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/html';
|
|
1
|
+
import { StoryObj } from '@storybook/html-vite';
|
|
2
2
|
import { SwitchProps } from './Switch';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
5
|
render: (args: SwitchProps) => DocumentFragment;
|
|
6
6
|
argTypes: {
|
|
7
7
|
size: {
|
|
8
|
-
control:
|
|
8
|
+
control: "radio";
|
|
9
9
|
options: string[];
|
|
10
10
|
};
|
|
11
11
|
value: {
|
|
12
|
-
control:
|
|
12
|
+
control: "boolean";
|
|
13
13
|
};
|
|
14
14
|
onChange: {
|
|
15
15
|
action: string;
|
|
@@ -10,7 +10,7 @@ export type TextInputProps = {
|
|
|
10
10
|
numberOnly?: boolean;
|
|
11
11
|
autofocus?: boolean;
|
|
12
12
|
onInput?: (event: InputEvent) => void;
|
|
13
|
-
onChange?: (event:
|
|
13
|
+
onChange?: (event: Event) => void;
|
|
14
14
|
onBlur?: (event: FocusEvent) => void;
|
|
15
15
|
onKeyup?: (event: KeyboardEvent) => void;
|
|
16
16
|
onKeydown?: (event: KeyboardEvent) => void;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/html';
|
|
1
|
+
import { StoryObj } from '@storybook/html-vite';
|
|
2
2
|
import { TextInputProps } from './TextInput';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
5
|
render: (args: TextInputProps) => DocumentFragment;
|
|
6
6
|
argTypes: {
|
|
7
7
|
title: {
|
|
8
|
-
control:
|
|
8
|
+
control: "text";
|
|
9
9
|
};
|
|
10
10
|
placeholder: {
|
|
11
|
-
control:
|
|
11
|
+
control: "text";
|
|
12
12
|
};
|
|
13
13
|
readonly: {
|
|
14
|
-
control:
|
|
14
|
+
control: "boolean";
|
|
15
15
|
};
|
|
16
16
|
width: {
|
|
17
|
-
control:
|
|
17
|
+
control: "number";
|
|
18
18
|
};
|
|
19
19
|
value: {
|
|
20
|
-
control:
|
|
20
|
+
control: "text";
|
|
21
21
|
};
|
|
22
22
|
numberOnly: {
|
|
23
|
-
control:
|
|
23
|
+
control: "boolean";
|
|
24
24
|
};
|
|
25
25
|
onInput: {
|
|
26
26
|
action: string;
|
|
@@ -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;
|
|
@@ -1,20 +1,33 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/html';
|
|
1
|
+
import { StoryObj } from '@storybook/html-vite';
|
|
2
2
|
import { ToastProps } from './Toast';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
5
|
render: (args: ToastProps) => DocumentFragment;
|
|
6
6
|
argTypes: {
|
|
7
7
|
title: {
|
|
8
|
-
control:
|
|
8
|
+
control: "text";
|
|
9
9
|
};
|
|
10
10
|
description: {
|
|
11
|
-
control:
|
|
11
|
+
control: "text";
|
|
12
12
|
};
|
|
13
13
|
action: {
|
|
14
|
-
control:
|
|
14
|
+
control: "text";
|
|
15
|
+
};
|
|
16
|
+
busy: {
|
|
17
|
+
control: "boolean";
|
|
18
|
+
};
|
|
19
|
+
progress: {
|
|
20
|
+
control: {
|
|
21
|
+
type: "range";
|
|
22
|
+
min: number;
|
|
23
|
+
max: number;
|
|
24
|
+
step: number;
|
|
25
|
+
};
|
|
15
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;
|
package/dist/components/{erd/canvas/table → table-view}/column/column-data-type/ColumnDataType.d.ts
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { FC, Ref } from '@dineug/r-html';
|
|
2
|
-
import { AppContext } from '
|
|
2
|
+
import { AppContext } from '../../../appContext';
|
|
3
3
|
export type ColumnDataTypeProps = {
|
|
4
|
-
app
|
|
4
|
+
app?: Ref<AppContext>;
|
|
5
5
|
tableId: string;
|
|
6
6
|
columnId: string;
|
|
7
|
-
edit
|
|
8
|
-
focus
|
|
7
|
+
edit?: boolean;
|
|
8
|
+
focus?: boolean;
|
|
9
9
|
width: number;
|
|
10
10
|
value: string;
|
|
11
11
|
onInput?: (event: InputEvent) => void;
|
|
@@ -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;
|