@dineug/erd-editor 3.4.0 → 3.6.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 (440) hide show
  1. package/README.md +41 -10
  2. package/dist/components/appContext.d.ts +9 -1
  3. package/dist/components/customElementRegistry.d.ts +1 -0
  4. package/dist/components/erd/Erd.d.ts +1 -0
  5. package/dist/components/erd/Erd.styles.d.ts +1 -0
  6. package/dist/components/erd/automatic-table-placement/AutomaticTablePlacement.d.ts +16 -0
  7. package/dist/components/erd/automatic-table-placement/AutomaticTablePlacement.styles.d.ts +1 -0
  8. package/dist/components/erd/automatic-table-placement/createAutomaticTablePlacement.d.ts +18 -1
  9. package/dist/components/erd/canvas/Canvas.d.ts +6 -0
  10. package/dist/components/erd/canvas/Canvas.styles.d.ts +12 -0
  11. package/dist/components/erd/canvas/CanvasScene.d.ts +19 -0
  12. package/dist/components/erd/canvas/EditOverlay.d.ts +9 -0
  13. package/dist/components/erd/canvas/EditOverlay.styles.d.ts +7 -0
  14. package/dist/components/erd/canvas/SceneIcon.template.d.ts +22 -0
  15. package/dist/components/erd/canvas/altDragDuplicate.d.ts +1 -0
  16. package/dist/components/erd/canvas/drag-select/DragSelect.d.ts +12 -0
  17. package/dist/components/erd/canvas/draw-relationship/DrawRelationship.d.ts +1 -0
  18. package/dist/components/erd/canvas/duplicate-ghost/DuplicateGhost.d.ts +6 -0
  19. package/dist/components/erd/canvas/entityDrag.d.ts +7 -0
  20. package/dist/components/erd/canvas/high-level-table/HighLevelTable.d.ts +5 -0
  21. package/dist/components/erd/canvas/memo/Memo.d.ts +3 -0
  22. package/dist/components/erd/canvas/memo/memo-sash/MemoSash.d.ts +12 -1
  23. package/dist/components/erd/canvas/memo/memoCaret.d.ts +27 -0
  24. package/dist/components/erd/canvas/memo/memoScroll.d.ts +29 -0
  25. package/dist/components/erd/canvas/memo/memoText.d.ts +34 -0
  26. package/dist/components/erd/canvas/memo/useMoveMemo.d.ts +7 -0
  27. package/dist/components/erd/canvas/relationship-group/RelationshipGroup.d.ts +16 -0
  28. package/dist/components/erd/canvas/{canvas-svg → relationship-group}/relationship/Relationship.d.ts +1 -0
  29. package/dist/components/erd/canvas/relationship-group/relationship/Relationship.template.d.ts +18 -0
  30. package/dist/components/erd/canvas/sceneHit.d.ts +19 -0
  31. package/dist/components/erd/canvas/sceneKind.d.ts +12 -0
  32. package/dist/components/erd/canvas/sceneRetention.d.ts +32 -0
  33. package/dist/components/erd/canvas/sceneTokens.d.ts +68 -0
  34. package/dist/components/erd/canvas/shared-drag-select/SharedDragSelect.d.ts +5 -0
  35. package/dist/components/erd/canvas/shared-mouse-tracker/SharedMouseTracker.d.ts +2 -0
  36. package/dist/components/erd/canvas/shared-mouse-tracker/shared-mouse-cursor/SharedMouseCursor.d.ts +6 -0
  37. package/dist/components/erd/canvas/table/Table.d.ts +9 -0
  38. package/dist/components/erd/canvas/table/cellLayout.d.ts +64 -0
  39. package/dist/components/erd/canvas/table/column/Column.d.ts +17 -6
  40. package/dist/components/erd/canvas/table/doubleClick.d.ts +15 -0
  41. package/dist/components/erd/canvas/table/useFocusTable.d.ts +1 -0
  42. package/dist/components/erd/canvas/table/useMoveTable.d.ts +2 -1
  43. package/dist/components/erd/canvas/table/useSharedFocusTable.d.ts +1 -0
  44. package/dist/components/erd/canvas/useMoveEntity.d.ts +19 -0
  45. package/dist/components/erd/canvas/useSharedSelectEntity.d.ts +1 -0
  46. package/dist/components/erd/content-compass/ContentCompass.d.ts +10 -0
  47. package/dist/components/erd/content-compass/ContentCompass.styles.d.ts +3 -0
  48. package/dist/components/erd/content-compass/compassGeometry.d.ts +24 -0
  49. package/dist/components/erd/diff-viewer/DiffViewer.d.ts +1 -0
  50. package/dist/components/erd/diff-viewer/DiffViewer.styles.d.ts +1 -0
  51. package/dist/components/erd/diff-viewer/diff.d.ts +1 -0
  52. package/dist/components/erd/diff-viewer/erd-viewer/ErdViewer.d.ts +1 -0
  53. package/dist/components/erd/diff-viewer/erd-viewer/ErdViewer.styles.d.ts +1 -0
  54. package/dist/components/erd/diff-viewer/tree-viewer/TreeViewer.d.ts +1 -0
  55. package/dist/components/erd/diff-viewer/tree-viewer/TreeViewer.styles.d.ts +1 -0
  56. package/dist/components/erd/erd-context-menu/ErdContextMenu.d.ts +2 -2
  57. package/dist/components/erd/erd-context-menu/menus/databaseMenus.d.ts +1 -0
  58. package/dist/components/erd/erd-context-menu/menus/drawRelationshipMenus.d.ts +3 -2
  59. package/dist/components/erd/erd-context-menu/menus/exportMenus.d.ts +3 -1
  60. package/dist/components/erd/erd-context-menu/menus/importMenus.d.ts +1 -0
  61. package/dist/components/erd/erd-context-menu/menus/relationshipMenus.d.ts +1 -0
  62. package/dist/components/erd/erd-context-menu/menus/showMenus.d.ts +1 -0
  63. package/dist/components/erd/erdShortcutPerformCheck.d.ts +1 -0
  64. package/dist/components/erd/floating-toolbar/FloatingToolbar.d.ts +10 -0
  65. package/dist/components/erd/floating-toolbar/FloatingToolbar.styles.d.ts +4 -0
  66. package/dist/components/erd/hitTest.d.ts +23 -0
  67. package/dist/components/erd/minimap/Minimap.d.ts +1 -0
  68. package/dist/components/erd/minimap/Minimap.styles.d.ts +1 -1
  69. package/dist/components/erd/minimap/MinimapScene.d.ts +17 -0
  70. package/dist/components/erd/minimap/memo/Memo.d.ts +8 -0
  71. package/dist/components/erd/minimap/minimapGeometry.d.ts +100 -0
  72. package/dist/components/erd/minimap/table/Table.d.ts +8 -0
  73. package/dist/components/erd/minimap/useMinimapScroll.d.ts +1 -0
  74. package/dist/components/erd/minimap/viewport/Viewport.d.ts +1 -0
  75. package/dist/components/erd/minimap/viewport/Viewport.styles.d.ts +1 -0
  76. package/dist/components/erd/table-properties/TableProperties.d.ts +1 -0
  77. package/dist/components/erd/table-properties/TableProperties.styles.d.ts +1 -0
  78. package/dist/components/erd/table-properties/table-properties-indexes/TablePropertiesIndexes.d.ts +1 -0
  79. package/dist/components/erd/table-properties/table-properties-indexes/TablePropertiesIndexes.styles.d.ts +1 -0
  80. package/dist/components/erd/table-properties/table-properties-indexes/indexes-checkbox-column/IndexesCheckboxColumn.d.ts +1 -0
  81. package/dist/components/erd/table-properties/table-properties-indexes/indexes-checkbox-column/IndexesCheckboxColumn.styles.d.ts +1 -0
  82. package/dist/components/erd/table-properties/table-properties-indexes/indexes-column/IndexesColumn.d.ts +1 -0
  83. package/dist/components/erd/table-properties/table-properties-indexes/indexes-column/IndexesColumn.styles.d.ts +1 -0
  84. package/dist/components/erd/table-properties/table-properties-indexes/indexes-index/IndexesIndex.d.ts +1 -0
  85. package/dist/components/erd/table-properties/table-properties-indexes/indexes-index/IndexesIndex.styles.d.ts +1 -0
  86. package/dist/components/erd/table-properties/table-properties-tabs/TablePropertiesTabs.d.ts +1 -0
  87. package/dist/components/erd/table-properties/table-properties-tabs/TablePropertiesTabs.styles.d.ts +1 -0
  88. package/dist/components/erd/time-travel/TimeTravel.d.ts +1 -0
  89. package/dist/components/erd/time-travel/TimeTravel.styles.d.ts +1 -0
  90. package/dist/components/erd/useErdShortcut.d.ts +1 -0
  91. package/dist/components/erd/virtual-scroll/VirtualScroll.d.ts +1 -0
  92. package/dist/components/erd/virtual-scroll/VirtualScroll.styles.d.ts +1 -0
  93. package/dist/components/erd/virtual-scroll/useVirtualScroll.d.ts +26 -0
  94. package/dist/components/erd-editor/ErdEditor.d.ts +2 -1
  95. package/dist/components/erd-editor/ErdEditor.styles.d.ts +1 -0
  96. package/dist/components/erd-editor/useErdEditorAttachElement.d.ts +1 -0
  97. package/dist/components/generator-code/GeneratorCode.d.ts +1 -0
  98. package/dist/components/generator-code/GeneratorCode.styles.d.ts +1 -0
  99. package/dist/components/generator-code/generator-code-context-menu/GeneratorCodeContextMenu.d.ts +1 -0
  100. package/dist/components/generator-code/generator-code-context-menu/menus/columnNameCaseMenus.d.ts +1 -0
  101. package/dist/components/generator-code/generator-code-context-menu/menus/languageMenus.d.ts +1 -0
  102. package/dist/components/generator-code/generator-code-context-menu/menus/tableNameCaseMenus.d.ts +1 -0
  103. package/dist/components/global-styles/GlobalStyles.d.ts +4 -12
  104. package/dist/components/primitives/button/Button.d.ts +1 -0
  105. package/dist/components/primitives/button/Button.styles.d.ts +1 -0
  106. package/dist/components/primitives/code-block/CodeBlock.d.ts +1 -0
  107. package/dist/components/primitives/code-block/CodeBlock.styles.d.ts +2 -1
  108. package/dist/components/primitives/color-picker/ColorPicker.d.ts +1 -0
  109. package/dist/components/primitives/color-picker/ColorPicker.styles.d.ts +1 -0
  110. package/dist/components/primitives/context-menu/ContextMenu.d.ts +1 -0
  111. package/dist/components/primitives/context-menu/context-menu-content/ContextMenuContent.d.ts +1 -0
  112. package/dist/components/primitives/context-menu/context-menu-content/ContextMenuContent.styles.d.ts +1 -0
  113. package/dist/components/primitives/context-menu/context-menu-item/ContextMenuItem.d.ts +1 -0
  114. package/dist/components/primitives/context-menu/context-menu-item/ContextMenuItem.styles.d.ts +1 -0
  115. package/dist/components/primitives/context-menu/context-menu-root/ContextMenuRoot.d.ts +1 -0
  116. package/dist/components/primitives/context-menu/context-menu-root/contextMenuRootContext.d.ts +1 -0
  117. package/dist/components/primitives/context-menu/menu/Menu.d.ts +1 -0
  118. package/dist/components/primitives/context-menu/menu/Menu.styles.d.ts +1 -0
  119. package/dist/components/primitives/edit-input/EditInput.d.ts +1 -0
  120. package/dist/components/primitives/edit-input/EditInput.styles.d.ts +1 -0
  121. package/dist/components/primitives/highlighted-text/HighlightedText.d.ts +1 -0
  122. package/dist/components/primitives/highlighted-text/HighlightedText.styles.d.ts +1 -0
  123. package/dist/components/primitives/icon/Icon.d.ts +1 -0
  124. package/dist/components/primitives/icon/Icon.styles.d.ts +1 -0
  125. package/dist/components/primitives/icon/icons.d.ts +55 -26
  126. package/dist/components/primitives/kbd/Kbd.d.ts +1 -0
  127. package/dist/components/primitives/kbd/Kbd.styles.d.ts +1 -0
  128. package/dist/components/primitives/sash/Sash.d.ts +1 -0
  129. package/dist/components/primitives/sash/Sash.styles.d.ts +1 -0
  130. package/dist/components/primitives/separator/Separator.d.ts +1 -0
  131. package/dist/components/primitives/separator/Separator.styles.d.ts +1 -0
  132. package/dist/components/primitives/slider/Slider.d.ts +1 -0
  133. package/dist/components/primitives/slider/Slider.styles.d.ts +1 -0
  134. package/dist/components/primitives/switch/Switch.d.ts +1 -0
  135. package/dist/components/primitives/switch/Switch.styles.d.ts +1 -0
  136. package/dist/components/primitives/text-input/TextInput.d.ts +1 -0
  137. package/dist/components/primitives/toast/Toast.d.ts +5 -0
  138. package/dist/components/primitives/toast/Toast.styles.d.ts +6 -0
  139. package/dist/components/quick-search/QuickSearch.d.ts +1 -0
  140. package/dist/components/quick-search/QuickSearch.styles.d.ts +1 -0
  141. package/dist/components/quick-search/actions.d.ts +1 -0
  142. package/dist/components/schema-sql/SchemaSQL.d.ts +1 -0
  143. package/dist/components/schema-sql/SchemaSQL.styles.d.ts +1 -0
  144. package/dist/components/schema-sql/schema-sql-context-menu/SchemaSQLContextMenu.d.ts +1 -0
  145. package/dist/components/schema-sql/schema-sql-context-menu/menus/bracketMenus.d.ts +1 -0
  146. package/dist/components/settings/Settings.d.ts +1 -0
  147. package/dist/components/settings/Settings.styles.d.ts +1 -0
  148. package/dist/components/settings/settings-lnb/SettingsLnb.d.ts +1 -0
  149. package/dist/components/settings/settings-lnb/SettingsLnb.styles.d.ts +1 -0
  150. package/dist/components/settings/shortcuts/Shortcuts.d.ts +1 -0
  151. package/dist/components/settings/shortcuts/Shortcuts.styles.d.ts +1 -0
  152. package/dist/components/{erd/canvas/table → table-view}/Table.styles.d.ts +1 -0
  153. package/dist/components/{erd/canvas/draw-relationship/DrawRelationship.styles.d.ts → table-view/column/Column.styles.d.ts} +1 -0
  154. package/dist/components/{erd/canvas/table → table-view}/column/column-data-type/ColumnDataType.d.ts +2 -1
  155. package/dist/components/{erd/canvas/table → table-view}/column/column-data-type/ColumnDataType.styles.d.ts +1 -0
  156. package/dist/components/{erd/canvas/table → table-view}/column/column-key/ColumnKey.d.ts +1 -0
  157. package/dist/components/{erd/canvas/table → table-view}/column/column-key/ColumnKey.styles.d.ts +1 -0
  158. package/dist/components/{erd/canvas/table → table-view}/column/column-not-null/ColumnNotNull.d.ts +1 -0
  159. package/dist/components/{erd/canvas/table → table-view}/column/column-not-null/ColumnNotNull.styles.d.ts +1 -0
  160. package/dist/components/{erd/canvas/table → table-view}/column/column-option/ColumnOption.d.ts +1 -0
  161. package/dist/components/{erd/canvas/table → table-view}/column/column-option/ColumnOption.styles.d.ts +1 -0
  162. package/dist/components/table-view/column/useColumnCell.d.ts +24 -0
  163. package/dist/components/theme/Theme.d.ts +1 -0
  164. package/dist/components/theme-builder/ThemeBuilder.d.ts +1 -0
  165. package/dist/components/theme-builder/ThemeBuilder.styles.d.ts +1 -0
  166. package/dist/components/themeContext.d.ts +10 -0
  167. package/dist/components/toast-container/ToastContainer.d.ts +1 -0
  168. package/dist/components/toast-container/ToastContainer.styles.d.ts +1 -0
  169. package/dist/components/toast-container/openToastWhileRunning.d.ts +12 -0
  170. package/dist/components/toolbar/Toolbar.d.ts +1 -0
  171. package/dist/components/toolbar/Toolbar.styles.d.ts +1 -0
  172. package/dist/components/visualization/Visualization.d.ts +7 -0
  173. package/dist/components/visualization/Visualization.styles.d.ts +7 -0
  174. package/dist/components/visualization/VisualizationScene.d.ts +22 -0
  175. package/dist/components/visualization/createVisualization.d.ts +68 -8
  176. package/dist/components/visualization/graph-node/GraphNode.d.ts +24 -0
  177. package/dist/components/visualization/table/Table.d.ts +1 -1
  178. package/dist/components/visualization/table/column/Column.d.ts +1 -1
  179. package/dist/components/visualization/table/column/Column.styles.d.ts +1 -0
  180. package/dist/components/visualization/visualizationView.d.ts +91 -0
  181. package/dist/constants/language.d.ts +3 -2
  182. package/dist/constants/layout.d.ts +7 -13
  183. package/dist/constants/open.d.ts +1 -0
  184. package/dist/constants/schema.d.ts +2 -1
  185. package/dist/constants/sql/dataType/Databricks.d.ts +1 -0
  186. package/dist/constants/sql/dataType/MSSQL.d.ts +1 -0
  187. package/dist/constants/sql/dataType/MariaDB.d.ts +1 -0
  188. package/dist/constants/sql/dataType/MySQL.d.ts +1 -0
  189. package/dist/constants/sql/dataType/Oracle.d.ts +1 -0
  190. package/dist/constants/sql/dataType/PostgreSQL.d.ts +1 -0
  191. package/dist/constants/sql/dataType/SQLite.d.ts +1 -0
  192. package/dist/constants/sql/dataType/Snowflake.d.ts +1 -0
  193. package/dist/constants/sql/dataType/index.d.ts +1 -0
  194. package/dist/constants/sql/database.d.ts +1 -0
  195. package/dist/engine/actions.d.ts +1 -0
  196. package/dist/engine/clock.d.ts +1 -0
  197. package/dist/engine/context.d.ts +1 -0
  198. package/dist/engine/generator.actions.d.ts +1 -0
  199. package/dist/engine/history.actions.d.ts +1 -0
  200. package/dist/engine/history.d.ts +1 -0
  201. package/dist/engine/hooks.d.ts +1 -0
  202. package/dist/engine/index.d.ts +1 -0
  203. package/dist/engine/index.js +44 -0
  204. package/dist/engine/modules/editor/actions.d.ts +21 -0
  205. package/dist/engine/modules/editor/atom.actions.d.ts +92 -0
  206. package/dist/engine/modules/editor/generator.actions.d.ts +1 -0
  207. package/dist/engine/modules/editor/history.d.ts +1 -0
  208. package/dist/engine/modules/editor/state.d.ts +31 -0
  209. package/dist/engine/modules/editor/utils/duplicate.d.ts +5 -2
  210. package/dist/engine/modules/editor/utils/findRelationshipColumn.d.ts +1 -0
  211. package/dist/engine/modules/editor/utils/focus.d.ts +1 -0
  212. package/dist/engine/modules/editor/utils/selectRangeColumn.d.ts +1 -0
  213. package/dist/engine/modules/index/actions.d.ts +1 -0
  214. package/dist/engine/modules/index/atom.actions.d.ts +1 -0
  215. package/dist/engine/modules/index/generator.actions.d.ts +1 -0
  216. package/dist/engine/modules/index/history.d.ts +1 -0
  217. package/dist/engine/modules/index-column/actions.d.ts +1 -0
  218. package/dist/engine/modules/index-column/atom.actions.d.ts +1 -0
  219. package/dist/engine/modules/index-column/generator.actions.d.ts +1 -0
  220. package/dist/engine/modules/index-column/history.d.ts +1 -0
  221. package/dist/engine/modules/memo/actions.d.ts +1 -0
  222. package/dist/engine/modules/memo/atom.actions.d.ts +1 -0
  223. package/dist/engine/modules/memo/generator.actions.d.ts +1 -0
  224. package/dist/engine/modules/memo/history.d.ts +1 -0
  225. package/dist/engine/modules/relationship/actions.d.ts +1 -0
  226. package/dist/engine/modules/relationship/atom.actions.d.ts +1 -0
  227. package/dist/engine/modules/relationship/generator.actions.d.ts +1 -0
  228. package/dist/engine/modules/relationship/history.d.ts +1 -0
  229. package/dist/engine/modules/relationship/hooks.d.ts +1 -0
  230. package/dist/engine/modules/settings/actions.d.ts +3 -7
  231. package/dist/engine/modules/settings/atom.actions.d.ts +46 -32
  232. package/dist/engine/modules/settings/generator.actions.d.ts +1 -0
  233. package/dist/engine/modules/settings/history.d.ts +1 -1
  234. package/dist/engine/modules/settings/scrollRange.d.ts +18 -0
  235. package/dist/engine/modules/table/actions.d.ts +1 -0
  236. package/dist/engine/modules/table/atom.actions.d.ts +1 -0
  237. package/dist/engine/modules/table/generator.actions.d.ts +1 -0
  238. package/dist/engine/modules/table/history.d.ts +1 -0
  239. package/dist/engine/modules/table/hooks.d.ts +1 -0
  240. package/dist/engine/modules/table-column/actions.d.ts +1 -0
  241. package/dist/engine/modules/table-column/atom.actions.d.ts +1 -0
  242. package/dist/engine/modules/table-column/generator.actions.d.ts +1 -0
  243. package/dist/engine/modules/table-column/history.d.ts +1 -0
  244. package/dist/engine/modules/table-column/hooks.d.ts +1 -0
  245. package/dist/engine/modules/table-column/utils/dataType.d.ts +1 -0
  246. package/dist/engine/replication-store.d.ts +1 -0
  247. package/dist/engine/rx-operators/actionsFilter.d.ts +1 -0
  248. package/dist/engine/rx-operators/bufferCircuitBreaker.d.ts +1 -0
  249. package/dist/engine/rx-operators/groupByStreamActions.d.ts +1 -0
  250. package/dist/engine/rx-operators/ignoreTagFilter.d.ts +1 -0
  251. package/dist/engine/rx-operators/index.d.ts +1 -0
  252. package/dist/engine/rx-operators/notEmptyActions.d.ts +1 -0
  253. package/dist/engine/rx-operators/readonlyIgnoreFilter.d.ts +1 -0
  254. package/dist/engine/rx-operators/sharedStreamActionsCompressor.d.ts +1 -0
  255. package/dist/engine/rx-store.d.ts +1 -0
  256. package/dist/engine/shared-store.d.ts +1 -0
  257. package/dist/engine/state.d.ts +1 -0
  258. package/dist/engine/store-hooks.d.ts +1 -0
  259. package/dist/engine/store.d.ts +1 -0
  260. package/dist/engine/tag.d.ts +1 -0
  261. package/dist/erd-editor.umd.js +5259 -0
  262. package/dist/hooks/useDarkMode.d.ts +1 -0
  263. package/dist/hooks/useFlipAnimation.d.ts +1 -0
  264. package/dist/hooks/useKeyBindingMap.d.ts +1 -0
  265. package/dist/hooks/useUnmounted.d.ts +1 -0
  266. package/dist/index.d.ts +1 -0
  267. package/dist/index.dev.d.ts +1 -0
  268. package/dist/index.js +19991 -0
  269. package/dist/internal-types/index.d.ts +1 -0
  270. package/dist/konva/batchDraw.d.ts +42 -0
  271. package/dist/konva/host.d.ts +30 -0
  272. package/dist/konva/jsx-types.test-d.d.ts +2 -0
  273. package/dist/konva/scene/columnDropTarget.d.ts +14 -0
  274. package/dist/konva/scene/contentBounds.d.ts +29 -0
  275. package/dist/konva/scene/konvaFlip.d.ts +19 -0
  276. package/dist/konva/scene/metrics.d.ts +30 -0
  277. package/dist/konva/scene/renderScene.d.ts +35 -0
  278. package/dist/konva/scene/viewFreeze.d.ts +20 -0
  279. package/dist/konva/scene/viewport.d.ts +45 -0
  280. package/dist/konva/testHandle.d.ts +23 -0
  281. package/dist/konva/theme.d.ts +32 -0
  282. package/dist/konva/workerDomStubs.d.ts +2 -0
  283. package/dist/schemaGCService--wGet5O7.js +9636 -0
  284. package/dist/services/export-png/ExportScene.d.ts +16 -0
  285. package/dist/services/export-png/documentScene.d.ts +33 -0
  286. package/dist/services/export-png/exportBox.d.ts +27 -0
  287. package/dist/services/export-png/exportPng.shared-worker.d.ts +1 -0
  288. package/dist/services/export-png/exportPngService.d.ts +25 -0
  289. package/dist/services/export-png/index.d.ts +55 -0
  290. package/dist/services/export-png/pixelRatio.d.ts +22 -0
  291. package/dist/services/export-png/renderPng.d.ts +40 -0
  292. package/dist/services/export-png/textWidth.d.ts +28 -0
  293. package/dist/services/schema-gc/index.d.ts +9 -1
  294. package/dist/services/schema-gc/procGC.d.ts +1 -0
  295. package/dist/services/schema-gc/schemaGC.shared-worker.d.ts +1 -0
  296. package/dist/services/schema-gc/schemaGCService.d.ts +1 -0
  297. package/dist/services/shikiService.d.ts +1 -0
  298. package/dist/styles/colorPicker.style.d.ts +4 -7
  299. package/dist/styles/fonts.styles.d.ts +2 -1
  300. package/dist/styles/reset.styles.d.ts +2 -1
  301. package/dist/styles/scrollbar.styles.d.ts +4 -3
  302. package/dist/styles/typography.styles.d.ts +2 -1
  303. package/dist/themes/radix-ui-theme.config.d.ts +1 -0
  304. package/dist/themes/radix-ui-theme.d.ts +1 -0
  305. package/dist/themes/tokens.d.ts +5 -0
  306. package/dist/utils/arrayHas.d.ts +3 -0
  307. package/dist/utils/attribute.d.ts +1 -0
  308. package/dist/utils/bit.d.ts +1 -0
  309. package/dist/utils/calcMemo.d.ts +1 -0
  310. package/dist/utils/calcTable.d.ts +2 -1
  311. package/dist/utils/clipboard.d.ts +1 -0
  312. package/dist/utils/collection/index.entity.d.ts +1 -0
  313. package/dist/utils/collection/indexColumn.entity.d.ts +1 -0
  314. package/dist/utils/collection/memo.entity.d.ts +1 -0
  315. package/dist/utils/collection/relationship.entity.d.ts +1 -0
  316. package/dist/utils/collection/sequence.d.ts +1 -0
  317. package/dist/utils/collection/table.entity.d.ts +1 -0
  318. package/dist/utils/collection/tableColumn.entity.d.ts +1 -0
  319. package/dist/utils/device-detect/index.d.ts +1 -0
  320. package/dist/utils/domEvent.d.ts +1 -0
  321. package/dist/utils/dragSelect.d.ts +1 -8
  322. package/dist/utils/draw-relationship/calc.d.ts +1 -0
  323. package/dist/utils/draw-relationship/chamfer.d.ts +1 -0
  324. package/dist/utils/draw-relationship/draw.d.ts +1 -0
  325. package/dist/utils/draw-relationship/incremental.d.ts +71 -0
  326. package/dist/utils/draw-relationship/index.d.ts +48 -42
  327. package/dist/utils/draw-relationship/nudge.d.ts +3 -1
  328. package/dist/utils/draw-relationship/pathFinding.d.ts +4 -5
  329. package/dist/utils/draw-relationship/route.d.ts +5 -9
  330. package/dist/utils/draw-relationship/sort.d.ts +1 -0
  331. package/dist/utils/draw-relationship/stub.d.ts +6 -16
  332. package/dist/utils/emitter.d.ts +17 -0
  333. package/dist/utils/file/exportFile.d.ts +11 -1
  334. package/dist/utils/file/importFile.d.ts +1 -0
  335. package/dist/utils/flipAnimation.d.ts +1 -0
  336. package/dist/utils/focus.d.ts +2 -1
  337. package/dist/utils/generator-code/aml.d.ts +1 -0
  338. package/dist/utils/generator-code/csharp.d.ts +1 -0
  339. package/dist/utils/generator-code/dbml.d.ts +1 -0
  340. package/dist/utils/generator-code/drizzle.d.ts +1 -0
  341. package/dist/utils/generator-code/go.d.ts +1 -0
  342. package/dist/utils/generator-code/graphql.d.ts +1 -0
  343. package/dist/utils/generator-code/index.d.ts +1 -0
  344. package/dist/utils/generator-code/java.d.ts +1 -0
  345. package/dist/utils/generator-code/jpa.d.ts +1 -0
  346. package/dist/utils/generator-code/kotlin.d.ts +1 -0
  347. package/dist/utils/generator-code/scala.d.ts +1 -0
  348. package/dist/utils/generator-code/sequelize.d.ts +1 -0
  349. package/dist/utils/generator-code/sqlalchemy.d.ts +1 -0
  350. package/dist/utils/generator-code/typeorm.d.ts +1 -0
  351. package/dist/utils/generator-code/typescript.d.ts +1 -0
  352. package/dist/utils/generator-code/utils.d.ts +1 -0
  353. package/dist/utils/globalEmitter.d.ts +1 -0
  354. package/dist/utils/globalEventObservable.d.ts +14 -12
  355. package/dist/utils/icon.d.ts +10 -1
  356. package/dist/utils/index.d.ts +2 -1
  357. package/dist/utils/internalEvents.d.ts +1 -0
  358. package/dist/utils/keyboard-shortcut/index.d.ts +16 -1
  359. package/dist/utils/keyboard-shortcut/utils.d.ts +1 -0
  360. package/dist/utils/promise.d.ts +1 -0
  361. package/dist/utils/rx-operators/fromCopy.d.ts +1 -0
  362. package/dist/utils/rx-operators/fromDraggable.d.ts +1 -0
  363. package/dist/utils/rx-operators/fromPaste.d.ts +1 -0
  364. package/dist/utils/rx-operators/fromShadowDraggable.d.ts +1 -0
  365. package/dist/utils/rx-operators/takeUnsubscribe.d.ts +1 -0
  366. package/dist/utils/safeCallback.d.ts +5 -0
  367. package/dist/utils/schema-aml-parser/convert.d.ts +1 -0
  368. package/dist/utils/schema-aml-parser/dataType.d.ts +6 -6
  369. package/dist/utils/schema-aml-parser/index.d.ts +1 -0
  370. package/dist/utils/schema-aml-parser/parser.d.ts +1 -0
  371. package/dist/utils/schema-aml-parser/tokenizer.d.ts +4 -5
  372. package/dist/utils/schema-aml-parser/types.d.ts +14 -14
  373. package/dist/utils/schema-dbml-parser/convert.d.ts +1 -0
  374. package/dist/utils/schema-dbml-parser/dataType.d.ts +3 -2
  375. package/dist/utils/schema-dbml-parser/index.d.ts +1 -0
  376. package/dist/utils/schema-dbml-parser/parser.d.ts +1 -0
  377. package/dist/utils/schema-dbml-parser/tokenizer.d.ts +1 -0
  378. package/dist/utils/schema-dbml-parser/types.d.ts +6 -5
  379. package/dist/utils/schema-graphql-parser/convert.d.ts +1 -0
  380. package/dist/utils/schema-graphql-parser/dataType.d.ts +3 -2
  381. package/dist/utils/schema-graphql-parser/index.d.ts +1 -0
  382. package/dist/utils/schema-graphql-parser/parser.d.ts +1 -0
  383. package/dist/utils/schema-graphql-parser/types.d.ts +8 -7
  384. package/dist/utils/schema-sql/Databricks.d.ts +1 -0
  385. package/dist/utils/schema-sql/MSSQL.d.ts +1 -0
  386. package/dist/utils/schema-sql/MariaDB.d.ts +1 -0
  387. package/dist/utils/schema-sql/MySQL.d.ts +1 -0
  388. package/dist/utils/schema-sql/Oracle.d.ts +1 -0
  389. package/dist/utils/schema-sql/PostgreSQL.d.ts +1 -0
  390. package/dist/utils/schema-sql/SQLite.d.ts +1 -0
  391. package/dist/utils/schema-sql/Snowflake.d.ts +1 -0
  392. package/dist/utils/schema-sql/index.d.ts +1 -0
  393. package/dist/utils/schema-sql/utils.d.ts +1 -0
  394. package/dist/utils/schema-sql-parser/index.d.ts +1 -0
  395. package/dist/utils/schema-sql-parser/utils.d.ts +1 -0
  396. package/dist/utils/sharedColor.d.ts +1 -0
  397. package/dist/utils/table-clipboard/copy.d.ts +15 -2
  398. package/dist/utils/table-clipboard/index.d.ts +1 -0
  399. package/dist/utils/table-clipboard/paste.d.ts +1 -0
  400. package/dist/utils/table-clipboard/payload.d.ts +30 -1
  401. package/dist/utils/table-clipboard/placement.d.ts +1 -0
  402. package/dist/utils/text.d.ts +1 -0
  403. package/dist/utils/validation.d.ts +2 -1
  404. package/dist/workers/exportPng.shared-worker.js +54 -0
  405. package/dist/workers/schemaGC.shared-worker.js +1 -0
  406. package/dist/workers/spawn.d.ts +8 -0
  407. package/dist/workers/spawn.inline.d.ts +8 -0
  408. package/package.json +53 -51
  409. package/dist/components/erd/canvas/canvas-svg/CanvasSvg.d.ts +0 -7
  410. package/dist/components/erd/canvas/canvas-svg/CanvasSvg.styles.d.ts +0 -1
  411. package/dist/components/erd/canvas/canvas-svg/relationship/Relationship.template.d.ts +0 -3
  412. package/dist/components/erd/canvas/duplicate-ghost/DuplicateGhost.styles.d.ts +0 -2
  413. package/dist/components/erd/canvas/high-level-table/HighLevelTable.styles.d.ts +0 -1
  414. package/dist/components/erd/canvas/memo/Memo.styles.d.ts +0 -6
  415. package/dist/components/erd/canvas/shared-mouse-tracker/shared-mouse-cursor/SharedMouseCursor.styles.d.ts +0 -1
  416. package/dist/components/erd/canvas/table/column/Column.styles.d.ts +0 -2
  417. package/dist/components/erd/drag-select/DragSelect.d.ts +0 -9
  418. package/dist/components/erd/drag-select/DragSelect.styles.d.ts +0 -1
  419. package/dist/components/erd/hide-sign/HideSign.d.ts +0 -6
  420. package/dist/components/erd/hide-sign/HideSign.styles.d.ts +0 -1
  421. package/dist/components/erd-editor/ErdEditor.stories.d.ts +0 -17
  422. package/dist/components/primitives/button/Button.stories.d.ts +0 -26
  423. package/dist/components/primitives/code-block/CodeBlock.stories.d.ts +0 -25
  424. package/dist/components/primitives/color-picker/ColorPicker.stories.d.ts +0 -26
  425. package/dist/components/primitives/context-menu/ContextMenu.stories.d.ts +0 -16
  426. package/dist/components/primitives/edit-input/EditInput.stories.d.ts +0 -36
  427. package/dist/components/primitives/highlighted-text/HighlightedText.stories.d.ts +0 -23
  428. package/dist/components/primitives/icon/Icon.stories.d.ts +0 -10
  429. package/dist/components/primitives/kbd/Kbd.stories.d.ts +0 -17
  430. package/dist/components/primitives/sash/Sash.stories.d.ts +0 -30
  431. package/dist/components/primitives/separator/Separator.stories.d.ts +0 -25
  432. package/dist/components/primitives/slider/Slider.stories.d.ts +0 -23
  433. package/dist/components/primitives/switch/Switch.stories.d.ts +0 -21
  434. package/dist/components/primitives/text-input/TextInput.stories.d.ts +0 -41
  435. package/dist/components/primitives/toast/Toast.stories.d.ts +0 -20
  436. package/dist/engine.js +0 -42
  437. package/dist/erd-editor.js +0 -32023
  438. package/dist/schemaGCService-DAGNq0wk.js +0 -17092
  439. package/dist/services/schema-gc/schemaGC.worker.d.ts +0 -1
  440. package/dist/themes/textColor.d.ts +0 -2
package/README.md CHANGED
@@ -32,6 +32,13 @@ and the [IntelliJ plugin](https://plugins.jetbrains.com/plugin/23594-erd-editor)
32
32
  npm install @dineug/erd-editor
33
33
  ```
34
34
 
35
+ The package ships ES modules with its dependencies left as bare imports, so any bundler
36
+ (Vite, webpack, Rspack, esbuild, …) resolves, dedupes and tree-shakes them like the rest of
37
+ your app. Two features run in shared workers — schema garbage collection and the PNG export —
38
+ constructed as `new SharedWorker(new URL('./workers/…', import.meta.url))`, which those bundlers
39
+ emit as worker files beside your chunks; a strict CSP needs `worker-src 'self'`. Without a
40
+ bundler, use the UMD file described under [Script tag](#script-tag) instead.
41
+
35
42
  ## Usage
36
43
 
37
44
  ```js
@@ -62,6 +69,39 @@ useEffect(() => {
62
69
  }, []);
63
70
  ```
64
71
 
72
+ ### Vite
73
+
74
+ In development Vite pre-bundles dependencies into its cache directory, and the worker files
75
+ would then be looked up there rather than beside the package. Exclude the editor packages from
76
+ that step; a production build needs nothing.
77
+
78
+ ```js
79
+ // vite.config.js
80
+ export default {
81
+ optimizeDeps: {
82
+ exclude: ['@dineug/erd-editor', '@dineug/erd-editor-shiki-worker'],
83
+ },
84
+ };
85
+ ```
86
+
87
+ ### Script tag
88
+
89
+ `dist/erd-editor.umd.js` is a self-contained build for a plain `<script>` tag: every
90
+ dependency and both workers are inside it, and it registers `<erd-editor>` and exposes the
91
+ three callbacks as `window.ErdEditor`. It is what `unpkg` and `jsdelivr` serve.
92
+
93
+ ```html
94
+ <erd-editor style="display: block; width: 100%; height: 100vh"></erd-editor>
95
+ <script src="https://cdn.jsdelivr.net/npm/@dineug/erd-editor/dist/erd-editor.umd.js"></script>
96
+ <script src="https://cdn.jsdelivr.net/npm/@dineug/erd-editor-shiki-worker/dist/erd-editor-shiki-worker.umd.js"></script>
97
+ <script>
98
+ ErdEditor.setGetShikiServiceCallback(ErdEditorShikiWorker.getShikiService);
99
+ </script>
100
+ ```
101
+
102
+ The workers travel inside the file as `data:` URLs, so a strict CSP needs `worker-src data:`
103
+ for this build. Pin a version in the URL for anything beyond a demo.
104
+
65
105
  ### HTML
66
106
 
67
107
  ```html
@@ -81,15 +121,6 @@ erd-editor {
81
121
  }
82
122
  ```
83
123
 
84
- ### CDN
85
-
86
- ```html
87
- <erd-editor style="display: block; width: 100%; height: 100vh"></erd-editor>
88
- <script type="module">
89
- import 'https://esm.run/@dineug/erd-editor';
90
- </script>
91
- ```
92
-
93
124
  ## API
94
125
 
95
126
  ### Attributes
@@ -119,7 +150,7 @@ erd-editor {
119
150
  | `setDiffValue(value: string)` | Open the diff viewer against another document. |
120
151
  | `setPresetTheme(options)` | Set `appearance`, `grayColor` and `accentColor`. |
121
152
  | `setTheme(theme)` | Override individual theme tokens. |
122
- | `setKeyBindingMap(map)` | Remap shortcuts. `edit`, `stop`, `search`, `undo`, `redo`, `zoomIn` and `zoomOut` are reserved. |
153
+ | `setKeyBindingMap(map)` | Remap shortcuts. `edit`, `stop`, `search`, `undo`, `redo`, `zoomIn`, `zoomOut` and `zoomReset` are reserved. |
123
154
  | `getSharedStore(config?)` | Returns `{ subscribe, dispatch, dispatchSync, connection, disconnect, destroy }`. `subscribe` gives you this editor's actions to relay; `dispatch` applies a peer's. You supply the transport. `config` is `{ getNickname?, mouseTracker?, focusTracker? }`; both trackers default to `true` and broadcast this editor's cursor and table focus to peers. |
124
155
  | `focus()` / `blur()` | Move focus in and out of the editor. |
125
156
  | `clear()` | Empty the document. |
@@ -17,7 +17,15 @@ export type AppContext = EngineContext & {
17
17
  emitter: Emitter;
18
18
  };
19
19
  export type InjectAppContext = InjectEngineContext;
20
- export declare function createAppContext(ctx: InjectAppContext, options?: RxStoreOptions): AppContext;
20
+ export type AppContextOptions = RxStoreOptions & {
21
+ /**
22
+ * Whether a dev build connects the store to the redux devtools extension. Off
23
+ * for a store built where there is no window to look the extension up on.
24
+ */
25
+ devtools?: boolean;
26
+ };
27
+ export declare function createAppContext(ctx: InjectAppContext, options?: AppContextOptions): AppContext;
21
28
  export declare const appContext: import('@dineug/r-html').Context<AppContext>;
22
29
  export declare const useAppContext: (ctx: Ctx, fallback?: AppContext) => import('@dineug/r-html').Ref<AppContext>;
23
30
  export declare function appDestroy(app: AppContext): void;
31
+ //# sourceMappingURL=appContext.d.ts.map
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=customElementRegistry.d.ts.map
@@ -5,3 +5,4 @@ export type ErdProps = {
5
5
  };
6
6
  declare const Erd: FC<ErdProps>;
7
7
  export default Erd;
8
+ //# sourceMappingURL=Erd.d.ts.map
@@ -1 +1,2 @@
1
1
  export declare const root: import('@dineug/r-html').CSSTemplateLiterals;
2
+ //# sourceMappingURL=Erd.styles.d.ts.map
@@ -1,5 +1,7 @@
1
1
  import { FC, Ref } from '@dineug/r-html';
2
2
  import { AppContext } from '../../appContext';
3
+ import { Viewport } from '../../../engine/modules/editor/state';
4
+ import { Rect } from '../../../konva/scene/metrics';
3
5
  export type AutomaticTablePlacementProps = {
4
6
  app: Ref<AppContext>;
5
7
  onChange: (tables: TablePoint[]) => void;
@@ -9,5 +11,19 @@ export type TablePoint = {
9
11
  x: number;
10
12
  y: number;
11
13
  };
14
+ /**
15
+ * Scene units left around the content when the preview fits it, so a table at
16
+ * the edge of the document is not flush against the edge of the screen.
17
+ */
18
+ export declare const FIT_PADDING = 200;
19
+ /** The closest the preview opens at: the whole document is what it is for. */
20
+ export declare const PREVIEW_ZOOM_MAX = 0.7;
21
+ /**
22
+ * The zoom the preview opens at: the content with its padding fitted into the
23
+ * screen on both axes, rounded to the two places a zoom is kept to, and held
24
+ * between the floor every zoom has and the ceiling above.
25
+ */
26
+ export declare function previewZoomLevel(content: Rect, viewport: Viewport): number;
12
27
  declare const AutomaticTablePlacement: FC<AutomaticTablePlacementProps>;
13
28
  export default AutomaticTablePlacement;
29
+ //# sourceMappingURL=AutomaticTablePlacement.d.ts.map
@@ -1,2 +1,3 @@
1
1
  export declare const root: import('@dineug/r-html').CSSTemplateLiterals;
2
2
  export declare const container: import('@dineug/r-html').CSSTemplateLiterals;
3
+ //# sourceMappingURL=AutomaticTablePlacement.styles.d.ts.map
@@ -7,5 +7,22 @@ type Node = {
7
7
  y: number;
8
8
  ref: Table;
9
9
  };
10
- export declare function createAutomaticTablePlacement(state: RootState): import('d3').Simulation<Node, undefined>;
10
+ /** The two readings of a simulation's heat that its progress is taken from. */
11
+ type Cooling = {
12
+ alpha(): number;
13
+ alphaMin(): number;
14
+ };
15
+ /**
16
+ * How far a placement has run, from 0 to 1. The simulation cools by a fixed
17
+ * factor a tick until its heat reaches the floor it stops at, so the log of
18
+ * the heat over the log of that floor is the share of the ticks it will take.
19
+ *
20
+ * @example
21
+ * simulation.on('tick.progress', () => {
22
+ * state.progress = placementProgress(simulation);
23
+ * });
24
+ */
25
+ export declare function placementProgress(simulation: Cooling): number;
26
+ export declare function createAutomaticTablePlacement(state: RootState): import('d3-force').Simulation<Node, undefined>;
11
27
  export {};
28
+ //# sourceMappingURL=createAutomaticTablePlacement.d.ts.map
@@ -4,5 +4,11 @@ export type CanvasProps = {
4
4
  canvas: Ref<HTMLDivElement>;
5
5
  grabMove?: boolean;
6
6
  };
7
+ /**
8
+ * The dom shell the scene hangs in: a controller box, the Stage container in it
9
+ * and the editing overlay over that. Scroll and zoom moved onto the scene's
10
+ * layers, so the shell is viewport sized rather than schema sized.
11
+ */
7
12
  declare const Canvas: FC<CanvasProps>;
8
13
  export default Canvas;
14
+ //# sourceMappingURL=Canvas.d.ts.map
@@ -1,2 +1,14 @@
1
+ /**
2
+ * The stage container, which is viewport sized and is the canvas. The document
3
+ * has no edge to draw any more, so the colour the scene used to paint on a
4
+ * document sized rect is painted here instead and reaches every corner.
5
+ */
6
+ export declare const stage: import('@dineug/r-html').CSSTemplateLiterals;
7
+ /**
8
+ * The minimap's thumbnail, which is a picture of that same canvas and so is
9
+ * painted by the very same rules. It keeps a name of its own because the
10
+ * minimap asks for it by one.
11
+ */
1
12
  export declare const root: import('@dineug/r-html').CSSTemplateLiterals;
2
13
  export declare const controller: import('@dineug/r-html').CSSTemplateLiterals;
14
+ //# sourceMappingURL=Canvas.styles.d.ts.map
@@ -0,0 +1,19 @@
1
+ import { FC, Ref } from '@dineug/r-html';
2
+ import { Stage } from 'konva/lib/Stage';
3
+ export type CanvasSceneProps = {
4
+ root: Ref<HTMLDivElement>;
5
+ };
6
+ /**
7
+ * The four layers of the canvas, plus the one a drag opens. Background, scene
8
+ * and presence carry the canvas transform, and the marquee layer stays in
9
+ * screen space because that is where its own mousemove measures.
10
+ */
11
+ declare const CanvasScene: FC<CanvasSceneProps>;
12
+ /**
13
+ * Renders the scene as the root of a Stage. Named in lower case on purpose:
14
+ * r-html's refresh boundary treats an all-upper-case export list as a component
15
+ * module and would self-accept this one, which kills hmr for the whole scene.
16
+ */
17
+ export declare function renderCanvasScene(stage: Stage, props: CanvasSceneProps): void;
18
+ export default CanvasScene;
19
+ //# sourceMappingURL=CanvasScene.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { FC } from '@dineug/r-html';
2
+ /**
3
+ * The one editing surface over the Stage. A canvas has no caret, no selection
4
+ * and no IME, so the edited cell hides its konva text and a real input takes
5
+ * its place, under the same zoom the scene layer carries.
6
+ */
7
+ declare const EditOverlay: FC;
8
+ export default EditOverlay;
9
+ //# sourceMappingURL=EditOverlay.d.ts.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * A cell editor, laid out on the text the scene drew rather than beside it. The
3
+ * input's own line is centred in the same box konva centred one in, and it
4
+ * paints no underline of its own: the scene's rect keeps running under it.
5
+ */
6
+ export declare const cell: import('@dineug/r-html').CSSTemplateLiterals;
7
+ //# sourceMappingURL=EditOverlay.styles.d.ts.map
@@ -0,0 +1,22 @@
1
+ import { DOMTemplateLiterals } from '@dineug/r-html';
2
+ import { SceneMouseEvent } from './sceneTokens';
3
+ import { LucideIconName } from '../../primitives/icon/icons';
4
+ export type SceneIconOptions = {
5
+ icon: LucideIconName;
6
+ name: string;
7
+ kind: string;
8
+ size: number;
9
+ color: string;
10
+ x: number;
11
+ y: number;
12
+ click?: (event: SceneMouseEvent) => void;
13
+ mouseenter?: (event: SceneMouseEvent) => void;
14
+ mouseleave?: (event: SceneMouseEvent) => void;
15
+ };
16
+ /**
17
+ * A lucide icon drawn at size, by scaling its own 24 unit box. The scale carries
18
+ * the stroke with it, which is what keeps the weight the same as the svg the DOM
19
+ * scene rendered at that size.
20
+ */
21
+ export declare function sceneIcon({ icon, name, kind, size, color, x, y, click, mouseenter, mouseleave, }: SceneIconOptions): DOMTemplateLiterals | null;
22
+ //# sourceMappingURL=SceneIcon.template.d.ts.map
@@ -1,3 +1,4 @@
1
1
  import { AppContext } from '../../appContext';
2
2
  import { SelectType } from '../../../engine/modules/editor/state';
3
3
  export declare function tryStartAltDragDuplicate(app: AppContext, event: MouseEvent | TouchEvent, entityId: string, selectType: SelectType): boolean;
4
+ //# sourceMappingURL=altDragDuplicate.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { FC, Ref } from '@dineug/r-html';
2
+ export type DragSelectProps = {
3
+ root: Ref<HTMLDivElement>;
4
+ };
5
+ /**
6
+ * The marquee, drawn in the screen space its own mousemove measures against the
7
+ * erd root. Its home is the overlay layer the canvas leaves untransformed, so
8
+ * these are the numbers the DOM version wrote into left and top.
9
+ */
10
+ declare const DragSelect: FC<DragSelectProps>;
11
+ export default DragSelect;
12
+ //# sourceMappingURL=DragSelect.d.ts.map
@@ -6,3 +6,4 @@ export type DrawRelationshipProps = {
6
6
  };
7
7
  declare const DrawRelationship: FC<DrawRelationshipProps>;
8
8
  export default DrawRelationship;
9
+ //# sourceMappingURL=DrawRelationship.d.ts.map
@@ -1,4 +1,10 @@
1
1
  import { FC } from '@dineug/r-html';
2
2
  export type DuplicateGhostProps = {};
3
+ /**
4
+ * The Alt-drag copies, drawn on the presence layer above the scene. Ghost
5
+ * geometry is schema coordinates read from table.ui, and the drag delta rides
6
+ * on the group above them, so both halves compose into the committed offset.
7
+ */
3
8
  declare const DuplicateGhost: FC<DuplicateGhostProps>;
4
9
  export default DuplicateGhost;
10
+ //# sourceMappingURL=DuplicateGhost.d.ts.map
@@ -0,0 +1,7 @@
1
+ import { RootState } from '../../../engine/state';
2
+ /** Raises the flag and holds the view as it stands until endEntityDrag. */
3
+ export declare function beginEntityDrag(root: RootState): void;
4
+ export declare function endEntityDrag(root: RootState): void;
5
+ /** Reads the flag through the observable, so a scene render tracks it. */
6
+ export declare function isEntityDragActive(root: RootState): boolean;
7
+ //# sourceMappingURL=entityDrag.d.ts.map
@@ -2,6 +2,11 @@ import { FC } from '@dineug/r-html';
2
2
  import { Table } from '../../../../internal-types';
3
3
  export type HighLevelTableProps = {
4
4
  table: Table;
5
+ /** A drawn copy rather than the table itself, so nothing in it takes an id. */
6
+ preview?: boolean;
7
+ /** Off while the table is kept built but scrolled out of the culling rect. */
8
+ visible?: boolean;
5
9
  };
6
10
  declare const HighLevelTable: FC<HighLevelTableProps>;
7
11
  export default HighLevelTable;
12
+ //# sourceMappingURL=HighLevelTable.d.ts.map
@@ -2,6 +2,9 @@ import { FC } from '@dineug/r-html';
2
2
  import { Memo } from '../../../../internal-types';
3
3
  export type MemoProps = {
4
4
  memo: Memo;
5
+ /** A drawn copy rather than the memo itself, so nothing in it takes an id. */
6
+ preview?: boolean;
5
7
  };
6
8
  declare const Memo: FC<MemoProps>;
7
9
  export default Memo;
10
+ //# sourceMappingURL=Memo.d.ts.map
@@ -1,9 +1,20 @@
1
1
  import { FC } from '@dineug/r-html';
2
- import { Memo } from '../../../../../internal-types';
2
+ import { Memo, ValuesType } from '../../../../../internal-types';
3
3
  export type MemoSashProps = {
4
4
  memo: Memo;
5
5
  top: number;
6
6
  left: number;
7
7
  };
8
+ export declare const MemoSashPosition: {
9
+ readonly left: "left";
10
+ readonly right: "right";
11
+ readonly bottom: "bottom";
12
+ readonly lt: "lt";
13
+ readonly rt: "rt";
14
+ readonly lb: "lb";
15
+ readonly rb: "rb";
16
+ };
17
+ export type MemoSashPosition = ValuesType<typeof MemoSashPosition>;
8
18
  declare const MemoSash: FC<MemoSashProps>;
9
19
  export default MemoSash;
20
+ //# sourceMappingURL=MemoSash.d.ts.map
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The offset in a memo's editor value that a point in its drawn body falls on,
3
+ * in the body's own coordinates. Past the last line box a textarea takes the
4
+ * end of the value whatever x is, which is where an author carries on writing.
5
+ *
6
+ * @example
7
+ * const offset = memoCaretOffsetAt(memo.value, memo.ui.width, 12, 40);
8
+ */
9
+ export declare function memoCaretOffsetAt(value: string, width: number, x: number, y: number): number;
10
+ /**
11
+ * Asks the next body editor for this memo to open with its caret here. The
12
+ * editor is a textarea the click itself mounts, so the point the pointer landed
13
+ * on is gone by the time it exists and has to be carried across.
14
+ *
15
+ * @example
16
+ * requestMemoCaret(memo.id, memoCaretOffsetAt(memo.value, width, x, y));
17
+ */
18
+ export declare function requestMemoCaret(memoId: string, offset: number): void;
19
+ /**
20
+ * The caret asked for, taken once. Anything the pointer did not open, and any
21
+ * request left over from another memo, opens the body at its start instead.
22
+ *
23
+ * @example
24
+ * const offset = takeMemoCaret(target.memoId);
25
+ */
26
+ export declare function takeMemoCaret(memoId: string): number;
27
+ //# sourceMappingURL=memoCaret.d.ts.map
@@ -0,0 +1,29 @@
1
+ import { Editor } from '../../../../engine/modules/editor/state';
2
+ import { Memo } from '../../../../internal-types';
3
+ /**
4
+ * The furthest a memo body scrolls: what its folded lines overrun the box by,
5
+ * in body px. A body the box holds whole has nowhere to go, which is where a
6
+ * textarea of the same box stops too.
7
+ *
8
+ * @example
9
+ * const max = getMemoScrollMax(memo);
10
+ */
11
+ export declare function getMemoScrollMax(memo: Memo): number;
12
+ /**
13
+ * A scroll pulled into the travel the body allows. The value, the width and
14
+ * the height can all change under a stored scroll, so the clamp runs where the
15
+ * scroll is read rather than where it was written.
16
+ *
17
+ * @example
18
+ * const next = clampMemoScrollTop(memo, scrollTop + event.deltaY);
19
+ */
20
+ export declare function clampMemoScrollTop(memo: Memo, scrollTop: number): number;
21
+ /**
22
+ * How far down its body the scene shows a memo from. A memo nothing has
23
+ * scrolled starts on its first line, as every memo always did.
24
+ *
25
+ * @example
26
+ * const scrollTop = getMemoScrollTop(store.state.editor, memo);
27
+ */
28
+ export declare function getMemoScrollTop(editor: Editor, memo: Memo): number;
29
+ //# sourceMappingURL=memoScroll.d.ts.map
@@ -0,0 +1,34 @@
1
+ /** The weight utils/text.ts measures with, which is what the body is drawn in. */
2
+ export declare const MEMO_FONT_WEIGHT = "400";
3
+ /** The css font shorthand the scene text and the overlay editor both resolve to. */
4
+ export declare const MEMO_FONT: string;
5
+ /**
6
+ * The leading a memo body takes, in px, which a css line-height and pretext
7
+ * both take. The dom textarea this replaced left it to line-height normal, so
8
+ * that is the advance, and the only way to it is to lay the lines out.
9
+ *
10
+ * @example
11
+ * const advance = getMemoLineHeightPx();
12
+ */
13
+ export declare function getMemoLineHeightPx(): number;
14
+ /** The same leading as konva's multiple of the font size, which is what it takes. */
15
+ export declare function getMemoLineHeight(): number;
16
+ /**
17
+ * The baseline konva draws the first body line on, down from the top of the
18
+ * text node. A canvas has no line box, so the leading and the canvas metrics
19
+ * konva itself measures with are the whole of where that line lands.
20
+ *
21
+ * @example
22
+ * const baseline = getMemoTextBaseline();
23
+ */
24
+ export declare function getMemoTextBaseline(): number;
25
+ /**
26
+ * The lines a memo body folds into at a box width, the way a textarea folds the
27
+ * same text. Konva breaks a string by rules of its own, so the scene draws
28
+ * these lines rather than handing it the value to wrap.
29
+ *
30
+ * @example
31
+ * const text = layoutMemoLines(memo.value, memo.ui.width).join('\n');
32
+ */
33
+ export declare function layoutMemoLines(value: string, width: number): readonly string[];
34
+ //# sourceMappingURL=memoText.d.ts.map
@@ -0,0 +1,7 @@
1
+ import { Ctx, Memo } from '../../../../internal-types';
2
+ export declare function useMoveMemo(ctx: Ctx, props: {
3
+ memo: Memo;
4
+ }): {
5
+ onMoveStart: (event: import('../sceneTokens').ScenePointerEvent) => void;
6
+ };
7
+ //# sourceMappingURL=useMoveMemo.d.ts.map
@@ -0,0 +1,16 @@
1
+ import { FC } from '@dineug/r-html';
2
+ import { Relationship as RelationshipType } from '../../../../internal-types';
3
+ import { CullingRect } from '../../../../konva/scene/viewport';
4
+ export type RelationshipGroupProps = {
5
+ relationships: RelationshipType[];
6
+ viewport?: CullingRect;
7
+ strokeWidth?: number;
8
+ };
9
+ /**
10
+ * Culling lives here, not in the parent, because a route is a side channel of
11
+ * the sort: a parent that filtered would have to route every connector to learn
12
+ * where it reaches, which is the work this arrangement avoids.
13
+ */
14
+ declare const RelationshipGroup: FC<RelationshipGroupProps>;
15
+ export default RelationshipGroup;
16
+ //# sourceMappingURL=RelationshipGroup.d.ts.map
@@ -6,3 +6,4 @@ export type RelationshipProps = {
6
6
  };
7
7
  declare const Relationship: FC<RelationshipProps>;
8
8
  export default Relationship;
9
+ //# sourceMappingURL=Relationship.d.ts.map
@@ -0,0 +1,18 @@
1
+ import { DOMTemplateLiterals } from '@dineug/r-html';
2
+ import { Circle, PointToPoint, RelationshipPath } from '../../../../../utils/draw-relationship';
3
+ /**
4
+ * What every decoration node answers a lookup and an ancestor walk with. Konva
5
+ * has no class list, so the one token is both.
6
+ */
7
+ export declare const DECORATION = "relationship-decoration";
8
+ /** Konva takes one flat pair list where svg took four attributes. */
9
+ export declare const segment: ({ x1, y1, x2, y2 }: PointToPoint) => number[];
10
+ /**
11
+ * One stroke of a cardinality marker. The paint, the width and the two naming
12
+ * attributes are per node in konva, so every marker is drawn through here.
13
+ */
14
+ export declare function decorationLine(points: PointToPoint, stroke: string): DOMTemplateLiterals;
15
+ /** The optional ring of a cardinality marker, at either anchor. */
16
+ export declare function decorationRing({ cx, cy }: Circle, stroke: string): DOMTemplateLiterals;
17
+ export declare function relationshipShape(relationshipType: number, { path, line }: RelationshipPath, stroke: string): DOMTemplateLiterals | null;
18
+ //# sourceMappingURL=Relationship.template.d.ts.map
@@ -0,0 +1,19 @@
1
+ import { Context } from 'konva/lib/Context';
2
+ import { Shape } from 'konva/lib/Shape';
3
+ /** What konva calls to put a shape on the hit canvas, in the shape's own space. */
4
+ export type HitFunc = (context: Context, shape: Shape) => void;
5
+ /**
6
+ * The box a column cell's text answers a press for: the full row height and
7
+ * the gap to the next cell, which is the div the dom scene put the input in.
8
+ * The text carries it so the cell needs no shape that exists only to be hit.
9
+ */
10
+ export declare const columnCellHit: HitFunc;
11
+ /** The header cell's box, the same way, at the header input's own height. */
12
+ export declare const headerCellHit: HitFunc;
13
+ /**
14
+ * The whole 24 unit box of a lucide icon, answered by the first shape it draws.
15
+ * A circle's origin is its centre, so its own position is what puts the box
16
+ * back at the icon's corner.
17
+ */
18
+ export declare const iconHit: HitFunc;
19
+ //# sourceMappingURL=sceneHit.d.ts.map
@@ -0,0 +1,12 @@
1
+ /**
2
+ * A scene node as an ancestor walk sees it. Konva has no closest, so the routing
3
+ * climbs from the node an event landed on until a kind attr names one of the
4
+ * shapes it knows, which is the rule a class selector gave the dom scene.
5
+ */
6
+ export type SceneKindNode = {
7
+ getAttr(name: string): any;
8
+ getParent(): SceneKindNode | null;
9
+ };
10
+ /** Whether the node itself or any ancestor of it carries one of the kinds. */
11
+ export declare function hasKindAncestor(node: SceneKindNode | null | undefined, kinds: readonly string[]): boolean;
12
+ //# sourceMappingURL=sceneKind.d.ts.map
@@ -0,0 +1,32 @@
1
+ export type RetentionOptions = {
2
+ /** Hidden tables kept per drawn table. */
3
+ perDrawn: number;
4
+ /** The fewest kept however little is drawn. */
5
+ atLeast: number;
6
+ };
7
+ /**
8
+ * Three hidden per drawn. Building a table costs about twelve milliseconds and
9
+ * a fast pan builds dozens a frame, while konva walks every built node, hidden
10
+ * or not, on each scroll; this is the trade between the two that measured best.
11
+ */
12
+ export declare const RETAINED_PER_DRAWN = 3;
13
+ /** Kept even where nothing is drawn, so crossing an empty stretch keeps the pool. */
14
+ export declare const RETAINED_AT_LEAST = 16;
15
+ export type RetentionPool = {
16
+ /**
17
+ * The ids to keep built but hidden this render: what left the drawn set most
18
+ * recently, up to the bound, and never a table the document no longer holds.
19
+ */
20
+ retain(drawnIds: ReadonlySet<string>, presentIds: ReadonlySet<string>): ReadonlySet<string>;
21
+ };
22
+ /**
23
+ * Remembers which tables scrolled off so the scene hides them instead of
24
+ * destroying them, and a scroll back finds them built. Each call is one render:
25
+ * it takes what is drawn now and answers what to keep beside it.
26
+ *
27
+ * @example
28
+ * const retention = createRetentionPool();
29
+ * const retainedIds = retention.retain(drawnIds, new Set(tableIds));
30
+ */
31
+ export declare function createRetentionPool({ perDrawn, atLeast, }?: Partial<RetentionOptions>): RetentionPool;
32
+ //# sourceMappingURL=sceneRetention.d.ts.map
@@ -0,0 +1,68 @@
1
+ import { KonvaEventObject } from 'konva/lib/Node';
2
+ /** A pointer event as konva hands it to a listener bound on a scene node. */
3
+ export type SceneMouseEvent = KonvaEventObject<MouseEvent>;
4
+ export type SceneTouchEvent = KonvaEventObject<TouchEvent>;
5
+ export type ScenePointerEvent = SceneMouseEvent | SceneTouchEvent;
6
+ /**
7
+ * The face utils/text.ts measures a string with. Drawing in anything else would
8
+ * make a cell wider or narrower than the width the layout reserved for it.
9
+ */
10
+ export declare const SCENE_FONT_FAMILY: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', 'Open Sans', system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'";
11
+ /** The px behind font-size-1, which is what typography.paragraph resolves to. */
12
+ export declare const SCENE_FONT_SIZE = 12;
13
+ /** The css font shorthand konva builds for a cell's text, and measures it with. */
14
+ export declare const SCENE_FONT: string;
15
+ /** The pair a canvas centres a drawn line by, which no line box is involved in. */
16
+ export type SceneFontMetrics = {
17
+ ascent: number;
18
+ descent: number;
19
+ };
20
+ /**
21
+ * The ascent and descent konva centres a drawn line by, read with the measure
22
+ * call konva makes itself. A canvas has no line box to lean on, so this pair is
23
+ * the whole of where a baseline lands, and the editor has to read the same one.
24
+ *
25
+ * @example
26
+ * const { ascent, descent } = getSceneFontMetrics();
27
+ */
28
+ export declare function getSceneFontMetrics(): SceneFontMetrics;
29
+ /**
30
+ * The px behind font-size-5 through font-size-9, in the order HighLevelTable
31
+ * steps through them as the zoom falls. The scale itself is a CSS custom
32
+ * property, and a canvas has no way to read one.
33
+ */
34
+ export declare const HIGH_LEVEL_FONT_SIZES: readonly [20, 24, 28, 35, 60];
35
+ /** Border plus padding on one side, which is where a table's own content starts. */
36
+ export declare const TABLE_INSET: number;
37
+ /** The radius Table.styles rounds a table box with. */
38
+ export declare const TABLE_CORNER_RADIUS = 6;
39
+ /** The min-height Table.styles gives the colour bar across a table header. */
40
+ export declare const HEADER_COLOR_HEIGHT = 4;
41
+ /** The 1.5px underline EditInput draws for a focused, edited or shared cell. */
42
+ export declare const FOCUS_BORDER_HEIGHT = 1.5;
43
+ /** What the ring outside a table box costs, as outline and box-shadow both do. */
44
+ export declare const RING_WIDTH = 1;
45
+ /** The side of the square viewBox every icon is authored in. */
46
+ export declare const ICON_VIEW_SIZE: number;
47
+ /** What a colour is when the scene paints nothing, as a CSS keyword konva takes. */
48
+ export declare const TRANSPARENT = "transparent";
49
+ /**
50
+ * A fill that paints nothing and still answers a hit test, which is how a cell
51
+ * keeps the whole padded box clickable the way its div did.
52
+ */
53
+ export declare const HIT_FILL = "transparent";
54
+ /** The hand a clickable scene node asks for, as the dom scene spelt it in css. */
55
+ export declare const CURSOR_POINTER = "pointer";
56
+ /** The beam a textarea carried on its own, which a drawn body has to ask for. */
57
+ export declare const CURSOR_TEXT = "text";
58
+ /** What a node hands back on the way out, leaving the container its own cursor. */
59
+ export declare const CURSOR_INHERIT = "";
60
+ /**
61
+ * Points the stage container at a cursor. A konva node carries none of its own,
62
+ * so the container is where the css the dom scene put on an element now lives.
63
+ *
64
+ * @example
65
+ * on:mouseenter={(event) => setSceneCursor(event, CURSOR_POINTER)}
66
+ */
67
+ export declare function setSceneCursor(event: ScenePointerEvent, cursor: string): void;
68
+ //# sourceMappingURL=sceneTokens.d.ts.map
@@ -1,4 +1,9 @@
1
1
  import { FC } from '@dineug/r-html';
2
2
  export type SharedDragSelectProps = {};
3
+ /**
4
+ * A peer's marquee, in the schema coordinates their editor shared. Fainter than
5
+ * the local one because several may be open at once over the same tables.
6
+ */
3
7
  declare const SharedDragSelect: FC<SharedDragSelectProps>;
4
8
  export default SharedDragSelect;
9
+ //# sourceMappingURL=SharedDragSelect.d.ts.map