@rivm-loculus-tools/sequence-editor 1.0.1 → 1.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 (44) hide show
  1. package/dist/_chunks/EngineErrorUtil.js +1 -2
  2. package/dist/_chunks/SequenceEditor.js +208 -177
  3. package/dist/_chunks/SequenceEditor.js.map +1 -1
  4. package/dist/_chunks/SequenceEditorEventBusService.js +2 -4
  5. package/dist/_chunks/SequenceEditorEventBusService.js.map +1 -1
  6. package/dist/_chunks/SequenceEditorPageDrawer.js +1 -2
  7. package/dist/_chunks/comlink.js +1 -2
  8. package/dist/_chunks/react.js +2 -3
  9. package/dist/_chunks/react.js.map +1 -1
  10. package/dist/_chunks/sequenceEditorStore.js +3 -5
  11. package/dist/_chunks/sequenceEditorStore.js.map +1 -1
  12. package/dist/assets/{index-B5Du4hQk.js → index-CtQs0yk0.js} +3 -3
  13. package/dist/assets/index-CtQs0yk0.js.map +1 -0
  14. package/dist/classes/services/EditorWorkerService/EditorWorkerService.d.ts +8 -3
  15. package/dist/classes/services/EditorWorkerService/index.js +27 -3
  16. package/dist/classes/services/EditorWorkerService/index.js.map +1 -1
  17. package/dist/classes/services/SequenceEditorEventBusService/SequenceEditorEventBusService.d.ts +2 -0
  18. package/dist/classes/workers/EngineWorker/EngineWorker.d.ts +8 -3
  19. package/dist/classes/workers/EngineWorker/index.js +29 -4
  20. package/dist/classes/workers/EngineWorker/index.js.map +1 -1
  21. package/dist/components/app/App/index.js +1 -2
  22. package/dist/components/ui/SequenceEditorPageHeader/index.js +70 -40
  23. package/dist/components/ui/SequenceEditorPageHeader/index.js.map +1 -1
  24. package/dist/components/ui/SequenceEditorSearchBar/index.js +1 -2
  25. package/dist/constants/editor.js +1 -2
  26. package/dist/constants/keyboard.js +1 -2
  27. package/dist/constants/palette.js +1 -2
  28. package/dist/models/config.models.d.ts +2 -0
  29. package/dist/models/editor.models.d.ts +27 -11
  30. package/dist/models/editor.models.js +1 -2
  31. package/dist/models/editor.models.js.map +1 -1
  32. package/dist/models/palette.models.js +1 -2
  33. package/dist/models/palette.models.js.map +1 -1
  34. package/dist/pages/SequenceEditorMainPage/index.js +19 -41
  35. package/dist/pages/SequenceEditorMainPage/index.js.map +1 -1
  36. package/dist/utils/EditorUtil/EditorUtil.d.ts +4 -2
  37. package/dist/utils/EditorUtil/index.js +97 -38
  38. package/dist/utils/EditorUtil/index.js.map +1 -1
  39. package/dist/utils/PaletteUtil/index.js +1 -2
  40. package/dist/utils/SequenceEditorStandardConfigUtil/SequenceEditorStandardConfigUtil.d.ts +2 -1
  41. package/dist/utils/SequenceEditorStandardConfigUtil/index.js +1 -3
  42. package/dist/utils/SequenceEditorStandardConfigUtil/index.js.map +1 -1
  43. package/package.json +17 -17
  44. package/dist/assets/index-B5Du4hQk.js.map +0 -1
@@ -1,61 +1,91 @@
1
1
  import { t as e } from "../../../_chunks/sequenceEditorStore.js";
2
2
  import { t } from "../../../_chunks/react.js";
3
3
  import { t as n } from "../../../_chunks/SequenceEditorEventBusService.js";
4
- import { useCallback as r } from "react";
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";
16
- //#region src/components/ui/SequenceEditorPageHeader/SequenceEditorPageHeader.tsx
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");
24
- }, []);
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, {
4
+ import { useCallback as r, useMemo as i } from "react";
5
+ import { IconButton as a, Tooltip as o } from "@mui/material";
6
+ import { container as s } from "tsyringe";
7
+ import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
8
+ import { FastaPageHeaderCenterComponent as d } from "@rivm-loculus-tools/common-frontend/components/fasta/FastaPageHeaderCenterComponent";
9
+ import { FastaPageHeaderImportButton as f } from "@rivm-loculus-tools/common-frontend/components/fasta/FastaPageHeaderImportButton";
10
+ import { FastaPageHeaderResetButton as p } from "@rivm-loculus-tools/common-frontend/components/fasta/FastaPageHeaderResetButton";
11
+ import { PageCommonHeader as m } from "@rivm-loculus-tools/common-frontend/components/ui/PageCommonHeader";
12
+ import h from "@mui/icons-material/Code";
13
+ import g from "@mui/icons-material/Publish";
14
+ import _ from "@mui/icons-material/Undo";
15
+ import v from "@mui/icons-material/Redo";
16
+ import { ButtonWithMenu as y } from "@rivm-loculus-tools/common-frontend/components/ui/ButtonWithMenu";
17
+ import b from "@mui/icons-material/FileDownloadOutlined";
18
+ // src/components/ui/SequenceEditorPageHeader/SequenceEditorPageHeader.tsx
19
+ var x = () => {
20
+ let x = t(e, (e) => e.resetDataset), S = t(e, (e) => e.meta), C = r(() => {
21
+ x();
22
+ }, [x]), w = r(() => {
23
+ s.resolve(n).emit("onUndo");
24
+ }, []), T = r(() => {
25
+ s.resolve(n).emit("onRedo");
26
+ }, []), E = r(() => {
27
+ s.resolve(n).emit("onExportUngappedFasta");
28
+ }, []), D = r(() => {
29
+ s.resolve(n).emit("onExportGappedFasta");
30
+ }, []), O = r(() => {
31
+ alert("Not implemented");
32
+ }, []), k = i(() => [
33
+ {
34
+ icon: /* @__PURE__ */ l(g, { fontSize: "small" }),
35
+ label: "Export to loculus",
36
+ onClick: O
37
+ },
38
+ {
39
+ icon: /* @__PURE__ */ l(h, { fontSize: "small" }),
40
+ label: "Save as Ungapped Fasta (.fasta)",
41
+ onClick: E
42
+ },
43
+ {
44
+ icon: /* @__PURE__ */ l(h, { fontSize: "small" }),
45
+ label: "Save as Gapped Fasta (.fasta)",
46
+ onClick: D
47
+ }
48
+ ], [
49
+ E,
50
+ D,
51
+ O
52
+ ]);
53
+ return /* @__PURE__ */ l(m, {
54
+ centerComponent: /* @__PURE__ */ l(d, { store: e }),
55
+ rightComponent: /* @__PURE__ */ u(c, { children: [
56
+ /* @__PURE__ */ l(o, {
31
57
  title: "Undo last action",
32
- children: /* @__PURE__ */ c(i, {
58
+ children: /* @__PURE__ */ l(a, {
33
59
  color: "inherit",
34
- disabled: y?.undoDepth === 0,
35
- onClick: x,
60
+ disabled: S?.undoDepth === 0,
61
+ onClick: w,
36
62
  size: "small",
37
63
  sx: { opacity: .85 },
38
- children: /* @__PURE__ */ c(h, { fontSize: "small" })
64
+ children: /* @__PURE__ */ l(_, { fontSize: "small" })
39
65
  })
40
66
  }),
41
- /* @__PURE__ */ c(a, {
67
+ /* @__PURE__ */ l(o, {
42
68
  title: "Redo last action",
43
- children: /* @__PURE__ */ c(i, {
69
+ children: /* @__PURE__ */ l(a, {
44
70
  color: "inherit",
45
- disabled: y?.redoDepth === 0,
46
- onClick: S,
71
+ disabled: S?.redoDepth === 0,
72
+ onClick: T,
47
73
  size: "small",
48
74
  sx: { opacity: .85 },
49
- children: /* @__PURE__ */ c(g, { fontSize: "small" })
75
+ children: /* @__PURE__ */ l(v, { fontSize: "small" })
50
76
  })
51
77
  }),
52
- /* @__PURE__ */ c(f, { onReset: b }),
53
- /* @__PURE__ */ c(_, {})
78
+ /* @__PURE__ */ l(p, { onReset: C }),
79
+ /* @__PURE__ */ l(f, {}),
80
+ /* @__PURE__ */ l(y, {
81
+ items: k,
82
+ label: "Export",
83
+ startIcon: /* @__PURE__ */ l(b, {})
84
+ })
54
85
  ] }),
55
86
  title: "Sequence Editor"
56
87
  });
57
88
  };
58
- //#endregion
59
- export { v as SequenceEditorPageHeader };
89
+ export { x as SequenceEditorPageHeader };
60
90
 
61
91
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
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
+ {"version":3,"file":"index.js","names":["_Fragment","sequenceEditorStore","SequenceEditorEventBusService","CodeIcon","PublishIcon","UndoIcon","RedoIcon","FileDownloadOutlinedIcon","SequenceEditorPageHeader","resetDataset","useStore","state","meta","onReset","useCallback","onUndoButtonClick","onRedoButtonClick","onClickExportFasta","onClickExportGappedFasta","onClickUploadToLoculus","exportExportMenuItems","useMemo","PageCommonHeader","FastaPageHeaderCenterComponent","Fragment","Tooltip","IconButton","FastaPageHeaderResetButton","FastaPageHeaderImportButton","ButtonWithMenu"],"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 {\n useCallback,\n useMemo,\n} from 'react';\nimport CodeIcon from '@mui/icons-material/Code';\nimport PublishIcon from '@mui/icons-material/Publish';\nimport { useStore } from 'zustand';\nimport UndoIcon from '@mui/icons-material/Undo';\nimport RedoIcon from '@mui/icons-material/Redo';\nimport {\n IconButton,\n Tooltip,\n} from '@mui/material';\nimport { ButtonWithMenu } from '@rivm-loculus-tools/common-frontend/components/ui/ButtonWithMenu';\nimport type { ButtonWithMenuProps } from '@rivm-loculus-tools/common-frontend/components/ui/ButtonWithMenu';\nimport FileDownloadOutlinedIcon from '@mui/icons-material/FileDownloadOutlined';\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 const onClickExportFasta = useCallback(() => {\n container.resolve(SequenceEditorEventBusService).emit('onExportUngappedFasta');\n }, []);\n\n const onClickExportGappedFasta = useCallback(() => {\n container.resolve(SequenceEditorEventBusService).emit('onExportGappedFasta');\n }, []);\n\n const onClickUploadToLoculus = useCallback(() => {\n alert('Not implemented');\n }, []);\n\n const exportExportMenuItems: ButtonWithMenuProps['items'] = useMemo(() => [\n {\n icon: <PublishIcon fontSize={'small'} />,\n label: 'Export to loculus',\n onClick: onClickUploadToLoculus,\n },\n {\n icon: <CodeIcon fontSize={'small'} />,\n label: 'Save as Ungapped Fasta (.fasta)',\n onClick: onClickExportFasta,\n },\n {\n icon: <CodeIcon fontSize={'small'} />,\n label: 'Save as Gapped Fasta (.fasta)',\n onClick: onClickExportGappedFasta,\n },\n ], [onClickExportFasta, onClickExportGappedFasta, onClickUploadToLoculus]);\n\n return (\n <PageCommonHeader\n centerComponent={<FastaPageHeaderCenterComponent store={sequenceEditorStore} />}\n rightComponent={(\n <>\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 <FastaPageHeaderImportButton />\n <ButtonWithMenu\n items={exportExportMenuItems}\n label={'Export'}\n startIcon={<FileDownloadOutlinedIcon />}\n />\n </>\n )}\n title={'Sequence Editor'}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAyBA,IAAaQ,UAAiC;CAC5C,IAAMC,IAAeC,EAAST,IAAsB,MAAUU,EAAM,YAAY,GAC1EC,IAAOF,EAAST,IAAsB,MAAUU,EAAM,IAAI,GAE1DE,IAAUC,QAAkB;EAChC,EAAa;CACf,GAAG,CAACL,CAAY,CAAC,GAEXM,IAAoBD,QAAkB;EAC1C,EAAU,QAAQZ,CAA6B,CAAC,CAAC,KAAK,QAAQ;CAChE,GAAG,CAAC,CAAC,GAECc,IAAoBF,QAAkB;EAC1C,EAAU,QAAQZ,CAA6B,CAAC,CAAC,KAAK,QAAQ;CAChE,GAAG,CAAC,CAAC,GAECe,IAAqBH,QAAkB;EAC3C,EAAU,QAAQZ,CAA6B,CAAC,CAAC,KAAK,uBAAuB;CAC/E,GAAG,CAAC,CAAC,GAECgB,IAA2BJ,QAAkB;EACjD,EAAU,QAAQZ,CAA6B,CAAC,CAAC,KAAK,qBAAqB;CAC7E,GAAG,CAAC,CAAC,GAECiB,IAAyBL,QAAkB;EAC/C,MAAM,iBAAiB;CACzB,GAAG,CAAC,CAAC,GAECM,IAAsDC,QAAc;EACxE;GACE,MAAM,kBAACjB,GAAD,EAAa,UAAU,QAAU,CAAA;GACvC,OAAO;GACP,SAASe;EACX;EACA;GACE,MAAM,kBAAChB,GAAD,EAAU,UAAU,QAAU,CAAA;GACpC,OAAO;GACP,SAASc;EACX;EACA;GACE,MAAM,kBAACd,GAAD,EAAU,UAAU,QAAU,CAAA;GACpC,OAAO;GACP,SAASe;EACX;CACF,GAAG;EAACD;EAAoBC;EAA0BC;CAAsB,CAAC;CAEzE,OACE,kBAACG,GAAD;EACE,iBAAiB,kBAACC,GAAD,EAAgC,OAAOtB,EAAsB,CAAA;EAC9E,gBACE,kBAAAD,GAAA,EAAA,UAAA;GACE,kBAACyB,GAAD;IAAS,OAAO;IACd,UAAA,kBAACC,GAAD;KACE,OAAO;KACP,UAAUd,GAAM,cAAc;KAC9B,SAASG;KACT,MAAM;KACN,IAAI,EAAE,SAAS,IAAK;KAEpB,UAAA,kBAACV,GAAD,EAAU,UAAU,QAAU,CAAA;IACpB,CAAA;GACL,CAAA;GACT,kBAACoB,GAAD;IAAS,OAAO;IACd,UAAA,kBAACC,GAAD;KACE,OAAO;KACP,UAAUd,GAAM,cAAc;KAC9B,SAASI;KACT,MAAM;KACN,IAAI,EAAE,SAAS,IAAK;KAEpB,UAAA,kBAACV,GAAD,EAAU,UAAU,QAAU,CAAA;IACpB,CAAA;GACL,CAAA;GACT,kBAACqB,GAAD,EAAqC,WAAU,CAAA;GAC/C,kBAACC,GAAD,CAA8B,CAAA;GAC9B,kBAACC,GAAD;IACE,OAAOT;IACP,OAAO;IACP,WAAW,kBAACb,GAAD,CAA2B,CAAA;GACvC,CAAA;EACD,EAAA,CAAA;EAEJ,OAAO;CACR,CAAA;AAEL"}
@@ -5,7 +5,7 @@ import { useCallback as r } from "react";
5
5
  import { container as i } from "tsyringe";
6
6
  import { jsx as a } from "react/jsx-runtime";
7
7
  import { SearchBar as o } from "@rivm-loculus-tools/common-frontend/components/SearchBar";
8
- //#region src/components/ui/SequenceEditorSearchBar/SequenceEditorSearchBar.tsx
8
+ // src/components/ui/SequenceEditorSearchBar/SequenceEditorSearchBar.tsx
9
9
  var s = () => {
10
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
11
  s(e), i.resolve(n).emit("onSearch", e);
@@ -22,7 +22,6 @@ var s = () => {
22
22
  truncated: u?.truncated
23
23
  });
24
24
  };
25
- //#endregion
26
25
  export { s as SequenceEditorSearchBar };
27
26
 
28
27
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- //#region src/constants/editor.ts
1
+ // src/constants/editor.ts
2
2
  var e = 120, t = {
3
3
  cellHeight: 22,
4
4
  cellWidth: 18,
@@ -8,7 +8,6 @@ var e = 120, t = {
8
8
  numOverscanRows: 16,
9
9
  rulerHeight: 26
10
10
  }, n = /* @__PURE__ */ new Set("ACGTURYKMSWBDHVN");
11
- //#endregion
12
11
  export { t as DEFAULT_GRID_GEOMETRY, n as IUPAC_KEYS, e as MIN_LABEL_WIDTH };
13
12
 
14
13
  //# sourceMappingURL=editor.js.map
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "../_chunks/SequenceEditorEventBusService.js";
2
2
  import { EDITOR_DIRECTION as t } from "../models/editor.models.js";
3
3
  import { container as n } from "tsyringe";
4
- //#region src/constants/keyboard.ts
4
+ // src/constants/keyboard.ts
5
5
  var r = (t, r) => (i) => {
6
6
  i.preventDefault(), n.resolve(e).emit(t, r);
7
7
  }, i = (t) => (r) => {
@@ -174,7 +174,6 @@ var r = (t, r) => (i) => {
174
174
  }
175
175
  }
176
176
  };
177
- //#endregion
178
177
  export { o as KEYBOARD_SHORTCUTS };
179
178
 
180
179
  //# sourceMappingURL=keyboard.js.map
@@ -1,6 +1,6 @@
1
1
  import { AminoAcidSymbol as e, NucleotideSymbol as t } from "../models/palette.models.js";
2
2
  import { PaletteUtil as n } from "../utils/PaletteUtil/index.js";
3
- //#region src/constants/palette.ts
3
+ // src/constants/palette.ts
4
4
  var r = [
5
5
  t.A,
6
6
  t.C,
@@ -190,7 +190,6 @@ var r = [
190
190
  name: "Clustal X",
191
191
  paletteColors: d
192
192
  };
193
- //#endregion
194
193
  export { _ as ALI_VIEW_CLUSTAL_X_AMINO_ACID_PALETTE, d as ALI_VIEW_CLUSTAL_X_AMINO_ACID_PALETTE_COLORS, h as ALI_VIEW_DEFAULT_AMINO_ACID_PALETTE, a as ALI_VIEW_DEFAULT_AMINO_ACID_PALETTE_COLORS, f as ALI_VIEW_DEFAULT_NUCLEOTIDE_PALETTE, o as ALI_VIEW_DEFAULT_NUCLEOTIDE_PALETTE_COLORS, p as ALI_VIEW_FAST_NUCLEOTIDE_PALETTE, s as ALI_VIEW_FAST_NUCLEOTIDE_PALETTE_COLORS, g as ALI_VIEW_SEA_VIEW_AMINO_ACID_PALETTE, l as ALI_VIEW_SEA_VIEW_AMINO_ACID_PALETTE_COLORS, m as ALI_VIEW_SEA_VIEW_NUCLEOTIDE_PALETTE, c as ALI_VIEW_SEA_VIEW_NUCLEOTIDE_PALETTE_COLORS, i as AMINO_ACID_SYMBOLS, r as NUCLEOTIDE_SYMBOLS };
195
194
 
196
195
  //# sourceMappingURL=palette.js.map
@@ -1,3 +1,5 @@
1
+ import { DialogAction } from '@gen-epix/ui-core-components/components/Dialog';
1
2
  import { ConfigBase } from '@rivm-loculus-tools/common-frontend/models/config.models';
2
3
  export interface SequenceEditorConfig extends ConfigBase {
4
+ fastaImportExtraActions?: DialogAction[];
3
5
  }
@@ -131,10 +131,15 @@ export interface EngineWorkerApi {
131
131
  insert: (rows: number[], column: number) => Promise<void>;
132
132
  load: (fastaContent: string) => Promise<number>;
133
133
  meta: () => Promise<EngineMeta>;
134
- moveHorizontal: (row: number, columns: number[], direction: MoveDirection) => Promise<void>;
134
+ moveHorizontal: (rows: number[], columns: number[], direction: MoveDirection) => Promise<void>;
135
+ moveRows: (rows: number[], options: MoveRowsOptions) => Promise<void>;
135
136
  moveRowsDown: (rows: number[]) => Promise<void>;
137
+ moveRowsGrouped: (rows: number[], targetRow: number) => Promise<void>;
138
+ moveRowsRelative: (rows: number[], delta: number) => Promise<void>;
139
+ moveRowsToBottom: (rows: number[]) => Promise<void>;
140
+ moveRowsToTop: (rows: number[]) => Promise<void>;
136
141
  moveRowsUp: (rows: number[]) => Promise<void>;
137
- mutate: (rows: number[], column: number, base: string) => Promise<void>;
142
+ mutate: (rows: number[], columns: number[], base: string) => Promise<void>;
138
143
  name: (row: number) => Promise<string>;
139
144
  redo: () => Promise<boolean>;
140
145
  search: (query: string, checkRecordNames: boolean) => Promise<EngineSearchResult>;
@@ -142,6 +147,15 @@ export interface EngineWorkerApi {
142
147
  undo: () => Promise<boolean>;
143
148
  viewport: (bounds: ViewportBounds) => Promise<EngineViewportResult>;
144
149
  }
150
+ export type GridGeometry = {
151
+ cellHeight: number;
152
+ cellWidth: number;
153
+ dividerWidth: number;
154
+ labelWidth: number;
155
+ numOverscanCols: number;
156
+ numOverscanRows: number;
157
+ rulerHeight: number;
158
+ };
145
159
  /**
146
160
  * Wire protocol between the main thread and the MSA Web Worker.
147
161
  *
@@ -160,15 +174,6 @@ export interface EngineWorkerApi {
160
174
  * - **No JSON for hot paths.** Only small plain objects are structured-cloned;
161
175
  * binary data is always transferred via the shared SAB.
162
176
  */
163
- export type GridGeometry = {
164
- cellHeight: number;
165
- cellWidth: number;
166
- dividerWidth: number;
167
- labelWidth: number;
168
- numOverscanCols: number;
169
- numOverscanRows: number;
170
- rulerHeight: number;
171
- };
172
177
  export type GridPoint = {
173
178
  col: number;
174
179
  row: number;
@@ -194,6 +199,17 @@ export type Meta = {
194
199
  undoDepth: number;
195
200
  width: number;
196
201
  };
202
+ export type MoveRowsOptions = {
203
+ delta: number;
204
+ mode: 'relative';
205
+ } | {
206
+ mode: 'bottom';
207
+ } | {
208
+ mode: 'grouped';
209
+ targetRow: number;
210
+ } | {
211
+ mode: 'top';
212
+ };
197
213
  /**The following types match the Rust `search_algorithms::Match` and search_algorithms::SearchResult structures. */
198
214
  export type SearchMatch = {
199
215
  col: number;
@@ -1,4 +1,4 @@
1
- //#region src/models/editor.models.ts
1
+ // src/models/editor.models.ts
2
2
  var e = /* @__PURE__ */ function(e) {
3
3
  return e.DOWN = "DOWN", e.LEFT = "LEFT", e.RIGHT = "RIGHT", e.UP = "UP", e;
4
4
  }({}), t = /* @__PURE__ */ function(e) {
@@ -6,7 +6,6 @@ var e = /* @__PURE__ */ function(e) {
6
6
  }({}), n = /* @__PURE__ */ function(e) {
7
7
  return e.AMINO_ACID = "amino_acid", e.NUCLEOTIDE = "nucleotide", e.RECORD_NAME = "record_name", e;
8
8
  }({});
9
- //#endregion
10
9
  export { e as EDITOR_DIRECTION, t as EDITOR_PATH_PROPERTIES_TYPE, n as MATRIX_TYPE };
11
10
 
12
11
  //# sourceMappingURL=editor.models.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"editor.models.js","names":["EDITOR_DIRECTION","\"DOWN\"","\"LEFT\"","\"RIGHT\"","\"UP\"","EDITOR_PATH_PROPERTIES_TYPE","\"CELL\"","\"DIVIDER\"","\"LABEL\"","\"RULER\"","MATRIX_TYPE","\"AMINO_ACID\"","\"NUCLEOTIDE\"","\"RECORD_NAME\""],"sources":["../../src/models/editor.models.ts"],"sourcesContent":["import type { MoveDirection } from '@rivm-loculus-tools/sequence-editor-wasm';\n\nexport enum EDITOR_DIRECTION {\n DOWN = 'DOWN',\n LEFT = 'LEFT',\n RIGHT = 'RIGHT',\n UP = 'UP',\n}\n\nexport enum EDITOR_PATH_PROPERTIES_TYPE {\n CELL = 'CELL',\n DIVIDER = 'DIVIDER',\n LABEL = 'LABEL',\n RULER = 'RULER',\n}\n\n\nexport enum MATRIX_TYPE {\n AMINO_ACID = 'amino_acid',\n NUCLEOTIDE = 'nucleotide',\n RECORD_NAME = 'record_name',\n}\n\nexport type EditorAssembly = {\n cells: EditorAssemblyCells;\n divider: EditorAssemblyDivider;\n labels: EditorAssemblyLabels;\n ruler: EditorAssemblyRuler;\n};\n\nexport type EditorAssemblyCells = {\n pathPropertiesMap: Map<Path2D, EditorPathProperties>;\n};\n\nexport type EditorAssemblyDivider = {\n pathPropertiesMap: Map<Path2D, EditorPathProperties>;\n};\n\nexport type EditorAssemblyLabels = {\n pathPropertiesMap: Map<Path2D, EditorPathProperties>;\n};\n\nexport type EditorAssemblyRuler = {\n pathPropertiesMap: Map<Path2D, EditorPathProperties>;\n};\n\nexport type EditorPathProperties = {\n col: number;\n row: number;\n type: EDITOR_PATH_PROPERTIES_TYPE.CELL;\n} | {\n col: number;\n type: EDITOR_PATH_PROPERTIES_TYPE.RULER;\n} | {\n row: number;\n type: EDITOR_PATH_PROPERTIES_TYPE.LABEL;\n} | {\n type: EDITOR_PATH_PROPERTIES_TYPE.DIVIDER;\n};\n\nexport type EditorSelection = {\n cells?: { // when a rectangular block of cells is selected\n endCol: number;\n endRow: number;\n startCol: number;\n startRow: number;\n };\n cols?: number[]; // when entire columns are selected\n rows?: number[]; // when entire rows are selected\n};\n\n/** Metadata describing the currently loaded alignment. */\nexport type EngineMeta = {\n alignmentWidth: number;\n redoDepth: number;\n sequenceCount: number;\n undoDepth: number;\n};\n\n/** A single search match, matching the Rust `search_algorithms::Match`. */\nexport type EngineSearchMatch = {\n col: number;\n matrix_type: MATRIX_TYPE;\n row: number;\n};\n\n/** Search results, matching the Rust `search_algorithms::SearchResult`. */\nexport type EngineSearchResult = {\n num_matches: number;\n positions: EngineSearchMatch[];\n query: string;\n truncated: boolean;\n};\n\n/**\n * Timing breakdown for a single request, measured in milliseconds via\n * `performance.now()`. All fields are optional so non-instrumented responses\n * (e.g. `ready`) can omit them.\n *\n * The full call-to-render latency decomposes as:\n *\n * total = bridgeOut + engineMs + bridgeBack + renderMs\n *\n * where:\n * - `engineMs` : time spent inside the Rust call (measured in worker)\n * - `workerMs` : total time the worker held the request, including the\n * Rust call + response postMessage setup (measured in worker)\n * - `bridgeOut` : main→worker postMessage latency (computed on main thread\n * as `workerReceiveTs - sentTs`, see `TimingMarks`)\n * - `bridgeBack` : worker→main postMessage latency (computed on main thread\n * as `receivedTs - workerDoneTs`)\n * - `renderMs` : time from promise resolution to browser paint (measured\n * with `requestAnimationFrame` in the harness)\n */\nexport type EngineTiming = {\n /** Time inside the Rust engine call (ms). */\n engineMs: number;\n /** Total time the worker held the request (ms): from receive to postMessage. */\n workerMs: number;\n};\n\n/** A fetched viewport or translation slice plus the metadata to interpret it. */\nexport type EngineViewportResult = {\n /** Row-major bytes, transferred from the worker via comlink. */\n bytes: Uint8Array;\n /** Number of columns per row (may be less than requested if clamped). */\n cols: number;\n /** Number of rows actually present in `bytes`. */\n rows: number;\n /** Column index of the first column in the slice. */\n startCol: number;\n /** Row index of the first row in the slice. */\n startRow: number;\n};\n\n/**\n * Contract implemented by the `EngineWorker` class and exposed to the main\n * thread through comlink. Every method is asynchronous so comlink can proxy it\n * across the worker boundary.\n */\nexport interface EngineWorkerApi {\n delete: (rows: number[], column: number) => Promise<void>;\n deleteColumn: (column: number) => Promise<void>;\n exportGappedFasta: () => Promise<string>;\n exportUngappedFasta: () => Promise<string>;\n /** Idempotently initializes the WASM engine; resolves once it is ready. */\n initialize: () => Promise<void>;\n insert: (rows: number[], column: number) => Promise<void>;\n load: (fastaContent: string) => Promise<number>;\n meta: () => Promise<EngineMeta>;\n moveHorizontal: (row: number, columns: number[], direction: MoveDirection) => Promise<void>;\n moveRowsDown: (rows: number[]) => Promise<void>;\n moveRowsUp: (rows: number[]) => Promise<void>;\n mutate: (rows: number[], column: number, base: string) => Promise<void>;\n name: (row: number) => Promise<string>;\n redo: () => Promise<boolean>;\n search: (query: string, checkRecordNames: boolean) => Promise<EngineSearchResult>;\n translate: (bounds: ViewportBounds, readingFrame: number) => Promise<EngineViewportResult>;\n undo: () => Promise<boolean>;\n viewport: (bounds: ViewportBounds) => Promise<EngineViewportResult>;\n}\n\n\n/**\n * Wire protocol between the main thread and the MSA Web Worker.\n *\n * Design goals:\n * - **Zero-copy for binary payloads via SharedArrayBuffer.** Viewport\n * responses write into a single SAB created at worker init. The worker\n * sends a tiny control message (`{sabLen, data: ViewportResult}`) and the\n * main thread reads bytes directly from shared memory — no per-call\n * structured clone of binary data.\n * - **O(1) response correlation.** Every request carries a monotonically\n * increasing `reqId`; the client keeps a `Map<reqId, resolver>` for\n * constant-time dispatch.\n * - **Typed arrays for index vectors.** Row-index lists travel as\n * `Uint32Array` (not `number[]`) to avoid per-element number boxing and to\n * match the wasm-bindgen `&[usize]` slice mapping directly.\n * - **No JSON for hot paths.** Only small plain objects are structured-cloned;\n * binary data is always transferred via the shared SAB.\n */\n\n// ---------------------------------------------------------------------------\n// Shared types\n// ---------------------------------------------------------------------------\n\nexport type GridGeometry = {\n cellHeight: number;\n cellWidth: number;\n dividerWidth: number;\n labelWidth: number;\n numOverscanCols: number;\n numOverscanRows: number;\n rulerHeight: number;\n};\n\nexport type GridPoint = {\n col: number;\n row: number;\n surface: 'cell' | 'gutter' | 'ruler';\n};\n\nexport type GridRange = {\n endCol: number;\n endRow: number;\n startCol: number;\n startRow: number;\n};\n\nexport type GridRangeWithRowNames = {\n range: GridRange;\n rowNames: string[];\n};\n\nexport type GridRangeWithViewportResults = {\n range: GridRange;\n viewportResult: EngineViewportResult;\n};\n\nexport type Meta = {\n redoDepth: number;\n sequences: number;\n undoDepth: number;\n width: number;\n};\n\n// ---------------------------------------------------------------------------\n// Main → Worker requests\n// ---------------------------------------------------------------------------\n\n/**The following types match the Rust `search_algorithms::Match` and search_algorithms::SearchResult structures. */\nexport type SearchMatch = {\n col: number;\n matrix_type: MATRIX_TYPE;\n row: number;\n};\n\n// ---------------------------------------------------------------------------\n// Worker → Main responses\n// ---------------------------------------------------------------------------\n\nexport type SearchResult = EngineSearchResult;\n\n/** Summary statistics for a set of measured values. */\nexport type Stats = {\n count: number;\n max: number;\n mean: number;\n median: number;\n min: number;\n p95: number;\n};\n\nexport type StatusBarSelectionStats = {\n cols: number;\n pos: number;\n selectedSeqs: number;\n totalSelectedChars: number;\n};\n\n/** Inclusive column/row bounds for a viewport or translation request. */\nexport type ViewportBounds = {\n endCol: number;\n endRow: number;\n startCol: number;\n startRow: number;\n};\n\n/** A fetched viewport slice plus the metadata needed to interpret it. */\nexport type ViewportResult = {\n /** Number of columns per row (may be less than requested if clamped). */\n cols: number;\n /** Number of rows actually present in `bytes`. */\n rows: number;\n /** Column index of the first column in the slice. */\n startCol: number;\n /** Row index of the first row in the slice. */\n startRow: number;\n};\n\nexport type VisibleGridRange = {\n cache: GridRange;\n visible: GridRange;\n};\n\nexport type VisibleGridRangeWithArguments = {\n geometry: GridGeometry;\n scrollLeft: number;\n scrollTop: number;\n viewportHeight: number;\n viewportWidth: number;\n visibleGridRange: VisibleGridRange;\n};\n\n/** Debug info exposed to the scrolling viewport status bar. */\nexport type WindowInfo = {\n bufBytes: number;\n bufEnd: number;\n bufStart: number;\n fetching: boolean;\n visEnd: number;\n visStart: number;\n};\n"],"mappings":";AAEA,IAAYA,IAAL,yBAAA,GAAA;QACL,EAAAC,OAAA,QACA,EAAAC,OAAA,QACA,EAAAC,QAAA,SACA,EAAAC,KAAA;AACF,EAAA,CAAA,CAAA,GAEYC,IAAL,yBAAA,GAAA;QACL,EAAAC,OAAA,QACA,EAAAC,UAAA,WACA,EAAAC,QAAA,SACA,EAAAC,QAAA;AACF,EAAA,CAAA,CAAA,GAGYC,IAAL,yBAAA,GAAA;QACL,EAAAC,aAAA,cACA,EAAAC,aAAA,cACA,EAAAC,cAAA;AACF,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"editor.models.js","names":["EDITOR_DIRECTION","\"DOWN\"","\"LEFT\"","\"RIGHT\"","\"UP\"","EDITOR_PATH_PROPERTIES_TYPE","\"CELL\"","\"DIVIDER\"","\"LABEL\"","\"RULER\"","MATRIX_TYPE","\"AMINO_ACID\"","\"NUCLEOTIDE\"","\"RECORD_NAME\""],"sources":["../../src/models/editor.models.ts"],"sourcesContent":["import type { MoveDirection } from '@rivm-loculus-tools/sequence-editor-wasm';\n\nexport enum EDITOR_DIRECTION {\n DOWN = 'DOWN',\n LEFT = 'LEFT',\n RIGHT = 'RIGHT',\n UP = 'UP',\n}\n\nexport enum EDITOR_PATH_PROPERTIES_TYPE {\n CELL = 'CELL',\n DIVIDER = 'DIVIDER',\n LABEL = 'LABEL',\n RULER = 'RULER',\n}\n\n\nexport enum MATRIX_TYPE {\n AMINO_ACID = 'amino_acid',\n NUCLEOTIDE = 'nucleotide',\n RECORD_NAME = 'record_name',\n}\n\nexport type EditorAssembly = {\n cells: EditorAssemblyCells;\n divider: EditorAssemblyDivider;\n labels: EditorAssemblyLabels;\n ruler: EditorAssemblyRuler;\n};\n\nexport type EditorAssemblyCells = {\n pathPropertiesMap: Map<Path2D, EditorPathProperties>;\n};\n\nexport type EditorAssemblyDivider = {\n pathPropertiesMap: Map<Path2D, EditorPathProperties>;\n};\n\nexport type EditorAssemblyLabels = {\n pathPropertiesMap: Map<Path2D, EditorPathProperties>;\n};\n\nexport type EditorAssemblyRuler = {\n pathPropertiesMap: Map<Path2D, EditorPathProperties>;\n};\n\nexport type EditorPathProperties = {\n col: number;\n row: number;\n type: EDITOR_PATH_PROPERTIES_TYPE.CELL;\n} | {\n col: number;\n type: EDITOR_PATH_PROPERTIES_TYPE.RULER;\n} | {\n row: number;\n type: EDITOR_PATH_PROPERTIES_TYPE.LABEL;\n} | {\n type: EDITOR_PATH_PROPERTIES_TYPE.DIVIDER;\n};\n\nexport type EditorSelection = {\n cells?: { // when a rectangular block of cells is selected\n endCol: number;\n endRow: number;\n startCol: number;\n startRow: number;\n };\n cols?: number[]; // when entire columns are selected\n rows?: number[]; // when entire rows are selected\n};\n\n/** Metadata describing the currently loaded alignment. */\nexport type EngineMeta = {\n alignmentWidth: number;\n redoDepth: number;\n sequenceCount: number;\n undoDepth: number;\n};\n\n/** A single search match, matching the Rust `search_algorithms::Match`. */\nexport type EngineSearchMatch = {\n col: number;\n matrix_type: MATRIX_TYPE;\n row: number;\n};\n\n/** Search results, matching the Rust `search_algorithms::SearchResult`. */\nexport type EngineSearchResult = {\n num_matches: number;\n positions: EngineSearchMatch[];\n query: string;\n truncated: boolean;\n};\n\n/**\n * Timing breakdown for a single request, measured in milliseconds via\n * `performance.now()`. All fields are optional so non-instrumented responses\n * (e.g. `ready`) can omit them.\n *\n * The full call-to-render latency decomposes as:\n *\n * total = bridgeOut + engineMs + bridgeBack + renderMs\n *\n * where:\n * - `engineMs` : time spent inside the Rust call (measured in worker)\n * - `workerMs` : total time the worker held the request, including the\n * Rust call + response postMessage setup (measured in worker)\n * - `bridgeOut` : main→worker postMessage latency (computed on main thread\n * as `workerReceiveTs - sentTs`, see `TimingMarks`)\n * - `bridgeBack` : worker→main postMessage latency (computed on main thread\n * as `receivedTs - workerDoneTs`)\n * - `renderMs` : time from promise resolution to browser paint (measured\n * with `requestAnimationFrame` in the harness)\n */\nexport type EngineTiming = {\n /** Time inside the Rust engine call (ms). */\n engineMs: number;\n /** Total time the worker held the request (ms): from receive to postMessage. */\n workerMs: number;\n};\n\n/** A fetched viewport or translation slice plus the metadata to interpret it. */\nexport type EngineViewportResult = {\n /** Row-major bytes, transferred from the worker via comlink. */\n bytes: Uint8Array;\n /** Number of columns per row (may be less than requested if clamped). */\n cols: number;\n /** Number of rows actually present in `bytes`. */\n rows: number;\n /** Column index of the first column in the slice. */\n startCol: number;\n /** Row index of the first row in the slice. */\n startRow: number;\n};\n\n/**\n * Contract implemented by the `EngineWorker` class and exposed to the main\n * thread through comlink. Every method is asynchronous so comlink can proxy it\n * across the worker boundary.\n */\nexport interface EngineWorkerApi {\n delete: (rows: number[], column: number) => Promise<void>;\n deleteColumn: (column: number) => Promise<void>;\n exportGappedFasta: () => Promise<string>;\n exportUngappedFasta: () => Promise<string>;\n /** Idempotently initializes the WASM engine; resolves once it is ready. */\n initialize: () => Promise<void>;\n insert: (rows: number[], column: number) => Promise<void>;\n load: (fastaContent: string) => Promise<number>;\n meta: () => Promise<EngineMeta>;\n moveHorizontal: (rows: number[], columns: number[], direction: MoveDirection) => Promise<void>;\n moveRows: (rows: number[], options: MoveRowsOptions) => Promise<void>;\n moveRowsDown: (rows: number[]) => Promise<void>;\n moveRowsGrouped: (rows: number[], targetRow: number) => Promise<void>;\n moveRowsRelative: (rows: number[], delta: number) => Promise<void>;\n moveRowsToBottom: (rows: number[]) => Promise<void>;\n moveRowsToTop: (rows: number[]) => Promise<void>;\n moveRowsUp: (rows: number[]) => Promise<void>;\n mutate: (rows: number[], columns: number[], base: string) => Promise<void>;\n name: (row: number) => Promise<string>;\n redo: () => Promise<boolean>;\n search: (query: string, checkRecordNames: boolean) => Promise<EngineSearchResult>;\n translate: (bounds: ViewportBounds, readingFrame: number) => Promise<EngineViewportResult>;\n undo: () => Promise<boolean>;\n viewport: (bounds: ViewportBounds) => Promise<EngineViewportResult>;\n}\n\nexport type GridGeometry = {\n cellHeight: number;\n cellWidth: number;\n dividerWidth: number;\n labelWidth: number;\n numOverscanCols: number;\n numOverscanRows: number;\n rulerHeight: number;\n};\n\n\n/**\n * Wire protocol between the main thread and the MSA Web Worker.\n *\n * Design goals:\n * - **Zero-copy for binary payloads via SharedArrayBuffer.** Viewport\n * responses write into a single SAB created at worker init. The worker\n * sends a tiny control message (`{sabLen, data: ViewportResult}`) and the\n * main thread reads bytes directly from shared memory — no per-call\n * structured clone of binary data.\n * - **O(1) response correlation.** Every request carries a monotonically\n * increasing `reqId`; the client keeps a `Map<reqId, resolver>` for\n * constant-time dispatch.\n * - **Typed arrays for index vectors.** Row-index lists travel as\n * `Uint32Array` (not `number[]`) to avoid per-element number boxing and to\n * match the wasm-bindgen `&[usize]` slice mapping directly.\n * - **No JSON for hot paths.** Only small plain objects are structured-cloned;\n * binary data is always transferred via the shared SAB.\n */\n\n// ---------------------------------------------------------------------------\n// Shared types\n// ---------------------------------------------------------------------------\n\nexport type GridPoint = {\n col: number;\n row: number;\n surface: 'cell' | 'gutter' | 'ruler';\n};\n\nexport type GridRange = {\n endCol: number;\n endRow: number;\n startCol: number;\n startRow: number;\n};\n\nexport type GridRangeWithRowNames = {\n range: GridRange;\n rowNames: string[];\n};\n\nexport type GridRangeWithViewportResults = {\n range: GridRange;\n viewportResult: EngineViewportResult;\n};\n\nexport type Meta = {\n redoDepth: number;\n sequences: number;\n undoDepth: number;\n width: number;\n};\n\nexport type MoveRowsOptions =\n | { delta: number; mode: 'relative' }\n | { mode: 'bottom' }\n | { mode: 'grouped'; targetRow: number }\n | { mode: 'top' };\n\n// ---------------------------------------------------------------------------\n// Main → Worker requests\n// ---------------------------------------------------------------------------\n\n/**The following types match the Rust `search_algorithms::Match` and search_algorithms::SearchResult structures. */\nexport type SearchMatch = {\n col: number;\n matrix_type: MATRIX_TYPE;\n row: number;\n};\n\n// ---------------------------------------------------------------------------\n// Worker → Main responses\n// ---------------------------------------------------------------------------\n\nexport type SearchResult = EngineSearchResult;\n\n/** Summary statistics for a set of measured values. */\nexport type Stats = {\n count: number;\n max: number;\n mean: number;\n median: number;\n min: number;\n p95: number;\n};\n\nexport type StatusBarSelectionStats = {\n cols: number;\n pos: number;\n selectedSeqs: number;\n totalSelectedChars: number;\n};\n\n/** Inclusive column/row bounds for a viewport or translation request. */\nexport type ViewportBounds = {\n endCol: number;\n endRow: number;\n startCol: number;\n startRow: number;\n};\n\n/** A fetched viewport slice plus the metadata needed to interpret it. */\nexport type ViewportResult = {\n /** Number of columns per row (may be less than requested if clamped). */\n cols: number;\n /** Number of rows actually present in `bytes`. */\n rows: number;\n /** Column index of the first column in the slice. */\n startCol: number;\n /** Row index of the first row in the slice. */\n startRow: number;\n};\n\nexport type VisibleGridRange = {\n cache: GridRange;\n visible: GridRange;\n};\n\nexport type VisibleGridRangeWithArguments = {\n geometry: GridGeometry;\n scrollLeft: number;\n scrollTop: number;\n viewportHeight: number;\n viewportWidth: number;\n visibleGridRange: VisibleGridRange;\n};\n\n/** Debug info exposed to the scrolling viewport status bar. */\nexport type WindowInfo = {\n bufBytes: number;\n bufEnd: number;\n bufStart: number;\n fetching: boolean;\n visEnd: number;\n visStart: number;\n};\n"],"mappings":";AAEA,IAAYA,IAAL,yBAAA,GAAA;C,OACL,EAAAC,OAAA,QACA,EAAAC,OAAA,QACA,EAAAC,QAAA,SACA,EAAAC,KAAA,M;AACF,EAAA,CAAA,CAAA,GAEYC,IAAL,yBAAA,GAAA;C,OACL,EAAAC,OAAA,QACA,EAAAC,UAAA,WACA,EAAAC,QAAA,SACA,EAAAC,QAAA,S;AACF,EAAA,CAAA,CAAA,GAGYC,IAAL,yBAAA,GAAA;C,OACL,EAAAC,aAAA,cACA,EAAAC,aAAA,cACA,EAAAC,cAAA,e;AACF,EAAA,CAAA,CAAA"}
@@ -1,10 +1,9 @@
1
- //#region src/models/palette.models.ts
1
+ // src/models/palette.models.ts
2
2
  var e = /* @__PURE__ */ function(e) {
3
3
  return e.A = "A", e.C = "C", e.D = "D", e.E = "E", e.F = "F", e.G = "G", e.GAP = "-", e.H = "H", e.I = "I", e.K = "K", e.L = "L", e.M = "M", e.N = "N", e.P = "P", e.Q = "Q", e.R = "R", e.S = "S", e.STOP = "*", e.T = "T", e.V = "V", e.W = "W", e.X = "X", e.Y = "Y", e;
4
4
  }({}), t = /* @__PURE__ */ function(e) {
5
5
  return e.A = "A", e.B = "B", e.C = "C", e.D = "D", e.G = "G", e.GAP = "-", e.H = "H", e.K = "K", e.M = "M", e.N = "N", e.R = "R", e.S = "S", e.T = "T", e.U = "U", e.UNKNOWN = "X", e.V = "V", e.W = "W", e.Y = "Y", e;
6
6
  }({});
7
- //#endregion
8
7
  export { e as AminoAcidSymbol, t as NucleotideSymbol };
9
8
 
10
9
  //# sourceMappingURL=palette.models.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"palette.models.js","names":["AminoAcidSymbol","\"A\"","\"C\"","\"D\"","\"E\"","\"F\"","\"G\"","\"GAP\"","\"H\"","\"I\"","\"K\"","\"L\"","\"M\"","\"N\"","\"P\"","\"Q\"","\"R\"","\"S\"","\"STOP\"","\"T\"","\"V\"","\"W\"","\"X\"","\"Y\"","NucleotideSymbol","\"B\"","\"U\"","\"UNKNOWN\""],"sources":["../../src/models/palette.models.ts"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/naming-convention\nexport enum AminoAcidSymbol {\n A = 'A',\n C = 'C',\n D = 'D',\n E = 'E',\n F = 'F',\n G = 'G',\n GAP = '-',\n H = 'H',\n I = 'I',\n K = 'K',\n L = 'L',\n M = 'M',\n N = 'N',\n P = 'P',\n Q = 'Q',\n R = 'R',\n S = 'S',\n STOP = '*',\n T = 'T',\n V = 'V',\n W = 'W',\n X = 'X',\n Y = 'Y',\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport enum NucleotideSymbol {\n A = 'A',\n B = 'B',\n C = 'C',\n D = 'D',\n G = 'G',\n GAP = '-',\n H = 'H',\n K = 'K',\n M = 'M',\n N = 'N',\n R = 'R',\n S = 'S',\n T = 'T',\n U = 'U',\n UNKNOWN = 'X',\n V = 'V',\n W = 'W',\n Y = 'Y',\n}\n\nexport type AminoAcidPalette = {\n name: string;\n paletteColors: AminoAcidPaletteColors;\n};\nexport type AminoAcidPaletteColors = Record<AminoAcidSymbol, PaletteEntry>;\n\nexport type NucleotidePalette = {\n name: string;\n paletteColors: NucleotidePaletteColors;\n};\n\nexport type NucleotidePaletteColors = Record<NucleotideSymbol, PaletteEntry>;\n\nexport type PaletteEntry = {\n background: string;\n backgroundSelected: string;\n foreground: string;\n foregroundSelected: string;\n};\n"],"mappings":";AACA,IAAYA,IAAL,yBAAA,GAAA;QACL,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,MAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,OAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA;AACF,EAAA,CAAA,CAAA,GAGYC,IAAL,yBAAA,GAAA;QACL,EAAAvB,IAAA,KACA,EAAAwB,IAAA,KACA,EAAAvB,IAAA,KACA,EAAAC,IAAA,KACA,EAAAG,IAAA,KACA,EAAAC,MAAA,KACA,EAAAC,IAAA,KACA,EAAAE,IAAA,KACA,EAAAE,IAAA,KACA,EAAAC,IAAA,KACA,EAAAG,IAAA,KACA,EAAAC,IAAA,KACA,EAAAE,IAAA,KACA,EAAAO,IAAA,KACA,EAAAC,UAAA,KACA,EAAAP,IAAA,KACA,EAAAC,IAAA,KACA,EAAAE,IAAA;AACF,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"palette.models.js","names":["AminoAcidSymbol","\"A\"","\"C\"","\"D\"","\"E\"","\"F\"","\"G\"","\"GAP\"","\"H\"","\"I\"","\"K\"","\"L\"","\"M\"","\"N\"","\"P\"","\"Q\"","\"R\"","\"S\"","\"STOP\"","\"T\"","\"V\"","\"W\"","\"X\"","\"Y\"","NucleotideSymbol","\"B\"","\"U\"","\"UNKNOWN\""],"sources":["../../src/models/palette.models.ts"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/naming-convention\nexport enum AminoAcidSymbol {\n A = 'A',\n C = 'C',\n D = 'D',\n E = 'E',\n F = 'F',\n G = 'G',\n GAP = '-',\n H = 'H',\n I = 'I',\n K = 'K',\n L = 'L',\n M = 'M',\n N = 'N',\n P = 'P',\n Q = 'Q',\n R = 'R',\n S = 'S',\n STOP = '*',\n T = 'T',\n V = 'V',\n W = 'W',\n X = 'X',\n Y = 'Y',\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport enum NucleotideSymbol {\n A = 'A',\n B = 'B',\n C = 'C',\n D = 'D',\n G = 'G',\n GAP = '-',\n H = 'H',\n K = 'K',\n M = 'M',\n N = 'N',\n R = 'R',\n S = 'S',\n T = 'T',\n U = 'U',\n UNKNOWN = 'X',\n V = 'V',\n W = 'W',\n Y = 'Y',\n}\n\nexport type AminoAcidPalette = {\n name: string;\n paletteColors: AminoAcidPaletteColors;\n};\nexport type AminoAcidPaletteColors = Record<AminoAcidSymbol, PaletteEntry>;\n\nexport type NucleotidePalette = {\n name: string;\n paletteColors: NucleotidePaletteColors;\n};\n\nexport type NucleotidePaletteColors = Record<NucleotideSymbol, PaletteEntry>;\n\nexport type PaletteEntry = {\n background: string;\n backgroundSelected: string;\n foreground: string;\n foregroundSelected: string;\n};\n"],"mappings":";AACA,IAAYA,IAAL,yBAAA,GAAA;C,OACL,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,MAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,OAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,KACA,EAAAC,IAAA,K;AACF,EAAA,CAAA,CAAA,GAGYC,IAAL,yBAAA,GAAA;C,OACL,EAAAvB,IAAA,KACA,EAAAwB,IAAA,KACA,EAAAvB,IAAA,KACA,EAAAC,IAAA,KACA,EAAAG,IAAA,KACA,EAAAC,MAAA,KACA,EAAAC,IAAA,KACA,EAAAE,IAAA,KACA,EAAAE,IAAA,KACA,EAAAC,IAAA,KACA,EAAAG,IAAA,KACA,EAAAC,IAAA,KACA,EAAAE,IAAA,KACA,EAAAO,IAAA,KACA,EAAAC,UAAA,KACA,EAAAP,IAAA,KACA,EAAAC,IAAA,KACA,EAAAE,IAAA,K;AACF,EAAA,CAAA,CAAA"}
@@ -1,63 +1,41 @@
1
1
  import { t as e } from "../../_chunks/sequenceEditorStore.js";
2
2
  import { t } from "../../_chunks/react.js";
3
3
  import { t as n } from "../../_chunks/SequenceEditor.js";
4
- import { useCallback as r, useMemo as i } from "react";
5
- import { container as a } from "tsyringe";
6
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ import { FastaDataImportDialogLoader as a } from "@rivm-loculus-tools/common-frontend/components/fasta/FastaDataImportDialogLoader";
6
+ import { BackdropSpinner as o } from "@gen-epix/ui-core-components/components/BackdropSpinner";
7
+ import { FastaNotLoaded as s } from "@rivm-loculus-tools/common-frontend/components/fasta/FastaNotLoaded";
7
8
  import c from "@mui/icons-material/BiotechOutlined";
8
- import { FastaDataEventBusService as l } from "@rivm-loculus-tools/common-frontend/classes/services/FastaDataEventBusService";
9
- import { ErrorUtil as u } from "@rivm-loculus-tools/common-frontend/utils/ErrorUtil";
10
- import { UrlUtil as d } from "@rivm-loculus-tools/common-frontend/utils/UrlUtil";
11
- import { FastaDataImportDialogLoader as f } from "@rivm-loculus-tools/common-frontend/components/fasta/FastaDataImportDialogLoader";
12
- import { BackdropSpinner as p } from "@gen-epix/ui-core-components/components/BackdropSpinner";
13
- import { FastaNotLoaded as m } from "@rivm-loculus-tools/common-frontend/components/fasta/FastaNotLoaded";
14
- import { LOADING_STATUS as h } from "@rivm-loculus-tools/common-frontend/models/fasta.models";
15
- import { PageCommon as g } from "@rivm-loculus-tools/common-frontend/components/ui/PageCommon";
16
- //#region src/pages/SequenceEditorMainPage/SequenceEditorMainPage.tsx
17
- var _ = () => {
18
- let _ = t(e, (e) => e.loadingStatus), v = t(e, (e) => e.setData), y = t(e, (e) => e.rawFasta), b = r(async () => {
19
- try {
20
- let e = await (await fetch("/sample-data/sarscov2_demo.fasta")).text();
21
- await v(e), a.resolve(l).emit("onCloseImportDialog");
22
- } catch (e) {
23
- a.resolve(l).emit("onCloseImportDialog");
24
- let t = `Failed to load demo dataset: ${u.getErrorMessage(e, "Unknown error")}`;
25
- a.resolve(l).emit("onShowImportDialog", t);
26
- } finally {
27
- d.clearSearchParams();
28
- }
29
- }, [v]), x = i(() => [{
30
- autoFocus: !0,
31
- color: "secondary",
32
- label: "Demo (SARS-CoV-2)",
33
- onClick: b,
34
- variant: "contained"
35
- }], [b]);
36
- return /* @__PURE__ */ s(g, {
9
+ import { LOADING_STATUS as l } from "@rivm-loculus-tools/common-frontend/models/fasta.models";
10
+ import { PageCommon as u } from "@rivm-loculus-tools/common-frontend/components/ui/PageCommon";
11
+ import { useConfig as d } from "@rivm-loculus-tools/common-frontend/hooks/useConfig";
12
+ // src/pages/SequenceEditorMainPage/SequenceEditorMainPage.tsx
13
+ var f = () => {
14
+ let f = d(), p = t(e, (e) => e.loadingStatus), m = t(e, (e) => e.rawFasta);
15
+ return /* @__PURE__ */ i(u, {
37
16
  isNoInteraction: !1,
38
17
  title: "Sequence Editor",
39
18
  children: [
40
- y && /* @__PURE__ */ o(n, {}),
41
- !y && /* @__PURE__ */ o(m, {
19
+ m && /* @__PURE__ */ r(n, {}),
20
+ !m && /* @__PURE__ */ r(s, {
42
21
  description: "Load a FASTA sequence file to enable the editor.",
43
- icon: /* @__PURE__ */ o(c, { sx: {
22
+ icon: /* @__PURE__ */ r(c, { sx: {
44
23
  color: "text.disabled",
45
24
  fontSize: 72
46
25
  } }),
47
26
  title: "No FASTA Sequence Loaded"
48
27
  }),
49
- /* @__PURE__ */ o(f, {
50
- extraActions: x,
28
+ /* @__PURE__ */ r(a, {
29
+ extraActions: f?.fastaImportExtraActions,
51
30
  store: e
52
31
  }),
53
- /* @__PURE__ */ o(p, {
32
+ /* @__PURE__ */ r(o, {
54
33
  label: "Computing phylogenetic tree",
55
- open: _ === h.LOADING
34
+ open: p === l.LOADING
56
35
  })
57
36
  ]
58
37
  });
59
38
  };
60
- //#endregion
61
- export { _ as SequenceEditorMainPage };
39
+ export { f as SequenceEditorMainPage };
62
40
 
63
41
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["sequenceEditorStore","SequenceEditor","BiotechOutlinedIcon","SequenceEditorMainPage","loadingStatus","useStore","state","setData","rawFasta","onClickLoadDemoData","useCallback","demoFastaText","container","FastaDataEventBusService","err","errorMessage","ErrorUtil","extraFastaDataImportDialogLoaderActions","useMemo","PageCommon","FastaNotLoaded","FastaDataImportDialogLoader","BackdropSpinner","LOADING_STATUS"],"sources":["../../../src/pages/SequenceEditorMainPage/SequenceEditorMainPage.tsx"],"sourcesContent":["import { container } from 'tsyringe';\nimport { useStore } from 'zustand';\nimport {\n useCallback,\n useMemo,\n} from 'react';\nimport { FastaDataEventBusService } from '@rivm-loculus-tools/common-frontend/classes/services/FastaDataEventBusService';\nimport { ErrorUtil } from '@rivm-loculus-tools/common-frontend/utils/ErrorUtil';\nimport { UrlUtil } from '@rivm-loculus-tools/common-frontend/utils/UrlUtil';\nimport type { DialogAction } from '@gen-epix/ui-core-components/components/Dialog';\nimport { FastaDataImportDialogLoader } from '@rivm-loculus-tools/common-frontend/components/fasta/FastaDataImportDialogLoader';\nimport { BackdropSpinner } from '@gen-epix/ui-core-components/components/BackdropSpinner';\nimport { FastaNotLoaded } from '@rivm-loculus-tools/common-frontend/components/fasta/FastaNotLoaded';\nimport BiotechOutlinedIcon from '@mui/icons-material/BiotechOutlined';\nimport { LOADING_STATUS } from '@rivm-loculus-tools/common-frontend/models/fasta.models';\nimport { PageCommon } from '@rivm-loculus-tools/common-frontend/components/ui/PageCommon';\n\nimport { sequenceEditorStore } from '../../stores/sequenceEditorStore';\nimport { SequenceEditor } from '../../components/ui/SequenceEditor';\n\n\nexport const SequenceEditorMainPage = () => {\n const loadingStatus = useStore(sequenceEditorStore, (state) => state.loadingStatus);\n const setData = useStore(sequenceEditorStore, (state) => state.setData);\n const rawFasta = useStore(sequenceEditorStore, (state) => state.rawFasta);\n\n const onClickLoadDemoData = useCallback(async () => {\n try {\n const fastaRes = await fetch('/sample-data/sarscov2_demo.fasta');\n const demoFastaText = await fastaRes.text();\n\n await setData(demoFastaText);\n container.resolve(FastaDataEventBusService).emit('onCloseImportDialog');\n } catch (err: unknown) {\n container.resolve(FastaDataEventBusService).emit('onCloseImportDialog');\n const errorMessage = `Failed to load demo dataset: ${ErrorUtil.getErrorMessage(err, 'Unknown error')}`;\n container.resolve(FastaDataEventBusService).emit('onShowImportDialog', errorMessage);\n } finally {\n UrlUtil.clearSearchParams();\n }\n }, [setData]);\n\n const extraFastaDataImportDialogLoaderActions = useMemo<DialogAction[]>(() => [\n {\n autoFocus: true,\n color: 'secondary',\n label: 'Demo (SARS-CoV-2)',\n onClick: onClickLoadDemoData,\n variant: 'contained',\n },\n ], [onClickLoadDemoData]);\n\n return (\n <PageCommon\n isNoInteraction={false}\n title={'Sequence Editor'}\n >\n {rawFasta && (\n <SequenceEditor />\n )}\n {!rawFasta && (\n <FastaNotLoaded\n description={'Load a FASTA sequence file to enable the editor.'}\n icon={<BiotechOutlinedIcon sx={{ color: 'text.disabled', fontSize: 72 }} />}\n title={'No FASTA Sequence Loaded'}\n />\n )}\n <FastaDataImportDialogLoader\n extraActions={extraFastaDataImportDialogLoaderActions}\n store={sequenceEditorStore}\n />\n <BackdropSpinner\n label={`Computing phylogenetic tree`}\n open={loadingStatus === LOADING_STATUS.LOADING}\n />\n </PageCommon>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAqBA,IAAaG,UAA+B;CAC1C,IAAMC,IAAgBC,EAASL,IAAsB,MAAUM,EAAM,aAAa,GAC5EC,IAAUF,EAASL,IAAsB,MAAUM,EAAM,OAAO,GAChEE,IAAWH,EAASL,IAAsB,MAAUM,EAAM,QAAQ,GAElEG,IAAsBC,EAAY,YAAY;EAClD,IAAI;GAEF,IAAMC,IAAgB,OAAM,MADL,MAAM,kCAAkC,EAAA,CAC1B,KAAK;GAG1C,AADA,MAAMJ,EAAQI,CAAa,GAC3BC,EAAU,QAAQC,CAAwB,CAAC,CAAC,KAAK,qBAAqB;EACxE,SAASC,GAAc;GACrB,EAAU,QAAQD,CAAwB,CAAC,CAAC,KAAK,qBAAqB;GACtE,IAAME,IAAe,gCAAgCC,EAAU,gBAAgBF,GAAK,eAAe;GACnG,EAAU,QAAQD,CAAwB,CAAC,CAAC,KAAK,sBAAsBE,CAAY;EACrF,UAAU;GACR,EAAQ,kBAAkB;EAC5B;CACF,GAAG,CAACR,CAAO,CAAC,GAENU,IAA0CC,QAA8B,CAC5E;EACE,WAAW;EACX,OAAO;EACP,OAAO;EACP,SAAST;EACT,SAAS;CACX,CACF,GAAG,CAACA,CAAmB,CAAC;CAExB,OACE,kBAACU,GAAD;EACE,iBAAiB;EACjB,OAAO;EAFT,UAAA;GAIGX,KACC,kBAACP,GAAD,CAAiB,CAAA;GAElB,CAACO,KACA,kBAACY,GAAD;IACE,aAAa;IACb,MAAM,kBAAClB,GAAD,EAAqB,IAAI;KAAE,OAAO;KAAiB,UAAU;IAAG,EAAI,CAAA;IAC1E,OAAO;GACR,CAAA;GAEH,kBAACmB,GAAD;IACE,cAAcJ;IACd,OAAOjB;GACR,CAAA;GACD,kBAACsB,GAAD;IACE,OAAO;IACP,MAAMlB,MAAkBmB,EAAe;GACxC,CAAA;EACS;;AAEhB"}
1
+ {"version":3,"file":"index.js","names":["sequenceEditorStore","SequenceEditor","BiotechOutlinedIcon","SequenceEditorMainPage","config","useConfig","loadingStatus","useStore","state","rawFasta","PageCommon","FastaNotLoaded","FastaDataImportDialogLoader","BackdropSpinner","LOADING_STATUS"],"sources":["../../../src/pages/SequenceEditorMainPage/SequenceEditorMainPage.tsx"],"sourcesContent":["import { useStore } from 'zustand';\nimport { FastaDataImportDialogLoader } from '@rivm-loculus-tools/common-frontend/components/fasta/FastaDataImportDialogLoader';\nimport { BackdropSpinner } from '@gen-epix/ui-core-components/components/BackdropSpinner';\nimport { FastaNotLoaded } from '@rivm-loculus-tools/common-frontend/components/fasta/FastaNotLoaded';\nimport BiotechOutlinedIcon from '@mui/icons-material/BiotechOutlined';\nimport { LOADING_STATUS } from '@rivm-loculus-tools/common-frontend/models/fasta.models';\nimport { PageCommon } from '@rivm-loculus-tools/common-frontend/components/ui/PageCommon';\nimport { useConfig } from '@rivm-loculus-tools/common-frontend/hooks/useConfig';\n\nimport { sequenceEditorStore } from '../../stores/sequenceEditorStore';\nimport { SequenceEditor } from '../../components/ui/SequenceEditor';\nimport type { SequenceEditorConfig } from '../../models/config.models';\n\n\nexport const SequenceEditorMainPage = () => {\n const config = useConfig<SequenceEditorConfig>();\n const loadingStatus = useStore(sequenceEditorStore, (state) => state.loadingStatus);\n const rawFasta = useStore(sequenceEditorStore, (state) => state.rawFasta);\n\n return (\n <PageCommon\n isNoInteraction={false}\n title={'Sequence Editor'}\n >\n {rawFasta && (\n <SequenceEditor />\n )}\n {!rawFasta && (\n <FastaNotLoaded\n description={'Load a FASTA sequence file to enable the editor.'}\n icon={<BiotechOutlinedIcon sx={{ color: 'text.disabled', fontSize: 72 }} />}\n title={'No FASTA Sequence Loaded'}\n />\n )}\n <FastaDataImportDialogLoader\n extraActions={config?.fastaImportExtraActions}\n store={sequenceEditorStore}\n />\n <BackdropSpinner\n label={`Computing phylogenetic tree`}\n open={loadingStatus === LOADING_STATUS.LOADING}\n />\n </PageCommon>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAcA,IAAaG,UAA+B;CAC1C,IAAMC,IAASC,EAAgC,GACzCC,IAAgBC,EAASP,IAAsB,MAAUQ,EAAM,aAAa,GAC5EC,IAAWF,EAASP,IAAsB,MAAUQ,EAAM,QAAQ;CAExE,OACE,kBAACE,GAAD;EACE,iBAAiB;EACjB,OAAO;EAFT,UAAA;GAIGD,KACC,kBAACR,GAAD,CAAiB,CAAA;GAElB,CAACQ,KACA,kBAACE,GAAD;IACE,aAAa;IACb,MAAM,kBAACT,GAAD,EAAqB,IAAI;KAAE,OAAO;KAAiB,UAAU;IAAG,EAAI,CAAA;IAC1E,OAAO;GACR,CAAA;GAEH,kBAACU,GAAD;IACE,cAAcR,GAAQ;IACtB,OAAOJ;GACR,CAAA;GACD,kBAACa,GAAD;IACE,OAAO;IACP,MAAMP,MAAkBQ,EAAe;GACxC,CAAA;EACS;;AAEhB"}
@@ -19,11 +19,13 @@ export declare class EditorUtil {
19
19
  viewportWidth: number;
20
20
  }): EditorAssembly;
21
21
  static getExpandedSelection(currentSelection: EditorSelection, initialSelection: EditorSelection, direction: EDITOR_DIRECTION, metaData: EngineMeta): EditorSelection | null;
22
+ static getMovedRowsEndSelection(selection: EditorSelection | null, direction: EDITOR_DIRECTION, metaData: EngineMeta | null): EditorSelection | null;
23
+ static getMovedRowsGroupedSelection(selection: EditorSelection | null, targetRow: number, metaData: EngineMeta | null): EditorSelection | null;
24
+ static getMovedRowsRelativeSelection(selection: EditorSelection | null, direction: EDITOR_DIRECTION, metaData: EngineMeta | null): EditorSelection | null;
22
25
  static getMovedSelection(selection: EditorSelection | null, direction: EDITOR_DIRECTION, metaData: EngineMeta | null): EditorSelection | null;
23
26
  static getMutateArguments(selection: EditorSelection | null, metaData: EngineMeta, offset?: number): {
24
- endCol: number;
27
+ columns: number[];
25
28
  rows: number[];
26
- startCol: number;
27
29
  } | undefined;
28
30
  /**
29
31
  * Performs a hit-test against the tree assembly's path maps to find the