@dineug/erd-editor 4.0.0 → 4.2.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 (234) hide show
  1. package/README.md +106 -280
  2. package/dist/components/dictionary/Dictionary.d.ts +12 -0
  3. package/dist/components/dictionary/Dictionary.styles.d.ts +33 -0
  4. package/dist/components/dictionary/checkCount.d.ts +28 -0
  5. package/dist/components/dictionary/checkSheet.d.ts +41 -0
  6. package/dist/components/dictionary/dictionary-context-menu/DictionaryContextMenu.d.ts +30 -0
  7. package/dist/components/dictionary/dictionaryCommit.d.ts +83 -0
  8. package/dist/components/dictionary/dictionaryFile.d.ts +23 -0
  9. package/dist/components/dictionary/dictionaryKeys.d.ts +48 -0
  10. package/dist/components/dictionary/dictionaryView.d.ts +65 -0
  11. package/dist/components/dictionary/domain-cell-editor/DomainCellEditor.d.ts +22 -0
  12. package/dist/components/dictionary/domain-cell-editor/DomainCellEditor.styles.d.ts +7 -0
  13. package/dist/components/dictionary/domain-cell-editor/openDomainCellEditor.d.ts +9 -0
  14. package/dist/components/dictionary/gridTheme.d.ts +18 -0
  15. package/dist/components/dictionary/sheets.d.ts +65 -0
  16. package/dist/components/erd/automatic-table-placement/flowPlacement.d.ts +4 -4
  17. package/dist/components/erd/canvas/DiffOutline.template.d.ts +14 -0
  18. package/dist/components/erd/canvas/EditOverlay.styles.d.ts +6 -0
  19. package/dist/components/erd/canvas/sceneHit.d.ts +5 -0
  20. package/dist/components/erd/canvas/sceneTokens.d.ts +8 -0
  21. package/dist/components/erd/canvas/table/Table.d.ts +6 -0
  22. package/dist/components/erd/canvas/table/blankLogicalName.d.ts +19 -0
  23. package/dist/components/erd/canvas/table/cellLayout.d.ts +4 -4
  24. package/dist/components/erd/canvas/table/column/Column.d.ts +32 -5
  25. package/dist/components/erd/canvas/table/dictionaryMarks.d.ts +29 -0
  26. package/dist/components/erd/canvas/table/useFocusTable.d.ts +1 -0
  27. package/dist/components/erd/diff-viewer/diff-tree/DiffTree.d.ts +19 -0
  28. package/dist/components/erd/diff-viewer/diff-tree/DiffTree.styles.d.ts +13 -0
  29. package/dist/components/erd/diff-viewer/diff-tree/diffTreeModel.d.ts +52 -0
  30. package/dist/components/erd/diff-viewer/diff.d.ts +21 -19
  31. package/dist/components/erd/draw-target/placePill.d.ts +1 -3
  32. package/dist/components/erd/erd-context-menu/menus/nameViewMenus.d.ts +22 -0
  33. package/dist/components/erd/floating-toolbar/FloatingToolbar.d.ts +7 -4
  34. package/dist/components/erd/floating-toolbar/nameViewDropdown.d.ts +16 -0
  35. package/dist/components/erd/floating-toolbar/nameViewDropdown.styles.d.ts +5 -0
  36. package/dist/components/erd/goToErdTarget.d.ts +40 -16
  37. package/dist/components/erd/readerNameView.d.ts +15 -0
  38. package/dist/components/erd/relationshipHighlight.d.ts +18 -0
  39. package/dist/components/erd/welcome-screen/welcome-hints/WelcomeHints.styles.d.ts +5 -0
  40. package/dist/components/erd/welcome-screen/welcomeLayout.d.ts +7 -3
  41. package/dist/components/erd-editor/ErdEditor.styles.d.ts +4 -0
  42. package/dist/components/erd-editor/viewportLayout.d.ts +52 -0
  43. package/dist/components/explorer/Explorer.d.ts +12 -0
  44. package/dist/components/explorer/explorer-controller/ExplorerController.d.ts +11 -0
  45. package/dist/components/explorer/explorer-panel/ExplorerPanel.d.ts +14 -0
  46. package/dist/components/explorer/explorer-panel/ExplorerPanel.styles.d.ts +13 -0
  47. package/dist/components/explorer/explorer-search/ExplorerSearch.d.ts +12 -0
  48. package/dist/components/explorer/explorer-search/ExplorerSearch.styles.d.ts +13 -0
  49. package/dist/components/explorer/explorerCommands.d.ts +28 -0
  50. package/dist/components/explorer/explorerNavigation.d.ts +14 -0
  51. package/dist/components/explorer/explorerSearch.d.ts +71 -0
  52. package/dist/components/explorer/explorerTree.d.ts +93 -0
  53. package/dist/components/explorer/explorerView.d.ts +54 -0
  54. package/dist/components/{find-replace → explorer}/fieldIcon.d.ts +4 -1
  55. package/dist/components/{find-replace → explorer}/matchTarget.d.ts +7 -9
  56. package/dist/components/export-image/ExportImage.d.ts +10 -0
  57. package/dist/components/export-image/exportImageActions.d.ts +2 -2
  58. package/dist/components/flowCenters.d.ts +9 -0
  59. package/dist/components/map-columns/nameOf.d.ts +11 -3
  60. package/dist/components/primitives/icon/icons.d.ts +13 -4
  61. package/dist/components/primitives/sash/Sash.d.ts +1 -0
  62. package/dist/components/primitives/tree/Tree.d.ts +30 -0
  63. package/dist/components/primitives/tree/Tree.styles.d.ts +5 -0
  64. package/dist/components/primitives/tree/treeModel.d.ts +42 -0
  65. package/dist/components/quick-search/QuickSearch.styles.d.ts +1 -0
  66. package/dist/components/quick-search/actions.d.ts +3 -4
  67. package/dist/components/quick-search/paletteList.d.ts +7 -0
  68. package/dist/components/quick-search/scopedActions.d.ts +5 -11
  69. package/dist/components/schema-sql/schema-sql-options/SchemaSQLOptions.d.ts +2 -2
  70. package/dist/components/schema-sql/schema-sql-options/SchemaSQLOptions.styles.d.ts +2 -0
  71. package/dist/components/schema-sql/schemaSQLView.d.ts +2 -0
  72. package/dist/components/settings/lockSettingRows.d.ts +2 -1
  73. package/dist/components/table-view/column/column-domain/ColumnDomain.d.ts +19 -0
  74. package/dist/components/table-view/column/column-domain/domainOptions.d.ts +13 -0
  75. package/dist/components/table-view/column/column-logical-name/ColumnLogicalName.d.ts +22 -0
  76. package/dist/components/table-view/column/column-logical-name/ColumnLogicalName.styles.d.ts +4 -0
  77. package/dist/components/table-view/column/columnViewText.d.ts +33 -0
  78. package/dist/components/table-view/column/useHintList.d.ts +24 -0
  79. package/dist/components/theme-builder/ThemeBuilder.styles.d.ts +3 -3
  80. package/dist/components/toolbar/Toolbar.styles.d.ts +0 -1
  81. package/dist/components/visualization/createVisualization.d.ts +2 -0
  82. package/dist/components/visualization/flowLayout.d.ts +2 -1
  83. package/dist/components/visualization/table/column/Column.d.ts +4 -0
  84. package/dist/components/visualization/visualization-toolbar/VisualizationToolbar.d.ts +2 -2
  85. package/dist/components/visualization/visualizationView.d.ts +15 -4
  86. package/dist/constants/layout.d.ts +18 -1
  87. package/dist/constants/open.d.ts +0 -1
  88. package/dist/constants/schema.d.ts +15 -2
  89. package/dist/engine/actions.d.ts +5 -2
  90. package/dist/engine/history.actions.d.ts +8 -0
  91. package/dist/engine/history.d.ts +11 -3
  92. package/dist/engine/index.js +17 -17
  93. package/dist/engine/modules/dictionary/actions.d.ts +74 -0
  94. package/dist/engine/modules/dictionary/atom.actions.d.ts +74 -0
  95. package/dist/engine/modules/dictionary/checks.d.ts +76 -0
  96. package/dist/engine/modules/dictionary/derive.d.ts +54 -0
  97. package/dist/engine/modules/dictionary/derivedNames.d.ts +23 -0
  98. package/dist/engine/modules/dictionary/dictionaryIndex.d.ts +73 -0
  99. package/dist/engine/modules/dictionary/domainLinks.d.ts +9 -0
  100. package/dist/engine/modules/dictionary/domainTypes.d.ts +27 -0
  101. package/dist/engine/modules/dictionary/entryWrites.d.ts +63 -0
  102. package/dist/engine/modules/dictionary/generator.actions.d.ts +126 -0
  103. package/dist/engine/modules/dictionary/history.d.ts +14 -0
  104. package/dist/engine/modules/dictionary/membership.d.ts +28 -0
  105. package/dist/engine/modules/dictionary/orderKeys.d.ts +13 -0
  106. package/dist/engine/modules/dictionary/termIndex.d.ts +24 -0
  107. package/dist/engine/modules/editor/actions.d.ts +18 -3
  108. package/dist/engine/modules/editor/atom.actions.d.ts +24 -6
  109. package/dist/engine/modules/editor/generator.actions.d.ts +22 -8
  110. package/dist/engine/modules/editor/state.d.ts +24 -0
  111. package/dist/engine/modules/editor/utils/nameView.d.ts +103 -0
  112. package/dist/engine/modules/editor/view.actions.d.ts +24 -1
  113. package/dist/engine/modules/editor/view.d.ts +8 -0
  114. package/dist/engine/modules/relationship/fkColumns.d.ts +10 -4
  115. package/dist/engine/modules/settings/actions.d.ts +13 -3
  116. package/dist/engine/modules/settings/atom.actions.d.ts +49 -5
  117. package/dist/engine/modules/settings/generator.actions.d.ts +2 -2
  118. package/dist/engine/modules/table/actions.d.ts +7 -0
  119. package/dist/engine/modules/table/atom.actions.d.ts +46 -0
  120. package/dist/engine/modules/table/generator.actions.d.ts +7 -0
  121. package/dist/engine/modules/table/history.d.ts +2 -0
  122. package/dist/engine/modules/table-column/actions.d.ts +7 -0
  123. package/dist/engine/modules/table-column/atom.actions.d.ts +49 -0
  124. package/dist/engine/modules/table-column/generator.actions.d.ts +5 -0
  125. package/dist/engine/modules/table-column/history.d.ts +3 -0
  126. package/dist/engine/modules/table-column/utils/dataType.d.ts +3 -1
  127. package/dist/engine/rx-store.d.ts +6 -0
  128. package/dist/engine/tag.d.ts +8 -0
  129. package/dist/erd-editor.umd.js +1586 -1018
  130. package/dist/i18n/messages/ar-SA.d.ts +166 -15
  131. package/dist/i18n/messages/de-DE.d.ts +134 -11
  132. package/dist/i18n/messages/en/code.d.ts +0 -1
  133. package/dist/i18n/messages/en/common.d.ts +11 -1
  134. package/dist/i18n/messages/en/contextMenu.d.ts +1 -0
  135. package/dist/i18n/messages/en/dictionary.d.ts +79 -0
  136. package/dist/i18n/messages/en/explorer.d.ts +37 -0
  137. package/dist/i18n/messages/en/findReplace.d.ts +7 -1
  138. package/dist/i18n/messages/en/index.d.ts +135 -12
  139. package/dist/i18n/messages/en/palette.d.ts +5 -7
  140. package/dist/i18n/messages/en/schemaSql.d.ts +1 -0
  141. package/dist/i18n/messages/en/settings.d.ts +1 -0
  142. package/dist/i18n/messages/en/shortcuts.d.ts +3 -1
  143. package/dist/i18n/messages/en/toolbar.d.ts +0 -1
  144. package/dist/i18n/messages/en/visualization.d.ts +2 -0
  145. package/dist/i18n/messages/es-ES.d.ts +142 -12
  146. package/dist/i18n/messages/eu-ES.d.ts +134 -11
  147. package/dist/i18n/messages/fa-IR.d.ts +134 -11
  148. package/dist/i18n/messages/fr-FR.d.ts +142 -12
  149. package/dist/i18n/messages/he-IL.d.ts +142 -12
  150. package/dist/i18n/messages/id-ID.d.ts +126 -10
  151. package/dist/i18n/messages/it-IT.d.ts +142 -12
  152. package/dist/i18n/messages/ja-JP.d.ts +126 -10
  153. package/dist/i18n/messages/ko-KR.d.ts +126 -10
  154. package/dist/i18n/messages/nl-NL.d.ts +134 -11
  155. package/dist/i18n/messages/pl-PL.d.ts +150 -13
  156. package/dist/i18n/messages/pt-BR.d.ts +142 -12
  157. package/dist/i18n/messages/pt-PT.d.ts +142 -12
  158. package/dist/i18n/messages/ro-RO.d.ts +142 -12
  159. package/dist/i18n/messages/ru-RU.d.ts +150 -13
  160. package/dist/i18n/messages/sk-SK.d.ts +150 -13
  161. package/dist/i18n/messages/sl-SI.d.ts +150 -13
  162. package/dist/i18n/messages/sv-SE.d.ts +134 -11
  163. package/dist/i18n/messages/tr-TR.d.ts +134 -11
  164. package/dist/i18n/messages/uk-UA.d.ts +150 -13
  165. package/dist/i18n/messages/zh-CN.d.ts +126 -10
  166. package/dist/i18n/messages/zh-TW.d.ts +126 -10
  167. package/dist/index.d.ts +1 -0
  168. package/dist/index.js +34929 -25093
  169. package/dist/internal-types/index.d.ts +6 -0
  170. package/dist/konva/scene/columnDropTarget.d.ts +2 -2
  171. package/dist/loadValue-B5ojYrZ-.js +14682 -0
  172. package/dist/peer/index.d.ts +4 -0
  173. package/dist/peer/index.js +60 -59
  174. package/dist/services/export-png/ExportScene.d.ts +1 -1
  175. package/dist/services/export-png/documentScene.d.ts +7 -1
  176. package/dist/services/export-png/index.d.ts +11 -5
  177. package/dist/services/export-png/renderPng.d.ts +4 -1
  178. package/dist/services/export-png/renderSvg.d.ts +4 -1
  179. package/dist/shared-store-S7YWEz3E.js +1656 -0
  180. package/dist/styles/scrollbar.styles.d.ts +1 -1
  181. package/dist/themes/tokens.d.ts +21 -4
  182. package/dist/utils/calcTable.d.ts +20 -4
  183. package/dist/utils/collection/domain.entity.d.ts +3 -0
  184. package/dist/utils/collection/term.entity.d.ts +3 -0
  185. package/dist/utils/collection/word.entity.d.ts +3 -0
  186. package/dist/utils/dictionary-csv/csv.d.ts +13 -0
  187. package/dist/utils/dictionary-csv/decode.d.ts +7 -0
  188. package/dist/utils/dictionary-csv/dictionaryCsv.d.ts +55 -0
  189. package/dist/utils/dictionary-csv/index.d.ts +4 -0
  190. package/dist/utils/diff/compareEntities.d.ts +39 -0
  191. package/dist/utils/diff/diffDocuments.d.ts +12 -0
  192. package/dist/utils/diff/index.d.ts +5 -0
  193. package/dist/utils/diff/pairEntities.d.ts +41 -0
  194. package/dist/utils/diff/types.d.ts +81 -0
  195. package/dist/utils/emitter.d.ts +2 -8
  196. package/dist/utils/file/exportFile.d.ts +10 -0
  197. package/dist/utils/find-replace/findMatches.d.ts +31 -12
  198. package/dist/utils/find-replace/matcher.d.ts +2 -0
  199. package/dist/utils/find-replace/present.d.ts +4 -3
  200. package/dist/utils/find-replace/preserveCase.d.ts +10 -0
  201. package/dist/utils/find-replace/replaceActions.d.ts +9 -5
  202. package/dist/utils/focus.d.ts +2 -0
  203. package/dist/utils/formatCount.d.ts +10 -0
  204. package/dist/utils/keyboard-shortcut/index.d.ts +11 -3
  205. package/dist/utils/map-columns/alignTypes.d.ts +3 -3
  206. package/dist/utils/schema-sql/Databricks.d.ts +2 -2
  207. package/dist/utils/schema-sql/MSSQL.d.ts +1 -1
  208. package/dist/utils/schema-sql/MariaDB.d.ts +2 -2
  209. package/dist/utils/schema-sql/MySQL.d.ts +2 -2
  210. package/dist/utils/schema-sql/Oracle.d.ts +1 -1
  211. package/dist/utils/schema-sql/PostgreSQL.d.ts +1 -1
  212. package/dist/utils/schema-sql/SQLite.d.ts +2 -2
  213. package/dist/utils/schema-sql/Snowflake.d.ts +2 -2
  214. package/dist/utils/schema-sql/options.d.ts +2 -0
  215. package/dist/utils/schema-sql/utils.d.ts +14 -0
  216. package/dist/utils/table-clipboard/copy.d.ts +2 -3
  217. package/dist/utils/table-clipboard/index.d.ts +9 -1
  218. package/dist/utils/table-clipboard/paste.d.ts +2 -2
  219. package/dist/utils/table-clipboard/payload.d.ts +12 -0
  220. package/dist/utils/takeover.d.ts +6 -0
  221. package/dist/utils/validation.d.ts +1 -0
  222. package/dist/utils/virtualRange.d.ts +15 -0
  223. package/dist/workers/exportPng.shared-worker.js +30 -29
  224. package/package.json +8 -6
  225. package/dist/components/erd/diff-viewer/tree-viewer/TreeViewer.d.ts +0 -12
  226. package/dist/components/erd/diff-viewer/tree-viewer/TreeViewer.styles.d.ts +0 -6
  227. package/dist/components/find-replace/FindReplace.d.ts +0 -13
  228. package/dist/components/find-replace/FindReplace.styles.d.ts +0 -27
  229. package/dist/components/find-replace/panelLayout.d.ts +0 -20
  230. package/dist/konva/batchDraw.d.ts +0 -42
  231. package/dist/konva/host.d.ts +0 -30
  232. package/dist/konva/jsx-types.test-d.d.ts +0 -2
  233. package/dist/loadValue-B3EFSe9k.js +0 -12925
  234. package/dist/shared-store-fUggY7sI.js +0 -1341
@@ -3,8 +3,6 @@ import { I18n } from '../../i18n/translate';
3
3
  import { FindField } from '../../utils/find-replace';
4
4
  import { Action } from './actions';
5
5
  import { PaletteQuery, PaletteScope } from './paletteQuery';
6
- /** How many rows a prefixed list shows, few enough to draw at once. */
7
- export declare const SCOPED_ACTION_LIMIT = 100;
8
6
  /** What the colon searches: the free text, never a name. */
9
7
  export declare const TEXT_FIELDS: FindField[];
10
8
  /**
@@ -19,16 +17,12 @@ export declare function scopeBase(actions: Action[], scope: PaletteScope | null)
19
17
  * read from the document for the columns, the free text and the help.
20
18
  */
21
19
  export declare function paletteRows(app: AppContext, found: Action[], { scope, keyword, table }: PaletteQuery, i18n?: I18n): Action[];
20
+ /** The table rows the keyword fuzzes to, every one, those holding it as typed or by its Hangul letters first. */
21
+ export declare function rankTableActions(found: Action[], keyword: string): Action[];
22
22
  /**
23
- * The table rows the keyword fuzzes to, those holding it as typed or by its
24
- * Hangul letters first, up to the scoped limit, past which a table whose name
25
- * the panel finds it in hands the search to Find and Replace over the names.
26
- */
27
- export declare function rankTableActions(app: AppContext, found: Action[], keyword: string, i18n?: I18n): Action[];
28
- /**
29
- * One row a field of the kinds given holding the keyword, Hangul letters too,
30
- * or every column or text, up to the scoped limit, past which one holding it as
31
- * typed hands it to Find and Replace over those kinds, without the table part.
23
+ * One row for each field of the kinds given holding the keyword, Hangul letters
24
+ * too, or for every column name or text that is not empty while there is none,
25
+ * the table part narrowing a column search; the list draws only the rows in view.
32
26
  */
33
27
  export declare function createFieldActions(app: AppContext, fields: FindField[], keyword: string, table?: string | null, i18n?: I18n): Action[];
34
28
  /** The prefixes as rows, each typing its character into the input when chosen; a keyword fuzzes them. */
@@ -16,8 +16,8 @@ export type SchemaSQLOptionsProps = {
16
16
  };
17
17
  /**
18
18
  * The options beside the Schema SQL: the database and the bracket, then this
19
- * window's statements, header and tables, then the scripts the document
20
- * saves, and the buttons that save and copy the text.
19
+ * window's statements, header, logical name comments and tables, then the
20
+ * scripts the document saves, and the buttons that save and copy the text.
21
21
  */
22
22
  declare const SchemaSQLOptions: FC<SchemaSQLOptionsProps>;
23
23
  export default SchemaSQLOptions;
@@ -11,6 +11,8 @@ export declare const group: import('@dineug/r-html').CSSTemplateLiterals;
11
11
  /** A group under a rule, drawn halfway into the gap above it. */
12
12
  export declare const separated: import('@dineug/r-html').CSSTemplateLiterals;
13
13
  export declare const row: import('@dineug/r-html').CSSTemplateLiterals;
14
+ /** A label beside its switch: the label wraps, the switch keeps its size and the label takes the press. */
15
+ export declare const toggle: import('@dineug/r-html').CSSTemplateLiterals;
14
16
  export declare const column: import('@dineug/r-html').CSSTemplateLiterals;
15
17
  export declare const caption: import('@dineug/r-html').CSSTemplateLiterals;
16
18
  export declare const note: import('@dineug/r-html').CSSTemplateLiterals;
@@ -19,6 +19,8 @@ export type SchemaSQLView = {
19
19
  statements: SchemaSQLStatements;
20
20
  /** The header asked for, resolved the same way. */
21
21
  header: SchemaSQLHeader;
22
+ /** Whether an empty comment writes the logical name; off at first. */
23
+ logicalNameAsComment: boolean;
22
24
  /** Replaced whole, never changed in place, so a watcher hears one change. */
23
25
  tables: SchemaSQLTableChoice;
24
26
  panel: OptionsPanelState;
@@ -1,10 +1,11 @@
1
+ import { LockSettingType as LockSettingBit } from '@dineug/erd-editor-schema';
1
2
  import { RootState } from '../../engine/state';
2
3
  import { I18n, PlainMessageKey } from '../../i18n/translate';
3
4
  type LockedValues = RootState['settings']['lockedValues'];
4
5
  type Translator = Pick<I18n, 't'>;
5
6
  export type LockSettingRow = {
6
7
  nameKey: PlainMessageKey;
7
- lockSettingType: number;
8
+ lockSettingType: LockSettingBit;
8
9
  toText: (values: LockedValues, i18n: Translator) => string;
9
10
  };
10
11
  /**
@@ -0,0 +1,19 @@
1
+ import { FC, Ref } from '@dineug/r-html';
2
+ import { AppContext } from '../../../appContext';
3
+ export type ColumnDomainProps = {
4
+ app?: Ref<AppContext>;
5
+ tableId: string;
6
+ columnId: string;
7
+ width: number;
8
+ placeholder: string;
9
+ onBlur?: (event: FocusEvent) => void;
10
+ onEditEnd?: () => void;
11
+ };
12
+ /**
13
+ * The domain editor of a row: a search over the domain sheet by name that only
14
+ * picks, never writing what is typed. A pick links the domain with its type in
15
+ * one dispatch, and None unlinks; it opens on the row of the domain linked.
16
+ */
17
+ declare const ColumnDomain: FC<ColumnDomainProps>;
18
+ export default ColumnDomain;
19
+ //# sourceMappingURL=ColumnDomain.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { RootState } from '../../../../engine/state';
2
+ /** A row of a domain picker: a domain by its id and name, or the empty id that unlinks. */
3
+ export type DomainOption = {
4
+ id: string;
5
+ name: string;
6
+ };
7
+ /**
8
+ * The rows a search offers: every named domain in sheet order after the row
9
+ * that unlinks while nothing is typed, else the domains whose names hold the
10
+ * text in any case; none at all while the sheet lists no named domain.
11
+ */
12
+ export declare function searchDomainOptions(state: RootState, typed: string): DomainOption[];
13
+ //# sourceMappingURL=domainOptions.d.ts.map
@@ -0,0 +1,22 @@
1
+ import { FC, Ref } from '@dineug/r-html';
2
+ import { AppContext } from '../../../appContext';
3
+ export type ColumnLogicalNameProps = {
4
+ app?: Ref<AppContext>;
5
+ tableId: string;
6
+ /** The column whose logical name is edited, null for the table's own. */
7
+ columnId: string | null;
8
+ width: number;
9
+ value: string;
10
+ placeholder: string;
11
+ onInput?: (event: InputEvent) => void;
12
+ onBlur?: (event: FocusEvent) => void;
13
+ onEditEnd?: () => void;
14
+ };
15
+ /**
16
+ * The logical name editor of a header or a row: each key writes the text, the
17
+ * terms its start names drop under it, and a term picked writes it with its
18
+ * derivation; the name is derived once more as the editor closes on a change.
19
+ */
20
+ declare const ColumnLogicalName: FC<ColumnLogicalNameProps>;
21
+ export default ColumnLogicalName;
22
+ //# sourceMappingURL=ColumnLogicalName.d.ts.map
@@ -0,0 +1,4 @@
1
+ export declare const root: import('@dineug/r-html').CSSTemplateLiterals;
2
+ export declare const hint: import('@dineug/r-html').CSSTemplateLiterals;
3
+ export declare const hintItem: import('@dineug/r-html').CSSTemplateLiterals;
4
+ //# sourceMappingURL=ColumnLogicalName.styles.d.ts.map
@@ -0,0 +1,33 @@
1
+ import { RootState } from '../../../engine/state';
2
+ import { I18n, PlainMessageKey } from '../../../i18n/translate';
3
+ import { Column } from '../../../internal-types';
4
+ type ViewSettings = Pick<RootState['settings'], 'nameViewMode'>;
5
+ type Names = {
6
+ name: string;
7
+ logicalName: string;
8
+ };
9
+ /** What a cell drawn in the DOM shows, the placeholder dimmed while the value is blank. */
10
+ export type CellText = {
11
+ value: string;
12
+ placeholder: string;
13
+ };
14
+ /**
15
+ * What a logical name cell drawn in the DOM shows, as the canvas draws it: the
16
+ * logical name, or while it is blank the name in the logical view, that name's
17
+ * own placeholder while it is blank too, and in the view of both the logical name's.
18
+ */
19
+ export declare function logicalNameCellText(settings: ViewSettings, { name, logicalName }: Names, nameKey: PlainMessageKey, { t }: Pick<I18n, 't'>): CellText;
20
+ /** What the name cell of a row drawn in the DOM shows: the logical view puts the logical name there. */
21
+ export declare function nameCellText(settings: ViewSettings, column: Names, i18n: Pick<I18n, 't'>): CellText;
22
+ /**
23
+ * What the type cell of a row drawn in the DOM shows: the name of the listed
24
+ * domain it stands for in the logical view, else the type.
25
+ */
26
+ export declare const typeCellText: (state: RootState, column: Pick<Column, "dataType" | "domainId">) => string;
27
+ /**
28
+ * What the domain cell of a row drawn in the DOM holds: the listed domain's
29
+ * name, or nothing, over which the row dims the domain placeholder.
30
+ */
31
+ export declare const domainCellText: (state: RootState, column: Pick<Column, "domainId">) => string;
32
+ export {};
33
+ //# sourceMappingURL=columnViewText.d.ts.map
@@ -0,0 +1,24 @@
1
+ export type HintListProps = {
2
+ onBlur?: (event: FocusEvent) => void;
3
+ };
4
+ /** The rows a list under a cell editor offers, and the one the keyboard is on, -1 for none. */
5
+ export type HintListState = {
6
+ rows: ReadonlyArray<unknown>;
7
+ index: number;
8
+ };
9
+ /**
10
+ * The focus, pointer and scroll handling a cell editor with a list under its
11
+ * input shares with the data type cell: a press on the list keeps the caret,
12
+ * the wheel it scrolls by stays off the canvas, and the keyboard row stays in view.
13
+ */
14
+ export declare function useHintList(props: HintListProps, state: HintListState): {
15
+ root: import('@dineug/r-html').Ref<HTMLDivElement>;
16
+ hintList: import('@dineug/r-html').Ref<HTMLDivElement>;
17
+ handleFocus: () => void;
18
+ handleFocusout: (event: FocusEvent) => void;
19
+ handleHintMousedown: (event: MouseEvent) => void;
20
+ handleHintTouchstart: (event: TouchEvent) => void;
21
+ handleHintWheel: (event: WheelEvent) => void;
22
+ step: (delta: 1 | -1) => void;
23
+ };
24
+ //# sourceMappingURL=useHintList.d.ts.map
@@ -1,7 +1,7 @@
1
1
  /**
2
- * A panel placed over whichever tab is up, padded as Find and Replace is. The
3
- * tab wrapper raises no stacking context, so a raised descendant would paint
4
- * over an unraised sibling; the same step later in the root keeps this on top.
2
+ * A panel placed over whichever tab is up. The tab wrapper raises no stacking
3
+ * context, so a raised descendant would paint over an unraised sibling; the
4
+ * same step later in the root keeps this on top.
5
5
  */
6
6
  export declare const root: import('@dineug/r-html').CSSTemplateLiterals;
7
7
  export declare const header: import('@dineug/r-html').CSSTemplateLiterals;
@@ -1,5 +1,4 @@
1
1
  export declare const root: import('@dineug/r-html').CSSTemplateLiterals;
2
2
  export declare const vertical: import('@dineug/r-html').CSSTemplateLiterals;
3
3
  export declare const menu: import('@dineug/r-html').CSSTemplateLiterals;
4
- export declare const tableCount: import('@dineug/r-html').CSSTemplateLiterals;
5
4
  //# sourceMappingURL=Toolbar.styles.d.ts.map
@@ -15,6 +15,8 @@ export type VisualizationNode = {
15
15
  id: string;
16
16
  group: Group;
17
17
  name: string;
18
+ /** The logical name, which a table's label draws in the name views that show one. */
19
+ logicalName: string;
18
20
  /** The table a column hangs off; a table node has none. */
19
21
  tableId: string | null;
20
22
  x: number;
@@ -14,8 +14,9 @@ export declare function fitFlowView(store: RxStore): void;
14
14
  * @example
15
15
  * onMounted(() => ensureFlowPlaced(app.value));
16
16
  */
17
- export declare function ensureFlowPlaced(app: AppContext, { force }?: {
17
+ export declare function ensureFlowPlaced(app: AppContext, { force, fit }?: {
18
18
  force?: boolean;
19
+ fit?: boolean;
19
20
  }): Promise<void>;
20
21
  /**
21
22
  * Keeps the Flow view placed for as long as the tab draws it: placed again
@@ -6,6 +6,10 @@ export type ColumnProps = {
6
6
  widthDataType: number;
7
7
  widthDefault: number;
8
8
  widthComment: number;
9
+ /** The logical name's own cell, which the view of both names alone lays out. */
10
+ widthLogicalName?: number;
11
+ /** The domain's own cell, laid out while its show bit is set. */
12
+ widthDomain?: number;
9
13
  /** The room the table keeps for alternate key marks, 0 while it draws none. */
10
14
  widthAlternateKey?: number;
11
15
  /** The mark this row carries in that room, last, as the ERD scene draws it. */
@@ -2,8 +2,8 @@ import { FC } from '@dineug/r-html';
2
2
  export type VisualizationToolbarProps = {};
3
3
  /**
4
4
  * The bar over the bottom of the Visualization tab: which of the two modes is
5
- * up, the zoom, the placement tools of the Flow, how much of a card it draws,
6
- * the way back to the whole document, and which way the content lies and how far once the screen holds none.
5
+ * up, the steps through the centers the Flow stood on, the zoom, its placement
6
+ * tools, how much of a card it draws, the way back to the whole document, and which way the content lies and how far once the screen holds none.
7
7
  */
8
8
  declare const VisualizationToolbar: FC<VisualizationToolbarProps>;
9
9
  export default VisualizationToolbar;
@@ -1,5 +1,6 @@
1
1
  import { ContentCompass } from '../erd/content-compass/compassGeometry';
2
2
  import { Viewport } from '../../engine/modules/editor/state';
3
+ import { RootState } from '../../engine/state';
3
4
  import { Point } from '../../internal-types';
4
5
  import { Group, VisualizationLink, VisualizationNode } from './createVisualization';
5
6
  export { DIM_OPACITY } from '../../konva/scene/viewLayout';
@@ -13,10 +14,20 @@ export declare const NAME_MAX_LENGTH = 15;
13
14
  * truncateName('a_very_long_table_name'); // 'a_very_long_tab…'
14
15
  */
15
16
  export declare function truncateName(name: string): string;
16
- /** The text a table's label draws: its name cut to length, or the placeholder its input shows. */
17
- export declare function labelOf(node: Pick<VisualizationNode, 'name'>, placeholder: string): string;
18
- /** Whether a table has a name of its own, which is what its label is painted by. */
19
- export declare const hasName: (node: Pick<VisualizationNode, "name">) => boolean;
17
+ type LabelNode = Pick<VisualizationNode, 'name' | 'logicalName'>;
18
+ type ViewSettings = Pick<RootState['settings'], 'nameViewMode'>;
19
+ /**
20
+ * The text a table's label draws in the name view: the name it shows cut to
21
+ * length, the name after the logical name on a second line in the view of
22
+ * both, or the placeholder its input shows while it shows no name.
23
+ */
24
+ export declare function labelOf(node: LabelNode, placeholder: string, settings: ViewSettings): string;
25
+ /**
26
+ * Whether a table's label draws a name of its own, which paints it in the
27
+ * foreground: not the placeholder, nor the name standing in for a blank
28
+ * logical name in the logical view.
29
+ */
30
+ export declare function hasName(node: LabelNode, settings: ViewSettings): boolean;
20
31
  export declare const TABLE_RADIUS = 8;
21
32
  export declare const COLUMN_RADIUS = 4;
22
33
  /** A table draws larger than the columns that hang off it. */
@@ -47,6 +47,17 @@ export declare const TABLE_COLOR_WIDTH = 4;
47
47
  export declare const TABLE_HEADER_BUTTONS_WIDTH: number;
48
48
  export declare const COLUMN_DELETE_WIDTH = 12;
49
49
  export declare const COLUMN_KEY_WIDTH = 12;
50
+ /** The button a column drag starts from, beside the focused row and outside the table. */
51
+ export declare const COLUMN_DRAG_HANDLE_WIDTH = 16;
52
+ export declare const COLUMN_DRAG_HANDLE_HEIGHT = 20;
53
+ export declare const COLUMN_DRAG_HANDLE_ICON_SIZE = 12;
54
+ /** The room between that button and the table's left edge. */
55
+ export declare const COLUMN_DRAG_HANDLE_GAP = 4;
56
+ /**
57
+ * The strip left of a table the handle answers a press in and a column drop is
58
+ * judged in, so a drag that runs straight down along the handle still reorders.
59
+ */
60
+ export declare const COLUMN_DRAG_HANDLE_LANE = 24;
50
61
  /** The table icon before the name, at the key badge's size so the two stand in one column. */
51
62
  export declare const TABLE_HEADER_ICON_SIZE = 12;
52
63
  /** The gap after that icon, the one a key badge keeps, which lines the name up with the column names. */
@@ -141,7 +152,13 @@ export declare const TOOLBAR_DATABASE_NAME_WIDTH = 150;
141
152
  export declare const TABLE_PROPERTIES_BODY_PADDING = 12;
142
153
  /** How many rows the Table Properties index order shows before it scrolls the rest. */
143
154
  export declare const INDEX_ORDER_MAX_ROWS = 3;
144
- export declare const DIFF_TREE_WIDTH = 200;
155
+ /** The Explorer's width as it first opens, and the width a double press on its edge gives back. */
156
+ export declare const EXPLORER_WIDTH = 260;
157
+ /** The narrowest and the widest a drag on the Explorer's edge sets it; narrower than the least, it hides. */
158
+ export declare const EXPLORER_MIN_WIDTH = 200;
159
+ export declare const EXPLORER_MAX_WIDTH = 480;
160
+ /** The least of the canvas the Explorer leaves beside it, whatever its width asks. */
161
+ export declare const EXPLORER_CANVAS_MIN_WIDTH = 320;
145
162
  /** The width of the options panel beside the code, on the Schema SQL and Code Generator tabs. */
146
163
  export declare const SCHEMA_SQL_PANEL_WIDTH = 300;
147
164
  /** An editor narrower than this opens the Schema SQL and Code Generator tabs with their panels folded away. */
@@ -7,7 +7,6 @@ export declare const Open: {
7
7
  readonly localePicker: "localePicker";
8
8
  readonly diffViewer: "diffViewer";
9
9
  readonly timeTravel: "timeTravel";
10
- readonly findReplace: "findReplace";
11
10
  readonly exportImage: "exportImage";
12
11
  readonly mapColumns: "mapColumns";
13
12
  };
@@ -5,6 +5,7 @@ export declare const CanvasType: {
5
5
  readonly schemaSQL: "@dineug/erd-editor/builtin-schema-sql";
6
6
  readonly generatorCode: "@dineug/erd-editor/builtin-generator-code";
7
7
  readonly settings: "settings";
8
+ readonly dictionary: "@dineug/erd-editor/builtin-dictionary";
8
9
  };
9
10
  export declare const CanvasTypeList: readonly string[];
10
11
  export declare const Show: {
@@ -21,6 +22,7 @@ export declare const Show: {
21
22
  readonly hideReferentialAction: 1024;
22
23
  readonly hideTableGroup: 2048;
23
24
  readonly hideMemo: 4096;
25
+ readonly columnDomain: 8192;
24
26
  };
25
27
  export declare const ColumnType: {
26
28
  readonly columnName: 1;
@@ -30,6 +32,8 @@ export declare const ColumnType: {
30
32
  readonly columnAutoIncrement: 16;
31
33
  readonly columnDefault: 32;
32
34
  readonly columnComment: 64;
35
+ readonly columnLogicalName: 128;
36
+ readonly columnDomain: 256;
33
37
  };
34
38
  export declare const ColumnTypeList: readonly number[];
35
39
  export declare const Database: {
@@ -115,6 +119,7 @@ export declare const ColumnOption: {
115
119
  readonly primaryKey: 2;
116
120
  readonly unique: 4;
117
121
  readonly notNull: 8;
122
+ readonly nameDerived: 16;
118
123
  };
119
124
  export declare const ColumnUIKey: {
120
125
  readonly primaryKey: 1;
@@ -132,9 +137,17 @@ export declare const LockSettingType: {
132
137
  readonly tableNameCase: 8;
133
138
  readonly columnNameCase: 16;
134
139
  readonly bracketType: 32;
140
+ readonly unlockNameViewMode: 64;
135
141
  };
136
- export declare const LockSettingTypeList: readonly number[];
137
- export declare const LockSettingFields: Readonly<Record<number, readonly ("zoomLevel" | "canvasType" | "language" | "bracketType" | "originX" | "originY" | "tableNameCase" | "columnNameCase")[]>>;
142
+ export declare const LockSettingTypeList: readonly import('@dineug/erd-editor-schema').LockSettingType[];
143
+ export declare const LockSettingFields: Readonly<Record<number, readonly ("canvasType" | "language" | "tableNameCase" | "columnNameCase" | "bracketType" | "zoomLevel" | "originX" | "originY" | "nameViewMode")[]>>;
144
+ export declare const InvertedLockSettings: number;
145
+ export declare const NameViewMode: {
146
+ readonly physical: "physical";
147
+ readonly logical: "logical";
148
+ readonly both: "both";
149
+ };
150
+ export declare const NameViewModeList: ReadonlyArray<ValuesType<typeof NameViewMode>>;
138
151
  export declare const CANVAS_SIZE_MAX: 20000;
139
152
  export declare const CANVAS_SIZE_MIN: 2000;
140
153
  export declare const CANVAS_ZOOM_MAX: 1.5;
@@ -1,3 +1,6 @@
1
+ import { ActionMap as DictionaryActionMap } from './modules/dictionary/actions';
2
+ import { actions as dictionaryActions } from './modules/dictionary/atom.actions';
3
+ import { actions$ as dictionaryActions$ } from './modules/dictionary/generator.actions';
1
4
  import { ActionMap as EditorActionMap } from './modules/editor/actions';
2
5
  import { actions as editorActions } from './modules/editor/atom.actions';
3
6
  import { actions$ as editorActions$ } from './modules/editor/generator.actions';
@@ -25,8 +28,8 @@ import { actions$ as tableColumnActions$ } from './modules/table-column/generato
25
28
  import { ActionMap as TableGroupActionMap } from './modules/table-group/actions';
26
29
  import { actions as tableGroupActions } from './modules/table-group/atom.actions';
27
30
  import { actions$ as tableGroupActions$ } from './modules/table-group/generator.actions';
28
- export type Actions = typeof editorActions & typeof editorActions$ & typeof indexActions & typeof indexActions$ & typeof indexColumnActions & typeof indexColumnActions$ & typeof memoActions & typeof memoActions$ & typeof relationshipActions & typeof relationshipActions$ & typeof settingsActions & typeof settingsActions$ & typeof tableActions & typeof tableActions$ & typeof tableColumnActions & typeof tableColumnActions$ & typeof tableGroupActions & typeof tableGroupActions$;
29
- export type RootActionMap = EditorActionMap & TableActionMap & TableColumnActionMap & MemoActionMap & RelationshipActionMap & SettingsActionMap & IndexActionMap & IndexColumnActionMap & TableGroupActionMap;
31
+ export type Actions = typeof editorActions & typeof editorActions$ & typeof indexActions & typeof indexActions$ & typeof indexColumnActions & typeof indexColumnActions$ & typeof memoActions & typeof memoActions$ & typeof relationshipActions & typeof relationshipActions$ & typeof settingsActions & typeof settingsActions$ & typeof tableActions & typeof tableActions$ & typeof tableColumnActions & typeof tableColumnActions$ & typeof tableGroupActions & typeof tableGroupActions$ & typeof dictionaryActions & typeof dictionaryActions$;
32
+ export type RootActionMap = EditorActionMap & TableActionMap & TableColumnActionMap & MemoActionMap & RelationshipActionMap & SettingsActionMap & IndexActionMap & IndexColumnActionMap & TableGroupActionMap & DictionaryActionMap;
30
33
  export type ActionType = keyof RootActionMap;
31
34
  export declare const actions: Actions;
32
35
  export declare const ChangeActionTypes: ReadonlyArray<ActionType>;
@@ -7,4 +7,12 @@ export type PushStreamHistory = (undoActions: AnyAction[], redoActions: AnyActio
7
7
  export declare const pushUndoHistoryMap: Record<string, PushUndoHistory>;
8
8
  export declare const pushStreamHistoryMap: Record<string, PushStreamHistory>;
9
9
  export declare const pushHistory: (store: Store, history: History) => (actions: AnyAction[]) => void;
10
+ /** Whether an action writes a dictionary row, the actions a sheet's history holds. */
11
+ export declare const isDictionaryAction: ({ type }: AnyAction) => boolean;
12
+ /**
13
+ * Pushes a Dictionary tab batch onto its sheet's history: its row actions and
14
+ * the links it took off columns, the column writes a domain's type spread to
15
+ * worked out again at each replay, which keeps the links it takes off in turn.
16
+ */
17
+ export declare const pushSheetHistory: (store: Store, history: History) => (actions: AnyAction[]) => void;
10
18
  //# sourceMappingURL=history.actions.d.ts.map
@@ -1,9 +1,12 @@
1
1
  import { AnyAction } from '@dineug/r-html';
2
+ import { RootState } from './state';
2
3
  type Dispatch = (actions: AnyAction[]) => void;
3
4
  type GetNextVersion = () => number;
5
+ type GetState = () => RootState;
6
+ export type Replay = (dispatch: Dispatch, getNextVersion: GetNextVersion, getState?: GetState) => void;
4
7
  export type Command = {
5
- undo: (dispatch: Dispatch, getNextVersion: GetNextVersion) => void;
6
- redo: (dispatch: Dispatch, getNextVersion: GetNextVersion) => void;
8
+ undo: Replay;
9
+ redo: Replay;
7
10
  };
8
11
  export type CommandKey = keyof Command;
9
12
  export type History = {
@@ -26,12 +29,17 @@ export type HistoryOptions = {
26
29
  notify: (has: HasHistory) => void;
27
30
  dispatch: Dispatch;
28
31
  getNextVersion: GetNextVersion;
32
+ /**
33
+ * The state of the store a replay dispatches into, which a command reads, so
34
+ * a clone replaying into another store reads that store's.
35
+ */
36
+ getState?: GetState;
29
37
  };
30
38
  type HistoryState = {
31
39
  commands: Command[];
32
40
  cursor: number;
33
41
  limit: number;
34
42
  };
35
- export declare function createHistory({ notify, dispatch, getNextVersion }: HistoryOptions, initialState?: HistoryState): History;
43
+ export declare function createHistory({ notify, dispatch, getNextVersion, getState }: HistoryOptions, initialState?: HistoryState): History;
36
44
  export {};
37
45
  //# sourceMappingURL=history.d.ts.map
@@ -1,45 +1,45 @@
1
- import { $ as e, Bo as t, Jn as n, c as r, ds as i, mn as a, n as o, ps as s, r as c, t as l, u, v as d, y as f } from "../loadValue-B3EFSe9k.js";
1
+ import { $ as e, In as t, c as n, fr as r, jc as i, kc as a, n as o, r as s, t as c, tc as l, u, v as d, y as f } from "../loadValue-B5ojYrZ-.js";
2
2
  import { Observable as p, Subject as m, debounceTime as h, map as g } from "rxjs";
3
3
  import { omit as _ } from "es-toolkit";
4
4
  //#region src/engine/replication-store.ts
5
- var v = t(f), y = { change: "change" };
6
- function b(t) {
5
+ var v = l(f), y = { change: "change" };
6
+ function b(l) {
7
7
  let b = /* @__PURE__ */ new Set(), x = u({
8
- ...t,
8
+ ...l,
9
9
  routes: !1
10
- }), { clock: S } = x, C = c(x, !1);
11
- C.dispatchSync(n({
10
+ }), { clock: S } = x, C = s(x, !1);
11
+ C.dispatchSync(r({
12
12
  width: 0,
13
13
  height: 0
14
14
  }));
15
- let w = o(C), T = new m(), E = new p((e) => C.subscribe((t) => e.next(t))).pipe(r(f), h(200)), D = /* @__PURE__ */ new Set(), O = null, k = (e) => (D.has(e) || D.add(e), () => {
15
+ let w = o(C), T = new m(), E = new p((e) => C.subscribe((t) => e.next(t))).pipe(n(f), h(200)), D = /* @__PURE__ */ new Set(), O = null, k = (e) => (D.has(e) || D.add(e), () => {
16
16
  D.delete(e);
17
- }), A = (e, t) => {
18
- D.forEach((n) => {
19
- let r = Reflect.get(n, e);
20
- a(r, t);
17
+ }), A = (e, n) => {
18
+ D.forEach((r) => {
19
+ let i = Reflect.get(r, e);
20
+ t(i, n);
21
21
  });
22
22
  }, j = (t) => {
23
- O = null, C.dispatchSync(e(l(t)));
23
+ O = null, C.dispatchSync(e(c(t)));
24
24
  }, M = (e) => {
25
25
  T.next([e].flat());
26
26
  };
27
27
  return b.add(E.subscribe(() => {
28
- let e = i(C.state), t = O !== null && e !== O;
28
+ let e = a(C.state), t = O !== null && e !== O;
29
29
  O !== null && (O = e), A(y.change, {
30
30
  value: e,
31
31
  changed: t
32
32
  });
33
- })).add(T.pipe(r(d), g((e) => e.map((e) => _(e, ["tags"])))).subscribe((e) => {
34
- e.some(({ type: e }) => v(e)) && (O ??= i(C.state));
33
+ })).add(T.pipe(n(d), g((e) => e.map((e) => _(e, ["tags"])))).subscribe((e) => {
34
+ e.some(({ type: e }) => v(e)) && (O ??= a(C.state));
35
35
  let t = S.getNextVersion();
36
36
  e.forEach((e) => e.version ??= t), C.dispatchSync(e), e.forEach((e) => S.merge(e.version));
37
37
  })), Object.freeze({
38
38
  get value() {
39
- return i(C.state);
39
+ return a(C.state);
40
40
  },
41
41
  get runtimeValue() {
42
- return s(C.state);
42
+ return i(C.state);
43
43
  },
44
44
  on: k,
45
45
  setInitialValue: j,
@@ -0,0 +1,74 @@
1
+ import { Reducer } from '@dineug/r-html';
2
+ import { EngineContext } from '../../context';
3
+ import { RootState } from '../../state';
4
+ import { Domain, Term, ValuesType, Word } from '../../../internal-types';
5
+ export declare const ActionType: {
6
+ readonly addDictionary: "dictionary.add";
7
+ readonly updateDictionary: "dictionary.update";
8
+ readonly removeDictionary: "dictionary.remove";
9
+ };
10
+ export type ActionType = ValuesType<typeof ActionType>;
11
+ /** The three dictionaries a document holds, each a sheet of rows. */
12
+ export declare const DictionaryKind: {
13
+ readonly word: "word";
14
+ readonly term: "term";
15
+ readonly domain: "domain";
16
+ };
17
+ export type DictionaryKind = ValuesType<typeof DictionaryKind>;
18
+ export declare const DictionaryKindList: ReadonlyArray<DictionaryKind>;
19
+ /** What a row of each dictionary holds besides its id and its place in its sheet. */
20
+ export type DictionaryValues = {
21
+ [DictionaryKind.word]: Omit<Word, 'id' | 'order'>;
22
+ [DictionaryKind.term]: Omit<Term, 'id' | 'order'>;
23
+ [DictionaryKind.domain]: Omit<Domain, 'id' | 'order'>;
24
+ };
25
+ /** What an action writes into a row: its values and its order key, which places it in its sheet. */
26
+ export type DictionaryStoredValues = {
27
+ [K in DictionaryKind]: DictionaryValues[K] & {
28
+ order: string;
29
+ };
30
+ };
31
+ /**
32
+ * The fields of each dictionary's rows, in the order a reducer writes them.
33
+ * Every field is a string, and each is a register of its own.
34
+ */
35
+ export declare const DictionaryFields: {
36
+ readonly word: readonly ["name", "abbreviation", "englishName", "description", "synonyms", "forbiddenWords"];
37
+ readonly term: readonly ["name", "physicalName", "domainId", "description", "synonyms"];
38
+ readonly domain: readonly ["name", "category", "dataType", "description"];
39
+ };
40
+ /**
41
+ * The fields a reducer writes, a register each: the values and the order key,
42
+ * which no sheet column, file column or tool shows.
43
+ */
44
+ export declare const DictionaryStoredFields: {
45
+ readonly word: readonly ["name", "abbreviation", "englishName", "description", "synonyms", "forbiddenWords", "order"];
46
+ readonly term: readonly ["name", "physicalName", "domainId", "description", "synonyms", "order"];
47
+ readonly domain: readonly ["name", "category", "dataType", "description", "order"];
48
+ };
49
+ /** One row of one dictionary, and the values an action writes into it. */
50
+ export type DictionaryRowPayload = {
51
+ [K in DictionaryKind]: {
52
+ kind: K;
53
+ id: string;
54
+ values: Partial<DictionaryStoredValues[K]>;
55
+ };
56
+ }[DictionaryKind];
57
+ /** A row to list, with the values it starts with, none for a row brought back. */
58
+ export type DictionaryAddPayload = {
59
+ [K in DictionaryKind]: {
60
+ kind: K;
61
+ id: string;
62
+ values?: Partial<DictionaryStoredValues[K]>;
63
+ };
64
+ }[DictionaryKind];
65
+ export type ActionMap = {
66
+ [ActionType.addDictionary]: DictionaryAddPayload;
67
+ [ActionType.updateDictionary]: DictionaryRowPayload;
68
+ [ActionType.removeDictionary]: {
69
+ kind: DictionaryKind;
70
+ id: string;
71
+ };
72
+ };
73
+ export type ReducerType<T extends keyof ActionMap> = Reducer<RootState, T, ActionMap, EngineContext>;
74
+ //# sourceMappingURL=actions.d.ts.map