@genome-spy/core 0.45.0 → 0.46.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/dist/bundle/{index-lmJu1tfP.js → index-BtRKzKhM.js} +6 -6
  2. package/dist/bundle/{index--cKb-dKG.js → index-BwFvhduA.js} +5 -5
  3. package/dist/bundle/{index-1QVesMzU.js → index-C8lYPtq_.js} +1 -1
  4. package/dist/bundle/{index-Pv3tKJ1W.js → index-CkI3Kd2P.js} +3 -3
  5. package/dist/bundle/{index-Y-LdHNIz.js → index-CmBp-spD.js} +1 -1
  6. package/dist/bundle/{index-z4Cs62EO.js → index-Dixm7K89.js} +4 -4
  7. package/dist/bundle/{index-noY1e-G6.js → index-Sk-Wtwdn.js} +5 -5
  8. package/dist/bundle/{index-UyrC0vvF.js → index-Z7JiNsFI.js} +4 -4
  9. package/dist/bundle/{index-LD6yPc3X.js → index-mihmTLo-.js} +1 -1
  10. package/dist/bundle/index.es.js +3624 -3516
  11. package/dist/bundle/index.js +101 -92
  12. package/dist/bundle/{long-Veu0zKh9.js → long-CYrAUkxh.js} +2 -2
  13. package/dist/bundle/{remoteFile-Ur-gRKsH.js → remoteFile-1_eCK3VV.js} +1 -1
  14. package/dist/schema.json +156 -15
  15. package/dist/src/data/collector.d.ts +1 -0
  16. package/dist/src/data/collector.d.ts.map +1 -1
  17. package/dist/src/data/collector.js +19 -3
  18. package/dist/src/data/flow.test.js +4 -0
  19. package/dist/src/data/flowNode.d.ts +31 -14
  20. package/dist/src/data/flowNode.d.ts.map +1 -1
  21. package/dist/src/data/flowNode.js +53 -20
  22. package/dist/src/data/flowTestUtils.d.ts +5 -0
  23. package/dist/src/data/flowTestUtils.d.ts.map +1 -1
  24. package/dist/src/data/flowTestUtils.js +11 -0
  25. package/dist/src/data/sources/dataSource.d.ts +17 -0
  26. package/dist/src/data/sources/dataSource.d.ts.map +1 -1
  27. package/dist/src/data/sources/dataSource.js +34 -0
  28. package/dist/src/data/sources/inlineSource.js +1 -1
  29. package/dist/src/data/sources/lazy/bigBedSource.d.ts.map +1 -1
  30. package/dist/src/data/sources/lazy/bigBedSource.js +6 -0
  31. package/dist/src/data/sources/lazy/bigWigSource.d.ts.map +1 -1
  32. package/dist/src/data/sources/lazy/bigWigSource.js +28 -15
  33. package/dist/src/data/sources/lazy/singleAxisLazySource.d.ts +0 -8
  34. package/dist/src/data/sources/lazy/singleAxisLazySource.d.ts.map +1 -1
  35. package/dist/src/data/sources/lazy/singleAxisLazySource.js +1 -13
  36. package/dist/src/data/sources/lazy/singleAxisWindowedSource.js +3 -3
  37. package/dist/src/data/sources/namedSource.js +1 -1
  38. package/dist/src/data/sources/sequenceSource.d.ts.map +1 -1
  39. package/dist/src/data/sources/sequenceSource.js +2 -1
  40. package/dist/src/data/sources/urlSource.d.ts.map +1 -1
  41. package/dist/src/data/sources/urlSource.js +9 -5
  42. package/dist/src/data/transforms/clone.d.ts +1 -0
  43. package/dist/src/data/transforms/clone.d.ts.map +1 -1
  44. package/dist/src/data/transforms/coverage.d.ts +4 -1
  45. package/dist/src/data/transforms/coverage.d.ts.map +1 -1
  46. package/dist/src/data/transforms/coverage.js +44 -31
  47. package/dist/src/data/transforms/filter.d.ts +4 -3
  48. package/dist/src/data/transforms/filter.d.ts.map +1 -1
  49. package/dist/src/data/transforms/filter.js +7 -8
  50. package/dist/src/data/transforms/filter.test.js +4 -2
  51. package/dist/src/data/transforms/formula.d.ts +4 -3
  52. package/dist/src/data/transforms/formula.d.ts.map +1 -1
  53. package/dist/src/data/transforms/formula.js +7 -5
  54. package/dist/src/data/transforms/formula.test.js +13 -7
  55. package/dist/src/genomeSpy.d.ts +5 -2
  56. package/dist/src/genomeSpy.d.ts.map +1 -1
  57. package/dist/src/genomeSpy.js +24 -8
  58. package/dist/src/marks/mark.d.ts.map +1 -1
  59. package/dist/src/marks/mark.js +11 -0
  60. package/dist/src/spec/view.d.ts +52 -9
  61. package/dist/src/styles/genome-spy.css.d.ts +1 -1
  62. package/dist/src/styles/genome-spy.css.d.ts.map +1 -1
  63. package/dist/src/styles/genome-spy.css.js +4 -0
  64. package/dist/src/styles/genome-spy.scss +5 -0
  65. package/dist/src/types/viewContext.d.ts +9 -2
  66. package/dist/src/utils/expression.js +1 -1
  67. package/dist/src/view/paramMediator.d.ts +2 -1
  68. package/dist/src/view/paramMediator.d.ts.map +1 -1
  69. package/dist/src/view/paramMediator.js +3 -2
  70. package/dist/src/view/paramMediator.test.js +13 -0
  71. package/dist/src/view/viewFactory.d.ts +4 -1
  72. package/dist/src/view/viewFactory.d.ts.map +1 -1
  73. package/dist/src/view/viewFactory.js +52 -24
  74. package/dist/src/view/viewUtils.d.ts +2 -7
  75. package/dist/src/view/viewUtils.d.ts.map +1 -1
  76. package/dist/src/view/viewUtils.js +21 -30
  77. package/package.json +2 -2
  78. /package/dist/bundle/{__vite-browser-external-ENoMJThg.js → __vite-browser-external-C--ziKoh.js} +0 -0
  79. /package/dist/bundle/{_commonjsHelpers-QtkX90xp.js → _commonjsHelpers-BIiJCwQW.js} +0 -0
@@ -1,5 +1,5 @@
1
- import { b as Pi } from "./index-1QVesMzU.js";
2
- import { g as Da } from "./_commonjsHelpers-QtkX90xp.js";
1
+ import { b as Pi } from "./index-C8lYPtq_.js";
2
+ import { g as Da } from "./_commonjsHelpers-BIiJCwQW.js";
3
3
  var re = {};
4
4
  (function(e) {
5
5
  var i = typeof Uint8Array < "u" && typeof Uint16Array < "u" && typeof Int32Array < "u";
@@ -1,4 +1,4 @@
1
- import { b as u } from "./index-1QVesMzU.js";
1
+ import { b as u } from "./index-C8lYPtq_.js";
2
2
  const h = typeof window < "u" ? window : typeof self < "u" ? self : { fetch: void 0 };
3
3
  class b {
4
4
  async getBufferFromResponse(e) {
package/dist/schema.json CHANGED
@@ -815,12 +815,15 @@
815
815
  "additionalProperties": false,
816
816
  "properties": {
817
817
  "baseUrl": {
818
+ "description": "Optional base URL for constructing request URLs. When set, all views deeper in the hierarchy inherit this base URL, using it for importing loading data and importing specifications.",
818
819
  "type": "string"
819
820
  },
820
821
  "columns": {
822
+ "description": "The number of columns in the grid.",
821
823
  "type": "number"
822
824
  },
823
825
  "concat": {
826
+ "description": "Specifies views that will be concatenated into a grid that wraps when the specified number of columns are used.",
824
827
  "items": {
825
828
  "anyOf": [
826
829
  {
@@ -922,8 +925,16 @@
922
925
  "type": "object"
923
926
  },
924
927
  "spacing": {
928
+ "description": "The gap between the views, in pixels.",
925
929
  "type": "number"
926
930
  },
931
+ "templates": {
932
+ "additionalProperties": {
933
+ "$ref": "#/definitions/ViewSpec"
934
+ },
935
+ "description": "Templates that can be reused within the view specification by importing them with the template key.",
936
+ "type": "object"
937
+ },
927
938
  "title": {
928
939
  "anyOf": [
929
940
  {
@@ -2304,6 +2315,7 @@
2304
2315
  "additionalProperties": false,
2305
2316
  "properties": {
2306
2317
  "baseUrl": {
2318
+ "description": "Optional base URL for constructing request URLs. When set, all views deeper in the hierarchy inherit this base URL, using it for importing loading data and importing specifications.",
2307
2319
  "type": "string"
2308
2320
  },
2309
2321
  "configurableVisibility": {
@@ -2331,6 +2343,7 @@
2331
2343
  "$ref": "#/definitions/Encoding"
2332
2344
  },
2333
2345
  "hconcat": {
2346
+ "description": "Specifies views that will be concatenated horizontally.",
2334
2347
  "items": {
2335
2348
  "anyOf": [
2336
2349
  {
@@ -2408,8 +2421,16 @@
2408
2421
  "type": "object"
2409
2422
  },
2410
2423
  "spacing": {
2424
+ "description": "The gap between the views, in pixels.",
2411
2425
  "type": "number"
2412
2426
  },
2427
+ "templates": {
2428
+ "additionalProperties": {
2429
+ "$ref": "#/definitions/ViewSpec"
2430
+ },
2431
+ "description": "Templates that can be reused within the view specification by importing them with the template key.",
2432
+ "type": "object"
2433
+ },
2413
2434
  "title": {
2414
2435
  "anyOf": [
2415
2436
  {
@@ -2517,11 +2538,22 @@
2517
2538
  ],
2518
2539
  "type": "object"
2519
2540
  },
2520
- "ImportParams": {
2541
+ "ImportSpec": {
2521
2542
  "additionalProperties": false,
2522
2543
  "properties": {
2544
+ "import": {
2545
+ "anyOf": [
2546
+ {
2547
+ "$ref": "#/definitions/UrlImport"
2548
+ },
2549
+ {
2550
+ "$ref": "#/definitions/TemplateImport"
2551
+ }
2552
+ ],
2553
+ "description": "The method to import a specification."
2554
+ },
2523
2555
  "name": {
2524
- "description": "Name for the imported view. Overrides the name defined in the imported spec.",
2556
+ "description": "The name given to the imported view. This property overrides the name specified in the imported specification.",
2525
2557
  "type": "string"
2526
2558
  },
2527
2559
  "params": {
@@ -2536,19 +2568,7 @@
2536
2568
  "type": "object"
2537
2569
  }
2538
2570
  ],
2539
- "description": "Dynamic variables that parameterize a visualization. Parameters defined here override the parameters defined in the imported spec."
2540
- },
2541
- "url": {
2542
- "type": "string"
2543
- }
2544
- },
2545
- "type": "object"
2546
- },
2547
- "ImportSpec": {
2548
- "additionalProperties": false,
2549
- "properties": {
2550
- "import": {
2551
- "$ref": "#/definitions/ImportParams"
2571
+ "description": "Dynamic variables that parameterize a visualization. Parameters defined here override the parameters defined in the imported specification."
2552
2572
  }
2553
2573
  },
2554
2574
  "required": [
@@ -2703,6 +2723,7 @@
2703
2723
  "type": "array"
2704
2724
  },
2705
2725
  "baseUrl": {
2726
+ "description": "Optional base URL for constructing request URLs. When set, all views deeper in the hierarchy inherit this base URL, using it for importing loading data and importing specifications.",
2706
2727
  "type": "string"
2707
2728
  },
2708
2729
  "configurableVisibility": {
@@ -2755,6 +2776,9 @@
2755
2776
  },
2756
2777
  {
2757
2778
  "$ref": "#/definitions/UnitSpec"
2779
+ },
2780
+ {
2781
+ "$ref": "#/definitions/ImportSpec"
2758
2782
  }
2759
2783
  ]
2760
2784
  },
@@ -2806,6 +2830,13 @@
2806
2830
  },
2807
2831
  "type": "object"
2808
2832
  },
2833
+ "templates": {
2834
+ "additionalProperties": {
2835
+ "$ref": "#/definitions/ViewSpec"
2836
+ },
2837
+ "description": "Templates that can be reused within the view specification by importing them with the template key.",
2838
+ "type": "object"
2839
+ },
2809
2840
  "title": {
2810
2841
  "anyOf": [
2811
2842
  {
@@ -4508,6 +4539,7 @@
4508
4539
  "type": "string"
4509
4540
  },
4510
4541
  "baseUrl": {
4542
+ "description": "Optional base URL for constructing request URLs. When set, all views deeper in the hierarchy inherit this base URL, using it for importing loading data and importing specifications.",
4511
4543
  "type": "string"
4512
4544
  },
4513
4545
  "configurableVisibility": {
@@ -4619,6 +4651,13 @@
4619
4651
  },
4620
4652
  "type": "object"
4621
4653
  },
4654
+ "templates": {
4655
+ "additionalProperties": {
4656
+ "$ref": "#/definitions/ViewSpec"
4657
+ },
4658
+ "description": "Templates that can be reused within the view specification by importing them with the template key.",
4659
+ "type": "object"
4660
+ },
4622
4661
  "title": {
4623
4662
  "anyOf": [
4624
4663
  {
@@ -4720,6 +4759,7 @@
4720
4759
  "type": "string"
4721
4760
  },
4722
4761
  "baseUrl": {
4762
+ "description": "Optional base URL for constructing request URLs. When set, all views deeper in the hierarchy inherit this base URL, using it for importing loading data and importing specifications.",
4723
4763
  "type": "string"
4724
4764
  },
4725
4765
  "configurableVisibility": {
@@ -4783,6 +4823,9 @@
4783
4823
  },
4784
4824
  {
4785
4825
  "$ref": "#/definitions/UnitSpec"
4826
+ },
4827
+ {
4828
+ "$ref": "#/definitions/ImportSpec"
4786
4829
  }
4787
4830
  ]
4788
4831
  },
@@ -4834,6 +4877,13 @@
4834
4877
  },
4835
4878
  "type": "object"
4836
4879
  },
4880
+ "templates": {
4881
+ "additionalProperties": {
4882
+ "$ref": "#/definitions/ViewSpec"
4883
+ },
4884
+ "description": "Templates that can be reused within the view specification by importing them with the template key.",
4885
+ "type": "object"
4886
+ },
4837
4887
  "title": {
4838
4888
  "anyOf": [
4839
4889
  {
@@ -4922,6 +4972,7 @@
4922
4972
  "type": "string"
4923
4973
  },
4924
4974
  "baseUrl": {
4975
+ "description": "Optional base URL for constructing request URLs. When set, all views deeper in the hierarchy inherit this base URL, using it for importing loading data and importing specifications.",
4925
4976
  "type": "string"
4926
4977
  },
4927
4978
  "configurableVisibility": {
@@ -5024,8 +5075,16 @@
5024
5075
  "type": "object"
5025
5076
  },
5026
5077
  "spacing": {
5078
+ "description": "The gap between the views, in pixels.",
5027
5079
  "type": "number"
5028
5080
  },
5081
+ "templates": {
5082
+ "additionalProperties": {
5083
+ "$ref": "#/definitions/ViewSpec"
5084
+ },
5085
+ "description": "Templates that can be reused within the view specification by importing them with the template key.",
5086
+ "type": "object"
5087
+ },
5029
5088
  "title": {
5030
5089
  "anyOf": [
5031
5090
  {
@@ -5043,6 +5102,7 @@
5043
5102
  "type": "array"
5044
5103
  },
5045
5104
  "vconcat": {
5105
+ "description": "Specifies views that will be concatenated vertically.",
5046
5106
  "items": {
5047
5107
  "anyOf": [
5048
5108
  {
@@ -5124,6 +5184,7 @@
5124
5184
  "type": "string"
5125
5185
  },
5126
5186
  "baseUrl": {
5187
+ "description": "Optional base URL for constructing request URLs. When set, all views deeper in the hierarchy inherit this base URL, using it for importing loading data and importing specifications.",
5127
5188
  "type": "string"
5128
5189
  },
5129
5190
  "configurableVisibility": {
@@ -5162,6 +5223,7 @@
5162
5223
  "$ref": "#/definitions/GenomeConfig"
5163
5224
  },
5164
5225
  "hconcat": {
5226
+ "description": "Specifies views that will be concatenated horizontally.",
5165
5227
  "items": {
5166
5228
  "anyOf": [
5167
5229
  {
@@ -5239,8 +5301,16 @@
5239
5301
  "type": "object"
5240
5302
  },
5241
5303
  "spacing": {
5304
+ "description": "The gap between the views, in pixels.",
5242
5305
  "type": "number"
5243
5306
  },
5307
+ "templates": {
5308
+ "additionalProperties": {
5309
+ "$ref": "#/definitions/ViewSpec"
5310
+ },
5311
+ "description": "Templates that can be reused within the view specification by importing them with the template key.",
5312
+ "type": "object"
5313
+ },
5244
5314
  "title": {
5245
5315
  "anyOf": [
5246
5316
  {
@@ -5326,12 +5396,15 @@
5326
5396
  "type": "string"
5327
5397
  },
5328
5398
  "baseUrl": {
5399
+ "description": "Optional base URL for constructing request URLs. When set, all views deeper in the hierarchy inherit this base URL, using it for importing loading data and importing specifications.",
5329
5400
  "type": "string"
5330
5401
  },
5331
5402
  "columns": {
5403
+ "description": "The number of columns in the grid.",
5332
5404
  "type": "number"
5333
5405
  },
5334
5406
  "concat": {
5407
+ "description": "Specifies views that will be concatenated into a grid that wraps when the specified number of columns are used.",
5335
5408
  "items": {
5336
5409
  "anyOf": [
5337
5410
  {
@@ -5444,8 +5517,16 @@
5444
5517
  "type": "object"
5445
5518
  },
5446
5519
  "spacing": {
5520
+ "description": "The gap between the views, in pixels.",
5447
5521
  "type": "number"
5448
5522
  },
5523
+ "templates": {
5524
+ "additionalProperties": {
5525
+ "$ref": "#/definitions/ViewSpec"
5526
+ },
5527
+ "description": "Templates that can be reused within the view specification by importing them with the template key.",
5528
+ "type": "object"
5529
+ },
5449
5530
  "title": {
5450
5531
  "anyOf": [
5451
5532
  {
@@ -5532,6 +5613,7 @@
5532
5613
  "type": "string"
5533
5614
  },
5534
5615
  "baseUrl": {
5616
+ "description": "Optional base URL for constructing request URLs. When set, all views deeper in the hierarchy inherit this base URL, using it for importing loading data and importing specifications.",
5535
5617
  "type": "string"
5536
5618
  },
5537
5619
  "configurableVisibility": {
@@ -5651,6 +5733,13 @@
5651
5733
  "stickySummaries": {
5652
5734
  "type": "boolean"
5653
5735
  },
5736
+ "templates": {
5737
+ "additionalProperties": {
5738
+ "$ref": "#/definitions/ViewSpec"
5739
+ },
5740
+ "description": "Templates that can be reused within the view specification by importing them with the template key.",
5741
+ "type": "object"
5742
+ },
5654
5743
  "title": {
5655
5744
  "anyOf": [
5656
5745
  {
@@ -5857,6 +5946,7 @@
5857
5946
  "description": "A view specification for a SampleView. This is only functional in the GenomeSpy app.",
5858
5947
  "properties": {
5859
5948
  "baseUrl": {
5949
+ "description": "Optional base URL for constructing request URLs. When set, all views deeper in the hierarchy inherit this base URL, using it for importing loading data and importing specifications.",
5860
5950
  "type": "string"
5861
5951
  },
5862
5952
  "configurableVisibility": {
@@ -5965,6 +6055,13 @@
5965
6055
  "stickySummaries": {
5966
6056
  "type": "boolean"
5967
6057
  },
6058
+ "templates": {
6059
+ "additionalProperties": {
6060
+ "$ref": "#/definitions/ViewSpec"
6061
+ },
6062
+ "description": "Templates that can be reused within the view specification by importing them with the template key.",
6063
+ "type": "object"
6064
+ },
5968
6065
  "title": {
5969
6066
  "anyOf": [
5970
6067
  {
@@ -6590,6 +6687,19 @@
6590
6687
  },
6591
6688
  "type": "object"
6592
6689
  },
6690
+ "TemplateImport": {
6691
+ "additionalProperties": false,
6692
+ "properties": {
6693
+ "template": {
6694
+ "description": "Imports a specification from the current view hierarchy, searching first in the current view, then ascending through ancestors.",
6695
+ "type": "string"
6696
+ }
6697
+ },
6698
+ "required": [
6699
+ "template"
6700
+ ],
6701
+ "type": "object"
6702
+ },
6593
6703
  "TextDef<string>": {
6594
6704
  "anyOf": [
6595
6705
  {
@@ -6842,6 +6952,7 @@
6842
6952
  "type": "array"
6843
6953
  },
6844
6954
  "baseUrl": {
6955
+ "description": "Optional base URL for constructing request URLs. When set, all views deeper in the hierarchy inherit this base URL, using it for importing loading data and importing specifications.",
6845
6956
  "type": "string"
6846
6957
  },
6847
6958
  "configurableVisibility": {
@@ -6942,6 +7053,13 @@
6942
7053
  },
6943
7054
  "type": "object"
6944
7055
  },
7056
+ "templates": {
7057
+ "additionalProperties": {
7058
+ "$ref": "#/definitions/ViewSpec"
7059
+ },
7060
+ "description": "Templates that can be reused within the view specification by importing them with the template key.",
7061
+ "type": "object"
7062
+ },
6945
7063
  "title": {
6946
7064
  "anyOf": [
6947
7065
  {
@@ -7053,10 +7171,24 @@
7053
7171
  ],
7054
7172
  "type": "object"
7055
7173
  },
7174
+ "UrlImport": {
7175
+ "additionalProperties": false,
7176
+ "properties": {
7177
+ "url": {
7178
+ "description": "Imports a specification from the specified URL.",
7179
+ "type": "string"
7180
+ }
7181
+ },
7182
+ "required": [
7183
+ "url"
7184
+ ],
7185
+ "type": "object"
7186
+ },
7056
7187
  "VConcatSpec": {
7057
7188
  "additionalProperties": false,
7058
7189
  "properties": {
7059
7190
  "baseUrl": {
7191
+ "description": "Optional base URL for constructing request URLs. When set, all views deeper in the hierarchy inherit this base URL, using it for importing loading data and importing specifications.",
7060
7192
  "type": "string"
7061
7193
  },
7062
7194
  "configurableVisibility": {
@@ -7148,8 +7280,16 @@
7148
7280
  "type": "object"
7149
7281
  },
7150
7282
  "spacing": {
7283
+ "description": "The gap between the views, in pixels.",
7151
7284
  "type": "number"
7152
7285
  },
7286
+ "templates": {
7287
+ "additionalProperties": {
7288
+ "$ref": "#/definitions/ViewSpec"
7289
+ },
7290
+ "description": "Templates that can be reused within the view specification by importing them with the template key.",
7291
+ "type": "object"
7292
+ },
7153
7293
  "title": {
7154
7294
  "anyOf": [
7155
7295
  {
@@ -7167,6 +7307,7 @@
7167
7307
  "type": "array"
7168
7308
  },
7169
7309
  "vconcat": {
7310
+ "description": "Specifies views that will be concatenated vertically.",
7170
7311
  "items": {
7171
7312
  "anyOf": [
7172
7313
  {
@@ -31,6 +31,7 @@ export default class Collector extends FlowNode {
31
31
  */
32
32
  getItemCount(): number;
33
33
  _checkStatus(): void;
34
+ #private;
34
35
  }
35
36
  import FlowNode from "./flowNode.js";
36
37
  //# sourceMappingURL=collector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"collector.d.ts","sourceRoot":"","sources":["../../../src/data/collector.js"],"names":[],"mappings":"AAQA;;;;;GAKG;AACH;IAKI;;OAEG;IACH,qBAFW,OAAO,sBAAsB,EAAE,aAAa,EActD;IATG,qDAA2C;IAE3C,2CAA2C;IAC3C,WADW,QAAU,SAAS,KAAE,IAAI,CAAC,EAAE,CACpB;IAEnB,uFAAuF;IACvF,cADW,IAAI,GAAG,GAAG,GAAG,EAAE,EAAE,OAAO,eAAe,EAAE,IAAI,CAAC,CAC5B;IAKjC,cAOC;IANG,2CAA2C;IAC3C,OADW,OAAO,eAAe,EAAE,IAAI,CACxB;IA6FnB;;OAEG;IACH,WAFa,SAAS,OAAO,eAAe,EAAE,KAAK,CAAC,CAuBnD;IAED;;;OAGG;IACH,2BAFmB,OAAO,eAAe,EAAE,KAAK,KAAK,IAAI,QAUxD;IAED;;OAEG;IACH,uBAMC;IAED,qBAMC;CACJ;qBAzLyD,eAAe"}
1
+ {"version":3,"file":"collector.d.ts","sourceRoot":"","sources":["../../../src/data/collector.js"],"names":[],"mappings":"AAQA;;;;;GAKG;AACH;IAKI;;OAEG;IACH,qBAFW,OAAO,sBAAsB,EAAE,aAAa,EActD;IATG,qDAA2C;IAE3C,2CAA2C;IAC3C,WADW,QAAU,SAAS,KAAE,IAAI,CAAC,EAAE,CACpB;IAEnB,uFAAuF;IACvF,cADW,IAAI,GAAG,GAAG,GAAG,EAAE,EAAE,OAAO,eAAe,EAAE,IAAI,CAAC,CAC5B;IAKjC,cAOC;IANG,2CAA2C;IAC3C,OADW,OAAO,eAAe,EAAE,IAAI,CACxB;IA6GnB;;OAEG;IACH,WAFa,SAAS,OAAO,eAAe,EAAE,KAAK,CAAC,CAuBnD;IAED;;;OAGG;IACH,2BAFmB,OAAO,eAAe,EAAE,KAAK,KAAK,IAAI,QAUxD;IAED;;OAEG;IACH,uBAMC;IAED,qBAMC;;CACJ;qBAzMyD,eAAe"}
@@ -107,6 +107,16 @@ export default class Collector extends FlowNode {
107
107
  sortData(data);
108
108
  }
109
109
 
110
+ this.#propagateToChildren();
111
+
112
+ super.complete();
113
+
114
+ for (const observer of this.observers) {
115
+ observer(this);
116
+ }
117
+ }
118
+
119
+ #propagateToChildren() {
110
120
  if (this.children.length) {
111
121
  for (const [key, data] of this.facetBatches.entries()) {
112
122
  if (key) {
@@ -121,11 +131,17 @@ export default class Collector extends FlowNode {
121
131
  }
122
132
  }
123
133
  }
134
+ }
124
135
 
125
- super.complete();
136
+ repropagate() {
137
+ for (const child of this.children) {
138
+ child.reset();
139
+ }
126
140
 
127
- for (const observer of this.observers) {
128
- observer(this);
141
+ this.#propagateToChildren();
142
+
143
+ for (const child of this.children) {
144
+ child.complete();
129
145
  }
130
146
  }
131
147
 
@@ -43,6 +43,9 @@ describe("Test flow graphs", () => {
43
43
  );
44
44
  });
45
45
 
46
+ test.skip("Implement stub for ParamMediator");
47
+
48
+ /*
46
49
  test("Longer chain of nodes", () => {
47
50
  const source = new SynchronousSequenceSource(10);
48
51
  const filter = new FilterTransform({
@@ -69,4 +72,5 @@ describe("Test flow graphs", () => {
69
72
  }))
70
73
  );
71
74
  });
75
+ */
72
76
  });
@@ -23,6 +23,9 @@ export const BEHAVIOR_MODIFIES: number;
23
23
  * The collected data objects must not be modified by downstream transforms.
24
24
  */
25
25
  export const BEHAVIOR_COLLECTS: number;
26
+ /**
27
+ * @typedef {{paramMediator: import("../view/paramMediator.js").default}} ParamMediatorProvider
28
+ */
26
29
  /**
27
30
  * This is heavily inspired by Vega's and Vega-Lite's data flow system.
28
31
  *
@@ -30,6 +33,17 @@ export const BEHAVIOR_COLLECTS: number;
30
33
  * @typedef {Datum[]} Data
31
34
  */
32
35
  export default class FlowNode {
36
+ /**
37
+ * @param {ParamMediatorProvider} [paramMediatorProvider]
38
+ */
39
+ constructor(paramMediatorProvider?: ParamMediatorProvider);
40
+ /**
41
+ * An object that provides a paramMediator. (Most likely a View)
42
+ *
43
+ * @type {ParamMediatorProvider}
44
+ * @protected
45
+ */
46
+ protected paramMediatorProvider: ParamMediatorProvider;
33
47
  get behavior(): number;
34
48
  /** @type {FlowNode[]} */
35
49
  children: FlowNode[];
@@ -47,16 +61,12 @@ export default class FlowNode {
47
61
  * built and optimized. Must be called before any data are to be propagated.
48
62
  */
49
63
  initialize(): void;
50
- /**
51
- * Dynamically updates the propagator method to allow the JavaScript engine
52
- * to employ optimizations such as inlining.
53
- */
54
- _updatePropagator(): void;
55
64
  /**
56
65
  *
57
66
  * @param {any} datum
67
+ * @protected
58
68
  */
59
- _propagate(datum: any): void;
69
+ protected _propagate(datum: any): void;
60
70
  /**
61
71
  *
62
72
  * @param {FlowNode} parent
@@ -104,14 +114,6 @@ export default class FlowNode {
104
114
  * @returns {string}
105
115
  */
106
116
  subtreeToString(depth?: number): string;
107
- /**
108
- * The global object for expressions (in formula and filter transforms).
109
- * Nodes in the hierarchy may extend the object using Object.create to
110
- * introduce variables that are visible downstream the flow.
111
- *
112
- * @returns {Record<string, any>}
113
- */
114
- getGlobalObject(): Record<string, any>;
115
117
  /**
116
118
  *
117
119
  * @param {Datum} datum
@@ -124,7 +126,22 @@ export default class FlowNode {
124
126
  * @param {import("../types/flowBatch.js").FlowBatch} flowBatch
125
127
  */
126
128
  beginBatch(flowBatch: import("../types/flowBatch.js").FlowBatch): void;
129
+ /**
130
+ * @returns {import("../view/paramMediator.js").default}
131
+ * @protected
132
+ */
133
+ protected get paramMediator(): import("../view/paramMediator.js").default;
134
+ /**
135
+ * Repropagates the stored data. If this node has no stored data,
136
+ * find the nearest ancestor that has and repropagate from there.
137
+ * @protected
138
+ */
139
+ protected repropagate(): void;
140
+ #private;
127
141
  }
142
+ export type ParamMediatorProvider = {
143
+ paramMediator: import("../view/paramMediator.js").default;
144
+ };
128
145
  /**
129
146
  * This is heavily inspired by Vega's and Vega-Lite's data flow system.
130
147
  */
@@ -1 +1 @@
1
- {"version":3,"file":"flowNode.d.ts","sourceRoot":"","sources":["../../../src/data/flowNode.js"],"names":[],"mappings":"AA+QA;;;GAGG;AACH,uCAHW,OAAO,uBAAuB,EAAE,SAAS,0DAKnD;AAED;;;GAGG;AACH,wCAHW,OAAO,uBAAuB,EAAE,SAAS,2DAKnD;AA3RD;;;GAGG;AACH,qCAAsC;AAEtC;;;GAGG;AACH,uCAAwC;AAExC;;;GAGG;AACH,uCAAwC;AAIxC;;;;;GAKG;AACH;IACI,uBAEC;IAGG,yBAAyB;IACzB,UADW,QAAQ,EAAE,CACH;IAElB,uBAAuB;IACvB,QADW,QAAQ,CACI;IAEvB,2CAA2C;IAC3C,mBAAsB;IAG1B;;;OAGG;IACH,cAMC;IAED;;;OAGG;IACH,mBAEC;IAED;;;OAGG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