@dineug/erd-editor 3.10.0 → 4.1.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 +140 -158
- 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/DiffOutline.template.d.ts +14 -0
- 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 +40 -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/diff-viewer/diff-tree/DiffTree.d.ts +19 -0
- package/dist/components/erd/diff-viewer/diff-tree/DiffTree.styles.d.ts +12 -0
- package/dist/components/erd/diff-viewer/diff-tree/diffTreeModel.d.ts +49 -0
- package/dist/components/erd/diff-viewer/diff.d.ts +21 -19
- 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 +47 -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/FloatingToolbar.d.ts +7 -4
- package/dist/components/erd/floating-toolbar/ToolbarCompass.template.d.ts +3 -1
- package/dist/components/erd/goToErdTarget.d.ts +40 -16
- 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/relationshipHighlight.d.ts +18 -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 +19 -0
- package/dist/components/erd/welcome-screen/welcome-hints/hintArrows.d.ts +10 -0
- package/dist/components/erd/welcome-screen/welcomeLayout.d.ts +91 -0
- package/dist/components/erd-editor/ErdEditor.d.ts +66 -6
- package/dist/components/erd-editor/ErdEditor.styles.d.ts +4 -0
- package/dist/components/erd-editor/useErdEditorAttachElement.d.ts +14 -1
- package/dist/components/erd-editor/viewportLayout.d.ts +52 -0
- package/dist/components/explorer/Explorer.d.ts +12 -0
- package/dist/components/explorer/explorer-controller/ExplorerController.d.ts +11 -0
- package/dist/components/explorer/explorer-panel/ExplorerPanel.d.ts +14 -0
- package/dist/components/explorer/explorer-panel/ExplorerPanel.styles.d.ts +13 -0
- package/dist/components/explorer/explorer-search/ExplorerSearch.d.ts +12 -0
- package/dist/components/explorer/explorer-search/ExplorerSearch.styles.d.ts +13 -0
- package/dist/components/explorer/explorerCommands.d.ts +28 -0
- package/dist/components/explorer/explorerNavigation.d.ts +14 -0
- package/dist/components/explorer/explorerSearch.d.ts +71 -0
- package/dist/components/explorer/explorerTree.d.ts +90 -0
- package/dist/components/explorer/explorerView.d.ts +54 -0
- package/dist/components/{find-replace → explorer}/matchTarget.d.ts +5 -7
- 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/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 +24 -3
- package/dist/components/primitives/sash/Sash.d.ts +1 -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/primitives/tree/Tree.d.ts +30 -0
- package/dist/components/primitives/tree/Tree.styles.d.ts +5 -0
- package/dist/components/primitives/tree/treeModel.d.ts +42 -0
- package/dist/components/quick-search/QuickSearch.d.ts +2 -1
- package/dist/components/quick-search/QuickSearch.styles.d.ts +1 -0
- package/dist/components/quick-search/actions.d.ts +39 -7
- package/dist/components/quick-search/hangul.d.ts +16 -10
- package/dist/components/quick-search/paletteList.d.ts +7 -0
- package/dist/components/quick-search/paletteQuery.d.ts +5 -4
- package/dist/components/quick-search/scopedActions.d.ts +10 -15
- 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 +7 -4
- 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/toolbar/Toolbar.styles.d.ts +0 -1
- 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 +41 -1
- package/dist/constants/open.d.ts +3 -1
- 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 +2350 -4222
- 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 +425 -0
- package/dist/i18n/messages/de-DE.d.ts +405 -0
- package/dist/i18n/messages/en/code.d.ts +16 -0
- package/dist/i18n/messages/en/colorPicker.d.ts +35 -0
- package/dist/i18n/messages/en/common.d.ts +64 -0
- package/dist/i18n/messages/en/contextMenu.d.ts +29 -0
- package/dist/i18n/messages/en/explorer.d.ts +37 -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 +40 -0
- package/dist/i18n/messages/en/floatingToolbar.d.ts +12 -0
- package/dist/i18n/messages/en/index.d.ts +408 -0
- package/dist/i18n/messages/en/mapColumns.d.ts +39 -0
- package/dist/i18n/messages/en/palette.d.ts +34 -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 +34 -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 +8 -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 +410 -0
- package/dist/i18n/messages/eu-ES.d.ts +405 -0
- package/dist/i18n/messages/fa-IR.d.ts +405 -0
- package/dist/i18n/messages/fr-FR.d.ts +410 -0
- package/dist/i18n/messages/he-IL.d.ts +410 -0
- package/dist/i18n/messages/id-ID.d.ts +400 -0
- package/dist/i18n/messages/index.d.ts +11 -0
- package/dist/i18n/messages/it-IT.d.ts +410 -0
- package/dist/i18n/messages/ja-JP.d.ts +400 -0
- package/dist/i18n/messages/ko-KR.d.ts +400 -0
- package/dist/i18n/messages/nl-NL.d.ts +405 -0
- package/dist/i18n/messages/pl-PL.d.ts +415 -0
- package/dist/i18n/messages/pt-BR.d.ts +410 -0
- package/dist/i18n/messages/pt-PT.d.ts +410 -0
- package/dist/i18n/messages/ro-RO.d.ts +410 -0
- package/dist/i18n/messages/ru-RU.d.ts +415 -0
- package/dist/i18n/messages/sk-SK.d.ts +415 -0
- package/dist/i18n/messages/sl-SI.d.ts +415 -0
- package/dist/i18n/messages/sv-SE.d.ts +405 -0
- package/dist/i18n/messages/tr-TR.d.ts +405 -0
- package/dist/i18n/messages/uk-UA.d.ts +415 -0
- package/dist/i18n/messages/zh-CN.d.ts +400 -0
- package/dist/i18n/messages/zh-TW.d.ts +400 -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 +31169 -12611
- 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-BKvXDYoC.js +12925 -0
- package/dist/peer/index.d.ts +6 -3
- package/dist/peer/index.js +82 -75
- 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-2IUOt99m.js +1341 -0
- package/dist/styles/scrollbar.styles.d.ts +1 -1
- package/dist/themes/radix-ui-theme.d.ts +11 -3
- package/dist/themes/tokens.d.ts +18 -4
- 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/diff/compareEntities.d.ts +39 -0
- package/dist/utils/diff/diffDocuments.d.ts +12 -0
- package/dist/utils/diff/index.d.ts +5 -0
- package/dist/utils/diff/pairEntities.d.ts +41 -0
- package/dist/utils/diff/types.d.ts +77 -0
- 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 -12
- 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 +25 -12
- package/dist/utils/find-replace/matcher.d.ts +2 -0
- package/dist/utils/find-replace/present.d.ts +8 -5
- package/dist/utils/find-replace/preserveCase.d.ts +10 -0
- 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 +19 -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/utils/takeover.d.ts +6 -0
- package/dist/utils/virtualRange.d.ts +15 -0
- 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 +4 -11
- package/dist/components/erd/diff-viewer/tree-viewer/TreeViewer.d.ts +0 -12
- package/dist/components/erd/diff-viewer/tree-viewer/TreeViewer.styles.d.ts +0 -6
- package/dist/components/find-replace/FindReplace.d.ts +0 -13
- package/dist/components/find-replace/FindReplace.styles.d.ts +0 -27
- package/dist/components/find-replace/panelLayout.d.ts +0 -17
- 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/components/{find-replace → explorer}/fieldIcon.d.ts +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { Table } from '../../internal-types';
|
|
3
|
+
import { FormatTableOptions } from './utils';
|
|
4
|
+
/**
|
|
5
|
+
* PHP takes declare(strict_types=1) only as the first statement, so the text
|
|
6
|
+
* opens on the tag with nothing before it, not even the blank line the other
|
|
7
|
+
* languages open with.
|
|
8
|
+
*/
|
|
9
|
+
export declare const PHP_HEADER: readonly string[];
|
|
10
|
+
export declare const INDENT = " ";
|
|
11
|
+
export declare function createCode(state: RootState): string;
|
|
12
|
+
/** One table's class under the header, which a file of its own needs. */
|
|
13
|
+
export declare function createTableCode(state: RootState, table: Table): string;
|
|
14
|
+
export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
|
|
15
|
+
/** A PostgreSQL array type, which pdo_pgsql reads as a text literal such as {1,2}. */
|
|
16
|
+
export declare function isPostgresArray(dataType: string, database: number): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* A name PHP refuses for a class, in any letter case, gets an underscore
|
|
19
|
+
* after it, as nikic/PHP-Parser names its List_ and Match_ nodes.
|
|
20
|
+
*/
|
|
21
|
+
export declare function toClassName(name: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* A comment as a doc block, one line or several: a line comment would end at
|
|
24
|
+
* a ?> in the text and leave PHP, where a block runs on to its close, which a
|
|
25
|
+
* star and a slash in the text would write early.
|
|
26
|
+
*/
|
|
27
|
+
export declare function formatDocComment(buffer: string[], indent: string, comment: string): void;
|
|
28
|
+
//# sourceMappingURL=php.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { FormatTableOptions } from './utils';
|
|
3
|
+
export declare const INDENT = " ";
|
|
4
|
+
/** Every keyword of edition 2015 to 2024 a raw identifier takes. */
|
|
5
|
+
export declare const RUST_KEYWORDS: ReadonlySet<string>;
|
|
6
|
+
export declare function createCode(state: RootState): string;
|
|
7
|
+
export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
|
|
8
|
+
/** A keyword as a raw identifier, or with an underscore after it where rustc takes none. */
|
|
9
|
+
export declare function toRustIdentifier(name: string): string;
|
|
10
|
+
export declare function toStructName(name: string): string;
|
|
11
|
+
/** A comment as line comments, its bidirectional controls written as escapes. */
|
|
12
|
+
export declare function formatComment(buffer: string[], indent: string, comment: string): void;
|
|
13
|
+
//# sourceMappingURL=rust.d.ts.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/** The Rust value a column's element holds, which each generator spells its own way. */
|
|
2
|
+
export type RustScalar = 'bool' | 'i8' | 'i16' | 'i32' | 'i64' | 'u8' | 'u16' | 'u32' | 'u64' | 'f32' | 'f64' | 'decimal' | 'string' | 'bytes' | 'uuid' | 'json' | 'date' | 'time' | 'dateTime' | 'dateTimeUtc' | 'dateTimeOffset';
|
|
3
|
+
/**
|
|
4
|
+
* Each scalar by its full path, so a struct compiles with no use statement
|
|
5
|
+
* and beside a struct of any of these last names.
|
|
6
|
+
*/
|
|
7
|
+
export declare const RUST_SCALAR_PATHS: Readonly<Record<RustScalar, string>>;
|
|
8
|
+
export type RustColumnType = {
|
|
9
|
+
scalar: RustScalar;
|
|
10
|
+
/** The field type with one Vec a PostgreSQL array dimension, by full paths. */
|
|
11
|
+
rust: string;
|
|
12
|
+
/**
|
|
13
|
+
* The element's type name, lower case, its arguments gone, and on MySQL and
|
|
14
|
+
* MariaDB its UNSIGNED and ZEROFILL too.
|
|
15
|
+
*/
|
|
16
|
+
base: string;
|
|
17
|
+
/** The element's arguments when all are numbers: numeric(10,2) gives [10, 2]. */
|
|
18
|
+
args: number[];
|
|
19
|
+
arrayDepth: number;
|
|
20
|
+
/** MySQL and MariaDB: UNSIGNED, ZEROFILL or SERIAL in the type. */
|
|
21
|
+
isUnsigned: boolean;
|
|
22
|
+
isFloat: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* PostgreSQL alone: the type sqlx reads the column through, cast, where it
|
|
25
|
+
* reads the column's own type into no Rust type here; null elsewhere.
|
|
26
|
+
*/
|
|
27
|
+
selectAs: string | null;
|
|
28
|
+
/**
|
|
29
|
+
* The element as an entity declares it: a PostgreSQL array of more than one
|
|
30
|
+
* dimension, which neither sqlx nor SeaORM decodes, is a string read as text.
|
|
31
|
+
*/
|
|
32
|
+
entityScalar: RustScalar;
|
|
33
|
+
};
|
|
34
|
+
/** PostgreSQL's character types, which sqlx reads into a String as they are. */
|
|
35
|
+
export declare const POSTGRES_CHARACTER_TYPES: ReadonlySet<string>;
|
|
36
|
+
/**
|
|
37
|
+
* The shared column classifier with the choices sqlx makes for Rust on top: an
|
|
38
|
+
* Oracle, Snowflake or SQLite integer keeps the width its name declares, and a
|
|
39
|
+
* MySQL SIGNED stays in the name, which keeps it from every rule by name.
|
|
40
|
+
*/
|
|
41
|
+
export declare function getRustColumnType(dataType: string, database: number): RustColumnType;
|
|
42
|
+
/** A type inside one Vec per dimension. */
|
|
43
|
+
export declare function wrapVec(type: string, depth: number): string;
|
|
44
|
+
//# sourceMappingURL=rustTypes.d.ts.map
|
|
@@ -2,4 +2,5 @@ import { RootState } from '../../engine/state';
|
|
|
2
2
|
import { FormatTableOptions } from './utils';
|
|
3
3
|
export declare function createCode(state: RootState): string;
|
|
4
4
|
export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
|
|
5
|
+
export declare function toScalaName(name: string): string;
|
|
5
6
|
//# sourceMappingURL=scala.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { Table } from '../../internal-types';
|
|
3
|
+
type EntityColumnType = {
|
|
4
|
+
type: string;
|
|
5
|
+
columnType: string | null;
|
|
6
|
+
selectAs: string | null;
|
|
7
|
+
saveAs: string | null;
|
|
8
|
+
isFloat: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function createCode(state: RootState): string;
|
|
11
|
+
/** One table's entity as its module file holds it, named in the whole document. */
|
|
12
|
+
export declare function createTableCode(state: RootState, table: Table): string;
|
|
13
|
+
/** The column name DeriveEntityModel gives a field it reads without column_name. */
|
|
14
|
+
export declare function derivedColumnName(field: string): string;
|
|
15
|
+
/** UpperCamelCase applied until it stops changing: aBC gives ABc, then ABc. */
|
|
16
|
+
export declare function stableUpperCamelCase(value: string): string;
|
|
17
|
+
/** A Rust string literal rustc takes for any text. */
|
|
18
|
+
export declare function rustString(value: string): string;
|
|
19
|
+
/** The field type, column_type, select_as and save_as an entity writes. */
|
|
20
|
+
export declare function getEntityColumnType(dataType: string, database: number): EntityColumnType;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=seaorm.d.ts.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { Table } from '../../internal-types';
|
|
3
|
+
import { FormatTableOptions } from './utils';
|
|
4
|
+
/**
|
|
5
|
+
* Date, Data, Decimal and UUID need Foundation, and an unused import draws no
|
|
6
|
+
* warning, so the text and the one-table view open on it whatever they hold.
|
|
7
|
+
*/
|
|
8
|
+
export declare const SWIFT_HEADER: readonly string[];
|
|
9
|
+
export declare const INDENT = " ";
|
|
10
|
+
/**
|
|
11
|
+
* A nonisolated struct keeps its conformances usable off the main actor in a
|
|
12
|
+
* module whose default isolation is MainActor, as new Xcode app targets set.
|
|
13
|
+
*/
|
|
14
|
+
export declare const STRUCT_HEAD = "nonisolated struct";
|
|
15
|
+
export declare const CONFORMANCES = "Codable, Hashable, Sendable";
|
|
16
|
+
/** The words the Swift lexer reserves, which a name takes only in backticks. */
|
|
17
|
+
export declare const SWIFT_KEYWORDS: ReadonlySet<string>;
|
|
18
|
+
/**
|
|
19
|
+
* The types and protocols the output writes unqualified: a struct of one of
|
|
20
|
+
* these names breaks the conformances or silently retypes every such field.
|
|
21
|
+
*/
|
|
22
|
+
export declare const TYPE_NAMES: ReadonlySet<string>;
|
|
23
|
+
export declare function createCode(state: RootState): string;
|
|
24
|
+
/** One table's struct under the import, which a file of its own needs. */
|
|
25
|
+
export declare function createTableCode(state: RootState, table: Table): string;
|
|
26
|
+
export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
|
|
27
|
+
/** A column's Swift type, one array a PostgreSQL dimension, without its optional. */
|
|
28
|
+
export declare function swiftType(dataType: string, database: number): string;
|
|
29
|
+
/** A type name gets an underscore after it, and a keyword backticks. */
|
|
30
|
+
export declare function toStructName(name: string): string;
|
|
31
|
+
/** A property's coding key, an underscore after a name the keys reserve. */
|
|
32
|
+
export declare function toPropertyKey(name: string): string;
|
|
33
|
+
export declare function toPropertyName(key: string): string;
|
|
34
|
+
/**
|
|
35
|
+
* A Swift string literal: a quote and a backslash, which would also open an
|
|
36
|
+
* interpolation, get a backslash, and every C0 control and DEL an escape.
|
|
37
|
+
*/
|
|
38
|
+
export declare function toStringLiteral(value: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* A comment as documentation lines, split at every line terminator, since a
|
|
41
|
+
* lone CR ends a line comment; a NUL, which Swift warns about, is an escape.
|
|
42
|
+
*/
|
|
43
|
+
export declare function formatComment(buffer: string[], indent: string, comment: string): void;
|
|
44
|
+
//# sourceMappingURL=swift.d.ts.map
|
|
@@ -15,7 +15,26 @@ export interface FormatRelationOptions {
|
|
|
15
15
|
}
|
|
16
16
|
export declare const hasOneRelationship: (value: number) => boolean;
|
|
17
17
|
export declare const hasNRelationship: (value: number) => boolean;
|
|
18
|
+
/** The ECMAScript line terminators, CR LF one of them, where a line comment ends. */
|
|
19
|
+
export declare const LINE_TERMINATOR: RegExp;
|
|
18
20
|
export declare function getPrimitiveType(dataType: string, database: number): PrimitiveType;
|
|
21
|
+
/** The vendor list entry a data type names, the longest that prefixes it. */
|
|
22
|
+
export declare function findDataTypeHint(dataType: string, database: number): DataTypeHint | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* The precision and scale of an Oracle or Snowflake NUMBER with a scale, which
|
|
25
|
+
* the vendor lists file under long with every other NUMBER; a star is 38.
|
|
26
|
+
*/
|
|
27
|
+
export declare function fractionalNumber(dataType: string, database: number): [precision: number, scale: number] | null;
|
|
28
|
+
/** The type name in lower case, with its argument lists and extra spaces gone. */
|
|
29
|
+
export declare function baseTypeName(dataType: string): string;
|
|
30
|
+
/** A text split into its lines at every ECMAScript line terminator. */
|
|
31
|
+
export declare function splitLines(value: string): string[];
|
|
32
|
+
/**
|
|
33
|
+
* A line comment's text with a backslash before its at sign where it opens with
|
|
34
|
+
* one and ts-, after any white space and in any case, so the line stays legible
|
|
35
|
+
* and TypeScript reads no directive in it, which would hide or expect an error.
|
|
36
|
+
*/
|
|
37
|
+
export declare function escapeTypeScriptDirective(line: string): string;
|
|
19
38
|
export declare function getDataTypeHints(database: number): DataTypeHint[];
|
|
20
39
|
export declare function getNameCase(name: string, nameCase: number): string;
|
|
21
40
|
export type ReferentialActionEntry = {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { Table } from '../../internal-types';
|
|
3
|
+
import { JsonShape } from './jsonShape';
|
|
4
|
+
import { FormatTableOptions } from './utils';
|
|
5
|
+
/** Every table's row schema and its inferred type, under one import line. */
|
|
6
|
+
export declare function createCode(state: RootState): string;
|
|
7
|
+
/** One table under the import line, so its file compiles on its own. */
|
|
8
|
+
export declare function createTableCode(state: RootState, table: Table): string;
|
|
9
|
+
export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
|
|
10
|
+
/** A value's Zod schema, one z.array around it for each array dimension. */
|
|
11
|
+
export declare function toZodSchema(shape: JsonShape): string;
|
|
12
|
+
/**
|
|
13
|
+
* A name a type alias may not take, z included, gets an underscore after it;
|
|
14
|
+
* any other name, one that is no identifier or a repeated one included, is
|
|
15
|
+
* written as is.
|
|
16
|
+
*/
|
|
17
|
+
export declare function toZodTypeName(name: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* A property key as an object literal writes it; __proto__ is computed, since
|
|
20
|
+
* written plainly or quoted it would set the object's prototype instead.
|
|
21
|
+
*/
|
|
22
|
+
export declare function toZodPropertyKey(name: string): string;
|
|
23
|
+
/** A comment as line comments, one for each of its lines, none a TypeScript directive. */
|
|
24
|
+
export declare function formatComment(buffer: string[], indent: string, comment: string): void;
|
|
25
|
+
//# sourceMappingURL=zod.d.ts.map
|
|
@@ -11,12 +11,21 @@ export declare const animationFrames$: Observable<{
|
|
|
11
11
|
elapsed: number;
|
|
12
12
|
}>;
|
|
13
13
|
export declare const moveStart$: Observable<MouseEvent | TouchEvent>;
|
|
14
|
+
/**
|
|
15
|
+
* The middle presses a scene pan stopped below a target, read off the forward
|
|
16
|
+
* each one hands the move stream: a listener above the stage container that
|
|
17
|
+
* closes on any press hears a middle press there only this way.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* addUnsubscribe(middlePanPress$(root).subscribe(handleOutsidePress));
|
|
21
|
+
*/
|
|
22
|
+
export declare function middlePanPress$(target: EventTarget): Observable<MouseEvent>;
|
|
14
23
|
/**
|
|
15
24
|
* A gesture also ends wherever the browser takes the pointer away: a native
|
|
16
25
|
* drag swallows the rest of the stream, a cancelled pointer never lifts, and a
|
|
17
26
|
* blurred window never sees the mouseup, each leaving drag$ subscribed.
|
|
18
27
|
*/
|
|
19
|
-
export declare const moveEnd$: Observable<MouseEvent | TouchEvent |
|
|
28
|
+
export declare const moveEnd$: Observable<MouseEvent | TouchEvent | FocusEvent | PointerEvent | DragEvent>;
|
|
20
29
|
export type DragMove = {
|
|
21
30
|
movementX: number;
|
|
22
31
|
movementY: number;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { TextRange } from './find-replace';
|
|
2
|
+
/** A stretch of the text, lit or plain; the chunks of one text run end to end. */
|
|
3
|
+
type Chunk = TextRange & {
|
|
4
|
+
highlight: boolean;
|
|
5
|
+
};
|
|
6
|
+
export type FindChunksArgs = {
|
|
7
|
+
searchWords: string[];
|
|
8
|
+
textToHighlight: string;
|
|
9
|
+
/** Whether a word lights only its own letter case; false when left out. */
|
|
10
|
+
caseSensitive?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type FindAllArgs = FindChunksArgs & {
|
|
13
|
+
/** Where the text holds the words, findChunks when left out; the ranges may overlap and come in any order. */
|
|
14
|
+
findChunks?: (args: FindChunksArgs) => TextRange[];
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Where the text holds each word, word by word and left to right, a match
|
|
18
|
+
* starting only past the end of that word's last one: a word is read as typed,
|
|
19
|
+
* never as a regular expression, and an empty one holds nothing.
|
|
20
|
+
*/
|
|
21
|
+
export declare function findChunks({ searchWords, textToHighlight, caseSensitive, }: FindChunksArgs): TextRange[];
|
|
22
|
+
/**
|
|
23
|
+
* The whole text as chunks: one lit chunk for each run of matches that overlap
|
|
24
|
+
* or touch, so two words side by side light as one, and plain chunks between
|
|
25
|
+
* them. An empty text has none.
|
|
26
|
+
*/
|
|
27
|
+
export declare function findAll({ searchWords, textToHighlight, caseSensitive, findChunks: find, }: FindAllArgs): Chunk[];
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=highlightWords.d.ts.map
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Memo, Point, Settings, Table } from '../internal-types';
|
|
2
2
|
export declare const nextZIndex: (tables: Table[], memos: Memo[]) => number;
|
|
3
3
|
export declare function nextPoint(settings: Settings, tables: Table[], memos: Memo[]): Point;
|
|
4
4
|
export declare const toList: <T>(ids: string[], entities: Record<string, T>) => Array<T>;
|
|
5
|
-
export declare function getDefaultEntityMeta(): EntityMeta;
|
|
6
5
|
export declare function safeRange(a: number, b: number): number[];
|
|
7
6
|
export declare function pascalCase(value?: string): string;
|
|
8
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** A handler per shortcut, whose presses of a sequence a space separates. */
|
|
2
|
+
export type KeyBindingHandlers = Record<string, (event: KeyboardEvent) => void>;
|
|
3
|
+
/**
|
|
4
|
+
* Calls each shortcut's handler on the target's keydown that completes it and
|
|
5
|
+
* returns the unbinding. A modifier's own keydown keeps a sequence going; any
|
|
6
|
+
* other miss, or a second with no keydown, sends it back to its first press.
|
|
7
|
+
*/
|
|
8
|
+
export declare function bindKeys(target: EventTarget, handlers: KeyBindingHandlers): () => void;
|
|
9
|
+
//# sourceMappingURL=bindKeys.d.ts.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ValuesType } from '../../internal-types';
|
|
2
2
|
import { KeyBindingPress } from './utils';
|
|
3
|
+
export { bindKeys, type KeyBindingHandlers } from './bindKeys';
|
|
3
4
|
export type ShortcutOption = {
|
|
4
5
|
shortcut: string;
|
|
5
6
|
preventDefault?: boolean;
|
|
@@ -15,8 +16,11 @@ export declare const KeyBindingName: {
|
|
|
15
16
|
readonly addTable: "addTable";
|
|
16
17
|
readonly addColumn: "addColumn";
|
|
17
18
|
readonly addMemo: "addMemo";
|
|
19
|
+
readonly addTableGroup: "addTableGroup";
|
|
20
|
+
readonly groupSelectedTables: "groupSelectedTables";
|
|
18
21
|
readonly removeTable: "removeTable";
|
|
19
22
|
readonly removeColumn: "removeColumn";
|
|
23
|
+
readonly removeSelection: "removeSelection";
|
|
20
24
|
readonly primaryKey: "primaryKey";
|
|
21
25
|
readonly selectAllTable: "selectAllTable";
|
|
22
26
|
readonly selectAllColumn: "selectAllColumn";
|
|
@@ -33,13 +37,24 @@ export declare const KeyBindingName: {
|
|
|
33
37
|
readonly zenMode: "zenMode";
|
|
34
38
|
};
|
|
35
39
|
export type KeyBindingName = ValuesType<typeof KeyBindingName>;
|
|
36
|
-
export declare const KeyBindingNameList: ("undo" | "redo" | "selectAllColumn" | "search" | "stop" | "primaryKey" | "edit" | "addMemo" | "addTable" | "removeTable" | "addColumn" | "removeColumn" | "findReplace" | "selectAllTable" | "relationshipZeroOne" | "relationshipZeroN" | "relationshipOneOnly" | "relationshipOneN" | "tableProperties" | "focusView" | "zoomIn" | "zoomOut" | "zoomReset" | "handTool" | "zenMode")[];
|
|
40
|
+
export declare const KeyBindingNameList: ("undo" | "redo" | "selectAllColumn" | "search" | "stop" | "primaryKey" | "edit" | "addMemo" | "addTable" | "removeTable" | "addColumn" | "removeColumn" | "addTableGroup" | "findReplace" | "groupSelectedTables" | "removeSelection" | "selectAllTable" | "relationshipZeroOne" | "relationshipZeroN" | "relationshipOneOnly" | "relationshipOneN" | "tableProperties" | "focusView" | "zoomIn" | "zoomOut" | "zoomReset" | "handTool" | "zenMode")[];
|
|
41
|
+
/**
|
|
42
|
+
* The chords a press inside a floating panel still carries to the editor:
|
|
43
|
+
* Find and Replace's own, search, the document's undo and redo, and the zoom.
|
|
44
|
+
*/
|
|
45
|
+
export declare const PANEL_PASSING_BINDINGS: ReadonlyArray<KeyBindingName>;
|
|
37
46
|
export type KeyBindingMap = Record<KeyBindingName, ShortcutOption[]>;
|
|
47
|
+
/**
|
|
48
|
+
* Whether a press inside a panel stops there: a press an IME still holds, a
|
|
49
|
+
* chord of the map outside the passing list, or a key the panel moves or
|
|
50
|
+
* presses with. A host that leaves Escape to the editor passes stop through.
|
|
51
|
+
*/
|
|
52
|
+
export declare function stopsAtPanel(event: KeyboardEvent, keyBindingMap: KeyBindingMap, passing?: ReadonlyArray<KeyBindingName>): boolean;
|
|
38
53
|
export declare const createKeyBindingMap: () => KeyBindingMap;
|
|
39
54
|
/**
|
|
40
|
-
* Whether the press is one of the chords given,
|
|
41
|
-
*
|
|
42
|
-
*
|
|
55
|
+
* Whether the press is one of the chords given, matched as bindKeys matches a
|
|
56
|
+
* press, so a panel reads a binding as the editor root does. Of a sequence it
|
|
57
|
+
* is the last press, the one that would complete it at the root.
|
|
43
58
|
*/
|
|
44
59
|
export declare function matchesShortcut(event: KeyboardEvent, options: ReadonlyArray<ShortcutOption>): boolean;
|
|
45
60
|
export declare function shortcutToTuple(shortcut?: string): KeyBindingPress[];
|
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
import { ValuesType } from '../../internal-types';
|
|
1
2
|
export type KeyBindingPress = [string[], string];
|
|
3
|
+
/** The modifiers that change what a press means; AltGraph is read through them. */
|
|
4
|
+
export declare const ModifierKey: {
|
|
5
|
+
readonly Shift: "Shift";
|
|
6
|
+
readonly Meta: "Meta";
|
|
7
|
+
readonly Alt: "Alt";
|
|
8
|
+
readonly Control: "Control";
|
|
9
|
+
};
|
|
10
|
+
export type ModifierKey = ValuesType<typeof ModifierKey>;
|
|
2
11
|
export declare function parseKeybinding(str: string): KeyBindingPress[];
|
|
12
|
+
/**
|
|
13
|
+
* Whether the modifier is held, AltGraph counting as the ones it aliases. A
|
|
14
|
+
* keydown Chrome sends for a function key may lack getModifierState, and then
|
|
15
|
+
* holds nothing.
|
|
16
|
+
*/
|
|
17
|
+
export declare function isModifierHeld(event: KeyboardEvent, mod: string): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the event is the press: the key by its value in any case or by its
|
|
20
|
+
* code, every modifier the press names held, and no other modifier unless it
|
|
21
|
+
* is the key itself.
|
|
22
|
+
*/
|
|
23
|
+
export declare function matchesPress(event: KeyboardEvent, [mods, key]: KeyBindingPress): boolean;
|
|
3
24
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AnyAction } from '@dineug/r-html';
|
|
2
|
+
import { RootState } from '../../engine/state';
|
|
3
|
+
import { Column } from '../../internal-types';
|
|
4
|
+
type AlignEnd = {
|
|
5
|
+
tableId: string;
|
|
6
|
+
columnIds: string[];
|
|
7
|
+
};
|
|
8
|
+
export type AlignTypesInput = {
|
|
9
|
+
/** The relationship whose columns change; a new one has none. */
|
|
10
|
+
relationshipId?: string;
|
|
11
|
+
start: AlignEnd;
|
|
12
|
+
end: AlignEnd;
|
|
13
|
+
/** The child columns the same batch adds, which already take the parent's type. */
|
|
14
|
+
newColumnIds: string[];
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* The data type changes that bring each existing child column of the mapping
|
|
18
|
+
* to its parent's, through the data type sync over the relationships as they
|
|
19
|
+
* will stand, while the sync is on; a column already at its value takes none.
|
|
20
|
+
*/
|
|
21
|
+
export declare function toAlignTypeActions(state: RootState, { relationshipId, start, end, newColumnIds }: AlignTypesInput): AnyAction[];
|
|
22
|
+
/**
|
|
23
|
+
* What the dialog says under a row whose child column type differs from the
|
|
24
|
+
* one its parent's gives a foreign key: the type confirming writes there while
|
|
25
|
+
* the sync is on and the parent has one, else both types.
|
|
26
|
+
*/
|
|
27
|
+
export type TypeNote = {
|
|
28
|
+
kind: 'becomes';
|
|
29
|
+
dataType: string;
|
|
30
|
+
} | {
|
|
31
|
+
kind: 'differ';
|
|
32
|
+
parentType: string;
|
|
33
|
+
childType: string;
|
|
34
|
+
};
|
|
35
|
+
export declare function getTypeNote({ settings: { relationshipDataTypeSync, database }, }: Pick<RootState, 'settings'>, parent: Column, child: Column): TypeNote | null;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=alignTypes.d.ts.map
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { Table } from '../../internal-types';
|
|
3
|
+
import { CandidateKey } from './candidateKeys';
|
|
4
|
+
import { ColumnPick, MapColumnsDraft, MappingRow } from './mapping';
|
|
5
|
+
import { MappingIssues } from './validate';
|
|
6
|
+
/** The child column picked for each parent column, null where the reader emptied it. */
|
|
7
|
+
export type MapColumnsPicks = Readonly<Record<string, ColumnPick | null>>;
|
|
8
|
+
/** A Map Columns dialog opened while drawing a relationship between two tables. */
|
|
9
|
+
export type CreateMapColumnsSession = {
|
|
10
|
+
mode: 'create';
|
|
11
|
+
startTableId: string;
|
|
12
|
+
endTableId: string;
|
|
13
|
+
relationshipType: number;
|
|
14
|
+
keyId: string | null;
|
|
15
|
+
picks: MapColumnsPicks;
|
|
16
|
+
};
|
|
17
|
+
/** The mapping and the keys a relationship had when the dialog opened on it. */
|
|
18
|
+
export type MapColumnsBase = {
|
|
19
|
+
startColumnIds: string[];
|
|
20
|
+
endColumnIds: string[];
|
|
21
|
+
keyId: string;
|
|
22
|
+
keys: Readonly<Record<string, string[]>>;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* A Map Columns dialog opened on a relationship. Until the reader changes a row
|
|
26
|
+
* or the key it follows the relationship as it stands; after, it keeps the key
|
|
27
|
+
* and the rows they changed, the others still following it.
|
|
28
|
+
*/
|
|
29
|
+
export type EditMapColumnsSession = {
|
|
30
|
+
mode: 'edit';
|
|
31
|
+
relationshipId: string;
|
|
32
|
+
base: MapColumnsBase;
|
|
33
|
+
touched: boolean;
|
|
34
|
+
keyId: string;
|
|
35
|
+
picks: MapColumnsPicks;
|
|
36
|
+
};
|
|
37
|
+
export type MapColumnsSession = CreateMapColumnsSession | EditMapColumnsSession;
|
|
38
|
+
/**
|
|
39
|
+
* A row as the dialog shows it: whether its parent or picked child column has
|
|
40
|
+
* left its table, and the name a new foreign key column takes for it beside
|
|
41
|
+
* the other rows picking one.
|
|
42
|
+
*/
|
|
43
|
+
export type MappingRowView = MappingRow & {
|
|
44
|
+
removedParent: boolean;
|
|
45
|
+
removedChild: boolean;
|
|
46
|
+
newColumnName: string;
|
|
47
|
+
};
|
|
48
|
+
/** The line under a stored mapping no key covers, or one only a key can mend. */
|
|
49
|
+
export type MapColumnsNotice = 'notAKey' | 'noKey' | 'fixMapping' | 'addKeyToFix';
|
|
50
|
+
/** Why the dialog closes on its own: a table it maps between, or the relationship, is gone. */
|
|
51
|
+
export type MapColumnsClosed = {
|
|
52
|
+
reason: 'tableRemoved';
|
|
53
|
+
tableId: string;
|
|
54
|
+
} | {
|
|
55
|
+
reason: 'relationshipRemoved';
|
|
56
|
+
};
|
|
57
|
+
export type MapColumnsView = {
|
|
58
|
+
closed: null;
|
|
59
|
+
parentTable: Table;
|
|
60
|
+
childTable: Table;
|
|
61
|
+
relationshipType: number;
|
|
62
|
+
keys: CandidateKey[];
|
|
63
|
+
keyId: string | null;
|
|
64
|
+
showReferences: boolean;
|
|
65
|
+
rows: MappingRowView[];
|
|
66
|
+
notice: MapColumnsNotice | null;
|
|
67
|
+
changedRemotely: boolean;
|
|
68
|
+
draft: MapColumnsDraft;
|
|
69
|
+
issues: MappingIssues;
|
|
70
|
+
canConfirm: boolean;
|
|
71
|
+
};
|
|
72
|
+
export type MapColumnsClosedView = {
|
|
73
|
+
closed: MapColumnsClosed;
|
|
74
|
+
};
|
|
75
|
+
type MapState = Pick<RootState, 'doc' | 'collections' | 'settings'>;
|
|
76
|
+
/**
|
|
77
|
+
* What the dialog shows for its session over the state as it stands, built
|
|
78
|
+
* again on every render, or why it closes: a table it maps between, or the
|
|
79
|
+
* relationship it edits, has left the document.
|
|
80
|
+
*/
|
|
81
|
+
export declare function buildMapColumns(state: MapState, session: MapColumnsSession): MapColumnsView | MapColumnsClosedView;
|
|
82
|
+
/**
|
|
83
|
+
* A dialog opened to map the start table's key onto the end table's columns:
|
|
84
|
+
* on the primary key, or the first unique column without one, each row a
|
|
85
|
+
* column of the end table only one name match points at, or empty.
|
|
86
|
+
*/
|
|
87
|
+
export declare function openCreateSession(state: MapState, { startTableId, endTableId, relationshipType, }: Pick<CreateMapColumnsSession, 'startTableId' | 'endTableId' | 'relationshipType'>): CreateMapColumnsSession;
|
|
88
|
+
/** A dialog opened on the relationship, remembering its mapping and the parent's keys. */
|
|
89
|
+
export declare function openEditSession(state: MapState, relationshipId: string): EditMapColumnsSession;
|
|
90
|
+
/**
|
|
91
|
+
* The session once the reader picks another key in References: a row for each
|
|
92
|
+
* of its columns keeps the child it had where that child is live, and an empty
|
|
93
|
+
* row takes the one column a name match points at, if any.
|
|
94
|
+
*/
|
|
95
|
+
export declare const changeMapColumnsKey: <S extends MapColumnsSession>(state: MapState, session: S, keyId: string) => S;
|
|
96
|
+
/**
|
|
97
|
+
* The session once the reader picks a child column for a row, or empties it,
|
|
98
|
+
* on the key the dialog shows, which an edit keeps from then on.
|
|
99
|
+
*/
|
|
100
|
+
export declare const pickMapColumn: <S extends MapColumnsSession>(state: MapState, session: S, parentColumnId: string, pick: ColumnPick | null) => S;
|
|
101
|
+
export {};
|
|
102
|
+
//# sourceMappingURL=buildRows.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { Table } from '../../internal-types';
|
|
3
|
+
import { ColumnKey } from '../tableKeys';
|
|
4
|
+
/** The References choice that keeps a stored mapping no key of the parent covers. */
|
|
5
|
+
export declare const CURRENT_KEY_ID = "current";
|
|
6
|
+
/** A key a mapping can reference, or the stored columns kept as they are. */
|
|
7
|
+
export type CandidateKey = {
|
|
8
|
+
id: string;
|
|
9
|
+
kind: ColumnKey['kind'] | 'current';
|
|
10
|
+
columnIds: string[];
|
|
11
|
+
};
|
|
12
|
+
type KeyState = Pick<RootState, 'collections' | 'settings'>;
|
|
13
|
+
/**
|
|
14
|
+
* The keys a foreign key can reference on the table: its primary key, in
|
|
15
|
+
* column order, then each unique column; a unique column over the very columns
|
|
16
|
+
* of a key before it is left out, so a primary key also marked unique is one.
|
|
17
|
+
*/
|
|
18
|
+
export declare function getCandidateKeys(state: KeyState, table: Table): CandidateKey[];
|
|
19
|
+
/** The key the table's columns declare under the id, as they declare it now. */
|
|
20
|
+
export declare const findColumnKey: (state: KeyState, table: Table, keyId: string) => ColumnKey | undefined;
|
|
21
|
+
/** The References choice of a stored mapping no key covers. */
|
|
22
|
+
export declare const toCurrentKey: (columnIds: string[]) => CandidateKey;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=candidateKeys.d.ts.map
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { Relationship, Table } from '../../internal-types';
|
|
3
|
+
/** The child column a row maps its parent column to: one the child holds, or a new one. */
|
|
4
|
+
export type ColumnPick = {
|
|
5
|
+
kind: 'existing';
|
|
6
|
+
columnId: string;
|
|
7
|
+
} | {
|
|
8
|
+
kind: 'new';
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* One pair of a mapping, a parent key column and the child column picked for
|
|
12
|
+
* it, null until one is. A place of a stored mapping its lists cannot pair is
|
|
13
|
+
* invalid, with no parent column where the start list ends before it.
|
|
14
|
+
*/
|
|
15
|
+
export type MappingRow = {
|
|
16
|
+
parentColumnId: string | null;
|
|
17
|
+
pick: ColumnPick | null;
|
|
18
|
+
invalid?: boolean;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* What the Map Columns dialog confirms: the relationship to create between two
|
|
22
|
+
* tables, or the one whose columns it changes, with the parent key it reads,
|
|
23
|
+
* a key id of the parent's columns or the stored mapping kept as it is.
|
|
24
|
+
*/
|
|
25
|
+
export type MapColumnsDraft = {
|
|
26
|
+
mode: 'create';
|
|
27
|
+
startTableId: string;
|
|
28
|
+
endTableId: string;
|
|
29
|
+
relationshipType: number;
|
|
30
|
+
keyId: string | null;
|
|
31
|
+
rows: MappingRow[];
|
|
32
|
+
} | {
|
|
33
|
+
mode: 'edit';
|
|
34
|
+
relationshipId: string;
|
|
35
|
+
keyId: string;
|
|
36
|
+
rows: MappingRow[];
|
|
37
|
+
};
|
|
38
|
+
/** A relationship's two column lists, end[i] referencing start[i]. */
|
|
39
|
+
export type ColumnMapping = {
|
|
40
|
+
start: string[];
|
|
41
|
+
end: string[];
|
|
42
|
+
};
|
|
43
|
+
/** The two column lists the relationship holds, as they stand. */
|
|
44
|
+
export declare const toColumnMapping: ({ start, end, }: Relationship) => ColumnMapping;
|
|
45
|
+
/** The table, while the document holds it; a removed one stays an entity a while. */
|
|
46
|
+
export declare function getLiveTable({ doc, collections }: Pick<RootState, 'doc' | 'collections'>, tableId: string): Table | undefined;
|
|
47
|
+
/** The relationship, while the document holds it. */
|
|
48
|
+
export declare function getLiveRelationship({ doc, collections }: Pick<RootState, 'doc' | 'collections'>, relationshipId: string): Relationship | undefined;
|
|
49
|
+
/** Whether the column is one of the live table's, not one removed from it. */
|
|
50
|
+
export declare const isLiveColumn: (table: Table | undefined, columnId: string) => boolean;
|
|
51
|
+
/** Two lists holding the same ids, however ordered or repeated. */
|
|
52
|
+
export declare function sameSet(a: string[], b: string[]): boolean;
|
|
53
|
+
/** Two lists holding the same ids once each, however ordered. */
|
|
54
|
+
export declare const sameMembers: (a: string[], b: string[]) => boolean;
|
|
55
|
+
/** The ids a list holds more than once. */
|
|
56
|
+
export declare function repeatedIds(ids: string[]): Set<string>;
|
|
57
|
+
/** Lists of one length that repeat no id, which pair by place into one key reference. */
|
|
58
|
+
export declare const isNormalMapping: ({ start, end }: ColumnMapping) => boolean;
|
|
59
|
+
/** Two mappings pairing the same columns, in whatever order they list the pairs. */
|
|
60
|
+
export declare const samePairs: (a: ColumnMapping, b: ColumnMapping) => boolean;
|
|
61
|
+
/** Whether the relationship's own lists are normal and pair what the mapping pairs. */
|
|
62
|
+
export declare function holdsPairs(relationship: Relationship, mapping: ColumnMapping): boolean;
|
|
63
|
+
/** The child column each picked row maps to, in row order. */
|
|
64
|
+
export declare const toPickedColumnIds: (rows: MappingRow[]) => string[];
|
|
65
|
+
/** The child columns the other rows hold, which a row's own list shows in use. */
|
|
66
|
+
export declare const getUsedColumnIds: (rows: MappingRow[], rowIndex: number) => Set<string>;
|
|
67
|
+
//# sourceMappingURL=mapping.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { Table } from '../../internal-types';
|
|
3
|
+
import { CandidateKey } from './candidateKeys';
|
|
4
|
+
import { ColumnPick } from './mapping';
|
|
5
|
+
/**
|
|
6
|
+
* The names a child column may hold to reference the parent column, compared
|
|
7
|
+
* without case: the name a new foreign key column would take, that name from
|
|
8
|
+
* the table name without its schema, and for a unique key the column's own.
|
|
9
|
+
*/
|
|
10
|
+
export declare function toPrefillNames(tableName: string, columnName: string, bracketType: number, unique: boolean): Set<string>;
|
|
11
|
+
export type PrefillInput = {
|
|
12
|
+
parentTable: Table;
|
|
13
|
+
childTable: Table;
|
|
14
|
+
keyKind: CandidateKey['kind'];
|
|
15
|
+
rows: Array<{
|
|
16
|
+
parentColumnId: string;
|
|
17
|
+
pick: ColumnPick | null;
|
|
18
|
+
}>;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Picks a child column for each empty row, in row order, where exactly one
|
|
22
|
+
* column holds a name of toPrefillNames; never the parent column itself, nor
|
|
23
|
+
* one a row holds or an earlier row was just given. Only the fills come back.
|
|
24
|
+
*/
|
|
25
|
+
export declare function prefillPicks({ collections, settings }: Pick<RootState, 'collections' | 'settings'>, { parentTable, childTable, keyKind, rows }: PrefillInput): Record<string, ColumnPick>;
|
|
26
|
+
//# sourceMappingURL=prefill.d.ts.map
|