@genome-spy/core 0.77.0 → 0.79.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/{browser-KWU9rWZT.js → browser-CETrb2cm.js} +53 -33
- package/dist/bundle/esm-BdLYkz-m.js +248 -0
- package/dist/bundle/esm-BwiDsqSb.js +1367 -0
- package/dist/bundle/esm-CDFd1cjk.js +441 -0
- package/dist/bundle/{esm-CRMf_I9V.js → esm-CTUHLDbv.js} +30 -30
- package/dist/bundle/esm-Cx-EbkOj.js +1221 -0
- package/dist/bundle/esm-DlYGqi79.js +128 -0
- package/dist/bundle/{esm-BygJiwh0.js → esm-k9p3oHkt.js} +133 -158
- package/dist/bundle/{esm-CT3ygiMq.js → esm-zAZJQO6D.js} +226 -212
- package/dist/bundle/index.es.js +14102 -10810
- package/dist/bundle/index.js +109 -95
- package/dist/bundle/{parquetRead-DG_-F5j5.js → parquetRead-Cad1SOVV.js} +473 -399
- package/dist/schema.json +23788 -11049
- package/dist/src/config/axisConfig.d.ts +2 -2
- package/dist/src/config/axisConfig.d.ts.map +1 -1
- package/dist/src/config/axisConfig.js +28 -44
- package/dist/src/config/configLayers.d.ts +45 -0
- package/dist/src/config/configLayers.d.ts.map +1 -0
- package/dist/src/config/configLayers.js +110 -0
- package/dist/src/config/defaultConfig.d.ts.map +1 -1
- package/dist/src/config/defaultConfig.js +8 -1
- package/dist/src/config/defaults/legendDefaults.d.ts +14 -0
- package/dist/src/config/defaults/legendDefaults.d.ts.map +1 -0
- package/dist/src/config/defaults/legendDefaults.js +46 -0
- package/dist/src/config/defaults/titleDefaults.d.ts.map +1 -1
- package/dist/src/config/defaults/titleDefaults.js +26 -18
- package/dist/src/config/legendConfig.d.ts +11 -0
- package/dist/src/config/legendConfig.d.ts.map +1 -0
- package/dist/src/config/legendConfig.js +63 -0
- package/dist/src/config/styleUtils.d.ts +8 -2
- package/dist/src/config/styleUtils.d.ts.map +1 -1
- package/dist/src/config/styleUtils.js +25 -1
- package/dist/src/config/themes.d.ts.map +1 -1
- package/dist/src/config/themes.js +21 -2
- package/dist/src/config/titleConfig.d.ts.map +1 -1
- package/dist/src/config/titleConfig.js +2 -18
- package/dist/src/data/collector.d.ts.map +1 -1
- package/dist/src/data/collector.js +40 -18
- package/dist/src/data/flowInit.d.ts +6 -0
- package/dist/src/data/flowInit.d.ts.map +1 -1
- package/dist/src/data/flowInit.js +1 -1
- package/dist/src/data/flowNode.d.ts +32 -0
- package/dist/src/data/flowNode.d.ts.map +1 -1
- package/dist/src/data/flowNode.js +59 -0
- package/dist/src/data/sources/lazy/bamSource.d.ts +0 -1
- package/dist/src/data/sources/lazy/bamSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/bamSource.js +39 -30
- package/dist/src/data/sources/lazy/bigBedSource.d.ts +0 -10
- package/dist/src/data/sources/lazy/bigBedSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/bigBedSource.js +127 -62
- package/dist/src/data/sources/lazy/bigWigSource.d.ts +2 -2
- package/dist/src/data/sources/lazy/bigWigSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/bigWigSource.js +234 -81
- package/dist/src/data/sources/lazy/gff3Source.d.ts +7 -3
- package/dist/src/data/sources/lazy/gff3Source.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/gff3Source.js +7 -8
- package/dist/src/data/sources/lazy/indexedFastaSource.d.ts +1 -1
- package/dist/src/data/sources/lazy/indexedFastaSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/indexedFastaSource.js +28 -19
- package/dist/src/data/sources/lazy/legendEntriesSource.d.ts +24 -0
- package/dist/src/data/sources/lazy/legendEntriesSource.d.ts.map +1 -0
- package/dist/src/data/sources/lazy/legendEntriesSource.js +217 -0
- package/dist/src/data/sources/lazy/legendGradientSource.d.ts +30 -0
- package/dist/src/data/sources/lazy/legendGradientSource.d.ts.map +1 -0
- package/dist/src/data/sources/lazy/legendGradientSource.js +388 -0
- package/dist/src/data/sources/lazy/mockLazySource.d.ts +4 -1
- package/dist/src/data/sources/lazy/mockLazySource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/mockLazySource.js +49 -4
- package/dist/src/data/sources/lazy/registerCoreLazySources.js +2 -0
- package/dist/src/data/sources/lazy/singleAxisWindowedSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/singleAxisWindowedSource.js +3 -4
- package/dist/src/data/sources/lazy/tabixSource.d.ts +9 -4
- package/dist/src/data/sources/lazy/tabixSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/tabixSource.js +201 -70
- package/dist/src/data/sources/lazy/tabixTsvSource.d.ts +2 -3
- package/dist/src/data/sources/lazy/tabixTsvSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/tabixTsvSource.js +14 -12
- package/dist/src/data/sources/lazy/vcfSource.d.ts +7 -3
- package/dist/src/data/sources/lazy/vcfSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/vcfSource.js +7 -8
- package/dist/src/data/sources/urlDescriptor.d.ts +165 -0
- package/dist/src/data/sources/urlDescriptor.d.ts.map +1 -0
- package/dist/src/data/sources/urlDescriptor.js +473 -0
- package/dist/src/data/sources/urlDescriptorController.d.ts +25 -0
- package/dist/src/data/sources/urlDescriptorController.d.ts.map +1 -0
- package/dist/src/data/sources/urlDescriptorController.js +72 -0
- package/dist/src/data/sources/urlDescriptorState.d.ts +47 -0
- package/dist/src/data/sources/urlDescriptorState.d.ts.map +1 -0
- package/dist/src/data/sources/urlDescriptorState.js +129 -0
- package/dist/src/data/sources/urlSource.d.ts.map +1 -1
- package/dist/src/data/sources/urlSource.js +101 -61
- package/dist/src/data/transforms/packLegendLabels.d.ts +21 -0
- package/dist/src/data/transforms/packLegendLabels.d.ts.map +1 -0
- package/dist/src/data/transforms/packLegendLabels.js +189 -0
- package/dist/src/data/transforms/transformFactory.d.ts.map +1 -1
- package/dist/src/data/transforms/transformFactory.js +4 -0
- package/dist/src/data/transforms/truncateText.d.ts +27 -0
- package/dist/src/data/transforms/truncateText.d.ts.map +1 -0
- package/dist/src/data/transforms/truncateText.js +94 -0
- package/dist/src/debug/dataflowDebugSnapshot.d.ts +58 -0
- package/dist/src/debug/dataflowDebugSnapshot.d.ts.map +1 -0
- package/dist/src/debug/dataflowDebugSnapshot.js +159 -0
- package/dist/src/debug/markDebugSnapshot.d.ts +54 -0
- package/dist/src/debug/markDebugSnapshot.d.ts.map +1 -0
- package/dist/src/debug/markDebugSnapshot.js +100 -0
- package/dist/src/debug/paramDebugSnapshot.d.ts +53 -0
- package/dist/src/debug/paramDebugSnapshot.d.ts.map +1 -0
- package/dist/src/debug/paramDebugSnapshot.js +86 -0
- package/dist/src/debug/resolutionDebugSnapshot.d.ts +155 -0
- package/dist/src/debug/resolutionDebugSnapshot.d.ts.map +1 -0
- package/dist/src/debug/resolutionDebugSnapshot.js +291 -0
- package/dist/src/debug/valuePreview.d.ts +9 -0
- package/dist/src/debug/valuePreview.d.ts.map +1 -0
- package/dist/src/debug/valuePreview.js +57 -0
- package/dist/src/debug/viewDebugSnapshot.d.ts +131 -0
- package/dist/src/debug/viewDebugSnapshot.d.ts.map +1 -0
- package/dist/src/debug/viewDebugSnapshot.js +390 -0
- package/dist/src/embedFactory.d.ts.map +1 -1
- package/dist/src/embedFactory.js +6 -1
- package/dist/src/encoder/encoder.d.ts +2 -2
- package/dist/src/encoder/encoder.d.ts.map +1 -1
- package/dist/src/encoder/encoder.js +5 -4
- package/dist/src/fonts/bmFontManager.d.ts +1 -1
- package/dist/src/fonts/bmFontManager.d.ts.map +1 -1
- package/dist/src/fonts/bmFontManager.js +45 -10
- package/dist/src/fonts/textMetrics.d.ts +69 -0
- package/dist/src/fonts/textMetrics.d.ts.map +1 -0
- package/dist/src/fonts/textMetrics.js +73 -0
- package/dist/src/genomeSpy/headlessBootstrap.d.ts.map +1 -1
- package/dist/src/genomeSpy/headlessBootstrap.js +8 -0
- package/dist/src/genomeSpy/interactionController.d.ts +4 -1
- package/dist/src/genomeSpy/interactionController.d.ts.map +1 -1
- package/dist/src/genomeSpy/interactionController.js +57 -13
- package/dist/src/genomeSpy/renderCoordinator.d.ts.map +1 -1
- package/dist/src/genomeSpy/renderCoordinator.js +25 -3
- package/dist/src/genomeSpy/viewDataInit.d.ts +14 -0
- package/dist/src/genomeSpy/viewDataInit.d.ts.map +1 -1
- package/dist/src/genomeSpy/viewDataInit.js +45 -8
- package/dist/src/genomeSpyBase.d.ts +6 -0
- package/dist/src/genomeSpyBase.d.ts.map +1 -1
- package/dist/src/genomeSpyBase.js +25 -4
- package/dist/src/gl/glslScaleGenerator.d.ts +17 -0
- package/dist/src/gl/glslScaleGenerator.d.ts.map +1 -1
- package/dist/src/gl/glslScaleGenerator.js +39 -2
- package/dist/src/gl/includes/common.glsl.js +1 -1
- package/dist/src/gl/vertexRangeIndex.d.ts.map +1 -1
- package/dist/src/gl/vertexRangeIndex.js +4 -2
- package/dist/src/gl/webGLHelper.d.ts +1 -1
- package/dist/src/gl/webGLHelper.d.ts.map +1 -1
- package/dist/src/gl/webGLHelper.js +13 -8
- package/dist/src/marks/__snapshots__/shaderSnapshot.test.js.snap +140 -3
- package/dist/src/marks/mark.d.ts +47 -4
- package/dist/src/marks/mark.d.ts.map +1 -1
- package/dist/src/marks/mark.js +158 -54
- package/dist/src/marks/point.d.ts.map +1 -1
- package/dist/src/marks/point.js +4 -0
- package/dist/src/marks/point.vertex.glsl.js +1 -1
- package/dist/src/marks/text.d.ts +1 -1
- package/dist/src/marks/text.d.ts.map +1 -1
- package/dist/src/marks/text.js +2 -7
- package/dist/src/marks/text.vertex.glsl.js +1 -1
- package/dist/src/paramRuntime/paramUtils.d.ts +43 -9
- package/dist/src/paramRuntime/paramUtils.d.ts.map +1 -1
- package/dist/src/paramRuntime/paramUtils.js +61 -1
- package/dist/src/paramRuntime/viewParamRuntime.d.ts +32 -0
- package/dist/src/paramRuntime/viewParamRuntime.d.ts.map +1 -1
- package/dist/src/paramRuntime/viewParamRuntime.js +63 -0
- package/dist/src/scales/axisResolution.d.ts +35 -0
- package/dist/src/scales/axisResolution.d.ts.map +1 -1
- package/dist/src/scales/axisResolution.js +115 -7
- package/dist/src/scales/domainExpressions.d.ts +21 -0
- package/dist/src/scales/domainExpressions.d.ts.map +1 -0
- package/dist/src/scales/domainExpressions.js +43 -0
- package/dist/src/scales/domainPlanner.d.ts +12 -1
- package/dist/src/scales/domainPlanner.d.ts.map +1 -1
- package/dist/src/scales/domainPlanner.js +55 -36
- package/dist/src/scales/legendResolution.d.ts +83 -0
- package/dist/src/scales/legendResolution.d.ts.map +1 -0
- package/dist/src/scales/legendResolution.js +461 -0
- package/dist/src/scales/scaleInstanceManager.d.ts +1 -0
- package/dist/src/scales/scaleInstanceManager.d.ts.map +1 -1
- package/dist/src/scales/scaleInstanceManager.js +5 -0
- package/dist/src/scales/scalePropsResolver.d.ts +6 -1
- package/dist/src/scales/scalePropsResolver.d.ts.map +1 -1
- package/dist/src/scales/scalePropsResolver.js +35 -10
- package/dist/src/scales/scaleResolution.d.ts +52 -0
- package/dist/src/scales/scaleResolution.d.ts.map +1 -1
- package/dist/src/scales/scaleResolution.js +195 -16
- package/dist/src/scales/scaleRules.d.ts +10 -0
- package/dist/src/scales/scaleRules.d.ts.map +1 -1
- package/dist/src/scales/scaleRules.js +38 -1
- package/dist/src/scales/viewLevelGuideConfig.d.ts +53 -0
- package/dist/src/scales/viewLevelGuideConfig.d.ts.map +1 -0
- package/dist/src/scales/viewLevelGuideConfig.js +224 -0
- package/dist/src/scales/viewLevelScaleConfig.d.ts +45 -0
- package/dist/src/scales/viewLevelScaleConfig.d.ts.map +1 -0
- package/dist/src/scales/viewLevelScaleConfig.js +149 -0
- package/dist/src/spec/axis.d.ts +109 -3
- package/dist/src/spec/channel.d.ts +23 -4
- package/dist/src/spec/config.d.ts +59 -4
- package/dist/src/spec/data.d.ts +177 -17
- package/dist/src/spec/legend.d.ts +246 -0
- package/dist/src/spec/mark.d.ts +16 -4
- package/dist/src/spec/scale.d.ts +19 -6
- package/dist/src/spec/title.d.ts +58 -1
- package/dist/src/spec/transform.d.ts +149 -0
- package/dist/src/spec/view.d.ts +50 -6
- package/dist/src/styles/genome-spy.css +4 -1
- package/dist/src/styles/genome-spy.css.d.ts +1 -1
- package/dist/src/styles/genome-spy.css.d.ts.map +1 -1
- package/dist/src/styles/genome-spy.css.js +4 -1
- package/dist/src/types/embedApi.d.ts +262 -6
- package/dist/src/types/rendering.d.ts +19 -3
- package/dist/src/types/viewContext.d.ts +18 -2
- package/dist/src/utils/arrayUtils.d.ts +11 -0
- package/dist/src/utils/arrayUtils.d.ts.map +1 -1
- package/dist/src/utils/arrayUtils.js +23 -0
- package/dist/src/utils/suspension.d.ts +17 -0
- package/dist/src/utils/suspension.d.ts.map +1 -0
- package/dist/src/utils/suspension.js +41 -0
- package/dist/src/utils/ui/tooltip.d.ts +4 -0
- package/dist/src/utils/ui/tooltip.d.ts.map +1 -1
- package/dist/src/utils/ui/tooltip.js +35 -10
- package/dist/src/view/axisGridView.d.ts.map +1 -1
- package/dist/src/view/axisGridView.js +1 -4
- package/dist/src/view/axisView.d.ts +18 -2
- package/dist/src/view/axisView.d.ts.map +1 -1
- package/dist/src/view/axisView.js +180 -75
- package/dist/src/view/concatView.d.ts +10 -2
- package/dist/src/view/concatView.d.ts.map +1 -1
- package/dist/src/view/concatView.js +46 -9
- package/dist/src/view/containerMutationHelper.d.ts +20 -1
- package/dist/src/view/containerMutationHelper.d.ts.map +1 -1
- package/dist/src/view/containerMutationHelper.js +203 -32
- package/dist/src/view/facetView.d.ts +1 -1
- package/dist/src/view/gridView/gridChild.d.ts +54 -4
- package/dist/src/view/gridView/gridChild.d.ts.map +1 -1
- package/dist/src/view/gridView/gridChild.js +301 -120
- package/dist/src/view/gridView/gridChildLegends.d.ts +57 -0
- package/dist/src/view/gridView/gridChildLegends.d.ts.map +1 -0
- package/dist/src/view/gridView/gridChildLegends.js +503 -0
- package/dist/src/view/gridView/gridView.d.ts +25 -0
- package/dist/src/view/gridView/gridView.d.ts.map +1 -1
- package/dist/src/view/gridView/gridView.js +454 -78
- package/dist/src/view/gridView/legendLayout.d.ts +26 -0
- package/dist/src/view/gridView/legendLayout.d.ts.map +1 -0
- package/dist/src/view/gridView/legendLayout.js +111 -0
- package/dist/src/view/gridView/scrollbar.d.ts.map +1 -1
- package/dist/src/view/gridView/scrollbar.js +1 -4
- package/dist/src/view/gridView/selectionRect.d.ts.map +1 -1
- package/dist/src/view/gridView/selectionRect.js +1 -4
- package/dist/src/view/gridView/separatorView.d.ts.map +1 -1
- package/dist/src/view/gridView/separatorView.js +1 -4
- package/dist/src/view/layerView.d.ts +9 -2
- package/dist/src/view/layerView.d.ts.map +1 -1
- package/dist/src/view/layerView.js +18 -1
- package/dist/src/view/layout/flexLayout.d.ts +20 -4
- package/dist/src/view/layout/flexLayout.d.ts.map +1 -1
- package/dist/src/view/layout/flexLayout.js +331 -31
- package/dist/src/view/layout/rectangle.d.ts +14 -0
- package/dist/src/view/layout/rectangle.d.ts.map +1 -1
- package/dist/src/view/layout/rectangle.js +40 -0
- package/dist/src/view/legend/legendEntries.d.ts +20 -0
- package/dist/src/view/legend/legendEntries.d.ts.map +1 -0
- package/dist/src/view/legend/legendEntries.js +21 -0
- package/dist/src/view/legendView.d.ts +134 -0
- package/dist/src/view/legendView.d.ts.map +1 -0
- package/dist/src/view/legendView.js +1611 -0
- package/dist/src/view/renderingContext/bufferedViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/bufferedViewRenderingContext.js +26 -4
- package/dist/src/view/renderingContext/clipOptions.d.ts +44 -0
- package/dist/src/view/renderingContext/clipOptions.d.ts.map +1 -0
- package/dist/src/view/renderingContext/clipOptions.js +140 -0
- package/dist/src/view/renderingContext/simpleViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/simpleViewRenderingContext.js +12 -1
- package/dist/src/view/resolutionPlanner.d.ts +2 -1
- package/dist/src/view/resolutionPlanner.d.ts.map +1 -1
- package/dist/src/view/resolutionPlanner.js +89 -25
- package/dist/src/view/testUtils.d.ts +4 -2
- package/dist/src/view/testUtils.d.ts.map +1 -1
- package/dist/src/view/testUtils.js +29 -7
- package/dist/src/view/titleView.d.ts +37 -0
- package/dist/src/view/titleView.d.ts.map +1 -0
- package/dist/src/view/titleView.js +584 -0
- package/dist/src/view/unitView.d.ts +3 -3
- package/dist/src/view/unitView.d.ts.map +1 -1
- package/dist/src/view/unitView.js +3 -2
- package/dist/src/view/view.d.ts +25 -24
- package/dist/src/view/view.d.ts.map +1 -1
- package/dist/src/view/view.js +121 -16
- package/dist/src/view/viewFactory.d.ts +2 -5
- package/dist/src/view/viewFactory.d.ts.map +1 -1
- package/dist/src/view/viewFactory.js +1 -2
- package/dist/src/view/viewIdentityRegistry.d.ts +37 -0
- package/dist/src/view/viewIdentityRegistry.d.ts.map +1 -0
- package/dist/src/view/viewIdentityRegistry.js +71 -0
- package/dist/src/view/viewMutationAcidTestUtils.d.ts +112 -0
- package/dist/src/view/viewMutationAcidTestUtils.d.ts.map +1 -0
- package/dist/src/view/viewMutationAcidTestUtils.js +234 -0
- package/dist/src/view/viewMutationApi.d.ts +42 -0
- package/dist/src/view/viewMutationApi.d.ts.map +1 -0
- package/dist/src/view/viewMutationApi.js +811 -0
- package/dist/src/view/viewSelectors.d.ts +10 -0
- package/dist/src/view/viewSelectors.d.ts.map +1 -1
- package/dist/src/view/viewSelectors.js +23 -1
- package/package.json +4 -4
- package/dist/bundle/esm-0dYHNV_D.js +0 -121
- package/dist/bundle/esm-C49STiCR.js +0 -1248
- package/dist/bundle/esm-CscjKVDc.js +0 -1426
- package/dist/bundle/esm-CuMSzCHy.js +0 -298
- package/dist/bundle/esm-DMXpJXM4.js +0 -369
- package/dist/src/view/title.d.ts +0 -13
- package/dist/src/view/title.d.ts.map +0 -1
- package/dist/src/view/title.js +0 -154
- /package/dist/bundle/{AbortablePromiseCache-3gHJdF3E.js → AbortablePromiseCache-BTmAcN-t.js} +0 -0
- /package/dist/bundle/{esm-CuVa5T98.js → esm-VvpZ9hsq.js} +0 -0
- /package/dist/bundle/{chunk-DmhlhrBa.js → rolldown-runtime-Dy4uBu1J.js} +0 -0
|
@@ -1,17 +1,37 @@
|
|
|
1
|
-
import { t as e } from "./
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
2
|
//#region ../../node_modules/generic-filehandle2/esm/util.js
|
|
3
3
|
async function t(e) {
|
|
4
4
|
return e.bytes ? e.bytes() : new Uint8Array(await e.arrayBuffer());
|
|
5
5
|
}
|
|
6
|
+
var n = 50;
|
|
7
|
+
async function r(e, r) {
|
|
8
|
+
let i = e.headers.get("content-length"), a = i ? parseInt(i, 10) : void 0, o = e.body;
|
|
9
|
+
if (!o || a === void 0) {
|
|
10
|
+
let n = await t(e);
|
|
11
|
+
return r(n.byteLength, a ?? n.byteLength), n;
|
|
12
|
+
}
|
|
13
|
+
let s = o.getReader(), c = new Uint8Array(a), l = 0, u = 0;
|
|
14
|
+
r(0, a);
|
|
15
|
+
for (let e = await s.read(); !e.done; e = await s.read()) {
|
|
16
|
+
if (l + e.value.byteLength > c.length) {
|
|
17
|
+
let t = new Uint8Array(Math.max(l + e.value.byteLength, c.length * 2));
|
|
18
|
+
t.set(c.subarray(0, l)), c = t;
|
|
19
|
+
}
|
|
20
|
+
c.set(e.value, l), l += e.value.byteLength;
|
|
21
|
+
let t = Date.now();
|
|
22
|
+
t - u >= n && (u = t, r(l, a));
|
|
23
|
+
}
|
|
24
|
+
return r(l, a), l === c.length ? c : c.subarray(0, l);
|
|
25
|
+
}
|
|
6
26
|
//#endregion
|
|
7
27
|
//#region ../../node_modules/generic-filehandle2/esm/blobFile.js
|
|
8
|
-
var
|
|
28
|
+
var i = class {
|
|
9
29
|
blob;
|
|
10
30
|
constructor(e) {
|
|
11
31
|
this.blob = e;
|
|
12
32
|
}
|
|
13
33
|
async read(e, n = 0) {
|
|
14
|
-
return e === 0 ? new Uint8Array() : t(this.blob.slice(n, n + e));
|
|
34
|
+
return e === 0 ? /* @__PURE__ */ new Uint8Array() : t(this.blob.slice(n, n + e));
|
|
15
35
|
}
|
|
16
36
|
async readFile(e) {
|
|
17
37
|
let n = typeof e == "string" ? e : e?.encoding;
|
|
@@ -28,10 +48,10 @@ var n = class {
|
|
|
28
48
|
};
|
|
29
49
|
//#endregion
|
|
30
50
|
//#region ../../node_modules/generic-filehandle2/esm/remoteFile.js
|
|
31
|
-
function
|
|
51
|
+
function a(e) {
|
|
32
52
|
return (typeof e == "object" && e && "message" in e && typeof e.message == "string" ? e.message : `${e}`).replace(/\.$/, "");
|
|
33
53
|
}
|
|
34
|
-
var
|
|
54
|
+
var o = class {
|
|
35
55
|
url;
|
|
36
56
|
_stat;
|
|
37
57
|
fetchImplementation;
|
|
@@ -56,44 +76,44 @@ var i = class {
|
|
|
56
76
|
};
|
|
57
77
|
}
|
|
58
78
|
async fetch(e, t) {
|
|
59
|
-
let n = (t) => Error(`${
|
|
79
|
+
let n = (t) => Error(`${a(t)} fetching ${e}`, { cause: t }), r;
|
|
60
80
|
try {
|
|
61
|
-
|
|
62
|
-
} catch (
|
|
63
|
-
if (`${
|
|
81
|
+
r = await this.fetchImplementation(e, t);
|
|
82
|
+
} catch (i) {
|
|
83
|
+
if (`${i}`.includes("Failed to fetch")) {
|
|
64
84
|
console.warn(`generic-filehandle: refetching ${e} to attempt to work around chrome CORS header caching bug`);
|
|
65
85
|
try {
|
|
66
|
-
|
|
86
|
+
r = await this.fetchImplementation(e, {
|
|
67
87
|
...t,
|
|
68
88
|
cache: "reload"
|
|
69
89
|
});
|
|
70
90
|
} catch (e) {
|
|
71
91
|
throw n(e);
|
|
72
92
|
}
|
|
73
|
-
} else throw n(
|
|
93
|
+
} else throw n(i);
|
|
74
94
|
}
|
|
75
|
-
return
|
|
95
|
+
return r;
|
|
76
96
|
}
|
|
77
|
-
async read(e, n,
|
|
78
|
-
if (e === 0) return new Uint8Array();
|
|
97
|
+
async read(e, n, i = {}) {
|
|
98
|
+
if (e === 0) return /* @__PURE__ */ new Uint8Array();
|
|
79
99
|
if (Number.isNaN(e) || Number.isNaN(n)) throw TypeError(`read() called with NaN length or position (length=${e}, position=${n}). The index file may be corrupt.`);
|
|
80
|
-
let
|
|
81
|
-
if (
|
|
82
|
-
if (!
|
|
83
|
-
if (
|
|
84
|
-
let n =
|
|
85
|
-
|
|
86
|
-
let
|
|
87
|
-
return !this._stat &&
|
|
100
|
+
let a = await this.fetch(this.url, this.buildRequest(i, { range: `bytes=${n}-${n + e - 1}` }));
|
|
101
|
+
if (a.status === 416) return /* @__PURE__ */ new Uint8Array();
|
|
102
|
+
if (!a.ok) throw Error(`HTTP ${a.status} fetching ${this.url}`);
|
|
103
|
+
if (a.status === 200 && n === 0 || a.status === 206) {
|
|
104
|
+
let n = a.headers.get("content-range"), o = /\/(\d+)$/.exec(n ?? "");
|
|
105
|
+
o?.[1] && (this._stat = { size: parseInt(o[1], 10) });
|
|
106
|
+
let s = i.onProgress ? await r(a, i.onProgress) : await t(a);
|
|
107
|
+
return !this._stat && a.status === 200 && (this._stat = { size: s.byteLength }), s.byteLength <= e ? s : s.subarray(0, e);
|
|
88
108
|
}
|
|
89
|
-
throw Error(
|
|
109
|
+
throw Error(a.status === 200 ? `${this.url} fetch returned status 200, expected 206` : `HTTP ${a.status} fetching ${this.url}`);
|
|
90
110
|
}
|
|
91
111
|
async readFile(e = {}) {
|
|
92
|
-
let n = typeof e == "string" ? e : e.encoding,
|
|
93
|
-
if (!
|
|
94
|
-
if (n === "utf8") return
|
|
112
|
+
let n = typeof e == "string" ? e : e.encoding, i = typeof e == "string" ? {} : e, a = await this.fetch(this.url, this.buildRequest(i));
|
|
113
|
+
if (!a.ok) throw Error(`HTTP ${a.status} fetching ${this.url}`);
|
|
114
|
+
if (n === "utf8") return a.text();
|
|
95
115
|
if (n) throw Error(`unsupported encoding: ${n}`);
|
|
96
|
-
return
|
|
116
|
+
return i.onProgress ? r(a, i.onProgress) : t(a);
|
|
97
117
|
}
|
|
98
118
|
async stat() {
|
|
99
119
|
return this._stat || await this.read(10, 0), this._stat ?? { size: 0 };
|
|
@@ -101,11 +121,11 @@ var i = class {
|
|
|
101
121
|
close() {
|
|
102
122
|
return Promise.resolve();
|
|
103
123
|
}
|
|
104
|
-
},
|
|
105
|
-
BlobFile: () =>
|
|
106
|
-
LocalFile: () =>
|
|
107
|
-
RemoteFile: () =>
|
|
108
|
-
}),
|
|
124
|
+
}, s = /* @__PURE__ */ e({
|
|
125
|
+
BlobFile: () => i,
|
|
126
|
+
LocalFile: () => c,
|
|
127
|
+
RemoteFile: () => o
|
|
128
|
+
}), c = class {
|
|
109
129
|
readFile() {
|
|
110
130
|
return Promise.reject(/* @__PURE__ */ Error("unimplemented"));
|
|
111
131
|
}
|
|
@@ -120,4 +140,4 @@ var i = class {
|
|
|
120
140
|
}
|
|
121
141
|
};
|
|
122
142
|
//#endregion
|
|
123
|
-
export {
|
|
143
|
+
export { s as n, o as r, c as t };
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
//#region ../../node_modules/gff-nostream/esm/util.js
|
|
2
|
+
var e = {};
|
|
3
|
+
for (let t = 0; t < 256; t++) {
|
|
4
|
+
let n = t.toString(16).toUpperCase().padStart(2, "0");
|
|
5
|
+
e[n] = String.fromCharCode(t), e[n.toLowerCase()] = String.fromCharCode(t);
|
|
6
|
+
}
|
|
7
|
+
function t(t) {
|
|
8
|
+
let n = t.indexOf("%");
|
|
9
|
+
if (n === -1) return t;
|
|
10
|
+
let r = "", i = 0, a = n;
|
|
11
|
+
for (; a < t.length;) if (t[a] === "%" && a + 2 < t.length) {
|
|
12
|
+
r += t.slice(i, a);
|
|
13
|
+
let n = e[t.slice(a + 1, a + 3)];
|
|
14
|
+
n === void 0 ? r += t.slice(a, a + 3) : r += n, a += 3, i = a;
|
|
15
|
+
} else a++;
|
|
16
|
+
return r + t.slice(i);
|
|
17
|
+
}
|
|
18
|
+
function n(e, n) {
|
|
19
|
+
if (e.length === 0 || e === ".") return {};
|
|
20
|
+
let r = {}, i = e.length;
|
|
21
|
+
e[i - 1] === "\n" && (i = e[i - 2] === "\r" ? i - 2 : i - 1, e = e.slice(0, i));
|
|
22
|
+
let a = 0;
|
|
23
|
+
for (; a < i;) {
|
|
24
|
+
let o = e.indexOf(";", a);
|
|
25
|
+
if (o === -1 && (o = i), o > a) {
|
|
26
|
+
let i = e.indexOf("=", a);
|
|
27
|
+
if (i !== -1 && i < o && i + 1 < o) {
|
|
28
|
+
let s = e.slice(a, i), c = r[s];
|
|
29
|
+
c || (c = [], r[s] = c);
|
|
30
|
+
let l = i + 1;
|
|
31
|
+
for (; l < o;) {
|
|
32
|
+
let r = e.indexOf(",", l);
|
|
33
|
+
if ((r === -1 || r > o) && (r = o), r > l) {
|
|
34
|
+
let i = e.slice(l, r);
|
|
35
|
+
c.push(n ? t(i) : i);
|
|
36
|
+
}
|
|
37
|
+
l = r + 1;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
a = o + 1;
|
|
42
|
+
}
|
|
43
|
+
return r;
|
|
44
|
+
}
|
|
45
|
+
function r(e) {
|
|
46
|
+
return e.length === 0 || e === ".";
|
|
47
|
+
}
|
|
48
|
+
function i(e, n, i) {
|
|
49
|
+
return r(e) ? i : n ? t(e) : e;
|
|
50
|
+
}
|
|
51
|
+
function a(e) {
|
|
52
|
+
return r(e) ? null : +e;
|
|
53
|
+
}
|
|
54
|
+
function o(e, t) {
|
|
55
|
+
let o = e.split(" "), s = o[8];
|
|
56
|
+
return {
|
|
57
|
+
seq_id: i(o[0], t, null),
|
|
58
|
+
source: i(o[1], t, null),
|
|
59
|
+
type: i(o[2], t, null),
|
|
60
|
+
start: a(o[3]),
|
|
61
|
+
end: a(o[4]),
|
|
62
|
+
score: a(o[5]),
|
|
63
|
+
strand: i(o[6], !1, null),
|
|
64
|
+
phase: i(o[7], !1, null),
|
|
65
|
+
attributes: r(s) ? null : n(s, t)
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function s(e) {
|
|
69
|
+
return o(e, !0);
|
|
70
|
+
}
|
|
71
|
+
function c(e) {
|
|
72
|
+
return o(e, !1);
|
|
73
|
+
}
|
|
74
|
+
var l = /* @__PURE__ */ new Set([
|
|
75
|
+
"start",
|
|
76
|
+
"end",
|
|
77
|
+
"seq_id",
|
|
78
|
+
"score",
|
|
79
|
+
"type",
|
|
80
|
+
"source",
|
|
81
|
+
"phase",
|
|
82
|
+
"strand"
|
|
83
|
+
]), u = {
|
|
84
|
+
ID: "id",
|
|
85
|
+
Name: "name",
|
|
86
|
+
Parent: "parent",
|
|
87
|
+
Note: "note",
|
|
88
|
+
Dbxref: "dbxref",
|
|
89
|
+
Ontology_term: "ontology_term",
|
|
90
|
+
Is_circular: "is_circular",
|
|
91
|
+
Alias: "alias",
|
|
92
|
+
Target: "target",
|
|
93
|
+
Gap: "gap",
|
|
94
|
+
Derives_from: "derives_from",
|
|
95
|
+
id: "id",
|
|
96
|
+
name: "name",
|
|
97
|
+
parent: "parent",
|
|
98
|
+
note: "note",
|
|
99
|
+
dbxref: "dbxref",
|
|
100
|
+
alias: "alias",
|
|
101
|
+
target: "target",
|
|
102
|
+
gap: "gap"
|
|
103
|
+
};
|
|
104
|
+
function d(e, n, r) {
|
|
105
|
+
if (e.length === 0 || e === ".") return;
|
|
106
|
+
let i = e.length;
|
|
107
|
+
e[i - 1] === "\n" && (i = e[i - 2] === "\r" ? i - 2 : i - 1, e = e.slice(0, i));
|
|
108
|
+
let a = 0;
|
|
109
|
+
for (; a < i;) {
|
|
110
|
+
let o = e.indexOf(";", a);
|
|
111
|
+
if (o === -1 && (o = i), o > a) {
|
|
112
|
+
let i = e.indexOf("=", a);
|
|
113
|
+
if (i !== -1 && i < o && i + 1 < o) {
|
|
114
|
+
let s = e.slice(a, i), c = u[s];
|
|
115
|
+
c === void 0 && (c = s.toLowerCase(), l.has(c) && (c += "2"));
|
|
116
|
+
let d = [], f = i + 1;
|
|
117
|
+
for (; f < o;) {
|
|
118
|
+
let n = e.indexOf(",", f);
|
|
119
|
+
if ((n === -1 || n > o) && (n = o), n > f) {
|
|
120
|
+
let i = e.slice(f, n);
|
|
121
|
+
d.push(r ? t(i) : i);
|
|
122
|
+
}
|
|
123
|
+
f = n + 1;
|
|
124
|
+
}
|
|
125
|
+
n[c] = d.length === 1 ? d[0] : d;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
a = o + 1;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
var f = {
|
|
132
|
+
"+": 1,
|
|
133
|
+
"-": -1,
|
|
134
|
+
".": 0
|
|
135
|
+
};
|
|
136
|
+
function p(e, t) {
|
|
137
|
+
let n = e.split(" "), a = n[3], o = n[4], s = n[5], c = n[7], l = n[8], u = {
|
|
138
|
+
refName: i(n[0], t, ""),
|
|
139
|
+
source: i(n[1], t, null),
|
|
140
|
+
type: i(n[2], t, null),
|
|
141
|
+
start: r(a) ? 0 : a - 1,
|
|
142
|
+
end: r(o) ? 0 : +o,
|
|
143
|
+
score: r(s) ? void 0 : +s,
|
|
144
|
+
strand: f[n[6]],
|
|
145
|
+
phase: r(c) ? void 0 : +c,
|
|
146
|
+
subfeatures: []
|
|
147
|
+
};
|
|
148
|
+
return d(l, u, t), u;
|
|
149
|
+
}
|
|
150
|
+
function m(e) {
|
|
151
|
+
return p(e, !0);
|
|
152
|
+
}
|
|
153
|
+
function h(e) {
|
|
154
|
+
return p(e, !1);
|
|
155
|
+
}
|
|
156
|
+
//#endregion
|
|
157
|
+
//#region ../../node_modules/gff-nostream/esm/api.js
|
|
158
|
+
function g(e) {
|
|
159
|
+
let t = e.indexOf(" "), n = e.indexOf(" ", t + 1), r = e.indexOf(" ", n + 1);
|
|
160
|
+
return e.slice(n + 1, r);
|
|
161
|
+
}
|
|
162
|
+
function _(e, t, n) {
|
|
163
|
+
let r = e.get(t);
|
|
164
|
+
r ? r.push(n) : e.set(t, [n]);
|
|
165
|
+
}
|
|
166
|
+
function v(e) {
|
|
167
|
+
let t = Array.isArray(e) ? e[0] : e;
|
|
168
|
+
return typeof t == "string" ? t : void 0;
|
|
169
|
+
}
|
|
170
|
+
function y(e) {
|
|
171
|
+
return Array.isArray(e) ? e.filter((e) => typeof e == "string") : typeof e == "string" ? [e] : [];
|
|
172
|
+
}
|
|
173
|
+
function b(e) {
|
|
174
|
+
return C(S(e));
|
|
175
|
+
}
|
|
176
|
+
function x(e) {
|
|
177
|
+
return w(S(e));
|
|
178
|
+
}
|
|
179
|
+
function S(e) {
|
|
180
|
+
let t = e.split(/\r?\n/), n = [];
|
|
181
|
+
for (let e of t) {
|
|
182
|
+
if (e.startsWith("##FASTA") || e.startsWith(">")) break;
|
|
183
|
+
e.length === 0 || e.startsWith("#") || n.push({
|
|
184
|
+
line: e,
|
|
185
|
+
hasEscapes: e.includes("%")
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
return n;
|
|
189
|
+
}
|
|
190
|
+
function C(e) {
|
|
191
|
+
let t = [], n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
192
|
+
for (let i of e) {
|
|
193
|
+
let e = {
|
|
194
|
+
...i.hasEscapes ? s(i.line) : c(i.line),
|
|
195
|
+
child_features: [],
|
|
196
|
+
derived_features: []
|
|
197
|
+
};
|
|
198
|
+
i.lineHash !== void 0 && (e.attributes ??= {}, e.attributes._lineHash = [String(i.lineHash)]);
|
|
199
|
+
let a = e.attributes, o = a?.ID, l = a?.Parent;
|
|
200
|
+
if (!o && !l) t.push([e]);
|
|
201
|
+
else {
|
|
202
|
+
let i;
|
|
203
|
+
if (o) {
|
|
204
|
+
let a = o[0], s = n.get(a);
|
|
205
|
+
if (s) e.child_features = s[0].child_features, e.derived_features = s[0].derived_features, s.push(e), i = s;
|
|
206
|
+
else {
|
|
207
|
+
i = [e], l || t.push(i), n.set(a, i);
|
|
208
|
+
let o = r.get(a);
|
|
209
|
+
if (o) {
|
|
210
|
+
for (let t of o) e.child_features.push(t);
|
|
211
|
+
r.delete(a);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
} else i = [e];
|
|
215
|
+
if (l) for (let e of l) {
|
|
216
|
+
let t = n.get(e);
|
|
217
|
+
t ? t[0].child_features.push(i) : _(r, e, i);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
return t;
|
|
222
|
+
}
|
|
223
|
+
function w(e) {
|
|
224
|
+
let t = [], n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
225
|
+
for (let i of e) {
|
|
226
|
+
let e = i.hasEscapes ? m(i.line) : h(i.line);
|
|
227
|
+
i.lineHash !== void 0 && (e._lineHash = String(i.lineHash));
|
|
228
|
+
let a = v(e.id), o = y(e.parent);
|
|
229
|
+
if (!a && o.length === 0) t.push(e);
|
|
230
|
+
else {
|
|
231
|
+
if (o.length === 0 && t.push(e), a && !n.has(a)) {
|
|
232
|
+
n.set(a, e);
|
|
233
|
+
let t = r.get(a);
|
|
234
|
+
if (t) {
|
|
235
|
+
for (let n of t) e.subfeatures.push(n);
|
|
236
|
+
r.delete(a);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
for (let t of o) {
|
|
240
|
+
let i = n.get(t);
|
|
241
|
+
i ? i.subfeatures.push(e) : _(r, t, e);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
return t;
|
|
246
|
+
}
|
|
247
|
+
//#endregion
|
|
248
|
+
export { g as extractType, C as parseRecords, w as parseRecordsJBrowse, b as parseStringSync, x as parseStringSyncJBrowse };
|