-
Notifications
You must be signed in to change notification settings - Fork 1
/
base.js
130 lines (126 loc) · 2.96 KB
/
base.js
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
import { deepMerge } from '../utils';
const defaultKinds = {
default: {
container: {
// any box props
align: 'center',
justify: 'center',
background: 'background-front',
border: {
color: 'border',
size: 'small',
},
elevation: 'medium',
flex: false,
round: 'full',
},
// icon: undefined,
},
};
const markerKinds = deepMerge(defaultKinds, {
default: {
container: {
height: { min: '25px', max: '25px' },
width: { min: '25px', max: '25px' },
},
},
});
const base = {
pin: {
...markerKinds,
},
cluster: {
...defaultKinds,
size: {
small: {
container: {
height: { min: '36px', max: '36px' },
width: { min: '36px', max: '36px' },
},
label: {
// any text props
size: 'small',
},
},
medium: {
container: {
direction: 'row-reverse',
gap: 'xxsmall',
height: { min: '48px', max: '48px' },
width: { min: '48px', max: '48px' },
},
label: {
color: 'text-strong',
size: 'medium',
weight: 500,
},
},
large: {
container: {
direction: 'row-reverse',
gap: 'xxsmall',
height: { min: '54px', max: '54px' },
width: { min: '54px', max: '54px' },
},
label: {
size: 'medium',
},
},
},
},
popup: {
background: 'background-front',
border: { color: 'border-weak', size: 'xsmall' },
gap: 'xsmall',
margin: 'none',
pad: 'small',
round: 'xsmall',
},
tiles: {
// water: 'purple',
// majorRoad: 'transparent',
// buildings: 'darkgray',
// park: 'gray',
// mediumRoad: '#FFF2C8',
// minorRoad: '#ffffff',
// boundaries: '#9e9e9e',
},
// TODO: define tile API, considering dark/light with flexible theming
// tiles: {
// Colors and feature mapping from Protomaps [basemap layers]
// (https://docs.protomaps.com/basemaps/layers#basemap-layers) derived from OpenStreetMap.
// earth: '#FFFBF6',
// glacier: '#ffffff',
// residential: '#F4F4F8',
// hospital: '#FFF6F6',
// cemetery: '#EFF2EE',
// school: '#F7F6FF',
// industrial: '#FFF9EF',
// wood: '#F4F9EF',
// grass: '#EBF9E3',
// park: '#E5F9D5',
// water: '#B7DFF2',
// sand: '#ebebeb',
// buildings: '#F2EDE8',
// highwayCasing: '#FFC3C3',
// majorRoadCasing: '#FFB9B9',
// mediumRoadCasing: '#FFCE8E',
// minorRoadCasing: '#cccccc',
// highway: '#FFCEBB',
// majorRoad: '#FFE4B3',
// mediumRoad: '#FFF2C8',
// minorRoad: '#ffffff',
// boundaries: '#9e9e9e',
// mask: '#dddddd',
// countryLabel: '#aaaaaa',
// cityLabel: '#6C6C6C',
// stateLabel: '#999999',
// neighbourhoodLabel: '#888888',
// landuseLabel: '#898989',
// waterLabel: '#41ABDC',
// naturalLabel: '#4B8F14',
// roadsLabel: '#888888',
// poisLabel: '#606060',
// },
};
export { base };