@genome-spy/core 0.70.0 → 0.72.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/bundle/index.es.js +3923 -3598
- package/dist/bundle/index.js +150 -143
- package/dist/bundle/parquetRead-BnAGCa4_.js +1663 -0
- package/dist/schema.json +0 -48
- package/dist/src/data/formats/parquet.d.ts +12 -0
- package/dist/src/data/formats/parquet.d.ts.map +1 -0
- package/dist/src/data/formats/parquet.js +29 -0
- package/dist/src/data/formats/parquetRead.d.ts +18 -0
- package/dist/src/data/formats/parquetRead.d.ts.map +1 -0
- package/dist/src/data/formats/parquetRead.js +326 -0
- package/dist/src/data/sources/urlSource.d.ts.map +1 -1
- package/dist/src/data/sources/urlSource.js +8 -3
- package/dist/src/encoder/encoder.d.ts +2 -2
- package/dist/src/fonts/bmFontManager.d.ts +1 -1
- package/dist/src/genome/genome.d.ts +1 -1
- package/dist/src/genomeSpy/containerUi.d.ts.map +1 -1
- package/dist/src/genomeSpy/containerUi.js +0 -1
- package/dist/src/genomeSpy/viewHighlight.js +2 -2
- package/dist/src/genomeSpy.d.ts +3 -3
- package/dist/src/genomeSpy.d.ts.map +1 -1
- package/dist/src/genomeSpy.js +29 -3
- package/dist/src/gl/hashTable.d.ts +78 -0
- package/dist/src/gl/hashTable.d.ts.map +1 -0
- package/dist/src/gl/hashTable.js +164 -0
- package/dist/src/gl/includes/common.glsl.js +1 -1
- package/dist/src/gl/webGLHelper.d.ts.map +1 -1
- package/dist/src/gl/webGLHelper.js +12 -6
- package/dist/src/marks/mark.d.ts +2 -2
- package/dist/src/marks/mark.d.ts.map +1 -1
- package/dist/src/marks/mark.js +2 -3
- package/dist/src/spec/view.d.ts +0 -10
- package/dist/src/utils/keyboardZoomMotion.d.ts +93 -0
- package/dist/src/utils/keyboardZoomMotion.d.ts.map +1 -0
- package/dist/src/utils/keyboardZoomMotion.js +285 -0
- package/dist/src/utils/radixSort.d.ts.map +1 -1
- package/dist/src/utils/radixSort.js +26 -1
- package/dist/src/view/axisGridView.d.ts +1 -1
- package/dist/src/view/axisGridView.js +0 -1
- package/dist/src/view/axisView.d.ts +1 -1
- package/dist/src/view/concatView.d.ts +6 -3
- package/dist/src/view/concatView.d.ts.map +1 -1
- package/dist/src/view/concatView.js +9 -2
- package/dist/src/view/containerMutationHelper.d.ts +6 -6
- package/dist/src/view/containerMutationHelper.d.ts.map +1 -1
- package/dist/src/view/containerView.d.ts +7 -5
- package/dist/src/view/containerView.d.ts.map +1 -1
- package/dist/src/view/containerView.js +4 -1
- package/dist/src/view/facetView.d.ts +2 -2
- package/dist/src/view/flowBuilder.d.ts +1 -1
- package/dist/src/view/flowBuilder.d.ts.map +1 -1
- package/dist/src/view/gridView/gridChild.d.ts +3 -3
- package/dist/src/view/gridView/gridChild.d.ts.map +1 -1
- package/dist/src/view/gridView/gridChild.js +0 -2
- package/dist/src/view/gridView/gridView.d.ts +13 -11
- package/dist/src/view/gridView/gridView.d.ts.map +1 -1
- package/dist/src/view/gridView/gridView.js +17 -26
- package/dist/src/view/gridView/keyboardZoomController.d.ts +21 -0
- package/dist/src/view/gridView/keyboardZoomController.d.ts.map +1 -0
- package/dist/src/view/gridView/keyboardZoomController.js +202 -0
- package/dist/src/view/gridView/scrollbar.d.ts +1 -1
- package/dist/src/view/gridView/scrollbar.d.ts.map +1 -1
- package/dist/src/view/gridView/scrollbar.js +0 -1
- package/dist/src/view/gridView/selectionRect.d.ts +1 -1
- package/dist/src/view/gridView/selectionRect.d.ts.map +1 -1
- package/dist/src/view/gridView/selectionRect.js +0 -1
- package/dist/src/view/gridView/separatorView.js +0 -1
- package/dist/src/view/gridView/zoomNavigationUtils.d.ts +19 -0
- package/dist/src/view/gridView/zoomNavigationUtils.d.ts.map +1 -0
- package/dist/src/view/gridView/zoomNavigationUtils.js +51 -0
- package/dist/src/view/layerView.d.ts +8 -5
- package/dist/src/view/layerView.d.ts.map +1 -1
- package/dist/src/view/layerView.js +6 -2
- package/dist/src/view/title.d.ts.map +1 -1
- package/dist/src/view/title.js +0 -1
- package/dist/src/view/unitView.d.ts +8 -5
- package/dist/src/view/unitView.d.ts.map +1 -1
- package/dist/src/view/unitView.js +5 -1
- package/dist/src/view/view.d.ts +13 -9
- package/dist/src/view/view.d.ts.map +1 -1
- package/dist/src/view/view.js +7 -1
- package/dist/src/view/viewError.d.ts +1 -1
- package/dist/src/view/viewError.d.ts.map +1 -1
- package/dist/src/view/viewFactory.d.ts +3 -44
- package/dist/src/view/viewFactory.d.ts.map +1 -1
- package/dist/src/view/viewFactory.js +28 -69
- package/dist/src/view/viewSelectors.d.ts.map +1 -1
- package/dist/src/view/viewSelectors.js +123 -160
- package/dist/src/view/viewSpecGuards.d.ts +43 -0
- package/dist/src/view/viewSpecGuards.d.ts.map +1 -0
- package/dist/src/view/viewSpecGuards.js +69 -0
- package/dist/src/view/viewUtils.d.ts +1 -1
- package/dist/src/view/viewUtils.d.ts.map +1 -1
- package/dist/src/view/zoom.d.ts +1 -0
- package/dist/src/view/zoom.d.ts.map +1 -1
- package/dist/src/view/zoom.js +5 -1
- package/package.json +4 -3
- package/dist/src/data/collector.test.d.ts +0 -2
- package/dist/src/data/collector.test.d.ts.map +0 -1
- package/dist/src/data/dataFlow.test.d.ts +0 -2
- package/dist/src/data/dataFlow.test.d.ts.map +0 -1
- package/dist/src/data/flow.test.d.ts +0 -2
- package/dist/src/data/flow.test.d.ts.map +0 -1
- package/dist/src/data/flowInit.test.d.ts +0 -2
- package/dist/src/data/flowInit.test.d.ts.map +0 -1
- package/dist/src/data/flowNode.test.d.ts +0 -2
- package/dist/src/data/flowNode.test.d.ts.map +0 -1
- package/dist/src/data/flowOptimizer.test.d.ts +0 -2
- package/dist/src/data/flowOptimizer.test.d.ts.map +0 -1
- package/dist/src/data/formats/fasta.test.d.ts +0 -2
- package/dist/src/data/formats/fasta.test.d.ts.map +0 -1
- package/dist/src/data/keyIndex.test.d.ts +0 -2
- package/dist/src/data/keyIndex.test.d.ts.map +0 -1
- package/dist/src/data/sources/inlineSource.test.d.ts +0 -2
- package/dist/src/data/sources/inlineSource.test.d.ts.map +0 -1
- package/dist/src/data/sources/sequenceSource.test.d.ts +0 -2
- package/dist/src/data/sources/sequenceSource.test.d.ts.map +0 -1
- package/dist/src/data/transforms/aggregate.test.d.ts +0 -2
- package/dist/src/data/transforms/aggregate.test.d.ts.map +0 -1
- package/dist/src/data/transforms/clone.test.d.ts +0 -2
- package/dist/src/data/transforms/clone.test.d.ts.map +0 -1
- package/dist/src/data/transforms/coverage.test.d.ts +0 -2
- package/dist/src/data/transforms/coverage.test.d.ts.map +0 -1
- package/dist/src/data/transforms/filter.test.d.ts +0 -2
- package/dist/src/data/transforms/filter.test.d.ts.map +0 -1
- package/dist/src/data/transforms/filterScoredLabels.test.d.ts +0 -2
- package/dist/src/data/transforms/filterScoredLabels.test.d.ts.map +0 -1
- package/dist/src/data/transforms/flatten.test.d.ts +0 -2
- package/dist/src/data/transforms/flatten.test.d.ts.map +0 -1
- package/dist/src/data/transforms/flattenDelimited.test.d.ts +0 -2
- package/dist/src/data/transforms/flattenDelimited.test.d.ts.map +0 -1
- package/dist/src/data/transforms/flattenSequence.test.d.ts +0 -2
- package/dist/src/data/transforms/flattenSequence.test.d.ts.map +0 -1
- package/dist/src/data/transforms/formula.test.d.ts +0 -2
- package/dist/src/data/transforms/formula.test.d.ts.map +0 -1
- package/dist/src/data/transforms/identifier.test.d.ts +0 -2
- package/dist/src/data/transforms/identifier.test.d.ts.map +0 -1
- package/dist/src/data/transforms/pileup.test.d.ts +0 -2
- package/dist/src/data/transforms/pileup.test.d.ts.map +0 -1
- package/dist/src/data/transforms/project.test.d.ts +0 -2
- package/dist/src/data/transforms/project.test.d.ts.map +0 -1
- package/dist/src/data/transforms/regexExtract.test.d.ts +0 -2
- package/dist/src/data/transforms/regexExtract.test.d.ts.map +0 -1
- package/dist/src/data/transforms/regexFold.test.d.ts +0 -2
- package/dist/src/data/transforms/regexFold.test.d.ts.map +0 -1
- package/dist/src/data/transforms/sample.test.d.ts +0 -2
- package/dist/src/data/transforms/sample.test.d.ts.map +0 -1
- package/dist/src/data/transforms/stack.test.d.ts +0 -2
- package/dist/src/data/transforms/stack.test.d.ts.map +0 -1
- package/dist/src/encoder/accessor.test.d.ts +0 -2
- package/dist/src/encoder/accessor.test.d.ts.map +0 -1
- package/dist/src/encoder/encoder.test.d.ts +0 -2
- package/dist/src/encoder/encoder.test.d.ts.map +0 -1
- package/dist/src/encoder/metadataChannels.test.d.ts +0 -2
- package/dist/src/encoder/metadataChannels.test.d.ts.map +0 -1
- package/dist/src/genome/genome.test.d.ts +0 -2
- package/dist/src/genome/genome.test.d.ts.map +0 -1
- package/dist/src/genome/genomes.test.d.ts +0 -2
- package/dist/src/genome/genomes.test.d.ts.map +0 -1
- package/dist/src/genome/scaleIndex.test.d.ts +0 -2
- package/dist/src/genome/scaleIndex.test.d.ts.map +0 -1
- package/dist/src/genome/scaleLocus.test.d.ts +0 -2
- package/dist/src/genome/scaleLocus.test.d.ts.map +0 -1
- package/dist/src/genomeSpy/viewDataInit.test.d.ts +0 -2
- package/dist/src/genomeSpy/viewDataInit.test.d.ts.map +0 -1
- package/dist/src/gl/colorUtils.test.d.ts +0 -2
- package/dist/src/gl/colorUtils.test.d.ts.map +0 -1
- package/dist/src/paramRuntime/expressionRef.test.d.ts +0 -2
- package/dist/src/paramRuntime/expressionRef.test.d.ts.map +0 -1
- package/dist/src/paramRuntime/graphRuntime.test.d.ts +0 -2
- package/dist/src/paramRuntime/graphRuntime.test.d.ts.map +0 -1
- package/dist/src/paramRuntime/paramRuntime.test.d.ts +0 -2
- package/dist/src/paramRuntime/paramRuntime.test.d.ts.map +0 -1
- package/dist/src/paramRuntime/paramStore.test.d.ts +0 -2
- package/dist/src/paramRuntime/paramStore.test.d.ts.map +0 -1
- package/dist/src/scale/scale.test.d.ts +0 -2
- package/dist/src/scale/scale.test.d.ts.map +0 -1
- package/dist/src/scale/ticks.test.d.ts +0 -2
- package/dist/src/scale/ticks.test.d.ts.map +0 -1
- package/dist/src/scales/axisResolution.test.d.ts +0 -2
- package/dist/src/scales/axisResolution.test.d.ts.map +0 -1
- package/dist/src/scales/domainPlanner.test.d.ts +0 -2
- package/dist/src/scales/domainPlanner.test.d.ts.map +0 -1
- package/dist/src/scales/scaleInstanceManager.test.d.ts +0 -2
- package/dist/src/scales/scaleInstanceManager.test.d.ts.map +0 -1
- package/dist/src/scales/scaleInteractionController.test.d.ts +0 -2
- package/dist/src/scales/scaleInteractionController.test.d.ts.map +0 -1
- package/dist/src/scales/scaleResolution.test.d.ts +0 -2
- package/dist/src/scales/scaleResolution.test.d.ts.map +0 -1
- package/dist/src/scales/scaleRules.test.d.ts +0 -2
- package/dist/src/scales/scaleRules.test.d.ts.map +0 -1
- package/dist/src/selection/selection.test.d.ts +0 -2
- package/dist/src/selection/selection.test.d.ts.map +0 -1
- package/dist/src/tooltip/dataTooltipHandler.test.d.ts +0 -2
- package/dist/src/tooltip/dataTooltipHandler.test.d.ts.map +0 -1
- package/dist/src/tooltip/flattenDatumRows.test.d.ts +0 -2
- package/dist/src/tooltip/flattenDatumRows.test.d.ts.map +0 -1
- package/dist/src/tooltip/tooltipContext.test.d.ts +0 -2
- package/dist/src/tooltip/tooltipContext.test.d.ts.map +0 -1
- package/dist/src/utils/addBaseUrl.test.d.ts +0 -2
- package/dist/src/utils/addBaseUrl.test.d.ts.map +0 -1
- package/dist/src/utils/binnedIndex.test.d.ts +0 -2
- package/dist/src/utils/binnedIndex.test.d.ts.map +0 -1
- package/dist/src/utils/cloner.test.d.ts +0 -2
- package/dist/src/utils/cloner.test.d.ts.map +0 -1
- package/dist/src/utils/coalesce.test.d.ts +0 -2
- package/dist/src/utils/coalesce.test.d.ts.map +0 -1
- package/dist/src/utils/concatIterables.test.d.ts +0 -2
- package/dist/src/utils/concatIterables.test.d.ts.map +0 -1
- package/dist/src/utils/deepEqual.test.d.ts +0 -2
- package/dist/src/utils/deepEqual.test.d.ts.map +0 -1
- package/dist/src/utils/domainArray.test.d.ts +0 -2
- package/dist/src/utils/domainArray.test.d.ts.map +0 -1
- package/dist/src/utils/fetchUtils.test.d.ts +0 -2
- package/dist/src/utils/fetchUtils.test.d.ts.map +0 -1
- package/dist/src/utils/indexer.test.d.ts +0 -2
- package/dist/src/utils/indexer.test.d.ts.map +0 -1
- package/dist/src/utils/interactionEvent.test.d.ts +0 -2
- package/dist/src/utils/interactionEvent.test.d.ts.map +0 -1
- package/dist/src/utils/iterateNestedMaps.test.d.ts +0 -2
- package/dist/src/utils/iterateNestedMaps.test.d.ts.map +0 -1
- package/dist/src/utils/kWayMerge.test.d.ts +0 -2
- package/dist/src/utils/kWayMerge.test.d.ts.map +0 -1
- package/dist/src/utils/mergeObjects.test.d.ts +0 -2
- package/dist/src/utils/mergeObjects.test.d.ts.map +0 -1
- package/dist/src/utils/numberExtractor.test.d.ts +0 -2
- package/dist/src/utils/numberExtractor.test.d.ts.map +0 -1
- package/dist/src/utils/propertyCacher.test.d.ts +0 -2
- package/dist/src/utils/propertyCacher.test.d.ts.map +0 -1
- package/dist/src/utils/propertyCoalescer.test.d.ts +0 -2
- package/dist/src/utils/propertyCoalescer.test.d.ts.map +0 -1
- package/dist/src/utils/radixSort.test.d.ts +0 -2
- package/dist/src/utils/radixSort.test.d.ts.map +0 -1
- package/dist/src/utils/reservationMap.test.d.ts +0 -2
- package/dist/src/utils/reservationMap.test.d.ts.map +0 -1
- package/dist/src/utils/ringBuffer.test.d.ts +0 -2
- package/dist/src/utils/ringBuffer.test.d.ts.map +0 -1
- package/dist/src/utils/throttle.test.d.ts +0 -2
- package/dist/src/utils/throttle.test.d.ts.map +0 -1
- package/dist/src/utils/topK.test.d.ts +0 -2
- package/dist/src/utils/topK.test.d.ts.map +0 -1
- package/dist/src/utils/trees.test.d.ts +0 -2
- package/dist/src/utils/trees.test.d.ts.map +0 -1
- package/dist/src/utils/ui/tooltip.test.d.ts +0 -2
- package/dist/src/utils/ui/tooltip.test.d.ts.map +0 -1
- package/dist/src/utils/url.test.d.ts +0 -2
- package/dist/src/utils/url.test.d.ts.map +0 -1
- package/dist/src/utils/variableTools.test.d.ts +0 -2
- package/dist/src/utils/variableTools.test.d.ts.map +0 -1
- package/dist/src/view/concatView.test.d.ts +0 -2
- package/dist/src/view/concatView.test.d.ts.map +0 -1
- package/dist/src/view/dataReadiness.test.d.ts +0 -2
- package/dist/src/view/dataReadiness.test.d.ts.map +0 -1
- package/dist/src/view/flowBuilder.test.d.ts +0 -2
- package/dist/src/view/flowBuilder.test.d.ts.map +0 -1
- package/dist/src/view/gridView/gridView.test.d.ts +0 -2
- package/dist/src/view/gridView/gridView.test.d.ts.map +0 -1
- package/dist/src/view/gridView/selectionRect.test.d.ts +0 -2
- package/dist/src/view/gridView/selectionRect.test.d.ts.map +0 -1
- package/dist/src/view/layerView.test.d.ts +0 -2
- package/dist/src/view/layerView.test.d.ts.map +0 -1
- package/dist/src/view/layout/flexLayout.test.d.ts +0 -2
- package/dist/src/view/layout/flexLayout.test.d.ts.map +0 -1
- package/dist/src/view/layout/grid.test.d.ts +0 -2
- package/dist/src/view/layout/grid.test.d.ts.map +0 -1
- package/dist/src/view/layout/rectangle.test.d.ts +0 -2
- package/dist/src/view/layout/rectangle.test.d.ts.map +0 -1
- package/dist/src/view/multiscale.test.d.ts +0 -2
- package/dist/src/view/multiscale.test.d.ts.map +0 -1
- package/dist/src/view/view.test.d.ts +0 -2
- package/dist/src/view/view.test.d.ts.map +0 -1
- package/dist/src/view/viewDispose.test.d.ts +0 -2
- package/dist/src/view/viewDispose.test.d.ts.map +0 -1
- package/dist/src/view/viewFactory.test.d.ts +0 -2
- package/dist/src/view/viewFactory.test.d.ts.map +0 -1
- package/dist/src/view/viewParamRuntime.test.d.ts +0 -2
- package/dist/src/view/viewParamRuntime.test.d.ts.map +0 -1
- package/dist/src/view/viewSelectors.test.d.ts +0 -2
- package/dist/src/view/viewSelectors.test.d.ts.map +0 -1
- package/dist/src/view/viewUtils.test.d.ts +0 -2
- package/dist/src/view/viewUtils.test.d.ts.map +0 -1
|
@@ -198,7 +198,8 @@ export function resolveViewSelector(root, selector) {
|
|
|
198
198
|
const matches = [];
|
|
199
199
|
|
|
200
200
|
visitViewsInScope(
|
|
201
|
-
|
|
201
|
+
root,
|
|
202
|
+
selector.scope,
|
|
202
203
|
(view) => {
|
|
203
204
|
if (view.explicitName === selector.view) {
|
|
204
205
|
matches.push(view);
|
|
@@ -239,7 +240,7 @@ export function resolveParamSelector(root, selector) {
|
|
|
239
240
|
/** @type {ResolvedParam[]} */
|
|
240
241
|
const matches = [];
|
|
241
242
|
|
|
242
|
-
visitViewsInScope(
|
|
243
|
+
visitViewsInScope(root, selector.scope, (view) => {
|
|
243
244
|
for (const [name, param] of view.paramRuntime.paramConfigs) {
|
|
244
245
|
if (name !== selector.param) {
|
|
245
246
|
continue;
|
|
@@ -323,9 +324,8 @@ export function validateSelectorConstraints(root) {
|
|
|
323
324
|
|
|
324
325
|
for (const scopeRoot of collectScopeRoots(root)) {
|
|
325
326
|
const scope = getScopeChainForRoot(scopeRoot);
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
validateImportInstanceNames(scopeRoot, scope, issues);
|
|
327
|
+
validateParamNamesInScope(root, scope, issues);
|
|
328
|
+
validateImportInstanceNames(root, scope, issues);
|
|
329
329
|
}
|
|
330
330
|
|
|
331
331
|
return issues;
|
|
@@ -361,25 +361,6 @@ function validateViewSelector(selector) {
|
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
|
|
364
|
-
/**
|
|
365
|
-
* Returns the effective configurableVisibility value for a view.
|
|
366
|
-
*
|
|
367
|
-
* @param {import("./view.js").default} view
|
|
368
|
-
* @returns {boolean}
|
|
369
|
-
*/
|
|
370
|
-
function isConfigurableVisibility(view) {
|
|
371
|
-
const explicit = view.spec.configurableVisibility;
|
|
372
|
-
if (explicit !== undefined) {
|
|
373
|
-
return explicit;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
return !(
|
|
377
|
-
view.layoutParent &&
|
|
378
|
-
view.layoutParent.spec &&
|
|
379
|
-
"layer" in view.layoutParent.spec
|
|
380
|
-
);
|
|
381
|
-
}
|
|
382
|
-
|
|
383
364
|
/**
|
|
384
365
|
* Returns true for parameters that are persisted in bookmarks.
|
|
385
366
|
*
|
|
@@ -429,13 +410,7 @@ function collectScopeRoots(root) {
|
|
|
429
410
|
* @returns {string[]}
|
|
430
411
|
*/
|
|
431
412
|
function getScopeChainForRoot(scopeRoot) {
|
|
432
|
-
|
|
433
|
-
const info = importScopes.get(scopeRoot);
|
|
434
|
-
if (info && typeof info.name === "string") {
|
|
435
|
-
return [...chain, info.name];
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
return chain;
|
|
413
|
+
return getViewScopeChain(scopeRoot);
|
|
439
414
|
}
|
|
440
415
|
|
|
441
416
|
/**
|
|
@@ -452,87 +427,18 @@ function formatScope(scope) {
|
|
|
452
427
|
return "import scope [" + scope.join(" / ") + "]";
|
|
453
428
|
}
|
|
454
429
|
|
|
455
|
-
/**
|
|
456
|
-
* Checks configurable view names for required explicit and unique naming.
|
|
457
|
-
*
|
|
458
|
-
* @param {import("./view.js").default} scopeRoot
|
|
459
|
-
* @param {string[]} scope
|
|
460
|
-
* @param {SelectorValidationIssue[]} issues
|
|
461
|
-
*/
|
|
462
|
-
function validateViewNamesInScope(scopeRoot, scope, issues) {
|
|
463
|
-
/** @type {Map<string, import("./view.js").default[]>} */
|
|
464
|
-
const names = new Map();
|
|
465
|
-
|
|
466
|
-
visitViewsInScope(
|
|
467
|
-
scopeRoot,
|
|
468
|
-
(view) => {
|
|
469
|
-
const explicitName = view.explicitName;
|
|
470
|
-
const isConfigurable = isConfigurableVisibility(view);
|
|
471
|
-
const isExplicitlyConfigurable =
|
|
472
|
-
view.spec.configurableVisibility === true;
|
|
473
|
-
|
|
474
|
-
if (!isConfigurable) {
|
|
475
|
-
return;
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
if (!explicitName) {
|
|
479
|
-
if (!isExplicitlyConfigurable) {
|
|
480
|
-
return;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
issues.push({
|
|
484
|
-
message:
|
|
485
|
-
"Configurable view must have an explicit name in " +
|
|
486
|
-
formatScope(scope) +
|
|
487
|
-
".",
|
|
488
|
-
scope,
|
|
489
|
-
});
|
|
490
|
-
return;
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
const matches = names.get(explicitName);
|
|
494
|
-
if (matches) {
|
|
495
|
-
matches.push(view);
|
|
496
|
-
} else {
|
|
497
|
-
names.set(explicitName, [view]);
|
|
498
|
-
}
|
|
499
|
-
},
|
|
500
|
-
{ includeNamedImportRoots: true }
|
|
501
|
-
);
|
|
502
|
-
|
|
503
|
-
for (const [name, matches] of names) {
|
|
504
|
-
if (matches.length <= 1) {
|
|
505
|
-
continue;
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
const paths = matches.map((view) => view.getPathString()).join(", ");
|
|
509
|
-
|
|
510
|
-
issues.push({
|
|
511
|
-
message:
|
|
512
|
-
'Configurable view name "' +
|
|
513
|
-
name +
|
|
514
|
-
'" is not unique within ' +
|
|
515
|
-
formatScope(scope) +
|
|
516
|
-
". Found in: " +
|
|
517
|
-
paths +
|
|
518
|
-
".",
|
|
519
|
-
scope,
|
|
520
|
-
});
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
|
|
524
430
|
/**
|
|
525
431
|
* Checks bookmarkable parameter names for uniqueness within a scope.
|
|
526
432
|
*
|
|
527
|
-
* @param {import("./view.js").default}
|
|
433
|
+
* @param {import("./view.js").default} root
|
|
528
434
|
* @param {string[]} scope
|
|
529
435
|
* @param {SelectorValidationIssue[]} issues
|
|
530
436
|
*/
|
|
531
|
-
function validateParamNamesInScope(
|
|
437
|
+
function validateParamNamesInScope(root, scope, issues) {
|
|
532
438
|
/** @type {Map<string, import("./view.js").default[]>} */
|
|
533
439
|
const names = new Map();
|
|
534
440
|
|
|
535
|
-
visitViewsInScope(
|
|
441
|
+
visitViewsInScope(root, scope, (view) => {
|
|
536
442
|
for (const [name, param] of view.paramRuntime.paramConfigs) {
|
|
537
443
|
if (!isBookmarkableParam(param)) {
|
|
538
444
|
continue;
|
|
@@ -571,12 +477,12 @@ function validateParamNamesInScope(scopeRoot, scope, issues) {
|
|
|
571
477
|
/**
|
|
572
478
|
* Ensures addressable import instances are uniquely named in a scope.
|
|
573
479
|
*
|
|
574
|
-
* @param {import("./view.js").default}
|
|
480
|
+
* @param {import("./view.js").default} root
|
|
575
481
|
* @param {string[]} scope
|
|
576
482
|
* @param {SelectorValidationIssue[]} issues
|
|
577
483
|
*/
|
|
578
|
-
function validateImportInstanceNames(
|
|
579
|
-
const importRoots = collectImmediateImportRoots(
|
|
484
|
+
function validateImportInstanceNames(root, scope, issues) {
|
|
485
|
+
const importRoots = collectImmediateImportRoots(root, scope);
|
|
580
486
|
if (!importRoots.length) {
|
|
581
487
|
return;
|
|
582
488
|
}
|
|
@@ -620,35 +526,38 @@ function validateImportInstanceNames(scopeRoot, scope, issues) {
|
|
|
620
526
|
/**
|
|
621
527
|
* Collects direct import roots under a scope root.
|
|
622
528
|
*
|
|
623
|
-
* @param {import("./view.js").default}
|
|
529
|
+
* @param {import("./view.js").default} root
|
|
530
|
+
* @param {string[]} scope
|
|
624
531
|
* @returns {import("./view.js").default[]}
|
|
625
532
|
*/
|
|
626
|
-
function collectImmediateImportRoots(
|
|
533
|
+
function collectImmediateImportRoots(root, scope) {
|
|
627
534
|
/** @type {import("./view.js").default[]} */
|
|
628
535
|
const roots = [];
|
|
629
536
|
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
537
|
+
visitViewsInScope(
|
|
538
|
+
root,
|
|
539
|
+
scope,
|
|
540
|
+
(view) => {
|
|
541
|
+
const chain = getViewScopeChain(view);
|
|
542
|
+
if (chain.length !== scope.length + 1) {
|
|
543
|
+
return;
|
|
544
|
+
}
|
|
634
545
|
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
546
|
+
const info = importScopes.get(view);
|
|
547
|
+
if (!info || typeof info.name !== "string") {
|
|
548
|
+
return;
|
|
549
|
+
}
|
|
639
550
|
|
|
640
|
-
const info = importScopes.get(view);
|
|
641
|
-
if (info) {
|
|
642
551
|
roots.push(view);
|
|
643
|
-
|
|
644
|
-
}
|
|
645
|
-
|
|
552
|
+
},
|
|
553
|
+
{ includeNamedImportRoots: true }
|
|
554
|
+
);
|
|
646
555
|
|
|
647
556
|
return roots;
|
|
648
557
|
}
|
|
649
558
|
|
|
650
559
|
/**
|
|
651
|
-
* Detects whether a subtree exposes
|
|
560
|
+
* Detects whether a subtree exposes bookmarkable parameters.
|
|
652
561
|
*
|
|
653
562
|
* @param {import("./view.js").default} root
|
|
654
563
|
* @returns {boolean}
|
|
@@ -663,18 +572,6 @@ function hasAddressableFeatures(root) {
|
|
|
663
572
|
}
|
|
664
573
|
|
|
665
574
|
if (behavior !== "exclude") {
|
|
666
|
-
const isConfigurable = isConfigurableVisibility(view);
|
|
667
|
-
const isExplicitlyConfigurable =
|
|
668
|
-
view.spec.configurableVisibility === true;
|
|
669
|
-
|
|
670
|
-
if (
|
|
671
|
-
isConfigurable &&
|
|
672
|
-
(view.explicitName || isExplicitlyConfigurable)
|
|
673
|
-
) {
|
|
674
|
-
found = true;
|
|
675
|
-
return VISIT_STOP;
|
|
676
|
-
}
|
|
677
|
-
|
|
678
575
|
for (const param of view.paramRuntime.paramConfigs.values()) {
|
|
679
576
|
if (isBookmarkableParam(param)) {
|
|
680
577
|
found = true;
|
|
@@ -698,6 +595,9 @@ function resolveScopeRoot(root, scope) {
|
|
|
698
595
|
/** @type {import("./view.js").default} */
|
|
699
596
|
let current = root;
|
|
700
597
|
|
|
598
|
+
/** @type {string[]} */
|
|
599
|
+
const parentScope = [];
|
|
600
|
+
|
|
701
601
|
for (const name of scope) {
|
|
702
602
|
if (typeof name !== "string" || !name.length) {
|
|
703
603
|
throw new Error("Scope names must be non-empty strings.");
|
|
@@ -708,16 +608,24 @@ function resolveScopeRoot(root, scope) {
|
|
|
708
608
|
let hasDuplicate = false;
|
|
709
609
|
|
|
710
610
|
visitViewsInScope(
|
|
711
|
-
|
|
611
|
+
root,
|
|
612
|
+
parentScope,
|
|
712
613
|
(view) => {
|
|
713
614
|
const info = importScopes.get(view);
|
|
714
|
-
if (info
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
615
|
+
if (!info || info.name !== name) {
|
|
616
|
+
return;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
const chain = getViewScopeChain(view);
|
|
620
|
+
if (chain.length !== parentScope.length + 1) {
|
|
621
|
+
return;
|
|
720
622
|
}
|
|
623
|
+
|
|
624
|
+
if (match) {
|
|
625
|
+
hasDuplicate = true;
|
|
626
|
+
return VISIT_STOP;
|
|
627
|
+
}
|
|
628
|
+
match = view;
|
|
721
629
|
},
|
|
722
630
|
{ includeNamedImportRoots: true }
|
|
723
631
|
);
|
|
@@ -730,6 +638,7 @@ function resolveScopeRoot(root, scope) {
|
|
|
730
638
|
|
|
731
639
|
if (match) {
|
|
732
640
|
current = match;
|
|
641
|
+
parentScope.push(name);
|
|
733
642
|
} else {
|
|
734
643
|
return;
|
|
735
644
|
}
|
|
@@ -739,38 +648,92 @@ function resolveScopeRoot(root, scope) {
|
|
|
739
648
|
}
|
|
740
649
|
|
|
741
650
|
/**
|
|
742
|
-
* Visits addressable views within a scope
|
|
651
|
+
* Visits addressable views within a scope derived from data ancestry.
|
|
743
652
|
*
|
|
744
|
-
* @param {import("./view.js").default}
|
|
653
|
+
* @param {import("./view.js").default} root
|
|
654
|
+
* @param {string[]} scope
|
|
745
655
|
* @param {import("./view.js").Visitor} visitor
|
|
746
656
|
* @param {{ includeNamedImportRoots?: boolean }} [options]
|
|
747
657
|
*/
|
|
748
|
-
function visitViewsInScope(
|
|
658
|
+
function visitViewsInScope(root, scope, visitor, options = {}) {
|
|
749
659
|
const includeNamedImportRoots = options.includeNamedImportRoots ?? false;
|
|
750
660
|
|
|
751
|
-
|
|
661
|
+
root.visit((view) => {
|
|
662
|
+
const info = importScopes.get(view);
|
|
752
663
|
const behavior = addressableOverrides.get(view);
|
|
753
664
|
if (behavior === "excludeSubtree") {
|
|
754
665
|
return VISIT_SKIP;
|
|
755
666
|
}
|
|
756
667
|
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
view !== scopeRoot && info && typeof info.name === "string";
|
|
760
|
-
|
|
761
|
-
if (isNamedImportRoot) {
|
|
762
|
-
if (behavior !== "exclude" && includeNamedImportRoots) {
|
|
763
|
-
const result = visitor(view);
|
|
764
|
-
if (result === VISIT_STOP) {
|
|
765
|
-
return result;
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
return VISIT_SKIP;
|
|
668
|
+
if (behavior === "exclude") {
|
|
669
|
+
return;
|
|
770
670
|
}
|
|
771
671
|
|
|
772
|
-
if (
|
|
773
|
-
return
|
|
672
|
+
if (!isViewInScope(view, scope, info, includeNamedImportRoots)) {
|
|
673
|
+
return;
|
|
774
674
|
}
|
|
675
|
+
|
|
676
|
+
return visitor(view);
|
|
775
677
|
});
|
|
776
678
|
}
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* @param {import("./view.js").default} view
|
|
682
|
+
* @param {string[]} scope
|
|
683
|
+
* @param {ImportScopeInfo | undefined} scopeInfo
|
|
684
|
+
* @param {boolean} includeNamedImportRoots
|
|
685
|
+
* @returns {boolean}
|
|
686
|
+
*/
|
|
687
|
+
function isViewInScope(view, scope, scopeInfo, includeNamedImportRoots) {
|
|
688
|
+
const chain = getViewScopeChain(view);
|
|
689
|
+
|
|
690
|
+
if (scopesEqual(chain, scope)) {
|
|
691
|
+
return true;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
if (
|
|
695
|
+
!includeNamedImportRoots ||
|
|
696
|
+
!scopeInfo ||
|
|
697
|
+
typeof scopeInfo.name !== "string"
|
|
698
|
+
) {
|
|
699
|
+
return false;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
if (chain.length !== scope.length + 1) {
|
|
703
|
+
return false;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
return isScopePrefix(scope, chain);
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
/**
|
|
710
|
+
* @param {string[]} a
|
|
711
|
+
* @param {string[]} b
|
|
712
|
+
* @returns {boolean}
|
|
713
|
+
*/
|
|
714
|
+
function scopesEqual(a, b) {
|
|
715
|
+
if (a.length !== b.length) {
|
|
716
|
+
return false;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
return isScopePrefix(a, b);
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* @param {string[]} prefix
|
|
724
|
+
* @param {string[]} scope
|
|
725
|
+
* @returns {boolean}
|
|
726
|
+
*/
|
|
727
|
+
function isScopePrefix(prefix, scope) {
|
|
728
|
+
if (prefix.length > scope.length) {
|
|
729
|
+
return false;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
for (let i = 0; i < prefix.length; i++) {
|
|
733
|
+
if (prefix[i] !== scope[i]) {
|
|
734
|
+
return false;
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
return true;
|
|
739
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param {import("../spec/view.js").ViewSpec} spec
|
|
4
|
+
* @returns {spec is import("../spec/view.js").UnitSpec}
|
|
5
|
+
*/
|
|
6
|
+
export function isUnitSpec(spec: import("../spec/view.js").ViewSpec): spec is import("../spec/view.js").UnitSpec;
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param {import("../spec/view.js").ViewSpec} spec
|
|
10
|
+
* @returns {spec is import("../spec/view.js").LayerSpec}
|
|
11
|
+
*/
|
|
12
|
+
export function isLayerSpec(spec: import("../spec/view.js").ViewSpec): spec is import("../spec/view.js").LayerSpec;
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @param {import("../spec/view.js").ViewSpec} spec
|
|
16
|
+
* @returns {spec is import("../spec/view.js").FacetSpec}
|
|
17
|
+
*/
|
|
18
|
+
export function isFacetSpec(spec: import("../spec/view.js").ViewSpec): spec is import("../spec/view.js").FacetSpec;
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @param {object} spec
|
|
22
|
+
* @returns {spec is import("../spec/view.js").ImportSpec}
|
|
23
|
+
*/
|
|
24
|
+
export function isImportSpec(spec: object): spec is import("../spec/view.js").ImportSpec;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @param {import("../spec/view.js").ViewSpec} spec
|
|
28
|
+
* @returns {spec is import("../spec/view.js").VConcatSpec}
|
|
29
|
+
*/
|
|
30
|
+
export function isVConcatSpec(spec: import("../spec/view.js").ViewSpec): spec is import("../spec/view.js").VConcatSpec;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @param {import("../spec/view.js").ViewSpec} spec
|
|
34
|
+
* @returns {spec is import("../spec/view.js").HConcatSpec}
|
|
35
|
+
*/
|
|
36
|
+
export function isHConcatSpec(spec: import("../spec/view.js").ViewSpec): spec is import("../spec/view.js").HConcatSpec;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @param {import("../spec/view.js").ViewSpec} spec
|
|
40
|
+
* @returns {spec is import("../spec/view.js").ConcatSpec}
|
|
41
|
+
*/
|
|
42
|
+
export function isConcatSpec(spec: import("../spec/view.js").ViewSpec): spec is import("../spec/view.js").ConcatSpec;
|
|
43
|
+
//# sourceMappingURL=viewSpecGuards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewSpecGuards.d.ts","sourceRoot":"","sources":["../../../src/view/viewSpecGuards.js"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,iCAHW,OAAO,iBAAiB,EAAE,QAAQ,GAChC,IAAI,IAAI,OAAO,iBAAiB,EAAE,QAAQ,CAItD;AAED;;;;GAIG;AACH,kCAHW,OAAO,iBAAiB,EAAE,QAAQ,GAChC,IAAI,IAAI,OAAO,iBAAiB,EAAE,SAAS,CAIvD;AAED;;;;GAIG;AACH,kCAHW,OAAO,iBAAiB,EAAE,QAAQ,GAChC,IAAI,IAAI,OAAO,iBAAiB,EAAE,SAAS,CASvD;AAED;;;;GAIG;AACH,mCAHW,MAAM,GACJ,IAAI,IAAI,OAAO,iBAAiB,EAAE,UAAU,CAIxD;AAED;;;;GAIG;AACH,oCAHW,OAAO,iBAAiB,EAAE,QAAQ,GAChC,IAAI,IAAI,OAAO,iBAAiB,EAAE,WAAW,CAIzD;AAED;;;;GAIG;AACH,oCAHW,OAAO,iBAAiB,EAAE,QAAQ,GAChC,IAAI,IAAI,OAAO,iBAAiB,EAAE,WAAW,CAIzD;AAED;;;;GAIG;AACH,mCAHW,OAAO,iBAAiB,EAAE,QAAQ,GAChC,IAAI,IAAI,OAAO,iBAAiB,EAAE,UAAU,CAIxD"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { isArray, isObject, isString } from "vega-util";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @param {import("../spec/view.js").ViewSpec} spec
|
|
6
|
+
* @returns {spec is import("../spec/view.js").UnitSpec}
|
|
7
|
+
*/
|
|
8
|
+
export function isUnitSpec(spec) {
|
|
9
|
+
return "mark" in spec && (isString(spec.mark) || isObject(spec.mark));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @param {import("../spec/view.js").ViewSpec} spec
|
|
15
|
+
* @returns {spec is import("../spec/view.js").LayerSpec}
|
|
16
|
+
*/
|
|
17
|
+
export function isLayerSpec(spec) {
|
|
18
|
+
return "layer" in spec && isObject(spec.layer);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @param {import("../spec/view.js").ViewSpec} spec
|
|
24
|
+
* @returns {spec is import("../spec/view.js").FacetSpec}
|
|
25
|
+
*/
|
|
26
|
+
export function isFacetSpec(spec) {
|
|
27
|
+
return (
|
|
28
|
+
"facet" in spec &&
|
|
29
|
+
isObject(spec.facet) &&
|
|
30
|
+
"spec" in spec &&
|
|
31
|
+
isObject(spec.spec)
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @param {object} spec
|
|
38
|
+
* @returns {spec is import("../spec/view.js").ImportSpec}
|
|
39
|
+
*/
|
|
40
|
+
export function isImportSpec(spec) {
|
|
41
|
+
return "import" in spec;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @param {import("../spec/view.js").ViewSpec} spec
|
|
47
|
+
* @returns {spec is import("../spec/view.js").VConcatSpec}
|
|
48
|
+
*/
|
|
49
|
+
export function isVConcatSpec(spec) {
|
|
50
|
+
return "vconcat" in spec && isArray(spec.vconcat);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @param {import("../spec/view.js").ViewSpec} spec
|
|
56
|
+
* @returns {spec is import("../spec/view.js").HConcatSpec}
|
|
57
|
+
*/
|
|
58
|
+
export function isHConcatSpec(spec) {
|
|
59
|
+
return "hconcat" in spec && isArray(spec.hconcat);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* @param {import("../spec/view.js").ViewSpec} spec
|
|
65
|
+
* @returns {spec is import("../spec/view.js").ConcatSpec}
|
|
66
|
+
*/
|
|
67
|
+
export function isConcatSpec(spec) {
|
|
68
|
+
return "concat" in spec && isArray(spec.concat);
|
|
69
|
+
}
|
|
@@ -20,7 +20,7 @@ export function getMarks(root: View): import("../marks/mark.js").default<import(
|
|
|
20
20
|
*
|
|
21
21
|
* @param {View} root
|
|
22
22
|
*/
|
|
23
|
-
export function getFlattenedViews(root: View): View[];
|
|
23
|
+
export function getFlattenedViews(root: View): View<import("../spec/view.js").ViewSpec>[];
|
|
24
24
|
/**
|
|
25
25
|
* @param {View} root
|
|
26
26
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewUtils.d.ts","sourceRoot":"","sources":["../../../src/view/viewUtils.js"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,qCAHW,OAAO,oBAAoB,EAAE,UAAU,GAAG,OAAO,iBAAiB,EAAE,YAAY,GAC9E,IAAI,IAAI,aAAa,CAIjC;AAED;;;;GAIG;AACH,oCAHW,OAAO,oBAAoB,EAAE,aAAa,GAAG,OAAO,iBAAiB,EAAE,YAAY,GACjF,IAAI,IAAI,YAAY,CAOhC;AAED;;;GAGG;AACH,+BAFW,IAAI,6EAMd;AAED;;;;GAIG;AACH,wCAFW,IAAI,
|
|
1
|
+
{"version":3,"file":"viewUtils.d.ts","sourceRoot":"","sources":["../../../src/view/viewUtils.js"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,qCAHW,OAAO,oBAAoB,EAAE,UAAU,GAAG,OAAO,iBAAiB,EAAE,YAAY,GAC9E,IAAI,IAAI,aAAa,CAIjC;AAED;;;;GAIG;AACH,oCAHW,OAAO,oBAAoB,EAAE,aAAa,GAAG,OAAO,iBAAiB,EAAE,YAAY,GACjF,IAAI,IAAI,YAAY,CAOhC;AAED;;;GAGG;AACH,+BAFW,IAAI,6EAMd;AAED;;;;GAIG;AACH,wCAFW,IAAI,8CASd;AAED;;GAEG;AACH,kDAFW,IAAI,QAiBd;AAED;;;;;;;GAOG;AACH,4CAFW,IAAI,QAUd;AAED;;;;GAIG;AACH,0DAJW,OAAO,CAAC,OAAO,kBAAkB,EAAE,OAAO,CAAC,EAAE,mBAC7C,MAAM,OAAO,GACX,OAAO,CAAC,IAAI,CAAC,CAmBzB;AAED;;;GAGG;AACH,wCAFW,IAAI;UAGO,QAAQ;aAAW,OAAO,oBAAoB,EAAE,OAAO;WAAS,OAAO,oBAAoB,EAAE,KAAK;UAAQ,OAAO,oBAAoB,EAAE,IAAI;IAqBhK;AAED;;;;;GAKG;AACH,2CALW,OAAO,iBAAiB,EAAE,UAAU,WACpC,MAAM,eACN,OAAO,yBAAyB,EAAE,OAAO,GACvC,OAAO,CAAC,OAAO,iBAAiB,EAAE,QAAQ,CAAC,CAoCvD;AAED;;GAEG;AACH,yCAFW,CAAS,IAAI,EAAJ,IAAI,EAAE,IAAM,EAAN,IAAI,EAAE,KAAE,IAAI,+BAkBrC;AAED;;;GAGG;AACH,0CAFW,IAAI,eAqBd;AAED;;GAEG;AACH,8CAFW,OAAO,WAAW,EAAE,OAAO;;;EAoBrC;iBA1P4C,WAAW;qBAFnC,eAAe"}
|
package/dist/src/view/zoom.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zoom.d.ts","sourceRoot":"","sources":["../../../src/view/zoom.js"],"names":[],"mappings":"AAkBA,0CAGC;AAgBD;;;;;;GAMG;AACH,yCANW,OAAO,8BAA8B,EAAE,OAAO,UAC9C,OAAO,uBAAuB,EAAE,OAAO,cACvC,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,UAC9B,OAAO,yBAAyB,EAAE,KAAK,aACvC,OAAO,sBAAsB,EAAE,OAAO,QA+IhD;;
|
|
1
|
+
{"version":3,"file":"zoom.d.ts","sourceRoot":"","sources":["../../../src/view/zoom.js"],"names":[],"mappings":"AAkBA,yCAEC;AAED,0CAGC;AAgBD;;;;;;GAMG;AACH,yCANW,OAAO,8BAA8B,EAAE,OAAO,UAC9C,OAAO,uBAAuB,EAAE,OAAO,cACvC,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,UAC9B,OAAO,yBAAyB,EAAE,KAAK,aACvC,OAAO,sBAAsB,EAAE,OAAO,QA+IhD;;OA3LS,MAAM;OACN,MAAM;YACN,MAAM;YACN,MAAM;YACN,MAAM"}
|
package/dist/src/view/zoom.js
CHANGED
|
@@ -16,6 +16,10 @@ let smoother;
|
|
|
16
16
|
|
|
17
17
|
let lastTimestamp = 0;
|
|
18
18
|
|
|
19
|
+
export function markZoomActivity() {
|
|
20
|
+
lastTimestamp = performance.now();
|
|
21
|
+
}
|
|
22
|
+
|
|
19
23
|
export function isStillZooming() {
|
|
20
24
|
const delta = performance.now() - lastTimestamp;
|
|
21
25
|
return delta < 50;
|
|
@@ -30,7 +34,7 @@ export function isStillZooming() {
|
|
|
30
34
|
function recordTimeStamp(fn) {
|
|
31
35
|
// @ts-ignore
|
|
32
36
|
return function (...args) {
|
|
33
|
-
|
|
37
|
+
markZoomActivity();
|
|
34
38
|
fn(...args);
|
|
35
39
|
};
|
|
36
40
|
}
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"contributors": [],
|
|
9
9
|
"license": "MIT",
|
|
10
|
-
"version": "0.
|
|
10
|
+
"version": "0.72.0",
|
|
11
11
|
"jsdelivr": "dist/bundle/index.js",
|
|
12
12
|
"unpkg": "dist/bundle/index.js",
|
|
13
13
|
"browser": "dist/bundle/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"prepublishOnly": "npm run build",
|
|
32
32
|
"test:tsc": "tsc -p tsconfig.json --noEmit",
|
|
33
33
|
"build:schema": "mkdir -p dist && ts-json-schema-generator --path 'src/spec/*.ts' --type CoreRootSpec > dist/schema.json",
|
|
34
|
-
"build:typings": "tsc -p tsconfig.json --declaration --emitDeclarationOnly --declarationMap --outDir dist/src",
|
|
34
|
+
"build:typings": "tsc -p tsconfig.build.json --declaration --emitDeclarationOnly --declarationMap --outDir dist/src",
|
|
35
35
|
"prepack": "node scripts/prepack.mjs",
|
|
36
36
|
"postpack": "node scripts/postpack.mjs"
|
|
37
37
|
},
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"flatqueue": "^3.0.0",
|
|
57
57
|
"generic-filehandle2": "^2.0.14",
|
|
58
58
|
"gff-nostream": "^2.0.0",
|
|
59
|
+
"hyparquet": "^1.25.0",
|
|
59
60
|
"internmap": "^2.0.3",
|
|
60
61
|
"lit": "^3.3.0",
|
|
61
62
|
"twgl.js": "^4.19.1",
|
|
@@ -67,5 +68,5 @@
|
|
|
67
68
|
"devDependencies": {
|
|
68
69
|
"@types/long": "^4.0.1"
|
|
69
70
|
},
|
|
70
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "504e1d0f7c45c2324bb6b0ff7b9230829d60518e"
|
|
71
72
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"collector.test.d.ts","sourceRoot":"","sources":["../../../src/data/collector.test.js"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dataFlow.test.d.ts","sourceRoot":"","sources":["../../../src/data/dataFlow.test.js"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flow.test.d.ts","sourceRoot":"","sources":["../../../src/data/flow.test.js"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flowInit.test.d.ts","sourceRoot":"","sources":["../../../src/data/flowInit.test.js"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flowNode.test.d.ts","sourceRoot":"","sources":["../../../src/data/flowNode.test.js"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flowOptimizer.test.d.ts","sourceRoot":"","sources":["../../../src/data/flowOptimizer.test.js"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fasta.test.d.ts","sourceRoot":"","sources":["../../../../src/data/formats/fasta.test.js"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keyIndex.test.d.ts","sourceRoot":"","sources":["../../../src/data/keyIndex.test.js"],"names":[],"mappings":""}
|