@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
@@ -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;
@@ -3,15 +3,32 @@ 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
9
18
  * relationship-sort hook for any action that is not a pure move.
10
19
  */
11
20
  export declare function invalidateTableWidths(): void;
12
- export declare function calcTableWidths(table: Table, { settings: { show, maxWidthComment }, collections }: RootState): ColumnWidth;
21
+ /**
22
+ * The room a row keeps for the table's alternate key marks after its last
23
+ * cell: the longest mark, or none while the marks are hidden or the table has
24
+ * none, so only a table that shows one widens.
25
+ */
26
+ export declare function calcAlternateKeyWidth(table: Table, state: RootState): number;
27
+ export declare function calcTableWidths(table: Table, state: RootState): ColumnWidth;
13
28
  export type ColumnWidth = {
14
29
  width: number;
30
+ /** The alternate key marks' room after a row's last cell, 0 while none is drawn. */
31
+ alternateKey: number;
15
32
  name: number;
16
33
  comment: number;
17
34
  dataType: number;
@@ -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
@@ -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
  /**
@@ -1,8 +1,28 @@
1
1
  import { Action, AnyAction, DOMTemplateLiterals } from '@dineug/r-html';
2
2
  import { TablePlacement } from '../constants/tablePlacement';
3
+ import { LocaleOption } from '../i18n/locales';
3
4
  import { ValuesType } from '../internal-types';
4
5
  import { ThemeOptions } from '../themes/radix-ui-theme';
5
6
  import { GeometrySource } from './draw-relationship/geometrySource';
7
+ import { FindField } from './find-replace/findMatches';
8
+ /** A search the palette hands Find and Replace: the query, and the kinds of text it searches in. */
9
+ export type FindReplaceQuery = {
10
+ query: string;
11
+ fields: FindField[];
12
+ };
13
+ /**
14
+ * What Map Columns opens on: a relationship drawn between two tables and not
15
+ * made yet, or one the document holds whose columns it changes.
16
+ */
17
+ export type MapColumnsOpening = {
18
+ mode: 'create';
19
+ startTableId: string;
20
+ endTableId: string;
21
+ relationshipType: number;
22
+ } | {
23
+ mode: 'edit';
24
+ relationshipId: string;
25
+ };
6
26
  declare const InternalActionType: {
7
27
  readonly openColorPicker: "openColorPicker";
8
28
  readonly closeColorPicker: "closeColorPicker";
@@ -11,10 +31,14 @@ declare const InternalActionType: {
11
31
  readonly dragendColumnAll: "dragendColumnAll";
12
32
  readonly copy: "copy";
13
33
  readonly paste: "paste";
14
- readonly schemaGC: "schemaGC";
15
34
  readonly toggleSearch: "toggleSearch";
35
+ readonly openFindReplace: "openFindReplace";
36
+ readonly openExportImage: "openExportImage";
37
+ readonly openMapColumns: "openMapColumns";
16
38
  readonly openThemeBuilder: "openThemeBuilder";
17
39
  readonly setThemeOptions: "setThemeOptions";
40
+ readonly openLocalePicker: "openLocalePicker";
41
+ readonly setLocaleOption: "setLocaleOption";
18
42
  readonly mouseTrackerStart: "mouseTrackerStart";
19
43
  readonly mouseTrackerEnd: "mouseTrackerEnd";
20
44
  readonly openDiffViewer: "openDiffViewer";
@@ -33,6 +57,8 @@ type InternalActionMap = {
33
57
  [InternalActionType.openToast]: {
34
58
  message: DOMTemplateLiterals;
35
59
  close?: Promise<void>;
60
+ /** One toast per key: a toast opened under a key already up takes its place. */
61
+ key?: string;
36
62
  };
37
63
  [InternalActionType.openTableProperties]: {
38
64
  tableId: string;
@@ -44,10 +70,16 @@ type InternalActionMap = {
44
70
  [InternalActionType.paste]: {
45
71
  event: ClipboardEvent;
46
72
  };
47
- [InternalActionType.schemaGC]: void;
48
73
  [InternalActionType.toggleSearch]: void;
74
+ [InternalActionType.openFindReplace]: FindReplaceQuery | void;
75
+ [InternalActionType.openExportImage]: void;
76
+ [InternalActionType.openMapColumns]: MapColumnsOpening;
49
77
  [InternalActionType.openThemeBuilder]: void;
50
78
  [InternalActionType.setThemeOptions]: Partial<ThemeOptions>;
79
+ [InternalActionType.openLocalePicker]: void;
80
+ [InternalActionType.setLocaleOption]: {
81
+ locale: LocaleOption;
82
+ };
51
83
  [InternalActionType.mouseTrackerStart]: void;
52
84
  [InternalActionType.mouseTrackerEnd]: void;
53
85
  [InternalActionType.openDiffViewer]: {
@@ -97,9 +129,13 @@ export declare const openToastAction: {
97
129
  (payload: {
98
130
  message: DOMTemplateLiterals;
99
131
  close?: Promise<void>;
132
+ /** One toast per key: a toast opened under a key already up takes its place. */
133
+ key?: string;
100
134
  }): AnyAction<{
101
135
  message: DOMTemplateLiterals;
102
136
  close?: Promise<void>;
137
+ /** One toast per key: a toast opened under a key already up takes its place. */
138
+ key?: string;
103
139
  }>;
104
140
  toString(): string;
105
141
  type: string;
@@ -136,16 +172,26 @@ export declare const pasteAction: {
136
172
  toString(): string;
137
173
  type: string;
138
174
  };
139
- export declare const schemaGCAction: {
175
+ export declare const toggleSearchAction: {
140
176
  (payload: void): AnyAction<void>;
141
177
  toString(): string;
142
178
  type: string;
143
179
  };
144
- export declare const toggleSearchAction: {
180
+ export declare const openFindReplaceAction: {
181
+ (payload: void | FindReplaceQuery): AnyAction<void | FindReplaceQuery>;
182
+ toString(): string;
183
+ type: string;
184
+ };
185
+ export declare const openExportImageAction: {
145
186
  (payload: void): AnyAction<void>;
146
187
  toString(): string;
147
188
  type: string;
148
189
  };
190
+ export declare const openMapColumnsAction: {
191
+ (payload: MapColumnsOpening): AnyAction<MapColumnsOpening>;
192
+ toString(): string;
193
+ type: string;
194
+ };
149
195
  export declare const openThemeBuilderAction: {
150
196
  (payload: void): AnyAction<void>;
151
197
  toString(): string;
@@ -156,6 +202,20 @@ export declare const setThemeOptionsAction: {
156
202
  toString(): string;
157
203
  type: string;
158
204
  };
205
+ export declare const openLocalePickerAction: {
206
+ (payload: void): AnyAction<void>;
207
+ toString(): string;
208
+ type: string;
209
+ };
210
+ export declare const setLocaleOptionAction: {
211
+ (payload: {
212
+ locale: LocaleOption;
213
+ }): AnyAction<{
214
+ locale: LocaleOption;
215
+ }>;
216
+ toString(): string;
217
+ type: string;
218
+ };
159
219
  export declare const mouseTrackerStartAction: {
160
220
  (payload: void): AnyAction<void>;
161
221
  toString(): string;
@@ -1,4 +1,4 @@
1
- import { DocumentPngOptions } from '../../services/export-png';
1
+ import { DocumentPngOptions, DocumentSvgOptions } from '../../services/export-png';
2
2
  type ExportOptions = {
3
3
  fileName: string;
4
4
  };
@@ -6,14 +6,24 @@ type ExportFileCallback = (blob: Blob, options: ExportOptions) => void;
6
6
  export declare function setExportFileCallback(callback: ExportFileCallback | null): void;
7
7
  export declare function exportJSON(json: string, name?: string): void;
8
8
  export declare function exportSchemaSQL(sql: string, name?: string): void;
9
+ /** The Code Generator's text, named as the other exports are, with its language's extension. */
10
+ export declare function exportCode(code: string, extension: string, name?: string): void;
9
11
  /**
10
- * Writes the whole document out as an image, at the zoom the author is reading
11
- * it at. The scene is rendered again off screen rather than captured, so the
12
- * file holds the whole document however far it was scrolled away from.
12
+ * Writes the whole document out as an image, at 100% whatever zoom the author
13
+ * is reading it at. The scene is rendered again off screen rather than captured,
14
+ * so the file holds the whole document however far it was scrolled away from.
13
15
  *
14
16
  * @example
15
- * exportPNG({ doc: toJson(store.state), theme, toWidth, zoomLevel }, databaseName);
17
+ * exportPNG({ doc: toJson(store.state), theme, toWidth }, databaseName);
16
18
  */
17
19
  export declare function exportPNG(options: DocumentPngOptions, name?: string): Promise<void>;
20
+ /**
21
+ * Writes the whole document out as an svg, at 100% and with no scale, drawn
22
+ * again off screen the way the png is.
23
+ *
24
+ * @example
25
+ * exportSVG({ doc: toJson(store.state), theme, toWidth }, databaseName);
26
+ */
27
+ export declare function exportSVG(options: DocumentSvgOptions, name?: string): Promise<void>;
18
28
  export {};
19
29
  //# sourceMappingURL=exportFile.d.ts.map
@@ -1,16 +1,20 @@
1
1
  import { AppContext } from '../../components/appContext';
2
+ /** Whether an import takes the document's place or joins it below the diagram. */
3
+ export type ImportMode = 'replace' | 'append';
2
4
  type ImportOptions = {
3
5
  type: 'json' | 'sql' | 'graphql' | 'dbml' | 'aml';
4
6
  op: 'set' | 'diff';
5
7
  accept: string;
8
+ /** Named only for an append, so a host that knows no mode replaces as before. */
9
+ mode?: ImportMode;
6
10
  };
7
11
  type ImportFileCallback = (options: ImportOptions) => void;
8
12
  export declare function setImportFileCallback(callback: ImportFileCallback | null): void;
9
- export declare function importJSON({ store, emitter }: AppContext): void;
10
- export declare function importSchemaSQL({ store, emitter }: AppContext): void;
11
- export declare function importGraphQL({ store, emitter }: AppContext): void;
12
- export declare function importDBML({ store, emitter }: AppContext): void;
13
- export declare function importAML({ store, emitter }: AppContext): void;
13
+ export declare function importJSON(app: AppContext, mode?: ImportMode): void;
14
+ export declare function importSchemaSQL(app: AppContext, mode?: ImportMode): void;
15
+ export declare function importGraphQL(app: AppContext, mode?: ImportMode): void;
16
+ export declare function importDBML(app: AppContext, mode?: ImportMode): void;
17
+ export declare function importAML(app: AppContext, mode?: ImportMode): void;
14
18
  export declare function importDiffJSON({ emitter }: AppContext): void;
15
19
  export {};
16
20
  //# sourceMappingURL=importFile.d.ts.map
@@ -0,0 +1,45 @@
1
+ import { AppContext } from '../../components/appContext';
2
+ import { SchemaImportType } from '../../engine/modules/editor/generator.actions';
3
+ /**
4
+ * Replaces the document with an import whose tables stand in the grid, in
5
+ * one dispatch, as the element's setters always did.
6
+ *
7
+ * @example
8
+ * importSchema(app, 'sql', value);
9
+ */
10
+ export declare function importSchema({ store }: AppContext, type: SchemaImportType, value: string): void;
11
+ /**
12
+ * Replaces the document with an import Flow placed first, in one dispatch:
13
+ * one undo puts the previous document back and no grid shows in between. A
14
+ * load or another placed replace meanwhile supersedes it and nothing lands.
15
+ *
16
+ * @example
17
+ * await importSchemaPlaced(app, 'sql', value);
18
+ */
19
+ export declare function importSchemaPlaced(app: AppContext, type: SchemaImportType, value: string): Promise<void>;
20
+ /**
21
+ * Adds an import to the document below the diagram, its tables in the grid,
22
+ * in one dispatch, leaving every table and setting already there as it is.
23
+ *
24
+ * @example
25
+ * appendSchema(app, 'sql', value);
26
+ */
27
+ export declare function appendSchema(app: AppContext, type: SchemaImportType, value: string): void;
28
+ /**
29
+ * Adds an .erd.json document to this one below the diagram, its tables and
30
+ * memos standing apart as the file has them, its settings left out.
31
+ *
32
+ * @example
33
+ * appendSchemaJSON(app, value);
34
+ */
35
+ export declare function appendSchemaJSON(app: AppContext, value: string): void;
36
+ /**
37
+ * Adds an import Flow placed first below the diagram, in one dispatch, after
38
+ * every placed import started before it. The diagram is read as it lands, so a
39
+ * table moved meanwhile is cleared; a load or a later placed replace drops it.
40
+ *
41
+ * @example
42
+ * await appendSchemaPlaced(app, 'sql', value);
43
+ */
44
+ export declare function appendSchemaPlaced(app: AppContext, type: SchemaImportType, value: string): Promise<void>;
45
+ //# sourceMappingURL=importSchema.d.ts.map