@swr-data-lab/components 2.3.0 → 2.3.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.
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<script lang="ts">
|
|
1
|
+
<script lang="ts">import { dev } from '$app/environment';
|
|
2
|
+
import { asset } from '$app/paths';
|
|
2
3
|
let { project, charts, baseUrl } = $props();
|
|
3
4
|
</script>
|
|
4
5
|
|
|
@@ -10,22 +11,20 @@ let { project, charts, baseUrl } = $props();
|
|
|
10
11
|
<thead>
|
|
11
12
|
<tr>
|
|
12
13
|
<th>Title</th>
|
|
13
|
-
|
|
14
|
-
<th>Embed URL</th>
|
|
15
|
-
{/if}
|
|
14
|
+
<th>Embed URL</th>
|
|
16
15
|
</tr>
|
|
17
16
|
</thead>
|
|
18
17
|
<tbody>
|
|
19
18
|
{#each charts as chart}
|
|
19
|
+
{@const url = baseUrl ? `${baseUrl}/${chart.slug}` : asset(chart.slug)}
|
|
20
|
+
{@const urlPostfixed = `${url}${dev ? '' : '.html'}`}
|
|
20
21
|
<tr>
|
|
21
22
|
<td>
|
|
22
|
-
<a href=
|
|
23
|
+
<a href={urlPostfixed}>{chart.title}</a>
|
|
24
|
+
</td>
|
|
25
|
+
<td>
|
|
26
|
+
<input type="text" value={urlPostfixed} />
|
|
23
27
|
</td>
|
|
24
|
-
{#if baseUrl}
|
|
25
|
-
<td>
|
|
26
|
-
<input type="text" value={`${baseUrl}/${chart.slug}.html`} />
|
|
27
|
-
</td>
|
|
28
|
-
{/if}
|
|
29
28
|
</tr>
|
|
30
29
|
{/each}
|
|
31
30
|
</tbody>
|
|
@@ -60,9 +60,8 @@ const street_primary = {
|
|
|
60
60
|
line_width: {
|
|
61
61
|
stops: [
|
|
62
62
|
[8, 0],
|
|
63
|
-
[
|
|
64
|
-
[
|
|
65
|
-
[14, 3],
|
|
63
|
+
[13, 1],
|
|
64
|
+
[15, 2],
|
|
66
65
|
[16, 10],
|
|
67
66
|
[18, 34],
|
|
68
67
|
[19, 70],
|
|
@@ -80,9 +79,9 @@ const street_primary_case = {
|
|
|
80
79
|
line_color: tokens.street_primary_case,
|
|
81
80
|
line_width: {
|
|
82
81
|
stops: [
|
|
83
|
-
[
|
|
84
|
-
[
|
|
85
|
-
[
|
|
82
|
+
[8, 0],
|
|
83
|
+
[13, 2],
|
|
84
|
+
[15, 4],
|
|
86
85
|
[16, 12],
|
|
87
86
|
[18, 36],
|
|
88
87
|
[19, 74],
|
|
@@ -97,11 +96,12 @@ const street_primary_case = {
|
|
|
97
96
|
}
|
|
98
97
|
};
|
|
99
98
|
const street_secondary = {
|
|
99
|
+
line_color: tokens.street_secondary,
|
|
100
100
|
line_width: {
|
|
101
101
|
stops: [
|
|
102
|
-
[
|
|
103
|
-
[14,
|
|
104
|
-
[16,
|
|
102
|
+
[12, 1],
|
|
103
|
+
[14, 2],
|
|
104
|
+
[16, 8],
|
|
105
105
|
[18, 28],
|
|
106
106
|
[19, 64],
|
|
107
107
|
[20, 130]
|
|
@@ -111,10 +111,11 @@ const street_secondary = {
|
|
|
111
111
|
const street_secondary_case = {
|
|
112
112
|
line_width: {
|
|
113
113
|
stops: [
|
|
114
|
-
[12,
|
|
115
|
-
[14,
|
|
116
|
-
[16,
|
|
117
|
-
[18,
|
|
114
|
+
[12, 0],
|
|
115
|
+
[14, 3],
|
|
116
|
+
[16, 10],
|
|
117
|
+
[18, 30],
|
|
118
|
+
[19, 66],
|
|
118
119
|
[20, 40]
|
|
119
120
|
]
|
|
120
121
|
}
|
|
@@ -1209,8 +1210,8 @@ export default function makeRoads() {
|
|
|
1209
1210
|
},
|
|
1210
1211
|
'line-opacity': {
|
|
1211
1212
|
stops: [
|
|
1212
|
-
[
|
|
1213
|
-
[
|
|
1213
|
+
[13, 0],
|
|
1214
|
+
[14, 1]
|
|
1214
1215
|
]
|
|
1215
1216
|
}
|
|
1216
1217
|
},
|
|
@@ -1253,8 +1254,8 @@ export default function makeRoads() {
|
|
|
1253
1254
|
},
|
|
1254
1255
|
'line-opacity': {
|
|
1255
1256
|
stops: [
|
|
1256
|
-
[
|
|
1257
|
-
[
|
|
1257
|
+
[13, 0],
|
|
1258
|
+
[14, 1]
|
|
1258
1259
|
]
|
|
1259
1260
|
}
|
|
1260
1261
|
},
|
|
@@ -1460,7 +1461,7 @@ export default function makeRoads() {
|
|
|
1460
1461
|
['!=', 'service', 'driveway']
|
|
1461
1462
|
],
|
|
1462
1463
|
paint: {
|
|
1463
|
-
'line-color':
|
|
1464
|
+
'line-color': street_residential.line_color,
|
|
1464
1465
|
'line-width': {
|
|
1465
1466
|
stops: [
|
|
1466
1467
|
[14, 1],
|
|
@@ -1518,7 +1519,7 @@ export default function makeRoads() {
|
|
|
1518
1519
|
['!=', 'tunnel', true]
|
|
1519
1520
|
],
|
|
1520
1521
|
paint: {
|
|
1521
|
-
'line-color':
|
|
1522
|
+
'line-color': street_secondary.line_color,
|
|
1522
1523
|
'line-width': {
|
|
1523
1524
|
stops: [
|
|
1524
1525
|
[12, 1],
|
|
@@ -486,23 +486,6 @@ export default function makeWalking() {
|
|
|
486
486
|
return { source: 'versatiles-osm', ...el };
|
|
487
487
|
});
|
|
488
488
|
const walkingSurface = [
|
|
489
|
-
{
|
|
490
|
-
id: 'street-pedestrian-zone',
|
|
491
|
-
type: 'fill',
|
|
492
|
-
'source-layer': 'street_polygons',
|
|
493
|
-
filter: ['all', ['!=', 'bridge', true], ['!=', 'tunnel', true], ['==', 'kind', 'pedestrian']],
|
|
494
|
-
paint: {
|
|
495
|
-
'fill-color': 'rgba(245,245,245,0.25)',
|
|
496
|
-
'fill-opacity': {
|
|
497
|
-
stops: [
|
|
498
|
-
[12, 0],
|
|
499
|
-
[13, 1],
|
|
500
|
-
[14, 0],
|
|
501
|
-
[15, 1]
|
|
502
|
-
]
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
},
|
|
506
489
|
{
|
|
507
490
|
id: 'way-footway:case',
|
|
508
491
|
type: 'line',
|
|
@@ -625,7 +608,7 @@ export default function makeWalking() {
|
|
|
625
608
|
'source-layer': 'streets',
|
|
626
609
|
filter: ['all', ['==', 'kind', 'pedestrian'], ['!=', 'bridge', true], ['!=', 'tunnel', true]],
|
|
627
610
|
paint: {
|
|
628
|
-
'line-color':
|
|
611
|
+
'line-color': tokens.street_tertiary_case,
|
|
629
612
|
'line-width': {
|
|
630
613
|
stops: [
|
|
631
614
|
[12, 2],
|
|
@@ -638,15 +621,12 @@ export default function makeWalking() {
|
|
|
638
621
|
},
|
|
639
622
|
'line-opacity': {
|
|
640
623
|
stops: [
|
|
641
|
-
[
|
|
642
|
-
[
|
|
624
|
+
[14, 0],
|
|
625
|
+
[15, 1]
|
|
643
626
|
]
|
|
644
627
|
}
|
|
645
628
|
},
|
|
646
|
-
layout:
|
|
647
|
-
'line-join': 'round',
|
|
648
|
-
'line-cap': 'round'
|
|
649
|
-
}
|
|
629
|
+
layout: street_layout
|
|
650
630
|
},
|
|
651
631
|
{
|
|
652
632
|
id: 'way-footway',
|
|
@@ -759,10 +739,7 @@ export default function makeWalking() {
|
|
|
759
739
|
]
|
|
760
740
|
}
|
|
761
741
|
},
|
|
762
|
-
layout:
|
|
763
|
-
'line-join': 'round',
|
|
764
|
-
'line-cap': 'round'
|
|
765
|
-
}
|
|
742
|
+
layout: street_layout
|
|
766
743
|
},
|
|
767
744
|
{
|
|
768
745
|
id: 'street-pedestrian',
|
|
@@ -783,16 +760,12 @@ export default function makeWalking() {
|
|
|
783
760
|
},
|
|
784
761
|
'line-opacity': {
|
|
785
762
|
stops: [
|
|
786
|
-
[12, 0],
|
|
787
763
|
[13, 0],
|
|
788
764
|
[14, 1]
|
|
789
765
|
]
|
|
790
766
|
}
|
|
791
767
|
},
|
|
792
|
-
layout:
|
|
793
|
-
'line-join': 'round',
|
|
794
|
-
'line-cap': 'round'
|
|
795
|
-
}
|
|
768
|
+
layout: street_layout
|
|
796
769
|
},
|
|
797
770
|
{
|
|
798
771
|
id: 'street-track-bicycle',
|
|
@@ -808,10 +781,7 @@ export default function makeWalking() {
|
|
|
808
781
|
paint: {
|
|
809
782
|
'line-color': 'hsl(0,0%,100%)'
|
|
810
783
|
},
|
|
811
|
-
layout:
|
|
812
|
-
'line-join': 'round',
|
|
813
|
-
'line-cap': 'round'
|
|
814
|
-
}
|
|
784
|
+
layout: street_layout
|
|
815
785
|
},
|
|
816
786
|
{
|
|
817
787
|
id: 'street-pedestrian-bicycle',
|
|
@@ -860,10 +830,7 @@ export default function makeWalking() {
|
|
|
860
830
|
paint: {
|
|
861
831
|
'line-color': 'hsl(0,0%,100%)'
|
|
862
832
|
},
|
|
863
|
-
layout:
|
|
864
|
-
'line-join': 'round',
|
|
865
|
-
'line-cap': 'round'
|
|
866
|
-
}
|
|
833
|
+
layout: street_layout
|
|
867
834
|
},
|
|
868
835
|
{
|
|
869
836
|
id: 'street-livingstreet-bicycle',
|
|
@@ -7,14 +7,14 @@ const tokens = {
|
|
|
7
7
|
water_light: 'hsl(210, 41%, 90%)',
|
|
8
8
|
water_ocean: 'hsl(210, 25%, 96%)',
|
|
9
9
|
marsh: 'hsl(200, 14%, 97%)',
|
|
10
|
-
grass: 'hsl(
|
|
11
|
-
grass_dark: 'hsl(
|
|
12
|
-
street_primary: 'hsl(0, 0%,
|
|
13
|
-
street_primary_case: '
|
|
10
|
+
grass: 'hsl(140, 27%, 96%)',
|
|
11
|
+
grass_dark: 'hsl(148, 52%, 94%)',
|
|
12
|
+
street_primary: 'hsl(0, 0%, 96%)',
|
|
13
|
+
street_primary_case: 'hsl(0, 0%, 75%)',
|
|
14
14
|
street_secondary: 'hsl(0, 0%, 95%)',
|
|
15
15
|
street_secondary_case: 'hsl(0, 0%, 50%)',
|
|
16
16
|
street_tertiary: 'hsl(0, 0%, 95%)',
|
|
17
|
-
street_tertiary_case: 'hsl(0, 0%,
|
|
17
|
+
street_tertiary_case: 'hsl(0, 0%, 70%)',
|
|
18
18
|
label_primary: 'hsl(240, 5%, 10%)',
|
|
19
19
|
label_secondary: 'hsl(240, 2%, 30%)',
|
|
20
20
|
label_tertiary: 'hsl(240, 2%, 50%)',
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swr-data-lab/components",
|
|
3
3
|
"description": "SWR Data Lab component library",
|
|
4
|
-
"version": "2.3.
|
|
4
|
+
"version": "2.3.1",
|
|
5
5
|
"author": "SWR Data Lab",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@storybook/sveltekit": "^9.0.15",
|
|
47
47
|
"@storybook/test-runner": "^0.23.0",
|
|
48
48
|
"@sveltejs/adapter-auto": "^6.0.1",
|
|
49
|
-
"@sveltejs/kit": "^2.
|
|
49
|
+
"@sveltejs/kit": "^2.26.1",
|
|
50
50
|
"@sveltejs/package": "^2.3.12",
|
|
51
51
|
"@sveltejs/vite-plugin-svelte": "^5.1.0",
|
|
52
52
|
"@types/geojson": "^7946.0.16",
|