@kepler.gl/types 3.3.0-alpha.20 → 3.3.0-alpha.22

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/effects.d.ts CHANGED
@@ -18,12 +18,20 @@ export type EffectDescription = {
18
18
  parameters: EffectParameterDescription[];
19
19
  };
20
20
 
21
+ export type EffectParameterAnimation = {
22
+ endValue: number | number[];
23
+ easing: 'linear' | 'easeInOut';
24
+ };
25
+
26
+ export type EffectAnimation = Record<string, EffectParameterAnimation>;
27
+
21
28
  export type EffectUpdateProps = {
22
29
  isEnabled: boolean;
23
30
  isConfigActive: boolean;
24
31
  isJsonEditorActive: boolean;
25
32
  // effect specific parameters for a deck.gl effect (uniforms)
26
33
  parameters: {[key: string]: any};
34
+ animation?: EffectAnimation;
27
35
  };
28
36
 
29
37
  export type EffectProps = EffectUpdateProps & {
@@ -41,6 +49,7 @@ export interface Effect {
41
49
  isJsonEditorActive: boolean;
42
50
  // effect specific parameters for a deck.gl effect (uniforms)
43
51
  parameters: {[key: string]: any};
52
+ animation?: EffectAnimation;
44
53
  deckEffect: any;
45
54
  _uiConfig: EffectParameterDescription[];
46
55
 
package/layers.d.ts CHANGED
@@ -266,7 +266,7 @@ export type VisConfig = {
266
266
  ) => boolean;
267
267
 
268
268
  allowCustomValue?: boolean;
269
- /** Checkbox label shown when allowCustomValue is true. Defaults to "custom input". */
269
+ /** Label for the custom-value edit button when allowCustomValue is true. */
270
270
  customInputLabel?: string;
271
271
  };
272
272
 
@@ -467,8 +467,10 @@ export type LayerTextConfig = {
467
467
  };
468
468
 
469
469
  export type LayerCallbacks = {
470
+ onLayerError?: (idx: number, error: Error) => void;
470
471
  onLayerHover?: (idx: number, value: any) => void;
471
472
  onSetLayerDomain?: (idx: number, value: any) => void;
473
+ onLayerVisConfigChange?: (idx: number, value: Partial<LayerVisConfig>) => void;
472
474
  onFilteredItemsChange?: (
473
475
  idx: number,
474
476
  event: {
@@ -489,8 +491,10 @@ export type LayerCallbacks = {
489
491
  };
490
492
 
491
493
  export type BindedLayerCallbacks = {
494
+ onLayerError?: (error: Error) => void;
492
495
  onLayerHover?: (value: any) => void;
493
496
  onSetLayerDomain?: (value: any) => void;
497
+ onLayerVisConfigChange?: (value: Partial<LayerVisConfig>) => void;
494
498
  onFilteredItemsChange?: (event: {id: string; count: number}) => void;
495
499
  onWMSFeatureInfo?: (props: {
496
500
  featureInfo: Array<{name: string; value: string}> | string | null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kepler.gl/types",
3
3
  "author": "Shan He <shan@uber.com>",
4
- "version": "3.3.0-alpha.20",
4
+ "version": "3.3.0-alpha.22",
5
5
  "description": "kepler.gl types used by kepler.gl components, actions and reducers",
6
6
  "license": "MIT",
7
7
  "types": "index.d.ts",
package/reducers.d.ts CHANGED
@@ -144,6 +144,9 @@ export type LineChartGroupBy = {
144
144
  };
145
145
 
146
146
  export type PlotGroupBy = {
147
+ /** Omitted in older configs, which keep independent grouping. */
148
+ source?: 'independent' | 'layer';
149
+ layerId?: string;
147
150
  fieldName?: string;
148
151
  numGroups: number | 'ALL';
149
152
  groupOthers: boolean;
@@ -182,6 +185,8 @@ export type FilterBase<L extends LineChart> = {
182
185
  view: FilterViewType;
183
186
  isAnimating: boolean;
184
187
  animationWindow?: string;
188
+ /** Whether playback repeats. Missing values preserve looping in older saved maps. */
189
+ animationLoop?: boolean;
185
190
  speed: number;
186
191
  showTimeDisplay?: boolean;
187
192
 
@@ -285,6 +290,8 @@ export interface Bin {
285
290
  indexes: number[];
286
291
  x0: number;
287
292
  x1: number;
293
+ /** Derived categorical counts within this bin; unrepresented rows retain the base color. */
294
+ segments?: {name: string; color: string; count: number}[];
288
295
  }
289
296
 
290
297
  export interface Bins {
@@ -304,7 +311,7 @@ export interface PlotType {
304
311
  aggregation: ValueOf<AggregationTypes>;
305
312
  defaultTimeFormat: string;
306
313
  colorsByDataId?: {[dataId: string]: string};
307
- /** Categorical series split for the timeline line chart. */
314
+ /** Categorical split for timeline histogram bins and line chart series. */
308
315
  groupBy?: PlotGroupBy | null;
309
316
  yAxisAutoRange?: boolean;
310
317
  }
@@ -660,7 +667,13 @@ export type UiTheme = string;
660
667
 
661
668
  export type PanelListView = string;
662
669
 
670
+ /** Transient playback requests; never serialized with the saved map. */
671
+ export type CameraTourPlaybackRequest =
672
+ | {action: 'play' | 'pause'}
673
+ | {action: 'seek'; elapsedMs: number};
674
+
663
675
  export type UiState = {
676
+ cameraTourPlaybackRequest?: CameraTourPlaybackRequest & {sequence: number};
664
677
  readOnly: boolean;
665
678
  activeSidePanel: string | null;
666
679
  currentModal: string | null;