@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/peer/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { BracketType, CanvasType, ColumnOption, ColumnType, Database, Language, NameCase, OrderType, ReferentialAction, RelationshipType,
|
|
1
|
+
export { MEMO_MIN_HEIGHT, MEMO_MIN_WIDTH, TABLE_GROUP_MIN_HEIGHT, TABLE_GROUP_MIN_WIDTH, } from '../constants/layout';
|
|
2
|
+
export { BracketType, CanvasType, ColumnOption, ColumnType, Database, DDLScriptPosition, Language, LockSettingType, NameCase, OrderType, ReferentialAction, RelationshipType, Show, } from '../constants/schema';
|
|
3
3
|
export { type DatabaseVendor, DatabaseVendorList, DatabaseVendorToDatabase, } from '../constants/sql/database';
|
|
4
4
|
export { type ActionType, ChangeActionTypes, SharedFollowingActionTypes, StreamActionTypes, } from '../engine/actions';
|
|
5
5
|
export { createEngineContext, type EngineContext } from '../engine/context';
|
|
@@ -20,10 +20,13 @@ export { actions as tableActions } from '../engine/modules/table/atom.actions';
|
|
|
20
20
|
export { actions$ as tableActions$ } from '../engine/modules/table/generator.actions';
|
|
21
21
|
export { actions as tableColumnActions } from '../engine/modules/table-column/atom.actions';
|
|
22
22
|
export { actions$ as tableColumnActions$ } from '../engine/modules/table-column/generator.actions';
|
|
23
|
+
export { actions as tableGroupActions } from '../engine/modules/table-group/atom.actions';
|
|
24
|
+
export { actions$ as tableGroupActions$ } from '../engine/modules/table-group/generator.actions';
|
|
23
25
|
export { createPeerStore, type DispatchFocus, type DispatchOptions, type DispatchReport, type PeerStore, PeerStoreError, PeerStoreErrorCode, type PeerStoreOptions, type RevertResult, } from '../engine/peer-store';
|
|
24
26
|
export type { RootState } from '../engine/state';
|
|
25
27
|
export { defaultToWidth } from '../engine/to-width';
|
|
26
28
|
export { bHas } from '../utils/bit';
|
|
27
29
|
export { measureTableSize } from '../utils/calcTable';
|
|
28
|
-
export { createSchemaSQL } from '../utils/schema-sql';
|
|
30
|
+
export { createSchemaSQL, SchemaSQLHeaderList, type SchemaSQLOptions, SchemaSQLStatementsList, } from '../utils/schema-sql';
|
|
31
|
+
export { getTablesGroupRect } from '../utils/tableGroup';
|
|
29
32
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/peer/index.js
CHANGED
|
@@ -1,61 +1,62 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { $ as e, B as t, C as n, Cn as r, F as i, Fn as a, Fr as o, Go as s, Ho as c, Jn as ee, Ma as l, Mo as u, On as d, P as f, Pa as p, Po as m, Pt as h, Qo as g, Rn as _, U as v, Un as y, Uo as b, Ut as x, Vo as S, Wo as C, Xo as w, Zo as T, as as E, dr as D, es as O, f as k, fs as A, gs as j, hn as M, is as te, ji as ne, jo as re, k as ie, ln as ae, lr as N, ls as P, m as F, mn as I, ms as L, os as R, qi as z, qo as B, rs as V, sr as H, ss as U, t as W, ts as G, u as K, ur as q, us as J, vn as oe, vo as se, wt as ce, x as le, xr as ue, yo as de, zn as fe } from "../loadValue-BKvXDYoC.js";
|
|
2
|
+
import { d as pe, f as me, h as he, m as ge, n as _e, t as ve } from "../shared-store-2IUOt99m.js";
|
|
3
3
|
//#region src/engine/presence.ts
|
|
4
|
-
var
|
|
4
|
+
var ye = y / 3, be = (e) => {
|
|
5
5
|
e?.unref?.();
|
|
6
|
-
},
|
|
6
|
+
}, xe = [
|
|
7
7
|
"sharedMouseTrackerMap",
|
|
8
8
|
"sharedFocusTrackerMap",
|
|
9
9
|
"sharedSelectionTrackerMap",
|
|
10
10
|
"sharedDragSelectTrackerMap"
|
|
11
11
|
];
|
|
12
|
-
function
|
|
13
|
-
for (let t of
|
|
12
|
+
function Se(e) {
|
|
13
|
+
for (let t of xe) {
|
|
14
14
|
let n = e[t];
|
|
15
15
|
for (let e of Object.keys(n)) clearTimeout(n[e].timeoutId), Reflect.deleteProperty(n, e);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Ce(e) {
|
|
19
19
|
let t = "", n = (n) => {
|
|
20
|
-
let r =
|
|
21
|
-
(i !== t || n) && (t = i, e.dispatch(
|
|
20
|
+
let r = pe(e.state.editor.focusTable), i = me(r);
|
|
21
|
+
(i !== t || n) && (t = i, e.dispatch(ue({ focus: r })));
|
|
22
22
|
}, r = e.subscribe((e) => {
|
|
23
|
-
n(e.some((e) => e.type ===
|
|
23
|
+
n(e.some((e) => e.type === D.type));
|
|
24
24
|
}), i = setInterval(() => {
|
|
25
25
|
t && n(!0);
|
|
26
|
-
},
|
|
27
|
-
return
|
|
26
|
+
}, ye);
|
|
27
|
+
return be(i), Object.freeze({ destroy: () => {
|
|
28
28
|
r(), clearInterval(i);
|
|
29
29
|
} });
|
|
30
30
|
}
|
|
31
31
|
//#endregion
|
|
32
32
|
//#region src/engine/stream-flush.ts
|
|
33
|
-
function
|
|
33
|
+
function we(e, t) {
|
|
34
34
|
return Object.freeze({ flush: () => {
|
|
35
35
|
e.flushStreamBuffers(), t.flushStreamBuffers();
|
|
36
36
|
} });
|
|
37
37
|
}
|
|
38
38
|
//#endregion
|
|
39
39
|
//#region src/engine/to-width.ts
|
|
40
|
-
var
|
|
40
|
+
var Y = 2, Te = 10, X = (e) => Math.round(e.length * Te) + Y, Z = {
|
|
41
41
|
readonly: "readonly",
|
|
42
42
|
destroyed: "destroyed"
|
|
43
|
-
},
|
|
43
|
+
}, Ee = {
|
|
44
44
|
readonly: "the document is readonly, so no edit was made",
|
|
45
45
|
destroyed: "this document session was closed; open the document again"
|
|
46
46
|
}, Q = class extends Error {
|
|
47
47
|
constructor(e, t) {
|
|
48
|
-
super(
|
|
48
|
+
super(Ee[e]), k(this, "code", void 0), k(this, "operation", void 0), this.name = "PeerStoreError", this.code = e, this.operation = t;
|
|
49
49
|
}
|
|
50
|
-
}, $ =
|
|
50
|
+
}, $ = S(F), De = S(n), Oe = S([
|
|
51
51
|
"table.add",
|
|
52
52
|
"column.add",
|
|
53
53
|
"memo.add",
|
|
54
54
|
"index.add",
|
|
55
55
|
"indexColumn.add",
|
|
56
|
-
"relationship.add"
|
|
56
|
+
"relationship.add",
|
|
57
|
+
"tableGroup.add"
|
|
57
58
|
]);
|
|
58
|
-
function
|
|
59
|
+
function ke(e) {
|
|
59
60
|
let t = 0, n = 0;
|
|
60
61
|
return {
|
|
61
62
|
history: Object.freeze({
|
|
@@ -82,64 +83,67 @@ function xe(e) {
|
|
|
82
83
|
getLimit: () => n
|
|
83
84
|
};
|
|
84
85
|
}
|
|
85
|
-
function
|
|
86
|
+
function Ae(e) {
|
|
86
87
|
if (!e) return [];
|
|
87
|
-
let { tableId: t, columnId: n, focusType:
|
|
88
|
-
return n === void 0 ? [
|
|
88
|
+
let { tableId: t, columnId: n, focusType: r } = e;
|
|
89
|
+
return n === void 0 ? [N({
|
|
89
90
|
tableId: t,
|
|
90
|
-
focusType:
|
|
91
|
-
})] : [
|
|
91
|
+
focusType: r
|
|
92
|
+
})] : [H({
|
|
92
93
|
tableId: t,
|
|
93
94
|
columnId: n,
|
|
94
|
-
focusType:
|
|
95
|
+
focusType: r,
|
|
95
96
|
$mod: !1,
|
|
96
97
|
shiftKey: !1
|
|
97
98
|
})];
|
|
98
99
|
}
|
|
99
|
-
function
|
|
100
|
-
let
|
|
100
|
+
function je({ nickname: t, toWidth: n = X, presence: r = !0, readonly: i = !1 }) {
|
|
101
|
+
let a = null, o = ge(K({
|
|
102
|
+
toWidth: n,
|
|
103
|
+
routes: !1
|
|
104
|
+
}), {
|
|
101
105
|
manualStreamFlush: !0,
|
|
102
106
|
observable: !1,
|
|
103
|
-
getHistory: (e) => (
|
|
104
|
-
}),
|
|
105
|
-
|
|
107
|
+
getHistory: (e) => (a = ke(he(e)), a.history)
|
|
108
|
+
}), s = () => a?.getPushes() ?? 0, c = () => a?.getLimit() ?? 0, l = ve(o, { getNickname: () => t }, { manualStreamFlush: !0 }), u = we(o, l), d = /* @__PURE__ */ new Set(), f = o.state.editor.id, p = i, m = !1, h = null, g = !1, _ = 0, v = [], y = [], b = null;
|
|
109
|
+
o.dispatchSync(ee({
|
|
106
110
|
width: 0,
|
|
107
111
|
height: 0
|
|
108
112
|
}));
|
|
109
|
-
let x =
|
|
110
|
-
|
|
113
|
+
let x = r ? Ce(o) : null, S = () => {
|
|
114
|
+
h ||= l.subscribe((e) => {
|
|
111
115
|
e.some((e) => $(e.type)) && _++;
|
|
112
|
-
for (let t of Array.from(
|
|
116
|
+
for (let t of Array.from(d)) I(t, e);
|
|
113
117
|
});
|
|
114
118
|
}, C = (e) => {
|
|
115
|
-
if (
|
|
116
|
-
},
|
|
119
|
+
if (m) throw new Q(Z.destroyed, e);
|
|
120
|
+
}, w = (e) => {
|
|
117
121
|
if (b) throw Error(`${e} cannot run inside a group`);
|
|
118
|
-
},
|
|
119
|
-
if (C(e),
|
|
120
|
-
},
|
|
121
|
-
let e =
|
|
122
|
+
}, T = (e) => {
|
|
123
|
+
if (C(e), p) throw new Q(Z.readonly, e);
|
|
124
|
+
}, E = () => {
|
|
125
|
+
let e = c();
|
|
122
126
|
if (!e) return;
|
|
123
127
|
let t = v.reduce((e, { historyEntries: t }) => e + t, 0);
|
|
124
128
|
for (; t > e;) t -= v.shift().historyEntries;
|
|
125
129
|
for (; v.length > e;) v.splice(v.findIndex(({ historyEntries: e }) => !e), 1);
|
|
126
|
-
},
|
|
127
|
-
|
|
128
|
-
let n = _, r =
|
|
129
|
-
|
|
130
|
-
let
|
|
130
|
+
}, O = (e, t = {}) => {
|
|
131
|
+
T("dispatch"), S();
|
|
132
|
+
let n = _, r = s(), i = j(o.state, o.context, [...Ae(t.focus), ...e]);
|
|
133
|
+
o.dispatchSync(i), i.some((e) => De(e.type)) && u.flush();
|
|
134
|
+
let a = {
|
|
131
135
|
label: t.label ?? null,
|
|
132
136
|
actions: i.filter((e) => $(e.type)),
|
|
133
|
-
createdIds: i.filter((e) =>
|
|
137
|
+
createdIds: i.filter((e) => Oe(e.type)).map((e) => e.payload.id),
|
|
134
138
|
batches: _ - n,
|
|
135
|
-
historyEntries:
|
|
139
|
+
historyEntries: s() - r
|
|
136
140
|
};
|
|
137
|
-
return b ? (b.unit.historyEntries +=
|
|
138
|
-
label:
|
|
139
|
-
historyEntries:
|
|
140
|
-
}),
|
|
141
|
-
},
|
|
142
|
-
if (
|
|
141
|
+
return b ? (b.unit.historyEntries += a.historyEntries, b.dispatched = !0) : v.push({
|
|
142
|
+
label: a.label,
|
|
143
|
+
historyEntries: a.historyEntries
|
|
144
|
+
}), a.historyEntries && (y = []), b || E(), a;
|
|
145
|
+
}, k = (e, t) => {
|
|
146
|
+
if (T("group"), b) return t();
|
|
143
147
|
let n = {
|
|
144
148
|
unit: {
|
|
145
149
|
label: e,
|
|
@@ -151,45 +155,48 @@ function Ce({ nickname: e, toWidth: t = X, presence: n = !0, readonly: r = !1 })
|
|
|
151
155
|
try {
|
|
152
156
|
return t();
|
|
153
157
|
} finally {
|
|
154
|
-
b = null, n.dispatched && (v.push(n.unit),
|
|
158
|
+
b = null, n.dispatched && (v.push(n.unit), E());
|
|
155
159
|
}
|
|
156
160
|
}, M = (e, t) => {
|
|
157
161
|
for (let n = 0; n < e.historyEntries; n++) t();
|
|
158
|
-
|
|
162
|
+
u.flush();
|
|
159
163
|
};
|
|
160
164
|
return Object.freeze({
|
|
161
|
-
editorId:
|
|
165
|
+
editorId: f,
|
|
162
166
|
get value() {
|
|
163
|
-
return
|
|
167
|
+
return A(o.state);
|
|
168
|
+
},
|
|
169
|
+
get runtimeValue() {
|
|
170
|
+
return L(o.state);
|
|
164
171
|
},
|
|
165
172
|
get state() {
|
|
166
|
-
return
|
|
173
|
+
return o.state;
|
|
167
174
|
},
|
|
168
175
|
get isReadonly() {
|
|
169
|
-
return
|
|
176
|
+
return p;
|
|
170
177
|
},
|
|
171
178
|
get isDestroyed() {
|
|
172
|
-
return
|
|
179
|
+
return m;
|
|
173
180
|
},
|
|
174
181
|
setReadonly: (e) => {
|
|
175
|
-
|
|
182
|
+
p = e;
|
|
176
183
|
},
|
|
177
|
-
setInitialValue: (
|
|
178
|
-
C("setInitialValue"),
|
|
184
|
+
setInitialValue: (t) => {
|
|
185
|
+
C("setInitialValue"), w("setInitialValue"), o.dispatchSync(q(), e(W(t))), o.resetHistory(), v = [], y = [];
|
|
179
186
|
},
|
|
180
187
|
mergeClock: (e) => {
|
|
181
|
-
|
|
188
|
+
o.context.clock.merge(e);
|
|
182
189
|
},
|
|
183
|
-
dispatch:
|
|
190
|
+
dispatch: O,
|
|
184
191
|
receive: (e) => {
|
|
185
|
-
|
|
192
|
+
m || l.dispatchSync(e);
|
|
186
193
|
},
|
|
187
|
-
group:
|
|
194
|
+
group: k,
|
|
188
195
|
undo: () => {
|
|
189
|
-
|
|
196
|
+
T("undo"), w("undo"), S();
|
|
190
197
|
let e = [], t = v.pop();
|
|
191
198
|
for (; t && !t.historyEntries;) t.label !== null && e.push(t.label), t = v.pop();
|
|
192
|
-
return t ? (M(t,
|
|
199
|
+
return t ? (M(t, o.undo), y.push(t), {
|
|
193
200
|
label: t.label,
|
|
194
201
|
entries: t.historyEntries,
|
|
195
202
|
skipped: e
|
|
@@ -200,9 +207,9 @@ function Ce({ nickname: e, toWidth: t = X, presence: n = !0, readonly: r = !1 })
|
|
|
200
207
|
};
|
|
201
208
|
},
|
|
202
209
|
redo: () => {
|
|
203
|
-
|
|
210
|
+
T("redo"), w("redo"), S();
|
|
204
211
|
let e = y.pop();
|
|
205
|
-
return e ? (M(e,
|
|
212
|
+
return e ? (M(e, o.redo), v.push(e), {
|
|
206
213
|
label: e.label,
|
|
207
214
|
entries: e.historyEntries,
|
|
208
215
|
skipped: []
|
|
@@ -212,16 +219,16 @@ function Ce({ nickname: e, toWidth: t = X, presence: n = !0, readonly: r = !1 })
|
|
|
212
219
|
skipped: []
|
|
213
220
|
};
|
|
214
221
|
},
|
|
215
|
-
subscribe: (e) => (C("subscribe"),
|
|
216
|
-
|
|
222
|
+
subscribe: (e) => (C("subscribe"), d.add(e), g || (g = !0, h ? o.dispatchSync(D()) : S()), () => {
|
|
223
|
+
d.delete(e);
|
|
217
224
|
}),
|
|
218
225
|
flushStreamBuffers: () => {
|
|
219
|
-
|
|
226
|
+
m || u.flush();
|
|
220
227
|
},
|
|
221
228
|
destroy: () => {
|
|
222
|
-
|
|
229
|
+
m || (m = !0, x?.destroy(), h?.(), h = null, d.clear(), l.destroy(), o.destroy(), Se(o.state.editor), v = [], y = []);
|
|
223
230
|
}
|
|
224
231
|
});
|
|
225
232
|
}
|
|
226
233
|
//#endregion
|
|
227
|
-
export {
|
|
234
|
+
export { B as BracketType, w as CanvasType, F as ChangeActionTypes, T as ColumnOption, g as ColumnType, O as DDLScriptPosition, G as Database, se as DatabaseVendorList, de as DatabaseVendorToDatabase, u as FocusType, V as Language, te as LockSettingType, c as MEMO_MIN_HEIGHT, b as MEMO_MIN_WIDTH, E as NameCase, R as OrderType, Q as PeerStoreError, Z as PeerStoreErrorCode, U as ReferentialAction, P as RelationshipType, l as SchemaSQLHeaderList, p as SchemaSQLStatementsList, m as SelectType, le as SharedFollowingActionTypes, J as Show, n as StreamActionTypes, C as TABLE_GROUP_MIN_HEIGHT, s as TABLE_GROUP_MIN_WIDTH, re as bHas, K as createEngineContext, je as createPeerStore, _e as createSchemaSQL, X as defaultToWidth, v as editorActions$, ne as getTablesGroupRect, fe as indexActions, t as indexActions$, _ as indexColumnActions, i as indexColumnActions$, z as measureTableSize, a as memoActions, ae as memoActions$, d as relationshipActions, f as relationshipActions$, o as settingsActions, ie as settingsActions$, r as tableActions, x as tableActions$, oe as tableColumnActions, h as tableColumnActions$, M as tableGroupActions, ce as tableGroupActions$ };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../engine/state';
|
|
2
2
|
import { GeometrySource } from '../../utils/draw-relationship/geometrySource';
|
|
3
|
-
import { ElkPlacement } from './elkLayoutOptions';
|
|
3
|
+
import { ElkCompoundKind, ElkPlacement } from './elkLayoutOptions';
|
|
4
4
|
export type ElkLayoutNode = {
|
|
5
5
|
id: string;
|
|
6
6
|
width: number;
|
|
@@ -14,6 +14,8 @@ export type ElkLayoutNode = {
|
|
|
14
14
|
y?: number;
|
|
15
15
|
/** What is laid out inside this node, which is what makes it a group rather than a table. */
|
|
16
16
|
children?: ElkLayoutNode[];
|
|
17
|
+
/** What a node holding children stands for, left out for the box of unrelated tables. */
|
|
18
|
+
kind?: ElkCompoundKind;
|
|
17
19
|
};
|
|
18
20
|
/**
|
|
19
21
|
* Which tables a request covers and what it measures them by. The source picks
|
|
@@ -52,9 +54,9 @@ export type ElkLayoutPoint = {
|
|
|
52
54
|
y: number;
|
|
53
55
|
};
|
|
54
56
|
/**
|
|
55
|
-
* What ELK is asked to place, at the sizes the source draws
|
|
56
|
-
*
|
|
57
|
-
* folds the tables no relationship reaches into one
|
|
57
|
+
* What ELK is asked to place, at the sizes the source draws, with a hint where
|
|
58
|
+
* the placement reads one. A document placement keeps each table group in a
|
|
59
|
+
* node, and grouping folds the tables no relationship reaches into one box.
|
|
58
60
|
*
|
|
59
61
|
* @example
|
|
60
62
|
* createElkLayoutRequest(state, TablePlacement.viewLayered, { source: 'flow' });
|
|
@@ -15,6 +15,17 @@ export declare function usesPorts(placement: ElkPlacement): boolean;
|
|
|
15
15
|
* edges alone, and a hint sent with one of those would be paid for and ignored.
|
|
16
16
|
*/
|
|
17
17
|
export declare function usesCoordinateHints(placement: ElkPlacement): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the placement keeps each table group's members together inside a
|
|
20
|
+
* node of the group. The views draw no group, so their preset never does.
|
|
21
|
+
*/
|
|
22
|
+
export declare function keepsTableGroups(placement: ElkPlacement): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* What a node holding children stands for: a table group, drawn round its
|
|
25
|
+
* members, or a component, the groups and tables relationships join across
|
|
26
|
+
* group borders. Left out, it is the box of the tables joined to nothing.
|
|
27
|
+
*/
|
|
28
|
+
export type ElkCompoundKind = 'tableGroup' | 'component';
|
|
18
29
|
/**
|
|
19
30
|
* The box the tables joined to nothing are gathered in, told what the
|
|
20
31
|
* reference tells its own and nothing besides: the ratio, under the layered
|
|
@@ -37,6 +48,15 @@ export declare function elkLayoutOptions(placement: ElkPlacement): LayoutOptions
|
|
|
37
48
|
* const layoutOptions = elkNodeLayoutOptions(placement);
|
|
38
49
|
*/
|
|
39
50
|
export declare function elkNodeLayoutOptions(placement: ElkPlacement): LayoutOptions | null;
|
|
51
|
+
/**
|
|
52
|
+
* What a node holding children is told. A table group and a component lay their
|
|
53
|
+
* children out as the root is laid out, its spacing included, which ELK would
|
|
54
|
+
* otherwise take from its own defaults; the box of unrelated tables, the ratio.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* const layoutOptions = elkCompoundLayoutOptions(placement, node.kind);
|
|
58
|
+
*/
|
|
59
|
+
export declare function elkCompoundLayoutOptions(placement: ElkPlacement, kind?: ElkCompoundKind): LayoutOptions;
|
|
40
60
|
/**
|
|
41
61
|
* Every algorithm the placements name. ELK registers the metadata of these and
|
|
42
62
|
* no others, so it is read off the options rather than listed: a placement
|
|
@@ -3,9 +3,9 @@ import { ElkLayoutEdge, ElkLayoutPoint, ElkLayoutRequest } from './elkGraph';
|
|
|
3
3
|
/** One port per relationship endpoint, grouped by the table it sits on. */
|
|
4
4
|
export declare function portsByNode(edges: ElkLayoutEdge[]): Map<string, ElkPort[]>;
|
|
5
5
|
/**
|
|
6
|
-
* The graph ELK is handed
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* The graph ELK is handed: a table group holds its members, a component what is
|
|
7
|
+
* joined across group borders, the box the unrelated tables, and each edge sits
|
|
8
|
+
* in the deepest node holding both its ends, the root in a document with no group.
|
|
9
9
|
*/
|
|
10
10
|
export declare function toElkGraph({ placement, nodes, edges, }: ElkLayoutRequest): ElkNode;
|
|
11
11
|
/**
|
|
@@ -7,9 +7,9 @@ export type ExportSceneProps = {
|
|
|
7
7
|
scale: number;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
|
-
* Everything the document draws on one layer,
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* Everything the document draws on one layer, the groups behind it all, with
|
|
11
|
+
* no culling and every table in full, as at the export's zoom. The scroll and
|
|
12
|
+
* the viewport do not reach it, so the whole document is held.
|
|
13
13
|
*/
|
|
14
14
|
declare const ExportScene: FC<ExportSceneProps>;
|
|
15
15
|
export default ExportScene;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Stage } from 'konva/lib/Stage';
|
|
2
|
+
import { LocaleMessages } from '../../i18n/translate';
|
|
2
3
|
import { Rect } from '../../konva/scene/metrics';
|
|
3
4
|
import { Theme } from '../../themes/tokens';
|
|
4
5
|
export type DocumentSceneOptions = {
|
|
@@ -6,10 +7,16 @@ export type DocumentSceneOptions = {
|
|
|
6
7
|
theme: Theme;
|
|
7
8
|
toWidth: (text: string) => number;
|
|
8
9
|
/**
|
|
9
|
-
* The
|
|
10
|
-
*
|
|
10
|
+
* The longest side the Stage may take, in pixels, which caps the scale below
|
|
11
|
+
* the export's zoom for a preview or for an svg read off the nodes. The store
|
|
12
|
+
* keeps that zoom all the same, so either holds the shapes the export does.
|
|
11
13
|
*/
|
|
12
|
-
|
|
14
|
+
maxSide?: number;
|
|
15
|
+
/**
|
|
16
|
+
* The language and dictionary the scene's own words are drawn in, a table
|
|
17
|
+
* with no name say. Left out, the scene draws them in English.
|
|
18
|
+
*/
|
|
19
|
+
i18n?: LocaleMessages;
|
|
13
20
|
};
|
|
14
21
|
export type DocumentScene = {
|
|
15
22
|
stage: Stage;
|
|
@@ -17,17 +24,15 @@ export type DocumentScene = {
|
|
|
17
24
|
box: Rect;
|
|
18
25
|
/** The factor between that box and the Stage the scene was drawn on. */
|
|
19
26
|
scale: number;
|
|
20
|
-
/** The zoom that was asked for, which scale is that cut to what a canvas holds. */
|
|
21
|
-
zoomLevel: number;
|
|
22
27
|
destroy: () => void;
|
|
23
28
|
};
|
|
24
29
|
/**
|
|
25
|
-
* The whole document on a Stage of its own, off any screen
|
|
26
|
-
* here rather than borrowed, so the editor's
|
|
27
|
-
* the image
|
|
30
|
+
* The whole document on a Stage of its own, off any screen, at the export's
|
|
31
|
+
* zoom. The store is built here rather than borrowed, so the editor's zoom,
|
|
32
|
+
* scroll and selection cannot reach the image, which holds the whole document.
|
|
28
33
|
*
|
|
29
34
|
* @example
|
|
30
35
|
* const scene = await renderDocumentScene({ doc, theme, toWidth });
|
|
31
36
|
*/
|
|
32
|
-
export declare function renderDocumentScene({ doc, theme, toWidth,
|
|
37
|
+
export declare function renderDocumentScene({ doc, theme, toWidth, maxSide, i18n, }: DocumentSceneOptions): Promise<DocumentScene>;
|
|
33
38
|
//# sourceMappingURL=documentScene.d.ts.map
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { RootState } from '../../engine/state';
|
|
2
2
|
import { Rect } from '../../konva/scene/metrics';
|
|
3
|
+
type Size = Pick<Rect, 'width' | 'height'>;
|
|
3
4
|
/**
|
|
4
5
|
* The breathing room around the drawn document, in scene units, and nothing
|
|
5
6
|
* more: a connector measured against a retired sort epoch is already inflated
|
|
6
7
|
* by getRouteBBox itself, and the union below holds that box before this is added.
|
|
7
8
|
*/
|
|
8
9
|
export declare const EXPORT_MARGIN = 80;
|
|
10
|
+
/**
|
|
11
|
+
* The zoom every export is drawn at, whatever the editor shows or the document
|
|
12
|
+
* was saved with: one image pixel per scene unit before the scale.
|
|
13
|
+
*/
|
|
14
|
+
export declare const EXPORT_ZOOM_LEVEL = 1;
|
|
9
15
|
/**
|
|
10
16
|
* Everything the image has to hold: every table and memo, every connector the
|
|
11
17
|
* document is set to show, and the margin around the lot. An empty document is
|
|
@@ -16,12 +22,41 @@ export declare const EXPORT_MARGIN = 80;
|
|
|
16
22
|
*/
|
|
17
23
|
export declare function getExportRect(state: RootState): Rect;
|
|
18
24
|
/**
|
|
19
|
-
* What the box is drawn at: the zoom
|
|
20
|
-
*
|
|
21
|
-
*
|
|
25
|
+
* What the box is drawn at: the export's zoom, cut to whatever a canvas can
|
|
26
|
+
* hold. A document is unbounded now, so this is what keeps the Stage itself
|
|
27
|
+
* inside the ceiling that fitPixelRatio keeps the raster inside.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* const scale = getExportScale(getExportRect(store.state));
|
|
31
|
+
*/
|
|
32
|
+
export declare function getExportScale({ width, height }: Rect): number;
|
|
33
|
+
/** The raster an export comes out at, and the one it was asked for. */
|
|
34
|
+
export type ExportSize = {
|
|
35
|
+
width: number;
|
|
36
|
+
height: number;
|
|
37
|
+
/** The box times the scale, which a canvas ceiling may cut. */
|
|
38
|
+
askedWidth: number;
|
|
39
|
+
askedHeight: number;
|
|
40
|
+
/** Whether a ceiling cut the raster below what was asked for. */
|
|
41
|
+
reduced: boolean;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* The Stage a box drawn at the scale takes, a pixel each way at least: a canvas
|
|
45
|
+
* truncates a side under one to none, from which no image can be drawn, and a
|
|
46
|
+
* document far longer than it is thick is cut that thin by a preview's side.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* const { width, height } = getStageSize(box, scale);
|
|
50
|
+
*/
|
|
51
|
+
export declare function getStageSize(box: Size, scale: number): Size;
|
|
52
|
+
/**
|
|
53
|
+
* The pixels a png of the box comes out at, worked out the way the render
|
|
54
|
+
* works them out: the Stage fitted to the ceilings first, then its raster at
|
|
55
|
+
* the scale. A dialog reads it to say what a file will hold before it exists.
|
|
22
56
|
*
|
|
23
57
|
* @example
|
|
24
|
-
* const
|
|
58
|
+
* const { width, height, reduced } = getExportSize(box, 2);
|
|
25
59
|
*/
|
|
26
|
-
export declare function
|
|
60
|
+
export declare function getExportSize(box: Size, pixelRatio: number): ExportSize;
|
|
61
|
+
export {};
|
|
27
62
|
//# sourceMappingURL=exportBox.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { RenderPngRequest, RenderPngResult } from './renderPng';
|
|
2
|
+
import { RenderSvgRequest } from './renderSvg';
|
|
2
3
|
/**
|
|
3
4
|
* A png request as it crosses a realm boundary. The measurement itself cannot
|
|
4
5
|
* cross, so what travels is the widths the asking realm read for the probe
|
|
@@ -7,6 +8,10 @@ import { RenderPngRequest, RenderPngResult } from './renderPng';
|
|
|
7
8
|
export type ExportPngRequest = RenderPngRequest & {
|
|
8
9
|
fontProbe: number[];
|
|
9
10
|
};
|
|
11
|
+
/** An svg request as it crosses a realm boundary, gated by the same probe. */
|
|
12
|
+
export type ExportSvgRequest = RenderSvgRequest & {
|
|
13
|
+
fontProbe: number[];
|
|
14
|
+
};
|
|
10
15
|
/**
|
|
11
16
|
* Draws a document off the thread that asked for it. Text is measured here
|
|
12
17
|
* rather than sent, because a table's reserved widths were laid out by a
|
|
@@ -20,6 +25,16 @@ export declare class ExportPngService {
|
|
|
20
25
|
*/
|
|
21
26
|
probeFontWidths(): Promise<number[]>;
|
|
22
27
|
render(request: ExportPngRequest): Promise<RenderPngResult>;
|
|
28
|
+
/**
|
|
29
|
+
* The document as an svg, laid out by the same measure the png is. Its text
|
|
30
|
+
* is placed where this realm wrapped and cut it, so the probe gates it too.
|
|
31
|
+
*/
|
|
32
|
+
renderSvg(request: ExportSvgRequest): Promise<string>;
|
|
33
|
+
/**
|
|
34
|
+
* This realm's measure, once it is shown to lay the probe out as the asking
|
|
35
|
+
* realm did. Every drawing a request asks for goes through it first.
|
|
36
|
+
*/
|
|
37
|
+
private createMatchingToWidth;
|
|
23
38
|
private createToWidth;
|
|
24
39
|
}
|
|
25
40
|
//# sourceMappingURL=exportPngService.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ThemeOptions } from '../../themes/radix-ui-theme';
|
|
2
|
+
import { Theme } from '../../themes/tokens';
|
|
3
|
+
/** What the canvas is painted with once the background is off: nothing at all. */
|
|
4
|
+
export declare const TRANSPARENT_BACKGROUND = "rgba(0,0,0,0)";
|
|
5
|
+
export type ExportThemeOptions = {
|
|
6
|
+
/** The palette the canvas is painted with now, overrides included. */
|
|
7
|
+
sceneTheme: Theme;
|
|
8
|
+
/** The gray and accent the editor's preset is built from. */
|
|
9
|
+
themeOptions: Pick<ThemeOptions, 'grayColor' | 'accentColor'>;
|
|
10
|
+
/** Whether the editor shows its dark appearance now. */
|
|
11
|
+
isDarkMode: boolean;
|
|
12
|
+
/** Whether the image is drawn dark. */
|
|
13
|
+
darkMode: boolean;
|
|
14
|
+
/** Whether the image keeps the canvas colour behind what it draws. */
|
|
15
|
+
background: boolean;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* The palette an image is drawn with. The appearance on screen keeps every
|
|
19
|
+
* colour the canvas shows, overrides included; the other one is the preset of
|
|
20
|
+
* the same gray and accent, since no override was ever written for it.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* const theme = createExportTheme({ sceneTheme, themeOptions, isDarkMode, darkMode, background });
|
|
24
|
+
*/
|
|
25
|
+
export declare function createExportTheme({ sceneTheme, themeOptions: { grayColor, accentColor }, isDarkMode, darkMode, background, }: ExportThemeOptions): Theme;
|
|
26
|
+
//# sourceMappingURL=exportTheme.d.ts.map
|