@dineug/erd-editor 3.0.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/LICENSE +21 -0
- package/README.md +337 -0
- package/dist/components/appContext.d.ts +22 -0
- package/dist/components/customElementRegistry.d.ts +1 -0
- package/dist/components/erd/Erd.d.ts +6 -0
- package/dist/components/erd/Erd.styles.d.ts +1 -0
- package/dist/components/erd/automatic-table-placement/AutomaticTablePlacement.d.ts +14 -0
- package/dist/components/erd/automatic-table-placement/AutomaticTablePlacement.styles.d.ts +2 -0
- package/dist/components/erd/automatic-table-placement/createAutomaticTablePlacement.d.ts +11 -0
- package/dist/components/erd/canvas/Canvas.d.ts +7 -0
- package/dist/components/erd/canvas/Canvas.styles.d.ts +1 -0
- package/dist/components/erd/canvas/canvas-svg/CanvasSvg.d.ts +7 -0
- package/dist/components/erd/canvas/canvas-svg/CanvasSvg.styles.d.ts +1 -0
- package/dist/components/erd/canvas/canvas-svg/relationship/Relationship.d.ts +8 -0
- package/dist/components/erd/canvas/canvas-svg/relationship/Relationship.template.d.ts +3 -0
- package/dist/components/erd/canvas/draw-relationship/DrawRelationship.d.ts +8 -0
- package/dist/components/erd/canvas/draw-relationship/DrawRelationship.styles.d.ts +1 -0
- package/dist/components/erd/canvas/high-level-table/HighLevelTable.d.ts +7 -0
- package/dist/components/erd/canvas/high-level-table/HighLevelTable.styles.d.ts +1 -0
- package/dist/components/erd/canvas/memo/Memo.d.ts +7 -0
- package/dist/components/erd/canvas/memo/Memo.styles.d.ts +6 -0
- package/dist/components/erd/canvas/memo/memo-sash/MemoSash.d.ts +9 -0
- package/dist/components/erd/canvas/table/Table.d.ts +7 -0
- package/dist/components/erd/canvas/table/Table.styles.d.ts +5 -0
- package/dist/components/erd/canvas/table/column/Column.d.ts +29 -0
- package/dist/components/erd/canvas/table/column/Column.styles.d.ts +2 -0
- package/dist/components/erd/canvas/table/column/column-data-type/ColumnDataType.d.ts +16 -0
- package/dist/components/erd/canvas/table/column/column-data-type/ColumnDataType.styles.d.ts +3 -0
- package/dist/components/erd/canvas/table/column/column-key/ColumnKey.d.ts +6 -0
- package/dist/components/erd/canvas/table/column/column-key/ColumnKey.styles.d.ts +1 -0
- package/dist/components/erd/canvas/table/column/column-not-null/ColumnNotNull.d.ts +7 -0
- package/dist/components/erd/canvas/table/column/column-not-null/ColumnNotNull.styles.d.ts +1 -0
- package/dist/components/erd/canvas/table/column/column-option/ColumnOption.d.ts +11 -0
- package/dist/components/erd/canvas/table/column/column-option/ColumnOption.styles.d.ts +1 -0
- package/dist/components/erd/canvas/table/useFocusTable.d.ts +7 -0
- package/dist/components/erd/canvas/table/useMoveTable.d.ts +6 -0
- package/dist/components/erd/drag-select/DragSelect.d.ts +9 -0
- package/dist/components/erd/drag-select/DragSelect.styles.d.ts +1 -0
- package/dist/components/erd/erd-context-menu/ErdContextMenu.d.ts +17 -0
- package/dist/components/erd/erd-context-menu/menus/databaseMenus.d.ts +12 -0
- package/dist/components/erd/erd-context-menu/menus/drawRelationshipMenus.d.ts +16 -0
- package/dist/components/erd/erd-context-menu/menus/exportMenus.d.ts +9 -0
- package/dist/components/erd/erd-context-menu/menus/importMenus.d.ts +9 -0
- package/dist/components/erd/erd-context-menu/menus/relationshipMenus.d.ts +7 -0
- package/dist/components/erd/erd-context-menu/menus/showMenus.d.ts +6 -0
- package/dist/components/erd/erdShortcutPerformCheck.d.ts +3 -0
- package/dist/components/erd/hide-sign/HideSign.d.ts +6 -0
- package/dist/components/erd/hide-sign/HideSign.styles.d.ts +1 -0
- package/dist/components/erd/minimap/Minimap.d.ts +4 -0
- package/dist/components/erd/minimap/Minimap.styles.d.ts +3 -0
- package/dist/components/erd/minimap/memo/Memo.d.ts +7 -0
- package/dist/components/erd/minimap/table/Table.d.ts +7 -0
- package/dist/components/erd/minimap/useMinimapScroll.d.ts +7 -0
- package/dist/components/erd/minimap/viewport/Viewport.d.ts +6 -0
- package/dist/components/erd/minimap/viewport/Viewport.styles.d.ts +1 -0
- package/dist/components/erd/table-properties/TableProperties.d.ts +9 -0
- package/dist/components/erd/table-properties/TableProperties.styles.d.ts +6 -0
- package/dist/components/erd/table-properties/table-properties-indexes/TablePropertiesIndexes.d.ts +6 -0
- package/dist/components/erd/table-properties/table-properties-indexes/TablePropertiesIndexes.styles.d.ts +3 -0
- package/dist/components/erd/table-properties/table-properties-indexes/indexes-checkbox-column/IndexesCheckboxColumn.d.ts +8 -0
- package/dist/components/erd/table-properties/table-properties-indexes/indexes-checkbox-column/IndexesCheckboxColumn.styles.d.ts +1 -0
- package/dist/components/erd/table-properties/table-properties-indexes/indexes-column/IndexesColumn.d.ts +7 -0
- package/dist/components/erd/table-properties/table-properties-indexes/indexes-column/IndexesColumn.styles.d.ts +3 -0
- package/dist/components/erd/table-properties/table-properties-indexes/indexes-index/IndexesIndex.d.ts +9 -0
- package/dist/components/erd/table-properties/table-properties-indexes/indexes-index/IndexesIndex.styles.d.ts +4 -0
- package/dist/components/erd/table-properties/table-properties-tabs/TablePropertiesTabs.d.ts +14 -0
- package/dist/components/erd/table-properties/table-properties-tabs/TablePropertiesTabs.styles.d.ts +2 -0
- package/dist/components/erd/useErdShortcut.d.ts +2 -0
- package/dist/components/erd-editor/ErdEditor.d.ts +26 -0
- package/dist/components/erd-editor/ErdEditor.stories.d.ts +18 -0
- package/dist/components/erd-editor/ErdEditor.styles.d.ts +2 -0
- package/dist/components/erd-editor/useErdEditorAttachElement.d.ts +21 -0
- package/dist/components/generator-code/GeneratorCode.d.ts +7 -0
- package/dist/components/generator-code/GeneratorCode.styles.d.ts +1 -0
- package/dist/components/generator-code/generator-code-context-menu/GeneratorCodeContextMenu.d.ts +6 -0
- package/dist/components/generator-code/generator-code-context-menu/menus/columnNameCaseMenus.d.ts +12 -0
- package/dist/components/generator-code/generator-code-context-menu/menus/languageMenus.d.ts +12 -0
- package/dist/components/generator-code/generator-code-context-menu/menus/tableNameCaseMenus.d.ts +12 -0
- package/dist/components/global-styles/GlobalStyles.d.ts +4 -0
- package/dist/components/primitives/button/Button.d.ts +9 -0
- package/dist/components/primitives/button/Button.stories.d.ts +26 -0
- package/dist/components/primitives/button/Button.styles.d.ts +6 -0
- package/dist/components/primitives/code-block/CodeBlock.d.ts +10 -0
- package/dist/components/primitives/code-block/CodeBlock.stories.d.ts +25 -0
- package/dist/components/primitives/code-block/CodeBlock.styles.d.ts +3 -0
- package/dist/components/primitives/color-picker/ColorPicker.d.ts +12 -0
- package/dist/components/primitives/color-picker/ColorPicker.stories.d.ts +26 -0
- package/dist/components/primitives/color-picker/ColorPicker.styles.d.ts +1 -0
- package/dist/components/primitives/context-menu/ContextMenu.d.ts +10 -0
- package/dist/components/primitives/context-menu/ContextMenu.stories.d.ts +16 -0
- package/dist/components/primitives/context-menu/context-menu-content/ContextMenuContent.d.ts +9 -0
- package/dist/components/primitives/context-menu/context-menu-content/ContextMenuContent.styles.d.ts +1 -0
- package/dist/components/primitives/context-menu/context-menu-item/ContextMenuItem.d.ts +8 -0
- package/dist/components/primitives/context-menu/context-menu-item/ContextMenuItem.styles.d.ts +1 -0
- package/dist/components/primitives/context-menu/context-menu-root/ContextMenuRoot.d.ts +6 -0
- package/dist/components/primitives/context-menu/context-menu-root/contextMenuRootContext.d.ts +22 -0
- package/dist/components/primitives/context-menu/menu/Menu.d.ts +8 -0
- package/dist/components/primitives/context-menu/menu/Menu.styles.d.ts +3 -0
- package/dist/components/primitives/edit-input/EditInput.d.ts +16 -0
- package/dist/components/primitives/edit-input/EditInput.stories.d.ts +36 -0
- package/dist/components/primitives/edit-input/EditInput.styles.d.ts +4 -0
- package/dist/components/primitives/highlighted-text/HighlightedText.d.ts +8 -0
- package/dist/components/primitives/highlighted-text/HighlightedText.stories.d.ts +23 -0
- package/dist/components/primitives/highlighted-text/HighlightedText.styles.d.ts +1 -0
- package/dist/components/primitives/icon/Icon.d.ts +14 -0
- package/dist/components/primitives/icon/Icon.stories.d.ts +8 -0
- package/dist/components/primitives/icon/Icon.styles.d.ts +2 -0
- package/dist/components/primitives/icon/icons.d.ts +29 -0
- package/dist/components/primitives/kbd/Kbd.d.ts +7 -0
- package/dist/components/primitives/kbd/Kbd.stories.d.ts +17 -0
- package/dist/components/primitives/kbd/Kbd.styles.d.ts +3 -0
- package/dist/components/primitives/sash/Sash.d.ts +27 -0
- package/dist/components/primitives/sash/Sash.stories.d.ts +30 -0
- package/dist/components/primitives/sash/Sash.styles.d.ts +2 -0
- package/dist/components/primitives/separator/Separator.d.ts +7 -0
- package/dist/components/primitives/separator/Separator.stories.d.ts +25 -0
- package/dist/components/primitives/separator/Separator.styles.d.ts +2 -0
- package/dist/components/primitives/switch/Switch.d.ts +8 -0
- package/dist/components/primitives/switch/Switch.stories.d.ts +21 -0
- package/dist/components/primitives/switch/Switch.styles.d.ts +5 -0
- package/dist/components/primitives/text-input/TextInput.d.ts +19 -0
- package/dist/components/primitives/text-input/TextInput.stories.d.ts +41 -0
- package/dist/components/primitives/toast/Toast.d.ts +8 -0
- package/dist/components/primitives/toast/Toast.stories.d.ts +20 -0
- package/dist/components/primitives/toast/Toast.styles.d.ts +5 -0
- package/dist/components/quick-search/QuickSearch.d.ts +4 -0
- package/dist/components/quick-search/QuickSearch.styles.d.ts +10 -0
- package/dist/components/quick-search/actions.d.ts +14 -0
- package/dist/components/schema-sql/SchemaSQL.d.ts +7 -0
- package/dist/components/schema-sql/SchemaSQL.styles.d.ts +1 -0
- package/dist/components/schema-sql/schema-sql-context-menu/SchemaSQLContextMenu.d.ts +6 -0
- package/dist/components/schema-sql/schema-sql-context-menu/menus/bracketMenus.d.ts +12 -0
- package/dist/components/settings/Settings.d.ts +4 -0
- package/dist/components/settings/Settings.styles.d.ts +10 -0
- package/dist/components/settings/settings-lnb/SettingsLnb.d.ts +13 -0
- package/dist/components/settings/settings-lnb/SettingsLnb.styles.d.ts +3 -0
- package/dist/components/settings/shortcuts/Shortcuts.d.ts +4 -0
- package/dist/components/settings/shortcuts/Shortcuts.styles.d.ts +2 -0
- package/dist/components/theme/Theme.d.ts +7 -0
- package/dist/components/theme-builder/ThemeBuilder.d.ts +7 -0
- package/dist/components/theme-builder/ThemeBuilder.styles.d.ts +8 -0
- package/dist/components/toast-container/ToastContainer.d.ts +4 -0
- package/dist/components/toast-container/ToastContainer.styles.d.ts +1 -0
- package/dist/components/toolbar/Toolbar.d.ts +6 -0
- package/dist/components/toolbar/Toolbar.styles.d.ts +3 -0
- package/dist/components/visualization/Visualization.d.ts +4 -0
- package/dist/components/visualization/Visualization.styles.d.ts +1 -0
- package/dist/components/visualization/createVisualization.d.ts +9 -0
- package/dist/components/visualization/table/Table.d.ts +10 -0
- package/dist/components/visualization/table/Table.styles.d.ts +1 -0
- package/dist/components/visualization/table/column/Column.d.ts +12 -0
- package/dist/components/visualization/table/column/Column.styles.d.ts +1 -0
- package/dist/constants/language.d.ts +1 -0
- package/dist/constants/layout.d.ts +32 -0
- package/dist/constants/open.d.ts +8 -0
- package/dist/constants/schema.d.ts +102 -0
- package/dist/constants/sql/dataType/MSSQL.d.ts +5 -0
- package/dist/constants/sql/dataType/MariaDB.d.ts +5 -0
- package/dist/constants/sql/dataType/MySQL.d.ts +5 -0
- package/dist/constants/sql/dataType/Oracle.d.ts +5 -0
- package/dist/constants/sql/dataType/PostgreSQL.d.ts +5 -0
- package/dist/constants/sql/dataType/SQLite.d.ts +5 -0
- package/dist/constants/sql/dataType/index.d.ts +25 -0
- package/dist/constants/sql/database.d.ts +12 -0
- package/dist/engine/actions.d.ts +35 -0
- package/dist/engine/context.d.ts +5 -0
- package/dist/engine/generator.actions.d.ts +4 -0
- package/dist/engine/history.actions.d.ts +9 -0
- package/dist/engine/history.d.ts +20 -0
- package/dist/engine/hooks.d.ts +8 -0
- package/dist/engine/modules/editor/actions.d.ts +93 -0
- package/dist/engine/modules/editor/atom.actions.d.ts +406 -0
- package/dist/engine/modules/editor/generator.actions.d.ts +31 -0
- package/dist/engine/modules/editor/history.d.ts +5 -0
- package/dist/engine/modules/editor/state.d.ts +63 -0
- package/dist/engine/modules/editor/utils/focus.d.ts +15 -0
- package/dist/engine/modules/editor/utils/selectRangeColumn.d.ts +3 -0
- package/dist/engine/modules/index/actions.d.ts +31 -0
- package/dist/engine/modules/index/atom.actions.d.ts +101 -0
- package/dist/engine/modules/index/generator.actions.d.ts +7 -0
- package/dist/engine/modules/index/history.d.ts +7 -0
- package/dist/engine/modules/index-column/actions.d.ts +37 -0
- package/dist/engine/modules/index-column/atom.actions.d.ts +125 -0
- package/dist/engine/modules/index-column/generator.actions.d.ts +11 -0
- package/dist/engine/modules/index-column/history.d.ts +7 -0
- package/dist/engine/modules/memo/actions.d.ts +59 -0
- package/dist/engine/modules/memo/atom.actions.d.ts +225 -0
- package/dist/engine/modules/memo/generator.actions.d.ts +9 -0
- package/dist/engine/modules/memo/history.d.ts +12 -0
- package/dist/engine/modules/relationship/actions.d.ts +31 -0
- package/dist/engine/modules/relationship/atom.actions.d.ts +102 -0
- package/dist/engine/modules/relationship/generator.actions.d.ts +1 -0
- package/dist/engine/modules/relationship/history.d.ts +6 -0
- package/dist/engine/modules/relationship/hooks.d.ts +2 -0
- package/dist/engine/modules/settings/actions.d.ts +83 -0
- package/dist/engine/modules/settings/atom.actions.d.ts +348 -0
- package/dist/engine/modules/settings/generator.actions.d.ts +7 -0
- package/dist/engine/modules/settings/history.d.ts +11 -0
- package/dist/engine/modules/table/actions.d.ts +57 -0
- package/dist/engine/modules/table/atom.actions.d.ts +224 -0
- package/dist/engine/modules/table/generator.actions.d.ts +12 -0
- package/dist/engine/modules/table/history.d.ts +13 -0
- package/dist/engine/modules/table/hooks.d.ts +2 -0
- package/dist/engine/modules/table-column/actions.d.ts +53 -0
- package/dist/engine/modules/table-column/atom.actions.d.ts +230 -0
- package/dist/engine/modules/table-column/generator.actions.d.ts +19 -0
- package/dist/engine/modules/table-column/history.d.ts +14 -0
- package/dist/engine/modules/table-column/hooks.d.ts +2 -0
- package/dist/engine/modules/table-column/utils/dataType.d.ts +3 -0
- package/dist/engine/rx-operators/actionsFilter.d.ts +3 -0
- package/dist/engine/rx-operators/groupByStreamActions.d.ts +5 -0
- package/dist/engine/rx-operators/ignoreTagFilter.d.ts +3 -0
- package/dist/engine/rx-operators/index.d.ts +4 -0
- package/dist/engine/rx-operators/notEmptyActions.d.ts +2 -0
- package/dist/engine/rx-operators/readonlyIgnoreFilter.d.ts +3 -0
- package/dist/engine/rx-store.d.ts +10 -0
- package/dist/engine/state.d.ts +5 -0
- package/dist/engine/store.d.ts +5 -0
- package/dist/engine/store.hooks.d.ts +4 -0
- package/dist/engine/tag.d.ts +7 -0
- package/dist/erd-editor.js +42402 -0
- package/dist/hooks/useDarkMode.d.ts +5 -0
- package/dist/hooks/useFlipAnimation.d.ts +2 -0
- package/dist/hooks/useKeyBindingMap.d.ts +3 -0
- package/dist/hooks/useUnmounted.d.ts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.dev.d.ts +1 -0
- package/dist/internal-types/index.d.ts +40 -0
- package/dist/services/schema-gc/index.d.ts +10 -0
- package/dist/services/schema-gc/procGC.d.ts +3 -0
- package/dist/services/schema-gc/schemaGCService.d.ts +4 -0
- package/dist/services/shikiService.d.ts +8 -0
- package/dist/styles/colorPicker.style.d.ts +1 -0
- package/dist/styles/fonts.styles.d.ts +3 -0
- package/dist/styles/reset.styles.d.ts +1 -0
- package/dist/styles/scrollbar.styles.d.ts +1 -0
- package/dist/styles/typography.styles.d.ts +14 -0
- package/dist/themes/radix-ui-theme.config.d.ts +2 -0
- package/dist/themes/radix-ui-theme.d.ts +1792 -0
- package/dist/themes/textColor.d.ts +2 -0
- package/dist/themes/tokens.d.ts +63 -0
- package/dist/utils/attribute.d.ts +1 -0
- package/dist/utils/bit.d.ts +1 -0
- package/dist/utils/calcMemo.d.ts +3 -0
- package/dist/utils/calcTable.d.ts +16 -0
- package/dist/utils/clipboard.d.ts +1 -0
- package/dist/utils/collection/index.entity.d.ts +2 -0
- package/dist/utils/collection/indexColumn.entity.d.ts +2 -0
- package/dist/utils/collection/memo.entity.d.ts +2 -0
- package/dist/utils/collection/relationship.entity.d.ts +2 -0
- package/dist/utils/collection/sequence.d.ts +1 -0
- package/dist/utils/collection/table.entity.d.ts +2 -0
- package/dist/utils/collection/tableColumn.entity.d.ts +2 -0
- package/dist/utils/device-detect/index.d.ts +7 -0
- package/dist/utils/domEvent.d.ts +6 -0
- package/dist/utils/dragSelect.d.ts +23 -0
- package/dist/utils/draw-relationship/calc.d.ts +6 -0
- package/dist/utils/draw-relationship/draw.d.ts +4 -0
- package/dist/utils/draw-relationship/index.d.ts +108 -0
- package/dist/utils/draw-relationship/pathFinding.d.ts +3 -0
- package/dist/utils/draw-relationship/sort.d.ts +2 -0
- package/dist/utils/emitter.d.ts +141 -0
- package/dist/utils/file/exportFile.d.ts +9 -0
- package/dist/utils/file/importFile.d.ts +10 -0
- package/dist/utils/flipAnimation.d.ts +10 -0
- package/dist/utils/focus.d.ts +5 -0
- package/dist/utils/generator-code/csharp.d.ts +4 -0
- package/dist/utils/generator-code/graphql.d.ts +4 -0
- package/dist/utils/generator-code/index.d.ts +4 -0
- package/dist/utils/generator-code/java.d.ts +4 -0
- package/dist/utils/generator-code/jpa.d.ts +4 -0
- package/dist/utils/generator-code/kotlin.d.ts +4 -0
- package/dist/utils/generator-code/scala.d.ts +4 -0
- package/dist/utils/generator-code/typescript.d.ts +4 -0
- package/dist/utils/generator-code/utils.d.ts +19 -0
- package/dist/utils/globalEmitter.d.ts +28 -0
- package/dist/utils/globalEventObservable.d.ts +41 -0
- package/dist/utils/icon.d.ts +1 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/internalEvents.d.ts +38 -0
- package/dist/utils/keyboard-shortcut/index.d.ts +36 -0
- package/dist/utils/keyboard-shortcut/utils.d.ts +2 -0
- package/dist/utils/promise.d.ts +1 -0
- package/dist/utils/rx-operators/fromCopy.d.ts +3 -0
- package/dist/utils/rx-operators/fromDraggable.d.ts +1 -0
- package/dist/utils/rx-operators/fromPaste.d.ts +3 -0
- package/dist/utils/rx-operators/fromShadowDraggable.d.ts +1 -0
- package/dist/utils/rx-operators/takeUnsubscribe.d.ts +2 -0
- package/dist/utils/schema-sql/MSSQL.d.ts +5 -0
- package/dist/utils/schema-sql/MariaDB.d.ts +5 -0
- package/dist/utils/schema-sql/MySQL.d.ts +5 -0
- package/dist/utils/schema-sql/Oracle.d.ts +5 -0
- package/dist/utils/schema-sql/PostgreSQL.d.ts +5 -0
- package/dist/utils/schema-sql/SQLite.d.ts +5 -0
- package/dist/utils/schema-sql/index.d.ts +4 -0
- package/dist/utils/schema-sql/utils.d.ts +53 -0
- package/dist/utils/schema-sql-parser/index.d.ts +3 -0
- package/dist/utils/schema-sql-parser/utils.d.ts +3 -0
- package/dist/utils/table-clipboard/copy.d.ts +3 -0
- package/dist/utils/table-clipboard/index.d.ts +15 -0
- package/dist/utils/table-clipboard/paste.d.ts +4 -0
- package/dist/utils/text.d.ts +4 -0
- package/dist/utils/validation.d.ts +16 -0
- package/dist/workers/schemaGC.shared-worker.d.ts +1 -0
- package/dist/workers/schemaGC.worker.d.ts +1 -0
- package/package.json +101 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ValuesType } from "../internal-types";
|
|
2
|
+
export declare const InternalEventType: {
|
|
3
|
+
readonly focus: "@dineug/erd-editor/internal-focus";
|
|
4
|
+
readonly forceFocus: "@dineug/erd-editor/internal-force-focus";
|
|
5
|
+
readonly forwardMoveStart: "@dineug/erd-editor/internal-forward-move-start";
|
|
6
|
+
};
|
|
7
|
+
export type InternalEventType = ValuesType<typeof InternalEventType>;
|
|
8
|
+
export type InternalEventMap = {
|
|
9
|
+
[InternalEventType.focus]: void;
|
|
10
|
+
[InternalEventType.forceFocus]: void;
|
|
11
|
+
[InternalEventType.forwardMoveStart]: {
|
|
12
|
+
originEvent: MouseEvent | TouchEvent;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
type EventOptions = {
|
|
16
|
+
bubbles?: boolean;
|
|
17
|
+
composed?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export declare const focusEvent: {
|
|
20
|
+
(payload: void, options?: EventOptions): CustomEvent<void>;
|
|
21
|
+
toString(): string;
|
|
22
|
+
type: string;
|
|
23
|
+
};
|
|
24
|
+
export declare const forceFocusEvent: {
|
|
25
|
+
(payload: void, options?: EventOptions): CustomEvent<void>;
|
|
26
|
+
toString(): string;
|
|
27
|
+
type: string;
|
|
28
|
+
};
|
|
29
|
+
export declare const forwardMoveStartEvent: {
|
|
30
|
+
(payload: {
|
|
31
|
+
originEvent: MouseEvent | TouchEvent;
|
|
32
|
+
}, options?: EventOptions): CustomEvent<{
|
|
33
|
+
originEvent: MouseEvent | TouchEvent;
|
|
34
|
+
}>;
|
|
35
|
+
toString(): string;
|
|
36
|
+
type: string;
|
|
37
|
+
};
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ValuesType } from "../../internal-types";
|
|
2
|
+
import { KeyBindingPress } from './utils';
|
|
3
|
+
export type ShortcutOption = {
|
|
4
|
+
shortcut: string;
|
|
5
|
+
preventDefault?: boolean;
|
|
6
|
+
stopPropagation?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const KeyBindingName: {
|
|
9
|
+
readonly edit: "edit";
|
|
10
|
+
readonly stop: "stop";
|
|
11
|
+
readonly search: "search";
|
|
12
|
+
readonly undo: "undo";
|
|
13
|
+
readonly redo: "redo";
|
|
14
|
+
readonly addTable: "addTable";
|
|
15
|
+
readonly addColumn: "addColumn";
|
|
16
|
+
readonly addMemo: "addMemo";
|
|
17
|
+
readonly removeTable: "removeTable";
|
|
18
|
+
readonly removeColumn: "removeColumn";
|
|
19
|
+
readonly primaryKey: "primaryKey";
|
|
20
|
+
readonly selectAllTable: "selectAllTable";
|
|
21
|
+
readonly selectAllColumn: "selectAllColumn";
|
|
22
|
+
readonly relationshipZeroOne: "relationshipZeroOne";
|
|
23
|
+
readonly relationshipZeroN: "relationshipZeroN";
|
|
24
|
+
readonly relationshipOneOnly: "relationshipOneOnly";
|
|
25
|
+
readonly relationshipOneN: "relationshipOneN";
|
|
26
|
+
readonly tableProperties: "tableProperties";
|
|
27
|
+
readonly zoomIn: "zoomIn";
|
|
28
|
+
readonly zoomOut: "zoomOut";
|
|
29
|
+
};
|
|
30
|
+
export type KeyBindingName = ValuesType<typeof KeyBindingName>;
|
|
31
|
+
export declare const KeyBindingNameList: ("undo" | "redo" | "selectAllColumn" | "edit" | "addMemo" | "addTable" | "removeTable" | "addColumn" | "removeColumn" | "search" | "stop" | "primaryKey" | "selectAllTable" | "relationshipZeroOne" | "relationshipZeroN" | "relationshipOneOnly" | "relationshipOneN" | "tableProperties" | "zoomIn" | "zoomOut")[];
|
|
32
|
+
export type KeyBindingMap = Record<KeyBindingName, ShortcutOption[]>;
|
|
33
|
+
export declare const createKeyBindingMap: () => KeyBindingMap;
|
|
34
|
+
export declare function shortcutToTuple(shortcut?: string): KeyBindingPress[];
|
|
35
|
+
export declare function isMod(event: MouseEvent | TouchEvent | KeyboardEvent): boolean;
|
|
36
|
+
export declare function simpleShortcutToString(shortcut?: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function closePromise(): [Promise<void>, () => void];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const fromDraggable: (elements: Element[]) => import("rxjs").Observable<DragEvent>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const fromShadowDraggable: <R>(elements: HTMLElement[], prepare: (el: HTMLElement) => R) => import("rxjs").Observable<R>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RootState } from "../../engine/state";
|
|
2
|
+
import { FormatIndexOptions, FormatTableOptions } from './utils';
|
|
3
|
+
export declare function createSchema(state: RootState): string;
|
|
4
|
+
export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
|
|
5
|
+
export declare function formatIndex({ settings: { bracketType }, collections }: RootState, { buffer, index, indexNames }: FormatIndexOptions): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RootState } from "../../engine/state";
|
|
2
|
+
import { FormatIndexOptions, FormatTableOptions } from './utils';
|
|
3
|
+
export declare function createSchema(state: RootState): string;
|
|
4
|
+
export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
|
|
5
|
+
export declare function formatIndex({ settings: { bracketType }, collections }: RootState, { buffer, index, indexNames }: FormatIndexOptions): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RootState } from "../../engine/state";
|
|
2
|
+
import { FormatIndexOptions, FormatTableOptions } from './utils';
|
|
3
|
+
export declare function createSchema(state: RootState): string;
|
|
4
|
+
export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
|
|
5
|
+
export declare function formatIndex({ settings: { bracketType }, collections }: RootState, { buffer, index, indexNames }: FormatIndexOptions): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RootState } from "../../engine/state";
|
|
2
|
+
import { FormatIndexOptions, FormatTableOptions } from './utils';
|
|
3
|
+
export declare function createSchema(state: RootState): string;
|
|
4
|
+
export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
|
|
5
|
+
export declare function formatIndex({ settings: { bracketType }, collections }: RootState, { buffer, index, indexNames }: FormatIndexOptions): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RootState } from "../../engine/state";
|
|
2
|
+
import { FormatIndexOptions, FormatTableOptions } from './utils';
|
|
3
|
+
export declare function createSchema(state: RootState): string;
|
|
4
|
+
export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
|
|
5
|
+
export declare function formatIndex({ settings: { bracketType }, collections }: RootState, { buffer, index, indexNames }: FormatIndexOptions): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RootState } from "../../engine/state";
|
|
2
|
+
import { FormatIndexOptions, FormatTableOptions } from './utils';
|
|
3
|
+
export declare function createSchema(state: RootState): string;
|
|
4
|
+
export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
|
|
5
|
+
export declare function formatIndex({ settings: { bracketType }, collections }: RootState, { buffer, index, indexNames }: FormatIndexOptions): void;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Column, Index, Relationship, Table } from "../../internal-types";
|
|
2
|
+
export interface FormatTableOptions {
|
|
3
|
+
buffer: string[];
|
|
4
|
+
table: Table;
|
|
5
|
+
}
|
|
6
|
+
export interface FormatColumnOptions {
|
|
7
|
+
buffer: string[];
|
|
8
|
+
column: Column;
|
|
9
|
+
isComma: boolean;
|
|
10
|
+
spaceSize: MaxLength;
|
|
11
|
+
}
|
|
12
|
+
export interface FormatRelationOptions {
|
|
13
|
+
buffer: string[];
|
|
14
|
+
relationship: Relationship;
|
|
15
|
+
fkNames: Name[];
|
|
16
|
+
}
|
|
17
|
+
export interface FormatIndexOptions {
|
|
18
|
+
buffer: string[];
|
|
19
|
+
index: Index;
|
|
20
|
+
indexNames: Name[];
|
|
21
|
+
}
|
|
22
|
+
export interface FormatCommentOptions {
|
|
23
|
+
buffer: string[];
|
|
24
|
+
table: Table;
|
|
25
|
+
}
|
|
26
|
+
export interface Name {
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
}
|
|
30
|
+
export interface KeyColumn {
|
|
31
|
+
start: Column[];
|
|
32
|
+
end: Column[];
|
|
33
|
+
}
|
|
34
|
+
export declare function formatNames<T extends {
|
|
35
|
+
name: string;
|
|
36
|
+
}>(list: T[], backtick?: string, backtick2?: string): string;
|
|
37
|
+
export interface MaxLength {
|
|
38
|
+
name: number;
|
|
39
|
+
dataType: number;
|
|
40
|
+
}
|
|
41
|
+
export declare function formatSize(columns: Column[]): MaxLength;
|
|
42
|
+
export declare function formatSpace(size: number): string;
|
|
43
|
+
export declare function primaryKey(columns: Column[]): boolean;
|
|
44
|
+
export declare function primaryKeyColumns(columns: Column[]): Column[];
|
|
45
|
+
export declare function unique(columns: Column[]): boolean;
|
|
46
|
+
export declare function uniqueColumns(columns: Column[]): Column[];
|
|
47
|
+
export declare function getBracket(bracketType: number): string;
|
|
48
|
+
export declare function orderByNameASC(a: Table, b: Table): 1 | -1 | 0;
|
|
49
|
+
export declare function autoName<T extends {
|
|
50
|
+
id: string;
|
|
51
|
+
name: string;
|
|
52
|
+
}>(list: T[], id: string, name: string, num?: number): string;
|
|
53
|
+
export declare function toOrderName(orderType: number): "" | "ASC" | "DESC";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ValuesType } from "../../internal-types";
|
|
2
|
+
export type Cell = [CellType | '', string];
|
|
3
|
+
export type Row = Cell[];
|
|
4
|
+
export declare const CellType: {
|
|
5
|
+
readonly columnName: "columnName";
|
|
6
|
+
readonly columnDataType: "columnDataType";
|
|
7
|
+
readonly columnNotNull: "columnNotNull";
|
|
8
|
+
readonly columnUnique: "columnUnique";
|
|
9
|
+
readonly columnAutoIncrement: "columnAutoIncrement";
|
|
10
|
+
readonly columnDefault: "columnDefault";
|
|
11
|
+
readonly columnComment: "columnComment";
|
|
12
|
+
};
|
|
13
|
+
export type CellType = ValuesType<typeof CellType>;
|
|
14
|
+
export declare const hasCellType: (value: string) => boolean;
|
|
15
|
+
export declare function getShowColumnOrder(show: number, columnOrder: number[]): number[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { RootState } from "../../engine/state";
|
|
2
|
+
import { Column } from "../../internal-types";
|
|
3
|
+
export declare function tablePasteFromTextToColumns({ settings: { show, columnOrder } }: RootState, text: string): Column[];
|
|
4
|
+
export declare function tablePasteFromHtmlToColumns({ settings: { show, columnOrder } }: RootState, html: string): Column[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const toNumString: (value: string) => string;
|
|
2
|
+
export declare const maxWidthCommentInRange: (num: number) => number;
|
|
3
|
+
export declare function canvasSizeInRange(size: number | string): number;
|
|
4
|
+
export declare function zoomLevelInRange(zoom: number): number;
|
|
5
|
+
export declare function toMaxWidthCommentFormat(width: number): string;
|
|
6
|
+
export declare function toZoomFormat(zoomLevel: number): string;
|
|
7
|
+
export declare const hasDatabase: (value: number) => boolean;
|
|
8
|
+
export declare const hasNameCase: (value: number) => boolean;
|
|
9
|
+
export declare const hasBracketType: (value: number) => boolean;
|
|
10
|
+
export declare const hasLanguage: (value: number) => boolean;
|
|
11
|
+
export declare const hasColumnType: (value: number) => boolean;
|
|
12
|
+
export declare const hasDatabaseVendor: (value: string) => boolean;
|
|
13
|
+
export declare const hasCanvasType: (value: string) => boolean;
|
|
14
|
+
export declare function textInRange(width: number): number;
|
|
15
|
+
export declare function toSafeString(value: any): string;
|
|
16
|
+
export declare function isHighLevelTable(zoomLevel: number): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dineug/erd-editor",
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "Entity-Relationship Diagram Editor",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/erd-editor.umd.cjs",
|
|
7
|
+
"module": "./dist/erd-editor.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"default": "./dist/erd-editor.js"
|
|
14
|
+
},
|
|
15
|
+
"require": "./dist/erd-editor.umd.cjs"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist/*.js",
|
|
20
|
+
"dist/**/*.ts"
|
|
21
|
+
],
|
|
22
|
+
"keywords": [
|
|
23
|
+
"vuerd",
|
|
24
|
+
"editor",
|
|
25
|
+
"erd",
|
|
26
|
+
"db",
|
|
27
|
+
"database",
|
|
28
|
+
"diagram",
|
|
29
|
+
"entity",
|
|
30
|
+
"relationship",
|
|
31
|
+
"sql"
|
|
32
|
+
],
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "https://github.com/dineug/erd-editor.git"
|
|
36
|
+
},
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": "https://github.com/dineug/erd-editor/issues"
|
|
39
|
+
},
|
|
40
|
+
"homepage": "https://github.com/dineug/erd-editor#readme",
|
|
41
|
+
"author": "SeungHwan-Lee <dineug2@gmail.com>",
|
|
42
|
+
"license": "MIT",
|
|
43
|
+
"scripts": {
|
|
44
|
+
"dev": "vite serve --mode lib",
|
|
45
|
+
"build": "vite build --mode lib",
|
|
46
|
+
"storybook": "storybook dev -p 6006",
|
|
47
|
+
"build-storybook": "storybook build"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@dineug/erd-editor-schema": "workspace:*",
|
|
51
|
+
"@dineug/erd-editor-shiki-worker": "workspace:*",
|
|
52
|
+
"@dineug/go": "^0.1.7",
|
|
53
|
+
"@dineug/r-html": "workspace:*",
|
|
54
|
+
"@dineug/schema-sql-parser": "workspace:*",
|
|
55
|
+
"@dineug/shared": "workspace:*",
|
|
56
|
+
"@dineug/vite-plugin-r-html": "workspace:*",
|
|
57
|
+
"@easylogic/colorpicker": "1.10.11",
|
|
58
|
+
"@floating-ui/dom": "1.5.3",
|
|
59
|
+
"@fortawesome/free-regular-svg-icons": "6.5.1",
|
|
60
|
+
"@fortawesome/free-solid-svg-icons": "6.5.1",
|
|
61
|
+
"@mdi/js": "7.3.67",
|
|
62
|
+
"@radix-ui/colors": "3.0.0",
|
|
63
|
+
"@rollup/plugin-typescript": "^11.1.5",
|
|
64
|
+
"@storybook/addon-essentials": "^7.6.5",
|
|
65
|
+
"@storybook/addon-interactions": "^7.6.5",
|
|
66
|
+
"@storybook/addon-links": "^7.6.5",
|
|
67
|
+
"@storybook/blocks": "^7.6.5",
|
|
68
|
+
"@storybook/html": "^7.6.5",
|
|
69
|
+
"@storybook/html-vite": "^7.6.5",
|
|
70
|
+
"@storybook/testing-library": "^0.2.2",
|
|
71
|
+
"@types/color": "^3.0.6",
|
|
72
|
+
"@types/d3": "7.4.3",
|
|
73
|
+
"@types/highlight-words-core": "^1.2.3",
|
|
74
|
+
"@types/lodash-es": "^4.17.12",
|
|
75
|
+
"@types/luxon": "^3.3.7",
|
|
76
|
+
"@types/ua-parser-js": "^0.7.39",
|
|
77
|
+
"color": "^4.2.3",
|
|
78
|
+
"comlink": "4.4.1",
|
|
79
|
+
"d3": "7.8.5",
|
|
80
|
+
"deepmerge": "^4.3.1",
|
|
81
|
+
"framer-motion": "^10.16.16",
|
|
82
|
+
"fuse.js": "^7.0.0",
|
|
83
|
+
"highlight-words-core": "^1.2.2",
|
|
84
|
+
"html-to-image": "^1.11.11",
|
|
85
|
+
"lodash-es": "^4.17.21",
|
|
86
|
+
"luxon": "^3.4.4",
|
|
87
|
+
"nanoid": "^5.0.4",
|
|
88
|
+
"rollup-plugin-visualizer": "^5.11.0",
|
|
89
|
+
"rxjs": "^7.8.1",
|
|
90
|
+
"stats.js": "^0.17.0",
|
|
91
|
+
"storybook": "^7.6.5",
|
|
92
|
+
"tinykeys": "^2.1.0",
|
|
93
|
+
"ts-patch": "^3.1.1",
|
|
94
|
+
"tslib": "^2.6.2",
|
|
95
|
+
"typescript": "5.3.3",
|
|
96
|
+
"typescript-transform-paths": "^3.4.6",
|
|
97
|
+
"ua-parser-js": "^1.0.37",
|
|
98
|
+
"vite": "^5.0.10",
|
|
99
|
+
"vite-tsconfig-paths": "3.6.0"
|
|
100
|
+
}
|
|
101
|
+
}
|