@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
@@ -0,0 +1,74 @@
1
+ import { EngineContext } from '../../context';
2
+ import { RootState } from '../../state';
3
+ import { Domain, Term, Word } from '../../../internal-types';
4
+ import { DictionaryKind, ReducerType } from './actions';
5
+ /** A kind this release knows; a later release's kind changes nothing here. */
6
+ export declare const hasDictionaryKind: (kind: unknown) => kind is DictionaryKind;
7
+ /** The row of a dictionary the id names, a removed one too. */
8
+ export declare const selectDictionaryRow: (state: RootState, kind: DictionaryKind, id: string) => Word | Term | Domain | undefined;
9
+ /**
10
+ * The ids of a dictionary's listed rows, in the order they were listed, which
11
+ * membership reads; a sheet shows them in key order (orderedDictionaryRows).
12
+ */
13
+ export declare const dictionaryIds: (state: RootState, kind: DictionaryKind) => string[];
14
+ /**
15
+ * The string values a payload names among the kind's fields, in their order,
16
+ * so a field or a value no editor sends is passed over.
17
+ */
18
+ export declare function dictionaryEntries(kind: DictionaryKind, values: unknown): Array<[field: string, value: string]>;
19
+ /**
20
+ * Measures the domain cell of every column linking the domain, a removed
21
+ * column's too, so each width reads the domain as it now stands whatever
22
+ * order a peer heard the domain's and the column's changes in.
23
+ */
24
+ export declare function measureDomainColumns(state: RootState, domainId: string, { toWidth }: EngineContext): void;
25
+ export declare const addDictionaryAction: {
26
+ (payload: import('./actions').DictionaryAddPayload): import('@dineug/r-html').AnyAction<import('./actions').DictionaryAddPayload>;
27
+ toString(): string;
28
+ type: string;
29
+ };
30
+ export declare const updateDictionaryAction: {
31
+ (payload: import('./actions').DictionaryRowPayload): import('@dineug/r-html').AnyAction<import('./actions').DictionaryRowPayload>;
32
+ toString(): string;
33
+ type: string;
34
+ };
35
+ export declare const removeDictionaryAction: {
36
+ (payload: {
37
+ kind: DictionaryKind;
38
+ id: string;
39
+ }): import('@dineug/r-html').AnyAction<{
40
+ kind: DictionaryKind;
41
+ id: string;
42
+ }>;
43
+ toString(): string;
44
+ type: string;
45
+ };
46
+ export declare const dictionaryReducers: {
47
+ "dictionary.add": ReducerType<"dictionary.add">;
48
+ "dictionary.update": ReducerType<"dictionary.update">;
49
+ "dictionary.remove": ReducerType<"dictionary.remove">;
50
+ };
51
+ export declare const actions: {
52
+ addDictionaryAction: {
53
+ (payload: import('./actions').DictionaryAddPayload): import('@dineug/r-html').AnyAction<import('./actions').DictionaryAddPayload>;
54
+ toString(): string;
55
+ type: string;
56
+ };
57
+ updateDictionaryAction: {
58
+ (payload: import('./actions').DictionaryRowPayload): import('@dineug/r-html').AnyAction<import('./actions').DictionaryRowPayload>;
59
+ toString(): string;
60
+ type: string;
61
+ };
62
+ removeDictionaryAction: {
63
+ (payload: {
64
+ kind: DictionaryKind;
65
+ id: string;
66
+ }): import('@dineug/r-html').AnyAction<{
67
+ kind: DictionaryKind;
68
+ id: string;
69
+ }>;
70
+ toString(): string;
71
+ type: string;
72
+ };
73
+ };
74
+ //# sourceMappingURL=atom.actions.d.ts.map
@@ -0,0 +1,76 @@
1
+ import { RootState } from '../../state';
2
+ import { Column, Table, ValuesType } from '../../../internal-types';
3
+ import { DictionaryKind } from './actions';
4
+ import { DictionaryRowOf } from './dictionaryIndex';
5
+ /** The seven checks the dictionaries run over the tables, columns and rows. */
6
+ export declare const DictionaryCheckCode: {
7
+ readonly duplicateName: "duplicateName";
8
+ readonly unknownDomain: "unknownDomain";
9
+ readonly unregisteredWord: "unregisteredWord";
10
+ readonly forbiddenWord: "forbiddenWord";
11
+ readonly synonymWord: "synonymWord";
12
+ readonly physicalNameMismatch: "physicalNameMismatch";
13
+ readonly domainTypeMismatch: "domainTypeMismatch";
14
+ };
15
+ export type DictionaryCheckCode = ValuesType<typeof DictionaryCheckCode>;
16
+ export declare const DictionaryCheckCodeList: ReadonlyArray<DictionaryCheckCode>;
17
+ /** How loud a check shows: an error or a warning. */
18
+ export declare const DictionaryCheckLevel: {
19
+ readonly error: "error";
20
+ readonly warning: "warning";
21
+ };
22
+ export type DictionaryCheckLevel = ValuesType<typeof DictionaryCheckLevel>;
23
+ /**
24
+ * A name two rows share, a link to no listed domain and a forbidden word are
25
+ * errors; an unregistered word, a synonym, a physical name the term would not
26
+ * give and a type other than the linked domain's are warnings.
27
+ */
28
+ export declare const DictionaryCheckLevelOf: Readonly<Record<DictionaryCheckCode, DictionaryCheckLevel>>;
29
+ /** What a check is about: a table, a column or a dictionary row. */
30
+ export type DictionaryCheckTargetKind = 'table' | 'column' | DictionaryKind;
31
+ /** The cell a check marks, by the field it reads. */
32
+ export type DictionaryCheckField = 'name' | 'logicalName' | 'domainId';
33
+ /**
34
+ * One finding, read only since the walks hand the same one out again. The
35
+ * target's table id is '' for a dictionary row; suggestions are the standard
36
+ * words, the physical name or the type the dictionaries offer instead of the text.
37
+ */
38
+ export type DictionaryCheck = Readonly<{
39
+ code: DictionaryCheckCode;
40
+ target: Readonly<{
41
+ kind: DictionaryCheckTargetKind;
42
+ id: string;
43
+ tableId: string;
44
+ }>;
45
+ field: DictionaryCheckField;
46
+ text: string;
47
+ suggestions: ReadonlyArray<string>;
48
+ }>;
49
+ /**
50
+ * The checks of a table, or of one of its cells when a field is given: the
51
+ * words of its logical name and the physical name its term gives. Each reads
52
+ * an index, so marking a cell walks no sheet.
53
+ */
54
+ export declare const checkTable: (state: RootState, table: Table, field?: DictionaryCheckField) => DictionaryCheck[];
55
+ /** The checks of a column, or of one of its cells: a table's two, its domain link and its type against that domain's. */
56
+ export declare const checkColumn: (state: RootState, column: Column, field?: DictionaryCheckField) => DictionaryCheck[];
57
+ /**
58
+ * The checks of a dictionary row, or of one of its cells: a name another row
59
+ * of its sheet holds, and for a term the words of its name and its domain.
60
+ */
61
+ export declare function checkDictionaryRow<K extends DictionaryKind>(state: RootState, kind: K, row: DictionaryRowOf[K], field?: DictionaryCheckField): DictionaryCheck[];
62
+ /** The loudest level among the checks, null for none: what one cell shows. */
63
+ export declare function markOf(checks: ReadonlyArray<DictionaryCheck>): DictionaryCheckLevel | null;
64
+ /**
65
+ * Every check of the document in the order listDictionaryChecks gives them,
66
+ * a sheet, a term, a table or a column at a time, so a caller can stop
67
+ * between two and go on while the state stays as it was.
68
+ */
69
+ export declare function walkDictionaryChecks(state: RootState): Generator<ReadonlyArray<DictionaryCheck>, void, undefined>;
70
+ /**
71
+ * Every check of the document, for the sheet that lists them: the words, the
72
+ * terms and the domains in sheet order, then each table and its columns in
73
+ * document order, each target checked again only once a value it read moved.
74
+ */
75
+ export declare function listDictionaryChecks(state: RootState): DictionaryCheck[];
76
+ //# sourceMappingURL=checks.d.ts.map
@@ -0,0 +1,54 @@
1
+ import { RootState } from '../../state';
2
+ import { Term, ValuesType, Word } from '../../../internal-types';
3
+ import { WordIndex } from './dictionaryIndex';
4
+ /** What a stretch of a logical name is to the word sheet. */
5
+ export declare const WordTokenKind: {
6
+ readonly word: "word";
7
+ readonly synonym: "synonym";
8
+ readonly forbidden: "forbidden";
9
+ readonly unregistered: "unregistered";
10
+ };
11
+ export type WordTokenKind = ValuesType<typeof WordTokenKind>;
12
+ /**
13
+ * A stretch of a logical name and the words it reads as: those so named for
14
+ * a word, those listing it for a synonym or a forbidden word, none for an
15
+ * unregistered stretch.
16
+ */
17
+ export type WordToken = {
18
+ text: string;
19
+ kind: WordTokenKind;
20
+ words: ReadonlyArray<Word>;
21
+ };
22
+ /** The units of a logical name, which the separators bound and no word crosses. */
23
+ export declare const splitNameUnits: (logicalName: string) => string[];
24
+ /**
25
+ * Splits a logical name into units at the separators, then reads each unit
26
+ * from the left, taking the longest text the word sheet marks and never going
27
+ * back. What no text matches joins one unregistered stretch until a match.
28
+ */
29
+ export declare function decompose(index: WordIndex, logicalName: string): WordToken[];
30
+ /**
31
+ * Joins the words' abbreviations with underscores, trimmed, their case as
32
+ * typed and with no bound on the length; the first listed word of a name
33
+ * answers for it. Any other token, or a word with no abbreviation, gives null.
34
+ */
35
+ export declare function compose(tokens: ReadonlyArray<WordToken>): string | null;
36
+ /** The physical name the word sheet composes for a logical name; null with no word listed. */
37
+ export declare function composeName(state: RootState, logicalName: string): string | null;
38
+ /**
39
+ * What the dictionaries make of a logical name. A term's physical name is ''
40
+ * when the term holds none and the words compose none, so a caller writes no
41
+ * name then; its domain is '' unless the document lists it.
42
+ */
43
+ export type DerivedPhysical = {
44
+ physicalName: string;
45
+ domainId: string;
46
+ term: Term | null;
47
+ };
48
+ /**
49
+ * The term of the logical name first, its physical name composed of words
50
+ * when it holds none, else the composition alone, else null. An empty term
51
+ * sheet matches no term, and an empty word sheet composes nothing.
52
+ */
53
+ export declare function derivePhysical(state: RootState, logicalName: string): DerivedPhysical | null;
54
+ //# sourceMappingURL=derive.d.ts.map
@@ -0,0 +1,23 @@
1
+ import { AnyAction } from '@dineug/r-html';
2
+ import { ChangeColumnValuePayload } from '../table-column/actions';
3
+ import { RootState } from '../../state';
4
+ import { Column, Table } from '../../../internal-types';
5
+ /**
6
+ * The names each table's columns hold, as two names compare, by table then
7
+ * column id; a dispatch that names several columns moves it as it goes.
8
+ */
9
+ export type ColumnNameLedger = Map<string, Map<string, string>>;
10
+ /** A column's name writes, and the link to its term's domain for the caller to settle. */
11
+ export type ColumnNameWrites = {
12
+ actions: AnyAction[];
13
+ link: ChangeColumnValuePayload | null;
14
+ };
15
+ /**
16
+ * What the dictionaries write into a column for the logical name given. A
17
+ * name another column of the table holds, or one an earlier column of the
18
+ * ledger's dispatch took, derives nothing: the column keeps name, flag and link.
19
+ */
20
+ export declare function toColumnNameWrites(state: RootState, tableId: string, column: Column, logicalName: string, force?: boolean, ledger?: ColumnNameLedger): ColumnNameWrites;
21
+ /** What the dictionaries write into a table's name for the logical name given. */
22
+ export declare function toTableNameWrites(state: RootState, table: Table, logicalName: string, force?: boolean): AnyAction[];
23
+ //# sourceMappingURL=derivedNames.d.ts.map
@@ -0,0 +1,73 @@
1
+ import { RootState } from '../../state';
2
+ import { Domain, Term, Word } from '../../../internal-types';
3
+ import { DictionaryKind } from './actions';
4
+ /** The row each dictionary holds. */
5
+ export type DictionaryRowOf = {
6
+ [DictionaryKind.word]: Word;
7
+ [DictionaryKind.term]: Term;
8
+ [DictionaryKind.domain]: Domain;
9
+ };
10
+ /**
11
+ * A name as every dictionary lookup compares it: trimmed and composed, its
12
+ * case kept, so a term matches a logical name typed in either Unicode form.
13
+ */
14
+ export declare const normalizeDictionaryName: (name: string) => string;
15
+ /** The names a comma separated field lists, each normalized, none empty. */
16
+ export declare const splitDictionaryList: (text: string) => string[];
17
+ /**
18
+ * Marks a dictionary as written, so each index built over it is built again
19
+ * on its next read. The add, update and remove reducers call it; a load
20
+ * brings new collections, which no index was built over yet.
21
+ */
22
+ export declare function raiseDictionaryGeneration(state: RootState, kind: DictionaryKind): void;
23
+ /**
24
+ * A dictionary's listed rows in the order its sheet, its file and every reader
25
+ * show them: by order key. Built once per write of the sheet; never mutate it.
26
+ */
27
+ export declare const orderedDictionaryRows: <K extends DictionaryKind>(state: RootState, kind: K) => ReadonlyArray<DictionaryRowOf[K]>;
28
+ /**
29
+ * A reader of what the build makes of a dictionary's listed rows in sheet
30
+ * order, kept until the sheet is written again (heldPerSheet).
31
+ */
32
+ export declare function dictionaryCache<K extends DictionaryKind, T>(kind: K, build: (rows: ReadonlyArray<DictionaryRowOf[K]>) => T): (state: RootState) => T;
33
+ /** A sheet's listed rows, and those of each normalized name, both in sheet order. */
34
+ export type NameIndex<Row> = {
35
+ rows: ReadonlyArray<Row>;
36
+ byName: ReadonlyMap<string, ReadonlyArray<Row>>;
37
+ };
38
+ /** What a word sheet says of one text: the words so named, and those listing it. */
39
+ export type WordMarks = {
40
+ words: Word[];
41
+ synonymOf: Word[];
42
+ forbiddenOf: Word[];
43
+ };
44
+ /** A node of the word trie, keyed by UTF-16 code unit. */
45
+ export type WordTrieNode = {
46
+ next: Map<number, WordTrieNode>;
47
+ marks?: WordMarks;
48
+ };
49
+ /** The word sheet's names, and a trie over them, its synonyms and its forbidden words. */
50
+ export type WordIndex = NameIndex<Word> & {
51
+ root: WordTrieNode;
52
+ };
53
+ /** The rows by name; a row without a name is in no group and matches nothing. */
54
+ export declare const buildNameIndex: <Row extends {
55
+ name: string;
56
+ }>(rows: ReadonlyArray<Row>) => NameIndex<Row>;
57
+ /**
58
+ * Marks each word's name, synonyms and forbidden words on the trie, in sheet
59
+ * order. A word without a name lists nothing, since it names no standard word
60
+ * to suggest, and a synonym equal to its own word's name is passed over.
61
+ */
62
+ export declare function buildWordIndex(words: ReadonlyArray<Word>): WordIndex;
63
+ /** The word sheet's index, built once per generation of the sheet. */
64
+ export declare const getWordIndex: (state: RootState) => WordIndex;
65
+ /** The term sheet's names, built once per generation of the sheet. */
66
+ export declare const getTermNames: (state: RootState) => NameIndex<Term>;
67
+ /** The domain sheet's names, built once per generation of the sheet. */
68
+ export declare const getDomainNames: (state: RootState) => NameIndex<Domain>;
69
+ /** The first listed term of the name, compared trimmed, composed and case kept. */
70
+ export declare const findTerm: (state: RootState, name: string) => Term | undefined;
71
+ /** The first listed domain of the name, compared as a term's is. */
72
+ export declare const findDomain: (state: RootState, name: string) => Domain | undefined;
73
+ //# sourceMappingURL=dictionaryIndex.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { RootState } from '../../state';
2
+ /** The ids of the columns linking the domain, a removed column's among them; no column links ''. */
3
+ export declare const domainColumnIds: (state: RootState, domainId: string) => ReadonlySet<string>;
4
+ /**
5
+ * Moves the column from the domain it linked to the one it links now, in the
6
+ * index built over its collection; a collection with none builds it later.
7
+ */
8
+ export declare function relinkDomainColumn(state: RootState, columnId: string, from: string, to: string): void;
9
+ //# sourceMappingURL=domainLinks.d.ts.map
@@ -0,0 +1,27 @@
1
+ import { AnyAction } from '@dineug/r-html';
2
+ import { ChangeColumnValuePayload } from '../table-column/actions';
3
+ import { RootState } from '../../state';
4
+ /** What one dispatch writes that a column's data type or its domain follows. */
5
+ export type DomainTypeWrites = {
6
+ /** The data type each domain takes, by the domain's id. */
7
+ domainTypes?: ReadonlyMap<string, string>;
8
+ /** The columns linked to a domain, its id as the value, '' to unlink. */
9
+ links?: ReadonlyArray<ChangeColumnValuePayload>;
10
+ /** The columns given a data type directly, as a type cell writes one. */
11
+ dataTypes?: ReadonlyArray<ChangeColumnValuePayload>;
12
+ };
13
+ /** A domain's type in one dispatch: the one it writes the domain, else the domain's own. */
14
+ export declare function domainTypeIn(state: RootState, domainTypes: ReadonlyMap<string, string>): (id: string) => string;
15
+ /**
16
+ * The unlinks that close a dispatch writing these column types: each column
17
+ * whose type then differs from the type of the domain it links, listed or
18
+ * removed, read with the domain types and links the same dispatch writes.
19
+ */
20
+ export declare function toDomainUnlinkActions(state: RootState, written: ReadonlyArray<ChangeColumnValuePayload>, { domainTypes, links, }?: Pick<DomainTypeWrites, 'domainTypes' | 'links'>): AnyAction[];
21
+ /**
22
+ * The column writes of one dispatch over all its rows: a column linked to a
23
+ * domain it changes or links takes that type first, the sync spreads from it
24
+ * without writing it again, and a written column off its domain's type unlinks.
25
+ */
26
+ export declare function toDomainTypeActions(state: RootState, { domainTypes, links, dataTypes, }: DomainTypeWrites): AnyAction[];
27
+ //# sourceMappingURL=domainTypes.d.ts.map
@@ -0,0 +1,63 @@
1
+ import { AnyAction } from '@dineug/r-html';
2
+ import { RootState } from '../../state';
3
+ import { ValuesType } from '../../../internal-types';
4
+ import { DictionaryCsvRow } from '../../../utils/dictionary-csv/dictionaryCsv';
5
+ import { DictionaryKind, DictionaryValues } from './actions';
6
+ /** A row a write names: a listed row by its id, or a new one with none. */
7
+ export type DictionaryEntryChange<K extends DictionaryKind = DictionaryKind> = {
8
+ id?: string;
9
+ /** The values to write, and the order key, which only the engine sends, that places the row. */
10
+ values: Partial<DictionaryValues[K]> & {
11
+ order?: string;
12
+ };
13
+ };
14
+ /** Why a write of a dictionary row is turned away. */
15
+ export declare const DictionaryRefusalCode: {
16
+ readonly duplicateName: "duplicateName";
17
+ readonly unknownDomain: "unknownDomain";
18
+ };
19
+ export type DictionaryRefusalCode = ValuesType<typeof DictionaryRefusalCode>;
20
+ /**
21
+ * A row turned away: its position among the changes given, the name it would
22
+ * hold, and the text refused, the normalized name or the domain's id.
23
+ */
24
+ export type DictionaryRefusal = {
25
+ code: DictionaryRefusalCode;
26
+ index: number;
27
+ name: string;
28
+ value: string;
29
+ };
30
+ /**
31
+ * Why each change would be turned away: a name another listed row of the
32
+ * sheet or another row of the same changes holds, compared normalized, or a
33
+ * term's domain the document does not list. An empty name is never refused.
34
+ */
35
+ export declare function validateDictionaryValues<K extends DictionaryKind>(state: RootState, kind: K, changes: ReadonlyArray<DictionaryEntryChange<K>>): DictionaryRefusal[];
36
+ /** What a commit sends: nothing while any row of it is refused. */
37
+ export type DictionaryCommit = {
38
+ actions: AnyAction[];
39
+ refusals: DictionaryRefusal[];
40
+ };
41
+ /**
42
+ * The actions of a commit of rows, updates of listed rows and adds of new
43
+ * ones, with the columns its domains' new types reach, or none at all when a
44
+ * row is refused, so one commit lands whole or not.
45
+ */
46
+ export declare function toDictionaryCommit<K extends DictionaryKind>(state: RootState, kind: K, changes: ReadonlyArray<DictionaryEntryChange<K>>): DictionaryCommit;
47
+ /** What an import of a file's rows sends, and the counts its message shows. */
48
+ export type DictionaryImport = {
49
+ actions: AnyAction[];
50
+ added: number;
51
+ updated: number;
52
+ /** The rows a later row of the same name replaced, or with no name. */
53
+ folded: number;
54
+ /** Each domain name a term row gives that the document lists no domain of. */
55
+ unknownDomains: string[];
56
+ };
57
+ /**
58
+ * Folds a file's rows by normalized name, the later row's values in the
59
+ * earlier one's place, then updates the listed row of each name and adds the
60
+ * rest. A term's domain is read by name, '' where no domain has it.
61
+ */
62
+ export declare function toDictionaryImport<K extends DictionaryKind>(state: RootState, kind: K, rows: ReadonlyArray<DictionaryCsvRow<K>>): DictionaryImport;
63
+ //# sourceMappingURL=entryWrites.d.ts.map
@@ -0,0 +1,126 @@
1
+ import { GeneratorAction } from '../../generator.actions';
2
+ import { ValuesType } from '../../../internal-types';
3
+ import { DictionaryCsvRow } from '../../../utils/dictionary-csv/dictionaryCsv';
4
+ import { DictionaryKind, DictionaryValues } from './actions';
5
+ import { DictionaryEntryChange } from './entryWrites';
6
+ /**
7
+ * Adds one row at the end of its sheet with the values given, none for an
8
+ * empty row; nothing when its name is another row's or its domain unknown.
9
+ */
10
+ export declare const addDictionaryEntryAction$: <K extends DictionaryKind>(kind: K, values?: Partial<DictionaryValues[K]>) => GeneratorAction;
11
+ /** Where inserted rows go: before or after a listed row, or at the end for none. */
12
+ export type DictionaryInsertAnchor = {
13
+ id: string;
14
+ place: 'before' | 'after';
15
+ } | null;
16
+ /**
17
+ * Inserts empty rows before or after a row in one dispatch, at the end when it
18
+ * is gone, keying the rows around the place again where no key fits between
19
+ * them. Only the editor sends it, so it stays out of the barrel.
20
+ */
21
+ export declare const insertDictionaryEntriesAction$: (kind: DictionaryKind, count: number, anchor?: DictionaryInsertAnchor) => GeneratorAction;
22
+ /** Which way a sort runs. */
23
+ export declare const DictionarySortDirection: {
24
+ readonly ascending: "ascending";
25
+ readonly descending: "descending";
26
+ };
27
+ export type DictionarySortDirection = ValuesType<typeof DictionarySortDirection>;
28
+ /**
29
+ * Orders a sheet by one field for everyone in one dispatch, by the text a cell
30
+ * shows in the language given, numbers as numbers, empty cells last, ties as
31
+ * they stood; nothing for a sheet in that order. Only the editor sends it.
32
+ */
33
+ export declare const sortDictionaryAction$: (kind: DictionaryKind, field: string, direction: DictionarySortDirection, locale?: string) => GeneratorAction;
34
+ /**
35
+ * Writes the fields of a listed row that change, and the type of every column
36
+ * a domain's new type reaches; nothing when the row is refused or unlisted.
37
+ */
38
+ export declare const updateDictionaryEntryAction$: <K extends DictionaryKind>(kind: K, id: string, values: Partial<DictionaryValues[K]>) => GeneratorAction;
39
+ /**
40
+ * Removes each listed row named, once, in one dispatch, from the end of the
41
+ * list back, each after every named row behind it: removing a whole sheet or
42
+ * its tail moves no other row, while rows a scattered pick leaves still move.
43
+ */
44
+ export declare const removeDictionaryEntriesAction$: (kind: DictionaryKind, ids: ReadonlyArray<string>) => GeneratorAction;
45
+ /**
46
+ * A grid's commit: an update of each listed row named and an add of each row
47
+ * past the end, in one dispatch, or nothing at all when any row is refused.
48
+ */
49
+ export declare const commitDictionaryCellsAction$: <K extends DictionaryKind>(kind: K, changes: ReadonlyArray<DictionaryEntryChange<K>>) => GeneratorAction;
50
+ /**
51
+ * A file's rows, folded by name and upserted by name in one dispatch: only the
52
+ * adds and the fields that change, so the same file again sends nothing.
53
+ */
54
+ export declare const importDictionaryAction$: <K extends DictionaryKind>(kind: K, rows: ReadonlyArray<DictionaryCsvRow<K>>) => GeneratorAction;
55
+ /**
56
+ * Writes a column's logical name and what the dictionaries derive of it in
57
+ * one dispatch, the derivation only while the physical name is empty or
58
+ * derived; nothing when every value already holds.
59
+ */
60
+ export declare const setColumnLogicalNameAction$: (tableId: string, columnId: string, value: string) => GeneratorAction;
61
+ /**
62
+ * The logical names of several columns and what the dictionaries derive of
63
+ * them in one dispatch, as Replace All writes them; the domains they link are
64
+ * read over all of them at once, which separate generators would not do.
65
+ */
66
+ export declare const setColumnLogicalNamesAction$: (names: ReadonlyArray<{
67
+ tableId: string;
68
+ columnId: string;
69
+ value: string;
70
+ }>) => GeneratorAction;
71
+ /** The table's logical name and its derived name, as a column's are. */
72
+ export declare const setTableLogicalNameAction$: (tableId: string, value: string) => GeneratorAction;
73
+ /** Derives a column's name from the logical name it holds, as its editor closes. */
74
+ export declare const deriveColumnNameAction$: (tableId: string, columnId: string) => GeneratorAction;
75
+ /** Derives a table's name from the logical name it holds, as its editor closes. */
76
+ export declare const deriveTableNameAction$: (tableId: string) => GeneratorAction;
77
+ /** What a derivation again covers. */
78
+ export declare const RederiveScope: {
79
+ readonly column: "column";
80
+ readonly table: "table";
81
+ readonly selection: "selection";
82
+ readonly document: "document";
83
+ };
84
+ export type RederiveScope = ValuesType<typeof RederiveScope>;
85
+ /**
86
+ * One column; one table, its name and every column; the selected tables so;
87
+ * or every table of the document so.
88
+ */
89
+ export type RederiveNamesTarget = {
90
+ scope: typeof RederiveScope.column;
91
+ tableId: string;
92
+ columnId: string;
93
+ } | {
94
+ scope: typeof RederiveScope.table;
95
+ tableId: string;
96
+ } | {
97
+ scope: typeof RederiveScope.selection;
98
+ } | {
99
+ scope: typeof RederiveScope.document;
100
+ };
101
+ /**
102
+ * Puts each name the target covers back under the dictionaries, its flag on,
103
+ * and derives it again, one dispatch and one undo; a name with no logical
104
+ * name, or a column whose new name another column holds, is left as it is.
105
+ */
106
+ export declare const rederiveNamesAction$: (target: RederiveNamesTarget) => GeneratorAction;
107
+ /**
108
+ * Links a column to a live domain and gives it the domain's type, the data
109
+ * type sync spreading it, in one dispatch; '' unlinks alone. A domain the
110
+ * document does not list links nothing.
111
+ */
112
+ export declare const setColumnDomainAction$: (tableId: string, columnId: string, domainId: string) => GeneratorAction;
113
+ export declare const actions$: {
114
+ addDictionaryEntryAction$: <K extends DictionaryKind>(kind: K, values?: Partial<DictionaryValues[K]>) => GeneratorAction;
115
+ updateDictionaryEntryAction$: <K extends DictionaryKind>(kind: K, id: string, values: Partial<DictionaryValues[K]>) => GeneratorAction;
116
+ removeDictionaryEntriesAction$: (kind: DictionaryKind, ids: ReadonlyArray<string>) => GeneratorAction;
117
+ importDictionaryAction$: <K extends DictionaryKind>(kind: K, rows: ReadonlyArray<DictionaryCsvRow<K>>) => GeneratorAction;
118
+ commitDictionaryCellsAction$: <K extends DictionaryKind>(kind: K, changes: ReadonlyArray<DictionaryEntryChange<K>>) => GeneratorAction;
119
+ setColumnLogicalNameAction$: (tableId: string, columnId: string, value: string) => GeneratorAction;
120
+ setTableLogicalNameAction$: (tableId: string, value: string) => GeneratorAction;
121
+ deriveColumnNameAction$: (tableId: string, columnId: string) => GeneratorAction;
122
+ deriveTableNameAction$: (tableId: string) => GeneratorAction;
123
+ rederiveNamesAction$: (target: RederiveNamesTarget) => GeneratorAction;
124
+ setColumnDomainAction$: (tableId: string, columnId: string, domainId: string) => GeneratorAction;
125
+ };
126
+ //# sourceMappingURL=generator.actions.d.ts.map
@@ -0,0 +1,14 @@
1
+ import { AnyAction } from '@dineug/r-html';
2
+ import { PushUndoHistory } from '../../history.actions';
3
+ /**
4
+ * Turns round the adds and removes an undo sends, in the slots they hold: the
5
+ * undo of an import then takes its rows off the end of each list, and the undo
6
+ * of a removal sent from the end puts the rows back in their order.
7
+ */
8
+ export declare function reverseDictionaryListings(undoActions: AnyAction[]): void;
9
+ export declare const dictionaryPushUndoHistoryMap: {
10
+ "dictionary.add": PushUndoHistory;
11
+ "dictionary.update": PushUndoHistory;
12
+ "dictionary.remove": PushUndoHistory;
13
+ };
14
+ //# sourceMappingURL=history.d.ts.map
@@ -0,0 +1,28 @@
1
+ import { RootState } from '../../state';
2
+ /** Whether a dictionary's id list holds the id, without walking the list. */
3
+ export declare const isListed: (list: string[], id: string) => boolean;
4
+ /** Puts the id at the end of the list unless it holds it; true when it did. */
5
+ export declare function listId(list: string[], id: string): boolean;
6
+ /**
7
+ * Takes the id out of the list if it holds it; true when it did. It looks from
8
+ * the end, where a removal and an undo send their rows, since every element a
9
+ * splice moves in a state list goes through its proxy.
10
+ */
11
+ export declare function unlistId(list: string[], id: string): boolean;
12
+ /**
13
+ * The id while it names a domain the document lists, else '': what a paste
14
+ * links, since a copy from another document can name one this one lacks.
15
+ */
16
+ export declare const toLiveDomainId: (state: RootState, domainId?: string) => string;
17
+ /**
18
+ * The domain a pasted column keeps: a live one whose data type the column holds,
19
+ * else ''. A copy can name a domain whose type changed since it was taken, and a
20
+ * link off its domain's type would break the rule that a domain governs its type.
21
+ */
22
+ export declare function toPastedDomainId(state: RootState, domainId: string | undefined, dataType: string): string;
23
+ /**
24
+ * The name of the domain an id links, or '' while it links none in the
25
+ * document: a removed domain's name is kept for its undo and shown nowhere.
26
+ */
27
+ export declare function getLiveDomainName(state: RootState, domainId: string): string;
28
+ //# sourceMappingURL=membership.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { Ordered } from '@dineug/erd-editor-schema';
2
+ /** The keys of the rows a placement adds, and the listed rows it keys again. */
3
+ export type OrderPlacement = {
4
+ keys: string[];
5
+ rekeyed: Ordered[];
6
+ };
7
+ /**
8
+ * Keys for count new rows placed at index at of a sheet's rows in key order,
9
+ * rows.length for its end. Where no key fits between the neighbours, the rows
10
+ * around the place are keyed again with them, so the sheet reads as asked.
11
+ */
12
+ export declare function placeOrderKeys(rows: ReadonlyArray<Ordered>, at: number, count: number): OrderPlacement;
13
+ //# sourceMappingURL=orderKeys.d.ts.map
@@ -0,0 +1,24 @@
1
+ import { Term } from '../../../internal-types';
2
+ /** The most terms a logical name cell offers while it is typed. */
3
+ export declare const TERM_COMPLETION_LIMIT = 8;
4
+ /**
5
+ * The listed terms sorted by their keys in code unit order, one per name, the
6
+ * first listed answering for it; keys and terms share each position.
7
+ */
8
+ export type TermIndex = {
9
+ keys: ReadonlyArray<string>;
10
+ terms: ReadonlyArray<Term>;
11
+ };
12
+ /** A term name or a typed prefix as completion compares it: composed and in lower case. */
13
+ export declare const toTermKey: (text: string) => string;
14
+ /** Sorts the named terms by key, a name in two cases ordered by the name itself. */
15
+ export declare function buildTermIndex(terms: ReadonlyArray<Term>): TermIndex;
16
+ /** The term sheet's completion index, built once per generation of the sheet. */
17
+ export declare const getTermIndex: (state: import('../../state').RootState) => TermIndex;
18
+ /**
19
+ * The terms whose names start with what is typed, at most the limit, in key
20
+ * order. A lower bound search finds the first key, so a query reads at most
21
+ * one key per halving, then one per term it gives and one that ends the run.
22
+ */
23
+ export declare function completeTerms(index: TermIndex, typed: string, limit?: number): Term[];
24
+ //# sourceMappingURL=termIndex.d.ts.map