@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,91 @@
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 widest a hint's label runs before it wraps, as WelcomeHints.styles.ts sets it. */
20
+ export declare const HINT_LABEL_MAX_WIDTH = 220;
21
+ /** The narrowest canvas whose menu rows still show their chords. */
22
+ export declare const WELCOME_KBD_MIN_WIDTH = 480;
23
+ /** The arrow that climbs to a toolbar button: its box, and its tip near the top right. */
24
+ export declare const ARROW_UP_BOX: {
25
+ readonly width: 44;
26
+ readonly height: 72;
27
+ readonly tipX: 36;
28
+ readonly tipY: 3;
29
+ };
30
+ /** The arrow that drops to the floating toolbar: its box, and its tip at the bottom middle. */
31
+ export declare const ARROW_DOWN_BOX: {
32
+ readonly width: 40;
33
+ readonly height: 56;
34
+ readonly tipX: 20;
35
+ readonly tipY: 53;
36
+ };
37
+ export type WelcomeCenter = 'full' | 'menu' | 'none';
38
+ /** What the room on the canvas lets the welcome screen show. */
39
+ export type WelcomeTiers = {
40
+ center: WelcomeCenter;
41
+ hints: boolean;
42
+ kbd: boolean;
43
+ };
44
+ export type WelcomeSize = {
45
+ width: number;
46
+ height: number;
47
+ };
48
+ /**
49
+ * The parts that fit: the whole centre block, the menu alone or nothing, the
50
+ * hints only on a canvas with room around the block, and the chords only where
51
+ * a row is wide enough to carry one beside its label.
52
+ */
53
+ export declare function welcomeTiers({ width, height }: WelcomeSize): WelcomeTiers;
54
+ /**
55
+ * A document with no table, no shown memo and no shown group, which is what
56
+ * the welcome screen stands over: the content bounds count the same, so the
57
+ * map and the scrollbars leave as the screen comes and come as it leaves.
58
+ */
59
+ export declare const isEmptyDocument: (state: RootState) => boolean;
60
+ /** Where along the welcome screen's width each hint points, or null where it has nothing to point at. */
61
+ export type WelcomeAnchors = {
62
+ search: number | null;
63
+ preferences: number | null;
64
+ };
65
+ /**
66
+ * Reads where the toolbar buttons the hints point at stand, from the left edge
67
+ * of the welcome screen. A button the toolbar left out, or clipped past the
68
+ * edge, has none; the theme and language buttons share one anchor between them.
69
+ */
70
+ export declare function measureAnchors(container: HTMLElement): WelcomeAnchors;
71
+ /** Which side of its arrow a hint's label takes, read in the direction the text runs. */
72
+ export type HintSide = 'before' | 'after';
73
+ /**
74
+ * Where a hint stands, as the distance of its outer edge from the left or the
75
+ * right of the welcome screen; labelFirst puts the label left of the arrow,
76
+ * which then climbs right to its tip, and otherwise the arrow is drawn mirrored.
77
+ */
78
+ export type HintPlacement = {
79
+ labelFirst: boolean;
80
+ /** The label hangs under the arrow's tail, as the side it names has no room for it. */
81
+ stacked: boolean;
82
+ left?: number;
83
+ right?: number;
84
+ };
85
+ /**
86
+ * Places a hint so its arrow's tip meets the anchor, the label on the side it
87
+ * names (before: left to right, left; right to left, right), or under the
88
+ * arrow where that side has no room for a whole label, as beside the Explorer.
89
+ */
90
+ export declare function hintPlacement(anchorX: number, rootWidth: number, side: HintSide, dir: TextDirection): HintPlacement;
91
+ //# 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;
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;
25
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;
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;
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,3 +1,7 @@
1
1
  export declare const root: import('@dineug/r-html').CSSTemplateLiterals;
2
2
  export declare const scope: import('@dineug/r-html').CSSTemplateLiterals;
3
+ /** The ERD tab's row: the Explorer, when shown, and the canvas beside it. */
4
+ export declare const erdRow: import('@dineug/r-html').CSSTemplateLiterals;
5
+ /** The canvas's share of the row, all of it the Explorer leaves. */
6
+ export declare const erdScope: import('@dineug/r-html').CSSTemplateLiterals;
3
7
  //# sourceMappingURL=ErdEditor.styles.d.ts.map
@@ -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,52 @@
1
+ import { RxStore } from '../../engine/rx-store';
2
+ import { RootState } from '../../engine/state';
3
+ import { Unsubscribe } from '../../internal-types';
4
+ export type Layout = {
5
+ /** The root as the ResizeObserver last measured it. */
6
+ observed: {
7
+ width: number;
8
+ height: number;
9
+ };
10
+ /** How much of the root's width a panel docked beside the canvas takes. */
11
+ reach: number;
12
+ };
13
+ /** The root's measured size and the panel reach, one per editor, kept until the element goes. */
14
+ export declare function layoutOf(store: RxStore): Layout;
15
+ /**
16
+ * Whether the toolbar is drawn. Zen mode takes it away over the canvas it was
17
+ * entered from alone, or the tab that turned the mode on would be the only one
18
+ * it could be turned off from.
19
+ */
20
+ export declare const hasToolbar: ({ editor, settings }: RootState) => boolean;
21
+ /**
22
+ * The editor's own width, panel included, which decides whether a dialog
23
+ * stacks: the viewport plus the reach a docked panel takes from it, so a spec
24
+ * that sets the viewport alone reads that width.
25
+ */
26
+ export declare function editorWidthOf(store: RxStore): number;
27
+ /**
28
+ * Applies the viewport from what decides it: the measured root, the toolbar
29
+ * zen mode takes away, the tab and the Explorer. It compares those first and
30
+ * returns when none moved, writes the reach first, and dispatches only a new viewport.
31
+ */
32
+ export declare function applyViewport(store: RxStore): void;
33
+ /**
34
+ * Applies the viewport inside every batch that moves its inputs, so a tab,
35
+ * zen mode or takeover change has it before anything renders. The inputs as
36
+ * they stand now are the first ones, so a batch that moves none writes nothing.
37
+ */
38
+ export declare function observeViewport(store: RxStore): Unsubscribe;
39
+ /** Records what the ResizeObserver measured and applies the viewport from it. */
40
+ export declare function measureRoot(store: RxStore, observed: {
41
+ width: number;
42
+ height: number;
43
+ }): void;
44
+ /** How far in from the canvas's left edge the theme builder and the locale picker stand. */
45
+ export declare const PICKER_INSET = 16;
46
+ /**
47
+ * Where the theme builder and the locale picker stand left to right while the
48
+ * Explorer takes the left of the root: past it, at the canvas's own left edge.
49
+ * Right to left they keep their place at the other end.
50
+ */
51
+ export declare function insetPastExplorer(store: RxStore, dir: 'ltr' | 'rtl'): Record<string, string>;
52
+ //# sourceMappingURL=viewportLayout.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { FC } from '@dineug/r-html';
2
+ export type ExplorerProps = {
3
+ readonly: boolean;
4
+ };
5
+ /**
6
+ * The Explorer's place beside the canvas: the panel at the width the layout
7
+ * reaches, or nothing. It reads the reach alone, so a drag of the edge renders
8
+ * the shell and the panel's root and nothing of the tree.
9
+ */
10
+ declare const Explorer: FC<ExplorerProps>;
11
+ export default Explorer;
12
+ //# sourceMappingURL=Explorer.d.ts.map
@@ -0,0 +1,11 @@
1
+ import { FC } from '@dineug/r-html';
2
+ /** How long the edits must pause before an edit of a searched text searches again. */
3
+ export declare const EDIT_SEARCH_DELAY = 100;
4
+ /**
5
+ * What opens the Explorer's search and keeps it current, mounted beside the
6
+ * panel whether it shows or not: the find chord, the palette row's and the
7
+ * context menu's openings, and the searches an edit asks for.
8
+ */
9
+ declare const ExplorerController: FC;
10
+ export default ExplorerController;
11
+ //# sourceMappingURL=ExplorerController.d.ts.map
@@ -0,0 +1,14 @@
1
+ import { FC } from '@dineug/r-html';
2
+ export type ExplorerPanelProps = {
3
+ /** The width the layout gives the panel, which a drag on its edge asks to change. */
4
+ width: number;
5
+ readonly: boolean;
6
+ };
7
+ /**
8
+ * The Explorer docked left of the canvas: a read-only tree of the document
9
+ * that jumps to what a row stands for on a click or Enter. Escape hands the
10
+ * keyboard back to the canvas and leaves the panel open.
11
+ */
12
+ declare const ExplorerPanel: FC<ExplorerPanelProps>;
13
+ export default ExplorerPanel;
14
+ //# sourceMappingURL=ExplorerPanel.d.ts.map
@@ -0,0 +1,13 @@
1
+ export declare const root: import('@dineug/r-html').CSSTemplateLiterals;
2
+ export declare const header: import('@dineug/r-html').CSSTemplateLiterals;
3
+ export declare const title: import('@dineug/r-html').CSSTemplateLiterals;
4
+ export declare const tool: import('@dineug/r-html').CSSTemplateLiterals;
5
+ export declare const body: import('@dineug/r-html').CSSTemplateLiterals;
6
+ export declare const sash: import('@dineug/r-html').CSSTemplateLiterals;
7
+ export declare const rowIcon: import('@dineug/r-html').CSSTemplateLiterals;
8
+ export declare const name: import('@dineug/r-html').CSSTemplateLiterals;
9
+ export declare const muted: import('@dineug/r-html').CSSTemplateLiterals;
10
+ export declare const count: import('@dineug/r-html').CSSTemplateLiterals;
11
+ export declare const dot: import('@dineug/r-html').CSSTemplateLiterals;
12
+ export declare const mark: import('@dineug/r-html').CSSTemplateLiterals;
13
+ //# sourceMappingURL=ExplorerPanel.styles.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { FC } from '@dineug/r-html';
2
+ export type ExplorerSearchProps = {
3
+ readonly: boolean;
4
+ };
5
+ /**
6
+ * The Explorer's search above its tree: the find field and its options, the
7
+ * Replace row folded away to begin with, the place in the matches with the
8
+ * steps through them, and the kinds of text searched past the three dots.
9
+ */
10
+ declare const ExplorerSearch: FC<ExplorerSearchProps>;
11
+ export default ExplorerSearch;
12
+ //# sourceMappingURL=ExplorerSearch.d.ts.map
@@ -0,0 +1,13 @@
1
+ export declare const root: import('@dineug/r-html').CSSTemplateLiterals;
2
+ export declare const fields: import('@dineug/r-html').CSSTemplateLiterals;
3
+ export declare const rows: import('@dineug/r-html').CSSTemplateLiterals;
4
+ export declare const row: import('@dineug/r-html').CSSTemplateLiterals;
5
+ export declare const field: import('@dineug/r-html').CSSTemplateLiterals;
6
+ export declare const input: import('@dineug/r-html').CSSTemplateLiterals;
7
+ export declare const toggle: import('@dineug/r-html').CSSTemplateLiterals;
8
+ export declare const twisty: import('@dineug/r-html').CSSTemplateLiterals;
9
+ export declare const status: import('@dineug/r-html').CSSTemplateLiterals;
10
+ export declare const count: import('@dineug/r-html').CSSTemplateLiterals;
11
+ export declare const scopes: import('@dineug/r-html').CSSTemplateLiterals;
12
+ export declare const scope: import('@dineug/r-html').CSSTemplateLiterals;
13
+ //# sourceMappingURL=ExplorerSearch.styles.d.ts.map
@@ -0,0 +1,28 @@
1
+ import { RxStore } from '../../engine/rx-store';
2
+ import { Emitter } from '../../utils/emitter';
3
+ /**
4
+ * Whether the toolbar shows the Explorer's button pressed: open on the ERD
5
+ * tab and not hidden by zen mode. A panel the canvas width hides for now
6
+ * still counts, so a press there closes it.
7
+ */
8
+ export declare function isExplorerPressed(store: RxStore): boolean;
9
+ /** Whether the panel is drawn now, as opposed to open but stood aside. */
10
+ export declare const isExplorerShown: (store: RxStore) => boolean;
11
+ /**
12
+ * Opens the Explorer on the ERD tab, from whichever tab is up. Under zen mode
13
+ * it shows the panel and leaves zen on (an owner decision of 2026-10-13).
14
+ * Under a takeover it does nothing.
15
+ */
16
+ export declare function openExplorer(store: RxStore): void;
17
+ export declare function closeExplorer(store: RxStore): void;
18
+ /** The toolbar button: closes a pressed button's panel, opens any other, and does nothing under a takeover. */
19
+ export declare function toggleExplorer(store: RxStore): void;
20
+ /**
21
+ * The palette's and the context menu's Toggle Explorer, which do what the find
22
+ * chord does: close a pressed button's panel, or ask for the search otherwise.
23
+ * Under a takeover it does nothing.
24
+ */
25
+ export declare function toggleExplorerSearch(store: RxStore, emitter: Emitter): void;
26
+ /** Sets the width a drag on the edge asks for, held between the least and the most. */
27
+ export declare function setExplorerWidth(store: RxStore, width: number): void;
28
+ //# sourceMappingURL=explorerCommands.d.ts.map
@@ -0,0 +1,14 @@
1
+ import { ErdTarget } from '../erd/goToErdTarget';
2
+ import { RxStore } from '../../engine/rx-store';
3
+ import { ExplorerNode } from './explorerTree';
4
+ /** Where on the canvas a row goes: none for a folder, which only folds and unfolds. */
5
+ export declare function targetOf(node: ExplorerNode): ErdTarget | null;
6
+ /**
7
+ * Goes to a row's or a match's target by the one jump rule, and lights a
8
+ * foreign key's relationship once there. Table Properties gives way first, so
9
+ * nothing is left under it (an owner decision of 2026-10-13).
10
+ */
11
+ export declare function jumpTo(store: RxStore, target: ErdTarget): void;
12
+ /** Goes where a row stands for; a folder goes nowhere. */
13
+ export declare function activateNode(store: RxStore, node: ExplorerNode): void;
14
+ //# sourceMappingURL=explorerNavigation.d.ts.map
@@ -0,0 +1,71 @@
1
+ import { AnyAction } from '@dineug/r-html';
2
+ import { RxStore } from '../../engine/rx-store';
3
+ import { I18n } from '../../i18n/translate';
4
+ import { Emitter } from '../../utils/emitter';
5
+ import { FindField, FindMatch, Matcher, ReplaceRun } from '../../utils/find-replace';
6
+ /** How long typing must pause before a regular expression is searched, as one can be slow. */
7
+ export declare const REGEX_INPUT_DELAY = 150;
8
+ /** What the search holds that no render reads: the matcher, the run, the timers. */
9
+ type SearchRuntime = {
10
+ matcher: Matcher | null;
11
+ pendingSearch: ReturnType<typeof setTimeout> | null;
12
+ /** Set while the search dispatches its own edit, whose matches it has worked out already. */
13
+ replacing: boolean;
14
+ /** Set by an edit of a searched text the tree does not show yet, one made while it stood aside say. */
15
+ stale: boolean;
16
+ /** Where the presses of Replace since the last jump or change of search began. */
17
+ run: ReplaceRun | null;
18
+ /** Set once that run has come back to where it began, which holds until a new run. */
19
+ stopped: boolean;
20
+ /** The last focus request the find field took or let go. */
21
+ focusTaken: number;
22
+ };
23
+ export declare function searchRuntimeOf(store: RxStore): SearchRuntime;
24
+ /** Whether a query is being searched, which puts the tree in its search form. */
25
+ export declare const isSearching: (store: RxStore) => boolean;
26
+ /** What the line under the fields says: the place in the matches, how many there are, or why none. */
27
+ export declare function countText(store: RxStore, i18n: Pick<I18n, 't'>): string;
28
+ /** Drops a regular expression's search still waiting for typing to pause. */
29
+ export declare function cancelPendingSearch(store: RxStore): void;
30
+ /** Whether the find field may take the keyboard now, which it marks as taken. */
31
+ export declare function takeSearchFocus(store: RxStore): boolean;
32
+ /** Whether a dialog the search trades for itself is up, which the chord then trades. */
33
+ export declare const hasSearchDialog: (store: RxStore) => boolean;
34
+ /**
35
+ * Brings the keyboard back to the search of a panel shown already, keeping
36
+ * its current match and its run, as every host's find does pressed again.
37
+ */
38
+ export declare function focusSearch(store: RxStore): void;
39
+ /**
40
+ * Opens the Explorer on its search, handing it the keyboard. A canvas too
41
+ * narrow says so rather than show nothing (an owner decision of 2026-10-13).
42
+ */
43
+ export declare function openSearch(store: RxStore, emitter: Emitter): void;
44
+ export declare function goToNext(store: RxStore): void;
45
+ export declare function goToPrevious(store: RxStore): void;
46
+ /** A row picked before a regular expression's pause goes to its match among those of what is typed, if any. */
47
+ export declare function goToMatch(store: RxStore, match: FindMatch): void;
48
+ /**
49
+ * Replaces the current match and takes the canvas to the next one in the same
50
+ * dispatch, so one undo takes back both. A run that comes back to where it
51
+ * began stops there rather than go round to what it wrote.
52
+ */
53
+ export declare function replaceOne(store: RxStore): void;
54
+ /** Replaces every match in one dispatch: one history entry and one batch to every peer. */
55
+ export declare function replaceAll(store: RxStore): void;
56
+ /** Searches plain text at once, as it is quick, and a regular expression once typing pauses. */
57
+ export declare function setQuery(store: RxStore, query: string): void;
58
+ export declare function setReplacement(store: RxStore, replacement: string): void;
59
+ /** Match Case, Whole Word and Regex search again; Preserve Case only shapes what Replace writes. */
60
+ export declare function toggleOption(store: RxStore, key: 'matchCase' | 'wholeWord' | 'regex' | 'preserveCase'): void;
61
+ export declare function toggleField(store: RxStore, field: FindField): void;
62
+ /**
63
+ * An edit of a searched text leaves the matches stale: searched again once
64
+ * the edits pause while the panel is shown, or at once by the batch that shows
65
+ * it again. A hover, a selection or a scroll edits none and searches nothing.
66
+ */
67
+ export declare function noteBatch(store: RxStore, actions: AnyAction[]): boolean;
68
+ /** Searches again when an edit left the matches stale and the search is on screen. */
69
+ export declare function searchIfStale(store: RxStore): void;
70
+ export {};
71
+ //# sourceMappingURL=explorerSearch.d.ts.map
@@ -0,0 +1,90 @@
1
+ import { TreeNode } from '../primitives/tree/treeModel';
2
+ import { RootState } from '../../engine/state';
3
+ import { FindMatch } from '../../utils/find-replace';
4
+ export type ExplorerFolder = 'tables' | 'tableGroups' | 'memos' | 'columns' | 'indexes' | 'foreignKeys';
5
+ /** The matches a search found in a row's own name, which it marks; none outside a search. */
6
+ type NameMatches = {
7
+ matches?: ReadonlyArray<FindMatch>;
8
+ };
9
+ /** What one row of the Explorer stands for, and what it shows of it. */
10
+ export type ExplorerNode = {
11
+ kind: 'folder';
12
+ folder: ExplorerFolder;
13
+ count: number;
14
+ } | ({
15
+ kind: 'table';
16
+ tableId: string;
17
+ name: string;
18
+ } & NameMatches) | ({
19
+ kind: 'column';
20
+ tableId: string;
21
+ columnId: string;
22
+ name: string;
23
+ dataType: string;
24
+ primaryKey: boolean;
25
+ foreignKey: boolean;
26
+ } & NameMatches) | ({
27
+ kind: 'index';
28
+ tableId: string;
29
+ indexId: string;
30
+ name: string;
31
+ unique: boolean;
32
+ columns: string;
33
+ } & NameMatches) | {
34
+ kind: 'foreignKey';
35
+ relationshipId: string;
36
+ tableId: string;
37
+ /** Whether its columns key the child too, which the connector draws in the PK and FK colour. */
38
+ identification: boolean;
39
+ columns: string;
40
+ parent: string;
41
+ parentColumns: string;
42
+ } | ({
43
+ kind: 'tableGroup';
44
+ tableGroupId: string;
45
+ name: string;
46
+ color: string;
47
+ } & NameMatches) | {
48
+ kind: 'groupTable';
49
+ tableGroupId: string;
50
+ tableId: string;
51
+ name: string;
52
+ } | {
53
+ kind: 'memo';
54
+ memoId: string;
55
+ text: string;
56
+ }
57
+ /** One match in a comment or a memo, shown as the stretch of text around it. */
58
+ | {
59
+ kind: 'excerpt';
60
+ match: FindMatch;
61
+ };
62
+ export type ExplorerTreeNode = TreeNode<ExplorerNode>;
63
+ /**
64
+ * The Explorer's folders, Tables, Table Groups and Memos, each only while it
65
+ * holds something and groups and memos only while shown. Tables and groups go
66
+ * by name, memos as the document has them; a table's folders wait for its expanding.
67
+ */
68
+ export declare function buildExplorerTree(state: RootState): ExplorerTreeNode[];
69
+ /**
70
+ * The row a match shows on in the search's tree: a name's own row, or the
71
+ * excerpt row of a comment or memo, one for each match there.
72
+ */
73
+ export declare function matchRowId(match: FindMatch): string;
74
+ /** The rows above a match's row in the search's tree, which must be open for the row to be drawn. */
75
+ export declare function matchAncestorIds({ field, id, tableId }: FindMatch): string[];
76
+ export type SearchTree = {
77
+ roots: ExplorerTreeNode[];
78
+ /** Every row with children, which a search shows open unless folded. */
79
+ branchIds: string[];
80
+ };
81
+ /**
82
+ * The tree a search shows: the rows that hold a match and the rows above
83
+ * them, in the order the search walked, with a comment's or memo's matches as
84
+ * rows of their own. A group's tables are left out, found under Tables alone.
85
+ */
86
+ export declare function buildSearchTree(state: RootState, matches: ReadonlyArray<FindMatch>): SearchTree;
87
+ /** What a search shows open: every row with children but those folded. */
88
+ export declare function searchExpanded(branchIds: ReadonlyArray<string>, collapsed: Readonly<Record<string, true>>): Record<string, true>;
89
+ export {};
90
+ //# sourceMappingURL=explorerTree.d.ts.map
@@ -0,0 +1,54 @@
1
+ import { RxStore } from '../../engine/rx-store';
2
+ import { FieldOrder, FindField, FindMatch } from '../../utils/find-replace';
3
+ /** The folder the tree shows open as the Explorer first opens. */
4
+ export declare const TABLES_FOLDER_ID = "f:tables";
5
+ export type ExplorerView = {
6
+ open: boolean;
7
+ /** Set by an opening while zen mode is on, which shows the panel without leaving zen. */
8
+ zenReveal: boolean;
9
+ width: number;
10
+ /** Replaced whole on every change: r-html tracks no Set, Map or frozen value. */
11
+ expanded: Record<string, true>;
12
+ /** The row the keyboard is on, kept by node id so a row added before it moves nothing. */
13
+ activeId: string | null;
14
+ query: string;
15
+ replacement: string;
16
+ matchCase: boolean;
17
+ wholeWord: boolean;
18
+ regex: boolean;
19
+ preserveCase: boolean;
20
+ /** Replaced whole on every change, a copy of the frozen default to begin with. */
21
+ fields: FindField[];
22
+ /** Whether the Replace row is unfolded, and the row of scopes past the three dots. */
23
+ replaceOpen: boolean;
24
+ scopesOpen: boolean;
25
+ /** The match the canvas was last taken to, by its place in the matches; -1 for none. */
26
+ current: number;
27
+ status: PressStatus | null;
28
+ matches: FindMatch[];
29
+ error: 'empty' | 'invalid' | null;
30
+ /** The walk's order: by name, or the one a run of Replace presses began with. */
31
+ order: FieldOrder | null;
32
+ /** The folders and rows folded while a search shows, every other one open. */
33
+ searchCollapsed: Record<string, true>;
34
+ /** Raised to ask the find field for the keyboard; dropped unless a drawn panel takes it. */
35
+ focusRequest: number;
36
+ };
37
+ /**
38
+ * What the last press of Replace or Replace All said, kept as what it means
39
+ * rather than as text, so a switch of language reads it again in the new one.
40
+ */
41
+ export type PressStatus = 'noMoreMatches' | 'noChanges' | {
42
+ replaced: number;
43
+ };
44
+ /**
45
+ * The Explorer's own state, one per editor, kept until the element goes:
46
+ * never in the store, the file, the history or a peer, so it survives a tab
47
+ * change and a reload of the document alike.
48
+ */
49
+ export declare function explorerViewOf(store: RxStore): ExplorerView;
50
+ /** Where the tree is scrolled to, unobserved, so a scroll renders nothing outside the tree. */
51
+ export declare function explorerScrollOf(store: RxStore): {
52
+ top: number;
53
+ };
54
+ //# sourceMappingURL=explorerView.d.ts.map