@dineug/erd-editor 3.9.2 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (375) hide show
  1. package/README.md +321 -133
  2. package/dist/components/appContext.d.ts +4 -0
  3. package/dist/components/erd/Erd.d.ts +4 -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/SceneIcon.template.d.ts +2 -2
  11. package/dist/components/erd/canvas/entityDrag.d.ts +17 -1
  12. package/dist/components/erd/canvas/middleButtonPan.d.ts +11 -0
  13. package/dist/components/erd/canvas/relationship-group/relationship/Relationship.d.ts +2 -0
  14. package/dist/components/erd/canvas/relationship-group/relationship/RelationshipActionLabel.d.ts +32 -0
  15. package/dist/components/erd/canvas/sceneTokens.d.ts +38 -0
  16. package/dist/components/erd/canvas/table/Table.d.ts +9 -1
  17. package/dist/components/erd/canvas/table/cellLayout.d.ts +11 -0
  18. package/dist/components/erd/canvas/table/column/Column.d.ts +7 -0
  19. package/dist/components/erd/canvas/table/doubleClick.d.ts +3 -4
  20. package/dist/components/erd/canvas/table/goToErd.d.ts +3 -10
  21. package/dist/components/erd/canvas/table-group/TableGroup.d.ts +17 -0
  22. package/dist/components/erd/canvas/table-group/TableGroupBody.d.ts +17 -0
  23. package/dist/components/erd/canvas/table-group/TableGroupDropTarget.d.ts +10 -0
  24. package/dist/components/erd/canvas/table-group/TableGroupSash.d.ts +35 -0
  25. package/dist/components/erd/canvas/table-group/TableGroups.d.ts +10 -0
  26. package/dist/components/erd/canvas/table-group/tableGroupBox.d.ts +40 -0
  27. package/dist/components/erd/canvas/table-group/titleLayout.d.ts +45 -0
  28. package/dist/components/erd/canvas/useMoveEntity.d.ts +2 -0
  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 +49 -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 +16 -1
  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/ToolbarCompass.template.d.ts +3 -1
  42. package/dist/components/erd/goToErdTarget.d.ts +85 -0
  43. package/dist/components/erd/hitTest.d.ts +16 -1
  44. package/dist/components/erd/minimap/MinimapScene.d.ts +1 -1
  45. package/dist/components/erd/minimap/table/Table.d.ts +3 -3
  46. package/dist/components/erd/minimap/table-group/TableGroup.d.ts +17 -0
  47. package/dist/components/erd/table-group/TableGroupDraft.d.ts +15 -0
  48. package/dist/components/erd/table-group/TableGroupDraft.styles.d.ts +6 -0
  49. package/dist/components/erd/table-group/tableGroupName.d.ts +21 -0
  50. package/dist/components/erd/table-group/useTableGroupDraw.d.ts +25 -0
  51. package/dist/components/erd/table-properties/TableProperties.d.ts +2 -0
  52. package/dist/components/erd/table-properties/TableProperties.styles.d.ts +24 -2
  53. package/dist/components/erd/table-properties/table-properties-indexes/TablePropertiesIndexes.d.ts +2 -0
  54. package/dist/components/erd/table-properties/table-properties-indexes/TablePropertiesIndexes.styles.d.ts +32 -0
  55. package/dist/components/erd/table-properties/table-properties-indexes/indexes-checkbox-column/IndexesCheckboxColumn.d.ts +7 -0
  56. package/dist/components/erd/table-properties/table-properties-indexes/indexes-checkbox-column/IndexesCheckboxColumn.styles.d.ts +5 -0
  57. package/dist/components/erd/table-properties/table-properties-indexes/indexes-column/IndexesColumn.d.ts +7 -0
  58. package/dist/components/erd/table-properties/table-properties-indexes/indexes-column/IndexesColumn.styles.d.ts +3 -0
  59. package/dist/components/erd/table-properties/table-properties-indexes/indexes-index/IndexesIndex.d.ts +7 -0
  60. package/dist/components/erd/table-properties/table-properties-indexes/indexes-index/IndexesIndex.styles.d.ts +6 -0
  61. package/dist/components/erd/table-properties/table-properties-indexes/indexes-key/IndexesKey.d.ts +21 -0
  62. package/dist/components/erd/table-properties/table-properties-indexes/indexes-key/IndexesKey.styles.d.ts +13 -0
  63. package/dist/components/erd/table-properties/table-properties-tabs/TablePropertiesTabs.d.ts +3 -0
  64. package/dist/components/erd/welcome-screen/WelcomeScreen.d.ts +17 -0
  65. package/dist/components/erd/welcome-screen/WelcomeScreen.styles.d.ts +17 -0
  66. package/dist/components/erd/welcome-screen/welcome-hints/WelcomeHints.d.ts +21 -0
  67. package/dist/components/erd/welcome-screen/welcome-hints/WelcomeHints.styles.d.ts +14 -0
  68. package/dist/components/erd/welcome-screen/welcome-hints/hintArrows.d.ts +10 -0
  69. package/dist/components/erd/welcome-screen/welcomeLayout.d.ts +87 -0
  70. package/dist/components/erd-editor/ErdEditor.d.ts +67 -7
  71. package/dist/components/erd-editor/useErdEditorAttachElement.d.ts +14 -1
  72. package/dist/components/export-image/ExportImage.d.ts +23 -0
  73. package/dist/components/export-image/ExportImage.styles.d.ts +34 -0
  74. package/dist/components/export-image/exportImageActions.d.ts +48 -0
  75. package/dist/components/find-replace/FindReplace.d.ts +13 -0
  76. package/dist/components/find-replace/FindReplace.styles.d.ts +27 -0
  77. package/dist/components/find-replace/fieldIcon.d.ts +5 -0
  78. package/dist/components/find-replace/matchTarget.d.ts +26 -0
  79. package/dist/components/find-replace/panelLayout.d.ts +20 -0
  80. package/dist/components/generator-code/GeneratorCode.d.ts +1 -0
  81. package/dist/components/generator-code/generator-code-context-menu/GeneratorCodeContextMenu.d.ts +3 -0
  82. package/dist/components/generator-code/generator-code-context-menu/menus/columnNameCaseMenus.d.ts +3 -0
  83. package/dist/components/generator-code/generator-code-context-menu/menus/languageMenus.d.ts +8 -0
  84. package/dist/components/generator-code/generator-code-context-menu/menus/tableNameCaseMenus.d.ts +3 -0
  85. package/dist/components/generator-code/generator-code-options/GeneratorCodeOptions.d.ts +17 -0
  86. package/dist/components/generator-code/generator-code-options/GeneratorCodeOptions.styles.d.ts +5 -0
  87. package/dist/components/generator-code/generatorCodeView.d.ts +12 -0
  88. package/dist/components/generator-code/languageSettings.d.ts +14 -0
  89. package/dist/components/locale-picker/LocalePicker.d.ts +13 -0
  90. package/dist/components/locale-picker/LocalePicker.styles.d.ts +19 -0
  91. package/dist/components/localeContext.d.ts +10 -0
  92. package/dist/components/localized/Localized.d.ts +18 -0
  93. package/dist/components/map-columns/MapColumnsBody.d.ts +24 -0
  94. package/dist/components/map-columns/MapColumnsDialog.d.ts +13 -0
  95. package/dist/components/map-columns/MapColumnsDialog.styles.d.ts +38 -0
  96. package/dist/components/map-columns/mapColumnsAction.d.ts +13 -0
  97. package/dist/components/map-columns/nameOf.d.ts +6 -0
  98. package/dist/components/map-columns/openMapColumns.d.ts +9 -0
  99. package/dist/components/primitives/code-block/CodeBlock.d.ts +6 -1
  100. package/dist/components/primitives/code-block/CodeBlock.styles.d.ts +2 -0
  101. package/dist/components/primitives/color-picker/ColorPicker.d.ts +10 -1
  102. package/dist/components/primitives/color-picker/ColorPicker.styles.d.ts +25 -0
  103. package/dist/components/primitives/color-picker/colorModel.d.ts +36 -0
  104. package/dist/components/primitives/color-picker/presetColors.d.ts +13 -0
  105. package/dist/components/primitives/color-picker/resolveColor.d.ts +7 -0
  106. package/dist/components/primitives/context-menu/ContextMenu.d.ts +2 -0
  107. package/dist/components/primitives/context-menu/context-menu-content/ContextMenuContent.d.ts +1 -0
  108. package/dist/components/primitives/context-menu/context-menu-content/fitMenu.d.ts +4 -4
  109. package/dist/components/primitives/context-menu/context-menu-separator/ContextMenuSeparator.d.ts +8 -0
  110. package/dist/components/primitives/context-menu/context-menu-separator/ContextMenuSeparator.styles.d.ts +2 -0
  111. package/dist/components/primitives/context-menu/menu/Menu.d.ts +2 -0
  112. package/dist/components/primitives/context-menu/submenu-chevron/SubmenuChevron.d.ts +5 -0
  113. package/dist/components/primitives/dialog/Dialog.d.ts +21 -0
  114. package/dist/components/primitives/dialog/Dialog.styles.d.ts +12 -0
  115. package/dist/components/primitives/highlighted-text/HighlightedText.d.ts +2 -5
  116. package/dist/components/primitives/icon/icons.d.ts +27 -1
  117. package/dist/components/primitives/select/Select.d.ts +18 -0
  118. package/dist/components/primitives/select/Select.styles.d.ts +13 -0
  119. package/dist/components/primitives/text-input/TextInput.d.ts +2 -0
  120. package/dist/components/primitives/toast/Toast.d.ts +5 -1
  121. package/dist/components/primitives/toast/Toast.styles.d.ts +2 -2
  122. package/dist/components/quick-search/QuickSearch.d.ts +2 -1
  123. package/dist/components/quick-search/QuickSearch.styles.d.ts +6 -0
  124. package/dist/components/quick-search/actions.d.ts +60 -2
  125. package/dist/components/quick-search/hangul.d.ts +79 -0
  126. package/dist/components/quick-search/paletteQuery.d.ts +38 -0
  127. package/dist/components/quick-search/scopedActions.d.ts +42 -0
  128. package/dist/components/schema-sql/SchemaSQL.d.ts +2 -0
  129. package/dist/components/schema-sql/SchemaSQL.styles.d.ts +7 -0
  130. package/dist/components/schema-sql/schema-sql-context-menu/SchemaSQLContextMenu.d.ts +3 -0
  131. package/dist/components/schema-sql/schema-sql-context-menu/menus/bracketMenus.d.ts +3 -0
  132. package/dist/components/schema-sql/schema-sql-context-menu/menus/headerMenus.d.ts +29 -0
  133. package/dist/components/schema-sql/schema-sql-context-menu/menus/statementsMenus.d.ts +27 -0
  134. package/dist/components/schema-sql/schema-sql-options/SchemaSQLOptions.d.ts +24 -0
  135. package/dist/components/schema-sql/schema-sql-options/SchemaSQLOptions.styles.d.ts +45 -0
  136. package/dist/components/schema-sql/schema-sql-options/ScriptEditor.d.ts +20 -0
  137. package/dist/components/schema-sql/schema-sql-options/ScriptEditor.styles.d.ts +13 -0
  138. package/dist/components/schema-sql/schema-sql-options/dropWarning.d.ts +8 -0
  139. package/dist/components/schema-sql/schemaSQLView.d.ts +71 -0
  140. package/dist/components/settings/Settings.styles.d.ts +7 -0
  141. package/dist/components/settings/columnTypeLabels.d.ts +8 -0
  142. package/dist/components/settings/lockSettingRows.d.ts +16 -0
  143. package/dist/components/settings/settings-lnb/SettingsLnb.d.ts +3 -0
  144. package/dist/components/settings/settingsPage.d.ts +10 -0
  145. package/dist/components/theme-builder/ThemeBuilder.d.ts +9 -1
  146. package/dist/components/theme-builder/ThemeBuilder.styles.d.ts +8 -5
  147. package/dist/components/toast-container/openStatusToast.d.ts +29 -0
  148. package/dist/components/toast-container/openToastWhileRunning.d.ts +1 -1
  149. package/dist/components/toolbar/Toolbar.d.ts +1 -0
  150. package/dist/components/visualization/graph-node/GraphNode.d.ts +2 -2
  151. package/dist/components/visualization/graphPan.d.ts +12 -0
  152. package/dist/components/visualization/table/column/Column.d.ts +4 -0
  153. package/dist/components/visualization/visualizationView.d.ts +2 -2
  154. package/dist/constants/language.d.ts +1 -1
  155. package/dist/constants/layout.d.ts +47 -0
  156. package/dist/constants/open.d.ts +4 -0
  157. package/dist/constants/schema.d.ts +38 -4
  158. package/dist/constants/sql/dataType/PostgreSQL.d.ts +2 -1
  159. package/dist/constants/sql/dataType/SQLite.d.ts +3 -1
  160. package/dist/engine/actions.d.ts +20 -2
  161. package/dist/engine/context.d.ts +6 -0
  162. package/dist/engine/index.d.ts +1 -1
  163. package/dist/engine/index.js +29 -18
  164. package/dist/engine/modules/editor/actions.d.ts +10 -2
  165. package/dist/engine/modules/editor/atom.actions.d.ts +49 -11
  166. package/dist/engine/modules/editor/generator.actions.d.ts +107 -8
  167. package/dist/engine/modules/editor/state.d.ts +16 -3
  168. package/dist/engine/modules/editor/utils/color.d.ts +21 -0
  169. package/dist/engine/modules/editor/utils/duplicate.d.ts +28 -1
  170. package/dist/engine/modules/editor/utils/focus.d.ts +16 -0
  171. package/dist/engine/modules/editor/utils/releaseHidden.d.ts +16 -0
  172. package/dist/engine/modules/editor/utils/selection.d.ts +12 -0
  173. package/dist/engine/modules/relationship/actions.d.ts +19 -0
  174. package/dist/engine/modules/relationship/atom.actions.d.ts +111 -1
  175. package/dist/engine/modules/relationship/endFlags.d.ts +14 -0
  176. package/dist/engine/modules/relationship/fkColumns.d.ts +40 -4
  177. package/dist/engine/modules/relationship/generator.actions.d.ts +5 -2
  178. package/dist/engine/modules/relationship/history.d.ts +3 -0
  179. package/dist/engine/modules/relationship/referenceType.d.ts +12 -0
  180. package/dist/engine/modules/settings/actions.d.ts +17 -4
  181. package/dist/engine/modules/settings/atom.actions.d.ts +63 -19
  182. package/dist/engine/modules/settings/generator.actions.d.ts +7 -0
  183. package/dist/engine/modules/settings/history.d.ts +1 -0
  184. package/dist/engine/modules/table/actions.d.ts +8 -0
  185. package/dist/engine/modules/table/atom.actions.d.ts +31 -0
  186. package/dist/engine/modules/table/generator.actions.d.ts +3 -3
  187. package/dist/engine/modules/table/history.d.ts +1 -0
  188. package/dist/engine/modules/table-column/generator.actions.d.ts +8 -0
  189. package/dist/engine/modules/table-column/keys.d.ts +14 -0
  190. package/dist/engine/modules/table-column/utils/dataType.d.ts +19 -1
  191. package/dist/engine/modules/table-group/actions.d.ts +63 -0
  192. package/dist/engine/modules/table-group/atom.actions.d.ts +238 -0
  193. package/dist/engine/modules/table-group/generator.actions.d.ts +111 -0
  194. package/dist/engine/modules/table-group/history.d.ts +13 -0
  195. package/dist/engine/peer-store.d.ts +9 -3
  196. package/dist/engine/replication-store.d.ts +18 -1
  197. package/dist/engine/rx-operators/groupByStreamActions.d.ts +5 -1
  198. package/dist/engine/rx-operators/lockIgnoreFilter.d.ts +8 -0
  199. package/dist/engine/rx-store.d.ts +2 -0
  200. package/dist/engine/settle.d.ts +9 -0
  201. package/dist/erd-editor.umd.js +2523 -4060
  202. package/dist/hooks/useNavigatorLanguages.d.ts +7 -0
  203. package/dist/i18n/locales.d.ts +126 -0
  204. package/dist/i18n/menuLabel.d.ts +12 -0
  205. package/dist/i18n/messages/ar-SA.d.ts +399 -0
  206. package/dist/i18n/messages/de-DE.d.ts +375 -0
  207. package/dist/i18n/messages/en/code.d.ts +17 -0
  208. package/dist/i18n/messages/en/colorPicker.d.ts +35 -0
  209. package/dist/i18n/messages/en/common.d.ts +65 -0
  210. package/dist/i18n/messages/en/contextMenu.d.ts +29 -0
  211. package/dist/i18n/messages/en/exportImage.d.ts +25 -0
  212. package/dist/i18n/messages/en/feedback.d.ts +11 -0
  213. package/dist/i18n/messages/en/findReplace.d.ts +36 -0
  214. package/dist/i18n/messages/en/floatingToolbar.d.ts +12 -0
  215. package/dist/i18n/messages/en/index.d.ts +378 -0
  216. package/dist/i18n/messages/en/mapColumns.d.ts +39 -0
  217. package/dist/i18n/messages/en/palette.d.ts +40 -0
  218. package/dist/i18n/messages/en/schemaSql.d.ts +28 -0
  219. package/dist/i18n/messages/en/settings.d.ts +22 -0
  220. package/dist/i18n/messages/en/shortcuts.d.ts +32 -0
  221. package/dist/i18n/messages/en/tableProperties.d.ts +34 -0
  222. package/dist/i18n/messages/en/themeBuilder.d.ts +7 -0
  223. package/dist/i18n/messages/en/toolbar.d.ts +9 -0
  224. package/dist/i18n/messages/en/visualization.d.ts +12 -0
  225. package/dist/i18n/messages/en/welcome.d.ts +13 -0
  226. package/dist/i18n/messages/es-ES.d.ts +381 -0
  227. package/dist/i18n/messages/eu-ES.d.ts +375 -0
  228. package/dist/i18n/messages/fa-IR.d.ts +375 -0
  229. package/dist/i18n/messages/fr-FR.d.ts +381 -0
  230. package/dist/i18n/messages/he-IL.d.ts +381 -0
  231. package/dist/i18n/messages/id-ID.d.ts +369 -0
  232. package/dist/i18n/messages/index.d.ts +11 -0
  233. package/dist/i18n/messages/it-IT.d.ts +381 -0
  234. package/dist/i18n/messages/ja-JP.d.ts +369 -0
  235. package/dist/i18n/messages/ko-KR.d.ts +369 -0
  236. package/dist/i18n/messages/nl-NL.d.ts +375 -0
  237. package/dist/i18n/messages/pl-PL.d.ts +387 -0
  238. package/dist/i18n/messages/pt-BR.d.ts +381 -0
  239. package/dist/i18n/messages/pt-PT.d.ts +381 -0
  240. package/dist/i18n/messages/ro-RO.d.ts +381 -0
  241. package/dist/i18n/messages/ru-RU.d.ts +387 -0
  242. package/dist/i18n/messages/sk-SK.d.ts +387 -0
  243. package/dist/i18n/messages/sl-SI.d.ts +387 -0
  244. package/dist/i18n/messages/sv-SE.d.ts +375 -0
  245. package/dist/i18n/messages/tr-TR.d.ts +375 -0
  246. package/dist/i18n/messages/uk-UA.d.ts +387 -0
  247. package/dist/i18n/messages/zh-CN.d.ts +369 -0
  248. package/dist/i18n/messages/zh-TW.d.ts +369 -0
  249. package/dist/i18n/resolveLocale.d.ts +11 -0
  250. package/dist/i18n/source.d.ts +7 -0
  251. package/dist/i18n/translate.d.ts +58 -0
  252. package/dist/index.d.ts +2 -0
  253. package/dist/index.js +28966 -11220
  254. package/dist/internal-types/index.d.ts +2 -4
  255. package/dist/konva/scene/contentBounds.d.ts +18 -12
  256. package/dist/konva/scene/metrics.d.ts +7 -0
  257. package/dist/konva/scene/renderScene.d.ts +10 -4
  258. package/dist/konva/scene/stacking.d.ts +21 -0
  259. package/dist/konva/scene/viewLayout.d.ts +2 -1
  260. package/dist/loadValue-B3EFSe9k.js +12925 -0
  261. package/dist/peer/index.d.ts +6 -3
  262. package/dist/peer/index.js +87 -83
  263. package/dist/services/elk-layout/elkGraph.d.ts +6 -4
  264. package/dist/services/elk-layout/elkLayoutOptions.d.ts +20 -0
  265. package/dist/services/elk-layout/elkLayoutService.d.ts +3 -3
  266. package/dist/services/export-png/ExportScene.d.ts +3 -3
  267. package/dist/services/export-png/documentScene.d.ts +14 -9
  268. package/dist/services/export-png/exportBox.d.ts +40 -5
  269. package/dist/services/export-png/exportPngService.d.ts +15 -0
  270. package/dist/services/export-png/exportTheme.d.ts +26 -0
  271. package/dist/services/export-png/index.d.ts +44 -11
  272. package/dist/services/export-png/renderPng.d.ts +18 -10
  273. package/dist/services/export-png/renderSvg.d.ts +22 -0
  274. package/dist/services/export-png/sceneSvg.d.ts +54 -0
  275. package/dist/services/shiki/graphqlGrammar.d.ts +8 -0
  276. package/dist/shared-store-fUggY7sI.js +1341 -0
  277. package/dist/themes/radix-ui-theme.d.ts +11 -3
  278. package/dist/themes/tokens.d.ts +9 -0
  279. package/dist/utils/calcTable.d.ts +18 -1
  280. package/dist/utils/clipboard.d.ts +9 -0
  281. package/dist/utils/collection/tableGroup.entity.d.ts +3 -0
  282. package/dist/utils/contrastText.d.ts +21 -0
  283. package/dist/utils/deepMerge.d.ts +8 -0
  284. package/dist/utils/device-detect/index.d.ts +2 -6
  285. package/dist/utils/domEvent.d.ts +18 -0
  286. package/dist/utils/dragSelect.d.ts +2 -0
  287. package/dist/utils/draw-relationship/bezier.d.ts +2 -0
  288. package/dist/utils/draw-relationship/corner.d.ts +9 -0
  289. package/dist/utils/draw-relationship/index.d.ts +18 -18
  290. package/dist/utils/draw-relationship/loop.d.ts +29 -0
  291. package/dist/utils/draw-relationship/pathFinding.d.ts +1 -1
  292. package/dist/utils/draw-relationship/sort.d.ts +8 -1
  293. package/dist/utils/draw-relationship/stub.d.ts +4 -3
  294. package/dist/utils/emitter.d.ts +64 -4
  295. package/dist/utils/file/exportFile.d.ts +15 -5
  296. package/dist/utils/file/importFile.d.ts +9 -5
  297. package/dist/utils/file/importSchema.d.ts +45 -0
  298. package/dist/utils/find-replace/findMatches.d.ts +90 -0
  299. package/dist/utils/find-replace/index.d.ts +5 -0
  300. package/dist/utils/find-replace/matcher.d.ts +53 -0
  301. package/dist/utils/find-replace/present.d.ts +24 -0
  302. package/dist/utils/find-replace/replaceActions.d.ts +20 -0
  303. package/dist/utils/generator-code/columnTypes.d.ts +99 -0
  304. package/dist/utils/generator-code/doctrine.d.ts +6 -0
  305. package/dist/utils/generator-code/doctrineReservedWords.d.ts +7 -0
  306. package/dist/utils/generator-code/graphql.d.ts +6 -0
  307. package/dist/utils/generator-code/heck.d.ts +5 -0
  308. package/dist/utils/generator-code/java.d.ts +28 -0
  309. package/dist/utils/generator-code/jsonSchema.d.ts +50 -0
  310. package/dist/utils/generator-code/jsonShape.d.ts +37 -0
  311. package/dist/utils/generator-code/kotlin.d.ts +1 -0
  312. package/dist/utils/generator-code/mermaid.d.ts +5 -0
  313. package/dist/utils/generator-code/php.d.ts +28 -0
  314. package/dist/utils/generator-code/rust.d.ts +13 -0
  315. package/dist/utils/generator-code/rustTypes.d.ts +44 -0
  316. package/dist/utils/generator-code/scala.d.ts +1 -0
  317. package/dist/utils/generator-code/seaorm.d.ts +22 -0
  318. package/dist/utils/generator-code/swift.d.ts +44 -0
  319. package/dist/utils/generator-code/utils.d.ts +31 -1
  320. package/dist/utils/generator-code/zod.d.ts +25 -0
  321. package/dist/utils/globalEventObservable.d.ts +10 -1
  322. package/dist/utils/highlightWords.d.ts +29 -0
  323. package/dist/utils/index.d.ts +1 -2
  324. package/dist/utils/keyboard-shortcut/bindKeys.d.ts +9 -0
  325. package/dist/utils/keyboard-shortcut/index.d.ts +15 -1
  326. package/dist/utils/keyboard-shortcut/utils.d.ts +21 -0
  327. package/dist/utils/loadValue.d.ts +7 -0
  328. package/dist/utils/map-columns/alignTypes.d.ts +37 -0
  329. package/dist/utils/map-columns/buildRows.d.ts +102 -0
  330. package/dist/utils/map-columns/candidateKeys.d.ts +24 -0
  331. package/dist/utils/map-columns/index.d.ts +8 -0
  332. package/dist/utils/map-columns/mapping.d.ts +67 -0
  333. package/dist/utils/map-columns/prefill.d.ts +26 -0
  334. package/dist/utils/map-columns/toMapColumnsActions.d.ts +10 -0
  335. package/dist/utils/map-columns/validate.d.ts +45 -0
  336. package/dist/utils/memo.d.ts +4 -0
  337. package/dist/utils/referentialAction.d.ts +21 -0
  338. package/dist/utils/schema-aml-parser/types.d.ts +8 -0
  339. package/dist/utils/schema-dbml-parser/tokenizer.d.ts +2 -0
  340. package/dist/utils/schema-dbml-parser/types.d.ts +14 -0
  341. package/dist/utils/schema-sql/Databricks.d.ts +13 -3
  342. package/dist/utils/schema-sql/MSSQL.d.ts +19 -2
  343. package/dist/utils/schema-sql/MariaDB.d.ts +10 -4
  344. package/dist/utils/schema-sql/MySQL.d.ts +18 -4
  345. package/dist/utils/schema-sql/Oracle.d.ts +23 -4
  346. package/dist/utils/schema-sql/PostgreSQL.d.ts +16 -4
  347. package/dist/utils/schema-sql/SQLite.d.ts +16 -4
  348. package/dist/utils/schema-sql/Snowflake.d.ts +8 -3
  349. package/dist/utils/schema-sql/index.d.ts +21 -1
  350. package/dist/utils/schema-sql/options.d.ts +57 -0
  351. package/dist/utils/schema-sql/utils.d.ts +120 -2
  352. package/dist/utils/schema-sql-parser/index.d.ts +5 -1
  353. package/dist/utils/stageCursor.d.ts +20 -0
  354. package/dist/utils/table-clipboard/payload.d.ts +3 -0
  355. package/dist/utils/table-clipboard/placement.d.ts +2 -0
  356. package/dist/utils/tableColor.d.ts +29 -0
  357. package/dist/utils/tableGroup.d.ts +142 -0
  358. package/dist/utils/tableKeys.d.ts +54 -0
  359. package/dist/workers/elkLayout.shared-worker.js +1 -1
  360. package/dist/workers/exportPng.shared-worker.js +30 -28
  361. package/dist/workers/shiki.shared-worker.js +1 -1
  362. package/dist/workers/spawn.d.ts +1 -2
  363. package/dist/workers/spawn.inline.d.ts +0 -1
  364. package/package.json +12 -18
  365. package/dist/components/generator-code/GeneratorCode.styles.d.ts +0 -2
  366. package/dist/schemaGCService-BagQ1wfF.js +0 -38
  367. package/dist/services/schema-gc/index.d.ts +0 -18
  368. package/dist/services/schema-gc/procGC.d.ts +0 -4
  369. package/dist/services/schema-gc/schemaGC.shared-worker.d.ts +0 -2
  370. package/dist/services/schema-gc/schemaGCService.d.ts +0 -5
  371. package/dist/shared-store-BqPSXAEf.js +0 -1072
  372. package/dist/store-hooks-DuzDVhPy.js +0 -10282
  373. package/dist/styles/colorPicker.style.d.ts +0 -7
  374. package/dist/utils/draw-relationship/chamfer.d.ts +0 -3
  375. package/dist/workers/schemaGC.shared-worker.js +0 -1
@@ -0,0 +1,142 @@
1
+ import { RootState } from '../engine/state';
2
+ import { Point, Table, TableGroup } from '../internal-types';
3
+ import { Rect } from '../konva/scene/metrics';
4
+ import { GeometrySource } from './draw-relationship/geometrySource';
5
+ export type TableGroupRectOptions = {
6
+ /** Tables the box leaves out though they are members, the ones a drag holds. */
7
+ excludeTableIds?: ReadonlyArray<string>;
8
+ };
9
+ /** A group's box options, and the members it is read from when the caller holds them. */
10
+ export type TableGroupMemberOptions = TableGroupRectOptions & {
11
+ /** The group's member tables, which spares a walk over every table of the document. */
12
+ members?: ReadonlyArray<Table>;
13
+ };
14
+ /**
15
+ * The group a table is in, or '' for none: a groupId naming no group the
16
+ * document lists reads as none, whatever the table saved.
17
+ */
18
+ export declare function getTableGroupId({ doc }: RootState, table: Table): string;
19
+ /** The ids of the tables a group holds, in document order; none for a group the document does not list. */
20
+ export declare function getTableGroupMemberIds(state: RootState, groupId: string): string[];
21
+ /**
22
+ * A rect grown by the padding on every side and by the title bar on top too,
23
+ * so the bar a group draws along the top of its box clears what it holds.
24
+ */
25
+ export declare function padRect(rect: Rect, padding?: number): Rect;
26
+ /**
27
+ * The box a group is drawn and hit in: its stored rect united with each member
28
+ * table's rect and the padding around it, title bar included, so a member that
29
+ * grows never sticks out and nothing is written for it.
30
+ *
31
+ * @example
32
+ * const box = getTableGroupRect(state, group, { excludeTableIds: dragged });
33
+ */
34
+ export declare function getTableGroupRect(state: RootState, group: TableGroup, { excludeTableIds, members, }?: TableGroupMemberOptions): Rect;
35
+ /**
36
+ * Each group's box seeded at its stored rect, keyed by id, for one walk over
37
+ * the tables to grow with growTableGroupBox: every box out of one pass, where
38
+ * a box apiece walks every table once per group.
39
+ */
40
+ export declare function seedTableGroupBoxes(groups: ReadonlyArray<TableGroup>): Map<string, Rect>;
41
+ /**
42
+ * Grows the box of the group a table names by the table's rect and padding; a
43
+ * table naming no seeded group, a removed one among them, grows none.
44
+ */
45
+ export declare function growTableGroupBox(boxes: Map<string, Rect>, table: Table, rect: Rect): void;
46
+ /**
47
+ * The box of every group the document lists, keyed by id, each as
48
+ * getTableGroupRect reads it, out of one walk over the tables.
49
+ *
50
+ * @example
51
+ * const boxes = getTableGroupRects(state, { excludeTableIds: dragged });
52
+ */
53
+ export declare function getTableGroupRects(state: RootState, { excludeTableIds }?: TableGroupRectOptions): Map<string, Rect>;
54
+ /**
55
+ * The member tables of every group the document lists, keyed by id, each list
56
+ * in document order, out of one walk over the tables; a group with no member
57
+ * is left out.
58
+ */
59
+ export declare function getTableGroupMembers(state: RootState): Map<string, Table[]>;
60
+ /**
61
+ * The rect a group made from tables takes: their bounds and the padding around
62
+ * them, or null for no table the document lists.
63
+ */
64
+ export declare function getTablesGroupRect(state: RootState, tableIds: ReadonlyArray<string>): Rect | null;
65
+ /** A group and the rect a placement gives it. */
66
+ export type TableGroupWrap = Rect & {
67
+ id: string;
68
+ };
69
+ /**
70
+ * The rect each listed group with a member takes once every table named stands
71
+ * at its point: its members' bounds and the padding, what an automatic
72
+ * placement writes. A group with no member keeps its rect and is left out.
73
+ *
74
+ * @example
75
+ * const resizes = getTableGroupWraps(state, points).map(resizeTableGroupAction);
76
+ */
77
+ export declare function getTableGroupWraps(state: RootState, points?: ReadonlyArray<Point & {
78
+ id: string;
79
+ }>): TableGroupWrap[];
80
+ /** The centre of a table's box, the point every membership test reads. */
81
+ export declare function getTableCenter(state: RootState, table: Table): Point;
82
+ /** Whether the point lies in the rect, its edges included. */
83
+ export declare function isPointInRect({ x, y }: Point, rect: Rect): boolean;
84
+ /**
85
+ * The topmost group whose box holds the point: the highest zIndex, and of two
86
+ * at one the later in doc.tableGroupIds, the one drawn over the other. Null
87
+ * where no group's box reaches.
88
+ *
89
+ * @example
90
+ * const group = findTableGroupAt(state, getTableCenter(state, table));
91
+ */
92
+ export declare function findTableGroupAt(state: RootState, point: Point, options?: TableGroupRectOptions): TableGroup | null;
93
+ /** Where findTableGroupsAt reads the boxes: built from the tables, or handed in built. */
94
+ export type TableGroupFindOptions = TableGroupRectOptions & {
95
+ /** Every group's box, keyed as getTableGroupRects keys them, read in place of building them. */
96
+ boxes?: ReadonlyMap<string, Rect>;
97
+ };
98
+ /**
99
+ * The topmost group at each point, as findTableGroupAt finds it, every box
100
+ * read once for all of them, which a drag of many tables asks every step; no
101
+ * point, and no box is built.
102
+ *
103
+ * @example
104
+ * const groups = findTableGroupsAt(state, centers, { excludeTableIds: ids });
105
+ */
106
+ export declare function findTableGroupsAt(state: RootState, points: ReadonlyArray<Point>, { boxes, ...options }?: TableGroupFindOptions): Array<TableGroup | null>;
107
+ /** The zIndex that lifts a group over every other group, tables and memos aside. */
108
+ export declare const nextTableGroupZIndex: (groups: TableGroup[]) => number;
109
+ /**
110
+ * Whether the document shows its groups, boxes and header colors alike. The
111
+ * bit hides them, so a document saved before groups existed shows them.
112
+ */
113
+ export declare const isTableGroupShown: ({ settings }: RootState) => boolean;
114
+ /** A group's color as an opaque hex and the black or white text drawn over it. */
115
+ export type TableGroupColors = {
116
+ background: string;
117
+ foreground: string;
118
+ };
119
+ /**
120
+ * The colors a group paints with, or null for a group with no color or one
121
+ * toOpaqueHex cannot read, which the neutral theme colors paint instead.
122
+ */
123
+ export declare function getTableGroupColors(group: TableGroup): TableGroupColors | null;
124
+ /**
125
+ * The colors a member table's header takes from its group, or null where it
126
+ * keeps its own: in a view, while groups are hidden, out of any group, or in
127
+ * a group with no color it can read.
128
+ *
129
+ * @example
130
+ * const tint = getTableHeaderTint(state, table, source);
131
+ */
132
+ export declare function getTableHeaderTint(state: RootState, table: Table, source?: GeometrySource): TableGroupColors | null;
133
+ /**
134
+ * The colors a header takes from the group named, one already read as listed ('' for none), as
135
+ * getTableHeaderTint decides them: a scene naming each table's group off one read of the list hands
136
+ * it here, so a group coming or going re-renders no table it does not reach.
137
+ *
138
+ * @example
139
+ * const tint = getTableGroupTint(state, props.tableGroupId, source);
140
+ */
141
+ export declare function getTableGroupTint(state: RootState, groupId: string, source?: GeometrySource): TableGroupColors | null;
142
+ //# sourceMappingURL=tableGroup.d.ts.map
@@ -0,0 +1,54 @@
1
+ import { RootState } from '../engine/state';
2
+ import { Table } from '../internal-types';
3
+ type KeyState = Pick<RootState, 'doc' | 'collections'>;
4
+ export declare function invalidateTableIndexes(): void;
5
+ /**
6
+ * The ids of the table's indexes in list order, from a grouping of the whole
7
+ * list built once per add or drop, so measuring every table reads the list once
8
+ * rather than once a table. An observer still re-runs on each add and drop.
9
+ */
10
+ export declare function getTableIndexIds({ doc, collections }: KeyState, tableId: string): string[];
11
+ /**
12
+ * A key the table's columns declare rather than an index entity: the primary
13
+ * key over the columns marked PK, or one column marked UQ. The name is the one
14
+ * the DDL gives it where a vendor writes a name.
15
+ */
16
+ export type ColumnKey = {
17
+ id: string;
18
+ kind: 'primaryKey' | 'unique';
19
+ name: string;
20
+ columnIds: string[];
21
+ };
22
+ /** A unique index of the table and the columns of the table it keys, in key order. */
23
+ export type UniqueIndexKey = {
24
+ indexId: string;
25
+ columnIds: string[];
26
+ };
27
+ /** One alternate key: a unique index over two or more of the table's columns. */
28
+ export type AlternateKey = UniqueIndexKey;
29
+ /**
30
+ * The keys a table's columns declare, primary key first and then each unique
31
+ * column in column order. Only the columns edit them, so a list showing them
32
+ * beside the index entities shows them read only.
33
+ */
34
+ export declare function getColumnKeys({ collections, settings }: Pick<RootState, 'collections' | 'settings'>, table: Table): ColumnKey[];
35
+ /**
36
+ * Each unique index of the table in index list order, with the columns of the
37
+ * table it keys in key order: over two or more an alternate key, over one the
38
+ * unique key of that column.
39
+ */
40
+ export declare function getUniqueIndexKeys(state: KeyState, table: Table): UniqueIndexKey[];
41
+ /**
42
+ * The table's alternate keys, AK1 first: its unique indexes over two or more
43
+ * of its columns, ordered by where those columns stand in the table. Neither
44
+ * an undo nor a peer's concurrent add reorders them, as the index list would.
45
+ */
46
+ export declare function getAlternateKeys(state: KeyState, table: Table): AlternateKey[];
47
+ /**
48
+ * What each column in those keys is marked with, AK1.2 for the second column
49
+ * of the first key; a column in several keys carries each mark, comma joined.
50
+ * A column in none has no entry.
51
+ */
52
+ export declare function getAlternateKeyMarks(state: KeyState, table: Table): Record<string, string>;
53
+ export {};
54
+ //# sourceMappingURL=tableKeys.d.ts.map
@@ -1 +1 @@
1
- import*as e from"comlink";typeof document>`u`&&Reflect.set(globalThis,`document`,{});const t={force:`force`,layeredHorizontal:`layeredHorizontal`,layeredVertical:`layeredVertical`,flow:`flow`,viewLayered:`viewLayered`};t.force;function n(e){return e!==t.force}function r(e){return e===t.flow}const i={"elk.algorithm":`layered`,"elk.layered.spacing.baseValue":`40`,"elk.spacing.componentComponent":`80`,"elk.layered.spacing.edgeNodeBetweenLayers":`120`,"elk.layered.considerModelOrder.strategy":`PREFER_EDGES`,"elk.layered.crossingMinimization.forceNodeModelOrder":`true`,"elk.layered.mergeEdges":`true`,"elk.layered.nodePlacement.strategy":`INTERACTIVE`,"elk.layered.layering.strategy":`INTERACTIVE`},a={"elk.alignment":`LEFT`},o={"elk.aspectRatio":`0.5625`},s={"elk.spacing.nodeNode":`80`,"elk.separateConnectedComponents":`true`,"elk.spacing.componentComponent":`160`},c=e=>({...s,"elk.algorithm":`layered`,"elk.direction":e,"elk.layered.spacing.nodeNodeBetweenLayers":`160`,"elk.layered.cycleBreaking.strategy":`DEPTH_FIRST`});function l(e){switch(e){case t.layeredHorizontal:return c(`RIGHT`);case t.layeredVertical:return c(`DOWN`);case t.flow:return{...c(`RIGHT`),"elk.layered.nodePlacement.strategy":`SIMPLE`,"elk.layered.spacing.edgeNodeBetweenLayers":`80`};case t.viewLayered:return{...i}}}function u(e){return e===t.viewLayered?{...a}:null}const d=[...new Set(Object.values(t).filter(n).map(e=>l(e)[`elk.algorithm`]))],f=`EAST`,p=e=>`edge-${e}-source`,m=e=>`edge-${e}-target`;function h(e,t){return e.side===t.side?e.side===f?e.row-t.row:t.row-e.row:e.side===f?-1:1}function g(e){let t=new Map,n=(e,n)=>{let r=t.get(e);r?r.push(n):t.set(e,[n])};return e.forEach((e,t)=>{n(e.source,{id:p(t),row:e.sourceRow,side:f}),n(e.target,{id:m(t),row:e.targetRow,side:`WEST`})}),new Map([...t].map(([e,t])=>[e,t.sort(h).map(({id:e,side:t})=>({id:e,width:8,height:8,layoutOptions:{"elk.port.side":t}}))]))}function _({placement:e,nodes:t,edges:n}){let i=r(e)?g(n):null;return{id:`root`,layoutOptions:l(e),children:t.map(t=>v(t,e,i)),edges:n.map(({source:e,target:t},n)=>({id:`edge-${n}`,sources:[i?p(n):e],targets:[i?m(n):t]}))}}function v({id:e,width:t,height:n,x:r,y:i,children:a},s,c){if(a?.length)return{id:e,width:t,height:n,layoutOptions:{...o},children:a.map(e=>v(e,s,c))};let l={...u(s),...c?{"elk.portConstraints":`FIXED_ORDER`}:{}};return{id:e,width:t,height:n,...r===void 0?{}:{x:r},...i===void 0?{}:{y:i},...Object.keys(l).length?{layoutOptions:l}:{},...c?{ports:c.get(e)??[]}:{}}}function y(e,t,n){return e.flatMap(({id:e,x:r,y:i,children:a})=>{let o=t+(r??0),s=n+(i??0);return a?.length?y(a,o,s):[{id:e,x:o,y:s}]})}let b=null;function x(){return b??=import(`elkjs/lib/elk.bundled.js`).then(({default:e})=>new e({algorithms:d})),b}const S=new class{async ready(){return await x(),!0}async layout(e){return y((await(await x()).layout(_(e))).children??[],0,0)}};self.onconnect=t=>{let n=t.ports[0];e.expose(S,n)};
1
+ import*as e from"comlink";typeof document>`u`&&Reflect.set(globalThis,`document`,{});const t={force:`force`,layeredHorizontal:`layeredHorizontal`,layeredVertical:`layeredVertical`,flow:`flow`,viewLayered:`viewLayered`};t.force;function n(e){return e!==t.force}function r(e){return e===t.flow}const i={"elk.padding":`[top=52,left=24,bottom=24,right=24]`},a={"elk.padding":`[top=0,left=0,bottom=0,right=0]`,"elk.hierarchyHandling":`INCLUDE_CHILDREN`},o={"elk.algorithm":`layered`,"elk.layered.spacing.baseValue":`40`,"elk.spacing.componentComponent":`80`,"elk.layered.spacing.edgeNodeBetweenLayers":`120`,"elk.layered.considerModelOrder.strategy":`PREFER_EDGES`,"elk.layered.crossingMinimization.forceNodeModelOrder":`true`,"elk.layered.mergeEdges":`true`,"elk.layered.nodePlacement.strategy":`INTERACTIVE`,"elk.layered.layering.strategy":`INTERACTIVE`},s={"elk.alignment":`LEFT`},c={"elk.aspectRatio":`0.5625`},l={"elk.spacing.nodeNode":`80`,"elk.separateConnectedComponents":`true`,"elk.spacing.componentComponent":`160`},u=e=>({...l,"elk.algorithm":`layered`,"elk.direction":e,"elk.layered.spacing.nodeNodeBetweenLayers":`160`,"elk.layered.cycleBreaking.strategy":`DEPTH_FIRST`});function d(e){switch(e){case t.layeredHorizontal:return u(`RIGHT`);case t.layeredVertical:return u(`DOWN`);case t.flow:return{...u(`RIGHT`),"elk.layered.nodePlacement.strategy":`SIMPLE`,"elk.layered.spacing.edgeNodeBetweenLayers":`80`};case t.viewLayered:return{...o}}}function f(e){return e===t.viewLayered?{...s}:null}function p(e,t){switch(t){case`tableGroup`:return{...d(e),...i};case`component`:return{...d(e),...a};default:return{...c}}}const m=[...new Set(Object.values(t).filter(n).map(e=>d(e)[`elk.algorithm`]))],h=`EAST`,g=e=>`edge-${e}-source`,_=e=>`edge-${e}-target`;function v(e,t){return e.side===t.side?e.side===h?e.row-t.row:t.row-e.row:e.side===h?-1:1}function y(e){let t=/* @__PURE__ */ new Map,n=(e,n)=>{let r=t.get(e);r?r.push(n):t.set(e,[n])};return e.forEach((e,t)=>{n(e.source,{id:g(t),row:e.sourceRow,side:h}),n(e.target,{id:_(t),row:e.targetRow,side:`WEST`})}),new Map([...t].map(([e,t])=>[e,t.sort(v).map(({id:e,side:t})=>({id:e,width:8,height:8,layoutOptions:{"elk.port.side":t}}))]))}function b(e,t=/* @__PURE__ */ new Map){return e.forEach(({id:e,children:n=[]})=>{n.forEach(n=>t.set(n.id,e)),b(n,t)}),t}function x(e,t){let n=[];for(let r=e.get(t);r;r=e.get(r))n.push(r);return n}function S(e,t,n){let r=new Set(x(e,t));return x(e,n).find(e=>r.has(e))??null}function C({placement:e,nodes:t,edges:n}){let i=r(e)?y(n):null,a=b(t),o=/* @__PURE__ */ new Map;return n.forEach(({source:e,target:t},n)=>{let r=S(a,e,t),s={id:`edge-${n}`,sources:[i?g(n):e],targets:[i?_(n):t]},c=o.get(r);c?c.push(s):o.set(r,[s])}),{id:`root`,layoutOptions:d(e),children:t.map(t=>w(t,e,i,o)),edges:o.get(null)??[]}}function w({id:e,width:t,height:n,x:r,y:i,children:a,kind:o},s,c,l){if(a?.length){let r=l.get(e);return{id:e,width:t,height:n,layoutOptions:p(s,o),children:a.map(e=>w(e,s,c,l)),...r?{edges:r}:{}}}let u={...f(s),...c?{"elk.portConstraints":`FIXED_ORDER`}:{}};return{id:e,width:t,height:n,...r===void 0?{}:{x:r},...i===void 0?{}:{y:i},...Object.keys(u).length?{layoutOptions:u}:{},...c?{ports:c.get(e)??[]}:{}}}function T(e,t,n){return e.flatMap(({id:e,x:r,y:i,children:a})=>{let o=t+(r??0),s=n+(i??0);return a?.length?T(a,o,s):[{id:e,x:o,y:s}]})}let E=null;function D(){return E??=import(`elkjs/lib/elk.bundled.js`).then(({default:e})=>new e({algorithms:m})),E}const O=new class{async ready(){return await D(),!0}async layout(e){return T((await(await D()).layout(C(e))).children??[],0,0)}};self.onconnect=t=>{let n=t.ports[0];e.expose(O,n)};