@rivm-loculus-tools/sequence-editor 1.6.5 → 1.7.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.
- package/dist/_chunks/EngineWorker.js +7 -0
- package/dist/_chunks/EngineWorker.js.map +1 -0
- package/dist/_chunks/SequenceEditor.js +333 -294
- package/dist/_chunks/SequenceEditor.js.map +1 -1
- package/dist/_chunks/SequenceEditorEventBusService.js.map +1 -1
- package/dist/_chunks/SequenceEditorPageDrawer.js +1392 -195
- package/dist/_chunks/SequenceEditorPageDrawer.js.map +1 -1
- package/dist/_chunks/sequenceEditorStore.js +39 -24
- package/dist/_chunks/sequenceEditorStore.js.map +1 -1
- package/dist/_chunks/sequence_editor.js +146 -127
- package/dist/_chunks/sequence_editor.js.map +1 -1
- package/dist/assets/AlignerWorker-Cf4trdzm.js +8 -0
- package/dist/assets/AlignerWorker-Cf4trdzm.js.map +1 -0
- package/dist/assets/index-YCKQaSTQ.js +8 -0
- package/dist/assets/index-YCKQaSTQ.js.map +1 -0
- package/dist/assets/palette.schema.json +256 -0
- package/dist/classes/services/EditorWorkerService/EditorWorkerService.d.ts +6 -0
- package/dist/classes/services/EditorWorkerService/index.js +42 -2
- package/dist/classes/services/EditorWorkerService/index.js.map +1 -1
- package/dist/classes/services/SequenceEditorEventBusService/SequenceEditorEventBusService.d.ts +2 -0
- package/dist/classes/workers/AlignerWorker/AlignerWorker.d.ts +14 -0
- package/dist/classes/workers/AlignerWorker/index.d.ts +1 -0
- package/dist/classes/workers/AlignerWorker/index.js +19 -0
- package/dist/classes/workers/AlignerWorker/index.js.map +1 -0
- package/dist/classes/workers/EngineWorker/EngineWorker.d.ts +1 -0
- package/dist/classes/workers/EngineWorker/index.js +4 -1
- package/dist/classes/workers/EngineWorker/index.js.map +1 -1
- package/dist/components/ui/SequenceEditorPageDrawer/SequenceEditorPageDrawerColorForm.d.ts +17 -6
- package/dist/components/ui/SequenceEditorPageDrawer/SequenceEditorPageDrawerColorPicker.d.ts +10 -0
- package/dist/components/ui/SequenceEditorPageHeader/index.js +71 -53
- package/dist/components/ui/SequenceEditorPageHeader/index.js.map +1 -1
- package/dist/components/ui/SequenceEditorRealignModal/SequenceEditorRealignModal.d.ts +7 -0
- package/dist/components/ui/SequenceEditorRealignModal/index.d.ts +1 -0
- package/dist/components/ui/SequenceEditorRealignModal/index.js +49 -0
- package/dist/components/ui/SequenceEditorRealignModal/index.js.map +1 -0
- package/dist/constants/index.js +4 -4
- package/dist/constants/palette.d.ts +4 -0
- package/dist/constants/palette.js +85 -42
- package/dist/constants/palette.js.map +1 -1
- package/dist/models/editor.models.d.ts +9 -5
- package/dist/models/editor.models.js.map +1 -1
- package/dist/models/palette.models.d.ts +1 -0
- package/dist/models/palette.models.js +2 -2
- package/dist/models/palette.models.js.map +1 -1
- package/dist/stores/sequenceEditorStore/sequenceEditorStore.d.ts +6 -0
- package/dist/utils/EditorUtil/index.js +82 -82
- package/dist/utils/PaletteUtil/PaletteUtil.d.ts +4 -0
- package/dist/utils/PaletteUtil/index.js +35 -2
- package/dist/utils/PaletteUtil/index.js.map +1 -1
- package/dist/vite/paletteSchemaPlugin/index.d.ts +1 -0
- package/dist/vite/paletteSchemaPlugin/index.js +60 -0
- package/dist/vite/paletteSchemaPlugin/index.js.map +1 -0
- package/dist/vite/paletteSchemaPlugin/paletteSchemaPlugin.d.ts +2 -0
- package/package.json +28 -14
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { PaletteUtil as e } from "../PaletteUtil/index.js";
|
|
2
|
+
import { DEFAULT_GRID_GEOMETRY as t } from "../../constants/editor.js";
|
|
3
|
+
import { EDITOR_DIRECTION as n, EDITOR_PATH_PROPERTIES_TYPE as r, MATRIX_TYPE as i } from "../../models/editor.models.js";
|
|
4
4
|
import "../../constants/index.js";
|
|
5
5
|
// \0rolldown/runtime.js
|
|
6
6
|
var a = Object.create, o = Object.defineProperty, s = Object.getOwnPropertyDescriptor, c = Object.getOwnPropertyNames, l = Object.getPrototypeOf, u = Object.prototype.hasOwnProperty, d = (e, t) => () => (t || (e((t = { exports: {} }).exports, t, t.exports), e = null), t.exports), f = (e, t, n, r) => {
|
|
@@ -235,52 +235,52 @@ var a = Object.create, o = Object.defineProperty, s = Object.getOwnPropertyDescr
|
|
|
235
235
|
}
|
|
236
236
|
t.exports = o;
|
|
237
237
|
})))(), 1), G = class a {
|
|
238
|
-
static drawCanvas({ canvasElement:
|
|
238
|
+
static drawCanvas({ canvasElement: t, devicePixelRatio: n, geometry: o, meta: s, palette: c, rowNames: l, rowNamesStartRow: u, scrollLeft: d, scrollTop: f, searchResult: p, searchResultHighlightedIndex: m, selection: h, viewport: g, viewportHeight: _, viewportWidth: v }) {
|
|
239
239
|
let y = {
|
|
240
240
|
cells: { pathPropertiesMap: /* @__PURE__ */ new Map() },
|
|
241
241
|
divider: { pathPropertiesMap: /* @__PURE__ */ new Map() },
|
|
242
242
|
labels: { pathPropertiesMap: /* @__PURE__ */ new Map() },
|
|
243
243
|
ruler: { pathPropertiesMap: /* @__PURE__ */ new Map() }
|
|
244
244
|
};
|
|
245
|
-
if (!
|
|
246
|
-
let b =
|
|
245
|
+
if (!t) return y;
|
|
246
|
+
let b = t.getContext("2d");
|
|
247
247
|
if (!b) return y;
|
|
248
248
|
let x = s.sequenceCount.toString().length, S = (e) => h?.rows?.includes(e) ?? !1, C = (e, t) => !!(h?.cells && t >= h.cells.startCol && t <= h.cells.endCol && e >= h.cells.startRow && e <= h.cells.endRow) || !!h?.cols?.includes(t) || !!S(e), w = p && m !== null ? a.searchHitAt(p, m) : null;
|
|
249
|
-
return a.draw(
|
|
250
|
-
b.clearRect(0, 0,
|
|
251
|
-
let { cellHeight:
|
|
249
|
+
return a.draw(t, n, () => {
|
|
250
|
+
b.clearRect(0, 0, t.width, t.height);
|
|
251
|
+
let { cellHeight: n, cellWidth: s, dividerWidth: m, labelWidth: T, rulerHeight: E } = o, D = T + m, { bytes: O, cols: k, rows: A, startCol: j, startRow: M } = g, N = (p?.positions.length ?? 0) > 0, P = N ? new Uint8Array(A * k) : null, F = w ? new Uint8Array(A * k) : null, I = N ? new Uint8Array(A) : null, L = w ? new Uint8Array(A) : null, R = N ? new Path2D() : null, z = w ? new Path2D() : null, B = !1, V = !1, H = (e, t) => {
|
|
252
252
|
if (!p) return;
|
|
253
|
-
let n = Math.max(1, p.query.length),
|
|
254
|
-
if (
|
|
255
|
-
if (e.matrix_type ===
|
|
256
|
-
t.fill(1,
|
|
253
|
+
let n = Math.max(1, p.query.length), r = e.row - M;
|
|
254
|
+
if (r < 0 || r >= A) return;
|
|
255
|
+
if (e.matrix_type === i.RECORD_NAME) {
|
|
256
|
+
t.fill(1, r * k, (r + 1) * k);
|
|
257
257
|
return;
|
|
258
258
|
}
|
|
259
259
|
let o = Math.max(j, e.col), s = Math.min(j + k, e.col + n);
|
|
260
260
|
if (o >= s || !a.searchHitContainsCell(e, p.query, e.row, o)) return;
|
|
261
|
-
let c =
|
|
261
|
+
let c = r * k + o - j;
|
|
262
262
|
t.fill(1, c, c + s - o);
|
|
263
263
|
}, U = (e, t) => {
|
|
264
|
-
e.matrix_type ===
|
|
264
|
+
e.matrix_type === i.RECORD_NAME && e.row >= M && e.row < M + A && (t[e.row - M] = 1);
|
|
265
265
|
};
|
|
266
266
|
p && P && (p.positions.forEach((e) => H(e, P)), p.positions.forEach((e) => {
|
|
267
267
|
I && U(e, I);
|
|
268
268
|
}), w && F && (H(w, F), L && U(w, L))), b.font = "12px monospace", b.textAlign = "center", b.textBaseline = "middle";
|
|
269
|
-
for (let
|
|
270
|
-
let
|
|
271
|
-
if (!(
|
|
269
|
+
for (let t = 0; t < A; t++) {
|
|
270
|
+
let i = (M + t) * n + E - f;
|
|
271
|
+
if (!(i + n < E || i > _)) for (let a = 0; a < k; a++) {
|
|
272
272
|
let o = (j + a) * s + D - d;
|
|
273
273
|
if (o + s < D || o > v) continue;
|
|
274
|
-
let l = O[
|
|
274
|
+
let l = O[t * k + a], u = j + a, f = M + t, p = l ?? "", m = String.fromCharCode(p), h = e.paletteEntryFor(c, m), g = h.background;
|
|
275
275
|
l === null ? g = "#e9eef2" : m === " " && (g = "#f7f8f9");
|
|
276
276
|
let _ = h.foreground;
|
|
277
277
|
C(f, u) && (g = h.backgroundSelected, _ = h.foregroundSelected);
|
|
278
|
-
let x =
|
|
279
|
-
T.rect(o,
|
|
278
|
+
let x = t * k + a, S = P?.[x] === 1, w = F?.[x] === 1, T = new Path2D();
|
|
279
|
+
T.rect(o, i, s, n), T.closePath(), y.cells.pathPropertiesMap.set(T, {
|
|
280
280
|
col: u,
|
|
281
281
|
row: f,
|
|
282
|
-
type:
|
|
283
|
-
}), b.fillStyle = g, b.fill(T), (w || L?.[
|
|
282
|
+
type: r.CELL
|
|
283
|
+
}), b.fillStyle = g, b.fill(T), (w || L?.[t] === 1) && (b.fillStyle = "rgba(255, 193, 7, 0.35)", b.fillRect(o + 2, i + 2, Math.max(0, s - 4), Math.max(0, n - 4))), b.fillStyle = _, b.fillText(m, o + s / 2, i + n / 2), (S || I?.[t] === 1) && R && (B = !0, R.rect(o + .5, i + .5, s - 1, n - 1), (w || L?.[t] === 1) && z && (V = !0, z.rect(o + 1, i + 1, s - 2, n - 2)));
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
286
|
B && R && (b.strokeStyle = "#000000", b.lineWidth = 1, b.stroke(R)), V && z && (b.lineWidth = 2, b.stroke(z)), b.fillStyle = "#edf2f6", b.fillRect(0, 0, v, E), b.font = "12px monospace", b.textBaseline = "middle";
|
|
@@ -289,12 +289,12 @@ var a = Object.create, o = Object.defineProperty, s = Object.getOwnPropertyDescr
|
|
|
289
289
|
for (let e = 0; e < k; e++) {
|
|
290
290
|
let t = (j + e + 1) % 10 == 0;
|
|
291
291
|
t && G.push(e);
|
|
292
|
-
let
|
|
293
|
-
i.rect(
|
|
292
|
+
let n = (j + e) * s + D - d, i = new Path2D();
|
|
293
|
+
i.rect(n, 0, s, E), i.closePath(), y.ruler.pathPropertiesMap.set(i, {
|
|
294
294
|
col: j + e,
|
|
295
|
-
type:
|
|
295
|
+
type: r.RULER
|
|
296
296
|
});
|
|
297
|
-
let a =
|
|
297
|
+
let a = n + .5, o = t ? 8 : 4;
|
|
298
298
|
b.moveTo(a, E), b.lineTo(a, E - o);
|
|
299
299
|
}
|
|
300
300
|
b.stroke(), b.fillStyle = "#486581", b.textAlign = "center", G.forEach((e) => {
|
|
@@ -302,55 +302,55 @@ var a = Object.create, o = Object.defineProperty, s = Object.getOwnPropertyDescr
|
|
|
302
302
|
t - r / 2 < D || t + r / 2 > v || b.fillText(n, t, E / 2);
|
|
303
303
|
}), b.textAlign = "start", b.strokeStyle = "#bcccdc", b.lineWidth = 1, b.beginPath(), b.moveTo(D + .5, 0), b.lineTo(D + .5, _), b.moveTo(0, E + .5), b.lineTo(v, E + .5), b.stroke(), b.fillStyle = "#edf2f6", b.fillRect(0, 0, D, E), b.fillStyle = "#d9e2ec", b.fillRect(T, 0, m, _);
|
|
304
304
|
let K = new Path2D();
|
|
305
|
-
K.rect(T, 0, m, _), K.closePath(), y.divider.pathPropertiesMap.set(K, { type:
|
|
305
|
+
K.rect(T, 0, m, _), K.closePath(), y.divider.pathPropertiesMap.set(K, { type: r.DIVIDER }), b.fillStyle = "#f8fafb", b.fillRect(0, E, T, _ - E), b.font = "12px monospace", b.textBaseline = "middle", b.save(), b.beginPath(), b.rect(0, E, T, _ - E), b.clip();
|
|
306
306
|
for (let e = 0; e < A; e++) {
|
|
307
|
-
let
|
|
308
|
-
if (
|
|
307
|
+
let t = (M + e) * n + E - f;
|
|
308
|
+
if (t + n < E || t > _) continue;
|
|
309
309
|
let i = new Path2D();
|
|
310
|
-
i.rect(0,
|
|
310
|
+
i.rect(0, t, T, n), i.closePath(), y.labels.pathPropertiesMap.set(i, {
|
|
311
311
|
row: M + e,
|
|
312
|
-
type:
|
|
312
|
+
type: r.LABEL
|
|
313
313
|
});
|
|
314
314
|
let a = M + e - u, o = M + e, s = I?.[e] === 1, c = L?.[e] === 1, d = !!h?.cols || !!(h?.cells && o >= h.cells.startRow && o <= h.cells.endRow) || S(o);
|
|
315
|
-
b.fillStyle = d ? "#1565c0" : "#f8fafb", b.fillRect(0,
|
|
315
|
+
b.fillStyle = d ? "#1565c0" : "#f8fafb", b.fillRect(0, t, T, n), s && (b.fillStyle = "#ffecb3", b.fillRect(0, t, T, n)), c && (b.fillStyle = "rgba(255, 193, 7, 0.35)", b.fillRect(2, t + 2, Math.max(0, T - 4), Math.max(0, n - 4))), b.fillStyle = d ? "#ffffff" : "#334e68", b.fillText(`${(0, W.default)(String(M + e + 1), x, "0")}: ${l[a] ?? ""}`, 8, t + n / 2);
|
|
316
316
|
}
|
|
317
317
|
b.restore();
|
|
318
318
|
}), y;
|
|
319
319
|
}
|
|
320
|
-
static getExpandedSelection(e,
|
|
320
|
+
static getExpandedSelection(e, t, r, i) {
|
|
321
321
|
let a = e.cells;
|
|
322
322
|
if (a) {
|
|
323
|
-
if (r ===
|
|
324
|
-
let e =
|
|
323
|
+
if (r === n.LEFT) {
|
|
324
|
+
let e = t.cells;
|
|
325
325
|
if (!e) return null;
|
|
326
|
-
let
|
|
326
|
+
let n = a.startCol < e.startCol || a.endCol <= e.startCol, r = n ? a.startCol - 1 : a.startCol, i = n ? a.endCol : a.endCol - 1;
|
|
327
327
|
return r < 0 ? null : { cells: {
|
|
328
328
|
...a,
|
|
329
329
|
endCol: i,
|
|
330
330
|
startCol: r
|
|
331
331
|
} };
|
|
332
332
|
}
|
|
333
|
-
if (r ===
|
|
334
|
-
let e =
|
|
333
|
+
if (r === n.RIGHT) {
|
|
334
|
+
let e = t.cells;
|
|
335
335
|
if (!e) return null;
|
|
336
|
-
let
|
|
336
|
+
let n = a.startCol < e.startCol ? a.startCol + 1 : a.startCol, r = a.startCol < e.startCol ? a.endCol : a.endCol + 1;
|
|
337
337
|
return r >= i.alignmentWidth ? null : { cells: {
|
|
338
338
|
...a,
|
|
339
339
|
endCol: r,
|
|
340
|
-
startCol:
|
|
340
|
+
startCol: n
|
|
341
341
|
} };
|
|
342
342
|
}
|
|
343
|
-
if (r ===
|
|
344
|
-
let e =
|
|
343
|
+
if (r === n.UP) {
|
|
344
|
+
let e = t.cells;
|
|
345
345
|
if (!e) return null;
|
|
346
|
-
let
|
|
346
|
+
let n = a.startRow < e.startRow || a.endRow <= e.startRow, r = n ? a.startRow - 1 : a.startRow, i = n ? a.endRow : a.endRow - 1;
|
|
347
347
|
return r < 0 ? null : { cells: {
|
|
348
348
|
...a,
|
|
349
349
|
endRow: i,
|
|
350
350
|
startRow: r
|
|
351
351
|
} };
|
|
352
352
|
}
|
|
353
|
-
let e =
|
|
353
|
+
let e = t.cells;
|
|
354
354
|
if (!e) return null;
|
|
355
355
|
let o = a.startRow < e.startRow ? a.startRow + 1 : a.startRow, s = a.startRow < e.startRow ? a.endRow : a.endRow + 1;
|
|
356
356
|
return s >= i.sequenceCount ? null : { cells: {
|
|
@@ -361,17 +361,17 @@ var a = Object.create, o = Object.defineProperty, s = Object.getOwnPropertyDescr
|
|
|
361
361
|
}
|
|
362
362
|
let o = e.cols;
|
|
363
363
|
if (o) {
|
|
364
|
-
if (o.length === 0 || r !==
|
|
365
|
-
let e = Math.min(...o), a = Math.max(...o), s =
|
|
364
|
+
if (o.length === 0 || r !== n.LEFT && r !== n.RIGHT) return null;
|
|
365
|
+
let e = Math.min(...o), a = Math.max(...o), s = t.cols;
|
|
366
366
|
if (!s || s.length === 0) return null;
|
|
367
367
|
let c = Math.min(...s);
|
|
368
|
-
return r ===
|
|
368
|
+
return r === n.LEFT ? a > c ? { cols: o.slice(0, -1) } : e > 0 ? { cols: [e - 1, ...o] } : null : e < c ? { cols: o.slice(1) } : a < i.alignmentWidth - 1 ? { cols: [...o, a + 1] } : null;
|
|
369
369
|
}
|
|
370
370
|
return e.rows ? e : null;
|
|
371
371
|
}
|
|
372
|
-
static getMovedRowsEndSelection(e,
|
|
372
|
+
static getMovedRowsEndSelection(e, t, r) {
|
|
373
373
|
if (!e || !r) return null;
|
|
374
|
-
let i =
|
|
374
|
+
let i = t === n.UP ? 0 : r.sequenceCount;
|
|
375
375
|
return a.getMovedRowsGroupedSelection(e, i, r);
|
|
376
376
|
}
|
|
377
377
|
static getMovedRowsGroupedSelection(e, t, n) {
|
|
@@ -392,13 +392,13 @@ var a = Object.create, o = Object.defineProperty, s = Object.getOwnPropertyDescr
|
|
|
392
392
|
}
|
|
393
393
|
return null;
|
|
394
394
|
}
|
|
395
|
-
static getMovedRowsRelativeSelection(e,
|
|
395
|
+
static getMovedRowsRelativeSelection(e, t, r) {
|
|
396
396
|
if (!e || !r) return null;
|
|
397
397
|
let i = e.cells;
|
|
398
398
|
if (i) {
|
|
399
|
-
let a =
|
|
399
|
+
let a = t === n.UP && i.startRow > 0, o = t === n.DOWN && i.endRow < r.sequenceCount - 1;
|
|
400
400
|
if (!a && !o) return e;
|
|
401
|
-
let s =
|
|
401
|
+
let s = t === n.UP ? -1 : 1;
|
|
402
402
|
return { cells: {
|
|
403
403
|
...i,
|
|
404
404
|
endRow: i.endRow + s,
|
|
@@ -408,8 +408,8 @@ var a = Object.create, o = Object.defineProperty, s = Object.getOwnPropertyDescr
|
|
|
408
408
|
let a = e.rows;
|
|
409
409
|
if (a && a.length > 0) {
|
|
410
410
|
let e = [...new Set(a)].sort((e, t) => e - t), i = e.length;
|
|
411
|
-
if (
|
|
412
|
-
if (
|
|
411
|
+
if (t === n.UP) return { rows: e.map((e, t) => Math.max(t, e - 1)) };
|
|
412
|
+
if (t === n.DOWN) {
|
|
413
413
|
let t = r.sequenceCount - i;
|
|
414
414
|
return { rows: e.map((e, n) => Math.min(t + n, e + 1)) };
|
|
415
415
|
}
|
|
@@ -417,10 +417,10 @@ var a = Object.create, o = Object.defineProperty, s = Object.getOwnPropertyDescr
|
|
|
417
417
|
}
|
|
418
418
|
return null;
|
|
419
419
|
}
|
|
420
|
-
static getMovedSelection(e,
|
|
420
|
+
static getMovedSelection(e, t, r) {
|
|
421
421
|
if (!e || !r) return null;
|
|
422
|
-
let i =
|
|
423
|
-
if (s) return
|
|
422
|
+
let i = t === n.LEFT || t === n.UP ? -1 : 1, o = (e, t, n) => i < 0 ? e > 0 : t < n - 1, s = e.cells;
|
|
423
|
+
if (s) return t === n.LEFT || t === n.RIGHT ? o(s.startCol, s.endCol, r.alignmentWidth) ? { cells: {
|
|
424
424
|
endCol: s.endCol + i,
|
|
425
425
|
endRow: s.endRow,
|
|
426
426
|
startCol: s.startCol + i,
|
|
@@ -432,9 +432,9 @@ var a = Object.create, o = Object.defineProperty, s = Object.getOwnPropertyDescr
|
|
|
432
432
|
startRow: s.startRow + i
|
|
433
433
|
} } : null;
|
|
434
434
|
let c = e.cols;
|
|
435
|
-
if (c) return
|
|
435
|
+
if (c) return t !== n.LEFT && t !== n.RIGHT || c.length === 0 || !o(Math.min(...c), Math.max(...c), r.alignmentWidth) ? null : { cols: c.map((e) => e + i) };
|
|
436
436
|
let l = e.rows;
|
|
437
|
-
return l ?
|
|
437
|
+
return l ? t !== n.UP && t !== n.DOWN || l.length === 0 ? null : a.getMovedRowsRelativeSelection(e, t, r) : null;
|
|
438
438
|
}
|
|
439
439
|
static getMutateArguments(e, t, n = 0) {
|
|
440
440
|
let r = e?.cells;
|
|
@@ -463,10 +463,10 @@ var a = Object.create, o = Object.defineProperty, s = Object.getOwnPropertyDescr
|
|
|
463
463
|
for (let [e, t] of r.labels.pathPropertiesMap) if (o.isPointInPath(e, u, d)) return t;
|
|
464
464
|
for (let [e, t] of r.divider.pathPropertiesMap) if (o.isPointInPath(e, u, d)) return t;
|
|
465
465
|
}
|
|
466
|
-
static getPostUpsertSelection(e,
|
|
466
|
+
static getPostUpsertSelection(e, t) {
|
|
467
467
|
if (!e) return null;
|
|
468
|
-
if (
|
|
469
|
-
let r =
|
|
468
|
+
if (t !== n.LEFT && t !== n.RIGHT) return e;
|
|
469
|
+
let r = t === n.LEFT ? -1 : 1, i = e.cells;
|
|
470
470
|
if (i) {
|
|
471
471
|
let t = i.startCol + r, n = i.endCol + r;
|
|
472
472
|
return t < 0 ? e : { cells: {
|
|
@@ -484,32 +484,32 @@ var a = Object.create, o = Object.defineProperty, s = Object.getOwnPropertyDescr
|
|
|
484
484
|
let o = e.rows;
|
|
485
485
|
return o ? { rows: o } : null;
|
|
486
486
|
}
|
|
487
|
-
static getRowsToMove(e,
|
|
487
|
+
static getRowsToMove(e, t, r) {
|
|
488
488
|
let i = e?.cells, a = e?.rows ?? (i ? Array.from({ length: i.endRow - i.startRow + 1 }, (e, t) => i.startRow + t) : void 0);
|
|
489
489
|
if (!a || a.length === 0) return;
|
|
490
490
|
let o = [...new Set(a)].sort((e, t) => e - t), s = o.length;
|
|
491
491
|
if (s !== 0 && s !== r.sequenceCount) {
|
|
492
|
-
if (
|
|
492
|
+
if (t === n.UP) {
|
|
493
493
|
if (o.every((e, t) => e === t)) return;
|
|
494
|
-
} else if (
|
|
494
|
+
} else if (t === n.DOWN && o.every((e, t) => e === r.sequenceCount - s + t)) return;
|
|
495
495
|
return a;
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
498
|
static getSelectionFromPathProperties(e) {
|
|
499
|
-
let { endPath: t, startPath:
|
|
500
|
-
if (
|
|
501
|
-
let e = Math.min(
|
|
502
|
-
return { cols: Array.from({ length:
|
|
499
|
+
let { endPath: t, startPath: n } = e;
|
|
500
|
+
if (n.type === r.RULER && (t.type === r.RULER || t.type === r.CELL)) {
|
|
501
|
+
let e = Math.min(n.col, t.col), r = Math.max(n.col, t.col);
|
|
502
|
+
return { cols: Array.from({ length: r - e + 1 }, (t, n) => e + n) };
|
|
503
503
|
}
|
|
504
|
-
if (
|
|
505
|
-
endCol: Math.max(
|
|
506
|
-
endRow: Math.max(
|
|
507
|
-
startCol: Math.min(
|
|
508
|
-
startRow: Math.min(
|
|
504
|
+
if (n.type === r.CELL && t.type === r.CELL) return { cells: {
|
|
505
|
+
endCol: Math.max(n.col, t.col),
|
|
506
|
+
endRow: Math.max(n.row, t.row),
|
|
507
|
+
startCol: Math.min(n.col, t.col),
|
|
508
|
+
startRow: Math.min(n.row, t.row)
|
|
509
509
|
} };
|
|
510
|
-
if (
|
|
511
|
-
let e = Math.min(
|
|
512
|
-
return { rows: Array.from({ length:
|
|
510
|
+
if (n.type === r.LABEL && t.type === r.LABEL) {
|
|
511
|
+
let e = Math.min(n.row, t.row), r = Math.max(n.row, t.row);
|
|
512
|
+
return { rows: Array.from({ length: r - e + 1 }, (t, n) => e + n) };
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
515
|
static getStatusBarSelectionStats(e, t = null) {
|
|
@@ -562,8 +562,8 @@ var a = Object.create, o = Object.defineProperty, s = Object.getOwnPropertyDescr
|
|
|
562
562
|
rows: a
|
|
563
563
|
};
|
|
564
564
|
}
|
|
565
|
-
static getVisibleGridRange(
|
|
566
|
-
let { geometry: n =
|
|
565
|
+
static getVisibleGridRange(e) {
|
|
566
|
+
let { geometry: n = t, numCols: r, numRows: i, scrollLeft: a, scrollTop: o, viewportHeight: s, viewportWidth: c } = e, l = n.labelWidth + n.dividerWidth, u = Math.max(0, Math.floor(a / n.cellWidth)), d = Math.min(r, u + Math.max(1, Math.ceil((c - l) / n.cellWidth) + 1)), f = Math.max(0, Math.floor(Math.max(0, o - n.rulerHeight) / n.cellHeight)), p = Math.min(i, f + Math.max(1, Math.ceil((s - n.rulerHeight) / n.cellHeight) + 1));
|
|
567
567
|
return {
|
|
568
568
|
cache: {
|
|
569
569
|
endCol: Math.min(r, d + n.numOverscanCols),
|
|
@@ -611,8 +611,8 @@ var a = Object.create, o = Object.defineProperty, s = Object.getOwnPropertyDescr
|
|
|
611
611
|
static searchHitAt(e, t) {
|
|
612
612
|
return e?.positions[t] ?? null;
|
|
613
613
|
}
|
|
614
|
-
static searchHitContainsCell(e, t, n,
|
|
615
|
-
return e.matrix_type ===
|
|
614
|
+
static searchHitContainsCell(e, t, n, r) {
|
|
615
|
+
return e.matrix_type === i.NUCLEOTIDE && e.row === n && r >= e.col && r < e.col + Math.max(1, t.length);
|
|
616
616
|
}
|
|
617
617
|
};
|
|
618
618
|
export { G as EditorUtil };
|
|
@@ -2,5 +2,9 @@ import { AminoAcidPalette, NucleotidePalette, PaletteEntry } from '../../models/
|
|
|
2
2
|
export declare const HEX_COLOR_REGEX: RegExp;
|
|
3
3
|
export declare class PaletteUtil {
|
|
4
4
|
static createEntry(background: string, foreground: string, backgroundSelected?: string, foregroundSelected?: string): PaletteEntry;
|
|
5
|
+
static isAminoAcidPalette(value: unknown): value is AminoAcidPalette;
|
|
6
|
+
static isNucleotidePalette(value: unknown): value is NucleotidePalette;
|
|
5
7
|
static paletteEntryFor(palette: AminoAcidPalette | NucleotidePalette, cellValue: string): PaletteEntry;
|
|
8
|
+
static parseAminoAcidPalette(value: unknown): AminoAcidPalette;
|
|
9
|
+
static parseNucleotidePalette(value: unknown): NucleotidePalette;
|
|
6
10
|
}
|
|
@@ -1,5 +1,18 @@
|
|
|
1
|
+
import { AminoAcidSymbol as e, CUSTOM_PALETTE_NAME as t, NucleotideSymbol as n } from "../../models/palette.models.js";
|
|
1
2
|
// src/utils/PaletteUtil/PaletteUtil.ts
|
|
2
|
-
var
|
|
3
|
+
var r = /^#[0-9a-f]{6}$/i, i = [
|
|
4
|
+
"background",
|
|
5
|
+
"backgroundSelected",
|
|
6
|
+
"foreground",
|
|
7
|
+
"foregroundSelected"
|
|
8
|
+
], a = (e) => typeof e == "object" && !!e && !Array.isArray(e), o = (e, t) => Object.keys(e).length === t.length && t.every((t) => Object.prototype.hasOwnProperty.call(e, t)), s = (e) => !a(e) || !o(e, i) ? !1 : i.every((t) => {
|
|
9
|
+
let n = e[t];
|
|
10
|
+
return typeof n == "string" && r.test(n);
|
|
11
|
+
}), c = (e, t) => {
|
|
12
|
+
if (!a(e) || typeof e.name != "string" || e.name.trim().length === 0 || Object.prototype.hasOwnProperty.call(e, "$schema") && typeof e.$schema != "string" || !a(e.paletteColors) || !o(e.paletteColors, t)) return !1;
|
|
13
|
+
let { paletteColors: n } = e;
|
|
14
|
+
return t.every((e) => s(n[e]));
|
|
15
|
+
}, l = class r {
|
|
3
16
|
static createEntry(e, t, n = e, r = t) {
|
|
4
17
|
return {
|
|
5
18
|
background: e,
|
|
@@ -8,11 +21,31 @@ var e = /^#[0-9a-f]{6}$/i, t = class {
|
|
|
8
21
|
foregroundSelected: r
|
|
9
22
|
};
|
|
10
23
|
}
|
|
24
|
+
static isAminoAcidPalette(t) {
|
|
25
|
+
return c(t, Object.values(e));
|
|
26
|
+
}
|
|
27
|
+
static isNucleotidePalette(e) {
|
|
28
|
+
return c(e, Object.values(n));
|
|
29
|
+
}
|
|
11
30
|
static paletteEntryFor(e, t) {
|
|
12
31
|
let n = e.paletteColors;
|
|
13
32
|
return n[t] ?? n.X;
|
|
14
33
|
}
|
|
34
|
+
static parseAminoAcidPalette(e) {
|
|
35
|
+
if (!r.isAminoAcidPalette(e)) throw Error("Invalid amino-acid palette. Check that every symbol has four valid #RRGGBB colors.");
|
|
36
|
+
return {
|
|
37
|
+
...e,
|
|
38
|
+
name: t
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
static parseNucleotidePalette(e) {
|
|
42
|
+
if (!r.isNucleotidePalette(e)) throw Error("Invalid nucleotide palette. Check that every symbol has four valid #RRGGBB colors.");
|
|
43
|
+
return {
|
|
44
|
+
...e,
|
|
45
|
+
name: t
|
|
46
|
+
};
|
|
47
|
+
}
|
|
15
48
|
};
|
|
16
|
-
export {
|
|
49
|
+
export { r as HEX_COLOR_REGEX, l as PaletteUtil };
|
|
17
50
|
|
|
18
51
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["HEX_COLOR_REGEX","PaletteUtil","background","foreground","
|
|
1
|
+
{"version":3,"file":"index.js","names":["HEX_COLOR_REGEX","PALETTE_ENTRY_FIELDS","isRecord","value","hasExactKeys","record","expectedKeys","key","isPaletteEntry","color","field","isPaletteForSymbols","symbols","paletteColors","symbol","PaletteUtil","background","foreground","AminoAcidSymbol","NucleotideSymbol","palette","cellValue","CUSTOM_PALETTE_NAME"],"sources":["../../../src/utils/PaletteUtil/PaletteUtil.ts"],"sourcesContent":["import {\n AminoAcidSymbol,\n CUSTOM_PALETTE_NAME,\n NucleotideSymbol,\n} from '../../models/palette.models';\nimport type {\n AminoAcidPalette,\n NucleotidePalette,\n PaletteEntry,\n} from '../../models/palette.models';\n\nexport const HEX_COLOR_REGEX = /^#[0-9a-f]{6}$/i;\n\nconst PALETTE_ENTRY_FIELDS: readonly (keyof PaletteEntry)[] = [\n 'background',\n 'backgroundSelected',\n 'foreground',\n 'foregroundSelected',\n];\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\nconst hasExactKeys = (record: Record<string, unknown>, expectedKeys: readonly string[]): boolean =>\n Object.keys(record).length === expectedKeys.length\n && expectedKeys.every((key) => Object.prototype.hasOwnProperty.call(record, key));\n\nconst isPaletteEntry = (value: unknown): value is PaletteEntry => {\n if (!isRecord(value) || !hasExactKeys(value, PALETTE_ENTRY_FIELDS)) {\n return false;\n }\n\n return PALETTE_ENTRY_FIELDS.every((field) => {\n const color = value[field];\n return typeof color === 'string' && HEX_COLOR_REGEX.test(color);\n });\n};\n\nconst isPaletteForSymbols = (value: unknown, symbols: readonly string[]): boolean => {\n if (\n !isRecord(value)\n || typeof value.name !== 'string'\n || value.name.trim().length === 0\n || (Object.prototype.hasOwnProperty.call(value, '$schema') && typeof value.$schema !== 'string')\n || !isRecord(value.paletteColors)\n || !hasExactKeys(value.paletteColors, symbols)\n ) {\n return false;\n }\n\n const { paletteColors } = value;\n return symbols.every((symbol) => isPaletteEntry(paletteColors[symbol]));\n};\n\nexport class PaletteUtil {\n public static createEntry(\n background: string,\n foreground: string,\n backgroundSelected: string = background,\n foregroundSelected: string = foreground,\n ): PaletteEntry {\n return {\n background,\n backgroundSelected,\n foreground,\n foregroundSelected,\n };\n }\n\n public static isAminoAcidPalette(value: unknown): value is AminoAcidPalette {\n return isPaletteForSymbols(value, Object.values(AminoAcidSymbol));\n }\n\n public static isNucleotidePalette(value: unknown): value is NucleotidePalette {\n return isPaletteForSymbols(value, Object.values(NucleotideSymbol));\n }\n\n public static paletteEntryFor(\n palette: AminoAcidPalette | NucleotidePalette,\n cellValue: string,\n ): PaletteEntry {\n const paletteColors = palette.paletteColors as Record<string, PaletteEntry>;\n return paletteColors[cellValue] ?? paletteColors.X;\n }\n\n public static parseAminoAcidPalette(value: unknown): AminoAcidPalette {\n if (!PaletteUtil.isAminoAcidPalette(value)) {\n throw new Error('Invalid amino-acid palette. Check that every symbol has four valid #RRGGBB colors.');\n }\n\n return {\n ...value,\n name: CUSTOM_PALETTE_NAME,\n };\n }\n\n public static parseNucleotidePalette(value: unknown): NucleotidePalette {\n if (!PaletteUtil.isNucleotidePalette(value)) {\n throw new Error('Invalid nucleotide palette. Check that every symbol has four valid #RRGGBB colors.');\n }\n\n return {\n ...value,\n name: CUSTOM_PALETTE_NAME,\n };\n }\n}\n"],"mappings":";;AAWA,IAAaA,IAAkB,mBAEzBC,IAAwD;CAC5D;CACA;CACA;CACA;AACF,GAEMC,KAAY,MAChB,OAAOC,KAAU,cAAYA,KAAkB,CAAC,MAAM,QAAQA,CAAK,GAE/DC,KAAgB,GAAiC,MACrD,OAAO,KAAKC,CAAM,CAAC,CAAC,WAAWC,EAAa,UACzCA,EAAa,OAAO,MAAQ,OAAO,UAAU,eAAe,KAAKD,GAAQE,CAAG,CAAC,GAE5EC,KAAkB,MAClB,CAACN,EAASC,CAAK,KAAK,CAACC,EAAaD,GAAOF,CAAoB,IACxD,KAGFA,EAAqB,OAAO,MAAU;CAC3C,IAAMQ,IAAQN,EAAMO;CACpB,OAAO,OAAOD,KAAU,YAAYT,EAAgB,KAAKS,CAAK;AAChE,CAAC,GAGGE,KAAuB,GAAgB,MAAwC;CACnF,IACE,CAACT,EAASC,CAAK,KACZ,OAAOA,EAAM,QAAS,YACtBA,EAAM,KAAK,KAAK,CAAC,CAAC,WAAW,KAC5B,OAAO,UAAU,eAAe,KAAKA,GAAO,SAAS,KAAK,OAAOA,EAAM,WAAY,YACpF,CAACD,EAASC,EAAM,aAAa,KAC7B,CAACC,EAAaD,EAAM,eAAeS,CAAO,GAE7C,OAAO;CAGT,IAAM,EAAE,qBAAkBT;CAC1B,OAAOS,EAAQ,OAAO,MAAWJ,EAAeK,EAAcC,EAAO,CAAC;AACxE,GAEaC,IAAb,MAAaA,EAAY;CACvB,OAAc,YACZ,GACA,GACA,IAA6BC,GAC7B,IAA6BC,GACf;EACd,OAAO;GACL;GACA;GACA;GACA;EACF;CACF;CAEA,OAAc,mBAAmB,GAA2C;EAC1E,OAAON,EAAoBR,GAAO,OAAO,OAAOe,CAAe,CAAC;CAClE;CAEA,OAAc,oBAAoB,GAA4C;EAC5E,OAAOP,EAAoBR,GAAO,OAAO,OAAOgB,CAAgB,CAAC;CACnE;CAEA,OAAc,gBACZ,GACA,GACc;EACd,IAAMN,IAAgBO,EAAQ;EAC9B,OAAOP,EAAcQ,MAAcR,EAAc;CACnD;CAEA,OAAc,sBAAsB,GAAkC;EACpE,IAAI,CAACE,EAAY,mBAAmBZ,CAAK,GACvC,MAAU,MAAM,oFAAoF;EAGtG,OAAO;GACL,GAAGA;GACH,MAAMmB;EACR;CACF;CAEA,OAAc,uBAAuB,GAAmC;EACtE,IAAI,CAACP,EAAY,oBAAoBZ,CAAK,GACxC,MAAU,MAAM,oFAAoF;EAGtG,OAAO;GACL,GAAGA;GACH,MAAMmB;EACR;CACF;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './paletteSchemaPlugin';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { AMINO_ACID_SYMBOLS as e, NUCLEOTIDE_SYMBOLS as t, PALETTE_SCHEMA_ASSET_PATH as n, PALETTE_SCHEMA_URL_PATH as r } from "../../constants/palette.js";
|
|
2
|
+
// src/vite/paletteSchemaPlugin/paletteSchemaPlugin.ts
|
|
3
|
+
var i = [
|
|
4
|
+
"background",
|
|
5
|
+
"backgroundSelected",
|
|
6
|
+
"foreground",
|
|
7
|
+
"foregroundSelected"
|
|
8
|
+
], a = (e, t) => ({
|
|
9
|
+
additionalProperties: !1,
|
|
10
|
+
properties: {
|
|
11
|
+
$schema: {
|
|
12
|
+
format: "uri",
|
|
13
|
+
type: "string"
|
|
14
|
+
},
|
|
15
|
+
name: {
|
|
16
|
+
minLength: 1,
|
|
17
|
+
pattern: "\\S",
|
|
18
|
+
type: "string"
|
|
19
|
+
},
|
|
20
|
+
paletteColors: {
|
|
21
|
+
additionalProperties: !1,
|
|
22
|
+
properties: Object.fromEntries(t.map((e) => [e, { $ref: "#/$defs/paletteEntry" }])),
|
|
23
|
+
required: t,
|
|
24
|
+
type: "object"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
required: ["name", "paletteColors"],
|
|
28
|
+
title: e,
|
|
29
|
+
type: "object"
|
|
30
|
+
}), o = JSON.stringify({
|
|
31
|
+
$defs: { paletteEntry: {
|
|
32
|
+
additionalProperties: !1,
|
|
33
|
+
properties: Object.fromEntries(i.map((e) => [e, {
|
|
34
|
+
pattern: "^#[0-9a-fA-F]{6}$",
|
|
35
|
+
type: "string"
|
|
36
|
+
}])),
|
|
37
|
+
required: i,
|
|
38
|
+
type: "object"
|
|
39
|
+
} },
|
|
40
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
41
|
+
oneOf: [a("Nucleotide palette", t), a("Amino-acid palette", e)],
|
|
42
|
+
title: "Sequence editor palette"
|
|
43
|
+
}, null, 2), s = () => ({
|
|
44
|
+
configureServer: (e) => {
|
|
45
|
+
e.middlewares.use(r, (e, t) => {
|
|
46
|
+
t.setHeader("Content-Type", "application/schema+json; charset=utf-8"), t.end(o);
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
generateBundle() {
|
|
50
|
+
this.emitFile({
|
|
51
|
+
fileName: n,
|
|
52
|
+
source: o,
|
|
53
|
+
type: "asset"
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
name: "sequence-editor-palette-schema"
|
|
57
|
+
});
|
|
58
|
+
export { s as createPaletteSchemaPlugin };
|
|
59
|
+
|
|
60
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["paletteEntryFields","createPaletteGroupSchema","symbols","symbol","paletteJsonSchema","field","NUCLEOTIDE_SYMBOLS","AMINO_ACID_SYMBOLS","createPaletteSchemaPlugin","PALETTE_SCHEMA_URL_PATH","response","PALETTE_SCHEMA_ASSET_PATH"],"sources":["../../../src/vite/paletteSchemaPlugin/paletteSchemaPlugin.ts"],"sourcesContent":["import type { Plugin } from 'vite';\n\nimport {\n AMINO_ACID_SYMBOLS,\n NUCLEOTIDE_SYMBOLS,\n PALETTE_SCHEMA_ASSET_PATH,\n PALETTE_SCHEMA_URL_PATH,\n} from '../../constants/palette';\n\nconst paletteEntryFields = [\n 'background',\n 'backgroundSelected',\n 'foreground',\n 'foregroundSelected',\n];\n\nconst createPaletteGroupSchema = (title: string, symbols: readonly string[]) => ({\n additionalProperties: false,\n properties: {\n $schema: {\n format: 'uri',\n type: 'string',\n },\n name: {\n minLength: 1,\n pattern: '\\\\S',\n type: 'string',\n },\n paletteColors: {\n additionalProperties: false,\n properties: Object.fromEntries(symbols.map((symbol) => [\n symbol,\n { $ref: '#/$defs/paletteEntry' },\n ])),\n required: symbols,\n type: 'object',\n },\n },\n required: ['name', 'paletteColors'],\n title,\n type: 'object',\n});\n\nconst paletteJsonSchema = JSON.stringify({\n $defs: {\n paletteEntry: {\n additionalProperties: false,\n properties: Object.fromEntries(paletteEntryFields.map((field) => [\n field,\n {\n pattern: '^#[0-9a-fA-F]{6}$',\n type: 'string',\n },\n ])),\n required: paletteEntryFields,\n type: 'object',\n },\n },\n $schema: 'https://json-schema.org/draft/2020-12/schema',\n oneOf: [\n createPaletteGroupSchema('Nucleotide palette', NUCLEOTIDE_SYMBOLS),\n createPaletteGroupSchema('Amino-acid palette', AMINO_ACID_SYMBOLS),\n ],\n title: 'Sequence editor palette',\n}, null, 2);\n\nexport const createPaletteSchemaPlugin = (): Plugin => ({\n configureServer: (server): void => {\n server.middlewares.use(PALETTE_SCHEMA_URL_PATH, (_request, response) => {\n response.setHeader('Content-Type', 'application/schema+json; charset=utf-8');\n response.end(paletteJsonSchema);\n });\n },\n generateBundle() {\n this.emitFile({\n fileName: PALETTE_SCHEMA_ASSET_PATH,\n source: paletteJsonSchema,\n type: 'asset',\n });\n },\n name: 'sequence-editor-palette-schema',\n});\n"],"mappings":";;AASA,IAAMA,IAAqB;CACzB;CACA;CACA;CACA;AACF,GAEMC,KAA4B,GAAe,OAAgC;CAC/E,sBAAsB;CACtB,YAAY;EACV,SAAS;GACP,QAAQ;GACR,MAAM;EACR;EACA,MAAM;GACJ,WAAW;GACX,SAAS;GACT,MAAM;EACR;EACA,eAAe;GACb,sBAAsB;GACtB,YAAY,OAAO,YAAYC,EAAQ,KAAK,MAAW,CACrDC,GACA,EAAE,MAAM,uBAAuB,CACjC,CAAC,CAAC;GACF,UAAUD;GACV,MAAM;EACR;CACF;CACA,UAAU,CAAC,QAAQ,eAAe;CAClC;CACA,MAAM;AACR,IAEME,IAAoB,KAAK,UAAU;CACvC,OAAO,EACL,cAAc;EACZ,sBAAsB;EACtB,YAAY,OAAO,YAAYJ,EAAmB,KAAK,MAAU,CAC/DK,GACA;GACE,SAAS;GACT,MAAM;EACR,CACF,CAAC,CAAC;EACF,UAAUL;EACV,MAAM;CACR,EACF;CACA,SAAS;CACT,OAAO,CACLC,EAAyB,sBAAsBK,CAAkB,GACjEL,EAAyB,sBAAsBM,CAAkB,CACnE;CACA,OAAO;AACT,GAAG,MAAM,CAAC,GAEGC,WAA2C;CACtD,kBAAkB,MAAiB;EACjC,EAAO,YAAY,IAAIC,IAA0B,GAAU,MAAa;GAEtE,AADAC,EAAS,UAAU,gBAAgB,wCAAwC,GAC3EA,EAAS,IAAIN,CAAiB;EAChC,CAAC;CACH;CACA,iBAAiB;EACf,KAAK,SAAS;GACZ,UAAUO;GACV,QAAQP;GACR,MAAM;EACR,CAAC;CACH;CACA,MAAM;AACR"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rivm-loculus-tools/sequence-editor",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"@emotion/cache": "*",
|
|
12
12
|
"@emotion/react": "*",
|
|
13
13
|
"@emotion/styled": "*",
|
|
14
|
+
"@gen-epix/ui-core": "*",
|
|
14
15
|
"@gen-epix/ui-core-components": "*",
|
|
15
16
|
"@gen-epix/ui-core-form": "*",
|
|
16
|
-
"@gen-epix/ui-core": "*",
|
|
17
17
|
"@mui/icons-material": "*",
|
|
18
18
|
"@mui/material": "*",
|
|
19
19
|
"@mui/styled-engine": "*",
|
|
@@ -22,57 +22,58 @@
|
|
|
22
22
|
"@mui/x-date-pickers": "*",
|
|
23
23
|
"@rivm-loculus-tools/common-frontend": "*",
|
|
24
24
|
"i18next": "*",
|
|
25
|
+
"react": "*",
|
|
25
26
|
"react-dom": "*",
|
|
26
27
|
"react-error-boundary": "*",
|
|
27
28
|
"react-hook-form": "*",
|
|
28
29
|
"react-i18next": "*",
|
|
29
|
-
"react": "*",
|
|
30
30
|
"reflect-metadata": "*",
|
|
31
31
|
"tsyringe": "*"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@rivm-loculus-tools/sequence-editor-wasm": "^0.
|
|
34
|
+
"@rivm-loculus-tools/sequence-editor-wasm": "^0.4.0",
|
|
35
35
|
"comlink": "4.4.2",
|
|
36
36
|
"lodash": "4.18.1",
|
|
37
|
+
"mui-color-input": "9.0.0",
|
|
38
|
+
"tsyringe": "4.10.0",
|
|
37
39
|
"use-debounce": "10.1.1",
|
|
38
|
-
"zustand": "5.0.16"
|
|
39
|
-
"tsyringe": "4.10.0"
|
|
40
|
+
"zustand": "5.0.16"
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
43
|
"@emotion/cache": "11.14.0",
|
|
43
44
|
"@emotion/react": "11.14.0",
|
|
44
45
|
"@emotion/styled": "11.14.1",
|
|
45
46
|
"@gen-epix/eslint-config": "0.9.0",
|
|
47
|
+
"@gen-epix/ui-core": "3.10.0",
|
|
46
48
|
"@gen-epix/ui-core-components": "4.6.0",
|
|
47
49
|
"@gen-epix/ui-core-form": "4.5.1",
|
|
48
|
-
"@gen-epix/ui-core": "3.10.0",
|
|
49
50
|
"@mui/icons-material": "9.5.0",
|
|
50
51
|
"@mui/material": "9.5.0",
|
|
51
52
|
"@mui/styled-engine": "9.5.0",
|
|
52
53
|
"@mui/system": "9.5.0",
|
|
53
54
|
"@mui/utils": "9.5.0",
|
|
54
|
-
"@rivm-loculus-tools/common-frontend": "^0.
|
|
55
|
+
"@rivm-loculus-tools/common-frontend": "^0.9.0",
|
|
55
56
|
"@types/lodash": "4.17.27",
|
|
56
57
|
"@types/node": "26.6.6",
|
|
57
|
-
"@types/react-dom": "19.3.0",
|
|
58
58
|
"@types/react": "19.3.0",
|
|
59
|
+
"@types/react-dom": "19.3.0",
|
|
59
60
|
"@vitejs/plugin-react": "6.1.2",
|
|
60
61
|
"eslint": "10.13.0",
|
|
61
62
|
"i18next": "26.5.11",
|
|
63
|
+
"react": "19.3.1",
|
|
62
64
|
"react-dom": "19.3.1",
|
|
63
65
|
"react-error-boundary": "6.1.6",
|
|
64
66
|
"react-hook-form": "7.91.0",
|
|
65
67
|
"react-i18next": "17.1.9",
|
|
66
|
-
"react": "19.3.1",
|
|
67
|
-
"typescript": "6.0.3",
|
|
68
68
|
"tsyringe": "4.10.0",
|
|
69
|
+
"typescript": "6.0.3",
|
|
70
|
+
"vite": "8.3.5",
|
|
69
71
|
"vite-plugin-dts": "5.1.2",
|
|
70
72
|
"vite-plugin-lib-inject-css": "2.2.2",
|
|
71
73
|
"vite-plugin-static-copy": "4.1.1",
|
|
72
74
|
"vite-plugin-svgr": "5.2.0",
|
|
73
|
-
"
|
|
74
|
-
"vitest-browser-react": "2.3.0"
|
|
75
|
-
"vitest": "5.0.5"
|
|
75
|
+
"vitest": "5.0.5",
|
|
76
|
+
"vitest-browser-react": "2.3.0"
|
|
76
77
|
},
|
|
77
78
|
"files": [
|
|
78
79
|
"dist"
|
|
@@ -90,6 +91,10 @@
|
|
|
90
91
|
"types": "./dist/classes/services/SequenceEditorEventBusService/index.d.ts",
|
|
91
92
|
"import": "./dist/classes/services/SequenceEditorEventBusService/index.js"
|
|
92
93
|
},
|
|
94
|
+
"./classes/workers/AlignerWorker": {
|
|
95
|
+
"types": "./dist/classes/workers/AlignerWorker/index.d.ts",
|
|
96
|
+
"import": "./dist/classes/workers/AlignerWorker/index.js"
|
|
97
|
+
},
|
|
93
98
|
"./classes/workers/EngineWorker": {
|
|
94
99
|
"types": "./dist/classes/workers/EngineWorker/index.d.ts",
|
|
95
100
|
"import": "./dist/classes/workers/EngineWorker/index.js"
|
|
@@ -110,6 +115,10 @@
|
|
|
110
115
|
"types": "./dist/components/ui/SequenceEditorPageHeader/index.d.ts",
|
|
111
116
|
"import": "./dist/components/ui/SequenceEditorPageHeader/index.js"
|
|
112
117
|
},
|
|
118
|
+
"./components/ui/SequenceEditorRealignModal": {
|
|
119
|
+
"types": "./dist/components/ui/SequenceEditorRealignModal/index.d.ts",
|
|
120
|
+
"import": "./dist/components/ui/SequenceEditorRealignModal/index.js"
|
|
121
|
+
},
|
|
113
122
|
"./components/ui/SequenceEditorSearchBar": {
|
|
114
123
|
"types": "./dist/components/ui/SequenceEditorSearchBar/index.d.ts",
|
|
115
124
|
"import": "./dist/components/ui/SequenceEditorSearchBar/index.js"
|
|
@@ -169,12 +178,17 @@
|
|
|
169
178
|
"./utils/SequenceEditorStandardConfigUtil": {
|
|
170
179
|
"types": "./dist/utils/SequenceEditorStandardConfigUtil/index.d.ts",
|
|
171
180
|
"import": "./dist/utils/SequenceEditorStandardConfigUtil/index.js"
|
|
181
|
+
},
|
|
182
|
+
"./vite/paletteSchemaPlugin": {
|
|
183
|
+
"types": "./dist/vite/paletteSchemaPlugin/index.d.ts",
|
|
184
|
+
"import": "./dist/vite/paletteSchemaPlugin/index.js"
|
|
172
185
|
}
|
|
173
186
|
},
|
|
174
187
|
"scripts": {
|
|
175
188
|
"validate": "pnpm run lint && pnpm run check-types",
|
|
176
189
|
"lint": "eslint ./src --report-unused-disable-directives --max-warnings 0",
|
|
177
190
|
"lint-fix": "eslint ./src --report-unused-disable-directives --max-warnings 0 --fix",
|
|
191
|
+
"test-run": "vitest run",
|
|
178
192
|
"update-exports": "node scripts/update-exports.js",
|
|
179
193
|
"check-types": "tsc --noEmit",
|
|
180
194
|
"start": "vite",
|