@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
@@ -0,0 +1,10 @@
1
+ import { AnyAction } from '@dineug/r-html';
2
+ import { RootState } from '../../engine/state';
3
+ import { MapColumnsDraft } from './mapping';
4
+ /**
5
+ * The one batch a confirmed mapping writes, for a draft validateMapping passes:
6
+ * the new foreign key columns its New rows add, the data type changes the sync
7
+ * makes, then the relationship it adds or the columns it changes.
8
+ */
9
+ export declare function toMapColumnsActions(state: RootState, draft: MapColumnsDraft, createId: () => string): AnyAction[];
10
+ //# sourceMappingURL=toMapColumnsActions.d.ts.map
@@ -0,0 +1,45 @@
1
+ import { RootState } from '../../engine/state';
2
+ import { Relationship } from '../../internal-types';
3
+ import { MapColumnsDraft } from './mapping';
4
+ /**
5
+ * What keeps one row from being written: a place its stored lists cannot pair,
6
+ * a parent or picked child column gone from its table, no pick yet, or a child
7
+ * an earlier row already holds.
8
+ */
9
+ export type MappingRowIssue = 'invalid' | 'removedParent' | 'unpicked' | 'removedChild' | 'inUse';
10
+ /**
11
+ * What keeps the mapping as a whole from being written: rows that cover no key
12
+ * of the parent as it stands, every row on its own column, another relationship
13
+ * linking the same columns, or a mapping the relationship already holds.
14
+ */
15
+ export type MappingSetIssue = 'noKey' | 'selfOnly' | 'duplicate' | 'unchanged';
16
+ export type MappingIssues = {
17
+ rows: Array<MappingRowIssue | null>;
18
+ set: MappingSetIssue[];
19
+ };
20
+ type MappingState = Pick<RootState, 'doc' | 'collections' | 'settings'>;
21
+ type DraftEnds = {
22
+ startTableId: string;
23
+ endTableId: string;
24
+ relationship?: Relationship;
25
+ };
26
+ /** The tables a draft maps between, read from the relationship it edits. */
27
+ export declare function getDraftEnds({ collections }: Pick<RootState, 'collections'>, draft: MapColumnsDraft): DraftEnds | null;
28
+ /**
29
+ * The issues of each row and of the mapping as a whole, read against the state
30
+ * as it stands, which the dialog shows and the write checks again on landing.
31
+ * A row past the first issue it has reports that one.
32
+ */
33
+ export declare function validateMapping(state: MappingState, draft: MapColumnsDraft): MappingIssues;
34
+ /** Whether any issue but the set issues given stands in the way. */
35
+ export declare const hasMappingIssues: ({ rows, set }: MappingIssues, ignore?: MappingSetIssue[]) => boolean;
36
+ /** Whether the tables a draft maps between, and the relationship it edits, are all still there. */
37
+ export declare function hasMappingTargets(state: Pick<RootState, 'doc' | 'collections'>, draft: MapColumnsDraft): boolean;
38
+ /**
39
+ * Whether the state already holds what the draft would write: every row on a
40
+ * live column it already pairs, in the relationship it edits, or in one from
41
+ * the same parent to the same child a peer or an agent made first.
42
+ */
43
+ export declare function isSameResult(state: Pick<RootState, 'doc' | 'collections'>, draft: MapColumnsDraft): boolean;
44
+ export {};
45
+ //# sourceMappingURL=validate.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { RootState } from '../engine/state';
2
+ /** Whether the document shows its memos, which Show.hideMemo hides while set, as View Option's Memos does. */
3
+ export declare const isMemoShown: ({ settings }: RootState) => boolean;
4
+ //# sourceMappingURL=memo.d.ts.map
@@ -58,6 +58,8 @@ export type AMLEntity = {
58
58
  name: string;
59
59
  alias: string;
60
60
  comment: string;
61
+ /** The color property as a hex: a name as its own, a hex as written; '' otherwise. */
62
+ color: string;
61
63
  attributes: AMLAttribute[];
62
64
  };
63
65
  /** A struct and a custom type carry neither field, which is what stops a lookup. */
@@ -12,6 +12,8 @@ export type Token = {
12
12
  kind: number;
13
13
  value: string;
14
14
  line: number;
15
+ /** The token's start in the source, which tells touching tokens from spaced ones. */
16
+ offset: number;
15
17
  };
16
18
  export declare function tokenize(source: string): Token[];
17
19
  //# sourceMappingURL=tokenizer.d.ts.map
@@ -38,6 +38,8 @@ export type DBMLTable = {
38
38
  name: string;
39
39
  alias: string;
40
40
  comment: string;
41
+ /** headercolor as written when it is #rgb or #rrggbb; '' otherwise. */
42
+ color: string;
41
43
  columns: DBMLColumn[];
42
44
  indexes: DBMLIndex[];
43
45
  };
@@ -49,9 +51,18 @@ export type DBMLRef = {
49
51
  onDelete: string;
50
52
  onUpdate: string;
51
53
  };
54
+ export type DBMLTableName = Pick<DBMLEndpoint, 'schemaName' | 'tableName'>;
55
+ export type DBMLTableGroup = {
56
+ name: string;
57
+ /** color as written when it is #rgb or #rrggbb; '' otherwise. */
58
+ color: string;
59
+ /** One per member line, as written; resolving them is convert.ts's concern. */
60
+ tables: DBMLTableName[];
61
+ };
52
62
  export type DBMLModel = {
53
63
  tables: DBMLTable[];
54
64
  refs: DBMLRef[];
65
+ tableGroups: DBMLTableGroup[];
55
66
  /** Keyed by the qualified name, so s.status and status stay apart. */
56
67
  enums: Record<string, string[]>;
57
68
  skipped: string[];
@@ -1,11 +1,16 @@
1
1
  import { RootState } from '../../engine/state';
2
- import { FormatIndexOptions, FormatTableOptions } from './utils';
3
- export declare function createSchema(state: RootState): string;
4
- export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
2
+ import { SchemaSQLHeader } from './options';
3
+ import { CreateSchemaOptions, FormatIndexOptions, FormatTableOptions, WrittenObjects } from './utils';
4
+ export declare function createSchema(state: RootState, tableIds?: readonly string[], { statements, written }?: CreateSchemaOptions): string;
5
+ export declare function formatTable(state: RootState, { buffer, table, statements }: FormatTableOptions): void;
5
6
  /**
6
7
  * A comment per column the diagram marks unique, after the table: UNIQUE is not
7
8
  * one of the constraints Databricks accepts, so it is reported, never dropped.
8
9
  */
9
10
  export declare function formatUnique({ collections }: RootState, { buffer, table }: FormatTableOptions): void;
10
11
  export declare function formatIndex({ collections }: RootState, { buffer, index, indexNames }: FormatIndexOptions): void;
12
+ /** USE SCHEMA, after CREATE SCHEMA IF NOT EXISTS for createAndUse. */
13
+ export declare function formatHeader(_: RootState, header: Exclude<SchemaSQLHeader, 'none'>, name: string): string;
14
+ /** Each table written dropped, its foreign keys with it. */
15
+ export declare function formatDropBlock(_: RootState, { tables }: WrittenObjects): string;
11
16
  //# sourceMappingURL=Databricks.d.ts.map
@@ -1,6 +1,7 @@
1
1
  import { RootState } from '../../engine/state';
2
- import { FormatIndexOptions, FormatTableOptions } from './utils';
3
- export declare function createSchema(state: RootState): string;
2
+ import { SchemaSQLHeader } from './options';
3
+ import { CreateSchemaOptions, FormatIndexOptions, FormatTableOptions, WrittenObjects } from './utils';
4
+ export declare function createSchema(state: RootState, tableIds?: readonly string[], { written }?: CreateSchemaOptions): string;
4
5
  export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
5
6
  /**
6
7
  * One named constraint per column the diagram marks unique, after the table.
@@ -8,4 +9,15 @@ export declare function formatTable(state: RootState, { buffer, table }: FormatT
8
9
  */
9
10
  export declare function formatUnique({ settings: { bracketType }, collections }: RootState, { buffer, table }: FormatTableOptions): void;
10
11
  export declare function formatIndex({ settings: { bracketType }, collections }: RootState, { buffer, index, indexNames }: FormatIndexOptions): void;
12
+ /**
13
+ * USE for use; for createAndUse, CREATE DATABASE first where DB_ID finds none.
14
+ * Each ends its batch with GO.
15
+ */
16
+ export declare function formatHeader({ settings: { bracketType } }: RootState, header: Exclude<SchemaSQLHeader, 'none'>, name: string): string;
17
+ /**
18
+ * One transaction that drops each foreign key a written table holds, found in
19
+ * its own database's catalog, then the tables, all rolled back on an error, so
20
+ * a key held from outside them still refuses; IF EXISTS needs SQL Server 2016.
21
+ */
22
+ export declare function formatDropBlock({ settings: { bracketType } }: RootState, { tables }: WrittenObjects): string;
11
23
  //# sourceMappingURL=MSSQL.d.ts.map
@@ -1,11 +1,12 @@
1
1
  import { RootState } from '../../engine/state';
2
- import { FormatIndexOptions, FormatTableOptions } from './utils';
3
- export declare function createSchema(state: RootState): string;
4
- export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
2
+ import { CreateSchemaOptions, FormatIndexOptions, FormatTableOptions } from './utils';
3
+ export { formatDropBlock, formatHeader } from './MySQL';
4
+ export declare function createSchema(state: RootState, tableIds?: readonly string[], { statements, written }?: CreateSchemaOptions): string;
5
+ export declare function formatTable(state: RootState, { buffer, table, statements }: FormatTableOptions): void;
5
6
  /**
6
7
  * One named constraint per column the diagram marks unique, after the table.
7
8
  * The whole export and the per-table Schema SQL tab both write it.
8
9
  */
9
- export declare function formatUnique({ settings: { bracketType }, collections }: RootState, { buffer, table }: FormatTableOptions): void;
10
- export declare function formatIndex({ settings: { bracketType }, collections }: RootState, { buffer, index, indexNames }: FormatIndexOptions): void;
10
+ export declare function formatUnique({ settings: { bracketType }, collections }: RootState, { buffer, table, statements }: FormatTableOptions): void;
11
+ export declare function formatIndex({ settings: { bracketType }, collections }: RootState, { buffer, index, indexNames, statements }: FormatIndexOptions): void;
11
12
  //# sourceMappingURL=MariaDB.d.ts.map
@@ -1,11 +1,20 @@
1
1
  import { RootState } from '../../engine/state';
2
- import { FormatIndexOptions, FormatTableOptions } from './utils';
3
- export declare function createSchema(state: RootState): string;
4
- export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
2
+ import { SchemaSQLHeader } from './options';
3
+ import { CreateSchemaOptions, FormatIndexOptions, FormatTableOptions, WrittenObjects } from './utils';
4
+ export declare function createSchema(state: RootState, tableIds?: readonly string[], { statements, written }?: CreateSchemaOptions): string;
5
+ export declare function formatTable(state: RootState, { buffer, table, statements }: FormatTableOptions): void;
5
6
  /**
6
7
  * One named constraint per column the diagram marks unique, after the table.
7
8
  * The whole export and the per-table Schema SQL tab both write it.
8
9
  */
9
10
  export declare function formatUnique({ settings: { bracketType }, collections }: RootState, { buffer, table }: FormatTableOptions): void;
10
- export declare function formatIndex({ settings: { bracketType }, collections }: RootState, { buffer, index, indexNames }: FormatIndexOptions): void;
11
+ export declare function formatIndex(state: RootState, { buffer, index, indexNames }: FormatIndexOptions): void;
12
+ /** USE, after CREATE DATABASE IF NOT EXISTS for createAndUse; MariaDB's too. */
13
+ export declare function formatHeader({ settings: { bracketType } }: RootState, header: Exclude<SchemaSQLHeader, 'none'>, name: string): string;
14
+ /**
15
+ * Every table written dropped while the foreign key checks are off, so the
16
+ * order does not matter, and the checks back on before the tables are created;
17
+ * MariaDB's too.
18
+ */
19
+ export declare function formatDropBlock({ settings: { bracketType } }: RootState, { tables }: WrittenObjects): string;
11
20
  //# sourceMappingURL=MySQL.d.ts.map
@@ -1,11 +1,25 @@
1
1
  import { RootState } from '../../engine/state';
2
- import { FormatIndexOptions, FormatTableOptions } from './utils';
3
- export declare function createSchema(state: RootState): string;
4
- export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
2
+ import { SchemaSQLHeader } from './options';
3
+ import { CreateSchemaOptions, FormatIndexOptions, FormatTableOptions, WrittenObjects } from './utils';
4
+ export declare function createSchema(state: RootState, tableIds?: readonly string[], { written }?: CreateSchemaOptions): string;
5
+ export declare function formatTable(state: RootState, { buffer, table, written }: FormatTableOptions): void;
5
6
  /**
6
7
  * One named constraint per column the diagram marks unique, after the table.
7
8
  * The whole export and the per-table Schema SQL tab both write it.
8
9
  */
9
- export declare function formatUnique({ settings: { bracketType }, collections }: RootState, { buffer, table }: FormatTableOptions): void;
10
- export declare function formatIndex({ settings: { bracketType }, collections }: RootState, { buffer, index, indexNames }: FormatIndexOptions): void;
10
+ export declare function formatUnique({ settings: { bracketType }, collections }: RootState, { buffer, table, written }: FormatTableOptions): void;
11
+ export declare function formatIndex({ settings: { bracketType }, collections }: RootState, { buffer, index, indexNames, written }: FormatIndexOptions): void;
12
+ /**
13
+ * The names an Oracle script of the document, or of the tables given, writes
14
+ * past the 30 bytes Oracle 12.1 and older allow.
15
+ */
16
+ export declare function oracleLongNames(state: RootState, tableIds?: readonly string[]): string[];
17
+ /** ALTER SESSION SET CURRENT_SCHEMA for use; Oracle creates no schema apart from a user. */
18
+ export declare function formatHeader({ settings: { bracketType } }: RootState, header: Exclude<SchemaSQLHeader, 'none'>, name: string): string;
19
+ /**
20
+ * Each table written dropped with its constraints, then each sequence, every one
21
+ * in a block that passes over ORA-00942 or ORA-02289, since Oracle has no DROP
22
+ * IF EXISTS before 23ai.
23
+ */
24
+ export declare function formatDropBlock({ settings: { bracketType } }: RootState, { tables, sequences }: WrittenObjects): string;
11
25
  //# sourceMappingURL=Oracle.d.ts.map
@@ -1,6 +1,18 @@
1
1
  import { RootState } from '../../engine/state';
2
- import { FormatIndexOptions, FormatTableOptions } from './utils';
3
- export declare function createSchema(state: RootState): string;
4
- export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
5
- export declare function formatIndex({ settings: { bracketType }, collections }: RootState, { buffer, index, indexNames }: FormatIndexOptions): void;
2
+ import { SchemaSQLHeader } from './options';
3
+ import { CreateSchemaOptions, FormatIndexOptions, FormatTableOptions, WrittenObjects } from './utils';
4
+ export declare function createSchema(state: RootState, tableIds?: readonly string[], { statements, written }?: CreateSchemaOptions): string;
5
+ export declare function formatTable(state: RootState, { buffer, table, statements }: FormatTableOptions): void;
6
+ export declare function formatIndex({ settings: { bracketType }, collections }: RootState, { buffer, index, indexNames, statements }: FormatIndexOptions): void;
7
+ /**
8
+ * CREATE SCHEMA IF NOT EXISTS and a search_path that puts it first, for
9
+ * createAndUse; PostgreSQL has no USE, so use writes nothing.
10
+ */
11
+ export declare function formatHeader({ settings: { bracketType } }: RootState, header: Exclude<SchemaSQLHeader, 'none'>, name: string): string;
12
+ /**
13
+ * One DROP TABLE IF EXISTS naming every table written, which refuses to drop a
14
+ * table another one outside it references. Under the createAndUse header a
15
+ * table with no schema of its own is named in that schema, never public's.
16
+ */
17
+ export declare function formatDropBlock({ settings: { bracketType } }: RootState, { tables }: WrittenObjects, header: SchemaSQLHeader, name: string): string;
6
18
  //# sourceMappingURL=PostgreSQL.d.ts.map
@@ -1,6 +1,18 @@
1
1
  import { RootState } from '../../engine/state';
2
- import { FormatIndexOptions, FormatTableOptions } from './utils';
3
- export declare function createSchema(state: RootState): string;
4
- export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
5
- export declare function formatIndex({ settings: { bracketType }, collections }: RootState, { buffer, index, indexNames }: FormatIndexOptions): void;
2
+ import { CreateSchemaOptions, FormatIndexOptions, FormatTableOptions, WrittenObjects } from './utils';
3
+ export declare function createSchema(state: RootState, tableIds?: readonly string[], { statements, written }?: CreateSchemaOptions): string;
4
+ /**
5
+ * An integer type name, with or without a width, which an AUTOINCREMENT key
6
+ * is written as INTEGER for; the rest keep their type and lose the keyword.
7
+ */
8
+ export declare function isIntegerFamily(dataType: string): boolean;
9
+ export declare function formatTable(state: RootState, { buffer, table, statements }: FormatTableOptions): void;
10
+ export declare function formatIndex({ settings: { bracketType }, collections }: RootState, { buffer, index, indexNames, statements }: FormatIndexOptions): void;
11
+ /** SQLite has no database or schema to create or select in a script. */
12
+ export declare function formatHeader(): string;
13
+ /**
14
+ * Foreign key enforcement off, which stays off for the connection, and then
15
+ * each table written dropped, so the order does not matter.
16
+ */
17
+ export declare function formatDropBlock({ settings: { bracketType } }: RootState, { tables }: WrittenObjects): string;
6
18
  //# sourceMappingURL=SQLite.d.ts.map
@@ -1,6 +1,11 @@
1
1
  import { RootState } from '../../engine/state';
2
- import { FormatIndexOptions, FormatTableOptions } from './utils';
3
- export declare function createSchema(state: RootState): string;
4
- export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
2
+ import { SchemaSQLHeader } from './options';
3
+ import { CreateSchemaOptions, FormatIndexOptions, FormatTableOptions } from './utils';
4
+ export declare function createSchema(state: RootState, tableIds?: readonly string[], { statements, written }?: CreateSchemaOptions): string;
5
+ export declare function formatTable(state: RootState, { buffer, table, statements }: FormatTableOptions): void;
5
6
  export declare function formatIndex({ collections, settings: { bracketType } }: RootState, { buffer, index, indexNames }: FormatIndexOptions): void;
7
+ /** USE SCHEMA, after CREATE SCHEMA IF NOT EXISTS for createAndUse. */
8
+ export declare function formatHeader({ settings: { bracketType } }: RootState, header: Exclude<SchemaSQLHeader, 'none'>, name: string): string;
9
+ /** Nothing: recreate writes CREATE OR REPLACE TABLE instead. */
10
+ export declare function formatDropBlock(): string;
6
11
  //# sourceMappingURL=Snowflake.d.ts.map
@@ -1,6 +1,21 @@
1
1
  import { RootState } from '../../engine/state';
2
2
  import { Table } from '../../internal-types';
3
- export declare function createSchemaSQL(state: RootState, database?: number): string;
3
+ import { SchemaSQLOptions } from './options';
4
+ export { HEADER_NAME_PATTERN, isSchemaSQLHeader, isSchemaSQLStatements, type ResolvedSchemaSQLOptions, resolveSchemaSQLOptions, SchemaSQLHeader, SchemaSQLHeaderList, type SchemaSQLOptions, SchemaSQLStatements, SchemaSQLStatementsList, schemaSQLSupport, } from './options';
5
+ export { oracleLongNames } from './Oracle';
6
+ /** The options a read passes, and whether the before and after scripts are written. */
7
+ export type CreateSchemaSQLOptions = SchemaSQLOptions & {
8
+ /** Left out, the whole document's DDL writes them and that of some tables none. */
9
+ scripts?: boolean;
10
+ };
11
+ /**
12
+ * The DDL of the document in a database, the document's own by default: the
13
+ * header, the before script, the DROP block, the tables and the after script.
14
+ * Given table ids, only those tables, their indexes and foreign keys.
15
+ */
16
+ export declare function createSchemaSQL(state: RootState, database?: number, tableIds?: readonly string[], options?: CreateSchemaSQLOptions): string;
17
+ /** The names of the tables the DDL writes, all or those given, in its order. */
18
+ export declare function schemaSQLTables(state: RootState, tableIds?: readonly string[]): string[];
4
19
  /**
5
20
  * One table's DDL for the table properties Schema SQL tab: the table, the
6
21
  * uniqueness its columns carry where the whole export writes it as its own
@@ -0,0 +1,57 @@
1
+ import { ValuesType } from '../../internal-types';
2
+ export declare const SchemaSQLStatements: {
3
+ readonly create: "create";
4
+ readonly ifNotExists: "ifNotExists";
5
+ readonly recreate: "recreate";
6
+ };
7
+ export type SchemaSQLStatements = ValuesType<typeof SchemaSQLStatements>;
8
+ export declare const SchemaSQLStatementsList: ReadonlyArray<SchemaSQLStatements>;
9
+ export declare const SchemaSQLHeader: {
10
+ readonly none: "none";
11
+ readonly use: "use";
12
+ readonly createAndUse: "createAndUse";
13
+ };
14
+ export type SchemaSQLHeader = ValuesType<typeof SchemaSQLHeader>;
15
+ export declare const SchemaSQLHeaderList: ReadonlyArray<SchemaSQLHeader>;
16
+ /** What getSchemaSQL, an agent's SQL read and the Schema SQL tab pass: an intent, resolved per vendor. */
17
+ export type SchemaSQLOptions = {
18
+ /** create when left out. */
19
+ statements?: SchemaSQLStatements;
20
+ /** none when left out. */
21
+ header?: SchemaSQLHeader;
22
+ };
23
+ /** The name a header may write: a plain identifier, so no vendor needs it escaped. */
24
+ export declare const HEADER_NAME_PATTERN: RegExp;
25
+ export type HeaderName = 'valid' | 'empty' | 'invalid';
26
+ export type ResolvedSchemaSQLOptions = {
27
+ /** What the vendor writes for the statements asked for. */
28
+ statements: SchemaSQLStatements;
29
+ /** What the vendor writes for the header asked for, before the name is read. */
30
+ header: SchemaSQLHeader;
31
+ /** Whether settings.databaseName can name that header. */
32
+ headerName: HeaderName;
33
+ };
34
+ export type SchemaSQLSupport = {
35
+ ifNotExists: boolean;
36
+ headers: ReadonlyArray<Exclude<SchemaSQLHeader, 'none'>>;
37
+ };
38
+ /**
39
+ * Whether a database writes CREATE ... IF NOT EXISTS and which headers it has;
40
+ * every one of them writes drop and re-create.
41
+ */
42
+ export declare function schemaSQLSupport(database: number): SchemaSQLSupport;
43
+ export declare function isSchemaSQLStatements(value: unknown): value is SchemaSQLStatements;
44
+ export declare function isSchemaSQLHeader(value: unknown): value is SchemaSQLHeader;
45
+ /**
46
+ * The statements and header a database writes for the ones asked for: one it
47
+ * lacks falls back to the nearest it has, so the choice outlives a change of
48
+ * database; an unknown value reads as create and none.
49
+ */
50
+ export declare function resolveSchemaSQLOptions(database: number, options: SchemaSQLOptions | undefined, databaseName: string): ResolvedSchemaSQLOptions;
51
+ /**
52
+ * A before or after script as the DDL writes it: line breaks as LF, without the
53
+ * blank lines ahead of it or the whitespace after it, and on SQL Server ended
54
+ * with GO; the empty string when nothing is left.
55
+ */
56
+ export declare function formatScript(text: string, database: number): string;
57
+ //# sourceMappingURL=options.d.ts.map
@@ -1,7 +1,27 @@
1
- import { Column, Index, Relationship, Table } from '../../internal-types';
1
+ import { RootState } from '../../engine/state';
2
+ import { Collections, Column, Index, IndexColumn, Relationship, Table } from '../../internal-types';
3
+ import { SchemaSQLStatements } from './options';
4
+ /** What a script's DROP block and the Oracle name check read off the body just written. */
5
+ export interface WrittenObjects {
6
+ /** The tables in the order their CREATE TABLE is written. */
7
+ tables: Table[];
8
+ /** Oracle: each sequence name as written, its owner included. */
9
+ sequences: string[];
10
+ /** Oracle: each identifier written, unquoted, in the order written. */
11
+ identifiers: string[];
12
+ }
13
+ export declare function createWrittenObjects(): WrittenObjects;
14
+ export interface CreateSchemaOptions {
15
+ /** Already what the database writes (resolveSchemaSQLOptions); create when left out. */
16
+ statements?: SchemaSQLStatements;
17
+ written?: WrittenObjects;
18
+ }
2
19
  export interface FormatTableOptions {
3
20
  buffer: string[];
4
21
  table: Table;
22
+ /** create when left out. */
23
+ statements?: SchemaSQLStatements;
24
+ written?: WrittenObjects;
5
25
  }
6
26
  export interface FormatColumnOptions {
7
27
  buffer: string[];
@@ -13,11 +33,17 @@ export interface FormatRelationOptions {
13
33
  buffer: string[];
14
34
  relationship: Relationship;
15
35
  fkNames: Name[];
36
+ /** create when left out. */
37
+ statements?: SchemaSQLStatements;
38
+ written?: WrittenObjects;
16
39
  }
17
40
  export interface FormatIndexOptions {
18
41
  buffer: string[];
19
42
  index: Index;
20
43
  indexNames: Name[];
44
+ /** create when left out. */
45
+ statements?: SchemaSQLStatements;
46
+ written?: WrittenObjects;
21
47
  }
22
48
  export interface FormatCommentOptions {
23
49
  buffer: string[];
@@ -31,6 +57,36 @@ export interface KeyColumn {
31
57
  start: Column[];
32
58
  end: Column[];
33
59
  }
60
+ /** The columns of a foreign key, end[i] referencing start[i]. */
61
+ export interface ForeignKeyPairs extends KeyColumn {
62
+ startTable: Table;
63
+ endTable: Table;
64
+ }
65
+ /**
66
+ * A relationship read pair by pair: a pair whose start or end column has left
67
+ * its table is dropped whole, and pairs that reference the whole primary key
68
+ * follow its declaration order; null when a table or every pair is gone.
69
+ */
70
+ export declare function toForeignKeyPairs({ doc: { tableIds }, collections }: Pick<RootState, 'doc' | 'collections'>, { start, end }: Relationship): ForeignKeyPairs | null;
71
+ /**
72
+ * The columns of an index its table still lists, in the index's order, each
73
+ * with the index column naming it: a column taken out of the table stays in
74
+ * the collection, but a saved file leaves it out of the index, as this does.
75
+ */
76
+ export declare function selectIndexColumns(collections: Collections, table: Table, index: Index): Array<{
77
+ indexColumn: IndexColumn;
78
+ column: Column;
79
+ }>;
80
+ /**
81
+ * What one export writes: every table, relationship and index of the document,
82
+ * or the tables named, their indexes and the foreign keys they hold, whose
83
+ * parents stay in the document, so a reference out still shows; never an index of a removed table.
84
+ */
85
+ export declare function toSchemaEntities({ doc, collections }: Pick<RootState, 'doc' | 'collections'>, tableIds?: readonly string[]): {
86
+ tables: Table[];
87
+ relationships: Relationship[];
88
+ indexes: Index[];
89
+ };
34
90
  export declare function formatNames<T extends {
35
91
  name: string;
36
92
  }>(list: T[], backtick?: string, backtick2?: string): string;
@@ -45,13 +101,51 @@ export declare function primaryKeyColumns(columns: Column[]): Column[];
45
101
  export declare function unique(columns: Column[]): boolean;
46
102
  export declare function uniqueColumns(columns: Column[]): Column[];
47
103
  export declare function getBracket(bracketType: number): string;
104
+ /**
105
+ * The words a CREATE TABLE or CREATE INDEX writes after its object type, and
106
+ * MariaDB after UNIQUE and FOREIGN KEY, under ifNotExists; nothing otherwise.
107
+ */
108
+ export declare function ifNotExists(statements?: SchemaSQLStatements): string;
109
+ /**
110
+ * The parts of an unquoted name, split at each dot outside brackets or double
111
+ * quotes as SQL Server reads it, so [sales.v2].users is two parts.
112
+ */
113
+ export declare function splitNameParts(name: string): string[];
114
+ /** Whether a name part is written in one pair of brackets or double quotes. */
115
+ export declare function isDelimitedPart(part: string): boolean;
116
+ /** The name a part in brackets or double quotes holds; any other part as is. */
117
+ export declare function unquoteNamePart(part: string): string;
118
+ /**
119
+ * A table name split at its last dot outside brackets or double quotes into
120
+ * schema and table, both as written, where it is unquoted; quoted, the whole
121
+ * name is one identifier and the schema is empty.
122
+ */
123
+ export declare function splitTableName(name: string, bracketType: number): [schema: string, table: string];
124
+ /**
125
+ * The part of a table name that automatic constraint and index names take, one
126
+ * pair of brackets or quotes off where unquoted, so sales.users and
127
+ * [sales].[users] give PK_users, which every database reads as one identifier.
128
+ */
129
+ export declare function tableNamePart(name: string, bracketType: number): string;
130
+ /**
131
+ * Whether a database's DDL builds automatic names from tableNamePart: the six
132
+ * generators that read an unquoted dot as a schema do, while Databricks and
133
+ * Snowflake write the whole table name into them.
134
+ */
135
+ export declare function splitsTableName(database: number): boolean;
48
136
  export declare function orderByNameASC<T extends {
49
137
  name: string;
50
- }>(a: T, b: T): 1 | -1 | 0;
138
+ }>(a: T, b: T): 0 | 1 | -1;
51
139
  export declare function autoName<T extends {
52
140
  id: string;
53
141
  name: string;
54
142
  }>(list: T[], id: string, name: string, num?: number): string;
143
+ /**
144
+ * autoName for an automatic foreign key or index name, also numbering a name
145
+ * equal to an earlier one but for case, quoted or not, since the databases fold
146
+ * an unquoted name and MySQL and MariaDB a quoted index name too.
147
+ */
148
+ export declare function autoNameIgnoreCase(names: Name[], name: string): string;
55
149
  export declare function toOrderName(orderType: number): "" | "ASC" | "DESC";
56
150
  /** The actions a vendor accepts after ON DELETE and after ON UPDATE. */
57
151
  export type ReferentialActionSupport = {
@@ -72,4 +166,9 @@ export declare function referentialActionSupport(database: number): ReferentialA
72
166
  */
73
167
  export declare function formatReferentialActions({ onDelete, onUpdate }: Pick<Relationship, 'onDelete' | 'onUpdate'>, support: ReferentialActionSupport): string[];
74
168
  export declare function toStringLiteral(value: string): string;
169
+ /**
170
+ * A column default as the DDL of a database writes it after DEFAULT: in
171
+ * parentheses where its grammar reads that expression only inside them.
172
+ */
173
+ export declare function formatDefault(value: string, database: number, dataType?: string): string;
75
174
  //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1,20 @@
1
+ /** The closed hand a pan shows for as long as it holds the canvas. */
2
+ export declare const CURSOR_GRABBING = "grabbing";
3
+ /**
4
+ * Points a stage container at a cursor. A konva node carries none of its own,
5
+ * so the container wears the one its hover asks for; under a hold the cursor
6
+ * is only noted, for the release to write back.
7
+ *
8
+ * @example
9
+ * setStageCursor(stage.container(), 'pointer');
10
+ */
11
+ export declare function setStageCursor(container: HTMLElement, cursor: string): void;
12
+ /**
13
+ * Keeps a stage container on a cursor for a gesture, whatever the pointer runs
14
+ * over, and hands back the release that shows what the last hover asked for.
15
+ *
16
+ * @example
17
+ * drag$.subscribe(handleMove).add(holdStageCursor(container, CURSOR_GRABBING));
18
+ */
19
+ export declare function holdStageCursor(container: HTMLElement, cursor: string): () => void;
20
+ //# sourceMappingURL=stageCursor.d.ts.map
@@ -1,6 +1,8 @@
1
1
  import { Memo, Point, Settings, Table } from '../../internal-types';
2
2
  export type PlacementEntity = {
3
3
  sourceId: string;
4
+ /** A memo stacks over a table of the same z-index, as the scene paints them; a table if left out. */
5
+ kind?: 'table' | 'memo';
4
6
  ui: {
5
7
  x: number;
6
8
  y: number;
@@ -0,0 +1,29 @@
1
+ /** The colors AML names, each the 500 shade of its Tailwind palette, in AML's order. */
2
+ export declare const AML_COLORS: Readonly<Record<string, string>>;
3
+ /** A DBML headercolor kept as written when it is #rgb or #rrggbb, else ''. */
4
+ export declare function fromDBMLColor(value: string): string;
5
+ /**
6
+ * One of AML's color names, in any letter case, as its hex; a #rgb, #rrggbb
7
+ * or #rrggbbaa as written; else ''.
8
+ */
9
+ export declare function fromAMLColor(value: string): string;
10
+ /**
11
+ * A table color as DBML's headercolor writes it, which takes #rgb or #rrggbb
12
+ * alone: a hex keeps its digits less any alpha, and an rgb() or hsl() becomes
13
+ * its hex. A color that reads as neither is null.
14
+ */
15
+ export declare function toDBMLColor(color: string): string | null;
16
+ /**
17
+ * The AML name of a table color, null for one it cannot read: gray under the
18
+ * gray chroma, else the other name nearest in OKLCH hue around the circle by
19
+ * its 500 shade, first in AML's order on a tie, so a named hex finds its name.
20
+ */
21
+ export declare function toAMLColor(color: string): string | null;
22
+ /**
23
+ * A color as an opaque lower-case #rrggbb, any alpha dropped: a hex of 3, 4, 6
24
+ * or 8 digits, an rgb(), rgba(), hsl() or hsla(); null for one it cannot read.
25
+ */
26
+ export declare function toOpaqueHex(color: string): string | null;
27
+ /** An sRGB channel of 0 to 255 as linear light of 0 to 1. */
28
+ export declare function toLinear(channel: number): number;
29
+ //# sourceMappingURL=tableColor.d.ts.map