@genome-spy/core 0.66.1 → 0.68.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 +7669 -6115
- package/dist/bundle/index.js +114 -133
- package/dist/schema.json +534 -132
- package/dist/src/data/collector.d.ts +20 -0
- package/dist/src/data/collector.d.ts.map +1 -1
- package/dist/src/data/collector.js +148 -0
- package/dist/src/data/dataFlow.d.ts +6 -0
- package/dist/src/data/dataFlow.d.ts.map +1 -1
- package/dist/src/data/dataFlow.js +10 -0
- package/dist/src/data/flowHandle.d.ts +2 -0
- package/dist/src/data/flowHandle.d.ts.map +1 -1
- package/dist/src/data/flowHandle.js +1 -0
- package/dist/src/data/flowInit.d.ts +12 -4
- package/dist/src/data/flowInit.d.ts.map +1 -1
- package/dist/src/data/flowInit.js +115 -17
- package/dist/src/data/flowNode.d.ts +8 -0
- package/dist/src/data/flowNode.d.ts.map +1 -1
- package/dist/src/data/flowNode.js +18 -0
- package/dist/src/data/keyIndex.d.ts +18 -0
- package/dist/src/data/keyIndex.d.ts.map +1 -0
- package/dist/src/data/keyIndex.js +241 -0
- package/dist/src/data/keyIndex.test.d.ts +2 -0
- package/dist/src/data/keyIndex.test.d.ts.map +1 -0
- package/dist/src/data/sources/dataSource.d.ts.map +1 -1
- package/dist/src/data/sources/dataSource.js +5 -1
- package/dist/src/data/sources/dataSourceFactory.d.ts +14 -12
- package/dist/src/data/sources/dataSourceFactory.d.ts.map +1 -1
- package/dist/src/data/sources/dataSourceFactory.js +52 -16
- package/dist/src/data/sources/lazy/mockLazySource.d.ts +29 -0
- package/dist/src/data/sources/lazy/mockLazySource.d.ts.map +1 -0
- package/dist/src/data/sources/lazy/mockLazySource.js +44 -0
- package/dist/src/data/sources/lazy/singleAxisLazySource.d.ts +22 -1
- package/dist/src/data/sources/lazy/singleAxisLazySource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/singleAxisLazySource.js +34 -2
- package/dist/src/data/sources/lazy/singleAxisWindowedSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/singleAxisWindowedSource.js +15 -0
- package/dist/src/data/sources/lazy/tabixSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/tabixSource.js +15 -5
- package/dist/src/data/transforms/stack.d.ts.map +1 -1
- package/dist/src/data/transforms/stack.js +1 -0
- package/dist/src/encoder/accessor.d.ts +43 -0
- package/dist/src/encoder/accessor.d.ts.map +1 -1
- package/dist/src/encoder/accessor.js +164 -0
- package/dist/src/encoder/encoder.d.ts +11 -2
- package/dist/src/encoder/encoder.d.ts.map +1 -1
- package/dist/src/encoder/encoder.js +24 -4
- package/dist/src/encoder/metadataChannels.d.ts +15 -0
- package/dist/src/encoder/metadataChannels.d.ts.map +1 -0
- package/dist/src/encoder/metadataChannels.js +65 -0
- package/dist/src/encoder/metadataChannels.test.d.ts +2 -0
- package/dist/src/encoder/metadataChannels.test.d.ts.map +1 -0
- package/dist/src/genome/scaleLocus.d.ts.map +1 -1
- package/dist/src/genome/scaleLocus.js +14 -1
- package/dist/src/genomeSpy/containerUi.d.ts +0 -1
- package/dist/src/genomeSpy/containerUi.d.ts.map +1 -1
- package/dist/src/genomeSpy/containerUi.js +0 -14
- package/dist/src/genomeSpy/loadingIndicatorManager.d.ts +3 -7
- package/dist/src/genomeSpy/loadingIndicatorManager.d.ts.map +1 -1
- package/dist/src/genomeSpy/loadingIndicatorManager.js +68 -20
- package/dist/src/genomeSpy/loadingStatusRegistry.d.ts +52 -0
- package/dist/src/genomeSpy/loadingStatusRegistry.d.ts.map +1 -0
- package/dist/src/genomeSpy/loadingStatusRegistry.js +86 -0
- package/dist/src/genomeSpy/viewContextFactory.d.ts.map +1 -1
- package/dist/src/genomeSpy/viewContextFactory.js +0 -1
- package/dist/src/genomeSpy/viewDataInit.d.ts +10 -0
- package/dist/src/genomeSpy/viewDataInit.d.ts.map +1 -1
- package/dist/src/genomeSpy/viewDataInit.js +166 -2
- package/dist/src/genomeSpy/viewDataInit.test.d.ts +2 -0
- package/dist/src/genomeSpy/viewDataInit.test.d.ts.map +1 -0
- package/dist/src/genomeSpy.d.ts +1 -2
- package/dist/src/genomeSpy.d.ts.map +1 -1
- package/dist/src/genomeSpy.js +69 -27
- package/dist/src/gl/dataToVertices.d.ts.map +1 -1
- package/dist/src/gl/dataToVertices.js +16 -4
- package/dist/src/marks/mark.d.ts.map +1 -1
- package/dist/src/marks/mark.js +18 -11
- package/dist/src/marks/markUtils.js +1 -1
- package/dist/src/scale/scale.d.ts +6 -1
- package/dist/src/scale/scale.d.ts.map +1 -1
- package/dist/src/scale/scale.js +83 -23
- package/dist/src/scales/axisResolution.d.ts.map +1 -1
- package/dist/src/scales/axisResolution.js +10 -0
- package/dist/src/scales/{scaleDomainAggregator.d.ts → domainPlanner.d.ts} +8 -5
- package/dist/src/scales/domainPlanner.d.ts.map +1 -0
- package/dist/src/scales/domainPlanner.js +285 -0
- package/dist/src/scales/domainPlanner.test.d.ts +2 -0
- package/dist/src/scales/domainPlanner.test.d.ts.map +1 -0
- package/dist/src/scales/scaleInstanceManager.d.ts.map +1 -1
- package/dist/src/scales/scaleInstanceManager.js +8 -4
- package/dist/src/scales/scaleInteractionController.d.ts +6 -0
- package/dist/src/scales/scaleInteractionController.d.ts.map +1 -1
- package/dist/src/scales/scaleInteractionController.js +41 -3
- package/dist/src/scales/scaleResolution.d.ts +19 -16
- package/dist/src/scales/scaleResolution.d.ts.map +1 -1
- package/dist/src/scales/scaleResolution.js +255 -70
- package/dist/src/scales/scaleResolution.test.d.ts.map +1 -1
- package/dist/src/selection/selection.d.ts +21 -0
- package/dist/src/selection/selection.d.ts.map +1 -1
- package/dist/src/selection/selection.js +82 -0
- package/dist/src/spec/channel.d.ts +52 -15
- package/dist/src/spec/data.d.ts +4 -0
- package/dist/src/spec/parameter.d.ts +16 -11
- package/dist/src/spec/testing.d.ts +12 -0
- package/dist/src/spec/testing.d.ts.map +1 -0
- package/dist/src/spec/testing.js +20 -0
- package/dist/src/spec/view.d.ts +45 -10
- package/dist/src/styles/genome-spy.css +3 -31
- 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 +0 -29
- package/dist/src/types/encoder.d.ts +37 -2
- package/dist/src/types/rendering.d.ts +4 -3
- package/dist/src/types/viewContext.d.ts +0 -14
- package/dist/src/utils/domainArray.d.ts.map +1 -1
- package/dist/src/utils/domainArray.js +3 -0
- package/dist/src/utils/indexer.d.ts +3 -0
- package/dist/src/utils/indexer.d.ts.map +1 -1
- package/dist/src/utils/indexer.js +3 -0
- package/dist/src/utils/throttle.d.ts +4 -1
- package/dist/src/utils/throttle.d.ts.map +1 -1
- package/dist/src/utils/throttle.js +54 -23
- package/dist/src/utils/throttle.test.d.ts +2 -0
- package/dist/src/utils/throttle.test.d.ts.map +1 -0
- package/dist/src/utils/transition.d.ts +21 -0
- package/dist/src/utils/transition.d.ts.map +1 -1
- package/dist/src/utils/transition.js +28 -0
- package/dist/src/utils/ui/tooltip.d.ts.map +1 -1
- package/dist/src/utils/ui/tooltip.js +7 -1
- package/dist/src/utils/ui/tooltip.test.d.ts +2 -0
- package/dist/src/utils/ui/tooltip.test.d.ts.map +1 -0
- package/dist/src/view/axisGridView.d.ts.map +1 -1
- package/dist/src/view/axisGridView.js +22 -5
- package/dist/src/view/axisView.d.ts.map +1 -1
- package/dist/src/view/axisView.js +20 -5
- package/dist/src/view/concatView.js +3 -3
- package/dist/src/view/containerMutationHelper.d.ts.map +1 -1
- package/dist/src/view/containerMutationHelper.js +6 -2
- package/dist/src/view/containerView.d.ts +9 -5
- package/dist/src/view/containerView.d.ts.map +1 -1
- package/dist/src/view/containerView.js +34 -9
- package/dist/src/view/dataReadiness.d.ts +46 -0
- package/dist/src/view/dataReadiness.d.ts.map +1 -0
- package/dist/src/view/dataReadiness.js +267 -0
- package/dist/src/view/dataReadiness.test.d.ts +2 -0
- package/dist/src/view/dataReadiness.test.d.ts.map +1 -0
- package/dist/src/view/facetView.d.ts.map +1 -1
- package/dist/src/view/facetView.js +7 -5
- package/dist/src/view/flowBuilder.d.ts +5 -3
- package/dist/src/view/flowBuilder.d.ts.map +1 -1
- package/dist/src/view/flowBuilder.js +74 -7
- package/dist/src/view/gridView/gridChild.d.ts.map +1 -1
- package/dist/src/view/gridView/gridChild.js +8 -0
- package/dist/src/view/gridView/gridView.d.ts.map +1 -1
- package/dist/src/view/gridView/gridView.js +119 -2
- package/dist/src/view/gridView/scrollbar.d.ts.map +1 -1
- package/dist/src/view/gridView/scrollbar.js +3 -0
- package/dist/src/view/gridView/selectionRect.d.ts.map +1 -1
- package/dist/src/view/gridView/selectionRect.js +20 -5
- package/dist/src/view/gridView/separatorView.d.ts +51 -0
- package/dist/src/view/gridView/separatorView.d.ts.map +1 -0
- package/dist/src/view/gridView/separatorView.js +275 -0
- package/dist/src/view/layerView.js +3 -3
- package/dist/src/view/layout/flexLayout.d.ts +0 -30
- package/dist/src/view/layout/flexLayout.d.ts.map +1 -1
- package/dist/src/view/layout/flexLayout.js +0 -86
- package/dist/src/view/paramMediator.d.ts +19 -0
- package/dist/src/view/paramMediator.d.ts.map +1 -1
- package/dist/src/view/paramMediator.js +86 -19
- package/dist/src/view/testUtils.d.ts.map +1 -1
- package/dist/src/view/testUtils.js +11 -1
- package/dist/src/view/unitView.d.ts +8 -13
- package/dist/src/view/unitView.d.ts.map +1 -1
- package/dist/src/view/unitView.js +127 -43
- package/dist/src/view/view.d.ts +34 -14
- package/dist/src/view/view.d.ts.map +1 -1
- package/dist/src/view/view.js +119 -9
- package/dist/src/view/viewFactory.d.ts.map +1 -1
- package/dist/src/view/viewFactory.js +20 -1
- package/dist/src/view/viewSelectors.d.ts +148 -0
- package/dist/src/view/viewSelectors.d.ts.map +1 -0
- package/dist/src/view/viewSelectors.js +773 -0
- package/dist/src/view/viewSelectors.test.d.ts +2 -0
- package/dist/src/view/viewSelectors.test.d.ts.map +1 -0
- package/dist/src/view/viewUtils.d.ts +0 -8
- package/dist/src/view/viewUtils.d.ts.map +1 -1
- package/dist/src/view/viewUtils.js +1 -21
- package/package.json +3 -3
- package/dist/src/scales/scaleDomainAggregator.d.ts.map +0 -1
- package/dist/src/scales/scaleDomainAggregator.js +0 -162
- package/dist/src/scales/scaleDomainAggregator.test.d.ts +0 -2
- package/dist/src/scales/scaleDomainAggregator.test.d.ts.map +0 -1
|
@@ -46,6 +46,7 @@ export type ChannelWithoutScale =
|
|
|
46
46
|
| "uniqueId"
|
|
47
47
|
| "search"
|
|
48
48
|
| "text"
|
|
49
|
+
| "key"
|
|
49
50
|
| "facetIndex"
|
|
50
51
|
| "semanticScore"
|
|
51
52
|
| "uniqueId"
|
|
@@ -121,9 +122,13 @@ export type TypedFieldDef<T extends Type = Type> = FieldDefBase &
|
|
|
121
122
|
TitleMixins &
|
|
122
123
|
TypeMixins<T>;
|
|
123
124
|
|
|
124
|
-
export type ScaleFieldDef<T extends Type> = TypedFieldDef<T> &
|
|
125
|
+
export type ScaleFieldDef<T extends Type> = TypedFieldDef<T> &
|
|
126
|
+
ScaleMixins &
|
|
127
|
+
DomainContributionMixins;
|
|
125
128
|
|
|
126
129
|
export type FieldDefWithoutScale = FieldDefBase & TitleMixins;
|
|
130
|
+
export type KeyDef = FieldDefWithoutScale | FieldDefWithoutScale[];
|
|
131
|
+
export type SearchDef = FieldDefWithoutScale | FieldDefWithoutScale[];
|
|
127
132
|
|
|
128
133
|
export interface ScaleMixins {
|
|
129
134
|
/**
|
|
@@ -145,15 +150,18 @@ export interface ScaleMixins {
|
|
|
145
150
|
* @internal
|
|
146
151
|
*/
|
|
147
152
|
resolutionChannel?: ChannelWithScale;
|
|
153
|
+
}
|
|
148
154
|
|
|
155
|
+
export interface DomainContributionMixins {
|
|
149
156
|
/**
|
|
150
|
-
* Whether the field or evaluated expr should be
|
|
157
|
+
* Whether the field or evaluated expr should be excluded from the scale's domain.
|
|
158
|
+
* Prefer the view-level `domainInert` when an entire subtree should be excluded.
|
|
151
159
|
*
|
|
152
|
-
* **Default value:** `
|
|
160
|
+
* **Default value:** `false`
|
|
153
161
|
*
|
|
154
162
|
* @internal
|
|
155
163
|
*/
|
|
156
|
-
|
|
164
|
+
domainInert?: boolean;
|
|
157
165
|
}
|
|
158
166
|
|
|
159
167
|
export interface ValueDefBase<V extends Value = Scalar> {
|
|
@@ -190,6 +198,7 @@ export type MarkPropFieldDef<T extends Type = Type> = ScaleFieldDef<T> &
|
|
|
190
198
|
export type MarkPropExprDef<T extends Type = Type> = ExprDef &
|
|
191
199
|
TypeMixins<T> &
|
|
192
200
|
ScaleMixins &
|
|
201
|
+
DomainContributionMixins &
|
|
193
202
|
TitleMixins;
|
|
194
203
|
|
|
195
204
|
export type MarkPropDatumDef<T extends Type> = LegendMixins &
|
|
@@ -279,16 +288,18 @@ export type MarkPropFieldOrDatumOrExprDef<T extends Type = Type> =
|
|
|
279
288
|
|
|
280
289
|
export type MarkPropDef<V extends Value, T extends Type = Type> =
|
|
281
290
|
| FieldOrDatumDefWithCondition<MarkPropFieldDef<T>, V>
|
|
282
|
-
| FieldOrDatumDefWithCondition<
|
|
291
|
+
| FieldOrDatumDefWithCondition<ScaleDatumDef, V>
|
|
283
292
|
| ValueDefWithCondition<V>;
|
|
284
293
|
|
|
285
294
|
export type ColorDef = MarkPropDef<string | null>;
|
|
286
295
|
|
|
287
|
-
export type SecondaryFieldDef = FieldDefBase &
|
|
296
|
+
export type SecondaryFieldDef = FieldDefBase &
|
|
297
|
+
TitleMixins &
|
|
298
|
+
DomainContributionMixins;
|
|
288
299
|
|
|
289
300
|
export type NumericValueDef = ValueDef<number>;
|
|
290
301
|
|
|
291
|
-
export type ScaleDatumDef = ScaleMixins & DatumDef;
|
|
302
|
+
export type ScaleDatumDef = ScaleMixins & DatumDef & DomainContributionMixins;
|
|
292
303
|
|
|
293
304
|
export type PositionDatumDefBase = ScaleDatumDef & TypeMixins<Type>;
|
|
294
305
|
|
|
@@ -299,7 +310,8 @@ export type PositionDatumDef = PositionDatumDefBase & PositionMixins;
|
|
|
299
310
|
export type PositionExprDef = ExprDef &
|
|
300
311
|
PositionMixins &
|
|
301
312
|
BandMixins &
|
|
302
|
-
TypeMixins<Type
|
|
313
|
+
TypeMixins<Type> &
|
|
314
|
+
DomainContributionMixins;
|
|
303
315
|
|
|
304
316
|
export type PositionValueDef = NumericValueDef;
|
|
305
317
|
|
|
@@ -344,7 +356,8 @@ export interface ChromPosDefBase extends BandMixins {
|
|
|
344
356
|
|
|
345
357
|
export type SecondaryChromPosDef = ChromPosDefBase &
|
|
346
358
|
TitleMixins &
|
|
347
|
-
PositionMixins
|
|
359
|
+
PositionMixins &
|
|
360
|
+
DomainContributionMixins;
|
|
348
361
|
|
|
349
362
|
export type ChromPosDef = SecondaryChromPosDef &
|
|
350
363
|
TypeMixins<"locus"> &
|
|
@@ -360,8 +373,8 @@ export type PositionDef =
|
|
|
360
373
|
export type Position2Def =
|
|
361
374
|
| (SecondaryFieldDef & BandMixins)
|
|
362
375
|
| SecondaryChromPosDef
|
|
363
|
-
| (
|
|
364
|
-
| (ExprDef & BandMixins)
|
|
376
|
+
| (ScaleDatumDef & BandMixins)
|
|
377
|
+
| (ExprDef & BandMixins & DomainContributionMixins)
|
|
365
378
|
| PositionValueDef;
|
|
366
379
|
|
|
367
380
|
export type NumericMarkPropDef = MarkPropDef<number>;
|
|
@@ -372,10 +385,15 @@ export interface StringFieldDef extends FieldDefWithoutScale, FormatMixins {}
|
|
|
372
385
|
|
|
373
386
|
export type TextDef = StringFieldDef | StringDatumDef | ExprDef; // TODO: Conditions
|
|
374
387
|
|
|
375
|
-
export type ChannelDef =
|
|
388
|
+
export type ChannelDef = Exclude<
|
|
389
|
+
Encoding[keyof Encoding],
|
|
390
|
+
FieldDefWithoutScale[]
|
|
391
|
+
>;
|
|
376
392
|
|
|
377
393
|
// TODO: Does this make sense?
|
|
378
|
-
export type ChannelDefWithScale = ScaleMixins &
|
|
394
|
+
export type ChannelDefWithScale = ScaleMixins &
|
|
395
|
+
TypeMixins<Type> &
|
|
396
|
+
DomainContributionMixins;
|
|
379
397
|
|
|
380
398
|
export interface XIndexDef {
|
|
381
399
|
/**
|
|
@@ -497,14 +515,33 @@ export interface Encoding {
|
|
|
497
515
|
*/
|
|
498
516
|
sample?: FieldDefWithoutScale;
|
|
499
517
|
|
|
518
|
+
/**
|
|
519
|
+
* One or more data fields that uniquely identify data objects for stable
|
|
520
|
+
* point selections and bookmarking across sessions. Unlike `uniqueId` (an
|
|
521
|
+
* implicit surrogate key), key fields must be stable in the source data.
|
|
522
|
+
*
|
|
523
|
+
* Use a single field definition for simple keys, or an array of field
|
|
524
|
+
* definitions for composite keys. For composite keys, field order is
|
|
525
|
+
* significant.
|
|
526
|
+
*/
|
|
527
|
+
key?: KeyDef;
|
|
528
|
+
|
|
500
529
|
/**
|
|
501
530
|
* For internal use
|
|
531
|
+
* @internal
|
|
502
532
|
*/
|
|
503
533
|
// TODO: proper type
|
|
504
534
|
uniqueId?: FieldDefWithoutScale;
|
|
505
535
|
|
|
506
|
-
|
|
507
|
-
|
|
536
|
+
/**
|
|
537
|
+
* One or more fields used by the App's location/search input to match
|
|
538
|
+
* data objects in this view.
|
|
539
|
+
*
|
|
540
|
+
* Use a single field definition for simple search, or an array for
|
|
541
|
+
* matching against multiple fields. A datum matches when any configured
|
|
542
|
+
* search field matches the entered term.
|
|
543
|
+
*/
|
|
544
|
+
search?: SearchDef;
|
|
508
545
|
|
|
509
546
|
/**
|
|
510
547
|
* For internal use
|
package/dist/src/spec/data.d.ts
CHANGED
|
@@ -20,9 +20,22 @@ export interface ParameterBase {
|
|
|
20
20
|
push?: "outer";
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
export interface PersistedParameter {
|
|
24
|
+
/**
|
|
25
|
+
* Whether the parameter should be persisted in bookmarks and provenance.
|
|
26
|
+
*
|
|
27
|
+
* This primarily affects GenomeSpy App behavior.
|
|
28
|
+
* Set to `false` for ephemeral params (e.g., hover selections) or when the
|
|
29
|
+
* selection cannot be persisted due to missing `encoding.key`.
|
|
30
|
+
*
|
|
31
|
+
* __Default value:__ `true`
|
|
32
|
+
*/
|
|
33
|
+
persist?: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
23
36
|
// Adapted from: https://github.com/vega/vega-lite/blob/main/src/parameter.ts
|
|
24
37
|
|
|
25
|
-
export interface VariableParameter extends ParameterBase {
|
|
38
|
+
export interface VariableParameter extends ParameterBase, PersistedParameter {
|
|
26
39
|
/**
|
|
27
40
|
* The [initial value](http://vega.github.io/vega-lite/docs/value.html) of the parameter.
|
|
28
41
|
*
|
|
@@ -219,17 +232,9 @@ export interface PointSelectionConfig extends BaseSelectionConfig<"point"> {
|
|
|
219
232
|
* __Default value:__ `true`
|
|
220
233
|
*/
|
|
221
234
|
toggle?: boolean;
|
|
222
|
-
/**
|
|
223
|
-
* A set of fields that uniquely identify a tuple. Used for bookmarking point selections
|
|
224
|
-
* in the GenomeSpy App. Still work in progress.
|
|
225
|
-
*
|
|
226
|
-
* TODO: Or maybe use the `key` channel? https://vega.github.io/vega-lite/docs/encoding.html#key
|
|
227
|
-
*/
|
|
228
|
-
//keyFields?: string[];
|
|
229
235
|
}
|
|
230
236
|
|
|
231
|
-
export interface IntervalSelectionConfig
|
|
232
|
-
extends BaseSelectionConfig<"interval"> {
|
|
237
|
+
export interface IntervalSelectionConfig extends BaseSelectionConfig<"interval"> {
|
|
233
238
|
type: "interval";
|
|
234
239
|
|
|
235
240
|
/**
|
|
@@ -294,7 +299,7 @@ export interface BrushConfig extends ShadowProps {
|
|
|
294
299
|
}
|
|
295
300
|
|
|
296
301
|
export interface SelectionParameter<T extends SelectionType = SelectionType>
|
|
297
|
-
extends ParameterBase {
|
|
302
|
+
extends ParameterBase, PersistedParameter {
|
|
298
303
|
/**
|
|
299
304
|
* Determines the default event processing and data query for the selection. Vega-Lite currently supports two selection types:
|
|
300
305
|
*
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type PrimaryPositionalChannel = import("./channel.js").PrimaryPositionalChannel;
|
|
2
|
+
export type Datum = import("../data/flowNode.js").Datum;
|
|
3
|
+
/**
|
|
4
|
+
* Testing-only lazy data source parameters.
|
|
5
|
+
*/
|
|
6
|
+
export type MockLazyData = {
|
|
7
|
+
type: "mockLazy";
|
|
8
|
+
channel?: PrimaryPositionalChannel;
|
|
9
|
+
delay?: number;
|
|
10
|
+
data?: Datum[];
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=testing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../src/spec/testing.js"],"names":[],"mappings":"uCAKa,OAAO,cAAc,EAAE,wBAAwB;oBAC/C,OAAO,qBAAqB,EAAE,KAAK;;;;;UAOtC,UAAU;cACV,wBAAwB;YACxB,MAAM;WACN,KAAK,EAAE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test-only spec typings for internal helpers and fixtures.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @typedef {import("./channel.js").PrimaryPositionalChannel} PrimaryPositionalChannel
|
|
7
|
+
* @typedef {import("../data/flowNode.js").Datum} Datum
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Testing-only lazy data source parameters.
|
|
12
|
+
*
|
|
13
|
+
* @typedef {object} MockLazyData
|
|
14
|
+
* @prop {"mockLazy"} type
|
|
15
|
+
* @prop {PrimaryPositionalChannel} [channel]
|
|
16
|
+
* @prop {number} [delay]
|
|
17
|
+
* @prop {Datum[]} [data]
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
export {};
|
package/dist/src/spec/view.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
MarkProps,
|
|
12
12
|
MarkType,
|
|
13
13
|
RectProps,
|
|
14
|
+
RuleProps,
|
|
14
15
|
ShadowProps,
|
|
15
16
|
} from "./mark.js";
|
|
16
17
|
import { ExprRef } from "./parameter.js";
|
|
@@ -83,10 +84,24 @@ export type ViewBackground = Pick<
|
|
|
83
84
|
> &
|
|
84
85
|
ShadowProps;
|
|
85
86
|
|
|
87
|
+
export interface SeparatorProps extends Omit<RuleProps, "type"> {
|
|
88
|
+
type?: "rule";
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Whether separators extend into the plot margin (axes/padding) around
|
|
92
|
+
* the grid.
|
|
93
|
+
*
|
|
94
|
+
* __Default value:__ `true`
|
|
95
|
+
*/
|
|
96
|
+
includePlotMargin?: boolean;
|
|
97
|
+
}
|
|
98
|
+
|
|
86
99
|
export interface ViewSpecBase extends ResolveSpec {
|
|
87
100
|
/**
|
|
88
|
-
* An
|
|
89
|
-
*
|
|
101
|
+
* An explicit name used to address the view. It is recommended to keep
|
|
102
|
+
* names unique among siblings. In the App (where view state is
|
|
103
|
+
* bookmarkable), the name must be unique within its import scope for
|
|
104
|
+
* views with configurable visibility, etc.
|
|
90
105
|
*/
|
|
91
106
|
name?: string;
|
|
92
107
|
|
|
@@ -162,6 +177,16 @@ export interface ViewSpecBase extends ResolveSpec {
|
|
|
162
177
|
*/
|
|
163
178
|
encoding?: Encoding;
|
|
164
179
|
|
|
180
|
+
/**
|
|
181
|
+
* If true, this view and its descendants do not contribute to scale domains.
|
|
182
|
+
* Child views inherit this flag automatically.
|
|
183
|
+
*
|
|
184
|
+
* **Default value:** `false`
|
|
185
|
+
*
|
|
186
|
+
* @internal
|
|
187
|
+
*/
|
|
188
|
+
domainInert?: boolean;
|
|
189
|
+
|
|
165
190
|
/**
|
|
166
191
|
* View title.
|
|
167
192
|
* N.B.: Currently, GenomeSpy doesn't do bound calculation, and you need to
|
|
@@ -199,7 +224,7 @@ export interface ViewSpecBase extends ResolveSpec {
|
|
|
199
224
|
* Is the visibility configurable interactively from the [GenomeSpy
|
|
200
225
|
* App](https://genomespy.app/docs/sample-collections/).
|
|
201
226
|
* Configurability requires that the view has an explicitly specified name
|
|
202
|
-
* that is
|
|
227
|
+
* that is unique within its import scope.
|
|
203
228
|
*
|
|
204
229
|
* **Default:** `false` for children of `layer`, `true` for others.
|
|
205
230
|
*/
|
|
@@ -225,9 +250,7 @@ export interface DynamicOpacitySpec {
|
|
|
225
250
|
}
|
|
226
251
|
|
|
227
252
|
export interface UnitSpec
|
|
228
|
-
extends ViewSpecBase,
|
|
229
|
-
DynamicOpacitySpec,
|
|
230
|
-
AggregateSamplesSpec {
|
|
253
|
+
extends ViewSpecBase, DynamicOpacitySpec, AggregateSamplesSpec {
|
|
231
254
|
/**
|
|
232
255
|
* The background of the view, including fill, stroke, and stroke width.
|
|
233
256
|
*/
|
|
@@ -250,9 +273,7 @@ export interface AggregateSamplesSpec {
|
|
|
250
273
|
}
|
|
251
274
|
|
|
252
275
|
export interface LayerSpec
|
|
253
|
-
extends ViewSpecBase,
|
|
254
|
-
DynamicOpacitySpec,
|
|
255
|
-
AggregateSamplesSpec {
|
|
276
|
+
extends ViewSpecBase, DynamicOpacitySpec, AggregateSamplesSpec {
|
|
256
277
|
view?: ViewBackground;
|
|
257
278
|
layer: (LayerSpec | UnitSpec | ImportSpec)[];
|
|
258
279
|
}
|
|
@@ -330,7 +351,8 @@ export interface TemplateImport {
|
|
|
330
351
|
export interface ImportSpec {
|
|
331
352
|
/**
|
|
332
353
|
* The name given to the imported view. This property overrides the name
|
|
333
|
-
* specified in the imported specification
|
|
354
|
+
* specified in the imported specification and defines an import scope that
|
|
355
|
+
* is used for bookmarkable view visibility and parameter addressing.
|
|
334
356
|
*/
|
|
335
357
|
name?: string;
|
|
336
358
|
|
|
@@ -351,6 +373,19 @@ export interface ConcatBase extends ViewSpecBase {
|
|
|
351
373
|
* The gap between the views, in pixels.
|
|
352
374
|
*/
|
|
353
375
|
spacing?: number;
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Draws separator rules between visible child views. The separators are
|
|
379
|
+
* centered within the spacing gaps and do not affect layout.
|
|
380
|
+
*
|
|
381
|
+
* If `true`, the defaults are equivalent to:
|
|
382
|
+
* `{"type":"rule","size":1,"color":"#ccc","opacity":1,"strokeDash":[4,4],"strokeCap":"butt"}`
|
|
383
|
+
* Use `includePlotMargin` to control whether the separators extend into the
|
|
384
|
+
* plot margin.
|
|
385
|
+
*
|
|
386
|
+
* __Default value:__ `false`
|
|
387
|
+
*/
|
|
388
|
+
separator?: boolean | SeparatorProps;
|
|
354
389
|
}
|
|
355
390
|
|
|
356
391
|
export interface VConcatSpec extends ConcatBase {
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--genome-spy-basic-spacing: 10px;
|
|
3
|
-
--genome-spy-font-family:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
@keyframes genome-spy-blinker {
|
|
8
|
-
50% {
|
|
9
|
-
opacity: 0;
|
|
10
|
-
}
|
|
3
|
+
--genome-spy-font-family:
|
|
4
|
+
system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif,
|
|
5
|
+
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
|
11
6
|
}
|
|
12
7
|
|
|
13
8
|
.genome-spy {
|
|
@@ -38,34 +33,11 @@
|
|
|
38
33
|
}
|
|
39
34
|
}
|
|
40
35
|
|
|
41
|
-
.loading-message {
|
|
42
|
-
position: absolute;
|
|
43
|
-
inset: 0;
|
|
44
|
-
display: flex;
|
|
45
|
-
|
|
46
|
-
align-items: center;
|
|
47
|
-
justify-content: center;
|
|
48
|
-
|
|
49
|
-
.message {
|
|
50
|
-
color: #666;
|
|
51
|
-
opacity: 0;
|
|
52
|
-
transition: opacity 0.7s;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
36
|
.loading {
|
|
57
37
|
> canvas {
|
|
58
38
|
transform: scale(0.95, 0.95);
|
|
59
39
|
opacity: 0;
|
|
60
40
|
}
|
|
61
|
-
|
|
62
|
-
> .loading-message .message {
|
|
63
|
-
opacity: 1;
|
|
64
|
-
|
|
65
|
-
.ellipsis {
|
|
66
|
-
animation: genome-spy-blinker 1s linear infinite;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
41
|
}
|
|
70
42
|
|
|
71
43
|
.loading-indicators {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export default css;
|
|
2
|
-
declare const css: "\n:root {\n--genome-spy-basic-spacing: 10px;\n--genome-spy-font-family: system-ui, \"Segoe UI\", Roboto, Helvetica, Arial,\nsans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n}\n\n
|
|
2
|
+
declare const css: "\n:root {\n--genome-spy-basic-spacing: 10px;\n--genome-spy-font-family: system-ui, \"Segoe UI\", Roboto, Helvetica, Arial,\nsans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n}\n\n.genome-spy {\nfont-family: var(--genome-spy-font-family);\n\nposition: relative;\n\ndisplay: flex;\nflex-direction: column;\n\n.canvas-wrapper {\nposition: relative;\nflex-grow: 1;\noverflow: hidden;\n}\n\ncanvas {\ndisplay: block;\ntransform: scale(1, 1);\nopacity: 1;\ntransition:\ntransform 0.6s,\nopacity 0.6s;\n\n&:focus,\n&:focus-visible {\noutline: none;\n}\n}\n\n.loading {\n> canvas {\ntransform: scale(0.95, 0.95);\nopacity: 0;\n}\n}\n\n.loading-indicators {\nposition: absolute;\ninset: 0;\n\nuser-select: none;\npointer-events: none;\n\ndiv {\nposition: absolute;\ndisplay: flex;\nalign-items: center;\njustify-content: center;\n\n> div {\nfont-size: 11px;\ntransition: opacity 0.2s;\nbackground: white;\npadding: 2px 5px;\ndisplay: flex;\nborder-radius: 3px;\ngap: 0.5em;\nopacity: 0;\n\n&.loading {\nopacity: 0.5;\n}\n\n&.error {\nopacity: 0.8;\ncolor: firebrick;\n}\n\n> * {\ndisplay: block;\n}\n\nimg {\nwidth: 1.5em;\nheight: 1.5em;\n}\n}\n}\n}\n\n.tooltip {\nposition: absolute;\n\nmax-width: 450px;\noverflow: hidden;\n\n--background-color: #f6f6f6;\nbackground: var(--background-color);\npadding: var(--genome-spy-basic-spacing);\n\n--font-size: 12px;\nfont-size: var(--font-size);\n\nbox-shadow: 0px 3px 15px 0px rgba(0, 0, 0, 0.21);\n\n&:not(.sticky) {\npointer-events: none;\n}\n\ntransition:\noutline-color 0.3s ease-in-out,\nbox-shadow 0.3s ease-in-out;\n\noutline: 0px solid transparent;\n&.sticky {\noutline: 2px solid black;\nbox-shadow: 0px 3px 18px 0px rgba(0, 0, 0, 0.3);\n}\n\nz-index: 100;\n\n> :last-child {\nmargin-bottom: 0;\n}\n\n> .title {\npadding-bottom: calc(var(--genome-spy-basic-spacing) / 2);\nmargin-bottom: calc(var(--genome-spy-basic-spacing) / 2);\nborder-bottom: 1px dashed var(--background-color);\nborder-bottom: 1px dashed\ncolor-mix(in srgb, black 25%, var(--background-color));\n}\n\n.summary {\nfont-size: 12px;\n}\n\ntable {\n&:first-child {\nmargin-top: 0;\n}\n\nborder-collapse: collapse;\n\nth,\ntd {\npadding: 2px 0.4em;\nvertical-align: top;\nfont-size: var(--font-size);\n\n&:first-child {\npadding-left: 0;\n}\n}\n\nth {\ntext-align: left;\nfont-weight: bold;\n}\n}\n\n.color-legend {\ndisplay: inline-block;\nwidth: 0.8em;\nheight: 0.8em;\nmargin-left: 0.4em;\nbox-shadow: 0px 0px 3px 1px white;\n}\n\n.attributes {\n.hovered {\nbackground-color: #e0e0e0;\n}\n}\n\n.na {\ncolor: #aaa;\nfont-style: italic;\nfont-size: 80%;\n}\n}\n\n.gene-track-tooltip {\n.summary {\nfont-size: 90%;\n}\n}\n\n.message-box {\ndisplay: flex;\nalign-items: center;\njustify-content: center;\nposition: absolute;\ntop: 0;\nheight: 100%;\nwidth: 100%;\n\n> div {\nborder: 1px solid red;\npadding: 10px;\nbackground: #fff0f0;\n}\n}\n}\n\n.gs-input-binding {\ndisplay: grid;\ngrid-template-columns: max-content max-content;\ncolumn-gap: 1em;\nrow-gap: 0.3em;\njustify-items: start;\n\n> select,\n> input:not([type=\"checkbox\"]) {\nwidth: 100%;\n}\n\ninput[type=\"range\"] + span {\ndisplay: inline-block;\nmargin-left: 0.3em;\nmin-width: 2.2em;\nfont-variant-numeric: tabular-nums;\n}\n\ninput[type=\"range\"],\ninput[type=\"radio\"] {\nvertical-align: text-bottom;\n}\n\n.radio-group {\ndisplay: flex;\nalign-items: center;\n}\n\n.description {\nmax-width: 26em;\ngrid-column: 1 / -1;\ncolor: #777;\nfont-size: 90%;\nmargin-top: -0.5em;\n}\n}\n\n.gs-input-bindings {\nflex-basis: content;\nfont-size: 14px;\npadding: var(--genome-spy-basic-spacing);\n}\n";
|
|
3
3
|
//# sourceMappingURL=genome-spy.css.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"genome-spy.css.d.ts","sourceRoot":"","sources":["../../../src/styles/genome-spy.css.js"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"genome-spy.css.d.ts","sourceRoot":"","sources":["../../../src/styles/genome-spy.css.js"],"names":[],"mappings":";AAAA,0iHAoPE"}
|
|
@@ -5,12 +5,6 @@ const css = `
|
|
|
5
5
|
sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
@keyframes genome-spy-blinker {
|
|
9
|
-
50% {
|
|
10
|
-
opacity: 0;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
8
|
.genome-spy {
|
|
15
9
|
font-family: var(--genome-spy-font-family);
|
|
16
10
|
|
|
@@ -39,34 +33,11 @@ outline: none;
|
|
|
39
33
|
}
|
|
40
34
|
}
|
|
41
35
|
|
|
42
|
-
.loading-message {
|
|
43
|
-
position: absolute;
|
|
44
|
-
inset: 0;
|
|
45
|
-
display: flex;
|
|
46
|
-
|
|
47
|
-
align-items: center;
|
|
48
|
-
justify-content: center;
|
|
49
|
-
|
|
50
|
-
.message {
|
|
51
|
-
color: #666;
|
|
52
|
-
opacity: 0;
|
|
53
|
-
transition: opacity 0.7s;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
36
|
.loading {
|
|
58
37
|
> canvas {
|
|
59
38
|
transform: scale(0.95, 0.95);
|
|
60
39
|
opacity: 0;
|
|
61
40
|
}
|
|
62
|
-
|
|
63
|
-
> .loading-message .message {
|
|
64
|
-
opacity: 1;
|
|
65
|
-
|
|
66
|
-
.ellipsis {
|
|
67
|
-
animation: genome-spy-blinker 1s linear infinite;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
41
|
}
|
|
71
42
|
|
|
72
43
|
.loading-indicators {
|
|
@@ -15,7 +15,12 @@ import {
|
|
|
15
15
|
ScaleDiverging,
|
|
16
16
|
ScaleContinuousNumeric,
|
|
17
17
|
} from "d3-scale";
|
|
18
|
-
import {
|
|
18
|
+
import {
|
|
19
|
+
Channel,
|
|
20
|
+
ChannelDef,
|
|
21
|
+
ChannelDefWithScale,
|
|
22
|
+
ChannelWithScale,
|
|
23
|
+
} from "../spec/channel.js";
|
|
19
24
|
import { ScaleLocus } from "../genome/scaleLocus.js";
|
|
20
25
|
import { ScaleIndex } from "../genome/scaleIndex.js";
|
|
21
26
|
import { Scalar } from "../spec/channel.js";
|
|
@@ -31,6 +36,13 @@ export interface Accessor<T = Scalar> {
|
|
|
31
36
|
*/
|
|
32
37
|
asNumberAccessor(): Accessor<number>;
|
|
33
38
|
|
|
39
|
+
/**
|
|
40
|
+
* Returns true if this accessor appears to return the same value as the
|
|
41
|
+
* other accessor for the same datum. Structural comparison based on the
|
|
42
|
+
* data source (ignores channel/predicate/scale).
|
|
43
|
+
*/
|
|
44
|
+
equals(other: Accessor): boolean;
|
|
45
|
+
|
|
34
46
|
/**
|
|
35
47
|
* True if the accessor returns the same value for all objects
|
|
36
48
|
*/
|
|
@@ -51,19 +63,42 @@ export interface Accessor<T = Scalar> {
|
|
|
51
63
|
* before visual encoding, indicates with channel has the scale.
|
|
52
64
|
* If no scale is needed, this is undefined.
|
|
53
65
|
*/
|
|
54
|
-
scaleChannel
|
|
66
|
+
scaleChannel?: ChannelWithScale;
|
|
55
67
|
|
|
56
68
|
/**
|
|
57
69
|
* The ChannelDef that the accessor is based on
|
|
58
70
|
*/
|
|
59
71
|
channelDef: ChannelDef;
|
|
60
72
|
|
|
73
|
+
/**
|
|
74
|
+
* A stable key derived from the accessor's data source. Used for equality.
|
|
75
|
+
*/
|
|
76
|
+
sourceKey?: string;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* A domain key base derived from the channel definition and scale channel.
|
|
80
|
+
* Format: <scaleChannel>|<kind>|<value>
|
|
81
|
+
*/
|
|
82
|
+
domainKeyBase?: string;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* A domain key finalized with the resolved data type.
|
|
86
|
+
* Format: <type>|<domainKeyBase>
|
|
87
|
+
*/
|
|
88
|
+
domainKey?: string;
|
|
89
|
+
|
|
61
90
|
/**
|
|
62
91
|
* This accessor should be used when the predicate is true
|
|
63
92
|
*/
|
|
64
93
|
predicate: Predicate;
|
|
65
94
|
}
|
|
66
95
|
|
|
96
|
+
export interface ScaleAccessor<T = Scalar> extends Accessor<T> {
|
|
97
|
+
scaleChannel: ChannelWithScale;
|
|
98
|
+
channelDef: ChannelDefWithScale;
|
|
99
|
+
domainKeyBase: string;
|
|
100
|
+
}
|
|
101
|
+
|
|
67
102
|
export interface Predicate extends ExprRefFunction {
|
|
68
103
|
/**
|
|
69
104
|
* The parameter the predicate is based on
|
|
@@ -9,14 +9,15 @@ import ViewRenderingContext from "../view/renderingContext/viewRenderingContext.
|
|
|
9
9
|
*/
|
|
10
10
|
export interface SampleFacetRenderingOptions {
|
|
11
11
|
/**
|
|
12
|
-
* Location and height
|
|
12
|
+
* Location and height. Use unit scale by default; when `pixelToUnit` is
|
|
13
|
+
* provided, interpret values as pixels and scale them.
|
|
13
14
|
*/
|
|
14
15
|
locSize: LocSize;
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
|
-
*
|
|
18
|
+
* Multiply pixel-based locSize values to unit scale.
|
|
18
19
|
*/
|
|
19
|
-
|
|
20
|
+
pixelToUnit: number;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
export interface RenderingOptions {
|
|
@@ -66,20 +66,6 @@ export default interface ViewContext {
|
|
|
66
66
|
|
|
67
67
|
getNamedDataFromProvider: (name: string) => any[];
|
|
68
68
|
|
|
69
|
-
/**
|
|
70
|
-
* Allows lazy data sources to signal that they are loading data.
|
|
71
|
-
* The status is shown in the UI somewhere within or near the view.
|
|
72
|
-
*
|
|
73
|
-
* @param view The view where the data source is located.
|
|
74
|
-
* @param status
|
|
75
|
-
* @param detail Details about the error, if any.
|
|
76
|
-
*/
|
|
77
|
-
setDataLoadingStatus: (
|
|
78
|
-
view: View,
|
|
79
|
-
status: DataLoadingStatus,
|
|
80
|
-
detail?: string
|
|
81
|
-
) => void;
|
|
82
|
-
|
|
83
69
|
/**
|
|
84
70
|
* Highlights a view by adding a border around it. This is useful for debugging.
|
|
85
71
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domainArray.d.ts","sourceRoot":"","sources":["../../../src/utils/domainArray.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"domainArray.d.ts","sourceRoot":"","sources":["../../../src/utils/domainArray.js"],"names":[],"mappings":"AAiLA;;;;GAIG;AACH,2CAHW,MAAM,kBACN,MAAM,EAAE,eAiBlB;AAED;;;;GAIG;AACH,4CAFW,WAAW,GAAG,GAAG,EAAE,SAI7B;AA9MD;;GAEG;AAKH;IACI,cAIC;IAFG,qBAAqB;IACrB,MADW,MAAM,CACI;IAGzB;;;;OAIG;IACH,cAHW,MAAM,GACJ,WAAW,CAIvB;IAED;;;;OAIG;IACH,kBAHW,QAAQ,CAAC,MAAM,CAAC,GACd,WAAW,CAcvB;IAED;;;;;OAKG;IACH,sBAFa,CAAC,UAHH,QAAQ,CAAC,CAAC,CAAC,aACX,CAAS,IAAC,EAAD,CAAC,KAAE,MAAM,GAChB,WAAW,CASvB;CACJ;AAED;IAoBgB,UAAe;IAEf,UAAe;CAS9B;AAED;;GAEG;AACH;IAKQ,0BAA0B;IAC1B,cADW,GAAG,CAAC,MAAM,CAAC,CACO;CAoBpC;AAED;CAKC;AAED;IACI;;;OAGG;IACH,2BAFW,MAAM,EAAE,EAiBlB;CAgBJ;qBAnKY,OAAO,GAAG,MAAM,GAAG,MAAM"}
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* @typedef {boolean | number | string} scalar
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
// DomainArray tracks categorical order for scale domain extraction.
|
|
6
|
+
// For rendering, ScaleResolution maintains a stable Indexer to prevent
|
|
7
|
+
// categorical indices from changing across updates.
|
|
5
8
|
export class DomainArray /** @type {Array<scalar>} */ extends Array {
|
|
6
9
|
constructor() {
|
|
7
10
|
super();
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Assigns unique values an index number in the order they are encountered.
|
|
3
3
|
*
|
|
4
|
+
* Used to keep categorical GPU encodings stable: once a value gets an index,
|
|
5
|
+
* it must never change for the lifetime of the owning scale.
|
|
6
|
+
*
|
|
4
7
|
* TODO: What about undefined?
|
|
5
8
|
*
|
|
6
9
|
* @template T
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexer.d.ts","sourceRoot":"","sources":["../../../src/utils/indexer.js"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"indexer.d.ts","sourceRoot":"","sources":["../../../src/utils/indexer.js"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,sCAFa,CAAC;YAYE,CAAC;qBAeD,QAAQ,CAAC,CAAC,CAAC;kBAOX,MAAM;;EAYrB"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Assigns unique values an index number in the order they are encountered.
|
|
3
3
|
*
|
|
4
|
+
* Used to keep categorical GPU encodings stable: once a value gets an index,
|
|
5
|
+
* it must never change for the lifetime of the owning scale.
|
|
6
|
+
*
|
|
4
7
|
* TODO: What about undefined?
|
|
5
8
|
*
|
|
6
9
|
* @template T
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @param {function} func
|
|
5
5
|
* @param {number} limit
|
|
6
|
+
* @returns {((...args: any[]) => void) & { cancel: () => void }}
|
|
6
7
|
*/
|
|
7
|
-
export default function throttle(func: Function, limit: number): () => void
|
|
8
|
+
export default function throttle(func: Function, limit: number): ((...args: any[]) => void) & {
|
|
9
|
+
cancel: () => void;
|
|
10
|
+
};
|
|
8
11
|
//# sourceMappingURL=throttle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"throttle.d.ts","sourceRoot":"","sources":["../../../src/utils/throttle.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"throttle.d.ts","sourceRoot":"","sources":["../../../src/utils/throttle.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wDAHW,MAAM,GACJ,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC,GAAG;IAAE,MAAM,EAAE,MAAM,IAAI,CAAA;CAAE,CA8D/D"}
|