-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Expand file tree
/
Copy pathtypes.ts
More file actions
89 lines (69 loc) · 1.84 KB
/
Copy pathtypes.ts
File metadata and controls
89 lines (69 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// deck.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
import type {Layer, View} from '@deck.gl/core';
// ===== Base Types =====
export type Basemap = 'deck-only' | 'google-maps' | 'mapbox' | 'maplibre';
export type Framework = 'pure-js' | 'react';
export type StressTest =
| 'none'
| 'points-10k'
| 'points-100k'
| 'points-1m'
| 'points-5m'
| 'points-10m';
export type InitialViewState = {
latitude: number;
longitude: number;
zoom: number;
bearing?: number;
pitch?: number;
};
export type MultiViewState = {
[viewId: string]: InitialViewState | {target: number[]; zoom: number};
};
// ===== Dimension Types =====
export type Dimensions = {
basemap: Basemap;
framework: Framework;
interleaved: boolean;
globe: boolean;
multiView: boolean;
maskDemo: boolean;
stressTest: StressTest;
useDevicePixels: boolean | number;
};
// ===== Validation Types =====
export type ValidationWarning = {
dimension: keyof Dimensions;
message: string;
severity: 'warning' | 'info';
};
export type ValidationResult = {
warnings: ValidationWarning[];
};
// ===== Callbacks =====
export type ViewStateChangeCallback = (viewState: InitialViewState) => void;
// ===== Configuration Output =====
export type Config = {
// Core dimensions
basemap: Basemap;
framework: Framework;
interleaved: boolean;
globe: boolean;
multiView: boolean;
maskDemo: boolean;
stressTest: StressTest;
useDevicePixels: boolean | number;
// Computed configuration
mapStyle: string;
initialViewState: InitialViewState | MultiViewState;
layers: Layer[];
// Multi-view specific (only present when multiView: true)
views?: View[];
layerFilter?: (args: {layer: Layer; viewport: any}) => boolean;
// Callbacks
onViewStateChange?: ViewStateChangeCallback;
// Validation results
validation: ValidationResult;
};