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