@versatiles/style 5.5.2 → 5.7.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/README.MD +36 -33
- package/dist/index.d.ts +539 -65
- package/dist/index.js +782 -217
- package/dist/index.js.map +1 -1
- package/package.json +26 -25
- package/src/color/abstract.ts +145 -26
- package/src/color/hsl.ts +88 -5
- package/src/color/hsv.ts +73 -5
- package/src/color/index.test.ts +0 -20
- package/src/color/index.ts +0 -3
- package/src/color/random.test.ts +21 -0
- package/src/color/rgb.test.ts +40 -72
- package/src/color/rgb.ts +152 -7
- package/src/color/utils.ts +10 -4
- package/src/guess_style/guess_style.test.ts +1 -1
- package/src/guess_style/guess_style.ts +42 -2
- package/src/index.test.ts +2 -1
- package/src/index.ts +89 -4
- package/src/shortbread/layers.ts +30 -5
- package/src/style_builder/recolor.test.ts +46 -0
- package/src/style_builder/recolor.ts +161 -34
- package/src/style_builder/style_builder.test.ts +2 -0
- package/src/style_builder/style_builder.ts +8 -9
- package/src/style_builder/types.ts +23 -58
- package/src/styles/colorful.ts +36 -7
- package/src/styles/index.ts +2 -0
- package/src/styles/shadow.ts +11 -0
package/README.MD
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
| **graybeard** | <img width="384" src="https://versatiles.org/versatiles-style/graybeard.png" alt="graybeard style" /> |
|
|
18
18
|
| **eclipse** | <img width="384" src="https://versatiles.org/versatiles-style/eclipse.png" alt="eclipse style" /> |
|
|
19
19
|
| **neutrino** | <img width="384" src="https://versatiles.org/versatiles-style/neutrino.png" alt="neutrino style" /> |
|
|
20
|
+
| **shadow** | <img width="384" src="https://versatiles.org/versatiles-style/shadow.png" alt="shadow style" /> |
|
|
20
21
|
|
|
21
22
|
---
|
|
22
23
|
|
|
@@ -93,6 +94,7 @@ The library offers the following style generation methods:
|
|
|
93
94
|
- `eclipse(options)` - [Documentation](https://versatiles.org/versatiles-style/functions/eclipse.html)
|
|
94
95
|
- `graybeard(options)` - [Documentation](https://versatiles.org/versatiles-style/functions/graybeard.html)
|
|
95
96
|
- `neutrino(options)` - [Documentation](https://versatiles.org/versatiles-style/functions/neutrino.html)
|
|
97
|
+
- `shadow(options)` - [Documentation](https://versatiles.org/versatiles-style/functions/shadow.html)
|
|
96
98
|
|
|
97
99
|
**`options`**: An optional object to customize the styles. [Learn more](https://versatiles.org/versatiles-style/interfaces/StyleBuilderOptions.html)
|
|
98
100
|
|
|
@@ -139,6 +141,10 @@ A local server will be available at <http://localhost:8080>. Use it to select a
|
|
|
139
141
|
<!--- This chapter is generated automatically --->
|
|
140
142
|
|
|
141
143
|
```mermaid
|
|
144
|
+
---
|
|
145
|
+
config:
|
|
146
|
+
layout: elk
|
|
147
|
+
---
|
|
142
148
|
flowchart TB
|
|
143
149
|
|
|
144
150
|
subgraph 0["src"]
|
|
@@ -153,7 +159,7 @@ subgraph 1["color"]
|
|
|
153
159
|
end
|
|
154
160
|
subgraph 9["guess_style"]
|
|
155
161
|
A["guess_style.ts"]
|
|
156
|
-
|
|
162
|
+
Z["index.ts"]
|
|
157
163
|
end
|
|
158
164
|
subgraph B["lib"]
|
|
159
165
|
C["utils.ts"]
|
|
@@ -161,16 +167,17 @@ end
|
|
|
161
167
|
subgraph D["styles"]
|
|
162
168
|
E["index.ts"]
|
|
163
169
|
F["colorful.ts"]
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
170
|
+
Q["eclipse.ts"]
|
|
171
|
+
R["empty.ts"]
|
|
172
|
+
S["graybeard.ts"]
|
|
173
|
+
T["neutrino.ts"]
|
|
174
|
+
U["shadow.ts"]
|
|
168
175
|
end
|
|
169
176
|
subgraph G["style_builder"]
|
|
170
177
|
H["style_builder.ts"]
|
|
171
178
|
M["decorator.ts"]
|
|
172
179
|
O["recolor.ts"]
|
|
173
|
-
|
|
180
|
+
P["types.ts"]
|
|
174
181
|
end
|
|
175
182
|
subgraph I["shortbread"]
|
|
176
183
|
J["index.ts"]
|
|
@@ -178,13 +185,13 @@ K["layers.ts"]
|
|
|
178
185
|
L["template.ts"]
|
|
179
186
|
N["properties.ts"]
|
|
180
187
|
end
|
|
181
|
-
subgraph
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
188
|
+
subgraph V["types"]
|
|
189
|
+
W["index.ts"]
|
|
190
|
+
X["tilejson.ts"]
|
|
191
|
+
Y["vector_layer.ts"]
|
|
192
|
+
11["maplibre.ts"]
|
|
186
193
|
end
|
|
187
|
-
|
|
194
|
+
10["index.ts"]
|
|
188
195
|
end
|
|
189
196
|
3-->2
|
|
190
197
|
3-->4
|
|
@@ -201,52 +208,48 @@ end
|
|
|
201
208
|
7-->2
|
|
202
209
|
7-->3
|
|
203
210
|
7-->4
|
|
204
|
-
7-->8
|
|
205
211
|
7-->5
|
|
206
212
|
8-->4
|
|
207
213
|
8-->6
|
|
208
|
-
A-->
|
|
214
|
+
A-->8
|
|
209
215
|
A-->C
|
|
210
216
|
A-->E
|
|
211
|
-
A-->
|
|
212
|
-
A-->
|
|
217
|
+
A-->W
|
|
218
|
+
A-->X
|
|
213
219
|
C-->7
|
|
214
220
|
E-->F
|
|
215
|
-
E-->P
|
|
216
221
|
E-->Q
|
|
217
222
|
E-->R
|
|
218
223
|
E-->S
|
|
224
|
+
E-->T
|
|
225
|
+
E-->U
|
|
219
226
|
F-->H
|
|
220
227
|
H-->7
|
|
221
228
|
H-->C
|
|
222
229
|
H-->J
|
|
223
230
|
H-->M
|
|
224
231
|
H-->O
|
|
232
|
+
H-->P
|
|
225
233
|
J-->K
|
|
226
234
|
J-->L
|
|
227
235
|
M-->7
|
|
228
236
|
M-->C
|
|
229
237
|
M-->N
|
|
230
238
|
O-->7
|
|
231
|
-
P-->F
|
|
232
239
|
Q-->F
|
|
233
240
|
R-->F
|
|
234
241
|
S-->F
|
|
235
|
-
|
|
236
|
-
U-->
|
|
237
|
-
X
|
|
238
|
-
Y
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
style D fill-opacity:0.2
|
|
247
|
-
style G fill-opacity:0.2
|
|
248
|
-
style I fill-opacity:0.2
|
|
249
|
-
style T fill-opacity:0.2
|
|
242
|
+
T-->F
|
|
243
|
+
U-->F
|
|
244
|
+
W-->X
|
|
245
|
+
W-->Y
|
|
246
|
+
Z-->A
|
|
247
|
+
10-->7
|
|
248
|
+
10-->Z
|
|
249
|
+
10-->E
|
|
250
|
+
|
|
251
|
+
class 0,1,9,B,D,G,I,V subgraphs;
|
|
252
|
+
classDef subgraphs fill-opacity:0.1, fill:#888, color:#888, stroke:#888;
|
|
250
253
|
```
|
|
251
254
|
|
|
252
255
|
## Licenses
|