@dineug/erd-editor 3.10.0 → 4.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/README.md +316 -147
- package/dist/components/appContext.d.ts +4 -0
- package/dist/components/erd/Erd.d.ts +3 -0
- package/dist/components/erd/automatic-table-placement/AutomaticTablePlacement.d.ts +2 -1
- package/dist/components/erd/automatic-table-placement/createAutomaticTablePlacement.d.ts +38 -2
- package/dist/components/erd/automatic-table-placement/elkPlacement.d.ts +42 -0
- package/dist/components/erd/automatic-table-placement/flowPlacement.d.ts +21 -0
- package/dist/components/erd/automatic-table-placement/placementActions.d.ts +14 -0
- package/dist/components/erd/automatic-table-placement/runElkPlacement.d.ts +0 -11
- package/dist/components/erd/canvas/SceneIcon.template.d.ts +2 -2
- package/dist/components/erd/canvas/entityDrag.d.ts +17 -1
- package/dist/components/erd/canvas/middleButtonPan.d.ts +11 -0
- package/dist/components/erd/canvas/sceneTokens.d.ts +38 -0
- package/dist/components/erd/canvas/table/Table.d.ts +9 -1
- package/dist/components/erd/canvas/table/doubleClick.d.ts +3 -4
- package/dist/components/erd/canvas/table-group/TableGroup.d.ts +17 -0
- package/dist/components/erd/canvas/table-group/TableGroupBody.d.ts +17 -0
- package/dist/components/erd/canvas/table-group/TableGroupDropTarget.d.ts +10 -0
- package/dist/components/erd/canvas/table-group/TableGroupSash.d.ts +35 -0
- package/dist/components/erd/canvas/table-group/TableGroups.d.ts +10 -0
- package/dist/components/erd/canvas/table-group/tableGroupBox.d.ts +40 -0
- package/dist/components/erd/canvas/table-group/titleLayout.d.ts +45 -0
- package/dist/components/erd/canvas/useMoveEntity.d.ts +2 -0
- package/dist/components/erd/draw-target/DrawTargetButtons.d.ts +16 -0
- package/dist/components/erd/draw-target/DrawTargetButtons.styles.d.ts +14 -0
- package/dist/components/erd/draw-target/drawTargetState.d.ts +26 -0
- package/dist/components/erd/draw-target/findDrawTarget.d.ts +29 -0
- package/dist/components/erd/draw-target/placePill.d.ts +49 -0
- package/dist/components/erd/erd-context-menu/ErdContextMenu.d.ts +6 -0
- package/dist/components/erd/erd-context-menu/menus/drawRelationshipMenus.d.ts +3 -0
- package/dist/components/erd/erd-context-menu/menus/exportMenus.d.ts +7 -2
- package/dist/components/erd/erd-context-menu/menus/importMenus.d.ts +5 -1
- package/dist/components/erd/erd-context-menu/menus/relationshipMenus.d.ts +6 -2
- package/dist/components/erd/erd-context-menu/menus/showMenus.d.ts +3 -1
- package/dist/components/erd/erd-context-menu/menus/tablePlacementMenus.d.ts +3 -0
- package/dist/components/erd/floating-toolbar/ToolbarCompass.template.d.ts +3 -1
- package/dist/components/erd/hitTest.d.ts +16 -1
- package/dist/components/erd/minimap/MinimapScene.d.ts +1 -1
- package/dist/components/erd/minimap/table/Table.d.ts +3 -3
- package/dist/components/erd/minimap/table-group/TableGroup.d.ts +17 -0
- package/dist/components/erd/table-group/TableGroupDraft.d.ts +15 -0
- package/dist/components/erd/table-group/TableGroupDraft.styles.d.ts +6 -0
- package/dist/components/erd/table-group/tableGroupName.d.ts +21 -0
- package/dist/components/erd/table-group/useTableGroupDraw.d.ts +25 -0
- package/dist/components/erd/table-properties/TableProperties.styles.d.ts +2 -2
- package/dist/components/erd/table-properties/table-properties-indexes/indexes-key/IndexesKey.d.ts +6 -0
- package/dist/components/erd/table-properties/table-properties-tabs/TablePropertiesTabs.d.ts +3 -0
- package/dist/components/erd/welcome-screen/WelcomeScreen.d.ts +17 -0
- package/dist/components/erd/welcome-screen/WelcomeScreen.styles.d.ts +17 -0
- package/dist/components/erd/welcome-screen/welcome-hints/WelcomeHints.d.ts +21 -0
- package/dist/components/erd/welcome-screen/welcome-hints/WelcomeHints.styles.d.ts +14 -0
- package/dist/components/erd/welcome-screen/welcome-hints/hintArrows.d.ts +10 -0
- package/dist/components/erd/welcome-screen/welcomeLayout.d.ts +87 -0
- package/dist/components/erd-editor/ErdEditor.d.ts +66 -6
- package/dist/components/erd-editor/useErdEditorAttachElement.d.ts +14 -1
- package/dist/components/export-image/ExportImage.d.ts +23 -0
- package/dist/components/export-image/ExportImage.styles.d.ts +34 -0
- package/dist/components/export-image/exportImageActions.d.ts +48 -0
- package/dist/components/find-replace/panelLayout.d.ts +4 -1
- package/dist/components/generator-code/GeneratorCode.d.ts +1 -0
- package/dist/components/generator-code/generator-code-context-menu/GeneratorCodeContextMenu.d.ts +3 -0
- package/dist/components/generator-code/generator-code-context-menu/menus/columnNameCaseMenus.d.ts +3 -0
- package/dist/components/generator-code/generator-code-context-menu/menus/languageMenus.d.ts +8 -0
- package/dist/components/generator-code/generator-code-context-menu/menus/tableNameCaseMenus.d.ts +3 -0
- package/dist/components/generator-code/generator-code-options/GeneratorCodeOptions.d.ts +17 -0
- package/dist/components/generator-code/generator-code-options/GeneratorCodeOptions.styles.d.ts +5 -0
- package/dist/components/generator-code/generatorCodeView.d.ts +12 -0
- package/dist/components/generator-code/languageSettings.d.ts +14 -0
- package/dist/components/locale-picker/LocalePicker.d.ts +13 -0
- package/dist/components/locale-picker/LocalePicker.styles.d.ts +19 -0
- package/dist/components/localeContext.d.ts +10 -0
- package/dist/components/localized/Localized.d.ts +18 -0
- package/dist/components/map-columns/MapColumnsBody.d.ts +24 -0
- package/dist/components/map-columns/MapColumnsDialog.d.ts +13 -0
- package/dist/components/map-columns/MapColumnsDialog.styles.d.ts +38 -0
- package/dist/components/map-columns/mapColumnsAction.d.ts +13 -0
- package/dist/components/map-columns/nameOf.d.ts +6 -0
- package/dist/components/map-columns/openMapColumns.d.ts +9 -0
- package/dist/components/primitives/code-block/CodeBlock.d.ts +6 -1
- package/dist/components/primitives/code-block/CodeBlock.styles.d.ts +2 -0
- package/dist/components/primitives/color-picker/ColorPicker.d.ts +10 -1
- package/dist/components/primitives/color-picker/ColorPicker.styles.d.ts +25 -0
- package/dist/components/primitives/color-picker/colorModel.d.ts +36 -0
- package/dist/components/primitives/color-picker/presetColors.d.ts +13 -0
- package/dist/components/primitives/color-picker/resolveColor.d.ts +7 -0
- package/dist/components/primitives/context-menu/ContextMenu.d.ts +2 -0
- package/dist/components/primitives/context-menu/context-menu-content/ContextMenuContent.d.ts +1 -0
- package/dist/components/primitives/context-menu/context-menu-content/fitMenu.d.ts +4 -4
- package/dist/components/primitives/context-menu/context-menu-separator/ContextMenuSeparator.d.ts +8 -0
- package/dist/components/primitives/context-menu/context-menu-separator/ContextMenuSeparator.styles.d.ts +2 -0
- package/dist/components/primitives/context-menu/menu/Menu.d.ts +2 -0
- package/dist/components/primitives/context-menu/submenu-chevron/SubmenuChevron.d.ts +5 -0
- package/dist/components/primitives/dialog/Dialog.d.ts +21 -0
- package/dist/components/primitives/dialog/Dialog.styles.d.ts +12 -0
- package/dist/components/primitives/highlighted-text/HighlightedText.d.ts +2 -5
- package/dist/components/primitives/icon/icons.d.ts +17 -0
- package/dist/components/primitives/select/Select.d.ts +18 -0
- package/dist/components/primitives/select/Select.styles.d.ts +13 -0
- package/dist/components/primitives/text-input/TextInput.d.ts +2 -0
- package/dist/components/primitives/toast/Toast.d.ts +5 -1
- package/dist/components/primitives/toast/Toast.styles.d.ts +2 -2
- package/dist/components/quick-search/QuickSearch.d.ts +2 -1
- package/dist/components/quick-search/actions.d.ts +40 -5
- package/dist/components/quick-search/hangul.d.ts +16 -10
- package/dist/components/quick-search/paletteQuery.d.ts +5 -4
- package/dist/components/quick-search/scopedActions.d.ts +6 -5
- package/dist/components/schema-sql/SchemaSQL.d.ts +2 -0
- package/dist/components/schema-sql/SchemaSQL.styles.d.ts +7 -0
- package/dist/components/schema-sql/schema-sql-context-menu/SchemaSQLContextMenu.d.ts +3 -0
- package/dist/components/schema-sql/schema-sql-context-menu/menus/bracketMenus.d.ts +3 -0
- package/dist/components/schema-sql/schema-sql-context-menu/menus/headerMenus.d.ts +29 -0
- package/dist/components/schema-sql/schema-sql-context-menu/menus/statementsMenus.d.ts +27 -0
- package/dist/components/schema-sql/schema-sql-options/SchemaSQLOptions.d.ts +24 -0
- package/dist/components/schema-sql/schema-sql-options/SchemaSQLOptions.styles.d.ts +45 -0
- package/dist/components/schema-sql/schema-sql-options/ScriptEditor.d.ts +20 -0
- package/dist/components/schema-sql/schema-sql-options/ScriptEditor.styles.d.ts +13 -0
- package/dist/components/schema-sql/schema-sql-options/dropWarning.d.ts +8 -0
- package/dist/components/schema-sql/schemaSQLView.d.ts +71 -0
- package/dist/components/settings/Settings.styles.d.ts +7 -0
- package/dist/components/settings/columnTypeLabels.d.ts +8 -0
- package/dist/components/settings/lockSettingRows.d.ts +16 -0
- package/dist/components/settings/settings-lnb/SettingsLnb.d.ts +3 -0
- package/dist/components/settings/settingsPage.d.ts +10 -0
- package/dist/components/theme-builder/ThemeBuilder.d.ts +9 -1
- package/dist/components/theme-builder/ThemeBuilder.styles.d.ts +8 -5
- package/dist/components/toast-container/openStatusToast.d.ts +29 -0
- package/dist/components/toast-container/openToastWhileRunning.d.ts +1 -1
- package/dist/components/toolbar/Toolbar.d.ts +1 -0
- package/dist/components/visualization/graph-node/GraphNode.d.ts +2 -2
- package/dist/components/visualization/graphPan.d.ts +12 -0
- package/dist/components/visualization/visualizationView.d.ts +2 -2
- package/dist/constants/language.d.ts +1 -1
- package/dist/constants/layout.d.ts +34 -0
- package/dist/constants/open.d.ts +3 -0
- package/dist/constants/schema.d.ts +25 -4
- package/dist/constants/sql/dataType/PostgreSQL.d.ts +2 -1
- package/dist/constants/sql/dataType/SQLite.d.ts +3 -1
- package/dist/engine/actions.d.ts +20 -2
- package/dist/engine/context.d.ts +6 -0
- package/dist/engine/index.js +26 -21
- package/dist/engine/modules/editor/actions.d.ts +10 -2
- package/dist/engine/modules/editor/atom.actions.d.ts +49 -11
- package/dist/engine/modules/editor/generator.actions.d.ts +107 -8
- package/dist/engine/modules/editor/state.d.ts +16 -3
- package/dist/engine/modules/editor/utils/color.d.ts +21 -0
- package/dist/engine/modules/editor/utils/duplicate.d.ts +28 -1
- package/dist/engine/modules/editor/utils/focus.d.ts +16 -0
- package/dist/engine/modules/editor/utils/releaseHidden.d.ts +16 -0
- package/dist/engine/modules/editor/utils/selection.d.ts +12 -0
- package/dist/engine/modules/relationship/actions.d.ts +6 -0
- package/dist/engine/modules/relationship/atom.actions.d.ts +57 -1
- package/dist/engine/modules/relationship/endFlags.d.ts +14 -0
- package/dist/engine/modules/relationship/fkColumns.d.ts +25 -6
- package/dist/engine/modules/relationship/history.d.ts +1 -0
- package/dist/engine/modules/relationship/hooks.d.ts +0 -11
- package/dist/engine/modules/relationship/referenceType.d.ts +12 -0
- package/dist/engine/modules/settings/actions.d.ts +17 -4
- package/dist/engine/modules/settings/atom.actions.d.ts +63 -19
- package/dist/engine/modules/settings/generator.actions.d.ts +7 -0
- package/dist/engine/modules/settings/history.d.ts +1 -0
- package/dist/engine/modules/table/actions.d.ts +8 -0
- package/dist/engine/modules/table/atom.actions.d.ts +31 -0
- package/dist/engine/modules/table/generator.actions.d.ts +3 -3
- package/dist/engine/modules/table/history.d.ts +1 -0
- package/dist/engine/modules/table-column/generator.actions.d.ts +8 -0
- package/dist/engine/modules/table-column/hooks.d.ts +0 -6
- package/dist/engine/modules/table-column/keys.d.ts +14 -0
- package/dist/engine/modules/table-column/utils/dataType.d.ts +19 -1
- package/dist/engine/modules/table-group/actions.d.ts +63 -0
- package/dist/engine/modules/table-group/atom.actions.d.ts +238 -0
- package/dist/engine/modules/table-group/generator.actions.d.ts +111 -0
- package/dist/engine/modules/table-group/history.d.ts +13 -0
- package/dist/engine/peer-store.d.ts +9 -3
- package/dist/engine/replication-store.d.ts +6 -3
- package/dist/engine/rx-operators/groupByStreamActions.d.ts +5 -1
- package/dist/engine/rx-operators/lockIgnoreFilter.d.ts +8 -0
- package/dist/engine/rx-store.d.ts +2 -0
- package/dist/engine/settle.d.ts +9 -0
- package/dist/engine/store-hooks.d.ts +0 -8
- package/dist/erd-editor.umd.js +2100 -4194
- package/dist/hooks/useNavigatorLanguages.d.ts +7 -0
- package/dist/i18n/locales.d.ts +126 -0
- package/dist/i18n/menuLabel.d.ts +12 -0
- package/dist/i18n/messages/ar-SA.d.ts +399 -0
- package/dist/i18n/messages/de-DE.d.ts +375 -0
- package/dist/i18n/messages/en/code.d.ts +17 -0
- package/dist/i18n/messages/en/colorPicker.d.ts +35 -0
- package/dist/i18n/messages/en/common.d.ts +65 -0
- package/dist/i18n/messages/en/contextMenu.d.ts +29 -0
- package/dist/i18n/messages/en/exportImage.d.ts +25 -0
- package/dist/i18n/messages/en/feedback.d.ts +11 -0
- package/dist/i18n/messages/en/findReplace.d.ts +36 -0
- package/dist/i18n/messages/en/floatingToolbar.d.ts +12 -0
- package/dist/i18n/messages/en/index.d.ts +378 -0
- package/dist/i18n/messages/en/mapColumns.d.ts +39 -0
- package/dist/i18n/messages/en/palette.d.ts +40 -0
- package/dist/i18n/messages/en/schemaSql.d.ts +28 -0
- package/dist/i18n/messages/en/settings.d.ts +22 -0
- package/dist/i18n/messages/en/shortcuts.d.ts +32 -0
- package/dist/i18n/messages/en/tableProperties.d.ts +34 -0
- package/dist/i18n/messages/en/themeBuilder.d.ts +7 -0
- package/dist/i18n/messages/en/toolbar.d.ts +9 -0
- package/dist/i18n/messages/en/visualization.d.ts +12 -0
- package/dist/i18n/messages/en/welcome.d.ts +13 -0
- package/dist/i18n/messages/es-ES.d.ts +381 -0
- package/dist/i18n/messages/eu-ES.d.ts +375 -0
- package/dist/i18n/messages/fa-IR.d.ts +375 -0
- package/dist/i18n/messages/fr-FR.d.ts +381 -0
- package/dist/i18n/messages/he-IL.d.ts +381 -0
- package/dist/i18n/messages/id-ID.d.ts +369 -0
- package/dist/i18n/messages/index.d.ts +11 -0
- package/dist/i18n/messages/it-IT.d.ts +381 -0
- package/dist/i18n/messages/ja-JP.d.ts +369 -0
- package/dist/i18n/messages/ko-KR.d.ts +369 -0
- package/dist/i18n/messages/nl-NL.d.ts +375 -0
- package/dist/i18n/messages/pl-PL.d.ts +387 -0
- package/dist/i18n/messages/pt-BR.d.ts +381 -0
- package/dist/i18n/messages/pt-PT.d.ts +381 -0
- package/dist/i18n/messages/ro-RO.d.ts +381 -0
- package/dist/i18n/messages/ru-RU.d.ts +387 -0
- package/dist/i18n/messages/sk-SK.d.ts +387 -0
- package/dist/i18n/messages/sl-SI.d.ts +387 -0
- package/dist/i18n/messages/sv-SE.d.ts +375 -0
- package/dist/i18n/messages/tr-TR.d.ts +375 -0
- package/dist/i18n/messages/uk-UA.d.ts +387 -0
- package/dist/i18n/messages/zh-CN.d.ts +369 -0
- package/dist/i18n/messages/zh-TW.d.ts +369 -0
- package/dist/i18n/resolveLocale.d.ts +11 -0
- package/dist/i18n/source.d.ts +7 -0
- package/dist/i18n/translate.d.ts +58 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +29797 -13894
- package/dist/internal-types/index.d.ts +2 -4
- package/dist/konva/scene/contentBounds.d.ts +18 -12
- package/dist/konva/scene/metrics.d.ts +2 -0
- package/dist/konva/scene/renderScene.d.ts +10 -4
- package/dist/konva/scene/stacking.d.ts +21 -0
- package/dist/konva/scene/viewLayout.d.ts +2 -1
- package/dist/loadValue-B3EFSe9k.js +12925 -0
- package/dist/peer/index.d.ts +6 -3
- package/dist/peer/index.js +83 -76
- package/dist/services/elk-layout/elkGraph.d.ts +6 -4
- package/dist/services/elk-layout/elkLayoutOptions.d.ts +20 -0
- package/dist/services/elk-layout/elkLayoutService.d.ts +3 -3
- package/dist/services/export-png/ExportScene.d.ts +3 -3
- package/dist/services/export-png/documentScene.d.ts +14 -9
- package/dist/services/export-png/exportBox.d.ts +40 -5
- package/dist/services/export-png/exportPngService.d.ts +15 -0
- package/dist/services/export-png/exportTheme.d.ts +26 -0
- package/dist/services/export-png/index.d.ts +44 -11
- package/dist/services/export-png/renderPng.d.ts +18 -10
- package/dist/services/export-png/renderSvg.d.ts +22 -0
- package/dist/services/export-png/sceneSvg.d.ts +54 -0
- package/dist/services/shiki/graphqlGrammar.d.ts +8 -0
- package/dist/shared-store-fUggY7sI.js +1341 -0
- package/dist/themes/radix-ui-theme.d.ts +11 -3
- package/dist/themes/tokens.d.ts +9 -0
- package/dist/utils/calcTable.d.ts +9 -0
- package/dist/utils/clipboard.d.ts +9 -0
- package/dist/utils/collection/tableGroup.entity.d.ts +3 -0
- package/dist/utils/contrastText.d.ts +21 -0
- package/dist/utils/deepMerge.d.ts +8 -0
- package/dist/utils/device-detect/index.d.ts +2 -6
- package/dist/utils/domEvent.d.ts +18 -0
- package/dist/utils/dragSelect.d.ts +2 -0
- package/dist/utils/draw-relationship/bezier.d.ts +2 -0
- package/dist/utils/draw-relationship/corner.d.ts +9 -0
- package/dist/utils/draw-relationship/index.d.ts +18 -18
- package/dist/utils/draw-relationship/loop.d.ts +29 -0
- package/dist/utils/draw-relationship/pathFinding.d.ts +1 -1
- package/dist/utils/draw-relationship/sort.d.ts +8 -1
- package/dist/utils/draw-relationship/stub.d.ts +4 -3
- package/dist/utils/emitter.d.ts +53 -6
- package/dist/utils/file/exportFile.d.ts +15 -5
- package/dist/utils/file/importFile.d.ts +9 -5
- package/dist/utils/file/importSchema.d.ts +45 -0
- package/dist/utils/find-replace/findMatches.d.ts +1 -1
- package/dist/utils/find-replace/present.d.ts +5 -3
- package/dist/utils/generator-code/columnTypes.d.ts +99 -0
- package/dist/utils/generator-code/doctrine.d.ts +6 -0
- package/dist/utils/generator-code/doctrineReservedWords.d.ts +7 -0
- package/dist/utils/generator-code/graphql.d.ts +6 -0
- package/dist/utils/generator-code/heck.d.ts +5 -0
- package/dist/utils/generator-code/java.d.ts +28 -0
- package/dist/utils/generator-code/jsonSchema.d.ts +50 -0
- package/dist/utils/generator-code/jsonShape.d.ts +37 -0
- package/dist/utils/generator-code/kotlin.d.ts +1 -0
- package/dist/utils/generator-code/mermaid.d.ts +5 -0
- package/dist/utils/generator-code/php.d.ts +28 -0
- package/dist/utils/generator-code/rust.d.ts +13 -0
- package/dist/utils/generator-code/rustTypes.d.ts +44 -0
- package/dist/utils/generator-code/scala.d.ts +1 -0
- package/dist/utils/generator-code/seaorm.d.ts +22 -0
- package/dist/utils/generator-code/swift.d.ts +44 -0
- package/dist/utils/generator-code/utils.d.ts +19 -0
- package/dist/utils/generator-code/zod.d.ts +25 -0
- package/dist/utils/globalEventObservable.d.ts +10 -1
- package/dist/utils/highlightWords.d.ts +29 -0
- package/dist/utils/index.d.ts +1 -2
- package/dist/utils/keyboard-shortcut/bindKeys.d.ts +9 -0
- package/dist/utils/keyboard-shortcut/index.d.ts +11 -4
- package/dist/utils/keyboard-shortcut/utils.d.ts +21 -0
- package/dist/utils/map-columns/alignTypes.d.ts +37 -0
- package/dist/utils/map-columns/buildRows.d.ts +102 -0
- package/dist/utils/map-columns/candidateKeys.d.ts +24 -0
- package/dist/utils/map-columns/index.d.ts +8 -0
- package/dist/utils/map-columns/mapping.d.ts +67 -0
- package/dist/utils/map-columns/prefill.d.ts +26 -0
- package/dist/utils/map-columns/toMapColumnsActions.d.ts +10 -0
- package/dist/utils/map-columns/validate.d.ts +45 -0
- package/dist/utils/memo.d.ts +4 -0
- package/dist/utils/schema-aml-parser/types.d.ts +2 -0
- package/dist/utils/schema-dbml-parser/tokenizer.d.ts +2 -0
- package/dist/utils/schema-dbml-parser/types.d.ts +11 -0
- package/dist/utils/schema-sql/Databricks.d.ts +8 -3
- package/dist/utils/schema-sql/MSSQL.d.ts +14 -2
- package/dist/utils/schema-sql/MariaDB.d.ts +6 -5
- package/dist/utils/schema-sql/MySQL.d.ts +13 -4
- package/dist/utils/schema-sql/Oracle.d.ts +19 -5
- package/dist/utils/schema-sql/PostgreSQL.d.ts +16 -4
- package/dist/utils/schema-sql/SQLite.d.ts +16 -4
- package/dist/utils/schema-sql/Snowflake.d.ts +8 -3
- package/dist/utils/schema-sql/index.d.ts +16 -1
- package/dist/utils/schema-sql/options.d.ts +57 -0
- package/dist/utils/schema-sql/utils.d.ts +101 -2
- package/dist/utils/stageCursor.d.ts +20 -0
- package/dist/utils/table-clipboard/placement.d.ts +2 -0
- package/dist/utils/tableColor.d.ts +29 -0
- package/dist/utils/tableGroup.d.ts +142 -0
- package/dist/utils/tableKeys.d.ts +11 -3
- package/dist/workers/elkLayout.shared-worker.js +1 -1
- package/dist/workers/exportPng.shared-worker.js +30 -30
- package/dist/workers/shiki.shared-worker.js +1 -1
- package/dist/workers/spawn.d.ts +1 -2
- package/dist/workers/spawn.inline.d.ts +0 -1
- package/package.json +6 -13
- package/dist/components/generator-code/GeneratorCode.styles.d.ts +0 -2
- package/dist/loadValue-Mdc5K4qO.js +0 -10858
- package/dist/schemaGCService-CZtGFh2z.js +0 -42
- package/dist/services/schema-gc/index.d.ts +0 -18
- package/dist/services/schema-gc/procGC.d.ts +0 -4
- package/dist/services/schema-gc/schemaGC.shared-worker.d.ts +0 -2
- package/dist/services/schema-gc/schemaGCService.d.ts +0 -10
- package/dist/shared-store-D82WVL5a.js +0 -1129
- package/dist/styles/colorPicker.style.d.ts +0 -7
- package/dist/utils/draw-relationship/chamfer.d.ts +0 -3
- package/dist/workers/schemaGC.shared-worker.js +0 -1
package/dist/engine/index.js
CHANGED
|
@@ -1,40 +1,45 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { omit as
|
|
4
|
-
import { Observable as h, Subject as g, debounceTime as _, map as v } from "rxjs";
|
|
1
|
+
import { $ as e, Bo as t, Jn as n, c as r, ds as i, mn as a, n as o, ps as s, r as c, t as l, u, v as d, y as f } from "../loadValue-B3EFSe9k.js";
|
|
2
|
+
import { Observable as p, Subject as m, debounceTime as h, map as g } from "rxjs";
|
|
3
|
+
import { omit as _ } from "es-toolkit";
|
|
5
4
|
//#region src/engine/replication-store.ts
|
|
6
|
-
var y = { change: "change" };
|
|
7
|
-
function b(
|
|
8
|
-
let
|
|
9
|
-
|
|
5
|
+
var v = t(f), y = { change: "change" };
|
|
6
|
+
function b(t) {
|
|
7
|
+
let b = /* @__PURE__ */ new Set(), x = u({
|
|
8
|
+
...t,
|
|
9
|
+
routes: !1
|
|
10
|
+
}), { clock: S } = x, C = c(x, !1);
|
|
11
|
+
C.dispatchSync(n({
|
|
10
12
|
width: 0,
|
|
11
13
|
height: 0
|
|
12
14
|
}));
|
|
13
|
-
let w =
|
|
15
|
+
let w = o(C), T = new m(), E = new p((e) => C.subscribe((t) => e.next(t))).pipe(r(f), h(200)), D = /* @__PURE__ */ new Set(), O = null, k = (e) => (D.has(e) || D.add(e), () => {
|
|
14
16
|
D.delete(e);
|
|
15
17
|
}), A = (e, t) => {
|
|
16
18
|
D.forEach((n) => {
|
|
17
19
|
let r = Reflect.get(n, e);
|
|
18
|
-
|
|
20
|
+
a(r, t);
|
|
19
21
|
});
|
|
20
|
-
}, j = (
|
|
21
|
-
O = null, C.dispatchSync(
|
|
22
|
-
let n = f(t(C.state));
|
|
23
|
-
Object.values(n).some((e) => e.length) && (p(C.state, n), C.dispatchSync(r())), s(C.state, S);
|
|
22
|
+
}, j = (t) => {
|
|
23
|
+
O = null, C.dispatchSync(e(l(t)));
|
|
24
24
|
}, M = (e) => {
|
|
25
25
|
T.next([e].flat());
|
|
26
26
|
};
|
|
27
|
-
return
|
|
28
|
-
let e =
|
|
27
|
+
return b.add(E.subscribe(() => {
|
|
28
|
+
let e = i(C.state), t = O !== null && e !== O;
|
|
29
29
|
O !== null && (O = e), A(y.change, {
|
|
30
30
|
value: e,
|
|
31
|
-
changed:
|
|
31
|
+
changed: t
|
|
32
32
|
});
|
|
33
|
-
})).add(T.pipe(
|
|
34
|
-
O ??=
|
|
33
|
+
})).add(T.pipe(r(d), g((e) => e.map((e) => _(e, ["tags"])))).subscribe((e) => {
|
|
34
|
+
e.some(({ type: e }) => v(e)) && (O ??= i(C.state));
|
|
35
|
+
let t = S.getNextVersion();
|
|
36
|
+
e.forEach((e) => e.version ??= t), C.dispatchSync(e), e.forEach((e) => S.merge(e.version));
|
|
35
37
|
})), Object.freeze({
|
|
36
38
|
get value() {
|
|
37
|
-
return
|
|
39
|
+
return i(C.state);
|
|
40
|
+
},
|
|
41
|
+
get runtimeValue() {
|
|
42
|
+
return s(C.state);
|
|
38
43
|
},
|
|
39
44
|
on: k,
|
|
40
45
|
setInitialValue: j,
|
|
@@ -43,7 +48,7 @@ function b(b) {
|
|
|
43
48
|
},
|
|
44
49
|
dispatchSync: M,
|
|
45
50
|
destroy: () => {
|
|
46
|
-
Array.from(
|
|
51
|
+
Array.from(b).forEach((e) => e.unsubscribe()), b.clear(), D.clear(), C.destroy(), w.destroy();
|
|
47
52
|
}
|
|
48
53
|
});
|
|
49
54
|
}
|
|
@@ -22,6 +22,8 @@ export declare const ActionType: {
|
|
|
22
22
|
readonly editTableEnd: "editor.editTableEnd";
|
|
23
23
|
readonly editMemo: "editor.editMemo";
|
|
24
24
|
readonly editMemoEnd: "editor.editMemoEnd";
|
|
25
|
+
readonly editTableGroup: "editor.editTableGroup";
|
|
26
|
+
readonly editTableGroupEnd: "editor.editTableGroupEnd";
|
|
25
27
|
readonly scrollMemo: "editor.scrollMemo";
|
|
26
28
|
readonly selectAllColumn: "editor.selectAllColumn";
|
|
27
29
|
readonly drawStartRelationship: "editor.drawStartRelationship";
|
|
@@ -32,6 +34,7 @@ export declare const ActionType: {
|
|
|
32
34
|
readonly hoverRelationshipMap: "editor.hoverRelationshipMap";
|
|
33
35
|
readonly changeOpenMap: "editor.changeOpenMap";
|
|
34
36
|
readonly changeHandTool: "editor.changeHandTool";
|
|
37
|
+
readonly changeDrawTableGroup: "editor.changeDrawTableGroup";
|
|
35
38
|
readonly changeZenMode: "editor.changeZenMode";
|
|
36
39
|
readonly dragstartColumn: "editor.dragstartColumn";
|
|
37
40
|
readonly dragendColumn: "editor.dragendColumn";
|
|
@@ -40,7 +43,6 @@ export declare const ActionType: {
|
|
|
40
43
|
readonly sharedSelectionTracker: "editor.sharedSelectionTracker";
|
|
41
44
|
readonly sharedDragSelectTracker: "editor.sharedDragSelectTracker";
|
|
42
45
|
readonly dragSelectRect: "editor.dragSelectRect";
|
|
43
|
-
readonly validationIds: "editor.validationIds";
|
|
44
46
|
readonly getLWW: "editor.getLWW";
|
|
45
47
|
readonly mergeLWW: "editor.mergeLWW";
|
|
46
48
|
readonly viewOpen: "editor.viewOpen";
|
|
@@ -98,6 +100,10 @@ export type ActionMap = {
|
|
|
98
100
|
id: string;
|
|
99
101
|
};
|
|
100
102
|
[ActionType.editMemoEnd]: void;
|
|
103
|
+
[ActionType.editTableGroup]: {
|
|
104
|
+
id: string;
|
|
105
|
+
};
|
|
106
|
+
[ActionType.editTableGroupEnd]: void;
|
|
101
107
|
[ActionType.scrollMemo]: {
|
|
102
108
|
id: string;
|
|
103
109
|
/** How far down its body the memo is shown from, in body px. */
|
|
@@ -125,6 +131,9 @@ export type ActionMap = {
|
|
|
125
131
|
[ActionType.changeHandTool]: {
|
|
126
132
|
value: boolean;
|
|
127
133
|
};
|
|
134
|
+
[ActionType.changeDrawTableGroup]: {
|
|
135
|
+
value: boolean;
|
|
136
|
+
};
|
|
128
137
|
[ActionType.changeZenMode]: {
|
|
129
138
|
value: boolean;
|
|
130
139
|
};
|
|
@@ -149,7 +158,6 @@ export type ActionMap = {
|
|
|
149
158
|
[ActionType.dragSelectRect]: {
|
|
150
159
|
rect: Rect | null;
|
|
151
160
|
};
|
|
152
|
-
[ActionType.validationIds]: void;
|
|
153
161
|
[ActionType.getLWW]: void;
|
|
154
162
|
[ActionType.mergeLWW]: {
|
|
155
163
|
lww: LWW;
|
|
@@ -135,6 +135,20 @@ export declare const editMemoEndAction: {
|
|
|
135
135
|
toString(): string;
|
|
136
136
|
type: string;
|
|
137
137
|
};
|
|
138
|
+
export declare const editTableGroupAction: {
|
|
139
|
+
(payload: {
|
|
140
|
+
id: string;
|
|
141
|
+
}): import('@dineug/r-html').AnyAction<{
|
|
142
|
+
id: string;
|
|
143
|
+
}>;
|
|
144
|
+
toString(): string;
|
|
145
|
+
type: string;
|
|
146
|
+
};
|
|
147
|
+
export declare const editTableGroupEndAction: {
|
|
148
|
+
(payload: void): import('@dineug/r-html').AnyAction<void>;
|
|
149
|
+
toString(): string;
|
|
150
|
+
type: string;
|
|
151
|
+
};
|
|
138
152
|
export declare const scrollMemoAction: {
|
|
139
153
|
(payload: {
|
|
140
154
|
id: string;
|
|
@@ -217,6 +231,15 @@ export declare const changeHandToolAction: {
|
|
|
217
231
|
toString(): string;
|
|
218
232
|
type: string;
|
|
219
233
|
};
|
|
234
|
+
export declare const changeDrawTableGroupAction: {
|
|
235
|
+
(payload: {
|
|
236
|
+
value: boolean;
|
|
237
|
+
}): import('@dineug/r-html').AnyAction<{
|
|
238
|
+
value: boolean;
|
|
239
|
+
}>;
|
|
240
|
+
toString(): string;
|
|
241
|
+
type: string;
|
|
242
|
+
};
|
|
220
243
|
export declare const changeZenModeAction: {
|
|
221
244
|
(payload: {
|
|
222
245
|
value: boolean;
|
|
@@ -289,11 +312,6 @@ export declare const dragSelectRectAction: {
|
|
|
289
312
|
toString(): string;
|
|
290
313
|
type: string;
|
|
291
314
|
};
|
|
292
|
-
export declare const validationIdsAction: {
|
|
293
|
-
(payload: void): import('@dineug/r-html').AnyAction<void>;
|
|
294
|
-
toString(): string;
|
|
295
|
-
type: string;
|
|
296
|
-
};
|
|
297
315
|
export declare const getLWWAction: {
|
|
298
316
|
(payload: void): import('@dineug/r-html').AnyAction<void>;
|
|
299
317
|
toString(): string;
|
|
@@ -337,6 +355,8 @@ export declare const editorReducers: {
|
|
|
337
355
|
"editor.editTableEnd": ReducerType<"editor.editTableEnd">;
|
|
338
356
|
"editor.editMemo": ReducerType<"editor.editMemo">;
|
|
339
357
|
"editor.editMemoEnd": ReducerType<"editor.editMemoEnd">;
|
|
358
|
+
"editor.editTableGroup": ReducerType<"editor.editTableGroup">;
|
|
359
|
+
"editor.editTableGroupEnd": ReducerType<"editor.editTableGroupEnd">;
|
|
340
360
|
"editor.scrollMemo": ReducerType<"editor.scrollMemo">;
|
|
341
361
|
"editor.selectAllColumn": ReducerType<"editor.selectAllColumn">;
|
|
342
362
|
"editor.drawStartRelationship": ReducerType<"editor.drawStartRelationship">;
|
|
@@ -347,6 +367,7 @@ export declare const editorReducers: {
|
|
|
347
367
|
"editor.hoverRelationshipMap": ReducerType<"editor.hoverRelationshipMap">;
|
|
348
368
|
"editor.changeOpenMap": ReducerType<"editor.changeOpenMap">;
|
|
349
369
|
"editor.changeHandTool": ReducerType<"editor.changeHandTool">;
|
|
370
|
+
"editor.changeDrawTableGroup": ReducerType<"editor.changeDrawTableGroup">;
|
|
350
371
|
"editor.changeZenMode": ReducerType<"editor.changeZenMode">;
|
|
351
372
|
"editor.dragstartColumn": ReducerType<"editor.dragstartColumn">;
|
|
352
373
|
"editor.dragendColumn": ReducerType<"editor.dragendColumn">;
|
|
@@ -355,7 +376,6 @@ export declare const editorReducers: {
|
|
|
355
376
|
"editor.sharedSelectionTracker": ReducerType<"editor.sharedSelectionTracker">;
|
|
356
377
|
"editor.sharedDragSelectTracker": ReducerType<"editor.sharedDragSelectTracker">;
|
|
357
378
|
"editor.dragSelectRect": ReducerType<"editor.dragSelectRect">;
|
|
358
|
-
"editor.validationIds": ReducerType<"editor.validationIds">;
|
|
359
379
|
"editor.getLWW": ReducerType<"editor.getLWW">;
|
|
360
380
|
"editor.mergeLWW": ReducerType<"editor.mergeLWW">;
|
|
361
381
|
};
|
|
@@ -618,6 +638,20 @@ export declare const actions: {
|
|
|
618
638
|
toString(): string;
|
|
619
639
|
type: string;
|
|
620
640
|
};
|
|
641
|
+
editTableGroupAction: {
|
|
642
|
+
(payload: {
|
|
643
|
+
id: string;
|
|
644
|
+
}): import('@dineug/r-html').AnyAction<{
|
|
645
|
+
id: string;
|
|
646
|
+
}>;
|
|
647
|
+
toString(): string;
|
|
648
|
+
type: string;
|
|
649
|
+
};
|
|
650
|
+
editTableGroupEndAction: {
|
|
651
|
+
(payload: void): import('@dineug/r-html').AnyAction<void>;
|
|
652
|
+
toString(): string;
|
|
653
|
+
type: string;
|
|
654
|
+
};
|
|
621
655
|
scrollMemoAction: {
|
|
622
656
|
(payload: {
|
|
623
657
|
id: string;
|
|
@@ -700,6 +734,15 @@ export declare const actions: {
|
|
|
700
734
|
toString(): string;
|
|
701
735
|
type: string;
|
|
702
736
|
};
|
|
737
|
+
changeDrawTableGroupAction: {
|
|
738
|
+
(payload: {
|
|
739
|
+
value: boolean;
|
|
740
|
+
}): import('@dineug/r-html').AnyAction<{
|
|
741
|
+
value: boolean;
|
|
742
|
+
}>;
|
|
743
|
+
toString(): string;
|
|
744
|
+
type: string;
|
|
745
|
+
};
|
|
703
746
|
changeZenModeAction: {
|
|
704
747
|
(payload: {
|
|
705
748
|
value: boolean;
|
|
@@ -772,11 +815,6 @@ export declare const actions: {
|
|
|
772
815
|
toString(): string;
|
|
773
816
|
type: string;
|
|
774
817
|
};
|
|
775
|
-
validationIdsAction: {
|
|
776
|
-
(payload: void): import('@dineug/r-html').AnyAction<void>;
|
|
777
|
-
toString(): string;
|
|
778
|
-
type: string;
|
|
779
|
-
};
|
|
780
818
|
getLWWAction: {
|
|
781
819
|
(payload: void): import('@dineug/r-html').AnyAction<void>;
|
|
782
820
|
toString(): string;
|
|
@@ -1,17 +1,32 @@
|
|
|
1
|
+
import { ERDEditorSchemaV3 } from '@dineug/erd-editor-schema';
|
|
2
|
+
import { EngineContext } from '../../context';
|
|
1
3
|
import { GeneratorAction } from '../../generator.actions';
|
|
4
|
+
import { RootState } from '../../state';
|
|
2
5
|
import { Point } from '../../../internal-types';
|
|
3
|
-
import {
|
|
6
|
+
import { TableMove } from '../../../konva/scene/contentBounds';
|
|
7
|
+
import { Rect } from '../../../konva/scene/metrics';
|
|
8
|
+
import { Rect as DragRect } from '../../../utils/dragSelect';
|
|
4
9
|
import { GeometrySource } from '../../../utils/draw-relationship/geometrySource';
|
|
5
10
|
import { ClipboardPayload } from '../../../utils/table-clipboard';
|
|
6
11
|
import { MoveKey } from './state';
|
|
12
|
+
import { CreateEntityActions } from './utils/duplicate';
|
|
7
13
|
export declare const loadJsonAction$: (value: string) => GeneratorAction;
|
|
8
14
|
export declare const initialLoadJsonAction$: (value: string) => GeneratorAction;
|
|
9
15
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
16
|
+
* One drag of the selection: the document groups and tables it carries, read at its first step and
|
|
17
|
+
* kept to its last, since steps summed per list would split if a peer changed a group's members, or
|
|
18
|
+
* hid the groups and so took them out of the selection, midway.
|
|
13
19
|
*/
|
|
14
|
-
export
|
|
20
|
+
export type MoveAllGesture = {
|
|
21
|
+
tableGroupIds?: string[];
|
|
22
|
+
tableIds?: string[];
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Moves the selection by a pointer step the scene's zoom scales, a selected
|
|
26
|
+
* group carrying its members, each table once. From a view scene the step goes
|
|
27
|
+
* to that view's own placement, which holds tables alone, the document's kept.
|
|
28
|
+
*/
|
|
29
|
+
export declare const moveAllAction$: (movementX: number, movementY: number, source?: GeometrySource, gesture?: MoveAllGesture) => GeneratorAction;
|
|
15
30
|
export declare const removeSelectedAction$: () => GeneratorAction;
|
|
16
31
|
export type DuplicateConfig = {
|
|
17
32
|
tableIds?: string[];
|
|
@@ -21,17 +36,98 @@ export type DuplicateConfig = {
|
|
|
21
36
|
};
|
|
22
37
|
export declare const pasteEntitiesAction$: (payload: ClipboardPayload, pasteRound: number) => GeneratorAction;
|
|
23
38
|
export declare const duplicateAction$: ({ tableIds, memoIds, offset, escapeCollision, }: DuplicateConfig) => GeneratorAction;
|
|
39
|
+
/**
|
|
40
|
+
* Where the tables of a document an append brings take their points from,
|
|
41
|
+
* before the block they make goes under the diagram: as the file has them, as
|
|
42
|
+
* the grid an import lands in has them, or as a placement answered them.
|
|
43
|
+
*/
|
|
44
|
+
export type AppendLayout = 'file' | 'grid' | ReadonlyArray<TableMove>;
|
|
45
|
+
/** What an append adds: its actions, the new ids, and the box they make where they land. */
|
|
46
|
+
export type SchemaAppend = CreateEntityActions & {
|
|
47
|
+
rect: Rect;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* An import's document with each table at its point in the grid and each group
|
|
51
|
+
* with members round them, written into the text it loads: every peer takes the
|
|
52
|
+
* points the sender laid out, where a sort replayed would measure with its own fonts.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* store.dispatchSync(loadJsonAction$(withGridPoints(json, store.state, ctx)));
|
|
56
|
+
*/
|
|
57
|
+
export declare function withGridPoints(json: string, state: RootState, ctx: EngineContext): string;
|
|
58
|
+
/**
|
|
59
|
+
* A document's tables, relationships, indexes and memos as new entities of this
|
|
60
|
+
* one, made as a paste makes them with no field at its default sent, their block
|
|
61
|
+
* a gap under the diagram. Null for unreadable text or a document holding nothing.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* const append = toSchemaAppend(state, json, 'grid', ctx);
|
|
65
|
+
*/
|
|
66
|
+
export declare function toSchemaAppend(state: RootState, json: string, layout: AppendLayout, ctx: EngineContext): SchemaAppend | null;
|
|
67
|
+
/**
|
|
68
|
+
* Adds a document read from a file below the diagram as new entities in one undo
|
|
69
|
+
* step, leaving the tables already there and every setting as they are; unreadable
|
|
70
|
+
* text, or a document holding nothing, adds nothing.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* store.dispatch(appendSchemaJsonAction$(json, 'file'));
|
|
74
|
+
*/
|
|
75
|
+
export declare const appendSchemaJsonAction$: (json: string, layout?: AppendLayout) => GeneratorAction;
|
|
76
|
+
/**
|
|
77
|
+
* Adds a schema read from SQL, GraphQL, DBML or AML to this document, its
|
|
78
|
+
* tables laid out in the grid below the diagram, as appendSchemaJsonAction$
|
|
79
|
+
* adds a document.
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* store.dispatch(appendSchemaAction$('sql', value));
|
|
83
|
+
*/
|
|
84
|
+
export declare const appendSchemaAction$: (type: SchemaImportType, value: string) => GeneratorAction;
|
|
24
85
|
/**
|
|
25
86
|
* Selects what the rect covers among what the source shows, each entity read
|
|
26
87
|
* at the point and the size that source draws it: a view places its tables
|
|
27
88
|
* and shows no memo, so a marquee drawn over it picks by the view, not the document.
|
|
28
89
|
*/
|
|
29
|
-
export declare const dragSelectAction$: (dragRect:
|
|
90
|
+
export declare const dragSelectAction$: (dragRect: DragRect, source?: GeometrySource) => GeneratorAction;
|
|
30
91
|
export declare const unselectAllAction$: () => GeneratorAction;
|
|
31
92
|
export declare const focusMoveTableAction$: (moveKey: MoveKey, shiftKey: boolean) => GeneratorAction;
|
|
32
93
|
export declare const drawStartRelationshipAction$: (relationshipType: number) => GeneratorAction;
|
|
33
94
|
export declare const drawStartAddRelationshipAction$: (tableId: string) => GeneratorAction;
|
|
95
|
+
/**
|
|
96
|
+
* Paints every selected table, memo and group the color, sending nothing for
|
|
97
|
+
* one that already is, in any letter case, so a color pressed again adds no
|
|
98
|
+
* undo entry while one an undo took back is painted again; one stream group.
|
|
99
|
+
*/
|
|
34
100
|
export declare const changeColorAllAction$: (color: string) => GeneratorAction;
|
|
101
|
+
/**
|
|
102
|
+
* Clears the color of every selected table, memo and group that has one: one
|
|
103
|
+
* stream group, so one undo entry, and none for a selection that has no color.
|
|
104
|
+
*/
|
|
105
|
+
export declare const removeColorAllAction$: () => GeneratorAction;
|
|
106
|
+
/** The four text formats an import parses into a document of its own. */
|
|
107
|
+
export type SchemaImportType = 'sql' | 'graphql' | 'dbml' | 'aml';
|
|
108
|
+
/**
|
|
109
|
+
* Writes the settings of the document an import replaces over the parser's,
|
|
110
|
+
* all but the view, locks included, the view locked where the parser left it.
|
|
111
|
+
* A placed import writes them again as it lands.
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* withImportSettings(schema, store.state.settings);
|
|
115
|
+
*/
|
|
116
|
+
export declare function withImportSettings(schema: Pick<ERDEditorSchemaV3, 'settings'>, settings: RootState['settings']): void;
|
|
117
|
+
/**
|
|
118
|
+
* The document an import parses to, carrying the settings of the one it
|
|
119
|
+
* replaces. Its tables still stand where the parser left them: the grid or a
|
|
120
|
+
* placement decides where they go.
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* const json = toSchemaImportJson('sql', value, store.state, ctx);
|
|
124
|
+
*/
|
|
125
|
+
export declare function toSchemaImportJson(type: SchemaImportType, value: string, { settings }: RootState, ctx: EngineContext): string;
|
|
126
|
+
/**
|
|
127
|
+
* The load each of the four text imports runs: the parsed document replaces
|
|
128
|
+
* this one, its tables at the points the grid gives them here.
|
|
129
|
+
*/
|
|
130
|
+
export declare const loadSchemaAction$: (type: SchemaImportType, value: string) => GeneratorAction;
|
|
35
131
|
export declare const loadSchemaSQLAction$: (value: string) => GeneratorAction;
|
|
36
132
|
export declare const loadSchemaGraphQLAction$: (value: string) => GeneratorAction;
|
|
37
133
|
export declare const loadSchemaDBMLAction$: (value: string) => GeneratorAction;
|
|
@@ -45,20 +141,23 @@ export declare const actions$: {
|
|
|
45
141
|
focusFlowTableAction$: (tableIds: string[]) => GeneratorAction;
|
|
46
142
|
loadJsonAction$: (value: string) => GeneratorAction;
|
|
47
143
|
initialLoadJsonAction$: (value: string) => GeneratorAction;
|
|
48
|
-
moveAllAction$: (movementX: number, movementY: number, source?: GeometrySource) => GeneratorAction;
|
|
144
|
+
moveAllAction$: (movementX: number, movementY: number, source?: GeometrySource, gesture?: MoveAllGesture) => GeneratorAction;
|
|
49
145
|
removeSelectedAction$: () => GeneratorAction;
|
|
50
146
|
pasteEntitiesAction$: (payload: ClipboardPayload, pasteRound: number) => GeneratorAction;
|
|
51
147
|
duplicateAction$: ({ tableIds, memoIds, offset, escapeCollision, }: DuplicateConfig) => GeneratorAction;
|
|
52
|
-
dragSelectAction$: (dragRect:
|
|
148
|
+
dragSelectAction$: (dragRect: DragRect, source?: GeometrySource) => GeneratorAction;
|
|
53
149
|
unselectAllAction$: () => GeneratorAction;
|
|
54
150
|
focusMoveTableAction$: (moveKey: MoveKey, shiftKey: boolean) => GeneratorAction;
|
|
55
151
|
drawStartRelationshipAction$: (relationshipType: number) => GeneratorAction;
|
|
56
152
|
drawStartAddRelationshipAction$: (tableId: string) => GeneratorAction;
|
|
57
153
|
changeColorAllAction$: (color: string) => GeneratorAction;
|
|
154
|
+
removeColorAllAction$: () => GeneratorAction;
|
|
58
155
|
loadSchemaSQLAction$: (value: string) => GeneratorAction;
|
|
59
156
|
loadSchemaGraphQLAction$: (value: string) => GeneratorAction;
|
|
60
157
|
loadSchemaDBMLAction$: (value: string) => GeneratorAction;
|
|
61
158
|
loadSchemaAMLAction$: (value: string) => GeneratorAction;
|
|
159
|
+
appendSchemaAction$: (type: SchemaImportType, value: string) => GeneratorAction;
|
|
160
|
+
appendSchemaJsonAction$: (json: string, layout?: AppendLayout) => GeneratorAction;
|
|
62
161
|
dragstartColumnAction$: ($mod: boolean) => GeneratorAction;
|
|
63
162
|
dragoverColumnAction$: (targetId: string | null, targetTableId: string) => GeneratorAction;
|
|
64
163
|
columnKeyHoverStartAction$: (columnId: string) => GeneratorAction;
|
|
@@ -15,6 +15,8 @@ export type Editor = {
|
|
|
15
15
|
focusTable: FocusTable | null;
|
|
16
16
|
/** The memo whose body an overlay editor is open on, and null while none is. */
|
|
17
17
|
editMemoId: string | null;
|
|
18
|
+
/** The table group whose name an overlay editor is open on, and null while none is. */
|
|
19
|
+
editTableGroupId: string | null;
|
|
18
20
|
/**
|
|
19
21
|
* How far down its body each memo is shown from, by memo id. The scene and
|
|
20
22
|
* the overlay editor both read it, so the lines a body shows survive the
|
|
@@ -27,6 +29,11 @@ export type Editor = {
|
|
|
27
29
|
openMap: Record<string, boolean>;
|
|
28
30
|
/** Whether the pointer pans the canvas instead of reaching the scene under it. */
|
|
29
31
|
handTool: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Whether the next main press on the canvas draws a table group instead of
|
|
34
|
+
* reaching the scene under it. Local to this client, never the file or a peer.
|
|
35
|
+
*/
|
|
36
|
+
drawTableGroup: boolean;
|
|
30
37
|
/** Whether the editor is drawn without its scrollbars, its map and its toolbar. */
|
|
31
38
|
zenMode: boolean;
|
|
32
39
|
draggableColumn: DraggableColumn | null;
|
|
@@ -44,6 +51,11 @@ export type Editor = {
|
|
|
44
51
|
views: EditorViews;
|
|
45
52
|
/** Which of its two modes the visualization tab shows. Remembered for the session. */
|
|
46
53
|
visualizationMode: VisualizationMode;
|
|
54
|
+
/**
|
|
55
|
+
* The last tab the reader left for another, Settings never among them: the
|
|
56
|
+
* one a canvas type lock taken on the Settings tab holds.
|
|
57
|
+
*/
|
|
58
|
+
lastCanvasType: string;
|
|
47
59
|
};
|
|
48
60
|
export type Viewport = {
|
|
49
61
|
width: number;
|
|
@@ -96,6 +108,7 @@ export type SharedDragSelectTracker = Rect & {
|
|
|
96
108
|
export declare const SelectType: {
|
|
97
109
|
readonly table: "table";
|
|
98
110
|
readonly memo: "memo";
|
|
111
|
+
readonly tableGroup: "tableGroup";
|
|
99
112
|
};
|
|
100
113
|
export type SelectType = ValuesType<typeof SelectType>;
|
|
101
114
|
export declare const ShowMode: {
|
|
@@ -159,9 +172,9 @@ export declare const hasMoveKeys: (value: string) => boolean;
|
|
|
159
172
|
*/
|
|
160
173
|
export declare const isEditingMemo: ({ editMemoId }: Editor) => boolean;
|
|
161
174
|
/**
|
|
162
|
-
* Whether a live text editor owns the keyboard. A memo body
|
|
163
|
-
*
|
|
164
|
-
*
|
|
175
|
+
* Whether a live text editor owns the keyboard. A memo body, a table cell and a
|
|
176
|
+
* table group's name each open a real input over the scene, so a canvas
|
|
177
|
+
* shortcut stands down for any of them rather than for the cell alone.
|
|
165
178
|
*/
|
|
166
179
|
export declare const isEditingText: (editor: Editor) => boolean;
|
|
167
180
|
export declare const createEditor: () => Editor;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { RootState } from '../../../state';
|
|
2
|
+
import { Memo, Table, TableGroup } from '../../../../internal-types';
|
|
3
|
+
type ColorTargets = {
|
|
4
|
+
tables: Table[];
|
|
5
|
+
memos: Memo[];
|
|
6
|
+
tableGroups: TableGroup[];
|
|
7
|
+
};
|
|
8
|
+
/** The selected tables, memos and table groups, the whole of what the color picker paints. */
|
|
9
|
+
export declare function getColorTargets({ editor: { selectedMap }, collections, }: RootState): ColorTargets;
|
|
10
|
+
/** The color targets that carry a color, which is all Remove color reaches. */
|
|
11
|
+
export declare function getColoredSelection(state: RootState): ColorTargets;
|
|
12
|
+
/** Whether any selected table, memo or group carries a color, which the menus' Remove color shows on. */
|
|
13
|
+
export declare function hasColoredSelection(state: RootState): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* The colors the document's tables, memos and table groups carry as opaque
|
|
16
|
+
* #rrggbb, the most used first and a tie in document order; one it cannot
|
|
17
|
+
* read is left out.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getDocumentColors({ doc, collections }: RootState): string[];
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=color.d.ts.map
|
|
@@ -1,16 +1,43 @@
|
|
|
1
1
|
import { AnyAction } from '@dineug/r-html';
|
|
2
2
|
import { ClipboardColumn, ClipboardIndex, ClipboardMemo, ClipboardRelationship, ClipboardTable, PlacementPoint } from '../../../../utils/table-clipboard';
|
|
3
|
+
/**
|
|
4
|
+
* A table group a document brings, its rect where it lands and the source ids
|
|
5
|
+
* of the tables it holds, which no clipboard payload carries.
|
|
6
|
+
*/
|
|
7
|
+
export type CreateEntityTableGroup = {
|
|
8
|
+
sourceId: string;
|
|
9
|
+
name: string;
|
|
10
|
+
color: string;
|
|
11
|
+
tableIds: string[];
|
|
12
|
+
ui: {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
zIndex: number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
3
20
|
export type CreateEntityInput = {
|
|
4
21
|
tables: ClipboardTable[];
|
|
5
22
|
columns: ClipboardColumn[];
|
|
6
23
|
memos: ClipboardMemo[];
|
|
7
24
|
relationships: ClipboardRelationship[];
|
|
8
25
|
indexes: ClipboardIndex[];
|
|
26
|
+
tableGroups?: CreateEntityTableGroup[];
|
|
9
27
|
};
|
|
10
28
|
export type CreateEntityActions = {
|
|
11
29
|
actions: AnyAction[];
|
|
12
30
|
tableIds: string[];
|
|
13
31
|
memoIds: string[];
|
|
32
|
+
tableGroupIds: string[];
|
|
33
|
+
};
|
|
34
|
+
export type CreateEntityOptions = {
|
|
35
|
+
/**
|
|
36
|
+
* Whether a field is set only when it holds something other than what a new
|
|
37
|
+
* entity starts with, an empty text, a flag off or an ascending order, which
|
|
38
|
+
* leaves the same entities in fewer actions.
|
|
39
|
+
*/
|
|
40
|
+
valuesOnly?: boolean;
|
|
14
41
|
};
|
|
15
|
-
export declare function toCreateEntityActions({ tables, columns, memos, relationships, indexes }: CreateEntityInput, placement: Map<string, PlacementPoint
|
|
42
|
+
export declare function toCreateEntityActions({ tables, columns, memos, relationships, indexes, tableGroups, }: CreateEntityInput, placement: Map<string, PlacementPoint>, { valuesOnly }?: CreateEntityOptions): CreateEntityActions;
|
|
16
43
|
//# sourceMappingURL=duplicate.d.ts.map
|
|
@@ -6,6 +6,22 @@ export declare function isColumns({ collections, editor: { focusTable } }: RootS
|
|
|
6
6
|
export declare function isLastColumn(state: RootState): boolean;
|
|
7
7
|
export declare function isLastRowColumn({ collections, editor: { focusTable }, }: RootState): boolean;
|
|
8
8
|
export declare function getRemoveFirstColumnId(state: RootState, columnIds: string[]): string | null;
|
|
9
|
+
/**
|
|
10
|
+
* The columns a command on the focused column reaches: the selection still in
|
|
11
|
+
* the table when the focused column is one of two or more of it, else that
|
|
12
|
+
* column alone. A column removed by a peer, an agent or an undo stays selected.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getFocusedColumnIds({ editor: { focusTable }, collections, }: RootState): string[];
|
|
15
|
+
export type RemovableColumns = {
|
|
16
|
+
tableId: string;
|
|
17
|
+
columnIds: string[];
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* The columns Delete removes: those selected and still in the focused table
|
|
21
|
+
* while it is the one table, memo or group selected and the zoom draws its
|
|
22
|
+
* rows. Null otherwise, where the selected tables, memos and groups go instead.
|
|
23
|
+
*/
|
|
24
|
+
export declare function getRemovableColumns({ doc: { tableIds, memoIds, tableGroupIds }, editor: { focusTable, selectedMap }, settings: { zoomLevel }, collections, }: RootState): RemovableColumns | null;
|
|
9
25
|
export declare function isLastTable(state: RootState): boolean;
|
|
10
26
|
export declare const isTableFocusType: (value: FocusType) => boolean;
|
|
11
27
|
export declare function arrowUp(state: RootState, payload: Payload): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RootState } from '../../../state';
|
|
2
|
+
/**
|
|
3
|
+
* Hidden groups take no press, so hiding them lets go of every selected group,
|
|
4
|
+
* ends a draw armed and closes a name editor, none of which a reader could see
|
|
5
|
+
* or end any longer.
|
|
6
|
+
*/
|
|
7
|
+
export declare function releaseTableGroups(state: RootState): void;
|
|
8
|
+
/** Hidden memos take no press either, so hiding them lets go of every selected memo and closes a memo editor. */
|
|
9
|
+
export declare function releaseMemos(state: RootState): void;
|
|
10
|
+
/**
|
|
11
|
+
* Lets go of what the show bits a load landed hide, as hiding them by View
|
|
12
|
+
* Option does, so an undo, an import or a peer's load that hides them leaves
|
|
13
|
+
* no selection or editor on what no reader can see.
|
|
14
|
+
*/
|
|
15
|
+
export declare function releaseHidden(state: RootState): void;
|
|
16
|
+
//# sourceMappingURL=releaseHidden.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SelectType } from '../state';
|
|
2
|
+
export type SelectTypeIds = {
|
|
3
|
+
tableIds: string[];
|
|
4
|
+
memoIds: string[];
|
|
5
|
+
tableGroupIds: string[];
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* The selected tables', memos' and table groups' ids apart, in selection
|
|
9
|
+
* order: one split for the move and the color picker, so both reach the same.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getSelectTypeIds(selectedMap: Record<string, SelectType>): SelectTypeIds;
|
|
12
|
+
//# sourceMappingURL=selection.d.ts.map
|
|
@@ -8,6 +8,7 @@ export declare const ActionType: {
|
|
|
8
8
|
readonly changeRelationshipType: "relationship.changeType";
|
|
9
9
|
readonly changeRelationshipOnDelete: "relationship.changeOnDelete";
|
|
10
10
|
readonly changeRelationshipOnUpdate: "relationship.changeOnUpdate";
|
|
11
|
+
readonly changeRelationshipColumns: "relationship.changeColumns";
|
|
11
12
|
};
|
|
12
13
|
export type ActionType = ValuesType<typeof ActionType>;
|
|
13
14
|
export type ActionMap = {
|
|
@@ -35,6 +36,11 @@ export type ActionMap = {
|
|
|
35
36
|
id: string;
|
|
36
37
|
value: number;
|
|
37
38
|
};
|
|
39
|
+
[ActionType.changeRelationshipColumns]: {
|
|
40
|
+
id: string;
|
|
41
|
+
start: RelationshipPoint;
|
|
42
|
+
end: RelationshipPoint;
|
|
43
|
+
};
|
|
38
44
|
};
|
|
39
45
|
export type ReducerType<T extends keyof ActionMap> = Reducer<RootState, T, ActionMap, EngineContext>;
|
|
40
46
|
type RelationshipPoint = {
|