@rivm-loculus-tools/sequence-editor 0.1.7 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/dist/_chunks/EngineErrorUtil.js +18 -0
  2. package/dist/_chunks/EngineErrorUtil.js.map +1 -0
  3. package/dist/_chunks/SequenceEditor.js +311 -318
  4. package/dist/_chunks/SequenceEditor.js.map +1 -1
  5. package/dist/_chunks/SequenceEditorEventBusService.js +21 -0
  6. package/dist/_chunks/SequenceEditorEventBusService.js.map +1 -0
  7. package/dist/_chunks/SequenceEditorPageDrawer.js +112 -112
  8. package/dist/_chunks/SequenceEditorPageDrawer.js.map +1 -1
  9. package/dist/_chunks/comlink.js.map +1 -1
  10. package/dist/_chunks/react.js.map +1 -1
  11. package/dist/_chunks/sequenceEditorStore.js +4 -0
  12. package/dist/_chunks/sequenceEditorStore.js.map +1 -1
  13. package/dist/assets/{index-Dn92arD_.js → index-B5Du4hQk.js} +2 -2
  14. package/dist/assets/index-B5Du4hQk.js.map +1 -0
  15. package/dist/classes/services/EditorWorkerService/EditorWorkerService.d.ts +4 -6
  16. package/dist/classes/services/EditorWorkerService/index.js +112 -2
  17. package/dist/classes/services/EditorWorkerService/index.js.map +1 -0
  18. package/dist/classes/services/SequenceEditorEventBusService/SequenceEditorEventBusService.d.ts +2 -4
  19. package/dist/classes/services/SequenceEditorEventBusService/index.js +1 -16
  20. package/dist/classes/workers/EngineWorker/EngineWorker.d.ts +3 -2
  21. package/dist/classes/workers/EngineWorker/index.js +7 -8
  22. package/dist/classes/workers/EngineWorker/index.js.map +1 -1
  23. package/dist/components/app/App/App.d.ts +5 -1
  24. package/dist/components/app/App/index.js +7 -16
  25. package/dist/components/app/App/index.js.map +1 -1
  26. package/dist/components/ui/SequenceEditor/index.js +1 -2
  27. package/dist/components/ui/SequenceEditorPageDrawer/SequenceEditorPageDrawerColorForm.d.ts +1 -1
  28. package/dist/components/ui/SequenceEditorPageDrawer/index.js +1 -2
  29. package/dist/components/ui/SequenceEditorPageHeader/index.js +39 -38
  30. package/dist/components/ui/SequenceEditorPageHeader/index.js.map +1 -1
  31. package/dist/components/ui/SequenceEditorSearchBar/index.js +19 -18
  32. package/dist/components/ui/SequenceEditorSearchBar/index.js.map +1 -1
  33. package/dist/constants/editor.d.ts +1 -1
  34. package/dist/constants/editor.js.map +1 -1
  35. package/dist/constants/keyboard.js +36 -35
  36. package/dist/constants/keyboard.js.map +1 -1
  37. package/dist/constants/palette.d.ts +1 -1
  38. package/dist/constants/palette.js +138 -138
  39. package/dist/constants/palette.js.map +1 -1
  40. package/dist/models/config.models.d.ts +3 -0
  41. package/dist/models/config.models.js +0 -0
  42. package/dist/models/{model.d.ts → editor.models.d.ts} +8 -1
  43. package/dist/models/{model.js → editor.models.js} +6 -4
  44. package/dist/models/editor.models.js.map +1 -0
  45. package/dist/models/{palette.js → palette.models.js} +2 -2
  46. package/dist/models/palette.models.js.map +1 -0
  47. package/dist/{components/pages → pages}/SequenceEditorMainPage/index.js +25 -23
  48. package/dist/pages/SequenceEditorMainPage/index.js.map +1 -0
  49. package/dist/stores/sequenceEditorStore/index.js +1 -2
  50. package/dist/stores/sequenceEditorStore/sequenceEditorStore.d.ts +2 -1
  51. package/dist/utils/EditorUtil/EditorUtil.d.ts +3 -3
  52. package/dist/utils/EditorUtil/index.js +73 -64
  53. package/dist/utils/EditorUtil/index.js.map +1 -1
  54. package/dist/utils/EngineErrorUtil/index.d.ts +1 -0
  55. package/dist/utils/EngineErrorUtil/index.js +1 -0
  56. package/dist/utils/PaletteUtil/PaletteUtil.d.ts +1 -1
  57. package/dist/utils/PaletteUtil/index.js.map +1 -1
  58. package/dist/utils/SequenceEditorStandardConfigUtil/SequenceEditorStandardConfigUtil.d.ts +4 -0
  59. package/dist/utils/SequenceEditorStandardConfigUtil/index.d.ts +1 -0
  60. package/dist/utils/SequenceEditorStandardConfigUtil/index.js +19 -0
  61. package/dist/utils/SequenceEditorStandardConfigUtil/index.js.map +1 -0
  62. package/package.json +50 -46
  63. package/dist/_chunks/EditorWorkerService.js +0 -127
  64. package/dist/_chunks/EditorWorkerService.js.map +0 -1
  65. package/dist/assets/index-Dn92arD_.js.map +0 -1
  66. package/dist/classes/services/SequenceEditorEventBusService/index.js.map +0 -1
  67. package/dist/components/pages/EmptyWorkspace.d.ts +0 -3
  68. package/dist/components/pages/SequenceEditorErrorPage/SequenceEditorErrorPage.d.ts +0 -3
  69. package/dist/components/pages/SequenceEditorErrorPage/index.d.ts +0 -1
  70. package/dist/components/pages/SequenceEditorErrorPage/index.js +0 -12
  71. package/dist/components/pages/SequenceEditorErrorPage/index.js.map +0 -1
  72. package/dist/components/pages/SequenceEditorMainPage/index.js.map +0 -1
  73. package/dist/components/ui/SequenceEditorPage/SequenceEditorPage.d.ts +0 -5
  74. package/dist/components/ui/SequenceEditorPage/index.d.ts +0 -1
  75. package/dist/components/ui/SequenceEditorPage/index.js +0 -15
  76. package/dist/components/ui/SequenceEditorPage/index.js.map +0 -1
  77. package/dist/models/editor.d.ts +0 -6
  78. package/dist/models/editor.js +0 -8
  79. package/dist/models/editor.js.map +0 -1
  80. package/dist/models/index.d.ts +0 -3
  81. package/dist/models/model.js.map +0 -1
  82. package/dist/models/palette.js.map +0 -1
  83. /package/dist/models/{palette.d.ts → palette.models.d.ts} +0 -0
  84. /package/dist/{components/pages → pages}/SequenceEditorMainPage/SequenceEditorMainPage.d.ts +0 -0
  85. /package/dist/{components/pages → pages}/SequenceEditorMainPage/index.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/classes/workers/EngineWorker/EngineWorker.ts"],"sourcesContent":["/// <reference lib=\"webworker\" />\nimport { expose } from 'comlink';\nimport type { MoveDirection } from '@rivm-loculus-tools/sequence-editor-wasm';\nimport init, { MsaEngine } from '@rivm-loculus-tools/sequence-editor-wasm';\n\nimport type {\n EngineMeta,\n EngineSearchResult,\n EngineViewportResult,\n EngineWorkerApi,\n ViewportBounds,\n} from '../../../models';\n\n/**\n * MSA engine Web Worker.\n *\n * This worker is the **single owner** of the `MsaEngine` WASM instance and its\n * linear memory for the lifetime of the page. All Rust calls happen here, off\n * the main thread, so FASTA parsing, structural mutations, and undo/redo\n * snapshots never stall the React render loop.\n *\n * The class is exposed to the main thread through comlink, so every public\n * method is proxied as an asynchronous call across the worker boundary.\n */\nexport class EngineWorker implements EngineWorkerApi {\n private engine: MsaEngine | null = null;\n private initialization: null | Promise<void> = null;\n\n public async delete(rows: number[], column: number): Promise<void> {\n const engine = await this.requireEngine();\n engine.delete_at_subset(this.toRowIndices(rows), column);\n }\n\n public async deleteColumn(column: number): Promise<void> {\n const engine = await this.requireEngine();\n engine.delete_column(column);\n }\n\n public async exportFasta(): Promise<string> {\n const engine = await this.requireEngine();\n const records: string[] = [];\n for (let row = 0; row < engine.get_sequence_count(); row += 1) {\n const sequence: string[] = [];\n for (let column = 0; column < engine.get_row_length(row); column += 1) {\n sequence.push(String.fromCharCode(engine.get_base(row, column)));\n }\n records.push(`>${engine.get_name(row)}\\n${sequence.join('')}\\n`);\n }\n return records.join('');\n }\n\n /**\n * Idempotently instantiates the WASM module and constructs the engine.\n * Safe to call multiple times; concurrent callers share one initialization.\n */\n public async initialize(): Promise<void> {\n if (this.engine) {\n return;\n }\n if (!this.initialization) {\n this.initialization = (async () => {\n await init(undefined);\n this.engine = new MsaEngine();\n })();\n this.initialization.catch(() => {\n this.initialization = null;\n });\n }\n await this.initialization;\n }\n\n public async insert(rows: number[], column: number): Promise<void> {\n const engine = await this.requireEngine();\n engine.insert_at_subset(this.toRowIndices(rows), column);\n }\n\n public async load(fastaContent: string): Promise<number> {\n const engine = await this.requireEngine();\n return engine.load_fasta(fastaContent);\n }\n\n public async meta(): Promise<EngineMeta> {\n const engine = await this.requireEngine();\n return {\n alignmentWidth: engine.get_alignment_width(),\n redoDepth: engine.redo_depth(),\n sequenceCount: engine.get_sequence_count(),\n undoDepth: engine.undo_depth(),\n };\n }\n\n public async moveHorizontal(row: number, columns: number[], direction: MoveDirection): Promise<void> {\n const engine = await this.requireEngine();\n engine.move_horizontal(row, this.toRowIndices(columns), direction);\n }\n\n public async moveRowsDown(rows: number[]): Promise<void> {\n const engine = await this.requireEngine();\n engine.move_rows_down(this.toRowIndices(rows));\n }\n\n public async moveRowsUp(rows: number[]): Promise<void> {\n const engine = await this.requireEngine();\n engine.move_rows_up(this.toRowIndices(rows));\n }\n\n public async mutate(rows: number[], column: number, base: string): Promise<void> {\n const engine = await this.requireEngine();\n engine.mutate_base_subset(this.toRowIndices(rows), column, base.charCodeAt(0));\n }\n\n public async name(row: number): Promise<string> {\n const engine = await this.requireEngine();\n return engine.get_name(row);\n }\n\n public async redo(): Promise<boolean> {\n const engine = await this.requireEngine();\n return engine.redo();\n }\n\n public async search(query: string, checkRecordNames: boolean): Promise<EngineSearchResult> {\n const engine = await this.requireEngine();\n return engine.search(query, checkRecordNames) as EngineSearchResult;\n }\n\n public async translate(bounds: ViewportBounds, readingFrame: number): Promise<EngineViewportResult> {\n const engine = await this.requireEngine();\n this.validateBounds(bounds);\n const bytes = engine.translate(\n bounds.startRow,\n bounds.endRow,\n bounds.startCol,\n bounds.endCol,\n readingFrame,\n );\n return this.buildViewportResult(bytes, bounds);\n }\n\n public async undo(): Promise<boolean> {\n const engine = await this.requireEngine();\n return engine.undo();\n }\n\n public async viewport(bounds: ViewportBounds): Promise<EngineViewportResult> {\n const engine = await this.requireEngine();\n this.validateBounds(bounds);\n const bytes = engine.update_viewport(\n bounds.startRow,\n bounds.endRow,\n bounds.startCol,\n bounds.endCol,\n );\n return this.buildViewportResult(bytes, bounds);\n }\n\n /** Builds a fixed-stride viewport result from the engine's returned bytes. */\n private buildViewportResult(bytes: Uint8Array, bounds: ViewportBounds): EngineViewportResult {\n const columns = bounds.endCol - bounds.startCol + 1;\n const rows = columns > 0 ? Math.floor(bytes.byteLength / columns) : 0;\n return {\n bytes,\n cols: columns,\n rows,\n startCol: bounds.startCol,\n startRow: bounds.startRow,\n };\n }\n\n /** Returns the initialized engine, initializing it first if necessary. */\n private async requireEngine(): Promise<MsaEngine> {\n await this.initialize();\n if (!this.engine) {\n throw new Error('Engine failed to initialize');\n }\n return this.engine;\n }\n\n /** Converts a plain row-index list into the typed array the WASM API expects. */\n private toRowIndices(rows: number[]): Uint32Array {\n return new Uint32Array(rows);\n }\n\n /** Validates that viewport/translation bounds are safe, non-negative, and ordered. */\n private validateBounds(bounds: ViewportBounds): void {\n const values = [bounds.startRow, bounds.endRow, bounds.startCol, bounds.endCol];\n if (!values.every((value) => Number.isSafeInteger(value) && value >= 0)) {\n throw new Error('Viewport bounds must be non-negative safe integers');\n }\n if (bounds.startRow > bounds.endRow || bounds.startCol > bounds.endCol) {\n throw new Error('Viewport bounds must be ordered (start <= end)');\n }\n }\n}\n\nexpose(new EngineWorker());\n"],"mappings":";;;AAwBA,IAAa,IAAb,MAAqD;CACnD,SAAmC;CACnC,iBAA+C;CAE/C,MAAa,OAAO,GAAgB,GAA+B;EAEjE,CAAA,MADqB,KAAK,cAAc,EAAA,CACjC,iBAAiB,KAAK,aAAa,CAAI,GAAG,CAAM;CACzD;CAEA,MAAa,aAAa,GAA+B;EAEvD,CAAA,MADqB,KAAK,cAAc,EAAA,CACjC,cAAc,CAAM;CAC7B;CAEA,MAAa,cAA+B;EAC1C,IAAM,IAAS,MAAM,KAAK,cAAc,GAClC,IAAoB,CAAC;EAC3B,KAAK,IAAI,IAAM,GAAG,IAAM,EAAO,mBAAmB,GAAG,KAAO,GAAG;GAC7D,IAAM,IAAqB,CAAC;GAC5B,KAAK,IAAI,IAAS,GAAG,IAAS,EAAO,eAAe,CAAG,GAAG,KAAU,GAClE,EAAS,KAAK,OAAO,aAAa,EAAO,SAAS,GAAK,CAAM,CAAC,CAAC;GAEjE,EAAQ,KAAK,IAAI,EAAO,SAAS,CAAG,EAAE,IAAI,EAAS,KAAK,EAAE,EAAE,GAAG;EACjE;EACA,OAAO,EAAQ,KA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D;EAEtE,IAAI,EAAO,WAAW,EAAO,UAAU,EAAO,WAAW,EAAO,QAC9D,MAAU,MAAM,gDAAgD;CAEpE;AACF;AAEA,EAAO,IAAI,EAAa,CAAC"}
1
+ {"version":3,"file":"index.js","names":["expose","init","EngineWorker","rows","column","bytes","MsaEngine","fastaContent","engine","row","columns","direction","base","query","checkRecordNames","bounds","readingFrame","value"],"sources":["../../../../src/classes/workers/EngineWorker/EngineWorker.ts"],"sourcesContent":["/// <reference lib=\"webworker\" />\nimport { expose } from 'comlink';\nimport type { MoveDirection } from '@rivm-loculus-tools/sequence-editor-wasm';\nimport init, { MsaEngine } from '@rivm-loculus-tools/sequence-editor-wasm';\n\nimport type {\n EngineMeta,\n EngineSearchResult,\n EngineViewportResult,\n EngineWorkerApi,\n ViewportBounds,\n} from '../../../models/editor.models';\n\n/**\n * MSA engine Web Worker.\n *\n * This worker is the **single owner** of the `MsaEngine` WASM instance and its\n * linear memory for the lifetime of the page. All Rust calls happen here, off\n * the main thread, so FASTA parsing, structural mutations, and undo/redo\n * snapshots never stall the React render loop.\n *\n * The class is exposed to the main thread through comlink, so every public\n * method is proxied as an asynchronous call across the worker boundary.\n */\nexport class EngineWorker implements EngineWorkerApi {\n private engine: MsaEngine | null = null;\n private initialization: null | Promise<void> = null;\n\n public async delete(rows: number[], column: number): Promise<void> {\n const engine = await this.requireEngine();\n engine.delete_at_subset(this.toRowIndices(rows), column);\n }\n\n public async deleteColumn(column: number): Promise<void> {\n const engine = await this.requireEngine();\n engine.delete_column(column);\n }\n\n public async exportGappedFasta(): Promise<string> {\n const engine = await this.requireEngine();\n const bytes = engine.export_gapped_fasta();\n return new TextDecoder().decode(bytes);\n }\n\n public async exportUngappedFasta(): Promise<string> {\n const engine = await this.requireEngine();\n const bytes = engine.export_ungapped_fasta();\n return new TextDecoder().decode(bytes);\n }\n\n /**\n * Idempotently instantiates the WASM module and constructs the engine.\n * Safe to call multiple times; concurrent callers share one initialization.\n */\n public async initialize(): Promise<void> {\n if (this.engine) {\n return;\n }\n if (!this.initialization) {\n this.initialization = (async () => {\n await init(undefined);\n this.engine = new MsaEngine();\n })();\n this.initialization.catch(() => {\n this.initialization = null;\n });\n }\n await this.initialization;\n }\n\n public async insert(rows: number[], column: number): Promise<void> {\n const engine = await this.requireEngine();\n engine.insert_at_subset(this.toRowIndices(rows), column);\n }\n\n public async load(fastaContent: string): Promise<number> {\n const engine = await this.requireEngine();\n return engine.load_fasta(fastaContent);\n }\n\n public async meta(): Promise<EngineMeta> {\n const engine = await this.requireEngine();\n return {\n alignmentWidth: engine.get_alignment_width(),\n redoDepth: engine.redo_depth(),\n sequenceCount: engine.get_sequence_count(),\n undoDepth: engine.undo_depth(),\n };\n }\n\n public async moveHorizontal(row: number, columns: number[], direction: MoveDirection): Promise<void> {\n const engine = await this.requireEngine();\n engine.move_horizontal(row, this.toRowIndices(columns), direction);\n }\n\n public async moveRowsDown(rows: number[]): Promise<void> {\n const engine = await this.requireEngine();\n engine.move_rows_down(this.toRowIndices(rows));\n }\n\n public async moveRowsUp(rows: number[]): Promise<void> {\n const engine = await this.requireEngine();\n engine.move_rows_up(this.toRowIndices(rows));\n }\n\n public async mutate(rows: number[], column: number, base: string): Promise<void> {\n const engine = await this.requireEngine();\n engine.mutate_base_subset(this.toRowIndices(rows), column, base.charCodeAt(0));\n }\n\n public async name(row: number): Promise<string> {\n const engine = await this.requireEngine();\n return engine.get_name(row);\n }\n\n public async redo(): Promise<boolean> {\n const engine = await this.requireEngine();\n return engine.redo();\n }\n\n public async search(query: string, checkRecordNames: boolean): Promise<EngineSearchResult> {\n const engine = await this.requireEngine();\n return engine.search(query, checkRecordNames) as EngineSearchResult;\n }\n\n public async translate(bounds: ViewportBounds, readingFrame: number): Promise<EngineViewportResult> {\n const engine = await this.requireEngine();\n this.validateBounds(bounds);\n const bytes = engine.translate(\n bounds.startRow,\n bounds.endRow,\n bounds.startCol,\n bounds.endCol,\n readingFrame,\n );\n return this.buildViewportResult(bytes, bounds);\n }\n\n public async undo(): Promise<boolean> {\n const engine = await this.requireEngine();\n return engine.undo();\n }\n\n public async viewport(bounds: ViewportBounds): Promise<EngineViewportResult> {\n const engine = await this.requireEngine();\n this.validateBounds(bounds);\n const bytes = engine.update_viewport(\n bounds.startRow,\n bounds.endRow,\n bounds.startCol,\n bounds.endCol,\n );\n return this.buildViewportResult(bytes, bounds);\n }\n\n /** Builds a fixed-stride viewport result from the engine's returned bytes. */\n private buildViewportResult(bytes: Uint8Array, bounds: ViewportBounds): EngineViewportResult {\n const columns = bounds.endCol - bounds.startCol + 1;\n const rows = columns > 0 ? Math.floor(bytes.byteLength / columns) : 0;\n return {\n bytes,\n cols: columns,\n rows,\n startCol: bounds.startCol,\n startRow: bounds.startRow,\n };\n }\n\n /** Returns the initialized engine, initializing it first if necessary. */\n private async requireEngine(): Promise<MsaEngine> {\n await this.initialize();\n if (!this.engine) {\n throw new Error('Engine failed to initialize');\n }\n return this.engine;\n }\n\n /** Converts a plain row-index list into the typed array the WASM API expects. */\n private toRowIndices(rows: number[]): Uint32Array {\n return new Uint32Array(rows);\n }\n\n /** Validates that viewport/translation bounds are safe, non-negative, and ordered. */\n private validateBounds(bounds: ViewportBounds): void {\n const values = [bounds.startRow, bounds.endRow, bounds.startCol, bounds.endCol];\n if (!values.every((value) => Number.isSafeInteger(value) && value >= 0)) {\n throw new Error('Viewport bounds must be non-negative safe integers');\n }\n if (bounds.startRow > bounds.endRow || bounds.startCol > bounds.endCol) {\n throw new Error('Viewport bounds must be ordered (start <= end)');\n }\n }\n}\n\nexpose(new EngineWorker());\n"],"mappings":";;;AAwBA,IAAaE,IAAb,MAAqD;CACnD,SAAmC;CACnC,iBAA+C;CAE/C,MAAa,OAAO,GAAgB,GAA+B;EAEjE,CAAA,MADqB,KAAK,cAAc,EAAA,CACjC,iBAAiB,KAAK,aAAaC,CAAI,GAAGC,CAAM;CACzD;CAEA,MAAa,aAAa,GAA+B;EAEvD,CAAA,MADqB,KAAK,cAAc,EAAA,CACjC,c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EAEhD,IADA,MAAM,KAAK,WAAW,GAClB,CAAC,KAAK,QACR,MAAU,MAAM,6BAA6B;EAE/C,OAAO,KAAK;CACd;CAGA,aAAqB,GAA6B;EAChD,OAAO,IAAI,YAAYZ,CAAI;CAC7B;CAGA,eAAuB,GAA8B;EAEnD,IAAI,CAAC;GADWY,EAAO;GAAUA,EAAO;GAAQA,EAAO;GAAUA,EAAO;EACnE,CAAA,CAAO,OAAO,MAAU,OAAO,cAAcE,CAAK,KAAKA,KAAS,CAAC,GACpE,MAAU,MAAM,oDAAoD;EAEtE,IAAIF,EAAO,WAAWA,EAAO,UAAUA,EAAO,WAAWA,EAAO,QAC9D,MAAU,MAAM,gDAAgD;CAEpE;AACF;AAEAf,EAAO,IAAIE,EAAa,CAAC"}
@@ -1 +1,5 @@
1
- export declare const App: () => import('react').JSX.Element;
1
+ import { DependencyContainer } from 'tsyringe';
2
+ export type SequenceEditorAppProps = {
3
+ readonly container: DependencyContainer;
4
+ };
5
+ export declare const SequenceEditorApp: ({ container }: SequenceEditorAppProps) => import('react').JSX.Element;
@@ -1,21 +1,12 @@
1
- import { SequenceEditorMainPage as e } from "../../pages/SequenceEditorMainPage/index.js";
2
- import { SequenceEditorErrorPage as t } from "../../pages/SequenceEditorErrorPage/index.js";
3
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
- import { PageCommonContextProvider as i } from "@rivm-loculus-tools/common-frontend/components/page";
5
- import { CssBaseline as a } from "@mui/material";
6
- import { ThemeProvider as o } from "@mui/material/styles";
7
- import { ErrorBoundary as s } from "react-error-boundary";
8
- import { theme as c } from "@rivm-loculus-tools/common-frontend/theme";
9
- import { I18nWrapper as l } from "@rivm-loculus-tools/common-frontend/components/I18nWrapper";
1
+ import { SequenceEditorMainPage as e } from "../../../pages/SequenceEditorMainPage/index.js";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import { App as n } from "@rivm-loculus-tools/common-frontend/components/app/App";
10
4
  //#region src/components/app/App/App.tsx
11
- var u = () => /* @__PURE__ */ n(s, {
12
- FallbackComponent: t,
13
- children: /* @__PURE__ */ n(l, { children: /* @__PURE__ */ r(o, {
14
- theme: c,
15
- children: [/* @__PURE__ */ n(a, {}), /* @__PURE__ */ n(i, { children: /* @__PURE__ */ n(e, {}) })]
16
- }) })
5
+ var r = ({ container: r }) => /* @__PURE__ */ t(n, {
6
+ container: r,
7
+ children: /* @__PURE__ */ t(e, {})
17
8
  });
18
9
  //#endregion
19
- export { u as App };
10
+ export { r as SequenceEditorApp };
20
11
 
21
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/app/App/App.tsx"],"sourcesContent":["import { CssBaseline } from '@mui/material';\nimport { ThemeProvider } from '@mui/material/styles';\nimport { ErrorBoundary } from 'react-error-boundary';\nimport { theme } from '@rivm-loculus-tools/common-frontend/theme';\nimport { I18nWrapper } from '@rivm-loculus-tools/common-frontend/components/I18nWrapper';\nimport { PageCommonContextProvider } from '@rivm-loculus-tools/common-frontend/components/page';\n\nimport { SequenceEditorMainPage } from '../../pages/SequenceEditorMainPage';\nimport { SequenceEditorErrorPage } from '../../pages/SequenceEditorErrorPage';\n\nexport const App = () => (\n <ErrorBoundary FallbackComponent={SequenceEditorErrorPage}>\n <I18nWrapper>\n <ThemeProvider theme={theme}>\n <CssBaseline />\n <PageCommonContextProvider>\n <SequenceEditorMainPage />\n </PageCommonContextProvider>\n </ThemeProvider>\n </I18nWrapper>\n </ErrorBoundary>\n);\n"],"mappings":";;;;;;;;;;AAUA,IAAa,UACX,kBAAC,GAAD;CAAe,mBAAmB;CAChC,UAAA,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD;EAAsB;EAAtB,UAAA,CACE,kBAAC,GAAD,CAAc,CAAA,GACd,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,CAAyB,CAAA,EACA,CAAA,CACd;CACJ,CAAA,EAAA,CAAA;AACA,CAAA"}
1
+ {"version":3,"file":"index.js","names":["SequenceEditorApp","App","SequenceEditorMainPage"],"sources":["../../../../src/components/app/App/App.tsx"],"sourcesContent":["import type { DependencyContainer } from 'tsyringe';\nimport { App } from '@rivm-loculus-tools/common-frontend/components/app/App';\n\nimport { SequenceEditorMainPage } from '../../../pages/SequenceEditorMainPage';\n\nexport type SequenceEditorAppProps = {\n readonly container: DependencyContainer;\n};\n\nexport const SequenceEditorApp = ({ container }: SequenceEditorAppProps) => {\n return (\n <App container={container}>\n <SequenceEditorMainPage />\n </App>\n );\n};\n"],"mappings":";;;;AASA,IAAaA,KAAqB,EAAE,mBAEhC,kBAACC,GAAD;CAAgB;CACd,UAAA,kBAACC,GAAD,CAAyB,CAAA;AACtB,CAAA"}
@@ -1,2 +1 @@
1
- import { t as e } from "../../../_chunks/SequenceEditor.js";
2
- export { e as SequenceEditor };
1
+ export { t as SequenceEditor } from "../../../_chunks/SequenceEditor.js";
@@ -1,4 +1,4 @@
1
- import { AminoAcidPalette, NucleotidePalette } from '../../../models';
1
+ import { AminoAcidPalette, NucleotidePalette } from '../../../models/palette.models';
2
2
  export type SequenceEditorPageDrawerColorFormProps<TPalette extends AminoAcidPalette | NucleotidePalette> = {
3
3
  currentPalette: TPalette;
4
4
  onPaletteChange: (palettes: TPalette) => void;
@@ -1,2 +1 @@
1
- import { t as e } from "../../../_chunks/SequenceEditorPageDrawer.js";
2
- export { e as SequenceEditorPageDrawer };
1
+ export { t as SequenceEditorPageDrawer } from "../../../_chunks/SequenceEditorPageDrawer.js";
@@ -1,60 +1,61 @@
1
- import { SequenceEditorEventBusService as e } from "../../../classes/services/SequenceEditorEventBusService/index.js";
2
- import { t } from "../../../_chunks/sequenceEditorStore.js";
3
- import { t as n } from "../../../_chunks/react.js";
1
+ import { t as e } from "../../../_chunks/sequenceEditorStore.js";
2
+ import { t } from "../../../_chunks/react.js";
3
+ import { t as n } from "../../../_chunks/SequenceEditorEventBusService.js";
4
4
  import { useCallback as r } from "react";
5
- import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
6
- import { FastaPageHeaderCenterComponent as s } from "@rivm-loculus-tools/common-frontend/components/FastaPageHeaderCenterComponent";
7
- import { FastaPageHeaderImportButton as c } from "@rivm-loculus-tools/common-frontend/components/FastaPageHeaderImportButton";
8
- import { FastaPageHeaderResetButton as l } from "@rivm-loculus-tools/common-frontend/components/FastaPageHeaderResetButton";
9
- import { PageCommonHeader as u } from "@rivm-loculus-tools/common-frontend/components/page";
10
- import { PageHeaderDocumentationButton as d } from "@rivm-loculus-tools/common-frontend/components/PageHeaderDocumentationButton";
11
- import f from "@mui/icons-material/BiotechOutlined";
12
- import p from "@mui/icons-material/Undo";
13
- import m from "@mui/icons-material/Redo";
14
- import { IconButton as h, Tooltip as g } from "@mui/material";
5
+ import { IconButton as i, Tooltip as a } from "@mui/material";
6
+ import { container as o } from "tsyringe";
7
+ import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
8
+ import { FastaPageHeaderCenterComponent as u } from "@rivm-loculus-tools/common-frontend/components/fasta/FastaPageHeaderCenterComponent";
9
+ import { FastaPageHeaderImportButton as d } from "@rivm-loculus-tools/common-frontend/components/fasta/FastaPageHeaderImportButton";
10
+ import { FastaPageHeaderResetButton as f } from "@rivm-loculus-tools/common-frontend/components/fasta/FastaPageHeaderResetButton";
11
+ import { PageCommonHeader as p } from "@rivm-loculus-tools/common-frontend/components/ui/PageCommonHeader";
12
+ import m from "@mui/icons-material/BiotechOutlined";
13
+ import h from "@mui/icons-material/Undo";
14
+ import g from "@mui/icons-material/Redo";
15
+ import { PageHeaderDocumentationButton as _ } from "@rivm-loculus-tools/common-frontend/components/ui/PageHeaderDocumentationButton";
15
16
  //#region src/components/ui/SequenceEditorPageHeader/SequenceEditorPageHeader.tsx
16
- var _ = () => {
17
- let _ = n(t, (e) => e.resetDataset), v = n(t, (e) => e.meta), y = r(() => {
18
- _();
19
- }, [_]), b = r(() => {
20
- e.getInstance().emit("onUndo");
21
- }, []), x = r(() => {
22
- e.getInstance().emit("onRedo");
17
+ var v = () => {
18
+ let v = t(e, (e) => e.resetDataset), y = t(e, (e) => e.meta), b = r(() => {
19
+ v();
20
+ }, [v]), x = r(() => {
21
+ o.resolve(n).emit("onUndo");
22
+ }, []), S = r(() => {
23
+ o.resolve(n).emit("onRedo");
23
24
  }, []);
24
- return /* @__PURE__ */ a(u, {
25
- centerComponent: /* @__PURE__ */ a(s, { store: t }),
26
- icon: /* @__PURE__ */ a(f, { sx: { fontSize: 24 } }),
27
- rightComponent: /* @__PURE__ */ o(i, { children: [
28
- /* @__PURE__ */ a(c, {}),
29
- /* @__PURE__ */ a(g, {
25
+ return /* @__PURE__ */ c(p, {
26
+ centerComponent: /* @__PURE__ */ c(u, { store: e }),
27
+ icon: /* @__PURE__ */ c(m, { sx: { fontSize: 24 } }),
28
+ rightComponent: /* @__PURE__ */ l(s, { children: [
29
+ /* @__PURE__ */ c(d, {}),
30
+ /* @__PURE__ */ c(a, {
30
31
  title: "Undo last action",
31
- children: /* @__PURE__ */ a(h, {
32
+ children: /* @__PURE__ */ c(i, {
32
33
  color: "inherit",
33
- disabled: v?.undoDepth === 0,
34
- onClick: b,
34
+ disabled: y?.undoDepth === 0,
35
+ onClick: x,
35
36
  size: "small",
36
37
  sx: { opacity: .85 },
37
- children: /* @__PURE__ */ a(p, { fontSize: "small" })
38
+ children: /* @__PURE__ */ c(h, { fontSize: "small" })
38
39
  })
39
40
  }),
40
- /* @__PURE__ */ a(g, {
41
+ /* @__PURE__ */ c(a, {
41
42
  title: "Redo last action",
42
- children: /* @__PURE__ */ a(h, {
43
+ children: /* @__PURE__ */ c(i, {
43
44
  color: "inherit",
44
- disabled: v?.redoDepth === 0,
45
- onClick: x,
45
+ disabled: y?.redoDepth === 0,
46
+ onClick: S,
46
47
  size: "small",
47
48
  sx: { opacity: .85 },
48
- children: /* @__PURE__ */ a(m, { fontSize: "small" })
49
+ children: /* @__PURE__ */ c(g, { fontSize: "small" })
49
50
  })
50
51
  }),
51
- /* @__PURE__ */ a(l, { onReset: y }),
52
- /* @__PURE__ */ a(d, {})
52
+ /* @__PURE__ */ c(f, { onReset: b }),
53
+ /* @__PURE__ */ c(_, {})
53
54
  ] }),
54
55
  title: "Sequence Editor"
55
56
  });
56
57
  };
57
58
  //#endregion
58
- export { _ as SequenceEditorPageHeader };
59
+ export { v as SequenceEditorPageHeader };
59
60
 
60
61
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/ui/SequenceEditorPageHeader/SequenceEditorPageHeader.tsx"],"sourcesContent":["import { FastaPageHeaderCenterComponent } from '@rivm-loculus-tools/common-frontend/components/FastaPageHeaderCenterComponent';\nimport { FastaPageHeaderImportButton } from '@rivm-loculus-tools/common-frontend/components/FastaPageHeaderImportButton';\nimport { FastaPageHeaderResetButton } from '@rivm-loculus-tools/common-frontend/components/FastaPageHeaderResetButton';\nimport { PageCommonHeader } from '@rivm-loculus-tools/common-frontend/components/page';\nimport { PageHeaderDocumentationButton } from '@rivm-loculus-tools/common-frontend/components/PageHeaderDocumentationButton';\nimport { useCallback } from 'react';\nimport { useStore } from 'zustand';\nimport BiotechOutlinedIcon from '@mui/icons-material/BiotechOutlined';\nimport UndoIcon from '@mui/icons-material/Undo';\nimport RedoIcon from '@mui/icons-material/Redo';\nimport {\n IconButton,\n Tooltip,\n} from '@mui/material';\n\nimport { sequenceEditorStore } from '../../../stores/sequenceEditorStore';\nimport { SequenceEditorEventBusService } from '../../../classes/services/SequenceEditorEventBusService';\n\nexport const SequenceEditorPageHeader = () => {\n const resetDataset = useStore(sequenceEditorStore, (state) => state.resetDataset);\n const meta = useStore(sequenceEditorStore, (state) => state.meta);\n\n const onReset = useCallback(() => {\n resetDataset();\n }, [resetDataset]);\n\n const onUndoButtonClick = useCallback(() => {\n SequenceEditorEventBusService.getInstance().emit('onUndo');\n }, []);\n\n const onRedoButtonClick = useCallback(() => {\n SequenceEditorEventBusService.getInstance().emit('onRedo');\n }, []);\n\n return (\n <PageCommonHeader\n centerComponent={<FastaPageHeaderCenterComponent store={sequenceEditorStore} />}\n icon={<BiotechOutlinedIcon sx={{ fontSize: 24 }} />}\n rightComponent={(\n <>\n <FastaPageHeaderImportButton />\n <Tooltip title={'Undo last action'}>\n <IconButton\n color={'inherit'}\n disabled={meta?.undoDepth === 0}\n onClick={onUndoButtonClick}\n size={'small'}\n sx={{ opacity: 0.85 }}\n >\n <UndoIcon fontSize={'small'} />\n </IconButton>\n </Tooltip>\n <Tooltip title={'Redo last action'}>\n <IconButton\n color={'inherit'}\n disabled={meta?.redoDepth === 0}\n onClick={onRedoButtonClick}\n size={'small'}\n sx={{ opacity: 0.85 }}\n >\n <RedoIcon fontSize={'small'} />\n </IconButton>\n </Tooltip>\n <FastaPageHeaderResetButton onReset={onReset} />\n <PageHeaderDocumentationButton />\n </>\n )}\n title={'Sequence Editor'}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AAkBA,IAAa,UAAiC;CAC5C,IAAM,IAAe,EAAS,IAAsB,MAAU,EAAM,YAAY,GAC1E,IAAO,EAAS,IAAsB,MAAU,EAAM,IAAI,GAE1D,IAAU,QAAkB;EAChC,EAAa;CACf,GAAG,CAAC,CAAY,CAAC,GAEX,IAAoB,QAAkB;EAC1C,EAA8B,YAAY,CAAC,CAAC,KAAK,QAAQ;CAC3D,GAAG,CAAC,CAAC,GAEC,IAAoB,QAAkB;EAC1C,EAA8B,YAAY,CAAC,CAAC,KAAK,QAAQ;CAC3D,GAAG,CAAC,CAAC;CAEL,OACE,kBAAC,GAAD;EACE,iBAAiB,kBAAC,GAAD,EAAgC,OAAO,EAAsB,CAAA;EAC9E,MAAM,kBAAC,GAAD,EAAqB,IAAI,EAAE,UAAU,GAAG,EAAI,CAAA;EAClD,gBACE,kBAAA,GAAA,EAAA,UAAA;GACE,kBAAC,GAAD,CAA8B,CAAA;GAC9B,kBAAC,GAAD;IAAS,OAAO;IACd,UAAA,kBAAC,GAAD;KACE,OAAO;KACP,UAAU,GAAM,cAAc;KAC9B,SAAS;KACT,MAAM;KACN,IAAI,EAAE,SAAS,IAAK;KAEpB,UAAA,kBAAC,GAAD,EAAU,UAAU,QAAU,CAAA;IACpB,CAAA;GACL,CAAA;GACT,kBAAC,GAAD;IAAS,OAAO;IACd,UAAA,kBAAC,GAAD;KACE,OAAO;KACP,UAAU,GAAM,cAAc;KAC9B,SAAS;KACT,MAAM;KACN,IAAI,EAAE,SAAS,IAAK;KAEpB,UAAA,kBAAC,GAAD,EAAU,UAAU,QAAU,CAAA;IACpB,CAAA;GACL,CAAA;GACT,kBAAC,GAAD,EAAqC,WAAU,CAAA;GAC/C,kBAAC,GAAD,CAAgC,CAAA;EAChC,EAAA,CAAA;EAEJ,OAAO;CACR,CAAA;AAEL"}
1
+ {"version":3,"file":"index.js","names":["_Fragment","sequenceEditorStore","SequenceEditorEventBusService","BiotechOutlinedIcon","UndoIcon","RedoIcon","SequenceEditorPageHeader","resetDataset","useStore","state","meta","onReset","useCallback","onUndoButtonClick","onRedoButtonClick","PageCommonHeader","FastaPageHeaderCenterComponent","Fragment","FastaPageHeaderImportButton","Tooltip","IconButton","FastaPageHeaderResetButton","PageHeaderDocumentationButton"],"sources":["../../../../src/components/ui/SequenceEditorPageHeader/SequenceEditorPageHeader.tsx"],"sourcesContent":["import { container } from 'tsyringe';\nimport { FastaPageHeaderCenterComponent } from '@rivm-loculus-tools/common-frontend/components/fasta/FastaPageHeaderCenterComponent';\nimport { FastaPageHeaderImportButton } from '@rivm-loculus-tools/common-frontend/components/fasta/FastaPageHeaderImportButton';\nimport { FastaPageHeaderResetButton } from '@rivm-loculus-tools/common-frontend/components/fasta/FastaPageHeaderResetButton';\nimport { PageCommonHeader } from '@rivm-loculus-tools/common-frontend/components/ui/PageCommonHeader';\nimport { useCallback } from 'react';\nimport { useStore } from 'zustand';\nimport BiotechOutlinedIcon from '@mui/icons-material/BiotechOutlined';\nimport UndoIcon from '@mui/icons-material/Undo';\nimport RedoIcon from '@mui/icons-material/Redo';\nimport {\n IconButton,\n Tooltip,\n} from '@mui/material';\nimport { PageHeaderDocumentationButton } from '@rivm-loculus-tools/common-frontend/components/ui/PageHeaderDocumentationButton';\n\nimport { sequenceEditorStore } from '../../../stores/sequenceEditorStore';\nimport { SequenceEditorEventBusService } from '../../../classes/services/SequenceEditorEventBusService';\n\nexport const SequenceEditorPageHeader = () => {\n const resetDataset = useStore(sequenceEditorStore, (state) => state.resetDataset);\n const meta = useStore(sequenceEditorStore, (state) => state.meta);\n\n const onReset = useCallback(() => {\n resetDataset();\n }, [resetDataset]);\n\n const onUndoButtonClick = useCallback(() => {\n container.resolve(SequenceEditorEventBusService).emit('onUndo');\n }, []);\n\n const onRedoButtonClick = useCallback(() => {\n container.resolve(SequenceEditorEventBusService).emit('onRedo');\n }, []);\n\n return (\n <PageCommonHeader\n centerComponent={<FastaPageHeaderCenterComponent store={sequenceEditorStore} />}\n icon={<BiotechOutlinedIcon sx={{ fontSize: 24 }} />}\n rightComponent={(\n <>\n <FastaPageHeaderImportButton />\n <Tooltip title={'Undo last action'}>\n <IconButton\n color={'inherit'}\n disabled={meta?.undoDepth === 0}\n onClick={onUndoButtonClick}\n size={'small'}\n sx={{ opacity: 0.85 }}\n >\n <UndoIcon fontSize={'small'} />\n </IconButton>\n </Tooltip>\n <Tooltip title={'Redo last action'}>\n <IconButton\n color={'inherit'}\n disabled={meta?.redoDepth === 0}\n onClick={onRedoButtonClick}\n size={'small'}\n sx={{ opacity: 0.85 }}\n >\n <RedoIcon fontSize={'small'} />\n </IconButton>\n </Tooltip>\n <FastaPageHeaderResetButton onReset={onReset} />\n <PageHeaderDocumentationButton />\n </>\n )}\n title={'Sequence Editor'}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAmBA,IAAaM,UAAiC;CAC5C,IAAMC,IAAeC,EAASP,IAAsB,MAAUQ,EAAM,YAAY,GAC1EC,IAAOF,EAASP,IAAsB,MAAUQ,EAAM,IAAI,GAE1DE,IAAUC,QAAkB;EAChC,EAAa;CACf,GAAG,CAACL,CAAY,CAAC,GAEXM,IAAoBD,QAAkB;EAC1C,EAAU,QAAQV,CAA6B,CAAC,CAAC,KAAK,QAAQ;CAChE,GAAG,CAAC,CAAC,GAECY,IAAoBF,QAAkB;EAC1C,EAAU,QAAQV,CAA6B,CAAC,CAAC,KAAK,QAAQ;CAChE,GAAG,CAAC,CAAC;CAEL,OACE,kBAACa,GAAD;EACE,iBAAiB,kBAACC,GAAD,EAAgC,OAAOf,EAAsB,CAAA;EAC9E,MAAM,kBAACE,GAAD,EAAqB,IAAI,EAAE,UAAU,GAAG,EAAI,CAAA;EAClD,gBACE,kBAAAH,GAAA,EAAA,UAAA;GACE,kBAACkB,GAAD,CAA8B,CAAA;GAC9B,kBAACC,GAAD;IAAS,OAAO;IACd,UAAA,kBAACC,GAAD;KACE,OAAO;KACP,UAAUV,GAAM,cAAc;KAC9B,SAASG;KACT,MAAM;KACN,IAAI,EAAE,SAAS,IAAK;KAEpB,UAAA,kBAACT,GAAD,EAAU,UAAU,QAAU,CAAA;IACpB,CAAA;GACL,CAAA;GACT,kBAACe,GAAD;IAAS,OAAO;IACd,UAAA,kBAACC,GAAD;KACE,OAAO;KACP,UAAUV,GAAM,cAAc;KAC9B,SAASI;KACT,MAAM;KACN,IAAI,EAAE,SAAS,IAAK;KAEpB,UAAA,kBAACT,GAAD,EAAU,UAAU,QAAU,CAAA;IACpB,CAAA;GACL,CAAA;GACT,kBAACgB,GAAD,EAAqC,WAAU,CAAA;GAC/C,kBAACC,GAAD,CAAgC,CAAA;EAChC,EAAA,CAAA;EAEJ,OAAO;CACR,CAAA;AAEL"}
@@ -1,27 +1,28 @@
1
- import { SequenceEditorEventBusService as e } from "../../../classes/services/SequenceEditorEventBusService/index.js";
2
- import { t } from "../../../_chunks/sequenceEditorStore.js";
3
- import { t as n } from "../../../_chunks/react.js";
1
+ import { t as e } from "../../../_chunks/sequenceEditorStore.js";
2
+ import { t } from "../../../_chunks/react.js";
3
+ import { t as n } from "../../../_chunks/SequenceEditorEventBusService.js";
4
4
  import { useCallback as r } from "react";
5
- import { SearchBar as i } from "@rivm-loculus-tools/common-frontend/components/SearchBar";
5
+ import { container as i } from "tsyringe";
6
6
  import { jsx as a } from "react/jsx-runtime";
7
+ import { SearchBar as o } from "@rivm-loculus-tools/common-frontend/components/SearchBar";
7
8
  //#region src/components/ui/SequenceEditorSearchBar/SequenceEditorSearchBar.tsx
8
- var o = () => {
9
- let o = n(t, (e) => e.setSearchQuery), s = n(t, (e) => e.setSearchResultHighlightedIndex), c = n(t, (e) => e.searchQuery), l = n(t, (e) => e.searchResult), u = n(t, (e) => e.searchResultHighlightedIndex), d = r((t) => {
10
- o(t), e.getInstance().emit("onSearch", t);
11
- }, [o]), f = r((e) => {
12
- s(e);
13
- }, [s]);
14
- return /* @__PURE__ */ a(i, {
9
+ var s = () => {
10
+ let s = t(e, (e) => e.setSearchQuery), c = t(e, (e) => e.setSearchResultHighlightedIndex), l = t(e, (e) => e.searchQuery), u = t(e, (e) => e.searchResult), d = t(e, (e) => e.searchResultHighlightedIndex), f = r((e) => {
11
+ s(e), i.resolve(n).emit("onSearch", e);
12
+ }, [s]), p = r((e) => {
13
+ c(e);
14
+ }, [c]);
15
+ return /* @__PURE__ */ a(o, {
15
16
  allowNavigation: !0,
16
- highlightedIndex: u,
17
- numResults: l?.num_matches,
18
- onHighlightedIndexChange: f,
19
- onSearchQueryChange: d,
20
- searchQuery: c,
21
- truncated: l?.truncated
17
+ highlightedIndex: d,
18
+ numResults: u?.num_matches,
19
+ onHighlightedIndexChange: p,
20
+ onSearchQueryChange: f,
21
+ searchQuery: l,
22
+ truncated: u?.truncated
22
23
  });
23
24
  };
24
25
  //#endregion
25
- export { o as SequenceEditorSearchBar };
26
+ export { s as SequenceEditorSearchBar };
26
27
 
27
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/ui/SequenceEditorSearchBar/SequenceEditorSearchBar.tsx"],"sourcesContent":["import { SearchBar } from '@rivm-loculus-tools/common-frontend/components/SearchBar';\nimport { useCallback } from 'react';\nimport { useStore } from 'zustand';\n\nimport { sequenceEditorStore } from '../../../stores/sequenceEditorStore';\nimport { SequenceEditorEventBusService } from '../../../classes/services/SequenceEditorEventBusService';\n\nexport const SequenceEditorSearchBar = () => {\n const setSearchQuery = useStore(sequenceEditorStore, (state) => state.setSearchQuery);\n const setSearchHighlightedIndex = useStore(sequenceEditorStore, (state) => state.setSearchResultHighlightedIndex);\n const searchQuery = useStore(sequenceEditorStore, (state) => state.searchQuery);\n const searchResults = useStore(sequenceEditorStore, (state) => state.searchResult);\n const searchHighlightedIndex = useStore(sequenceEditorStore, (state) => state.searchResultHighlightedIndex);\n\n const onSearchQueryChange = useCallback((query: string) => {\n setSearchQuery(query);\n SequenceEditorEventBusService.getInstance().emit('onSearch', query);\n }, [setSearchQuery]);\n\n const onHighlightedIndexChange = useCallback((index: number) => {\n setSearchHighlightedIndex(index);\n }, [setSearchHighlightedIndex]);\n\n return (\n <SearchBar\n allowNavigation\n highlightedIndex={searchHighlightedIndex}\n numResults={searchResults?.num_matches}\n onHighlightedIndexChange={onHighlightedIndexChange}\n onSearchQueryChange={onSearchQueryChange}\n searchQuery={searchQuery}\n truncated={searchResults?.truncated}\n />\n );\n};\n"],"mappings":";;;;;;;AAOA,IAAa,UAAgC;CAC3C,IAAM,IAAiB,EAAS,IAAsB,MAAU,EAAM,cAAc,GAC9E,IAA4B,EAAS,IAAsB,MAAU,EAAM,+BAA+B,GAC1G,IAAc,EAAS,IAAsB,MAAU,EAAM,WAAW,GACxE,IAAgB,EAAS,IAAsB,MAAU,EAAM,YAAY,GAC3E,IAAyB,EAAS,IAAsB,MAAU,EAAM,4BAA4B,GAEpG,IAAsB,GAAa,MAAkB;EAEzD,AADA,EAAe,CAAK,GACpB,EAA8B,YAAY,CAAC,CAAC,KAAK,YAAY,CAAK;CACpE,GAAG,CAAC,CAAc,CAAC,GAEb,IAA2B,GAAa,MAAkB;EAC9D,EAA0B,CAAK;CACjC,GAAG,CAAC,CAAyB,CAAC;CAE9B,OACE,kBAAC,GAAD;EACE,iBAAA;EACA,kBAAkB;EAClB,YAAY,GAAe;EACD;EACL;EACR;EACb,WAAW,GAAe;CAC3B,CAAA;AAEL"}
1
+ {"version":3,"file":"index.js","names":["sequenceEditorStore","SequenceEditorEventBusService","SequenceEditorSearchBar","setSearchQuery","useStore","state","setSearchHighlightedIndex","searchQuery","searchResults","searchHighlightedIndex","onSearchQueryChange","useCallback","query","container","onHighlightedIndexChange","index","SearchBar"],"sources":["../../../../src/components/ui/SequenceEditorSearchBar/SequenceEditorSearchBar.tsx"],"sourcesContent":["import { container } from 'tsyringe';\nimport { SearchBar } from '@rivm-loculus-tools/common-frontend/components/SearchBar';\nimport { useCallback } from 'react';\nimport { useStore } from 'zustand';\n\nimport { sequenceEditorStore } from '../../../stores/sequenceEditorStore';\nimport { SequenceEditorEventBusService } from '../../../classes/services/SequenceEditorEventBusService';\n\nexport const SequenceEditorSearchBar = () => {\n const setSearchQuery = useStore(sequenceEditorStore, (state) => state.setSearchQuery);\n const setSearchHighlightedIndex = useStore(sequenceEditorStore, (state) => state.setSearchResultHighlightedIndex);\n const searchQuery = useStore(sequenceEditorStore, (state) => state.searchQuery);\n const searchResults = useStore(sequenceEditorStore, (state) => state.searchResult);\n const searchHighlightedIndex = useStore(sequenceEditorStore, (state) => state.searchResultHighlightedIndex);\n\n const onSearchQueryChange = useCallback((query: string) => {\n setSearchQuery(query);\n container.resolve(SequenceEditorEventBusService).emit('onSearch', query);\n }, [setSearchQuery]);\n\n const onHighlightedIndexChange = useCallback((index: number) => {\n setSearchHighlightedIndex(index);\n }, [setSearchHighlightedIndex]);\n\n return (\n <SearchBar\n allowNavigation\n highlightedIndex={searchHighlightedIndex}\n numResults={searchResults?.num_matches}\n onHighlightedIndexChange={onHighlightedIndexChange}\n onSearchQueryChange={onSearchQueryChange}\n searchQuery={searchQuery}\n truncated={searchResults?.truncated}\n />\n );\n};\n"],"mappings":";;;;;;;;AAQA,IAAaE,UAAgC;CAC3C,IAAMC,IAAiBC,EAASJ,IAAsB,MAAUK,EAAM,cAAc,GAC9EC,IAA4BF,EAASJ,IAAsB,MAAUK,EAAM,+BAA+B,GAC1GE,IAAcH,EAASJ,IAAsB,MAAUK,EAAM,WAAW,GACxEG,IAAgBJ,EAASJ,IAAsB,MAAUK,EAAM,YAAY,GAC3EI,IAAyBL,EAASJ,IAAsB,MAAUK,EAAM,4BAA4B,GAEpGK,IAAsBC,GAAa,MAAkB;EAEzD,AADAR,EAAeS,CAAK,GACpBC,EAAU,QAAQZ,CAA6B,CAAC,CAAC,KAAK,YAAYW,CAAK;CACzE,GAAG,CAACT,CAAc,CAAC,GAEbW,IAA2BH,GAAa,MAAkB;EAC9D,EAA0BI,CAAK;CACjC,GAAG,CAACT,CAAyB,CAAC;CAE9B,OACE,kBAACU,GAAD;EACE,iBAAA;EACA,kBAAkBP;EAClB,YAAYD,GAAe;EACD;EACL;EACR;EACb,WAAWA,GAAe;CAC3B,CAAA;AAEL"}
@@ -1,4 +1,4 @@
1
- import { GridGeometry } from '../models';
1
+ import { GridGeometry } from '../models/editor.models';
2
2
  export declare const MIN_LABEL_WIDTH = 120;
3
3
  export declare const DEFAULT_GRID_GEOMETRY: GridGeometry;
4
4
  export declare const IUPAC_KEYS: Set<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"editor.js","names":[],"sources":["../../src/constants/editor.ts"],"sourcesContent":["import type { GridGeometry } from '../models';\n\nexport const MIN_LABEL_WIDTH = 120;\n\nexport const DEFAULT_GRID_GEOMETRY: GridGeometry = {\n cellHeight: 22,\n cellWidth: 18,\n dividerWidth: 4,\n labelWidth: 300,\n numOverscanCols: 128,\n numOverscanRows: 16,\n rulerHeight: 26,\n};\n\nexport const IUPAC_KEYS = new Set('ACGTURYKMSWBDHVN');\n"],"mappings":";AAEA,IAAa,IAAkB,KAElB,IAAsC;CACjD,YAAY;CACZ,WAAW;CACX,cAAc;CACd,YAAY;CACZ,iBAAiB;CACjB,iBAAiB;CACjB,aAAa;AACf,GAEa,oBAAa,IAAI,IAAI,kBAAkB"}
1
+ {"version":3,"file":"editor.js","names":["MIN_LABEL_WIDTH","DEFAULT_GRID_GEOMETRY","IUPAC_KEYS"],"sources":["../../src/constants/editor.ts"],"sourcesContent":["import type { GridGeometry } from '../models/editor.models';\n\nexport const MIN_LABEL_WIDTH = 120;\n\nexport const DEFAULT_GRID_GEOMETRY: GridGeometry = {\n cellHeight: 22,\n cellWidth: 18,\n dividerWidth: 4,\n labelWidth: 300,\n numOverscanCols: 128,\n numOverscanRows: 16,\n rulerHeight: 26,\n};\n\nexport const IUPAC_KEYS = new Set('ACGTURYKMSWBDHVN');\n"],"mappings":";AAEA,IAAaA,IAAkB,KAElBC,IAAsC;CACjD,YAAY;CACZ,WAAW;CACX,cAAc;CACd,YAAY;CACZ,iBAAiB;CACjB,iBAAiB;CACjB,aAAa;AACf,GAEaC,oBAAa,IAAI,IAAI,kBAAkB"}
@@ -1,30 +1,31 @@
1
- import { EDITOR_DIRECTION as e } from "../models/editor.js";
2
- import { SequenceEditorEventBusService as t } from "../classes/services/SequenceEditorEventBusService/index.js";
1
+ import { t as e } from "../_chunks/SequenceEditorEventBusService.js";
2
+ import { EDITOR_DIRECTION as t } from "../models/editor.models.js";
3
+ import { container as n } from "tsyringe";
3
4
  //#region src/constants/keyboard.ts
4
- var n = (e, n) => (r) => {
5
- r.preventDefault(), t.getInstance().emit(e, n);
6
- }, r = (e) => (n) => {
7
- n.preventDefault(), t.getInstance().emit(e);
8
- }, i = (e) => (n) => {
9
- n.preventDefault(), t.getInstance().emit("onMutateSelection", e);
10
- }, a = {
5
+ var r = (t, r) => (i) => {
6
+ i.preventDefault(), n.resolve(e).emit(t, r);
7
+ }, i = (t) => (r) => {
8
+ r.preventDefault(), n.resolve(e).emit(t);
9
+ }, a = (t) => (r) => {
10
+ r.preventDefault(), n.resolve(e).emit("onMutateSelection", t);
11
+ }, o = {
11
12
  deleteBackward: {
12
- callback: r("onDeleteBackward"),
13
+ callback: i("onDeleteBackward"),
13
14
  description: "Delete backward",
14
15
  shortcut: { code: "Backspace" }
15
16
  },
16
17
  deleteBase: {
17
- callback: i("-"),
18
+ callback: a("-"),
18
19
  description: "Delete base",
19
20
  shortcut: { key: "-" }
20
21
  },
21
22
  deleteSelection: {
22
- callback: i("-"),
23
+ callback: a("-"),
23
24
  description: "Delete selection",
24
25
  shortcut: { code: "Delete" }
25
26
  },
26
27
  expandSelectionDown: {
27
- callback: n("onExpandSelection", e.DOWN),
28
+ callback: r("onExpandSelection", t.DOWN),
28
29
  description: "Expand selection down",
29
30
  shortcut: {
30
31
  code: "ArrowDown",
@@ -32,7 +33,7 @@ var n = (e, n) => (r) => {
32
33
  }
33
34
  },
34
35
  expandSelectionLeft: {
35
- callback: n("onExpandSelection", e.LEFT),
36
+ callback: r("onExpandSelection", t.LEFT),
36
37
  description: "Expand selection left",
37
38
  shortcut: {
38
39
  code: "ArrowLeft",
@@ -40,7 +41,7 @@ var n = (e, n) => (r) => {
40
41
  }
41
42
  },
42
43
  expandSelectionRight: {
43
- callback: n("onExpandSelection", e.RIGHT),
44
+ callback: r("onExpandSelection", t.RIGHT),
44
45
  description: "Expand selection right",
45
46
  shortcut: {
46
47
  code: "ArrowRight",
@@ -48,7 +49,7 @@ var n = (e, n) => (r) => {
48
49
  }
49
50
  },
50
51
  expandSelectionUp: {
51
- callback: n("onExpandSelection", e.UP),
52
+ callback: r("onExpandSelection", t.UP),
52
53
  description: "Expand selection up",
53
54
  shortcut: {
54
55
  code: "ArrowUp",
@@ -56,7 +57,7 @@ var n = (e, n) => (r) => {
56
57
  }
57
58
  },
58
59
  gotoPosition: {
59
- callback: r("onGotoPosition"),
60
+ callback: i("onGotoPosition"),
60
61
  description: "Go to position",
61
62
  shortcut: {
62
63
  key: "g",
@@ -64,12 +65,12 @@ var n = (e, n) => (r) => {
64
65
  }
65
66
  },
66
67
  insertGap: {
67
- callback: r("onInsert"),
68
+ callback: i("onInsert"),
68
69
  description: "Insert gap",
69
70
  shortcut: { code: "Space" }
70
71
  },
71
72
  moveCellLeft: {
72
- callback: n("onMoveCells", e.LEFT),
73
+ callback: r("onMoveCells", t.LEFT),
73
74
  description: "Move cell left",
74
75
  shortcut: {
75
76
  code: "ArrowLeft",
@@ -77,7 +78,7 @@ var n = (e, n) => (r) => {
77
78
  }
78
79
  },
79
80
  moveCellRight: {
80
- callback: n("onMoveCells", e.RIGHT),
81
+ callback: r("onMoveCells", t.RIGHT),
81
82
  description: "Move cell right",
82
83
  shortcut: {
83
84
  code: "ArrowRight",
@@ -85,7 +86,7 @@ var n = (e, n) => (r) => {
85
86
  }
86
87
  },
87
88
  moveRowDown: {
88
- callback: n("onMoveRows", e.DOWN),
89
+ callback: r("onMoveRows", t.DOWN),
89
90
  description: "Move row down",
90
91
  shortcut: {
91
92
  code: "ArrowDown",
@@ -93,7 +94,7 @@ var n = (e, n) => (r) => {
93
94
  }
94
95
  },
95
96
  moveRowToEnd: {
96
- callback: n("onMoveRowsEnd", e.DOWN),
97
+ callback: r("onMoveRowsEnd", t.DOWN),
97
98
  description: "Move row to end",
98
99
  shortcut: {
99
100
  code: "ArrowDown",
@@ -101,7 +102,7 @@ var n = (e, n) => (r) => {
101
102
  }
102
103
  },
103
104
  moveRowToStart: {
104
- callback: n("onMoveRowsEnd", e.UP),
105
+ callback: r("onMoveRowsEnd", t.UP),
105
106
  description: "Move row to start",
106
107
  shortcut: {
107
108
  code: "ArrowUp",
@@ -109,7 +110,7 @@ var n = (e, n) => (r) => {
109
110
  }
110
111
  },
111
112
  moveRowUp: {
112
- callback: n("onMoveRows", e.UP),
113
+ callback: r("onMoveRows", t.UP),
113
114
  description: "Move row up",
114
115
  shortcut: {
115
116
  code: "ArrowUp",
@@ -117,27 +118,27 @@ var n = (e, n) => (r) => {
117
118
  }
118
119
  },
119
120
  moveSelectionDown: {
120
- callback: n("onMoveSelection", e.DOWN),
121
+ callback: r("onMoveSelection", t.DOWN),
121
122
  description: "Move selection down",
122
123
  shortcut: { code: "ArrowDown" }
123
124
  },
124
125
  moveSelectionLeft: {
125
- callback: n("onMoveSelection", e.LEFT),
126
+ callback: r("onMoveSelection", t.LEFT),
126
127
  description: "Move selection left",
127
128
  shortcut: { code: "ArrowLeft" }
128
129
  },
129
130
  moveSelectionRight: {
130
- callback: n("onMoveSelection", e.RIGHT),
131
+ callback: r("onMoveSelection", t.RIGHT),
131
132
  description: "Move selection right",
132
133
  shortcut: { code: "ArrowRight" }
133
134
  },
134
135
  moveSelectionUp: {
135
- callback: n("onMoveSelection", e.UP),
136
+ callback: r("onMoveSelection", t.UP),
136
137
  description: "Move selection up",
137
138
  shortcut: { code: "ArrowUp" }
138
139
  },
139
140
  redo: {
140
- callback: r("onRedo"),
141
+ callback: i("onRedo"),
141
142
  description: "Redo",
142
143
  shortcut: {
143
144
  key: "z",
@@ -145,27 +146,27 @@ var n = (e, n) => (r) => {
145
146
  }
146
147
  },
147
148
  scrollPageDown: {
148
- callback: r("onScrollPageDown"),
149
+ callback: i("onScrollPageDown"),
149
150
  description: "Scroll page down",
150
151
  shortcut: { code: "PageDown" }
151
152
  },
152
153
  scrollPageUp: {
153
- callback: r("onScrollPageUp"),
154
+ callback: i("onScrollPageUp"),
154
155
  description: "Scroll page up",
155
156
  shortcut: { code: "PageUp" }
156
157
  },
157
158
  scrollToLineEnd: {
158
- callback: r("onScrollToLineEnd"),
159
+ callback: i("onScrollToLineEnd"),
159
160
  description: "Scroll to line end",
160
161
  shortcut: { code: "End" }
161
162
  },
162
163
  scrollToLineStart: {
163
- callback: r("onScrollToLineStart"),
164
+ callback: i("onScrollToLineStart"),
164
165
  description: "Scroll to line start",
165
166
  shortcut: { code: "Home" }
166
167
  },
167
168
  undo: {
168
- callback: r("onUndo"),
169
+ callback: i("onUndo"),
169
170
  description: "Undo",
170
171
  shortcut: {
171
172
  key: "z",
@@ -174,6 +175,6 @@ var n = (e, n) => (r) => {
174
175
  }
175
176
  };
176
177
  //#endregion
177
- export { a as KEYBOARD_SHORTCUTS };
178
+ export { o as KEYBOARD_SHORTCUTS };
178
179
 
179
180
  //# sourceMappingURL=keyboard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"keyboard.js","names":[],"sources":["../../src/constants/keyboard.ts"],"sourcesContent":["import type { KeyboardShortcutConfig } from '@gen-epix/ui-core/classes/services/KeyboardShortcutService';\n\nimport { SequenceEditorEventBusService } from '../classes/services/SequenceEditorEventBusService';\nimport { EDITOR_DIRECTION } from '../models/editor';\n\n\ntype KeyboardShortcut = {\n callback: KeyboardShortcutConfig['callback'];\n description: string;\n shortcut: Pick<KeyboardShortcutConfig, 'code' | 'key' | 'modifiers'>;\n};\n\nconst emitDirection = (eventName: 'onExpandSelection' | 'onMoveCells' | 'onMoveRows' | 'onMoveRowsEnd' | 'onMoveSelection', direction: EDITOR_DIRECTION): KeyboardShortcutConfig['callback'] => (event) => {\n event.preventDefault();\n SequenceEditorEventBusService.getInstance().emit(eventName, direction);\n};\n\nconst emitVoid = (eventName: 'onDeleteBackward' | 'onGotoPosition' | 'onInsert' | 'onRedo' | 'onScrollPageDown' | 'onScrollPageUp' | 'onScrollToLineEnd' | 'onScrollToLineStart' | 'onUndo'): KeyboardShortcutConfig['callback'] => (event) => {\n event.preventDefault();\n SequenceEditorEventBusService.getInstance().emit(eventName);\n};\n\nconst emitMutateSelection = (base: string): KeyboardShortcutConfig['callback'] => (event) => {\n event.preventDefault();\n SequenceEditorEventBusService.getInstance().emit('onMutateSelection', base);\n};\n\nexport const KEYBOARD_SHORTCUTS: { [key: string]: KeyboardShortcut } = {\n deleteBackward: {\n callback: emitVoid('onDeleteBackward'),\n description: 'Delete backward',\n shortcut: { code: 'Backspace' },\n },\n deleteBase: {\n callback: emitMutateSelection('-'),\n description: 'Delete base',\n shortcut: { key: '-' },\n },\n deleteSelection: {\n callback: emitMutateSelection('-'),\n description: 'Delete selection',\n shortcut: { code: 'Delete' },\n },\n expandSelectionDown: {\n callback: emitDirection('onExpandSelection', EDITOR_DIRECTION.DOWN),\n description: 'Expand selection down',\n shortcut: { code: 'ArrowDown', modifiers: [['Shift']] },\n },\n expandSelectionLeft: {\n callback: emitDirection('onExpandSelection', EDITOR_DIRECTION.LEFT),\n description: 'Expand selection left',\n shortcut: { code: 'ArrowLeft', modifiers: [['Shift']] },\n },\n expandSelectionRight: {\n callback: emitDirection('onExpandSelection', EDITOR_DIRECTION.RIGHT),\n description: 'Expand selection right',\n shortcut: { code: 'ArrowRight', modifiers: [['Shift']] },\n },\n expandSelectionUp: {\n callback: emitDirection('onExpandSelection', EDITOR_DIRECTION.UP),\n description: 'Expand selection up',\n shortcut: { code: 'ArrowUp', modifiers: [['Shift']] },\n },\n gotoPosition: {\n callback: emitVoid('onGotoPosition'),\n description: 'Go to position',\n shortcut: { key: 'g', modifiers: [['Meta'], ['Control']] },\n },\n insertGap: {\n callback: emitVoid('onInsert'),\n description: 'Insert gap',\n shortcut: { code: 'Space' },\n },\n moveCellLeft: {\n callback: emitDirection('onMoveCells', EDITOR_DIRECTION.LEFT),\n description: 'Move cell left',\n shortcut: { code: 'ArrowLeft', modifiers: [['Alt']] },\n },\n moveCellRight: {\n callback: emitDirection('onMoveCells', EDITOR_DIRECTION.RIGHT),\n description: 'Move cell right',\n shortcut: { code: 'ArrowRight', modifiers: [['Alt']] },\n },\n moveRowDown: {\n callback: emitDirection('onMoveRows', EDITOR_DIRECTION.DOWN),\n description: 'Move row down',\n shortcut: { code: 'ArrowDown', modifiers: [['Control'], ['Meta']] },\n },\n moveRowToEnd: {\n callback: emitDirection('onMoveRowsEnd', EDITOR_DIRECTION.DOWN),\n description: 'Move row to end',\n shortcut: { code: 'ArrowDown', modifiers: [['Alt']] },\n },\n moveRowToStart: {\n callback: emitDirection('onMoveRowsEnd', EDITOR_DIRECTION.UP),\n description: 'Move row to start',\n shortcut: { code: 'ArrowUp', modifiers: [['Alt']] },\n },\n moveRowUp: {\n callback: emitDirection('onMoveRows', EDITOR_DIRECTION.UP),\n description: 'Move row up',\n shortcut: { code: 'ArrowUp', modifiers: [['Control'], ['Meta']] },\n },\n moveSelectionDown: {\n callback: emitDirection('onMoveSelection', EDITOR_DIRECTION.DOWN),\n description: 'Move selection down',\n shortcut: { code: 'ArrowDown' },\n },\n moveSelectionLeft: {\n callback: emitDirection('onMoveSelection', EDITOR_DIRECTION.LEFT),\n description: 'Move selection left',\n shortcut: { code: 'ArrowLeft' },\n },\n moveSelectionRight: {\n callback: emitDirection('onMoveSelection', EDITOR_DIRECTION.RIGHT),\n description: 'Move selection right',\n shortcut: { code: 'ArrowRight' },\n },\n moveSelectionUp: {\n callback: emitDirection('onMoveSelection', EDITOR_DIRECTION.UP),\n description: 'Move selection up',\n shortcut: { code: 'ArrowUp' },\n },\n redo: {\n callback: emitVoid('onRedo'),\n description: 'Redo',\n shortcut: { key: 'z', modifiers: [['Meta', 'Shift'], ['Control', 'Shift']] },\n },\n scrollPageDown: {\n callback: emitVoid('onScrollPageDown'),\n description: 'Scroll page down',\n shortcut: { code: 'PageDown' },\n },\n scrollPageUp: {\n callback: emitVoid('onScrollPageUp'),\n description: 'Scroll page up',\n shortcut: { code: 'PageUp' },\n },\n scrollToLineEnd: {\n callback: emitVoid('onScrollToLineEnd'),\n description: 'Scroll to line end',\n shortcut: { code: 'End' },\n },\n scrollToLineStart: {\n callback: emitVoid('onScrollToLineStart'),\n description: 'Scroll to line start',\n shortcut: { code: 'Home' },\n },\n undo: {\n callback: emitVoid('onUndo'),\n description: 'Undo',\n shortcut: { key: 'z', modifiers: [['Meta'], ['Control']] },\n },\n};\n"],"mappings":";;;AAYA,IAAM,KAAiB,GAAqG,OAAqE,MAAU;CAEzM,AADA,EAAM,eAAe,GACrB,EAA8B,YAAY,CAAC,CAAC,KAAK,GAAW,CAAS;AACvE,GAEM,KAAY,OAAmN,MAAU;CAE7O,AADA,EAAM,eAAe,GACrB,EAA8B,YAAY,CAAC,CAAC,KAAK,CA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,WAAW,CAAC,CAAC,QAAQ,OAAO,GAAG,CAAC,WAAW,OAAO,CAAC;EAAE;CAC7E;CACA,gBAAgB;EACd,UAAU,EAAS,kBAAkB;EACrC,aAAa;EACb,UAAU,EAAE,MAAM,WAAW;CAC/B;CACA,cAAc;EACZ,UAAU,EAAS,gBAAgB;EACnC,aAAa;EACb,UAAU,EAAE,MAAM,SAAS;CAC7B;CACA,iBAAiB;EACf,UAAU,EAAS,mBAAmB;EACtC,aAAa;EACb,UAAU,EAAE,MAAM,MAAM;CAC1B;CACA,mBAAmB;EACjB,UAAU,EAAS,qBAAqB;EACxC,aAAa;EACb,UAAU,EAAE,MAAM,OAAO;CAC3B;CACA,MAAM;EACJ,UAAU,EAAS,QAAQ;EAC3B,aAAa;EACb,UAAU;GAAE,KAAK;GAAK,WAAW,CAAC,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC;EAAE;CAC3D;AACF"}
1
+ {"version":3,"file":"keyboard.js","names":["SequenceEditorEventBusService","emitDirection","event","container","eventName","direction","emitVoid","emitMutateSelection","base","KEYBOARD_SHORTCUTS","EDITOR_DIRECTION"],"sources":["../../src/constants/keyboard.ts"],"sourcesContent":["import { container } from 'tsyringe';\nimport type { KeyboardShortcutConfig } from '@gen-epix/ui-core/classes/services/KeyboardShortcutService';\n\nimport { SequenceEditorEventBusService } from '../classes/services/SequenceEditorEventBusService';\nimport { EDITOR_DIRECTION } from '../models/editor.models';\n\n\ntype KeyboardShortcut = {\n callback: KeyboardShortcutConfig['callback'];\n description: string;\n shortcut: Pick<KeyboardShortcutConfig, 'code' | 'key' | 'modifiers'>;\n};\n\nconst emitDirection = (eventName: 'onExpandSelection' | 'onMoveCells' | 'onMoveRows' | 'onMoveRowsEnd' | 'onMoveSelection', direction: EDITOR_DIRECTION): KeyboardShortcutConfig['callback'] => (event) => {\n event.preventDefault();\n container.resolve(SequenceEditorEventBusService).emit(eventName, direction);\n};\n\nconst emitVoid = (eventName: 'onDeleteBackward' | 'onGotoPosition' | 'onInsert' | 'onRedo' | 'onScrollPageDown' | 'onScrollPageUp' | 'onScrollToLineEnd' | 'onScrollToLineStart' | 'onUndo'): KeyboardShortcutConfig['callback'] => (event) => {\n event.preventDefault();\n container.resolve(SequenceEditorEventBusService).emit(eventName);\n};\n\nconst emitMutateSelection = (base: string): KeyboardShortcutConfig['callback'] => (event) => {\n event.preventDefault();\n container.resolve(SequenceEditorEventBusService).emit('onMutateSelection', base);\n};\n\nexport const KEYBOARD_SHORTCUTS: { [key: string]: KeyboardShortcut } = {\n deleteBackward: {\n callback: emitVoid('onDeleteBackward'),\n description: 'Delete backward',\n shortcut: { code: 'Backspace' },\n },\n deleteBase: {\n callback: emitMutateSelection('-'),\n description: 'Delete base',\n shortcut: { key: '-' },\n },\n deleteSelection: {\n callback: emitMutateSelection('-'),\n description: 'Delete selection',\n shortcut: { code: 'Delete' },\n },\n expandSelectionDown: {\n callback: emitDirection('onExpandSelection', EDITOR_DIRECTION.DOWN),\n description: 'Expand selection down',\n shortcut: { code: 'ArrowDown', modifiers: [['Shift']] },\n },\n expandSelectionLeft: {\n callback: emitDirection('onExpandSelection', EDITOR_DIRECTION.LEFT),\n description: 'Expand selection left',\n shortcut: { code: 'ArrowLeft', modifiers: [['Shift']] },\n },\n expandSelectionRight: {\n callback: emitDirection('onExpandSelection', EDITOR_DIRECTION.RIGHT),\n description: 'Expand selection right',\n shortcut: { code: 'ArrowRight', modifiers: [['Shift']] },\n },\n expandSelectionUp: {\n callback: emitDirection('onExpandSelection', EDITOR_DIRECTION.UP),\n description: 'Expand selection up',\n shortcut: { code: 'ArrowUp', modifiers: [['Shift']] },\n },\n gotoPosition: {\n callback: emitVoid('onGotoPosition'),\n description: 'Go to position',\n shortcut: { key: 'g', modifiers: [['Meta'], ['Control']] },\n },\n insertGap: {\n callback: emitVoid('onInsert'),\n description: 'Insert gap',\n shortcut: { code: 'Space' },\n },\n moveCellLeft: {\n callback: emitDirection('onMoveCells', EDITOR_DIRECTION.LEFT),\n description: 'Move cell left',\n shortcut: { code: 'ArrowLeft', modifiers: [['Alt']] },\n },\n moveCellRight: {\n callback: emitDirection('onMoveCells', EDITOR_DIRECTION.RIGHT),\n description: 'Move cell right',\n shortcut: { code: 'ArrowRight', modifiers: [['Alt']] },\n },\n moveRowDown: {\n callback: emitDirection('onMoveRows', EDITOR_DIRECTION.DOWN),\n description: 'Move row down',\n shortcut: { code: 'ArrowDown', modifiers: [['Control'], ['Meta']] },\n },\n moveRowToEnd: {\n callback: emitDirection('onMoveRowsEnd', EDITOR_DIRECTION.DOWN),\n description: 'Move row to end',\n shortcut: { code: 'ArrowDown', modifiers: [['Alt']] },\n },\n moveRowToStart: {\n callback: emitDirection('onMoveRowsEnd', EDITOR_DIRECTION.UP),\n description: 'Move row to start',\n shortcut: { code: 'ArrowUp', modifiers: [['Alt']] },\n },\n moveRowUp: {\n callback: emitDirection('onMoveRows', EDITOR_DIRECTION.UP),\n description: 'Move row up',\n shortcut: { code: 'ArrowUp', modifiers: [['Control'], ['Meta']] },\n },\n moveSelectionDown: {\n callback: emitDirection('onMoveSelection', EDITOR_DIRECTION.DOWN),\n description: 'Move selection down',\n shortcut: { code: 'ArrowDown' },\n },\n moveSelectionLeft: {\n callback: emitDirection('onMoveSelection', EDITOR_DIRECTION.LEFT),\n description: 'Move selection left',\n shortcut: { code: 'ArrowLeft' },\n },\n moveSelectionRight: {\n callback: emitDirection('onMoveSelection', EDITOR_DIRECTION.RIGHT),\n description: 'Move selection right',\n shortcut: { code: 'ArrowRight' },\n },\n moveSelectionUp: {\n callback: emitDirection('onMoveSelection', EDITOR_DIRECTION.UP),\n description: 'Move selection up',\n shortcut: { code: 'ArrowUp' },\n },\n redo: {\n callback: emitVoid('onRedo'),\n description: 'Redo',\n shortcut: { key: 'z', modifiers: [['Meta', 'Shift'], ['Control', 'Shift']] },\n },\n scrollPageDown: {\n callback: emitVoid('onScrollPageDown'),\n description: 'Scroll page down',\n shortcut: { code: 'PageDown' },\n },\n scrollPageUp: {\n callback: emitVoid('onScrollPageUp'),\n description: 'Scroll page up',\n shortcut: { code: 'PageUp' },\n },\n scrollToLineEnd: {\n callback: emitVoid('onScrollToLineEnd'),\n description: 'Scroll to line end',\n shortcut: { code: 'End' },\n },\n scrollToLineStart: {\n callback: emitVoid('onScrollToLineStart'),\n description: 'Scroll to line start',\n shortcut: { code: 'Home' },\n },\n undo: {\n callback: emitVoid('onUndo'),\n description: 'Undo',\n shortcut: { key: 'z', modifiers: [['Meta'], ['Control']] },\n },\n};\n"],"mappings":";;;;AAaA,IAAMC,KAAiB,GAAqG,OAAqE,MAAU;CAEzM,AADAC,EAAM,eAAe,GACrBC,EAAU,QAAQH,CAA6B,CAAC,CAAC,KAAKI,GAAWC,CAAS;AAC5E,GAEMC,KAAY,OAAmN,MAAU;CAE7O,AADAJ,EAAM,eAAe,GACrBC,EAAU,QAAQH,CAA6B,CAAC,CAAC,KAAKI,CAAS;AACjE,GAEMG,KAAuB,OAAsD,MAAU;CAE3F,AADAL,EAAM,eAAe,GACrBC,EAAU,QAAQH,CAA6B,CAAC,CAAC,KAAK,qBAAqBQ,CAAI;AACjF,GAEaC,IAA0D;CACrE,gBAAgB;EACd,UAAUH,EAAS,kBAAkB;EACrC,aAAa;EACb,UAAU,EAAE,MAAM,YAAY;CAChC;CACA,YAAY;EACV,UAAUC,EAAoB,GAAG;EACjC,aAAa;EACb,UAAU,EAAE,KAAK,IAAI;CACvB;CACA,iBAAiB;EACf,UAAUA,EAAoB,GAAG;EACjC,aAAa;EACb,UAAU,EAAE,MAAM,SAAS;CAC7B;CACA,qBAAqB;EACnB,UAAUN,EAAc,qBAAqBS,EAAiB,IAAI;EAClE,aAAa;EACb,UAAU;GAAE,MAAM;GAAa,WAAW,CAAC,CAAC,OAAO,CAAC;EAAE;CACxD;CACA,qBAAqB;EACnB,UAAUT,EAAc,qBAAqBS,EAAiB,IAAI;EAClE,aAAa;EACb,UAAU;GAAE,MAAM;GAAa,WAAW,CAAC,CAAC,OAAO,CAAC;EA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ucleotideSymbol, AminoAcidPalette, AminoAcidPaletteColors, NucleotidePalette, NucleotidePaletteColors } from '../models/palette';
1
+ import { AminoAcidSymbol, NucleotideSymbol, AminoAcidPalette, AminoAcidPaletteColors, NucleotidePalette, NucleotidePaletteColors } from '../models/palette.models';
2
2
  export declare const NUCLEOTIDE_SYMBOLS: readonly NucleotideSymbol[];
3
3
  export declare const AMINO_ACID_SYMBOLS: readonly AminoAcidSymbol[];
4
4
  export declare const ALI_VIEW_DEFAULT_AMINO_ACID_PALETTE_COLORS: AminoAcidPaletteColors;