@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
@@ -1,4 +1,7 @@
1
1
  export declare const root: import('@dineug/r-html').CSSTemplateLiterals;
2
2
  export declare const row: import('@dineug/r-html').CSSTemplateLiterals;
3
+ export declare const grip: import('@dineug/r-html').CSSTemplateLiterals;
4
+ export declare const gripSlot: import('@dineug/r-html').CSSTemplateLiterals;
3
5
  export declare const orderType: import('@dineug/r-html').CSSTemplateLiterals;
6
+ export declare const mark: import('@dineug/r-html').CSSTemplateLiterals;
4
7
  //# sourceMappingURL=IndexesColumn.styles.d.ts.map
@@ -2,7 +2,14 @@ import { FC } from '@dineug/r-html';
2
2
  import { Index } from '../../../../../internal-types';
3
3
  export type IndexesIndexProps = {
4
4
  index: Index;
5
+ /**
6
+ * The alternate key this index is, 1 for AK1, which the diagram can mark its
7
+ * columns with; 0 while it is no unique index over two columns or more.
8
+ */
9
+ alternateKey?: number;
5
10
  selected: boolean;
11
+ /** The editor's readonly mode: the row only selects, with no remove button and a name it cannot type in. */
12
+ readonly?: boolean;
6
13
  onSelect: (index: Index | null) => void;
7
14
  };
8
15
  declare const IndexesIndex: FC<IndexesIndexProps>;
@@ -1,5 +1,11 @@
1
+ /**
2
+ * A row of the canvas table's height. Its remove button stays in sight, in
3
+ * the lock's place on a key row, and a hovered row lines its name field.
4
+ */
1
5
  export declare const row: import('@dineug/r-html').CSSTemplateLiterals;
6
+ export declare const nameCell: import('@dineug/r-html').CSSTemplateLiterals;
2
7
  export declare const input: import('@dineug/r-html').CSSTemplateLiterals;
3
8
  export declare const unique: import('@dineug/r-html').CSSTemplateLiterals;
9
+ export declare const alternateKey: import('@dineug/r-html').CSSTemplateLiterals;
4
10
  export declare const iconButton: import('@dineug/r-html').CSSTemplateLiterals;
5
11
  //# sourceMappingURL=IndexesIndex.styles.d.ts.map
@@ -0,0 +1,21 @@
1
+ import { FC } from '@dineug/r-html';
2
+ import { PlainMessageKey } from '../../../../../i18n/translate';
3
+ import { ColumnKey } from '../../../../../utils/tableKeys';
4
+ export type IndexesKeyProps = {
5
+ columnKey: ColumnKey;
6
+ selected: boolean;
7
+ onSelect: (columnKey: ColumnKey) => void;
8
+ };
9
+ /** A key's tag, written as the diagram writes it in every language, and the key of the name it shows on hover. */
10
+ export declare const KIND_LABEL: Record<ColumnKey['kind'], {
11
+ text: string;
12
+ titleKey: PlainMessageKey;
13
+ }>;
14
+ /**
15
+ * A key the table's columns declare, listed beside the indexes so every key
16
+ * shows in one place. A lock stands where an index has its remove button:
17
+ * selecting it only shows its columns, and the columns are where it changes.
18
+ */
19
+ declare const IndexesKey: FC<IndexesKeyProps>;
20
+ export default IndexesKey;
21
+ //# sourceMappingURL=IndexesKey.d.ts.map
@@ -0,0 +1,13 @@
1
+ /**
2
+ * An index row's box, picked as an index is: a bar along its left edge
3
+ * carries the selection where the light theme's tint is too faint alone.
4
+ */
5
+ export declare const row: import('@dineug/r-html').CSSTemplateLiterals;
6
+ /**
7
+ * A filled tag, where an index row has its UQ toggle and as wide, so the
8
+ * names start in one line; filled, it reads as a label and never as a toggle.
9
+ */
10
+ export declare const tag: import('@dineug/r-html').CSSTemplateLiterals;
11
+ export declare const name: import('@dineug/r-html').CSSTemplateLiterals;
12
+ export declare const lock: import('@dineug/r-html').CSSTemplateLiterals;
13
+ //# sourceMappingURL=IndexesKey.styles.d.ts.map
@@ -1,4 +1,5 @@
1
1
  import { FC } from '@dineug/r-html';
2
+ import { PlainMessageKey } from '../../../../i18n/translate';
2
3
  import { ValuesType } from '../../../../internal-types';
3
4
  export declare const Tab: {
4
5
  readonly Indexes: "Indexes";
@@ -6,6 +7,8 @@ export declare const Tab: {
6
7
  readonly GeneratorCode: "Code Generator";
7
8
  };
8
9
  export type Tab = ValuesType<typeof Tab>;
10
+ /** What each tab is called in the reader's language; its id stays the English name. */
11
+ export declare const TabLabelKey: Record<Tab, PlainMessageKey>;
9
12
  export type TablePropertiesTabsProps = {
10
13
  value: Tab;
11
14
  onChange: (value: Tab) => void;
@@ -0,0 +1,17 @@
1
+ import { FC } from '@dineug/r-html';
2
+ import { IconName } from '../../primitives/icon/icons';
3
+ import { TextDirection } from '../../../i18n/locales';
4
+ export type WelcomeScreenProps = {
5
+ enableThemeBuilder?: boolean;
6
+ enableLocalePicker?: boolean;
7
+ };
8
+ /** A row's icon as the text runs: the Back arrow points right in a right-to-left language. */
9
+ export declare const rowIcon: (icon: IconName, dir: TextDirection) => IconName;
10
+ /**
11
+ * What an empty diagram shows over its canvas: a heading and a menu of the
12
+ * ways to start, which Import swaps in place for its formats, with hints at
13
+ * the tools around it where the canvas has room.
14
+ */
15
+ declare const WelcomeScreen: FC<WelcomeScreenProps>;
16
+ export default WelcomeScreen;
17
+ //# sourceMappingURL=WelcomeScreen.d.ts.map
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The layer over the empty canvas, which lets every press and wheel through
3
+ * to the scene but the menu's, so a drag over the heading still pans. An open
4
+ * panel stands over it, as the theme builder does, and moves nothing.
5
+ */
6
+ export declare const root: import('@dineug/r-html').CSSTemplateLiterals;
7
+ /**
8
+ * The block centred in the room over the floating toolbar, whose top edge
9
+ * stands 60px over the canvas's bottom, so the last row never runs under it.
10
+ */
11
+ export declare const center: import('@dineug/r-html').CSSTemplateLiterals;
12
+ export declare const heading: import('@dineug/r-html').CSSTemplateLiterals;
13
+ /** The one part of the layer that takes the pointer, as a press on a row is no pan. */
14
+ export declare const menu: import('@dineug/r-html').CSSTemplateLiterals;
15
+ export declare const item: import('@dineug/r-html').CSSTemplateLiterals;
16
+ export declare const label: import('@dineug/r-html').CSSTemplateLiterals;
17
+ //# sourceMappingURL=WelcomeScreen.styles.d.ts.map
@@ -0,0 +1,21 @@
1
+ import { FC } from '@dineug/r-html';
2
+ import { PlainMessageKey } from '../../../../i18n/translate';
3
+ export type WelcomeHintsProps = {
4
+ /** Where the toolbar's Search button stands across the welcome screen, or null. */
5
+ search: number | null;
6
+ /** Where the theme and language buttons stand between them, or null. */
7
+ preferences: number | null;
8
+ width: number;
9
+ enableThemeBuilder?: boolean;
10
+ enableLocalePicker?: boolean;
11
+ };
12
+ /** What the hint at the theme and language buttons says, by which of the two the toolbar shows. */
13
+ export declare function preferencesHintKey(theme: boolean, locale: boolean): PlainMessageKey | null;
14
+ /**
15
+ * The hand-drawn arrows at the tools an empty diagram starts from: the
16
+ * palette's Search button and the theme and language buttons on the toolbar,
17
+ * each labelled on its own side, and the floating toolbar at the bottom.
18
+ */
19
+ declare const WelcomeHints: FC<WelcomeHintsProps>;
20
+ export default WelcomeHints;
21
+ //# sourceMappingURL=WelcomeHints.d.ts.map
@@ -0,0 +1,14 @@
1
+ /**
2
+ * A hint under a toolbar button: its arrow climbs from the label to just
3
+ * under the bar, and the label hangs a little below the arrow's tail. Where it
4
+ * stands across the canvas is set inline, from the button it was measured at.
5
+ */
6
+ export declare const up: import('@dineug/r-html').CSSTemplateLiterals;
7
+ /**
8
+ * The hint over the floating toolbar, centred over it as the toolbar is, its
9
+ * arrow's tip clear of the bar's top edge.
10
+ */
11
+ export declare const down: import('@dineug/r-html').CSSTemplateLiterals;
12
+ /** A label a longer language wraps rather than run under the next hint, Japanese between phrases, never mid-word. */
13
+ export declare const label: import('@dineug/r-html').CSSTemplateLiterals;
14
+ //# sourceMappingURL=WelcomeHints.styles.d.ts.map
@@ -0,0 +1,10 @@
1
+ /**
2
+ * A pen stroke that leaves the label low on the left and bows up to a tip
3
+ * near the top right, where both barbs meet it, at the tip ARROW_UP_BOX names.
4
+ */
5
+ export declare const ARROW_UP: readonly ["M6 69C3.5 50 13.5 31 27 17.5C30.5 13.5 33.6 8.7 36 3", "M27.6 8.6Q31.8 5.6 36 3Q36.9 7.9 38.4 12.6"];
6
+ /** A pen stroke that wavers down from under the label to a tip at the bottom middle. */
7
+ export declare const ARROW_DOWN: readonly ["M15 3C8.5 15.5 27.5 25 21.5 39C20.5 43.5 20.2 48 20 53", "M13.8 45.2Q17.2 48.8 20 53Q22.6 48.6 26.2 45"];
8
+ export declare const arrowUp: (mirrored: boolean) => import("@dineug/r-html/jsx-runtime").JSX.Element;
9
+ export declare const arrowDown: () => import("@dineug/r-html/jsx-runtime").JSX.Element;
10
+ //# sourceMappingURL=hintArrows.d.ts.map
@@ -0,0 +1,87 @@
1
+ import { RootState } from '../../../engine/state';
2
+ import { TextDirection } from '../../../i18n/locales';
3
+ /** The narrowest canvas that shows the welcome screen at all. */
4
+ export declare const WELCOME_MIN_WIDTH = 320;
5
+ /**
6
+ * The least height that shows the heading over the menu: a heading of two
7
+ * lines over the six rows of Import's formats, clear of the floating toolbar.
8
+ */
9
+ export declare const WELCOME_FULL_MIN_HEIGHT = 342;
10
+ /** The least height that shows the menu alone: Import's six rows, clear of the floating toolbar. */
11
+ export declare const WELCOME_MENU_MIN_HEIGHT = 294;
12
+ /**
13
+ * The least canvas the hints at the tools take room on, beside the centre
14
+ * block: the height keeps them clear of the block, Import's formats in it, in
15
+ * the language whose labels wrap the most.
16
+ */
17
+ export declare const WELCOME_HINTS_MIN_WIDTH = 720;
18
+ export declare const WELCOME_HINTS_MIN_HEIGHT = 562;
19
+ /** The narrowest canvas whose menu rows still show their chords. */
20
+ export declare const WELCOME_KBD_MIN_WIDTH = 480;
21
+ /** The arrow that climbs to a toolbar button: its box, and its tip near the top right. */
22
+ export declare const ARROW_UP_BOX: {
23
+ readonly width: 44;
24
+ readonly height: 72;
25
+ readonly tipX: 36;
26
+ readonly tipY: 3;
27
+ };
28
+ /** The arrow that drops to the floating toolbar: its box, and its tip at the bottom middle. */
29
+ export declare const ARROW_DOWN_BOX: {
30
+ readonly width: 40;
31
+ readonly height: 56;
32
+ readonly tipX: 20;
33
+ readonly tipY: 53;
34
+ };
35
+ export type WelcomeCenter = 'full' | 'menu' | 'none';
36
+ /** What the room on the canvas lets the welcome screen show. */
37
+ export type WelcomeTiers = {
38
+ center: WelcomeCenter;
39
+ hints: boolean;
40
+ kbd: boolean;
41
+ };
42
+ export type WelcomeSize = {
43
+ width: number;
44
+ height: number;
45
+ };
46
+ /**
47
+ * The parts that fit: the whole centre block, the menu alone or nothing, the
48
+ * hints only on a canvas with room around the block, and the chords only where
49
+ * a row is wide enough to carry one beside its label.
50
+ */
51
+ export declare function welcomeTiers({ width, height }: WelcomeSize): WelcomeTiers;
52
+ /**
53
+ * A document with no table, no shown memo and no shown group, which is what
54
+ * the welcome screen stands over: the content bounds count the same, so the
55
+ * map and the scrollbars leave as the screen comes and come as it leaves.
56
+ */
57
+ export declare const isEmptyDocument: (state: RootState) => boolean;
58
+ /** Where along the welcome screen's width each hint points, or null where it has nothing to point at. */
59
+ export type WelcomeAnchors = {
60
+ search: number | null;
61
+ preferences: number | null;
62
+ };
63
+ /**
64
+ * Reads where the toolbar buttons the hints point at stand, from the left edge
65
+ * of the welcome screen. A button the toolbar left out, or clipped past the
66
+ * edge, has none; the theme and language buttons share one anchor between them.
67
+ */
68
+ export declare function measureAnchors(container: HTMLElement): WelcomeAnchors;
69
+ /** Which side of its arrow a hint's label takes, read in the direction the text runs. */
70
+ export type HintSide = 'before' | 'after';
71
+ /**
72
+ * Where a hint stands, as the distance of its outer edge from the left or the
73
+ * right of the welcome screen; labelFirst puts the label left of the arrow,
74
+ * which then climbs right to its tip, and otherwise the arrow is drawn mirrored.
75
+ */
76
+ export type HintPlacement = {
77
+ labelFirst: boolean;
78
+ left?: number;
79
+ right?: number;
80
+ };
81
+ /**
82
+ * Places a hint so the tip of its arrow meets the anchor, the label on the
83
+ * side it names: before is left in a left-to-right language and right in a
84
+ * right-to-left one, so the hints mirror with the toolbar they point at.
85
+ */
86
+ export declare function hintPlacement(anchorX: number, rootWidth: number, side: HintSide, dir: TextDirection): HintPlacement;
87
+ //# sourceMappingURL=welcomeLayout.d.ts.map
@@ -1,8 +1,10 @@
1
1
  import { DatabaseVendor } from '../../constants/sql/database';
2
2
  import { SharedStore, SharedStoreConfig } from '../../engine/shared-store';
3
- import { ThemeOptions } from '../../themes/radix-ui-theme';
3
+ import { LocaleOption } from '../../i18n/locales';
4
+ import { Appearance, ThemeOptions } from '../../themes/radix-ui-theme';
4
5
  import { Theme as ThemeType } from '../../themes/tokens';
5
6
  import { KeyBindingMap, KeyBindingName } from '../../utils/keyboard-shortcut';
7
+ import { SchemaSQLOptions } from '../../utils/schema-sql';
6
8
  declare global {
7
9
  interface HTMLElementTagNameMap {
8
10
  'erd-editor': ErdEditorElement;
@@ -12,22 +14,80 @@ export type ErdEditorProps = {
12
14
  readonly: boolean;
13
15
  systemDarkMode: boolean;
14
16
  enableThemeBuilder: boolean;
17
+ enableLocalePicker: boolean;
18
+ enableWelcomeScreen: boolean;
19
+ };
20
+ export type SchemaImportOptions = {
21
+ /**
22
+ * Where the imported tables land: 'auto' lays them out by their
23
+ * relationships before the document is replaced, as an import from the
24
+ * menu does, and 'grid', the default, replaces it at once with them in rows.
25
+ */
26
+ placement?: 'auto' | 'grid';
27
+ /**
28
+ * Whether the import takes the document's place, 'replace', the default, or
29
+ * joins it below the diagram as new tables, 'append', as Import and Add does.
30
+ */
31
+ mode?: 'replace' | 'append';
32
+ };
33
+ export type SchemaJSONImportOptions = {
34
+ /**
35
+ * Whether the document takes this one's place, 'replace', the default, or
36
+ * joins it below the diagram as new tables and memos, 'append'.
37
+ */
38
+ mode?: 'replace' | 'append';
39
+ };
40
+ /**
41
+ * Replaces the document with an import, or adds the import to it for an
42
+ * append, returning a Promise when it places first.
43
+ */
44
+ export type SetSchema = {
45
+ (value: string, options: SchemaImportOptions & {
46
+ placement: 'auto';
47
+ }): Promise<void>;
48
+ (value: string, options?: SchemaImportOptions & {
49
+ placement?: 'grid';
50
+ }): void;
51
+ (value: string, options?: SchemaImportOptions): Promise<void> | void;
15
52
  };
16
53
  export interface ErdEditorElement extends ErdEditorProps, HTMLElement {
54
+ /** The document in the form a file saves; setting it replaces the document. */
17
55
  value: string;
56
+ /**
57
+ * The document as this editor holds it, removed entities and their order
58
+ * included, which a collaborator's setInitialValue takes so undo can bring
59
+ * them back. Never written to a file.
60
+ */
61
+ readonly runtimeValue: string;
18
62
  focus: () => void;
19
63
  blur: () => void;
20
64
  clear: () => void;
21
65
  destroy: () => void;
22
66
  setInitialValue: (value: string) => void;
23
67
  setPresetTheme: (themeOptions: Partial<ThemeOptions>) => void;
68
+ /** What the system appearance shows, for a host with its own light and dark; null follows the OS. */
69
+ setSystemAppearance: (appearance: Appearance | null) => void;
24
70
  setTheme: (theme: Partial<ThemeType>) => void;
25
- setKeyBindingMap: (keyBindingMap: Partial<Omit<KeyBindingMap, typeof KeyBindingName.edit | typeof KeyBindingName.stop | typeof KeyBindingName.search | typeof KeyBindingName.undo | typeof KeyBindingName.redo | typeof KeyBindingName.zoomIn | typeof KeyBindingName.zoomOut | typeof KeyBindingName.zoomReset>>) => void;
26
- setSchemaSQL: (value: string) => void;
27
- setSchemaGraphQL: (value: string) => void;
28
- setSchemaDBML: (value: string) => void;
29
- setSchemaAML: (value: string) => void;
30
- getSchemaSQL: (databaseVendor?: DatabaseVendor) => string;
71
+ /**
72
+ * 'system' follows the host's or the browser's language; a code fixes one.
73
+ * Emits nothing. Before any call the editor shows English, or follows system
74
+ * while enableLocalePicker is on.
75
+ */
76
+ setLocale: (locale: LocaleOption) => void;
77
+ /** What system means: the host UI language as a BCP 47 tag; null reads navigator.languages. */
78
+ setSystemLocale: (locale: string | null) => void;
79
+ setKeyBindingMap: (keyBindingMap: Partial<Omit<KeyBindingMap, typeof KeyBindingName.edit | typeof KeyBindingName.stop | typeof KeyBindingName.undo | typeof KeyBindingName.redo | typeof KeyBindingName.zoomIn | typeof KeyBindingName.zoomOut | typeof KeyBindingName.zoomReset>>) => void;
80
+ setSchemaSQL: SetSchema;
81
+ setSchemaGraphQL: SetSchema;
82
+ setSchemaDBML: SetSchema;
83
+ setSchemaAML: SetSchema;
84
+ setSchemaJSON: (value: string, options?: SchemaJSONImportOptions) => void;
85
+ /**
86
+ * The document's DDL: the vendor given or the document's own, created as
87
+ * the options ask, a choice the vendor lacks falling back as the Schema SQL
88
+ * tab does; the document's before and after scripts are always in it.
89
+ */
90
+ getSchemaSQL: (databaseVendor?: DatabaseVendor, options?: SchemaSQLOptions) => string;
31
91
  getSharedStore: (config?: SharedStoreConfig & {
32
92
  mouseTracker?: boolean;
33
93
  focusTracker?: boolean;
@@ -1,7 +1,9 @@
1
1
  import { Ref } from '@dineug/r-html';
2
2
  import { AppContext } from '../appContext';
3
+ import { LocaleCode, LocaleOption } from '../../i18n/locales';
4
+ import { I18n } from '../../i18n/translate';
3
5
  import { Unsubscribe } from '../../internal-types';
4
- import { ThemeOptions } from '../../themes/radix-ui-theme';
6
+ import { Appearance, ThemeOptions } from '../../themes/radix-ui-theme';
5
7
  import { Theme } from '../../themes/tokens';
6
8
  import { ErdEditorElement, ErdEditorProps } from './ErdEditor';
7
9
  type Props = {
@@ -14,9 +16,20 @@ export declare function useErdEditorAttachElement({ props, ctx, app, root }: Pro
14
16
  theme: Theme;
15
17
  themeState: {
16
18
  options: ThemeOptions;
19
+ /** What system shows once a host names it; null follows the OS color scheme. */
20
+ systemAppearance: Appearance | null;
17
21
  preset: Theme;
18
22
  custom: Partial<Theme>;
19
23
  };
24
+ i18n: I18n;
25
+ localeState: {
26
+ /** The option a host or a pick last set; null until either sets one. */
27
+ option: LocaleOption | null;
28
+ /** What system means once a host names its own language; null reads the browser's. */
29
+ systemTag: string | null;
30
+ };
31
+ resolveLocaleOption: () => LocaleOption;
32
+ resolveSystemLocale: () => LocaleCode;
20
33
  destroySet: Set<Unsubscribe>;
21
34
  hasDarkMode: () => boolean;
22
35
  };
@@ -0,0 +1,23 @@
1
+ import { FC } from '@dineug/r-html';
2
+ import { ThemeOptions } from '../../themes/radix-ui-theme';
3
+ export type ExportImageProps = {
4
+ /** The gray and accent the editor's preset is built from. */
5
+ themeOptions: ThemeOptions;
6
+ /** Whether the editor shows its dark appearance now. */
7
+ isDarkMode: boolean;
8
+ };
9
+ /** Image pixels per scene unit, the factor the size is multiplied by. */
10
+ export declare const EXPORT_SCALES: readonly [1, 2, 3];
11
+ export type ExportScale = (typeof EXPORT_SCALES)[number];
12
+ /** The longest side a preview is drawn at, about twice the box it is shown in. */
13
+ export declare const PREVIEW_MAX_SIDE = 1280;
14
+ /** How long the toggles rest before the preview is drawn again. */
15
+ export declare const PREVIEW_DEBOUNCE_MS = 200;
16
+ /**
17
+ * The export image dialog: a preview, the options, the buttons that write a png
18
+ * or an svg or copy a png, and a close button. The options last for the
19
+ * element's life, and an export leaves the dialog open, its outcome in a toast.
20
+ */
21
+ declare const ExportImage: FC<ExportImageProps>;
22
+ export default ExportImage;
23
+ //# sourceMappingURL=ExportImage.d.ts.map
@@ -0,0 +1,34 @@
1
+ /**
2
+ * The preview beside the options, or above them once the editor is narrow,
3
+ * kept at its own height so a short editor scrolls the box rather than cut it.
4
+ * The title row heads the options, and the whole box once the preview stacks.
5
+ */
6
+ export declare const layout: import('@dineug/r-html').CSSTemplateLiterals;
7
+ /**
8
+ * A checkerboard under the image, so a background left out reads as left out.
9
+ * The image is fitted inside a fixed inset whatever its proportions.
10
+ */
11
+ export declare const preview: import('@dineug/r-html').CSSTemplateLiterals;
12
+ export declare const image: import('@dineug/r-html').CSSTemplateLiterals;
13
+ export declare const loading: import('@dineug/r-html').CSSTemplateLiterals;
14
+ export declare const panel: import('@dineug/r-html').CSSTemplateLiterals;
15
+ /**
16
+ * The title and the close button, over the options while the preview is beside
17
+ * them and over the preview once it stacks, so the button keeps the box's top
18
+ * corner on the side the title row ends at, either way.
19
+ */
20
+ export declare const header: import('@dineug/r-html').CSSTemplateLiterals;
21
+ export declare const title: import('@dineug/r-html').CSSTemplateLiterals;
22
+ /**
23
+ * A 26px square tool tinted under the pointer, as Table Properties and Find and
24
+ * Replace close. Tab brings its whole focus ring into a box scrolled down.
25
+ */
26
+ export declare const close: import('@dineug/r-html').CSSTemplateLiterals;
27
+ export declare const row: import('@dineug/r-html').CSSTemplateLiterals;
28
+ export declare const scales: import('@dineug/r-html').CSSTemplateLiterals;
29
+ export declare const scale: import('@dineug/r-html').CSSTemplateLiterals;
30
+ export declare const size: import('@dineug/r-html').CSSTemplateLiterals;
31
+ export declare const warning: import('@dineug/r-html').CSSTemplateLiterals;
32
+ export declare const actions: import('@dineug/r-html').CSSTemplateLiterals;
33
+ export declare const action: import('@dineug/r-html').CSSTemplateLiterals;
34
+ //# sourceMappingURL=ExportImage.styles.d.ts.map
@@ -0,0 +1,48 @@
1
+ import { DOMTemplateLiterals } from '@dineug/r-html';
2
+ import { AppContext } from '../appContext';
3
+ import { DocumentPngOptions, ResolutionReduction } from '../../services/export-png';
4
+ /** What an image is drawn from; each action hooks up the reporters itself. */
5
+ export type ImageRequest = Omit<DocumentPngOptions, 'onResolutionReduced' | 'onProgress'>;
6
+ /** What an svg is drawn from: the request less the scale, which a vector has no use for. */
7
+ export type SvgRequest = Omit<ImageRequest, 'pixelRatio'>;
8
+ type AskedPixels = Pick<ResolutionReduction, 'askedWidth' | 'askedHeight'>;
9
+ /**
10
+ * The dialog's warning before any file exists: the pixels the scale asks for,
11
+ * which a canvas ceiling cuts. The toast after it opens alike.
12
+ */
13
+ export declare function describeAskedSize({ askedWidth, askedHeight }: AskedPixels): DOMTemplateLiterals;
14
+ /**
15
+ * Says what was lost and why, in the pixels the dialog warned of: what the
16
+ * scale asked for, then what was written. A box that fits at 1x can still
17
+ * outrun a canvas at 2x, so the document's own size explains nothing.
18
+ */
19
+ export declare function describeReduction({ askedWidth, askedHeight, width, height, }: ResolutionReduction): DOMTemplateLiterals;
20
+ /**
21
+ * Draws the document into a png file, saying so while it draws and reporting
22
+ * afterwards. The two messages are sequenced rather than stacked, so what
23
+ * became of the file replaces the message about making it.
24
+ *
25
+ * @example
26
+ * await exportImagePng(app, { doc, theme, toWidth, pixelRatio: 2 }, databaseName);
27
+ */
28
+ export declare function exportImagePng({ emitter }: AppContext, request: ImageRequest, databaseName: string): Promise<void>;
29
+ /**
30
+ * Draws the document into an svg file at 100%, the scale left out, saying so
31
+ * while it draws. An svg holds no canvas, so nothing is ever reduced, and only
32
+ * a failure is reported once the file is done.
33
+ *
34
+ * @example
35
+ * await exportImageSvg(app, { doc, theme, toWidth, i18n }, databaseName);
36
+ */
37
+ export declare function exportImageSvg({ emitter }: AppContext, { doc, theme, toWidth, i18n }: SvgRequest, databaseName: string): Promise<void>;
38
+ /**
39
+ * Puts the document on the clipboard as a png. The clipboard write starts in
40
+ * the click that called this, before any await, so call it from the handler
41
+ * itself; a host that refuses is told to save a PNG instead.
42
+ *
43
+ * @example
44
+ * copyImagePng(app, { doc, theme, toWidth, pixelRatio: 2 });
45
+ */
46
+ export declare function copyImagePng({ emitter }: AppContext, request: ImageRequest): Promise<void>;
47
+ export {};
48
+ //# sourceMappingURL=exportImageActions.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { FC } from '@dineug/r-html';
2
+ export type FindReplaceProps = {
3
+ readonly: boolean;
4
+ };
5
+ /** How many result rows the list draws at once; the rest are reached by moving through them. */
6
+ export declare const MATCH_ROW_LIMIT = 200;
7
+ /** The rows drawn for a list longer than the limit: a window kept around the current match. */
8
+ export declare function rowWindow(current: number, total: number, limit?: number): [number, number];
9
+ /** How long the panel waits for typing to pause before it searches a regular expression. */
10
+ export declare const REGEX_INPUT_DELAY = 150;
11
+ declare const FindReplace: FC<FindReplaceProps>;
12
+ export default FindReplace;
13
+ //# sourceMappingURL=FindReplace.d.ts.map
@@ -0,0 +1,27 @@
1
+ /** What the panel's box adds to the height of its controls: its padding and border, above and below. */
2
+ export declare const PANEL_CHROME_HEIGHT: number;
3
+ /**
4
+ * A panel over the top left of the canvas, clear of the minimap in the other
5
+ * corner. Its top and height are set inline, since zen mode takes the toolbar
6
+ * above it away; on a short canvas the list gives up its height first.
7
+ */
8
+ export declare const root: import('@dineug/r-html').CSSTemplateLiterals;
9
+ export declare const controls: import('@dineug/r-html').CSSTemplateLiterals;
10
+ export declare const header: import('@dineug/r-html').CSSTemplateLiterals;
11
+ export declare const row: import('@dineug/r-html').CSSTemplateLiterals;
12
+ export declare const actions: import('@dineug/r-html').CSSTemplateLiterals;
13
+ export declare const input: import('@dineug/r-html').CSSTemplateLiterals;
14
+ export declare const toggle: import('@dineug/r-html').CSSTemplateLiterals;
15
+ export declare const scopes: import('@dineug/r-html').CSSTemplateLiterals;
16
+ export declare const scope: import('@dineug/r-html').CSSTemplateLiterals;
17
+ export declare const status: import('@dineug/r-html').CSSTemplateLiterals;
18
+ export declare const count: import('@dineug/r-html').CSSTemplateLiterals;
19
+ export declare const list: import('@dineug/r-html').CSSTemplateLiterals;
20
+ export declare const match: import('@dineug/r-html').CSSTemplateLiterals;
21
+ export declare const icon: import('@dineug/r-html').CSSTemplateLiterals;
22
+ export declare const body: import('@dineug/r-html').CSSTemplateLiterals;
23
+ export declare const text: import('@dineug/r-html').CSSTemplateLiterals;
24
+ export declare const mark: import('@dineug/r-html').CSSTemplateLiterals;
25
+ export declare const location: import('@dineug/r-html').CSSTemplateLiterals;
26
+ export declare const more: import('@dineug/r-html').CSSTemplateLiterals;
27
+ //# sourceMappingURL=FindReplace.styles.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { DOMTemplateLiterals } from '@dineug/r-html';
2
+ import { FindField } from '../../utils/find-replace';
3
+ /** The icon a result row carries for the kind of text it was found in. */
4
+ export declare function fieldIcon(field: FindField, size?: number): DOMTemplateLiterals;
5
+ //# sourceMappingURL=fieldIcon.d.ts.map
@@ -0,0 +1,26 @@
1
+ import { ErdTarget } from '../erd/goToErdTarget';
2
+ import { EngineContext } from '../../engine/context';
3
+ import { GeneratorAction } from '../../engine/generator.actions';
4
+ import { RootState } from '../../engine/state';
5
+ import { FindMatch } from '../../utils/find-replace';
6
+ /**
7
+ * Where on the ERD canvas the text of a match is edited: its table, its column
8
+ * cell or its memo, with the match itself, which a cell too wide for the
9
+ * canvas is scrolled to by.
10
+ */
11
+ export declare function toErdTarget(match: FindMatch): ErdTarget;
12
+ /**
13
+ * The state as a jump measures it once a replacement is in: the field holding
14
+ * the new text at the width its reducer gives it. A memo's text sizes nothing,
15
+ * and a table or column the document no longer holds is left as it is.
16
+ */
17
+ export declare function withReplacement(state: RootState, { toWidth }: EngineContext, { field, id, tableId }: FindMatch, value: string): RootState;
18
+ /**
19
+ * The jump Replace makes to the next match, in the replacement's own dispatch.
20
+ * A batch is read against the state before it, so the jump measures the table
21
+ * the replacement widens or narrows from what the replacement writes.
22
+ *
23
+ * @param covered How far in from the left edge the panel hides the canvas.
24
+ */
25
+ export declare const showNextMatchAction$: (next: FindMatch, replaced: FindMatch, value: string, covered: number) => GeneratorAction;
26
+ //# sourceMappingURL=matchTarget.d.ts.map
@@ -0,0 +1,20 @@
1
+ import { RootState } from '../../engine/state';
2
+ /** The overlays that take the whole canvas over, under which the panel stands down and opens on nothing. */
3
+ export declare const TAKEOVERS: ("automaticTablePlacement" | "diffViewer" | "timeTravel")[];
4
+ /** Whether an overlay that takes the canvas over is up, which keeps Find and Replace shut. */
5
+ export declare const isTakenOver: ({ editor }: RootState) => boolean;
6
+ /**
7
+ * Whether the panel is drawn: it stands aside, still open, off the ERD tab and
8
+ * under a takeover, and draws over no dialog, which closes it as it opens.
9
+ */
10
+ export declare const isPanelShown: (state: RootState) => boolean;
11
+ /** How far in from the left of the canvas the panel stands, and how wide it is at most, as FindReplace.styles draws it. */
12
+ export declare const PANEL_LEFT = 16;
13
+ export declare const PANEL_WIDTH = 380;
14
+ /**
15
+ * How far in from the left edge of the canvas the panel hides it, read from
16
+ * the state rather than the panel's box, so a jump that brings the panel back
17
+ * with the ERD tab lands clear of it too. None while the panel is not drawn.
18
+ */
19
+ export declare function coveredWidth(state: RootState): number;
20
+ //# sourceMappingURL=panelLayout.d.ts.map
@@ -1,6 +1,7 @@
1
1
  import { FC } from '@dineug/r-html';
2
2
  export type GeneratorCodeProps = {
3
3
  isDarkMode: boolean;
4
+ /** One table's code, as Table Properties shows it, with no panel. */
4
5
  tableId?: string;
5
6
  };
6
7
  declare const GeneratorCode: FC<GeneratorCodeProps>;
@@ -1,5 +1,8 @@
1
1
  import { FC } from '@dineug/r-html';
2
2
  export type GeneratorCodeContextMenuProps = {
3
+ /** The whole document's tab, which adds the panel and Save file to the menu. */
4
+ full?: boolean;
5
+ onSave?: () => void;
3
6
  onClose: () => void;
4
7
  };
5
8
  declare const GeneratorCodeContextMenu: FC<GeneratorCodeContextMenuProps>;
@@ -1,12 +1,15 @@
1
1
  import { AppContext } from '../../../appContext';
2
+ import { PlainMessageKey } from '../../../../i18n/translate';
2
3
  type Menu = {
3
4
  name: string;
5
+ labelKey?: PlainMessageKey;
4
6
  value: number;
5
7
  };
6
8
  export declare const menus: Menu[];
7
9
  export declare function createColumnNameCaseMenus({ store }: AppContext): {
8
10
  checked: boolean;
9
11
  name: string;
12
+ labelKey: PlainMessageKey | undefined;
10
13
  onClick: () => void;
11
14
  }[];
12
15
  export {};