@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,6 @@
1
1
  /**
2
2
  * Global, not scoped. The ::-webkit-scrollbar* pseudo elements have no element of their own to
3
- * hang a component class on, and .scrollbar is a hook class seven components opt into by
3
+ * hang a component class on, and .scrollbar is a hook class the scrolling panels opt into by
4
4
  * literal name (class=${['scrollbar', ...]}) — scoping it would rename it out from under them.
5
5
  */
6
6
  export declare const scrollbarStyle: import('@dineug/r-html').CSSTemplateLiterals;
@@ -1744,6 +1744,10 @@ export declare const Appearance: {
1744
1744
  };
1745
1745
  export type Appearance = ValuesType<typeof Appearance>;
1746
1746
  export declare const AppearanceList: ("dark" | "light")[];
1747
+ /** The theme builder's third appearance: the light or dark the system shows. */
1748
+ export declare const SYSTEM_APPEARANCE = "system";
1749
+ export type AppearanceOption = Appearance | typeof SYSTEM_APPEARANCE;
1750
+ export declare const AppearanceOptionList: ReadonlyArray<AppearanceOption>;
1747
1751
  export declare const GrayColor: {
1748
1752
  readonly gray: "gray";
1749
1753
  readonly mauve: "mauve";
@@ -1783,11 +1787,15 @@ export declare const AccentColor: {
1783
1787
  readonly sky: "sky";
1784
1788
  };
1785
1789
  export type AccentColor = ValuesType<typeof AccentColor>;
1786
- export declare const AccentColorList: ("ruby" | "gray" | "gold" | "bronze" | "brown" | "yellow" | "amber" | "orange" | "tomato" | "red" | "crimson" | "pink" | "plum" | "purple" | "violet" | "iris" | "indigo" | "blue" | "cyan" | "teal" | "jade" | "green" | "grass" | "lime" | "mint" | "sky")[];
1790
+ export declare const AccentColorList: ("ruby" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "pink" | "gray" | "gold" | "bronze" | "brown" | "tomato" | "crimson" | "plum" | "iris" | "jade" | "grass" | "mint")[];
1787
1791
  export type ThemeOptions = {
1788
- appearance: Appearance;
1792
+ appearance: AppearanceOption;
1789
1793
  grayColor: GrayColor;
1790
1794
  accentColor: AccentColor;
1791
1795
  };
1792
- export declare const createTheme: ({ grayColor, accentColor, appearance, }: ThemeOptions) => Theme;
1796
+ /** Theme options with system resolved to the light or dark a theme is built for. */
1797
+ export type ResolvedThemeOptions = Omit<ThemeOptions, 'appearance'> & {
1798
+ appearance: Appearance;
1799
+ };
1800
+ export declare const createTheme: ({ grayColor, accentColor, appearance, }: ResolvedThemeOptions) => Theme;
1793
1801
  //# sourceMappingURL=radix-ui-theme.d.ts.map
@@ -30,6 +30,9 @@ export type Theme = {
30
30
  tableSelect: string;
31
31
  tableBorder: string;
32
32
  tableShadow: string;
33
+ tableGroupHeaderBackground: string;
34
+ tableGroupBackground: string;
35
+ tableGroupBorder: string;
33
36
  memoBackground: string;
34
37
  memoSelect: string;
35
38
  memoBorder: string;
@@ -52,6 +55,12 @@ export type Theme = {
52
55
  minimapViewportBorderHover: string;
53
56
  toastBackground: string;
54
57
  toastBorder: string;
58
+ toastSuccess: string;
59
+ toastError: string;
60
+ findReplaceError: string;
61
+ mapColumnsError: string;
62
+ schemaSqlWarningBackground: string;
63
+ schemaSqlWarningForeground: string;
55
64
  dragSelectBackground: string;
56
65
  dragSelectBorder: string;
57
66
  scrollbarTrack: string;
@@ -65,12 +74,17 @@ export type Theme = {
65
74
  keyPK: string;
66
75
  keyFK: string;
67
76
  keyPFK: string;
68
- diffInsertBackground: string;
69
- diffDeleteBackground: string;
70
- diffCrossBackground: string;
77
+ treeBackground: string;
78
+ treeRowHover: string;
79
+ treeRowCurrent: string;
80
+ treeMuted: string;
81
+ treeMatch: string;
82
+ explorerBackground: string;
83
+ explorerBorder: string;
71
84
  diffInsertForeground: string;
72
85
  diffDeleteForeground: string;
73
- diffCrossForeground: string;
86
+ diffModifyForeground: string;
87
+ diffRenameForeground: string;
74
88
  };
75
89
  export declare const ThemeTokens: ReadonlyArray<keyof Theme>;
76
90
  /** The custom property one token is published under on :host. */
@@ -3,6 +3,15 @@ import { RootState } from '../engine/state';
3
3
  import { Table } from '../internal-types';
4
4
  import { GeometrySource } from './draw-relationship/geometrySource';
5
5
  export declare function getWidthGeneration(): number;
6
+ /**
7
+ * Reads the generation through the observable, so the render calling it runs
8
+ * again whenever any table's widths may have changed.
9
+ *
10
+ * @example
11
+ * trackTableWidths();
12
+ * const rect = getTableRect(state, member);
13
+ */
14
+ export declare function trackTableWidths(): number;
6
15
  /**
7
16
  * Invalidates every cached table size. Called from recalculateTableWidth,
8
17
  * which rewrites widths without dispatching an action, and from the
@@ -1,2 +1,11 @@
1
1
  export declare function copyToClipboard(value: string): Promise<void>;
2
+ /**
3
+ * Puts a png on the clipboard, writing at once inside the click with the image
4
+ * still to come: Safari refuses a write made after an await has spent the
5
+ * click. A host with no image clipboard refuses before the image is asked for.
6
+ *
7
+ * @example
8
+ * await copyImageToClipboard(() => createDocumentPng(options));
9
+ */
10
+ export declare function copyImageToClipboard(createPng: () => Promise<Blob>): Promise<void>;
2
11
  //# sourceMappingURL=clipboard.d.ts.map
@@ -0,0 +1,3 @@
1
+ import { DeepPartial, TableGroup } from '../../internal-types';
2
+ export declare const createTableGroup: (value?: DeepPartial<TableGroup>) => TableGroup;
3
+ //# sourceMappingURL=tableGroup.entity.d.ts.map
@@ -0,0 +1,21 @@
1
+ /** The dark text a light background takes. */
2
+ export declare const CONTRAST_BLACK = "#000000";
3
+ /** The light text a dark background takes. */
4
+ export declare const CONTRAST_WHITE = "#ffffff";
5
+ /**
6
+ * A color's WCAG 2 relative luminance, from 0 for black to 1 for white, any
7
+ * alpha dropped; null for a color toOpaqueHex cannot read.
8
+ */
9
+ export declare function relativeLuminance(color: string): number | null;
10
+ /** The WCAG 2 contrast ratio of two relative luminances, from 1 to 21 in either order. */
11
+ export declare function contrastRatio(a: number, b: number): number;
12
+ /**
13
+ * White, unless black's WCAG 2 contrast ratio against the background beats
14
+ * white's by more than 4, so white is never under 3 and black never under 7.
15
+ * Null for a background toOpaqueHex cannot read, which keeps its colors.
16
+ *
17
+ * @example
18
+ * contrastTextColor('#3b82f6'); // '#ffffff'
19
+ */
20
+ export declare function contrastTextColor(background: string): string | null;
21
+ //# sourceMappingURL=contrastText.d.ts.map
@@ -0,0 +1,8 @@
1
+ import { DeepPartial } from '../internal-types';
2
+ /**
3
+ * Merges source over a deep copy of target: objects key by key, arrays target
4
+ * first then source, every object and array in the result a fresh copy, and a
5
+ * key source holds as undefined overwriting target's.
6
+ */
7
+ export declare function deepMerge<T extends object>(target: T, source: DeepPartial<T>): T;
8
+ //# sourceMappingURL=deepMerge.d.ts.map
@@ -1,9 +1,5 @@
1
+ /** macOS or iOS, where $mod is Cmd rather than Ctrl. */
1
2
  export declare const hasAppleDevice: () => boolean;
2
- export declare const hasMacintosh: () => boolean;
3
- export declare const hasIOS: () => boolean;
4
- export declare const hasAndroid: () => boolean;
3
+ /** Windows, whose browsers all name it Win32 and where AltGr is Ctrl and Alt held. */
5
4
  export declare const hasWindows: () => boolean;
6
- export declare const hasChrome: () => boolean;
7
- export declare const hasSafari: () => boolean;
8
- export declare const hasFirefox: () => boolean;
9
5
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,39 @@
1
+ import { RootState } from '../../engine/state';
2
+ import { Column, Index, Memo, Relationship, Table, TableGroup } from '../../internal-types';
3
+ import { Pairing } from './pairEntities';
4
+ import { DiffChange } from './types';
5
+ /** Both documents and what pairs across them, which every comparison reads. */
6
+ export type DiffContext = {
7
+ prev: RootState;
8
+ next: RootState;
9
+ tables: Pairing;
10
+ columns: Pairing;
11
+ tableGroups: Pairing;
12
+ };
13
+ /** Name, comment, the group it is in, where it stands and its colour; never its z-index or the widths its text gives it. */
14
+ export declare function compareTables(ctx: DiffContext, prev: Table, next: Table): DiffChange[];
15
+ /**
16
+ * Name, comment, type, default and the four options, and its place among the
17
+ * columns once it moved, given as where it stood and stands, counted from one.
18
+ */
19
+ export declare function compareColumns(prev: Column, next: Column, moved: {
20
+ before: number;
21
+ after: number;
22
+ } | null): DiffChange[];
23
+ /** The columns of an index in key order, each as the current column it pairs with and its direction. */
24
+ export declare function indexKeyOf(ctx: DiffContext, index: Index, side: 'prev' | 'next'): string;
25
+ /** Name, UNIQUE, and the columns in their order and direction, each column by the one it pairs with. */
26
+ export declare function compareIndexes(ctx: DiffContext, prev: Index, next: Index): DiffChange[];
27
+ /** A foreign key as it reads: its columns, the parent and the parent's columns. */
28
+ export declare function foreignKeyText(state: RootState, relationship: Relationship): string;
29
+ /** The column pairs of a foreign key, child to parent, as the current columns they pair with. */
30
+ export declare function foreignKeyPairsOf(ctx: DiffContext, relationship: Relationship, side: 'prev' | 'next'): string;
31
+ /** Its column pairs, its kind and what ON DELETE and ON UPDATE do; never where its ends are anchored. */
32
+ export declare function compareForeignKeys(ctx: DiffContext, prev: Relationship, next: Relationship): DiffChange[];
33
+ /** What it says, where it stands, its size and its colour; never its z-index. */
34
+ export declare function compareMemos(prev: Memo, next: Memo): DiffChange[];
35
+ /** The tables a group holds, each as the current table it pairs with. */
36
+ export declare function groupMembersOf(ctx: DiffContext, group: TableGroup, side: 'prev' | 'next'): string[];
37
+ /** Name, the tables it holds, its colour and the box it keeps; never its z-index. */
38
+ export declare function compareTableGroups(ctx: DiffContext, prev: TableGroup, next: TableGroup): DiffChange[];
39
+ //# sourceMappingURL=compareEntities.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { RootState } from '../../engine/state';
2
+ import { DocumentDiff } from './types';
3
+ /**
4
+ * What changed from a saved document to the current one: the entries the diff
5
+ * tree lists and the marks each pane draws, which say the same thing. An entity
6
+ * pairs by id, then one to one by a name it keeps (src/components/erd/AGENTS.md).
7
+ *
8
+ * @example
9
+ * const { entries, prev, next } = diffDocuments(savedStore.state, store.state);
10
+ */
11
+ export declare function diffDocuments(prev: RootState, next: RootState): DocumentDiff;
12
+ //# sourceMappingURL=diffDocuments.d.ts.map
@@ -0,0 +1,5 @@
1
+ export * from './compareEntities';
2
+ export * from './diffDocuments';
3
+ export * from './pairEntities';
4
+ export * from './types';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,41 @@
1
+ /** Which entity of the saved document stands for which of the current one, both ways. */
2
+ export type Pairing = {
3
+ /** A saved id to the current id it pairs with. */
4
+ toNext: Map<string, string>;
5
+ /** A current id to the saved id it pairs with. */
6
+ toPrev: Map<string, string>;
7
+ };
8
+ export declare const emptyPairing: () => Pairing;
9
+ /** An id as the current one it stands for: a saved id as the one it pairs with, or one no current id can equal. */
10
+ export declare function asNextId(pairing: Pairing, id: string, side: 'prev' | 'next'): string;
11
+ /**
12
+ * A key two entities pair on, read on either side: a saved entity spells the
13
+ * ids it refers to as the current ones they pair with, so equal keys mean the
14
+ * same thing. Null for an entity the key cannot pair, an unnamed one say.
15
+ */
16
+ export type PairKey<T> = (item: T, side: 'prev' | 'next') => string | null;
17
+ /**
18
+ * Pairs two lists one to one: by id first, then by each key in turn, the
19
+ * saved entities taken in document order each pairing with the first current
20
+ * one left that has its key, so a rerun pairs the same way.
21
+ *
22
+ * @example
23
+ * pairEntities(prevTables, nextTables, [table => table.name.trim() ? table.name : null]);
24
+ */
25
+ export declare function pairEntities<T extends {
26
+ id: string;
27
+ }>(prev: ReadonlyArray<T>, next: ReadonlyArray<T>, keys?: ReadonlyArray<PairKey<T>>): Pairing;
28
+ /**
29
+ * Pairs what is left by the most members two entities share, for those a key
30
+ * cannot name, such as table groups with no name: the saved ones in document
31
+ * order, each taking the current one it shares the most with, ties the first.
32
+ */
33
+ export declare function pairByOverlap<T extends {
34
+ id: string;
35
+ }>(pairing: Pairing, prev: ReadonlyArray<T>, next: ReadonlyArray<T>, membersOf: (item: T, side: 'prev' | 'next') => ReadonlyArray<string>): void;
36
+ /**
37
+ * The positions of the longest run two sequences share in order, as the
38
+ * indexes of the second one, so an entry outside it is one that moved.
39
+ */
40
+ export declare function longestCommonIndexes(a: ReadonlyArray<string>, b: ReadonlyArray<string>): Set<number>;
41
+ //# sourceMappingURL=pairEntities.d.ts.map
@@ -0,0 +1,77 @@
1
+ import { DiffMap } from '../../components/erd/diff-viewer/diff';
2
+ import { ValuesType } from '../../internal-types';
3
+ export declare const DiffKind: {
4
+ readonly table: "table";
5
+ readonly column: "column";
6
+ readonly index: "index";
7
+ readonly foreignKey: "foreignKey";
8
+ readonly memo: "memo";
9
+ readonly tableGroup: "tableGroup";
10
+ };
11
+ export type DiffKind = ValuesType<typeof DiffKind>;
12
+ export declare const DiffStatus: {
13
+ readonly added: "added";
14
+ readonly modified: "modified";
15
+ readonly deleted: "deleted";
16
+ readonly renamed: "renamed";
17
+ };
18
+ export type DiffStatus = ValuesType<typeof DiffStatus>;
19
+ /** What of an entity changed, each the name of a tooltip line. */
20
+ export declare const DiffField: {
21
+ readonly name: "name";
22
+ readonly comment: "comment";
23
+ readonly dataType: "dataType";
24
+ readonly default: "default";
25
+ readonly autoIncrement: "autoIncrement";
26
+ readonly primaryKey: "primaryKey";
27
+ readonly unique: "unique";
28
+ readonly notNull: "notNull";
29
+ readonly order: "order";
30
+ readonly tableGroup: "tableGroup";
31
+ readonly position: "position";
32
+ readonly size: "size";
33
+ readonly color: "color";
34
+ readonly members: "members";
35
+ readonly columns: "columns";
36
+ readonly relationshipType: "relationshipType";
37
+ readonly onDelete: "onDelete";
38
+ readonly onUpdate: "onUpdate";
39
+ readonly value: "value";
40
+ };
41
+ export type DiffField = ValuesType<typeof DiffField>;
42
+ /** A value as the saved or the current document holds it, before any wording. */
43
+ export type DiffValue = string | number | boolean;
44
+ export type DiffChange = {
45
+ field: DiffField;
46
+ before: DiffValue;
47
+ after: DiffValue;
48
+ };
49
+ /**
50
+ * One entity the two documents differ on, or that holds one that does. Its
51
+ * status is null for a table listed only for what changed inside it.
52
+ */
53
+ export type DiffEntry = {
54
+ kind: DiffKind;
55
+ status: DiffStatus | null;
56
+ prevId: string | null;
57
+ nextId: string | null;
58
+ /** What the current document calls it, or the saved one where it is gone. */
59
+ name: string;
60
+ /** What the saved document calls it, the same as name unless renamed or added. */
61
+ prevName: string;
62
+ changes: DiffChange[];
63
+ /** A table's columns, indexes and foreign keys, in that order. */
64
+ children: DiffEntry[];
65
+ };
66
+ export type DiffEntries = {
67
+ tables: DiffEntry[];
68
+ tableGroups: DiffEntry[];
69
+ memos: DiffEntry[];
70
+ };
71
+ /** The entries for the tree and what each pane marks, which say the same thing. */
72
+ export type DocumentDiff = {
73
+ entries: DiffEntries;
74
+ prev: DiffMap;
75
+ next: DiffMap;
76
+ };
77
+ //# sourceMappingURL=types.d.ts.map
@@ -4,8 +4,26 @@ export declare function onStop(event: Event): void;
4
4
  export declare function onStopImmediate(event: Event): void;
5
5
  export declare function isMouseEvent(event: Event): event is MouseEvent;
6
6
  export declare function isTouchEvent(event: Event): event is TouchEvent;
7
+ /**
8
+ * A press of the secondary mouse button alone. A macOS Ctrl+click reports the
9
+ * main button with ctrlKey and stays a main press, and a touch has no button.
10
+ */
11
+ export declare function isSecondaryButtonPress(event: Event): boolean;
7
12
  /** A touch that puts a finger down beside another: a pinch, never a press of its own. */
8
13
  export declare function isMultiTouch(event: Event): boolean;
14
+ /** A press that may carry what it lands on: a touch, or the main mouse button. */
15
+ export declare function isMainButtonPress(event: Event): boolean;
16
+ /** A press of the middle mouse button. */
17
+ export declare function isMiddleButtonPress(event: Event): event is MouseEvent;
18
+ /**
19
+ * Prevents the next middle lift wherever it lands, heard on the window ahead of
20
+ * the listener that ends a pan, since Chromium on Linux pastes the selection on
21
+ * a lift left unprevented. The returned remover drops it when no lift came.
22
+ *
23
+ * @example
24
+ * drag$.subscribe(handleMove).add(preventMiddleLift());
25
+ */
26
+ export declare function preventMiddleLift(): () => void;
9
27
  /**
10
28
  * The editor root, which is where a pan has to take the selection off: the top
11
29
  * toolbar is a sibling of the scene that pans, so suppressing it any lower
@@ -10,6 +10,8 @@ export type Rect = {
10
10
  w: number;
11
11
  h: number;
12
12
  };
13
+ /** Whether the rect lies wholly inside the drag rect, its edges included. */
14
+ export declare function isInsideDragRect(dragRect: Rect, rect: Rect): boolean;
13
15
  export declare function isOverlapPosition(dragRect: Rect, rect: Rect): boolean;
14
16
  export declare function getOverlapPosition(dragRect: Rect, rect: Rect): PointToPoint | null;
15
17
  export {};
@@ -29,4 +29,6 @@ export declare function bezierControls(from: Point, fromOutward: Point, to: Poin
29
29
  * the particle measurement and the route box all stay as they were.
30
30
  */
31
31
  export declare function bezierPolyline(from: Point, fromOutward: Point, to: Point, toOutward: Point, segments?: number): Point[];
32
+ /** A cubic between two ends and its two control points, as that many chords. */
33
+ export declare function cubicPolyline(from: Point, first: Point, second: Point, to: Point, segments: number): Point[];
32
34
  //# sourceMappingURL=bezier.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { Point } from '../../internal-types';
2
+ /**
3
+ * How many chords a full-radius corner is flattened into. A chord strays from the
4
+ * arc by about a tenth of a pixel at the canvas's closest zoom, so the turn still
5
+ * reads as a curve there; a smaller corner takes one chord per pixel of radius.
6
+ */
7
+ export declare const ROUTE_CORNER_SEGMENTS = 6;
8
+ export declare function roundPolyline(points: Point[], radius: number): Point[];
9
+ //# sourceMappingURL=corner.d.ts.map
@@ -92,24 +92,24 @@ export type ObjectPoint = {
92
92
  rb: Point;
93
93
  };
94
94
  export declare const isDirection: (value: string) => boolean;
95
- export declare const PATH_HEIGHT = 30;
96
- export declare const PATH_END_HEIGHT: number;
95
+ /** The stub of a side's first slot: as short as the decoration lets it be. */
96
+ export declare const PATH_END_HEIGHT = 24;
97
97
  /**
98
- * The cardinality decoration, measured outward from the anchor. The four are one
99
- * shape and cannot be set independently: the ring shares a centre with the
100
- * second tick and has to clear both the first tick and the guide line.
98
+ * The cardinality decoration, measured outward from the anchor, at the size other
99
+ * ERD tools draw it, clear down to the lowest zoom a table shows its rows. The
100
+ * ring shares the second tick's centre and clears the first and the guide.
101
101
  */
102
- export declare const LINE_SIZE = 7;
103
- export declare const LINE_HEIGHT = 11;
102
+ export declare const LINE_SIZE = 6;
103
+ export declare const LINE_HEIGHT = 9;
104
104
  export declare const CIRCLE_HEIGHT: number;
105
- export declare const CIRCLE_RADIUS = 6;
105
+ export declare const CIRCLE_RADIUS = 5;
106
106
  export declare const PATH_LINE_HEIGHT: number;
107
107
  /**
108
108
  * How far apart the corridors of two relationships leaving the same table side
109
- * sit. Without it every path on a side turns at the same coordinate and their
110
- * first segments run down one another however far the anchors are spread.
109
+ * sit, one hit band at full zoom. Without it every path on a side turns at the
110
+ * same coordinate and their first segments run down one another.
111
111
  */
112
- export declare const STUB_STEP = 12;
112
+ export declare const STUB_STEP = 8;
113
113
  /**
114
114
  * Corridors repeat every fourth slot. An unbounded stub walks a busy side's
115
115
  * paths ever further from the table; wrapping caps the longest one and still
@@ -118,10 +118,10 @@ export declare const STUB_STEP = 12;
118
118
  export declare const STUB_CYCLE = 4;
119
119
  /**
120
120
  * The shortest a stub may be clamped to. It has to clear PATH_LINE_HEIGHT or the
121
- * guide line is drawn backwards, but it is not derived from it: this is where
122
- * the routing was measured, and following the decorations down cost overlap.
121
+ * guide line is drawn backwards; just past it, two facing tables about 50px
122
+ * apart still join in one straight run, where a longer floor sends it around.
123
123
  */
124
- export declare const MIN_STUB = 36;
124
+ export declare const MIN_STUB = 24;
125
125
  /**
126
126
  * The widest gap allowed between two anchors on the same table side. Capping the
127
127
  * pitch keeps a side's anchors together as a group, so a tall table's edge is
@@ -131,11 +131,11 @@ export declare const ANCHOR_MAX_PITCH = 120;
131
131
  /** Keeps the outermost anchor of a side clear of the table's corners. */
132
132
  export declare const ANCHOR_EDGE_INSET = 12;
133
133
  /**
134
- * How far back from a corner a connector turns when the corner is cut to 45
135
- * degrees. A ceiling rather than a length: each cut is clamped to half the
136
- * shorter run it touches, so a short run keeps its right angle.
134
+ * The radius of the quarter circle a connector turns on at a corner. A ceiling
135
+ * rather than a length: each corner is clamped to half the shorter run it
136
+ * touches, so a short run keeps its right angle.
137
137
  */
138
- export declare const ROUTE_CHAMFER = 8;
138
+ export declare const ROUTE_CORNER_RADIUS = 8;
139
139
  /** One end of a connector as the geometry reads it: which table, where on it, and which way out. */
140
140
  export type Anchor = Pick<RelationshipPoint, 'x' | 'y' | 'direction'> & {
141
141
  tableId: string;
@@ -0,0 +1,29 @@
1
+ import { Point } from '../../internal-types';
2
+ /**
3
+ * How far a loop's stubs run, as a multiple of how far its anchors sit from the
4
+ * table corner: the first loop's 20px gives the 24px every other stub starts at.
5
+ */
6
+ export declare const LOOP_STUB_RATIO = 1.2;
7
+ /**
8
+ * How far a loop's control points reach past its stubs, as the same multiple.
9
+ * With both scaled by the offset, a table's loops are one shape at nested sizes.
10
+ */
11
+ export declare const LOOP_CURVATURE = 1.25;
12
+ /**
13
+ * How many chords a loop is flattened into. Even a fourth loop's chords stray from
14
+ * the curve by under a quarter of a pixel at the canvas's closest zoom.
15
+ */
16
+ export declare const LOOP_SEGMENTS = 48;
17
+ /** How far a loop's anchors sit from the table corner, along either side. */
18
+ export declare function loopOffset(start: Point, end: Point): number;
19
+ /** The stub both ends of a loop run out on. */
20
+ export declare function loopStub(start: Point, end: Point): number;
21
+ /** How far past its anchors a loop is drawn at most, for the route box. */
22
+ export declare function loopReach(start: Point, end: Point): number;
23
+ /**
24
+ * A loop between its two turning points: a cubic leaving each straight out along
25
+ * its stub, so it meets both without a corner and turns round the table's corner
26
+ * clear of it.
27
+ */
28
+ export declare function loopPolyline(from: Point, fromOutward: Point, to: Point, toOutward: Point, offset: number): Point[];
29
+ //# sourceMappingURL=loop.d.ts.map
@@ -4,7 +4,7 @@ import { GeometrySource } from './geometrySource';
4
4
  export declare function getRelationshipPath(relationship: Relationship, source?: GeometrySource): RelationshipPath;
5
5
  /**
6
6
  * The routing polyline as one d, so a connector is a single element whatever the
7
- * router and the corner cuts made of it. The segments are contiguous by
7
+ * router and the rounded corners made of it. The segments are contiguous by
8
8
  * construction, so each contributes its far end and nothing else.
9
9
  */
10
10
  export declare function toPathD(segments: Array<[Point, Point]>): string;
@@ -1,4 +1,11 @@
1
1
  import { RootState } from '../../engine/state';
2
2
  import { GeometrySource } from './geometrySource';
3
- export declare function relationshipSort(state: RootState, source?: GeometrySource): void;
3
+ /**
4
+ * Places each relationship's anchors and slots on the source's channel, and on
5
+ * the document's routes every connector too, unless route is false, as in a
6
+ * store that draws nothing, where a route is never read.
7
+ */
8
+ export declare function relationshipSort(state: RootState, source?: GeometrySource, { route }?: {
9
+ route?: boolean;
10
+ }): void;
4
11
  //# sourceMappingURL=sort.d.ts.map
@@ -1,8 +1,9 @@
1
1
  import { Point } from '../../internal-types';
2
2
  import { Anchor, Anchors } from '.';
3
3
  /**
4
- * Slot zero keeps the historical PATH_END_HEIGHT, so a relationship that never
5
- * went through relationshipSort draws exactly as it did before.
4
+ * Slot zero runs at PATH_END_HEIGHT, the stub a relationship that never went
5
+ * through relationshipSort is drawn with, so a side's first connector keeps its
6
+ * stub through a sort.
6
7
  */
7
8
  export declare function stubFor(slot: number): number;
8
9
  /**
@@ -25,7 +26,7 @@ export type StubEnds = {
25
26
  startStub: number;
26
27
  endStub: number;
27
28
  };
28
- export declare function isHorizontal(direction: number): direction is 1 | 2;
29
+ export declare function isHorizontal(direction: number): direction is 2 | 1;
29
30
  /** +1 when the anchor's outward normal points right or down. */
30
31
  export declare function outwardSign(direction: number): 1 | -1;
31
32
  /**