@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
package/dist/utils/emitter.d.ts
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import { Action, AnyAction, DOMTemplateLiterals } from '@dineug/r-html';
|
|
2
2
|
import { TablePlacement } from '../constants/tablePlacement';
|
|
3
|
+
import { LocaleOption } from '../i18n/locales';
|
|
3
4
|
import { ValuesType } from '../internal-types';
|
|
4
5
|
import { ThemeOptions } from '../themes/radix-ui-theme';
|
|
5
6
|
import { GeometrySource } from './draw-relationship/geometrySource';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
/**
|
|
8
|
+
* What Map Columns opens on: a relationship drawn between two tables and not
|
|
9
|
+
* made yet, or one the document holds whose columns it changes.
|
|
10
|
+
*/
|
|
11
|
+
export type MapColumnsOpening = {
|
|
12
|
+
mode: 'create';
|
|
13
|
+
startTableId: string;
|
|
14
|
+
endTableId: string;
|
|
15
|
+
relationshipType: number;
|
|
16
|
+
} | {
|
|
17
|
+
mode: 'edit';
|
|
18
|
+
relationshipId: string;
|
|
11
19
|
};
|
|
12
20
|
declare const InternalActionType: {
|
|
13
21
|
readonly openColorPicker: "openColorPicker";
|
|
@@ -17,11 +25,14 @@ declare const InternalActionType: {
|
|
|
17
25
|
readonly dragendColumnAll: "dragendColumnAll";
|
|
18
26
|
readonly copy: "copy";
|
|
19
27
|
readonly paste: "paste";
|
|
20
|
-
readonly schemaGC: "schemaGC";
|
|
21
28
|
readonly toggleSearch: "toggleSearch";
|
|
22
29
|
readonly openFindReplace: "openFindReplace";
|
|
30
|
+
readonly openExportImage: "openExportImage";
|
|
31
|
+
readonly openMapColumns: "openMapColumns";
|
|
23
32
|
readonly openThemeBuilder: "openThemeBuilder";
|
|
24
33
|
readonly setThemeOptions: "setThemeOptions";
|
|
34
|
+
readonly openLocalePicker: "openLocalePicker";
|
|
35
|
+
readonly setLocaleOption: "setLocaleOption";
|
|
25
36
|
readonly mouseTrackerStart: "mouseTrackerStart";
|
|
26
37
|
readonly mouseTrackerEnd: "mouseTrackerEnd";
|
|
27
38
|
readonly openDiffViewer: "openDiffViewer";
|
|
@@ -40,6 +51,8 @@ type InternalActionMap = {
|
|
|
40
51
|
[InternalActionType.openToast]: {
|
|
41
52
|
message: DOMTemplateLiterals;
|
|
42
53
|
close?: Promise<void>;
|
|
54
|
+
/** One toast per key: a toast opened under a key already up takes its place. */
|
|
55
|
+
key?: string;
|
|
43
56
|
};
|
|
44
57
|
[InternalActionType.openTableProperties]: {
|
|
45
58
|
tableId: string;
|
|
@@ -51,11 +64,16 @@ type InternalActionMap = {
|
|
|
51
64
|
[InternalActionType.paste]: {
|
|
52
65
|
event: ClipboardEvent;
|
|
53
66
|
};
|
|
54
|
-
[InternalActionType.schemaGC]: void;
|
|
55
67
|
[InternalActionType.toggleSearch]: void;
|
|
56
|
-
[InternalActionType.openFindReplace]:
|
|
68
|
+
[InternalActionType.openFindReplace]: void;
|
|
69
|
+
[InternalActionType.openExportImage]: void;
|
|
70
|
+
[InternalActionType.openMapColumns]: MapColumnsOpening;
|
|
57
71
|
[InternalActionType.openThemeBuilder]: void;
|
|
58
72
|
[InternalActionType.setThemeOptions]: Partial<ThemeOptions>;
|
|
73
|
+
[InternalActionType.openLocalePicker]: void;
|
|
74
|
+
[InternalActionType.setLocaleOption]: {
|
|
75
|
+
locale: LocaleOption;
|
|
76
|
+
};
|
|
59
77
|
[InternalActionType.mouseTrackerStart]: void;
|
|
60
78
|
[InternalActionType.mouseTrackerEnd]: void;
|
|
61
79
|
[InternalActionType.openDiffViewer]: {
|
|
@@ -105,9 +123,13 @@ export declare const openToastAction: {
|
|
|
105
123
|
(payload: {
|
|
106
124
|
message: DOMTemplateLiterals;
|
|
107
125
|
close?: Promise<void>;
|
|
126
|
+
/** One toast per key: a toast opened under a key already up takes its place. */
|
|
127
|
+
key?: string;
|
|
108
128
|
}): AnyAction<{
|
|
109
129
|
message: DOMTemplateLiterals;
|
|
110
130
|
close?: Promise<void>;
|
|
131
|
+
/** One toast per key: a toast opened under a key already up takes its place. */
|
|
132
|
+
key?: string;
|
|
111
133
|
}>;
|
|
112
134
|
toString(): string;
|
|
113
135
|
type: string;
|
|
@@ -144,18 +166,23 @@ export declare const pasteAction: {
|
|
|
144
166
|
toString(): string;
|
|
145
167
|
type: string;
|
|
146
168
|
};
|
|
147
|
-
export declare const
|
|
169
|
+
export declare const toggleSearchAction: {
|
|
148
170
|
(payload: void): AnyAction<void>;
|
|
149
171
|
toString(): string;
|
|
150
172
|
type: string;
|
|
151
173
|
};
|
|
152
|
-
export declare const
|
|
174
|
+
export declare const openFindReplaceAction: {
|
|
153
175
|
(payload: void): AnyAction<void>;
|
|
154
176
|
toString(): string;
|
|
155
177
|
type: string;
|
|
156
178
|
};
|
|
157
|
-
export declare const
|
|
158
|
-
(payload: void
|
|
179
|
+
export declare const openExportImageAction: {
|
|
180
|
+
(payload: void): AnyAction<void>;
|
|
181
|
+
toString(): string;
|
|
182
|
+
type: string;
|
|
183
|
+
};
|
|
184
|
+
export declare const openMapColumnsAction: {
|
|
185
|
+
(payload: MapColumnsOpening): AnyAction<MapColumnsOpening>;
|
|
159
186
|
toString(): string;
|
|
160
187
|
type: string;
|
|
161
188
|
};
|
|
@@ -169,6 +196,20 @@ export declare const setThemeOptionsAction: {
|
|
|
169
196
|
toString(): string;
|
|
170
197
|
type: string;
|
|
171
198
|
};
|
|
199
|
+
export declare const openLocalePickerAction: {
|
|
200
|
+
(payload: void): AnyAction<void>;
|
|
201
|
+
toString(): string;
|
|
202
|
+
type: string;
|
|
203
|
+
};
|
|
204
|
+
export declare const setLocaleOptionAction: {
|
|
205
|
+
(payload: {
|
|
206
|
+
locale: LocaleOption;
|
|
207
|
+
}): AnyAction<{
|
|
208
|
+
locale: LocaleOption;
|
|
209
|
+
}>;
|
|
210
|
+
toString(): string;
|
|
211
|
+
type: string;
|
|
212
|
+
};
|
|
172
213
|
export declare const mouseTrackerStartAction: {
|
|
173
214
|
(payload: void): AnyAction<void>;
|
|
174
215
|
toString(): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DocumentPngOptions } from '../../services/export-png';
|
|
1
|
+
import { DocumentPngOptions, DocumentSvgOptions } from '../../services/export-png';
|
|
2
2
|
type ExportOptions = {
|
|
3
3
|
fileName: string;
|
|
4
4
|
};
|
|
@@ -6,14 +6,24 @@ type ExportFileCallback = (blob: Blob, options: ExportOptions) => void;
|
|
|
6
6
|
export declare function setExportFileCallback(callback: ExportFileCallback | null): void;
|
|
7
7
|
export declare function exportJSON(json: string, name?: string): void;
|
|
8
8
|
export declare function exportSchemaSQL(sql: string, name?: string): void;
|
|
9
|
+
/** The Code Generator's text, named as the other exports are, with its language's extension. */
|
|
10
|
+
export declare function exportCode(code: string, extension: string, name?: string): void;
|
|
9
11
|
/**
|
|
10
|
-
* Writes the whole document out as an image, at
|
|
11
|
-
* it at. The scene is rendered again off screen rather than captured,
|
|
12
|
-
* file holds the whole document however far it was scrolled away from.
|
|
12
|
+
* Writes the whole document out as an image, at 100% whatever zoom the author
|
|
13
|
+
* is reading it at. The scene is rendered again off screen rather than captured,
|
|
14
|
+
* so the file holds the whole document however far it was scrolled away from.
|
|
13
15
|
*
|
|
14
16
|
* @example
|
|
15
|
-
* exportPNG({ doc: toJson(store.state), theme, toWidth
|
|
17
|
+
* exportPNG({ doc: toJson(store.state), theme, toWidth }, databaseName);
|
|
16
18
|
*/
|
|
17
19
|
export declare function exportPNG(options: DocumentPngOptions, name?: string): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Writes the whole document out as an svg, at 100% and with no scale, drawn
|
|
22
|
+
* again off screen the way the png is.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* exportSVG({ doc: toJson(store.state), theme, toWidth }, databaseName);
|
|
26
|
+
*/
|
|
27
|
+
export declare function exportSVG(options: DocumentSvgOptions, name?: string): Promise<void>;
|
|
18
28
|
export {};
|
|
19
29
|
//# sourceMappingURL=exportFile.d.ts.map
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import { AppContext } from '../../components/appContext';
|
|
2
|
+
/** Whether an import takes the document's place or joins it below the diagram. */
|
|
3
|
+
export type ImportMode = 'replace' | 'append';
|
|
2
4
|
type ImportOptions = {
|
|
3
5
|
type: 'json' | 'sql' | 'graphql' | 'dbml' | 'aml';
|
|
4
6
|
op: 'set' | 'diff';
|
|
5
7
|
accept: string;
|
|
8
|
+
/** Named only for an append, so a host that knows no mode replaces as before. */
|
|
9
|
+
mode?: ImportMode;
|
|
6
10
|
};
|
|
7
11
|
type ImportFileCallback = (options: ImportOptions) => void;
|
|
8
12
|
export declare function setImportFileCallback(callback: ImportFileCallback | null): void;
|
|
9
|
-
export declare function importJSON(
|
|
10
|
-
export declare function importSchemaSQL(
|
|
11
|
-
export declare function importGraphQL(
|
|
12
|
-
export declare function importDBML(
|
|
13
|
-
export declare function importAML(
|
|
13
|
+
export declare function importJSON(app: AppContext, mode?: ImportMode): void;
|
|
14
|
+
export declare function importSchemaSQL(app: AppContext, mode?: ImportMode): void;
|
|
15
|
+
export declare function importGraphQL(app: AppContext, mode?: ImportMode): void;
|
|
16
|
+
export declare function importDBML(app: AppContext, mode?: ImportMode): void;
|
|
17
|
+
export declare function importAML(app: AppContext, mode?: ImportMode): void;
|
|
14
18
|
export declare function importDiffJSON({ emitter }: AppContext): void;
|
|
15
19
|
export {};
|
|
16
20
|
//# sourceMappingURL=importFile.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { AppContext } from '../../components/appContext';
|
|
2
|
+
import { SchemaImportType } from '../../engine/modules/editor/generator.actions';
|
|
3
|
+
/**
|
|
4
|
+
* Replaces the document with an import whose tables stand in the grid, in
|
|
5
|
+
* one dispatch, as the element's setters always did.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* importSchema(app, 'sql', value);
|
|
9
|
+
*/
|
|
10
|
+
export declare function importSchema({ store }: AppContext, type: SchemaImportType, value: string): void;
|
|
11
|
+
/**
|
|
12
|
+
* Replaces the document with an import Flow placed first, in one dispatch:
|
|
13
|
+
* one undo puts the previous document back and no grid shows in between. A
|
|
14
|
+
* load or another placed replace meanwhile supersedes it and nothing lands.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* await importSchemaPlaced(app, 'sql', value);
|
|
18
|
+
*/
|
|
19
|
+
export declare function importSchemaPlaced(app: AppContext, type: SchemaImportType, value: string): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Adds an import to the document below the diagram, its tables in the grid,
|
|
22
|
+
* in one dispatch, leaving every table and setting already there as it is.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* appendSchema(app, 'sql', value);
|
|
26
|
+
*/
|
|
27
|
+
export declare function appendSchema(app: AppContext, type: SchemaImportType, value: string): void;
|
|
28
|
+
/**
|
|
29
|
+
* Adds an .erd.json document to this one below the diagram, its tables and
|
|
30
|
+
* memos standing apart as the file has them, its settings left out.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* appendSchemaJSON(app, value);
|
|
34
|
+
*/
|
|
35
|
+
export declare function appendSchemaJSON(app: AppContext, value: string): void;
|
|
36
|
+
/**
|
|
37
|
+
* Adds an import Flow placed first below the diagram, in one dispatch, after
|
|
38
|
+
* every placed import started before it. The diagram is read as it lands, so a
|
|
39
|
+
* table moved meanwhile is cleared; a load or a later placed replace drops it.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* await appendSchemaPlaced(app, 'sql', value);
|
|
43
|
+
*/
|
|
44
|
+
export declare function appendSchemaPlaced(app: AppContext, type: SchemaImportType, value: string): Promise<void>;
|
|
45
|
+
//# sourceMappingURL=importSchema.d.ts.map
|
|
@@ -8,20 +8,22 @@ export declare const FindField: {
|
|
|
8
8
|
readonly columnName: "columnName";
|
|
9
9
|
readonly columnComment: "columnComment";
|
|
10
10
|
readonly memo: "memo";
|
|
11
|
+
readonly indexName: "indexName";
|
|
12
|
+
readonly tableGroupName: "tableGroupName";
|
|
11
13
|
};
|
|
12
14
|
export type FindField = ValuesType<typeof FindField>;
|
|
13
15
|
export declare const FindFieldList: ReadonlyArray<FindField>;
|
|
14
16
|
/**
|
|
15
|
-
* The kinds of text Find and Replace first opens on, the names of
|
|
16
|
-
* columns
|
|
17
|
-
* should not reach unasked.
|
|
17
|
+
* The kinds of text Find and Replace first opens on, the names alone of
|
|
18
|
+
* tables, columns, indexes and table groups (an owner decision): a comment or
|
|
19
|
+
* memo is prose a rename should not reach unasked. No fields reads every kind.
|
|
18
20
|
*/
|
|
19
21
|
export declare const DEFAULT_FIND_FIELDS: ReadonlyArray<FindField>;
|
|
20
22
|
export type FindMatch = {
|
|
21
23
|
field: FindField;
|
|
22
|
-
/** The entity holding the text: a table, a column or a memo. */
|
|
24
|
+
/** The entity holding the text: a table, a column, an index, a table group or a memo. */
|
|
23
25
|
id: string;
|
|
24
|
-
/** The table of a table or
|
|
26
|
+
/** The table of a table, column or index field; empty for a memo or a table group. */
|
|
25
27
|
tableId: string;
|
|
26
28
|
/** Where the field stands in the walk, so a match keeps its place when its text changes. */
|
|
27
29
|
slot: number;
|
|
@@ -37,19 +39,30 @@ type Field = Omit<FindMatch, 'start' | 'end'>;
|
|
|
37
39
|
*/
|
|
38
40
|
export declare const FindTextActionTypes: ReadonlyArray<ActionType>;
|
|
39
41
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
42
|
+
* The order a walk takes the tables and the table groups in. A search on the
|
|
43
|
+
* tree reads them by name; a run of Replace presses keeps the order it began
|
|
44
|
+
* with, so a rename that moves a table in the name order is not met again.
|
|
43
45
|
*/
|
|
44
|
-
export
|
|
46
|
+
export type FieldOrder = {
|
|
47
|
+
tableIds: ReadonlyArray<string>;
|
|
48
|
+
tableGroupIds: ReadonlyArray<string>;
|
|
49
|
+
};
|
|
50
|
+
/** The tables and the table groups by name, as the tree lists them, ties in document order. */
|
|
51
|
+
export declare function treeOrderOf({ doc, collections }: RootState): FieldOrder;
|
|
52
|
+
/**
|
|
53
|
+
* Every text field the fields given cover: each table's name and comment,
|
|
54
|
+
* its columns' names and comments and its index names, then the table groups'
|
|
55
|
+
* names and the memos, in document order or in the order given.
|
|
56
|
+
*/
|
|
57
|
+
export declare function walkFields(state: RootState, fields: ReadonlyArray<FindField>, order?: FieldOrder): Field[];
|
|
45
58
|
/**
|
|
46
59
|
* Every occurrence the matcher finds in the fields given, one entry each, in
|
|
47
|
-
* document order.
|
|
60
|
+
* document order or in the order given.
|
|
48
61
|
*
|
|
49
62
|
* @example
|
|
50
63
|
* findMatches(store.state, matcher, [FindField.columnName]);
|
|
51
64
|
*/
|
|
52
|
-
export declare function findMatches(state: RootState, matcher: Matcher, fields?: ReadonlyArray<FindField
|
|
65
|
+
export declare function findMatches(state: RootState, matcher: Matcher, fields?: ReadonlyArray<FindField>, order?: FieldOrder): FindMatch[];
|
|
53
66
|
/**
|
|
54
67
|
* The matches as they will stand once the field a match was found in holds a
|
|
55
68
|
* new value, before the store has it: that field searched again in the value,
|
|
@@ -76,7 +89,7 @@ export type ReplaceRun = Pick<FindMatch, 'field' | 'id' | 'slot' | 'start'> & {
|
|
|
76
89
|
* table added or removed before it moves that, or null once the field is gone
|
|
77
90
|
* or holds a text the run did not leave, after an undo or a peer's edit say.
|
|
78
91
|
*/
|
|
79
|
-
export declare function resumeRun(state: RootState, fields: ReadonlyArray<FindField>, run: ReplaceRun | null): ReplaceRun | null;
|
|
92
|
+
export declare function resumeRun(state: RootState, fields: ReadonlyArray<FindField>, run: ReplaceRun | null, order?: FieldOrder): ReplaceRun | null;
|
|
80
93
|
/**
|
|
81
94
|
* Where a Replace goes on to once it has written value in place of a match:
|
|
82
95
|
* the first match past what it wrote, wrapping to the first, or minus one once
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { RootState } from '../../engine/state';
|
|
2
|
+
import { I18n, PlainMessageKey } from '../../i18n/translate';
|
|
2
3
|
import { FindField, FindMatch } from './findMatches';
|
|
3
|
-
|
|
4
|
+
/** The kind of text a match was found in, as its result row names it. */
|
|
5
|
+
export declare const FindFieldLabel: Record<FindField, PlainMessageKey>;
|
|
4
6
|
/**
|
|
5
|
-
* Where a match sits, as a reader finds it on the canvas: the table,
|
|
6
|
-
* table and column, and nothing for a memo
|
|
7
|
+
* Where a match sits, as a reader finds it on the canvas: the table, the
|
|
8
|
+
* table and column, the table an index belongs to, and nothing for a memo or
|
|
9
|
+
* a table group, which stand on their own.
|
|
7
10
|
*/
|
|
8
|
-
export declare function locationOf({ collections }: RootState, { field, id, tableId }: FindMatch): string;
|
|
11
|
+
export declare function locationOf({ collections }: RootState, { field, id, tableId }: FindMatch, i18n?: Pick<I18n, 't'>): string;
|
|
9
12
|
/** A result row's second line: where the match sits, then the kind of text it was found in. */
|
|
10
|
-
export declare function describeMatch(state: RootState, match: FindMatch): string;
|
|
13
|
+
export declare function describeMatch(state: RootState, match: FindMatch, i18n?: Pick<I18n, 't'>): string;
|
|
11
14
|
export type Snippet = {
|
|
12
15
|
text: string;
|
|
13
16
|
start: number;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The replacement cased the way the text it replaces is, as VS Code's Preserve
|
|
3
|
+
* Case does: all upper, all lower or by the first letter, and piece by piece
|
|
4
|
+
* across the hyphens or the underscores both split into as many pieces by.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* preserveCase('USER_ID', 'account_key'); // 'ACCOUNT_KEY'
|
|
8
|
+
*/
|
|
9
|
+
export declare function preserveCase(matched: string, replacement: string): string;
|
|
10
|
+
//# sourceMappingURL=preserveCase.d.ts.map
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { PrimitiveType } from '../../constants/sql/dataType';
|
|
2
|
+
/**
|
|
3
|
+
* The value a column's element holds, apart from any driver or library that
|
|
4
|
+
* reads it: integers by width and sign, floats by width, each date and time.
|
|
5
|
+
*/
|
|
6
|
+
export type ColumnScalar = 'bool' | 'i8' | 'i16' | 'i32' | 'i64' | 'u8' | 'u16' | 'u32' | 'u64' | 'f32' | 'f64' | 'decimal' | 'string' | 'bytes' | 'uuid' | 'json' | 'date' | 'time' | 'timeTz' | 'dateTime' | 'dateTimeUtc' | 'dateTimeOffset' | 'interval';
|
|
7
|
+
/** The fields an interval holds: years and months, days to seconds, or both. */
|
|
8
|
+
export type IntervalFields = 'yearMonth' | 'dayTime' | 'mixed';
|
|
9
|
+
/** A network address type, by what it holds. */
|
|
10
|
+
export type NetworkType = 'ipv4' | 'ipv6' | 'inet' | 'cidr' | 'macaddr' | 'macaddr8';
|
|
11
|
+
export type ColumnType = {
|
|
12
|
+
scalar: ColumnScalar;
|
|
13
|
+
/** The element's data type as written, a PostgreSQL array's suffix gone. */
|
|
14
|
+
element: string;
|
|
15
|
+
/**
|
|
16
|
+
* The element's type name, lower case, its arguments gone, and on MySQL and
|
|
17
|
+
* MariaDB its UNSIGNED, ZEROFILL and SIGNED too.
|
|
18
|
+
*/
|
|
19
|
+
base: string;
|
|
20
|
+
/** The element's arguments when all are numbers: numeric(10,2) gives [10, 2]. */
|
|
21
|
+
args: number[];
|
|
22
|
+
arrayDepth: number;
|
|
23
|
+
/** An integer's width, 24 for MySQL's MEDIUMINT; null for any other scalar. */
|
|
24
|
+
bits: 8 | 16 | 24 | 32 | 64 | null;
|
|
25
|
+
/** Whether the database's vendor list names the element's type. */
|
|
26
|
+
isListed: boolean;
|
|
27
|
+
/** MySQL and MariaDB: UNSIGNED, ZEROFILL or SERIAL in the type. */
|
|
28
|
+
isUnsigned: boolean;
|
|
29
|
+
/** A type that numbers its rows itself: PostgreSQL's serials, MySQL's SERIAL. */
|
|
30
|
+
isSerial: boolean;
|
|
31
|
+
isFloat: boolean;
|
|
32
|
+
/** money or smallmoney, which PostgreSQL prints in the session's currency. */
|
|
33
|
+
isMoney: boolean;
|
|
34
|
+
/** SQL Server's uniqueidentifier, which holds any 16 bytes, not only an RFC UUID. */
|
|
35
|
+
isGuid: boolean;
|
|
36
|
+
/** SQL Server's timestamp and rowversion, eight bytes it writes on every change. */
|
|
37
|
+
isRowVersion: boolean;
|
|
38
|
+
/** A Snowflake or Databricks VARIANT, OBJECT, ARRAY, MAP or STRUCT. */
|
|
39
|
+
isSemiStructured: boolean;
|
|
40
|
+
/** A PostgreSQL bit string, which drivers read as text such as 1010. */
|
|
41
|
+
isBitString: boolean;
|
|
42
|
+
/** PostgreSQL's xid, cid and xid8, integers node-postgres hands over as text. */
|
|
43
|
+
isTextInteger: boolean;
|
|
44
|
+
/** Databricks' VOID, which holds nothing but NULL. */
|
|
45
|
+
isNullOnly: boolean;
|
|
46
|
+
/** A character type's declared length, BYTE or CHAR units alike; else null. */
|
|
47
|
+
length: number | null;
|
|
48
|
+
/** A decimal or NUMBER's declared precision, a star being 38; else null. */
|
|
49
|
+
precision: number | null;
|
|
50
|
+
/** A decimal or NUMBER's declared scale; null where none is written. */
|
|
51
|
+
scale: number | null;
|
|
52
|
+
interval: IntervalFields | null;
|
|
53
|
+
network: NetworkType | null;
|
|
54
|
+
/** An ENUM's members, each read as MySQL reads a string literal. */
|
|
55
|
+
enumMembers: string[] | null;
|
|
56
|
+
/** A SET's members, each read as MySQL reads a string literal. */
|
|
57
|
+
setMembers: string[] | null;
|
|
58
|
+
};
|
|
59
|
+
/** The binary types, which every database hands over as bytes. */
|
|
60
|
+
export declare const BINARY_TYPES: ReadonlySet<string>;
|
|
61
|
+
export declare const UUID_TYPES: ReadonlySet<string>;
|
|
62
|
+
export declare const JSON_TYPES: ReadonlySet<string>;
|
|
63
|
+
/** The timestamps that keep their offset, or an instant read with one. */
|
|
64
|
+
export declare const TIMESTAMP_TZ_TYPES: ReadonlySet<string>;
|
|
65
|
+
/** An instant the database shows in the session's zone, as MySQL's TIMESTAMP. */
|
|
66
|
+
export declare const TIMESTAMP_LTZ_TYPES: ReadonlySet<string>;
|
|
67
|
+
export declare const MONEY_TYPES: ReadonlySet<string>;
|
|
68
|
+
/** PostgreSQL's bit strings, which its drivers read as text such as 1010. */
|
|
69
|
+
export declare const POSTGRES_BIT_TYPES: ReadonlySet<string>;
|
|
70
|
+
export declare const POSTGRES_TIME_TZ_TYPES: ReadonlySet<string>;
|
|
71
|
+
/** PostgreSQL's system identifiers: xid8 is 64 bits, the others 32. */
|
|
72
|
+
export declare const POSTGRES_OBJECT_ID_TYPES: ReadonlySet<string>;
|
|
73
|
+
export declare const POSTGRES_SERIAL_TYPES: ReadonlySet<string>;
|
|
74
|
+
/** The character types a length argument bounds, in characters or bytes. */
|
|
75
|
+
export declare const CHARACTER_TYPES: ReadonlySet<string>;
|
|
76
|
+
/**
|
|
77
|
+
* What a column's type holds on a database, read by type name before the
|
|
78
|
+
* vendor lists, which only file each name under one of eleven categories.
|
|
79
|
+
*/
|
|
80
|
+
export declare function getColumnType(dataType: string, database: number): ColumnType;
|
|
81
|
+
/** MySQL and MariaDB: whether UNSIGNED, ZEROFILL or SERIAL makes a type unsigned. */
|
|
82
|
+
export declare function isUnsigned(dataType: string, database: number): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* An ENUM's or SET's members, each read as MySQL reads a string literal in
|
|
85
|
+
* either quote; null where the list holds anything else or nothing.
|
|
86
|
+
*/
|
|
87
|
+
export declare function enumMembers(dataType: string): string[] | null;
|
|
88
|
+
/** A PostgreSQL array's element type and its number of dimensions. */
|
|
89
|
+
export declare function splitPostgresArray(dataType: string, database: number): [element: string, depth: number];
|
|
90
|
+
/** A type's first argument list when every argument is a number. */
|
|
91
|
+
export declare function typeArguments(dataType: string): number[];
|
|
92
|
+
export declare function isMySQLFamily(database: number): boolean;
|
|
93
|
+
/**
|
|
94
|
+
* The scalar a type's base name gives on a database at the width the name
|
|
95
|
+
* declares, by the rules by name and then by the category primitiveOf files
|
|
96
|
+
* the type under; getColumnType widens what Oracle, Snowflake and SQLite store.
|
|
97
|
+
*/
|
|
98
|
+
export declare function columnScalar(element: string, base: string, args: number[], database: number, isUnsigned: boolean, primitiveOf?: (dataType: string, database: number) => PrimitiveType): ColumnScalar;
|
|
99
|
+
//# sourceMappingURL=columnTypes.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { Table } from '../../internal-types';
|
|
3
|
+
export declare function createCode(state: RootState): string;
|
|
4
|
+
/** One table's entity under the header and the use statements it needs. */
|
|
5
|
+
export declare function createTableCode(state: RootState, table: Table): string;
|
|
6
|
+
//# sourceMappingURL=doctrine.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every word DBAL 4 lists as reserved on MySQL, MariaDB, PostgreSQL, SQL
|
|
3
|
+
* Server, Oracle or SQLite, in lower case: Doctrine quotes such a name in the
|
|
4
|
+
* DDL it writes but in a query only when the mapping marks it with backticks.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DOCTRINE_RESERVED_WORDS: ReadonlySet<string>;
|
|
7
|
+
//# sourceMappingURL=doctrineReservedWords.d.ts.map
|
|
@@ -2,4 +2,10 @@ 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
|
+
/**
|
|
6
|
+
* The name before a last word id, in any case, the separator before it
|
|
7
|
+
* dropped, words split as isSingleWord splits them; null where id is not a
|
|
8
|
+
* word of its own, or is the only one.
|
|
9
|
+
*/
|
|
10
|
+
export declare function stripIdWord(name: string): string | null;
|
|
5
11
|
//# sourceMappingURL=graphql.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** heck's to_snake_case, which SeaORM's derive macros name columns by. */
|
|
2
|
+
export declare function toSnakeCase(value: string): string;
|
|
3
|
+
/** heck's to_upper_camel_case, which SeaORM's derive macros name variants by. */
|
|
4
|
+
export declare function toUpperCamelCase(value: string): string;
|
|
5
|
+
//# sourceMappingURL=heck.d.ts.map
|
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
import { RootState } from '../../engine/state';
|
|
2
2
|
import { FormatTableOptions } from './utils';
|
|
3
|
+
/**
|
|
4
|
+
* A column element's type on the JVM, named as Java writes it but for bytes,
|
|
5
|
+
* which Java, Kotlin and Scala each spell their own way.
|
|
6
|
+
*/
|
|
7
|
+
export type JvmType = 'BigDecimal' | 'Boolean' | 'Byte' | 'bytes' | 'Double' | 'Duration' | 'Float' | 'Integer' | 'LocalDate' | 'LocalDateTime' | 'LocalTime' | 'Long' | 'OffsetDateTime' | 'OffsetTime' | 'Short' | 'String' | 'UUID';
|
|
8
|
+
export type JvmColumnType = {
|
|
9
|
+
type: JvmType;
|
|
10
|
+
/** PostgreSQL array dimensions, each one array or list level around the type. */
|
|
11
|
+
arrayDepth: number;
|
|
12
|
+
};
|
|
3
13
|
export declare function createCode(state: RootState): string;
|
|
4
14
|
export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
|
|
15
|
+
/** The JVM type of a column on a database, from the shared column classifier. */
|
|
16
|
+
export declare function getJvmType(dataType: string, database: number): JvmColumnType;
|
|
17
|
+
/**
|
|
18
|
+
* A field name, with an underscore after a reserved word and after a name
|
|
19
|
+
* that breaks the class Lombok completes.
|
|
20
|
+
*/
|
|
21
|
+
export declare function toJavaFieldName(name: string): string;
|
|
22
|
+
export declare function toJavaClassName(name: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* javac reads a backslash and u as a Unicode escape even in a comment, where
|
|
25
|
+
* a bad one fails the compile; an even run of backslashes starts none.
|
|
26
|
+
*/
|
|
27
|
+
export declare function escapeUnicodeEscapes(value: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* A comment as line comments, one for each of its lines, its blank first and
|
|
30
|
+
* last lines dropped; nothing for a comment that is only whitespace.
|
|
31
|
+
*/
|
|
32
|
+
export declare function formatLineComment(buffer: string[], indent: string, comment: string, escape?: (line: string) => string): void;
|
|
5
33
|
//# sourceMappingURL=java.d.ts.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { Table } from '../../internal-types';
|
|
3
|
+
import { JsonShape } from './jsonShape';
|
|
4
|
+
export type JsonScalar = string | number | boolean | null;
|
|
5
|
+
/**
|
|
6
|
+
* An object as a Map, which keeps every key where it was set, __proto__ and
|
|
7
|
+
* integer-like keys too, where a plain object loses or reorders them.
|
|
8
|
+
*/
|
|
9
|
+
export type JsonObject = Map<string, JsonValue>;
|
|
10
|
+
export type JsonValue = JsonScalar | JsonScalar[] | JsonObject;
|
|
11
|
+
export declare const DIALECT = "https://json-schema.org/draft/2020-12/schema";
|
|
12
|
+
/**
|
|
13
|
+
* A time of day with no offset, as z.iso.time() takes it, written with [0-9]
|
|
14
|
+
* since \d matches any script's decimal digits in a Python or .NET validator.
|
|
15
|
+
*/
|
|
16
|
+
export declare const TIME_PATTERN = "^(?:[01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\\.[0-9]+)?)?$";
|
|
17
|
+
/**
|
|
18
|
+
* A date and time with no offset; the Z a driver's Date.prototype.toJSON adds
|
|
19
|
+
* passes after seconds, as z.iso.datetime({ local: true }) lets it.
|
|
20
|
+
*/
|
|
21
|
+
export declare const NAIVE_DATE_TIME_PATTERN = "^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])T(?:[01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\\.[0-9]+)?Z?)?$";
|
|
22
|
+
/** Every table's row schema under $defs, keyed by the cased table name. */
|
|
23
|
+
export declare function createCode(state: RootState): string;
|
|
24
|
+
/** One table's row schema standing alone, its name never numbered. */
|
|
25
|
+
export declare function createTableCode(state: RootState, table: Table): string;
|
|
26
|
+
/**
|
|
27
|
+
* Each table's key: a name met again is numbered from 2, past every name a
|
|
28
|
+
* table takes as is, so a table named user2 keeps User2 beside two users.
|
|
29
|
+
*/
|
|
30
|
+
export declare function toDefinitionKeys(names: string[]): string[];
|
|
31
|
+
/** The schema of one value of a column, NOT NULL, with no description. */
|
|
32
|
+
export declare function toValueSchema(shape: JsonShape): JsonObject;
|
|
33
|
+
/**
|
|
34
|
+
* A schema that takes null too: null joins its type, and its enum, which
|
|
35
|
+
* refuses a value it does not list; a schema with no type takes null already.
|
|
36
|
+
*/
|
|
37
|
+
export declare function withNull(schema: JsonObject): JsonObject;
|
|
38
|
+
/**
|
|
39
|
+
* JSON as Prettier writes it: two spaces a level, an object one key a line,
|
|
40
|
+
* and an array on one line while that line fits in 80 columns, its comma
|
|
41
|
+
* counted only where another key follows, else one item a line.
|
|
42
|
+
*/
|
|
43
|
+
export declare function formatJson(object: JsonObject, indent?: string): string;
|
|
44
|
+
/**
|
|
45
|
+
* Columns a string takes on a line, a code point at a time as Prettier counts:
|
|
46
|
+
* two for a wide or fullwidth one or an emoji that takes a skin tone, none for
|
|
47
|
+
* a control, a combining mark U+0300-U+036F or a variation selector, else one.
|
|
48
|
+
*/
|
|
49
|
+
export declare function textWidth(text: string): number;
|
|
50
|
+
//# sourceMappingURL=jsonSchema.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Column } from '../../internal-types';
|
|
2
|
+
/**
|
|
3
|
+
* What one value of a column looks like in JSON, as an API sends a row: dates
|
|
4
|
+
* and times as ISO text, a decimal as a string, binary as base64.
|
|
5
|
+
*/
|
|
6
|
+
export type JsonShapeKind = 'boolean' | 'integer' | 'number' | 'string' | 'uuid' | 'guid' | 'date' | 'time' | 'naiveDateTime' | 'offsetDateTime' | 'base64' | 'json' | 'enum' | 'ipv4' | 'ipv6' | 'null';
|
|
7
|
+
export type JsonShape = {
|
|
8
|
+
kind: JsonShapeKind;
|
|
9
|
+
/** An integer's least value; null where the column sets none. */
|
|
10
|
+
minimum: number | null;
|
|
11
|
+
/**
|
|
12
|
+
* An integer's greatest value; null for a 64-bit one, whose range no JSON
|
|
13
|
+
* number holds exactly, so each language writes its own safe bound or none.
|
|
14
|
+
*/
|
|
15
|
+
maximum: number | null;
|
|
16
|
+
/** A character type's declared length, which a shorter value meets too. */
|
|
17
|
+
maxLength: number | null;
|
|
18
|
+
/** An ENUM's members as a row holds them, each once, in the type's order. */
|
|
19
|
+
members: string[];
|
|
20
|
+
/** A PostgreSQL array's dimensions, each one a JSON array around the last. */
|
|
21
|
+
arrayDepth: number;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* A column's value in the JSON shape, the one reading the Zod, JSON Schema
|
|
25
|
+
* and TypeScript generators share, so their types agree column by column.
|
|
26
|
+
*/
|
|
27
|
+
export declare function getJsonShape(dataType: string, database: number): JsonShape;
|
|
28
|
+
/** A primary key takes no NULL, its NN flag set or not, as in every generator. */
|
|
29
|
+
export declare function isNullableColumn(column: Column): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* A name TypeScript refuses for an interface or a type alias gets an
|
|
32
|
+
* underscore after it; any other name is written as the name cases give it.
|
|
33
|
+
*/
|
|
34
|
+
export declare function toTypeScriptTypeName(name: string): string;
|
|
35
|
+
/** A key bare where TypeScript reads an identifier, else a string literal. */
|
|
36
|
+
export declare function toTypeScriptPropertyKey(name: string): string;
|
|
37
|
+
//# sourceMappingURL=jsonShape.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 toKotlinName(name: string): string;
|
|
5
6
|
//# sourceMappingURL=kotlin.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { FormatTableOptions } from './utils';
|
|
3
|
+
export declare function createCode(state: RootState): string;
|
|
4
|
+
export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
|
|
5
|
+
//# sourceMappingURL=mermaid.d.ts.map
|