@dineug/erd-editor 3.10.0 → 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 (347) hide show
  1. package/README.md +316 -147
  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/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/sceneTokens.d.ts +38 -0
  14. package/dist/components/erd/canvas/table/Table.d.ts +9 -1
  15. package/dist/components/erd/canvas/table/doubleClick.d.ts +3 -4
  16. package/dist/components/erd/canvas/table-group/TableGroup.d.ts +17 -0
  17. package/dist/components/erd/canvas/table-group/TableGroupBody.d.ts +17 -0
  18. package/dist/components/erd/canvas/table-group/TableGroupDropTarget.d.ts +10 -0
  19. package/dist/components/erd/canvas/table-group/TableGroupSash.d.ts +35 -0
  20. package/dist/components/erd/canvas/table-group/TableGroups.d.ts +10 -0
  21. package/dist/components/erd/canvas/table-group/tableGroupBox.d.ts +40 -0
  22. package/dist/components/erd/canvas/table-group/titleLayout.d.ts +45 -0
  23. package/dist/components/erd/canvas/useMoveEntity.d.ts +2 -0
  24. package/dist/components/erd/draw-target/DrawTargetButtons.d.ts +16 -0
  25. package/dist/components/erd/draw-target/DrawTargetButtons.styles.d.ts +14 -0
  26. package/dist/components/erd/draw-target/drawTargetState.d.ts +26 -0
  27. package/dist/components/erd/draw-target/findDrawTarget.d.ts +29 -0
  28. package/dist/components/erd/draw-target/placePill.d.ts +49 -0
  29. package/dist/components/erd/erd-context-menu/ErdContextMenu.d.ts +6 -0
  30. package/dist/components/erd/erd-context-menu/menus/drawRelationshipMenus.d.ts +3 -0
  31. package/dist/components/erd/erd-context-menu/menus/exportMenus.d.ts +7 -2
  32. package/dist/components/erd/erd-context-menu/menus/importMenus.d.ts +5 -1
  33. package/dist/components/erd/erd-context-menu/menus/relationshipMenus.d.ts +6 -2
  34. package/dist/components/erd/erd-context-menu/menus/showMenus.d.ts +3 -1
  35. package/dist/components/erd/erd-context-menu/menus/tablePlacementMenus.d.ts +3 -0
  36. package/dist/components/erd/floating-toolbar/ToolbarCompass.template.d.ts +3 -1
  37. package/dist/components/erd/hitTest.d.ts +16 -1
  38. package/dist/components/erd/minimap/MinimapScene.d.ts +1 -1
  39. package/dist/components/erd/minimap/table/Table.d.ts +3 -3
  40. package/dist/components/erd/minimap/table-group/TableGroup.d.ts +17 -0
  41. package/dist/components/erd/table-group/TableGroupDraft.d.ts +15 -0
  42. package/dist/components/erd/table-group/TableGroupDraft.styles.d.ts +6 -0
  43. package/dist/components/erd/table-group/tableGroupName.d.ts +21 -0
  44. package/dist/components/erd/table-group/useTableGroupDraw.d.ts +25 -0
  45. package/dist/components/erd/table-properties/TableProperties.styles.d.ts +2 -2
  46. package/dist/components/erd/table-properties/table-properties-indexes/indexes-key/IndexesKey.d.ts +6 -0
  47. package/dist/components/erd/table-properties/table-properties-tabs/TablePropertiesTabs.d.ts +3 -0
  48. package/dist/components/erd/welcome-screen/WelcomeScreen.d.ts +17 -0
  49. package/dist/components/erd/welcome-screen/WelcomeScreen.styles.d.ts +17 -0
  50. package/dist/components/erd/welcome-screen/welcome-hints/WelcomeHints.d.ts +21 -0
  51. package/dist/components/erd/welcome-screen/welcome-hints/WelcomeHints.styles.d.ts +14 -0
  52. package/dist/components/erd/welcome-screen/welcome-hints/hintArrows.d.ts +10 -0
  53. package/dist/components/erd/welcome-screen/welcomeLayout.d.ts +87 -0
  54. package/dist/components/erd-editor/ErdEditor.d.ts +66 -6
  55. package/dist/components/erd-editor/useErdEditorAttachElement.d.ts +14 -1
  56. package/dist/components/export-image/ExportImage.d.ts +23 -0
  57. package/dist/components/export-image/ExportImage.styles.d.ts +34 -0
  58. package/dist/components/export-image/exportImageActions.d.ts +48 -0
  59. package/dist/components/find-replace/panelLayout.d.ts +4 -1
  60. package/dist/components/generator-code/GeneratorCode.d.ts +1 -0
  61. package/dist/components/generator-code/generator-code-context-menu/GeneratorCodeContextMenu.d.ts +3 -0
  62. package/dist/components/generator-code/generator-code-context-menu/menus/columnNameCaseMenus.d.ts +3 -0
  63. package/dist/components/generator-code/generator-code-context-menu/menus/languageMenus.d.ts +8 -0
  64. package/dist/components/generator-code/generator-code-context-menu/menus/tableNameCaseMenus.d.ts +3 -0
  65. package/dist/components/generator-code/generator-code-options/GeneratorCodeOptions.d.ts +17 -0
  66. package/dist/components/generator-code/generator-code-options/GeneratorCodeOptions.styles.d.ts +5 -0
  67. package/dist/components/generator-code/generatorCodeView.d.ts +12 -0
  68. package/dist/components/generator-code/languageSettings.d.ts +14 -0
  69. package/dist/components/locale-picker/LocalePicker.d.ts +13 -0
  70. package/dist/components/locale-picker/LocalePicker.styles.d.ts +19 -0
  71. package/dist/components/localeContext.d.ts +10 -0
  72. package/dist/components/localized/Localized.d.ts +18 -0
  73. package/dist/components/map-columns/MapColumnsBody.d.ts +24 -0
  74. package/dist/components/map-columns/MapColumnsDialog.d.ts +13 -0
  75. package/dist/components/map-columns/MapColumnsDialog.styles.d.ts +38 -0
  76. package/dist/components/map-columns/mapColumnsAction.d.ts +13 -0
  77. package/dist/components/map-columns/nameOf.d.ts +6 -0
  78. package/dist/components/map-columns/openMapColumns.d.ts +9 -0
  79. package/dist/components/primitives/code-block/CodeBlock.d.ts +6 -1
  80. package/dist/components/primitives/code-block/CodeBlock.styles.d.ts +2 -0
  81. package/dist/components/primitives/color-picker/ColorPicker.d.ts +10 -1
  82. package/dist/components/primitives/color-picker/ColorPicker.styles.d.ts +25 -0
  83. package/dist/components/primitives/color-picker/colorModel.d.ts +36 -0
  84. package/dist/components/primitives/color-picker/presetColors.d.ts +13 -0
  85. package/dist/components/primitives/color-picker/resolveColor.d.ts +7 -0
  86. package/dist/components/primitives/context-menu/ContextMenu.d.ts +2 -0
  87. package/dist/components/primitives/context-menu/context-menu-content/ContextMenuContent.d.ts +1 -0
  88. package/dist/components/primitives/context-menu/context-menu-content/fitMenu.d.ts +4 -4
  89. package/dist/components/primitives/context-menu/context-menu-separator/ContextMenuSeparator.d.ts +8 -0
  90. package/dist/components/primitives/context-menu/context-menu-separator/ContextMenuSeparator.styles.d.ts +2 -0
  91. package/dist/components/primitives/context-menu/menu/Menu.d.ts +2 -0
  92. package/dist/components/primitives/context-menu/submenu-chevron/SubmenuChevron.d.ts +5 -0
  93. package/dist/components/primitives/dialog/Dialog.d.ts +21 -0
  94. package/dist/components/primitives/dialog/Dialog.styles.d.ts +12 -0
  95. package/dist/components/primitives/highlighted-text/HighlightedText.d.ts +2 -5
  96. package/dist/components/primitives/icon/icons.d.ts +17 -0
  97. package/dist/components/primitives/select/Select.d.ts +18 -0
  98. package/dist/components/primitives/select/Select.styles.d.ts +13 -0
  99. package/dist/components/primitives/text-input/TextInput.d.ts +2 -0
  100. package/dist/components/primitives/toast/Toast.d.ts +5 -1
  101. package/dist/components/primitives/toast/Toast.styles.d.ts +2 -2
  102. package/dist/components/quick-search/QuickSearch.d.ts +2 -1
  103. package/dist/components/quick-search/actions.d.ts +40 -5
  104. package/dist/components/quick-search/hangul.d.ts +16 -10
  105. package/dist/components/quick-search/paletteQuery.d.ts +5 -4
  106. package/dist/components/quick-search/scopedActions.d.ts +6 -5
  107. package/dist/components/schema-sql/SchemaSQL.d.ts +2 -0
  108. package/dist/components/schema-sql/SchemaSQL.styles.d.ts +7 -0
  109. package/dist/components/schema-sql/schema-sql-context-menu/SchemaSQLContextMenu.d.ts +3 -0
  110. package/dist/components/schema-sql/schema-sql-context-menu/menus/bracketMenus.d.ts +3 -0
  111. package/dist/components/schema-sql/schema-sql-context-menu/menus/headerMenus.d.ts +29 -0
  112. package/dist/components/schema-sql/schema-sql-context-menu/menus/statementsMenus.d.ts +27 -0
  113. package/dist/components/schema-sql/schema-sql-options/SchemaSQLOptions.d.ts +24 -0
  114. package/dist/components/schema-sql/schema-sql-options/SchemaSQLOptions.styles.d.ts +45 -0
  115. package/dist/components/schema-sql/schema-sql-options/ScriptEditor.d.ts +20 -0
  116. package/dist/components/schema-sql/schema-sql-options/ScriptEditor.styles.d.ts +13 -0
  117. package/dist/components/schema-sql/schema-sql-options/dropWarning.d.ts +8 -0
  118. package/dist/components/schema-sql/schemaSQLView.d.ts +71 -0
  119. package/dist/components/settings/Settings.styles.d.ts +7 -0
  120. package/dist/components/settings/columnTypeLabels.d.ts +8 -0
  121. package/dist/components/settings/lockSettingRows.d.ts +16 -0
  122. package/dist/components/settings/settings-lnb/SettingsLnb.d.ts +3 -0
  123. package/dist/components/settings/settingsPage.d.ts +10 -0
  124. package/dist/components/theme-builder/ThemeBuilder.d.ts +9 -1
  125. package/dist/components/theme-builder/ThemeBuilder.styles.d.ts +8 -5
  126. package/dist/components/toast-container/openStatusToast.d.ts +29 -0
  127. package/dist/components/toast-container/openToastWhileRunning.d.ts +1 -1
  128. package/dist/components/toolbar/Toolbar.d.ts +1 -0
  129. package/dist/components/visualization/graph-node/GraphNode.d.ts +2 -2
  130. package/dist/components/visualization/graphPan.d.ts +12 -0
  131. package/dist/components/visualization/visualizationView.d.ts +2 -2
  132. package/dist/constants/language.d.ts +1 -1
  133. package/dist/constants/layout.d.ts +34 -0
  134. package/dist/constants/open.d.ts +3 -0
  135. package/dist/constants/schema.d.ts +25 -4
  136. package/dist/constants/sql/dataType/PostgreSQL.d.ts +2 -1
  137. package/dist/constants/sql/dataType/SQLite.d.ts +3 -1
  138. package/dist/engine/actions.d.ts +20 -2
  139. package/dist/engine/context.d.ts +6 -0
  140. package/dist/engine/index.js +26 -21
  141. package/dist/engine/modules/editor/actions.d.ts +10 -2
  142. package/dist/engine/modules/editor/atom.actions.d.ts +49 -11
  143. package/dist/engine/modules/editor/generator.actions.d.ts +107 -8
  144. package/dist/engine/modules/editor/state.d.ts +16 -3
  145. package/dist/engine/modules/editor/utils/color.d.ts +21 -0
  146. package/dist/engine/modules/editor/utils/duplicate.d.ts +28 -1
  147. package/dist/engine/modules/editor/utils/focus.d.ts +16 -0
  148. package/dist/engine/modules/editor/utils/releaseHidden.d.ts +16 -0
  149. package/dist/engine/modules/editor/utils/selection.d.ts +12 -0
  150. package/dist/engine/modules/relationship/actions.d.ts +6 -0
  151. package/dist/engine/modules/relationship/atom.actions.d.ts +57 -1
  152. package/dist/engine/modules/relationship/endFlags.d.ts +14 -0
  153. package/dist/engine/modules/relationship/fkColumns.d.ts +25 -6
  154. package/dist/engine/modules/relationship/history.d.ts +1 -0
  155. package/dist/engine/modules/relationship/hooks.d.ts +0 -11
  156. package/dist/engine/modules/relationship/referenceType.d.ts +12 -0
  157. package/dist/engine/modules/settings/actions.d.ts +17 -4
  158. package/dist/engine/modules/settings/atom.actions.d.ts +63 -19
  159. package/dist/engine/modules/settings/generator.actions.d.ts +7 -0
  160. package/dist/engine/modules/settings/history.d.ts +1 -0
  161. package/dist/engine/modules/table/actions.d.ts +8 -0
  162. package/dist/engine/modules/table/atom.actions.d.ts +31 -0
  163. package/dist/engine/modules/table/generator.actions.d.ts +3 -3
  164. package/dist/engine/modules/table/history.d.ts +1 -0
  165. package/dist/engine/modules/table-column/generator.actions.d.ts +8 -0
  166. package/dist/engine/modules/table-column/hooks.d.ts +0 -6
  167. package/dist/engine/modules/table-column/keys.d.ts +14 -0
  168. package/dist/engine/modules/table-column/utils/dataType.d.ts +19 -1
  169. package/dist/engine/modules/table-group/actions.d.ts +63 -0
  170. package/dist/engine/modules/table-group/atom.actions.d.ts +238 -0
  171. package/dist/engine/modules/table-group/generator.actions.d.ts +111 -0
  172. package/dist/engine/modules/table-group/history.d.ts +13 -0
  173. package/dist/engine/peer-store.d.ts +9 -3
  174. package/dist/engine/replication-store.d.ts +6 -3
  175. package/dist/engine/rx-operators/groupByStreamActions.d.ts +5 -1
  176. package/dist/engine/rx-operators/lockIgnoreFilter.d.ts +8 -0
  177. package/dist/engine/rx-store.d.ts +2 -0
  178. package/dist/engine/settle.d.ts +9 -0
  179. package/dist/engine/store-hooks.d.ts +0 -8
  180. package/dist/erd-editor.umd.js +2100 -4194
  181. package/dist/hooks/useNavigatorLanguages.d.ts +7 -0
  182. package/dist/i18n/locales.d.ts +126 -0
  183. package/dist/i18n/menuLabel.d.ts +12 -0
  184. package/dist/i18n/messages/ar-SA.d.ts +399 -0
  185. package/dist/i18n/messages/de-DE.d.ts +375 -0
  186. package/dist/i18n/messages/en/code.d.ts +17 -0
  187. package/dist/i18n/messages/en/colorPicker.d.ts +35 -0
  188. package/dist/i18n/messages/en/common.d.ts +65 -0
  189. package/dist/i18n/messages/en/contextMenu.d.ts +29 -0
  190. package/dist/i18n/messages/en/exportImage.d.ts +25 -0
  191. package/dist/i18n/messages/en/feedback.d.ts +11 -0
  192. package/dist/i18n/messages/en/findReplace.d.ts +36 -0
  193. package/dist/i18n/messages/en/floatingToolbar.d.ts +12 -0
  194. package/dist/i18n/messages/en/index.d.ts +378 -0
  195. package/dist/i18n/messages/en/mapColumns.d.ts +39 -0
  196. package/dist/i18n/messages/en/palette.d.ts +40 -0
  197. package/dist/i18n/messages/en/schemaSql.d.ts +28 -0
  198. package/dist/i18n/messages/en/settings.d.ts +22 -0
  199. package/dist/i18n/messages/en/shortcuts.d.ts +32 -0
  200. package/dist/i18n/messages/en/tableProperties.d.ts +34 -0
  201. package/dist/i18n/messages/en/themeBuilder.d.ts +7 -0
  202. package/dist/i18n/messages/en/toolbar.d.ts +9 -0
  203. package/dist/i18n/messages/en/visualization.d.ts +12 -0
  204. package/dist/i18n/messages/en/welcome.d.ts +13 -0
  205. package/dist/i18n/messages/es-ES.d.ts +381 -0
  206. package/dist/i18n/messages/eu-ES.d.ts +375 -0
  207. package/dist/i18n/messages/fa-IR.d.ts +375 -0
  208. package/dist/i18n/messages/fr-FR.d.ts +381 -0
  209. package/dist/i18n/messages/he-IL.d.ts +381 -0
  210. package/dist/i18n/messages/id-ID.d.ts +369 -0
  211. package/dist/i18n/messages/index.d.ts +11 -0
  212. package/dist/i18n/messages/it-IT.d.ts +381 -0
  213. package/dist/i18n/messages/ja-JP.d.ts +369 -0
  214. package/dist/i18n/messages/ko-KR.d.ts +369 -0
  215. package/dist/i18n/messages/nl-NL.d.ts +375 -0
  216. package/dist/i18n/messages/pl-PL.d.ts +387 -0
  217. package/dist/i18n/messages/pt-BR.d.ts +381 -0
  218. package/dist/i18n/messages/pt-PT.d.ts +381 -0
  219. package/dist/i18n/messages/ro-RO.d.ts +381 -0
  220. package/dist/i18n/messages/ru-RU.d.ts +387 -0
  221. package/dist/i18n/messages/sk-SK.d.ts +387 -0
  222. package/dist/i18n/messages/sl-SI.d.ts +387 -0
  223. package/dist/i18n/messages/sv-SE.d.ts +375 -0
  224. package/dist/i18n/messages/tr-TR.d.ts +375 -0
  225. package/dist/i18n/messages/uk-UA.d.ts +387 -0
  226. package/dist/i18n/messages/zh-CN.d.ts +369 -0
  227. package/dist/i18n/messages/zh-TW.d.ts +369 -0
  228. package/dist/i18n/resolveLocale.d.ts +11 -0
  229. package/dist/i18n/source.d.ts +7 -0
  230. package/dist/i18n/translate.d.ts +58 -0
  231. package/dist/index.d.ts +2 -0
  232. package/dist/index.js +29797 -13894
  233. package/dist/internal-types/index.d.ts +2 -4
  234. package/dist/konva/scene/contentBounds.d.ts +18 -12
  235. package/dist/konva/scene/metrics.d.ts +2 -0
  236. package/dist/konva/scene/renderScene.d.ts +10 -4
  237. package/dist/konva/scene/stacking.d.ts +21 -0
  238. package/dist/konva/scene/viewLayout.d.ts +2 -1
  239. package/dist/loadValue-B3EFSe9k.js +12925 -0
  240. package/dist/peer/index.d.ts +6 -3
  241. package/dist/peer/index.js +83 -76
  242. package/dist/services/elk-layout/elkGraph.d.ts +6 -4
  243. package/dist/services/elk-layout/elkLayoutOptions.d.ts +20 -0
  244. package/dist/services/elk-layout/elkLayoutService.d.ts +3 -3
  245. package/dist/services/export-png/ExportScene.d.ts +3 -3
  246. package/dist/services/export-png/documentScene.d.ts +14 -9
  247. package/dist/services/export-png/exportBox.d.ts +40 -5
  248. package/dist/services/export-png/exportPngService.d.ts +15 -0
  249. package/dist/services/export-png/exportTheme.d.ts +26 -0
  250. package/dist/services/export-png/index.d.ts +44 -11
  251. package/dist/services/export-png/renderPng.d.ts +18 -10
  252. package/dist/services/export-png/renderSvg.d.ts +22 -0
  253. package/dist/services/export-png/sceneSvg.d.ts +54 -0
  254. package/dist/services/shiki/graphqlGrammar.d.ts +8 -0
  255. package/dist/shared-store-fUggY7sI.js +1341 -0
  256. package/dist/themes/radix-ui-theme.d.ts +11 -3
  257. package/dist/themes/tokens.d.ts +9 -0
  258. package/dist/utils/calcTable.d.ts +9 -0
  259. package/dist/utils/clipboard.d.ts +9 -0
  260. package/dist/utils/collection/tableGroup.entity.d.ts +3 -0
  261. package/dist/utils/contrastText.d.ts +21 -0
  262. package/dist/utils/deepMerge.d.ts +8 -0
  263. package/dist/utils/device-detect/index.d.ts +2 -6
  264. package/dist/utils/domEvent.d.ts +18 -0
  265. package/dist/utils/dragSelect.d.ts +2 -0
  266. package/dist/utils/draw-relationship/bezier.d.ts +2 -0
  267. package/dist/utils/draw-relationship/corner.d.ts +9 -0
  268. package/dist/utils/draw-relationship/index.d.ts +18 -18
  269. package/dist/utils/draw-relationship/loop.d.ts +29 -0
  270. package/dist/utils/draw-relationship/pathFinding.d.ts +1 -1
  271. package/dist/utils/draw-relationship/sort.d.ts +8 -1
  272. package/dist/utils/draw-relationship/stub.d.ts +4 -3
  273. package/dist/utils/emitter.d.ts +53 -6
  274. package/dist/utils/file/exportFile.d.ts +15 -5
  275. package/dist/utils/file/importFile.d.ts +9 -5
  276. package/dist/utils/file/importSchema.d.ts +45 -0
  277. package/dist/utils/find-replace/findMatches.d.ts +1 -1
  278. package/dist/utils/find-replace/present.d.ts +5 -3
  279. package/dist/utils/generator-code/columnTypes.d.ts +99 -0
  280. package/dist/utils/generator-code/doctrine.d.ts +6 -0
  281. package/dist/utils/generator-code/doctrineReservedWords.d.ts +7 -0
  282. package/dist/utils/generator-code/graphql.d.ts +6 -0
  283. package/dist/utils/generator-code/heck.d.ts +5 -0
  284. package/dist/utils/generator-code/java.d.ts +28 -0
  285. package/dist/utils/generator-code/jsonSchema.d.ts +50 -0
  286. package/dist/utils/generator-code/jsonShape.d.ts +37 -0
  287. package/dist/utils/generator-code/kotlin.d.ts +1 -0
  288. package/dist/utils/generator-code/mermaid.d.ts +5 -0
  289. package/dist/utils/generator-code/php.d.ts +28 -0
  290. package/dist/utils/generator-code/rust.d.ts +13 -0
  291. package/dist/utils/generator-code/rustTypes.d.ts +44 -0
  292. package/dist/utils/generator-code/scala.d.ts +1 -0
  293. package/dist/utils/generator-code/seaorm.d.ts +22 -0
  294. package/dist/utils/generator-code/swift.d.ts +44 -0
  295. package/dist/utils/generator-code/utils.d.ts +19 -0
  296. package/dist/utils/generator-code/zod.d.ts +25 -0
  297. package/dist/utils/globalEventObservable.d.ts +10 -1
  298. package/dist/utils/highlightWords.d.ts +29 -0
  299. package/dist/utils/index.d.ts +1 -2
  300. package/dist/utils/keyboard-shortcut/bindKeys.d.ts +9 -0
  301. package/dist/utils/keyboard-shortcut/index.d.ts +11 -4
  302. package/dist/utils/keyboard-shortcut/utils.d.ts +21 -0
  303. package/dist/utils/map-columns/alignTypes.d.ts +37 -0
  304. package/dist/utils/map-columns/buildRows.d.ts +102 -0
  305. package/dist/utils/map-columns/candidateKeys.d.ts +24 -0
  306. package/dist/utils/map-columns/index.d.ts +8 -0
  307. package/dist/utils/map-columns/mapping.d.ts +67 -0
  308. package/dist/utils/map-columns/prefill.d.ts +26 -0
  309. package/dist/utils/map-columns/toMapColumnsActions.d.ts +10 -0
  310. package/dist/utils/map-columns/validate.d.ts +45 -0
  311. package/dist/utils/memo.d.ts +4 -0
  312. package/dist/utils/schema-aml-parser/types.d.ts +2 -0
  313. package/dist/utils/schema-dbml-parser/tokenizer.d.ts +2 -0
  314. package/dist/utils/schema-dbml-parser/types.d.ts +11 -0
  315. package/dist/utils/schema-sql/Databricks.d.ts +8 -3
  316. package/dist/utils/schema-sql/MSSQL.d.ts +14 -2
  317. package/dist/utils/schema-sql/MariaDB.d.ts +6 -5
  318. package/dist/utils/schema-sql/MySQL.d.ts +13 -4
  319. package/dist/utils/schema-sql/Oracle.d.ts +19 -5
  320. package/dist/utils/schema-sql/PostgreSQL.d.ts +16 -4
  321. package/dist/utils/schema-sql/SQLite.d.ts +16 -4
  322. package/dist/utils/schema-sql/Snowflake.d.ts +8 -3
  323. package/dist/utils/schema-sql/index.d.ts +16 -1
  324. package/dist/utils/schema-sql/options.d.ts +57 -0
  325. package/dist/utils/schema-sql/utils.d.ts +101 -2
  326. package/dist/utils/stageCursor.d.ts +20 -0
  327. package/dist/utils/table-clipboard/placement.d.ts +2 -0
  328. package/dist/utils/tableColor.d.ts +29 -0
  329. package/dist/utils/tableGroup.d.ts +142 -0
  330. package/dist/utils/tableKeys.d.ts +11 -3
  331. package/dist/workers/elkLayout.shared-worker.js +1 -1
  332. package/dist/workers/exportPng.shared-worker.js +30 -30
  333. package/dist/workers/shiki.shared-worker.js +1 -1
  334. package/dist/workers/spawn.d.ts +1 -2
  335. package/dist/workers/spawn.inline.d.ts +0 -1
  336. package/package.json +6 -13
  337. package/dist/components/generator-code/GeneratorCode.styles.d.ts +0 -2
  338. package/dist/loadValue-Mdc5K4qO.js +0 -10858
  339. package/dist/schemaGCService-CZtGFh2z.js +0 -42
  340. package/dist/services/schema-gc/index.d.ts +0 -18
  341. package/dist/services/schema-gc/procGC.d.ts +0 -4
  342. package/dist/services/schema-gc/schemaGC.shared-worker.d.ts +0 -2
  343. package/dist/services/schema-gc/schemaGCService.d.ts +0 -10
  344. package/dist/shared-store-D82WVL5a.js +0 -1129
  345. package/dist/styles/colorPicker.style.d.ts +0 -7
  346. package/dist/utils/draw-relationship/chamfer.d.ts +0 -3
  347. package/dist/workers/schemaGC.shared-worker.js +0 -1
@@ -0,0 +1,99 @@
1
+ import { PrimitiveType } from '../../constants/sql/dataType';
2
+ /**
3
+ * The value a column's element holds, apart from any driver or library that
4
+ * reads it: integers by width and sign, floats by width, each date and time.
5
+ */
6
+ export type ColumnScalar = 'bool' | 'i8' | 'i16' | 'i32' | 'i64' | 'u8' | 'u16' | 'u32' | 'u64' | 'f32' | 'f64' | 'decimal' | 'string' | 'bytes' | 'uuid' | 'json' | 'date' | 'time' | 'timeTz' | 'dateTime' | 'dateTimeUtc' | 'dateTimeOffset' | 'interval';
7
+ /** The fields an interval holds: years and months, days to seconds, or both. */
8
+ export type IntervalFields = 'yearMonth' | 'dayTime' | 'mixed';
9
+ /** A network address type, by what it holds. */
10
+ export type NetworkType = 'ipv4' | 'ipv6' | 'inet' | 'cidr' | 'macaddr' | 'macaddr8';
11
+ export type ColumnType = {
12
+ scalar: ColumnScalar;
13
+ /** The element's data type as written, a PostgreSQL array's suffix gone. */
14
+ element: string;
15
+ /**
16
+ * The element's type name, lower case, its arguments gone, and on MySQL and
17
+ * MariaDB its UNSIGNED, ZEROFILL and SIGNED too.
18
+ */
19
+ base: string;
20
+ /** The element's arguments when all are numbers: numeric(10,2) gives [10, 2]. */
21
+ args: number[];
22
+ arrayDepth: number;
23
+ /** An integer's width, 24 for MySQL's MEDIUMINT; null for any other scalar. */
24
+ bits: 8 | 16 | 24 | 32 | 64 | null;
25
+ /** Whether the database's vendor list names the element's type. */
26
+ isListed: boolean;
27
+ /** MySQL and MariaDB: UNSIGNED, ZEROFILL or SERIAL in the type. */
28
+ isUnsigned: boolean;
29
+ /** A type that numbers its rows itself: PostgreSQL's serials, MySQL's SERIAL. */
30
+ isSerial: boolean;
31
+ isFloat: boolean;
32
+ /** money or smallmoney, which PostgreSQL prints in the session's currency. */
33
+ isMoney: boolean;
34
+ /** SQL Server's uniqueidentifier, which holds any 16 bytes, not only an RFC UUID. */
35
+ isGuid: boolean;
36
+ /** SQL Server's timestamp and rowversion, eight bytes it writes on every change. */
37
+ isRowVersion: boolean;
38
+ /** A Snowflake or Databricks VARIANT, OBJECT, ARRAY, MAP or STRUCT. */
39
+ isSemiStructured: boolean;
40
+ /** A PostgreSQL bit string, which drivers read as text such as 1010. */
41
+ isBitString: boolean;
42
+ /** PostgreSQL's xid, cid and xid8, integers node-postgres hands over as text. */
43
+ isTextInteger: boolean;
44
+ /** Databricks' VOID, which holds nothing but NULL. */
45
+ isNullOnly: boolean;
46
+ /** A character type's declared length, BYTE or CHAR units alike; else null. */
47
+ length: number | null;
48
+ /** A decimal or NUMBER's declared precision, a star being 38; else null. */
49
+ precision: number | null;
50
+ /** A decimal or NUMBER's declared scale; null where none is written. */
51
+ scale: number | null;
52
+ interval: IntervalFields | null;
53
+ network: NetworkType | null;
54
+ /** An ENUM's members, each read as MySQL reads a string literal. */
55
+ enumMembers: string[] | null;
56
+ /** A SET's members, each read as MySQL reads a string literal. */
57
+ setMembers: string[] | null;
58
+ };
59
+ /** The binary types, which every database hands over as bytes. */
60
+ export declare const BINARY_TYPES: ReadonlySet<string>;
61
+ export declare const UUID_TYPES: ReadonlySet<string>;
62
+ export declare const JSON_TYPES: ReadonlySet<string>;
63
+ /** The timestamps that keep their offset, or an instant read with one. */
64
+ export declare const TIMESTAMP_TZ_TYPES: ReadonlySet<string>;
65
+ /** An instant the database shows in the session's zone, as MySQL's TIMESTAMP. */
66
+ export declare const TIMESTAMP_LTZ_TYPES: ReadonlySet<string>;
67
+ export declare const MONEY_TYPES: ReadonlySet<string>;
68
+ /** PostgreSQL's bit strings, which its drivers read as text such as 1010. */
69
+ export declare const POSTGRES_BIT_TYPES: ReadonlySet<string>;
70
+ export declare const POSTGRES_TIME_TZ_TYPES: ReadonlySet<string>;
71
+ /** PostgreSQL's system identifiers: xid8 is 64 bits, the others 32. */
72
+ export declare const POSTGRES_OBJECT_ID_TYPES: ReadonlySet<string>;
73
+ export declare const POSTGRES_SERIAL_TYPES: ReadonlySet<string>;
74
+ /** The character types a length argument bounds, in characters or bytes. */
75
+ export declare const CHARACTER_TYPES: ReadonlySet<string>;
76
+ /**
77
+ * What a column's type holds on a database, read by type name before the
78
+ * vendor lists, which only file each name under one of eleven categories.
79
+ */
80
+ export declare function getColumnType(dataType: string, database: number): ColumnType;
81
+ /** MySQL and MariaDB: whether UNSIGNED, ZEROFILL or SERIAL makes a type unsigned. */
82
+ export declare function isUnsigned(dataType: string, database: number): boolean;
83
+ /**
84
+ * An ENUM's or SET's members, each read as MySQL reads a string literal in
85
+ * either quote; null where the list holds anything else or nothing.
86
+ */
87
+ export declare function enumMembers(dataType: string): string[] | null;
88
+ /** A PostgreSQL array's element type and its number of dimensions. */
89
+ export declare function splitPostgresArray(dataType: string, database: number): [element: string, depth: number];
90
+ /** A type's first argument list when every argument is a number. */
91
+ export declare function typeArguments(dataType: string): number[];
92
+ export declare function isMySQLFamily(database: number): boolean;
93
+ /**
94
+ * The scalar a type's base name gives on a database at the width the name
95
+ * declares, by the rules by name and then by the category primitiveOf files
96
+ * the type under; getColumnType widens what Oracle, Snowflake and SQLite store.
97
+ */
98
+ export declare function columnScalar(element: string, base: string, args: number[], database: number, isUnsigned: boolean, primitiveOf?: (dataType: string, database: number) => PrimitiveType): ColumnScalar;
99
+ //# sourceMappingURL=columnTypes.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { RootState } from '../../engine/state';
2
+ import { Table } from '../../internal-types';
3
+ export declare function createCode(state: RootState): string;
4
+ /** One table's entity under the header and the use statements it needs. */
5
+ export declare function createTableCode(state: RootState, table: Table): string;
6
+ //# sourceMappingURL=doctrine.d.ts.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Every word DBAL 4 lists as reserved on MySQL, MariaDB, PostgreSQL, SQL
3
+ * Server, Oracle or SQLite, in lower case: Doctrine quotes such a name in the
4
+ * DDL it writes but in a query only when the mapping marks it with backticks.
5
+ */
6
+ export declare const DOCTRINE_RESERVED_WORDS: ReadonlySet<string>;
7
+ //# sourceMappingURL=doctrineReservedWords.d.ts.map
@@ -2,4 +2,10 @@ import { RootState } from '../../engine/state';
2
2
  import { FormatTableOptions } from './utils';
3
3
  export declare function createCode(state: RootState): string;
4
4
  export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
5
+ /**
6
+ * The name before a last word id, in any case, the separator before it
7
+ * dropped, words split as isSingleWord splits them; null where id is not a
8
+ * word of its own, or is the only one.
9
+ */
10
+ export declare function stripIdWord(name: string): string | null;
5
11
  //# sourceMappingURL=graphql.d.ts.map
@@ -0,0 +1,5 @@
1
+ /** heck's to_snake_case, which SeaORM's derive macros name columns by. */
2
+ export declare function toSnakeCase(value: string): string;
3
+ /** heck's to_upper_camel_case, which SeaORM's derive macros name variants by. */
4
+ export declare function toUpperCamelCase(value: string): string;
5
+ //# sourceMappingURL=heck.d.ts.map
@@ -1,5 +1,33 @@
1
1
  import { RootState } from '../../engine/state';
2
2
  import { FormatTableOptions } from './utils';
3
+ /**
4
+ * A column element's type on the JVM, named as Java writes it but for bytes,
5
+ * which Java, Kotlin and Scala each spell their own way.
6
+ */
7
+ export type JvmType = 'BigDecimal' | 'Boolean' | 'Byte' | 'bytes' | 'Double' | 'Duration' | 'Float' | 'Integer' | 'LocalDate' | 'LocalDateTime' | 'LocalTime' | 'Long' | 'OffsetDateTime' | 'OffsetTime' | 'Short' | 'String' | 'UUID';
8
+ export type JvmColumnType = {
9
+ type: JvmType;
10
+ /** PostgreSQL array dimensions, each one array or list level around the type. */
11
+ arrayDepth: number;
12
+ };
3
13
  export declare function createCode(state: RootState): string;
4
14
  export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
15
+ /** The JVM type of a column on a database, from the shared column classifier. */
16
+ export declare function getJvmType(dataType: string, database: number): JvmColumnType;
17
+ /**
18
+ * A field name, with an underscore after a reserved word and after a name
19
+ * that breaks the class Lombok completes.
20
+ */
21
+ export declare function toJavaFieldName(name: string): string;
22
+ export declare function toJavaClassName(name: string): string;
23
+ /**
24
+ * javac reads a backslash and u as a Unicode escape even in a comment, where
25
+ * a bad one fails the compile; an even run of backslashes starts none.
26
+ */
27
+ export declare function escapeUnicodeEscapes(value: string): string;
28
+ /**
29
+ * A comment as line comments, one for each of its lines, its blank first and
30
+ * last lines dropped; nothing for a comment that is only whitespace.
31
+ */
32
+ export declare function formatLineComment(buffer: string[], indent: string, comment: string, escape?: (line: string) => string): void;
5
33
  //# sourceMappingURL=java.d.ts.map
@@ -0,0 +1,50 @@
1
+ import { RootState } from '../../engine/state';
2
+ import { Table } from '../../internal-types';
3
+ import { JsonShape } from './jsonShape';
4
+ export type JsonScalar = string | number | boolean | null;
5
+ /**
6
+ * An object as a Map, which keeps every key where it was set, __proto__ and
7
+ * integer-like keys too, where a plain object loses or reorders them.
8
+ */
9
+ export type JsonObject = Map<string, JsonValue>;
10
+ export type JsonValue = JsonScalar | JsonScalar[] | JsonObject;
11
+ export declare const DIALECT = "https://json-schema.org/draft/2020-12/schema";
12
+ /**
13
+ * A time of day with no offset, as z.iso.time() takes it, written with [0-9]
14
+ * since \d matches any script's decimal digits in a Python or .NET validator.
15
+ */
16
+ export declare const TIME_PATTERN = "^(?:[01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\\.[0-9]+)?)?$";
17
+ /**
18
+ * A date and time with no offset; the Z a driver's Date.prototype.toJSON adds
19
+ * passes after seconds, as z.iso.datetime({ local: true }) lets it.
20
+ */
21
+ export declare const NAIVE_DATE_TIME_PATTERN = "^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])T(?:[01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\\.[0-9]+)?Z?)?$";
22
+ /** Every table's row schema under $defs, keyed by the cased table name. */
23
+ export declare function createCode(state: RootState): string;
24
+ /** One table's row schema standing alone, its name never numbered. */
25
+ export declare function createTableCode(state: RootState, table: Table): string;
26
+ /**
27
+ * Each table's key: a name met again is numbered from 2, past every name a
28
+ * table takes as is, so a table named user2 keeps User2 beside two users.
29
+ */
30
+ export declare function toDefinitionKeys(names: string[]): string[];
31
+ /** The schema of one value of a column, NOT NULL, with no description. */
32
+ export declare function toValueSchema(shape: JsonShape): JsonObject;
33
+ /**
34
+ * A schema that takes null too: null joins its type, and its enum, which
35
+ * refuses a value it does not list; a schema with no type takes null already.
36
+ */
37
+ export declare function withNull(schema: JsonObject): JsonObject;
38
+ /**
39
+ * JSON as Prettier writes it: two spaces a level, an object one key a line,
40
+ * and an array on one line while that line fits in 80 columns, its comma
41
+ * counted only where another key follows, else one item a line.
42
+ */
43
+ export declare function formatJson(object: JsonObject, indent?: string): string;
44
+ /**
45
+ * Columns a string takes on a line, a code point at a time as Prettier counts:
46
+ * two for a wide or fullwidth one or an emoji that takes a skin tone, none for
47
+ * a control, a combining mark U+0300-U+036F or a variation selector, else one.
48
+ */
49
+ export declare function textWidth(text: string): number;
50
+ //# sourceMappingURL=jsonSchema.d.ts.map
@@ -0,0 +1,37 @@
1
+ import { Column } from '../../internal-types';
2
+ /**
3
+ * What one value of a column looks like in JSON, as an API sends a row: dates
4
+ * and times as ISO text, a decimal as a string, binary as base64.
5
+ */
6
+ export type JsonShapeKind = 'boolean' | 'integer' | 'number' | 'string' | 'uuid' | 'guid' | 'date' | 'time' | 'naiveDateTime' | 'offsetDateTime' | 'base64' | 'json' | 'enum' | 'ipv4' | 'ipv6' | 'null';
7
+ export type JsonShape = {
8
+ kind: JsonShapeKind;
9
+ /** An integer's least value; null where the column sets none. */
10
+ minimum: number | null;
11
+ /**
12
+ * An integer's greatest value; null for a 64-bit one, whose range no JSON
13
+ * number holds exactly, so each language writes its own safe bound or none.
14
+ */
15
+ maximum: number | null;
16
+ /** A character type's declared length, which a shorter value meets too. */
17
+ maxLength: number | null;
18
+ /** An ENUM's members as a row holds them, each once, in the type's order. */
19
+ members: string[];
20
+ /** A PostgreSQL array's dimensions, each one a JSON array around the last. */
21
+ arrayDepth: number;
22
+ };
23
+ /**
24
+ * A column's value in the JSON shape, the one reading the Zod, JSON Schema
25
+ * and TypeScript generators share, so their types agree column by column.
26
+ */
27
+ export declare function getJsonShape(dataType: string, database: number): JsonShape;
28
+ /** A primary key takes no NULL, its NN flag set or not, as in every generator. */
29
+ export declare function isNullableColumn(column: Column): boolean;
30
+ /**
31
+ * A name TypeScript refuses for an interface or a type alias gets an
32
+ * underscore after it; any other name is written as the name cases give it.
33
+ */
34
+ export declare function toTypeScriptTypeName(name: string): string;
35
+ /** A key bare where TypeScript reads an identifier, else a string literal. */
36
+ export declare function toTypeScriptPropertyKey(name: string): string;
37
+ //# sourceMappingURL=jsonShape.d.ts.map
@@ -2,4 +2,5 @@ import { RootState } from '../../engine/state';
2
2
  import { FormatTableOptions } from './utils';
3
3
  export declare function createCode(state: RootState): string;
4
4
  export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
5
+ export declare function toKotlinName(name: string): string;
5
6
  //# sourceMappingURL=kotlin.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { RootState } from '../../engine/state';
2
+ import { FormatTableOptions } from './utils';
3
+ export declare function createCode(state: RootState): string;
4
+ export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
5
+ //# sourceMappingURL=mermaid.d.ts.map
@@ -0,0 +1,28 @@
1
+ import { RootState } from '../../engine/state';
2
+ import { Table } from '../../internal-types';
3
+ import { FormatTableOptions } from './utils';
4
+ /**
5
+ * PHP takes declare(strict_types=1) only as the first statement, so the text
6
+ * opens on the tag with nothing before it, not even the blank line the other
7
+ * languages open with.
8
+ */
9
+ export declare const PHP_HEADER: readonly string[];
10
+ export declare const INDENT = " ";
11
+ export declare function createCode(state: RootState): string;
12
+ /** One table's class under the header, which a file of its own needs. */
13
+ export declare function createTableCode(state: RootState, table: Table): string;
14
+ export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
15
+ /** A PostgreSQL array type, which pdo_pgsql reads as a text literal such as {1,2}. */
16
+ export declare function isPostgresArray(dataType: string, database: number): boolean;
17
+ /**
18
+ * A name PHP refuses for a class, in any letter case, gets an underscore
19
+ * after it, as nikic/PHP-Parser names its List_ and Match_ nodes.
20
+ */
21
+ export declare function toClassName(name: string): string;
22
+ /**
23
+ * A comment as a doc block, one line or several: a line comment would end at
24
+ * a ?> in the text and leave PHP, where a block runs on to its close, which a
25
+ * star and a slash in the text would write early.
26
+ */
27
+ export declare function formatDocComment(buffer: string[], indent: string, comment: string): void;
28
+ //# sourceMappingURL=php.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { RootState } from '../../engine/state';
2
+ import { FormatTableOptions } from './utils';
3
+ export declare const INDENT = " ";
4
+ /** Every keyword of edition 2015 to 2024 a raw identifier takes. */
5
+ export declare const RUST_KEYWORDS: ReadonlySet<string>;
6
+ export declare function createCode(state: RootState): string;
7
+ export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
8
+ /** A keyword as a raw identifier, or with an underscore after it where rustc takes none. */
9
+ export declare function toRustIdentifier(name: string): string;
10
+ export declare function toStructName(name: string): string;
11
+ /** A comment as line comments, its bidirectional controls written as escapes. */
12
+ export declare function formatComment(buffer: string[], indent: string, comment: string): void;
13
+ //# sourceMappingURL=rust.d.ts.map
@@ -0,0 +1,44 @@
1
+ /** The Rust value a column's element holds, which each generator spells its own way. */
2
+ export type RustScalar = 'bool' | 'i8' | 'i16' | 'i32' | 'i64' | 'u8' | 'u16' | 'u32' | 'u64' | 'f32' | 'f64' | 'decimal' | 'string' | 'bytes' | 'uuid' | 'json' | 'date' | 'time' | 'dateTime' | 'dateTimeUtc' | 'dateTimeOffset';
3
+ /**
4
+ * Each scalar by its full path, so a struct compiles with no use statement
5
+ * and beside a struct of any of these last names.
6
+ */
7
+ export declare const RUST_SCALAR_PATHS: Readonly<Record<RustScalar, string>>;
8
+ export type RustColumnType = {
9
+ scalar: RustScalar;
10
+ /** The field type with one Vec a PostgreSQL array dimension, by full paths. */
11
+ rust: string;
12
+ /**
13
+ * The element's type name, lower case, its arguments gone, and on MySQL and
14
+ * MariaDB its UNSIGNED and ZEROFILL too.
15
+ */
16
+ base: string;
17
+ /** The element's arguments when all are numbers: numeric(10,2) gives [10, 2]. */
18
+ args: number[];
19
+ arrayDepth: number;
20
+ /** MySQL and MariaDB: UNSIGNED, ZEROFILL or SERIAL in the type. */
21
+ isUnsigned: boolean;
22
+ isFloat: boolean;
23
+ /**
24
+ * PostgreSQL alone: the type sqlx reads the column through, cast, where it
25
+ * reads the column's own type into no Rust type here; null elsewhere.
26
+ */
27
+ selectAs: string | null;
28
+ /**
29
+ * The element as an entity declares it: a PostgreSQL array of more than one
30
+ * dimension, which neither sqlx nor SeaORM decodes, is a string read as text.
31
+ */
32
+ entityScalar: RustScalar;
33
+ };
34
+ /** PostgreSQL's character types, which sqlx reads into a String as they are. */
35
+ export declare const POSTGRES_CHARACTER_TYPES: ReadonlySet<string>;
36
+ /**
37
+ * The shared column classifier with the choices sqlx makes for Rust on top: an
38
+ * Oracle, Snowflake or SQLite integer keeps the width its name declares, and a
39
+ * MySQL SIGNED stays in the name, which keeps it from every rule by name.
40
+ */
41
+ export declare function getRustColumnType(dataType: string, database: number): RustColumnType;
42
+ /** A type inside one Vec per dimension. */
43
+ export declare function wrapVec(type: string, depth: number): string;
44
+ //# sourceMappingURL=rustTypes.d.ts.map
@@ -2,4 +2,5 @@ import { RootState } from '../../engine/state';
2
2
  import { FormatTableOptions } from './utils';
3
3
  export declare function createCode(state: RootState): string;
4
4
  export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
5
+ export declare function toScalaName(name: string): string;
5
6
  //# sourceMappingURL=scala.d.ts.map
@@ -0,0 +1,22 @@
1
+ import { RootState } from '../../engine/state';
2
+ import { Table } from '../../internal-types';
3
+ type EntityColumnType = {
4
+ type: string;
5
+ columnType: string | null;
6
+ selectAs: string | null;
7
+ saveAs: string | null;
8
+ isFloat: boolean;
9
+ };
10
+ export declare function createCode(state: RootState): string;
11
+ /** One table's entity as its module file holds it, named in the whole document. */
12
+ export declare function createTableCode(state: RootState, table: Table): string;
13
+ /** The column name DeriveEntityModel gives a field it reads without column_name. */
14
+ export declare function derivedColumnName(field: string): string;
15
+ /** UpperCamelCase applied until it stops changing: aBC gives ABc, then ABc. */
16
+ export declare function stableUpperCamelCase(value: string): string;
17
+ /** A Rust string literal rustc takes for any text. */
18
+ export declare function rustString(value: string): string;
19
+ /** The field type, column_type, select_as and save_as an entity writes. */
20
+ export declare function getEntityColumnType(dataType: string, database: number): EntityColumnType;
21
+ export {};
22
+ //# sourceMappingURL=seaorm.d.ts.map
@@ -0,0 +1,44 @@
1
+ import { RootState } from '../../engine/state';
2
+ import { Table } from '../../internal-types';
3
+ import { FormatTableOptions } from './utils';
4
+ /**
5
+ * Date, Data, Decimal and UUID need Foundation, and an unused import draws no
6
+ * warning, so the text and the one-table view open on it whatever they hold.
7
+ */
8
+ export declare const SWIFT_HEADER: readonly string[];
9
+ export declare const INDENT = " ";
10
+ /**
11
+ * A nonisolated struct keeps its conformances usable off the main actor in a
12
+ * module whose default isolation is MainActor, as new Xcode app targets set.
13
+ */
14
+ export declare const STRUCT_HEAD = "nonisolated struct";
15
+ export declare const CONFORMANCES = "Codable, Hashable, Sendable";
16
+ /** The words the Swift lexer reserves, which a name takes only in backticks. */
17
+ export declare const SWIFT_KEYWORDS: ReadonlySet<string>;
18
+ /**
19
+ * The types and protocols the output writes unqualified: a struct of one of
20
+ * these names breaks the conformances or silently retypes every such field.
21
+ */
22
+ export declare const TYPE_NAMES: ReadonlySet<string>;
23
+ export declare function createCode(state: RootState): string;
24
+ /** One table's struct under the import, which a file of its own needs. */
25
+ export declare function createTableCode(state: RootState, table: Table): string;
26
+ export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
27
+ /** A column's Swift type, one array a PostgreSQL dimension, without its optional. */
28
+ export declare function swiftType(dataType: string, database: number): string;
29
+ /** A type name gets an underscore after it, and a keyword backticks. */
30
+ export declare function toStructName(name: string): string;
31
+ /** A property's coding key, an underscore after a name the keys reserve. */
32
+ export declare function toPropertyKey(name: string): string;
33
+ export declare function toPropertyName(key: string): string;
34
+ /**
35
+ * A Swift string literal: a quote and a backslash, which would also open an
36
+ * interpolation, get a backslash, and every C0 control and DEL an escape.
37
+ */
38
+ export declare function toStringLiteral(value: string): string;
39
+ /**
40
+ * A comment as documentation lines, split at every line terminator, since a
41
+ * lone CR ends a line comment; a NUL, which Swift warns about, is an escape.
42
+ */
43
+ export declare function formatComment(buffer: string[], indent: string, comment: string): void;
44
+ //# sourceMappingURL=swift.d.ts.map
@@ -15,7 +15,26 @@ export interface FormatRelationOptions {
15
15
  }
16
16
  export declare const hasOneRelationship: (value: number) => boolean;
17
17
  export declare const hasNRelationship: (value: number) => boolean;
18
+ /** The ECMAScript line terminators, CR LF one of them, where a line comment ends. */
19
+ export declare const LINE_TERMINATOR: RegExp;
18
20
  export declare function getPrimitiveType(dataType: string, database: number): PrimitiveType;
21
+ /** The vendor list entry a data type names, the longest that prefixes it. */
22
+ export declare function findDataTypeHint(dataType: string, database: number): DataTypeHint | undefined;
23
+ /**
24
+ * The precision and scale of an Oracle or Snowflake NUMBER with a scale, which
25
+ * the vendor lists file under long with every other NUMBER; a star is 38.
26
+ */
27
+ export declare function fractionalNumber(dataType: string, database: number): [precision: number, scale: number] | null;
28
+ /** The type name in lower case, with its argument lists and extra spaces gone. */
29
+ export declare function baseTypeName(dataType: string): string;
30
+ /** A text split into its lines at every ECMAScript line terminator. */
31
+ export declare function splitLines(value: string): string[];
32
+ /**
33
+ * A line comment's text with a backslash before its at sign where it opens with
34
+ * one and ts-, after any white space and in any case, so the line stays legible
35
+ * and TypeScript reads no directive in it, which would hide or expect an error.
36
+ */
37
+ export declare function escapeTypeScriptDirective(line: string): string;
19
38
  export declare function getDataTypeHints(database: number): DataTypeHint[];
20
39
  export declare function getNameCase(name: string, nameCase: number): string;
21
40
  export type ReferentialActionEntry = {
@@ -0,0 +1,25 @@
1
+ import { RootState } from '../../engine/state';
2
+ import { Table } from '../../internal-types';
3
+ import { JsonShape } from './jsonShape';
4
+ import { FormatTableOptions } from './utils';
5
+ /** Every table's row schema and its inferred type, under one import line. */
6
+ export declare function createCode(state: RootState): string;
7
+ /** One table under the import line, so its file compiles on its own. */
8
+ export declare function createTableCode(state: RootState, table: Table): string;
9
+ export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
10
+ /** A value's Zod schema, one z.array around it for each array dimension. */
11
+ export declare function toZodSchema(shape: JsonShape): string;
12
+ /**
13
+ * A name a type alias may not take, z included, gets an underscore after it;
14
+ * any other name, one that is no identifier or a repeated one included, is
15
+ * written as is.
16
+ */
17
+ export declare function toZodTypeName(name: string): string;
18
+ /**
19
+ * A property key as an object literal writes it; __proto__ is computed, since
20
+ * written plainly or quoted it would set the object's prototype instead.
21
+ */
22
+ export declare function toZodPropertyKey(name: string): string;
23
+ /** A comment as line comments, one for each of its lines, none a TypeScript directive. */
24
+ export declare function formatComment(buffer: string[], indent: string, comment: string): void;
25
+ //# sourceMappingURL=zod.d.ts.map
@@ -11,12 +11,21 @@ export declare const animationFrames$: Observable<{
11
11
  elapsed: number;
12
12
  }>;
13
13
  export declare const moveStart$: Observable<MouseEvent | TouchEvent>;
14
+ /**
15
+ * The middle presses a scene pan stopped below a target, read off the forward
16
+ * each one hands the move stream: a listener above the stage container that
17
+ * closes on any press hears a middle press there only this way.
18
+ *
19
+ * @example
20
+ * addUnsubscribe(middlePanPress$(root).subscribe(handleOutsidePress));
21
+ */
22
+ export declare function middlePanPress$(target: EventTarget): Observable<MouseEvent>;
14
23
  /**
15
24
  * A gesture also ends wherever the browser takes the pointer away: a native
16
25
  * drag swallows the rest of the stream, a cancelled pointer never lifts, and a
17
26
  * blurred window never sees the mouseup, each leaving drag$ subscribed.
18
27
  */
19
- export declare const moveEnd$: Observable<MouseEvent | TouchEvent | DragEvent | PointerEvent | FocusEvent>;
28
+ export declare const moveEnd$: Observable<MouseEvent | TouchEvent | FocusEvent | PointerEvent | DragEvent>;
20
29
  export type DragMove = {
21
30
  movementX: number;
22
31
  movementY: number;
@@ -0,0 +1,29 @@
1
+ import { TextRange } from './find-replace';
2
+ /** A stretch of the text, lit or plain; the chunks of one text run end to end. */
3
+ type Chunk = TextRange & {
4
+ highlight: boolean;
5
+ };
6
+ export type FindChunksArgs = {
7
+ searchWords: string[];
8
+ textToHighlight: string;
9
+ /** Whether a word lights only its own letter case; false when left out. */
10
+ caseSensitive?: boolean;
11
+ };
12
+ export type FindAllArgs = FindChunksArgs & {
13
+ /** Where the text holds the words, findChunks when left out; the ranges may overlap and come in any order. */
14
+ findChunks?: (args: FindChunksArgs) => TextRange[];
15
+ };
16
+ /**
17
+ * Where the text holds each word, word by word and left to right, a match
18
+ * starting only past the end of that word's last one: a word is read as typed,
19
+ * never as a regular expression, and an empty one holds nothing.
20
+ */
21
+ export declare function findChunks({ searchWords, textToHighlight, caseSensitive, }: FindChunksArgs): TextRange[];
22
+ /**
23
+ * The whole text as chunks: one lit chunk for each run of matches that overlap
24
+ * or touch, so two words side by side light as one, and plain chunks between
25
+ * them. An empty text has none.
26
+ */
27
+ export declare function findAll({ searchWords, textToHighlight, caseSensitive, findChunks: find, }: FindAllArgs): Chunk[];
28
+ export {};
29
+ //# sourceMappingURL=highlightWords.d.ts.map
@@ -1,8 +1,7 @@
1
- import { EntityMeta, Memo, Point, Settings, Table } from '../internal-types';
1
+ import { Memo, Point, Settings, Table } from '../internal-types';
2
2
  export declare const nextZIndex: (tables: Table[], memos: Memo[]) => number;
3
3
  export declare function nextPoint(settings: Settings, tables: Table[], memos: Memo[]): Point;
4
4
  export declare const toList: <T>(ids: string[], entities: Record<string, T>) => Array<T>;
5
- export declare function getDefaultEntityMeta(): EntityMeta;
6
5
  export declare function safeRange(a: number, b: number): number[];
7
6
  export declare function pascalCase(value?: string): string;
8
7
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,9 @@
1
+ /** A handler per shortcut, whose presses of a sequence a space separates. */
2
+ export type KeyBindingHandlers = Record<string, (event: KeyboardEvent) => void>;
3
+ /**
4
+ * Calls each shortcut's handler on the target's keydown that completes it and
5
+ * returns the unbinding. A modifier's own keydown keeps a sequence going; any
6
+ * other miss, or a second with no keydown, sends it back to its first press.
7
+ */
8
+ export declare function bindKeys(target: EventTarget, handlers: KeyBindingHandlers): () => void;
9
+ //# sourceMappingURL=bindKeys.d.ts.map
@@ -1,5 +1,6 @@
1
1
  import { ValuesType } from '../../internal-types';
2
2
  import { KeyBindingPress } from './utils';
3
+ export { bindKeys, type KeyBindingHandlers } from './bindKeys';
3
4
  export type ShortcutOption = {
4
5
  shortcut: string;
5
6
  preventDefault?: boolean;
@@ -17,6 +18,7 @@ export declare const KeyBindingName: {
17
18
  readonly addMemo: "addMemo";
18
19
  readonly removeTable: "removeTable";
19
20
  readonly removeColumn: "removeColumn";
21
+ readonly removeSelection: "removeSelection";
20
22
  readonly primaryKey: "primaryKey";
21
23
  readonly selectAllTable: "selectAllTable";
22
24
  readonly selectAllColumn: "selectAllColumn";
@@ -33,13 +35,18 @@ export declare const KeyBindingName: {
33
35
  readonly zenMode: "zenMode";
34
36
  };
35
37
  export type KeyBindingName = ValuesType<typeof KeyBindingName>;
36
- export declare const KeyBindingNameList: ("undo" | "redo" | "selectAllColumn" | "search" | "stop" | "primaryKey" | "edit" | "addMemo" | "addTable" | "removeTable" | "addColumn" | "removeColumn" | "findReplace" | "selectAllTable" | "relationshipZeroOne" | "relationshipZeroN" | "relationshipOneOnly" | "relationshipOneN" | "tableProperties" | "focusView" | "zoomIn" | "zoomOut" | "zoomReset" | "handTool" | "zenMode")[];
38
+ export declare const KeyBindingNameList: ("undo" | "redo" | "selectAllColumn" | "search" | "stop" | "primaryKey" | "edit" | "addMemo" | "addTable" | "removeTable" | "addColumn" | "removeColumn" | "findReplace" | "removeSelection" | "selectAllTable" | "relationshipZeroOne" | "relationshipZeroN" | "relationshipOneOnly" | "relationshipOneN" | "tableProperties" | "focusView" | "zoomIn" | "zoomOut" | "zoomReset" | "handTool" | "zenMode")[];
39
+ /**
40
+ * The chords a press inside a floating panel still carries to the editor:
41
+ * Find and Replace's own, search, the document's undo and redo, and the zoom.
42
+ */
43
+ export declare const PANEL_PASSING_BINDINGS: ReadonlyArray<KeyBindingName>;
37
44
  export type KeyBindingMap = Record<KeyBindingName, ShortcutOption[]>;
38
45
  export declare const createKeyBindingMap: () => KeyBindingMap;
39
46
  /**
40
- * Whether the press is one of the chords given, read the way tinykeys reads a
41
- * binding: the key by its code or its value, every modifier named held down and
42
- * no other. A sequence of presses never matches a single one.
47
+ * Whether the press is one of the chords given, matched as bindKeys matches a
48
+ * press, so a panel reads a binding as the editor root does. A sequence of
49
+ * presses never matches a single one.
43
50
  */
44
51
  export declare function matchesShortcut(event: KeyboardEvent, options: ReadonlyArray<ShortcutOption>): boolean;
45
52
  export declare function shortcutToTuple(shortcut?: string): KeyBindingPress[];
@@ -1,3 +1,24 @@
1
+ import { ValuesType } from '../../internal-types';
1
2
  export type KeyBindingPress = [string[], string];
3
+ /** The modifiers that change what a press means; AltGraph is read through them. */
4
+ export declare const ModifierKey: {
5
+ readonly Shift: "Shift";
6
+ readonly Meta: "Meta";
7
+ readonly Alt: "Alt";
8
+ readonly Control: "Control";
9
+ };
10
+ export type ModifierKey = ValuesType<typeof ModifierKey>;
2
11
  export declare function parseKeybinding(str: string): KeyBindingPress[];
12
+ /**
13
+ * Whether the modifier is held, AltGraph counting as the ones it aliases. A
14
+ * keydown Chrome sends for a function key may lack getModifierState, and then
15
+ * holds nothing.
16
+ */
17
+ export declare function isModifierHeld(event: KeyboardEvent, mod: string): boolean;
18
+ /**
19
+ * Whether the event is the press: the key by its value in any case or by its
20
+ * code, every modifier the press names held, and no other modifier unless it
21
+ * is the key itself.
22
+ */
23
+ export declare function matchesPress(event: KeyboardEvent, [mods, key]: KeyBindingPress): boolean;
3
24
  //# sourceMappingURL=utils.d.ts.map