@k2b/ui 0.30.0 → 0.31.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 +1 -1
- package/dist/browser/actions/Toolbar.js +2 -0
- package/dist/browser/actions/Toolbar.js.map +1 -1
- package/dist/browser/chat/ChatDecision.js +28 -2
- package/dist/browser/chat/ChatDecision.js.map +1 -1
- package/dist/browser/content/MapAttribution.js +27 -0
- package/dist/browser/content/MapAttribution.js.map +1 -0
- package/dist/browser/content/MapView.js +553 -0
- package/dist/browser/content/MapView.js.map +1 -0
- package/dist/browser/content/MapViewFrame.js +395 -0
- package/dist/browser/content/MapViewFrame.js.map +1 -0
- package/dist/browser/content/index.js +5 -0
- package/dist/browser/content/index.js.map +1 -1
- package/dist/browser/content/map-palette.js +39 -0
- package/dist/browser/content/map-palette.js.map +1 -0
- package/dist/browser/content/map-style.js +276 -0
- package/dist/browser/content/map-style.js.map +1 -0
- package/dist/browser/content/map-view-geometry.js +269 -0
- package/dist/browser/content/map-view-geometry.js.map +1 -0
- package/dist/browser/content/map-view-live.js +28 -0
- package/dist/browser/content/map-view-live.js.map +1 -0
- package/dist/browser/content/map-view-messages.js +53 -0
- package/dist/browser/content/map-view-messages.js.map +1 -0
- package/dist/browser/content/map-view-types.js +2 -0
- package/dist/browser/content/map-view-types.js.map +1 -0
- package/dist/browser/content/map-view-worker.js +10 -0
- package/dist/browser/feedback/dialog-core.js +19 -0
- package/dist/browser/feedback/dialog-core.js.map +1 -1
- package/dist/browser/layout/AppWorkspace.js +17 -9
- package/dist/browser/layout/AppWorkspace.js.map +1 -1
- package/dist/browser/layout/app-workspace-controller.js +114 -8
- package/dist/browser/layout/app-workspace-controller.js.map +1 -1
- package/dist/browser/layout/app-workspace-width.js +26 -0
- package/dist/browser/layout/app-workspace-width.js.map +1 -0
- package/dist/browser/layout/index.js +1 -1
- package/dist/browser/layout/index.js.map +1 -1
- package/dist/licenses/maplibre-gl.txt +116 -0
- package/dist/ssr/actions/Toolbar.js +2 -0
- package/dist/ssr/actions/Toolbar.js.map +1 -1
- package/dist/ssr/chat/ChatDecision.js +11 -0
- package/dist/ssr/chat/ChatDecision.js.map +1 -1
- package/dist/ssr/content/MapAttribution.js +19 -0
- package/dist/ssr/content/MapAttribution.js.map +1 -0
- package/dist/ssr/content/MapView.js +474 -0
- package/dist/ssr/content/MapView.js.map +1 -0
- package/dist/ssr/content/MapViewFrame.js +193 -0
- package/dist/ssr/content/MapViewFrame.js.map +1 -0
- package/dist/ssr/content/index.js +5 -0
- package/dist/ssr/content/index.js.map +1 -1
- package/dist/ssr/content/map-palette.js +39 -0
- package/dist/ssr/content/map-palette.js.map +1 -0
- package/dist/ssr/content/map-style.js +276 -0
- package/dist/ssr/content/map-style.js.map +1 -0
- package/dist/ssr/content/map-view-geometry.js +269 -0
- package/dist/ssr/content/map-view-geometry.js.map +1 -0
- package/dist/ssr/content/map-view-live.js +1 -0
- package/dist/ssr/content/map-view-messages.js +53 -0
- package/dist/ssr/content/map-view-messages.js.map +1 -0
- package/dist/ssr/content/map-view-types.js +2 -0
- package/dist/ssr/content/map-view-types.js.map +1 -0
- package/dist/ssr/feedback/dialog-core.js +19 -0
- package/dist/ssr/feedback/dialog-core.js.map +1 -1
- package/dist/ssr/layout/AppWorkspace.js +17 -9
- package/dist/ssr/layout/AppWorkspace.js.map +1 -1
- package/dist/ssr/layout/app-workspace-controller.js +114 -8
- package/dist/ssr/layout/app-workspace-controller.js.map +1 -1
- package/dist/ssr/layout/app-workspace-width.js +26 -0
- package/dist/ssr/layout/app-workspace-width.js.map +1 -0
- package/dist/ssr/layout/index.js +1 -1
- package/dist/ssr/layout/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/content/MapAttribution.d.ts +6 -0
- package/dist/types/content/MapView.d.ts +5 -0
- package/dist/types/content/MapViewFrame.d.ts +31 -0
- package/dist/types/content/index.d.ts +6 -0
- package/dist/types/content/map-palette.d.ts +58 -0
- package/dist/types/content/map-style.d.ts +29 -0
- package/dist/types/content/map-view-geometry.d.ts +55 -0
- package/dist/types/content/map-view-live.d.ts +2 -0
- package/dist/types/content/map-view-messages.d.ts +21 -0
- package/dist/types/content/map-view-types.d.ts +61 -0
- package/dist/types/feedback/dialog-core.d.ts +1 -0
- package/dist/types/layout/AppWorkspace.d.ts +7 -3
- package/dist/types/layout/app-workspace-width.d.ts +13 -0
- package/dist/types/layout/index.d.ts +2 -2
- package/map-glyphs/IBM Plex Sans Medium/0-255.pbf +0 -0
- package/map-glyphs/IBM Plex Sans Medium/1024-1279.pbf +0 -0
- package/map-glyphs/IBM Plex Sans Medium/256-511.pbf +0 -0
- package/map-glyphs/IBM Plex Sans Medium/512-767.pbf +0 -0
- package/map-glyphs/IBM Plex Sans Medium/768-1023.pbf +0 -0
- package/map-glyphs/IBM Plex Sans Medium/7680-7935.pbf +0 -0
- package/map-glyphs/IBM Plex Sans Medium/8192-8447.pbf +0 -0
- package/map-glyphs/IBM Plex Sans Medium/8448-8703.pbf +0 -0
- package/map-glyphs/IBM Plex Sans Medium/8704-8959.pbf +0 -0
- package/map-glyphs/OFL.txt +93 -0
- package/package.json +10 -5
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { mergeProps as _$mergeProps } from "solid-js/web";
|
|
2
|
+
import { ssrStyleProperty as _$ssrStyleProperty } from "solid-js/web";
|
|
3
|
+
import { memo as _$memo } from "solid-js/web";
|
|
4
|
+
import { ssr as _$ssr } from "solid-js/web";
|
|
5
|
+
import { ssrAttribute as _$ssrAttribute } from "solid-js/web";
|
|
6
|
+
import { createComponent as _$createComponent } from "solid-js/web";
|
|
7
|
+
import { escape as _$escape } from "solid-js/web";
|
|
8
|
+
import { ssrStyle as _$ssrStyle } from "solid-js/web";
|
|
9
|
+
var _tmpl$ = ["<div class=\"k2b-map-view__fit\" style=\"", "\"><svg class=\"k2b-map-view__geometry\" viewBox=\"", "\" preserveAspectRatio=\"none\" overflow=\"visible\" aria-hidden=\"true\">", "", "", "</svg>", "<div class=\"k2b-map-view__pins\" role=\"group\"", ">", "</div></div>"],
|
|
10
|
+
_tmpl$2 = ["<path class=\"k2b-map-view__area\"", " vector-effect=\"non-scaling-stroke\"></path>"],
|
|
11
|
+
_tmpl$3 = ["<path class=\"k2b-map-view__casing\"", " vector-effect=\"non-scaling-stroke\"></path>"],
|
|
12
|
+
_tmpl$4 = ["<g class=\"k2b-map-view__line\"", ">", "<path class=\"k2b-map-view__stroke\"", " vector-effect=\"non-scaling-stroke\"></path></g>"],
|
|
13
|
+
_tmpl$5 = ["<circle class=\"k2b-map-view__accuracy\"", " vector-effect=\"non-scaling-stroke\"></circle>"],
|
|
14
|
+
_tmpl$6 = ["<span class=\"k2b-map-view__me\" role=\"img\"", " style=\"", "\"></span>"],
|
|
15
|
+
_tmpl$7 = ["<span class=\"k2b-map-view__pin\"", " style=\"", "\" role=\"img\"", "><span aria-hidden=\"true\">", "</span></span>"],
|
|
16
|
+
_tmpl$8 = ["<button type=\"button\" class=\"k2b-map-view__pin\"", " style=\"", "\"", "><span aria-hidden=\"true\">", "</span></button>"],
|
|
17
|
+
_tmpl$9 = ["<div class=\"k2b-map-view__scale\" style=\"", "\"><span>", "</span><div></div></div>"],
|
|
18
|
+
_tmpl$0 = ["<div class=\"k2b-map-view__foot-row\">", "<div class=\"k2b-map-view__attribution\">", "</div></div>"],
|
|
19
|
+
_tmpl$1 = ["<div class=\"", "\" style=\"", "\" data-state=\"static\" role=\"region\"", "><span class=\"k2b-sr-only\">", "</span>", "<div class=\"k2b-map-view__foot\">", "</div></div>"];
|
|
20
|
+
import { createMemo, For, Show } from "solid-js";
|
|
21
|
+
import { DEFAULT_PADDING, EARTH_CIRCUMFERENCE, isStop, linePoints, mapFrame, pinHitRadii, pinOffsets, projectPoint, scaleBar, sortMarkers, unprojectPoint } from "./map-view-geometry";
|
|
22
|
+
import { useMapViewMessages } from "./map-view-messages";
|
|
23
|
+
const S = 1e6;
|
|
24
|
+
export const mapNumber = value => String(Number(value.toFixed(6)));
|
|
25
|
+
export const selectedMarker = (markers, selectedId) => selectedId !== undefined ? markers.find(marker => marker.id === selectedId) : markers.find(marker => marker.selected);
|
|
26
|
+
|
|
27
|
+
/** The CSS form of fitCamera's width rule, so the server lays out exactly what MapLibre shows. */
|
|
28
|
+
const fittedWidth = (frame, padding) => `max(min(100% - ${2 * padding}px, ${frame.referenceWidth}px), ${frame.minWidth}px)`;
|
|
29
|
+
export function frameStyle(frame, padding) {
|
|
30
|
+
return {
|
|
31
|
+
left: "50%",
|
|
32
|
+
top: "50%",
|
|
33
|
+
width: fittedWidth(frame, padding),
|
|
34
|
+
"aspect-ratio": `${frame.spanX} / ${frame.spanY}`,
|
|
35
|
+
transform: "translate(-50%, -50%)"
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
const pointInFrame = (point, frame) => {
|
|
39
|
+
const p = projectPoint(point);
|
|
40
|
+
return {
|
|
41
|
+
x: (p.x - frame.minX) / frame.spanX,
|
|
42
|
+
y: (p.y - frame.minY) / frame.spanY
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
const positionStyle = (point, frame) => {
|
|
46
|
+
const p = pointInFrame(point, frame);
|
|
47
|
+
return {
|
|
48
|
+
left: `${mapNumber(p.x * 100)}%`,
|
|
49
|
+
top: `${mapNumber(p.y * 100)}%`
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
const path = (points, frame, closed = false) => points.map((point, index) => {
|
|
53
|
+
const p = projectPoint(point);
|
|
54
|
+
return `${index ? "L" : "M"}${mapNumber((p.x - frame.minX) * S)} ${mapNumber((p.y - frame.minY) * S)}`;
|
|
55
|
+
}).join(" ") + (closed && points.length ? " Z" : "");
|
|
56
|
+
export function MapGeometry(props) {
|
|
57
|
+
const messages = useMapViewMessages();
|
|
58
|
+
const markers = createMemo(() => sortMarkers(props.markers ?? []));
|
|
59
|
+
const markerIds = createMemo(() => markers().map(marker => marker.id));
|
|
60
|
+
const markersById = createMemo(() => new Map(markers().map(marker => [marker.id, marker])));
|
|
61
|
+
const offsets = createMemo(() => pinOffsets(markers(), props.frame, props.zoomFactor, props.ownLocation?.point));
|
|
62
|
+
const hitRadii = createMemo(() => pinHitRadii(markers(), props.frame, offsets(), props.zoomFactor));
|
|
63
|
+
// Input order decides the fallback selection, as in MapView; sorting is only for drawing and keys.
|
|
64
|
+
const selected = createMemo(() => selectedMarker(props.markers ?? [], props.selectedId));
|
|
65
|
+
const keydown = (event, id) => {
|
|
66
|
+
const index = markerIds().indexOf(id);
|
|
67
|
+
let next;
|
|
68
|
+
switch (event.key) {
|
|
69
|
+
case "ArrowRight":
|
|
70
|
+
case "ArrowDown":
|
|
71
|
+
next = (index + 1) % markers().length;
|
|
72
|
+
break;
|
|
73
|
+
case "ArrowLeft":
|
|
74
|
+
case "ArrowUp":
|
|
75
|
+
next = (index + markers().length - 1) % markers().length;
|
|
76
|
+
break;
|
|
77
|
+
case "Home":
|
|
78
|
+
next = 0;
|
|
79
|
+
break;
|
|
80
|
+
case "End":
|
|
81
|
+
next = markers().length - 1;
|
|
82
|
+
break;
|
|
83
|
+
default:
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
event.preventDefault();
|
|
87
|
+
event.stopPropagation();
|
|
88
|
+
const target = markers()[next];
|
|
89
|
+
if (target) {
|
|
90
|
+
event.currentTarget.parentElement?.querySelectorAll(".k2b-map-view__pin")[next]?.focus({
|
|
91
|
+
preventScroll: true
|
|
92
|
+
});
|
|
93
|
+
props.onSelect?.(target.id);
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
return _$ssr(_tmpl$, _$ssrStyle(props.boxStyle ?? frameStyle(props.frame, props.padding ?? DEFAULT_PADDING)), `0 0 ${_$escape(mapNumber(props.frame.spanX * S), true)} ${_$escape(mapNumber(props.frame.spanY * S), true)}`, _$escape(_$createComponent(For, {
|
|
97
|
+
get each() {
|
|
98
|
+
return props.areas;
|
|
99
|
+
},
|
|
100
|
+
children: area => _$ssr(_tmpl$2, _$ssrAttribute("data-tone", _$escape(area.tone ?? "accent", true), false) + _$ssrAttribute("d", _$escape(path(area.polygon, props.frame, true), true), false))
|
|
101
|
+
})), _$escape(_$createComponent(For, {
|
|
102
|
+
get each() {
|
|
103
|
+
return props.lines;
|
|
104
|
+
},
|
|
105
|
+
children: line => _$ssr(_tmpl$4, _$ssrAttribute("data-tone", _$escape(line.tone ?? "accent", true), false), _$escape(_$createComponent(Show, {
|
|
106
|
+
get when() {
|
|
107
|
+
return !line.tone || line.tone === "accent" || line.tone === "preview";
|
|
108
|
+
},
|
|
109
|
+
get children() {
|
|
110
|
+
return _$ssr(_tmpl$3, _$ssrAttribute("d", _$escape(path(linePoints(line), props.frame), true), false));
|
|
111
|
+
}
|
|
112
|
+
})), _$ssrAttribute("d", _$escape(path(linePoints(line), props.frame), true), false))
|
|
113
|
+
})), _$escape(_$createComponent(Show, {
|
|
114
|
+
get when() {
|
|
115
|
+
return props.ownLocation;
|
|
116
|
+
},
|
|
117
|
+
children: location => {
|
|
118
|
+
const p = () => projectPoint(location().point);
|
|
119
|
+
return _$ssr(_tmpl$5, _$ssrAttribute("cx", _$escape(mapNumber((p().x - props.frame.minX) * S), true), false) + _$ssrAttribute("cy", _$escape(mapNumber((p().y - props.frame.minY) * S), true), false) + _$ssrAttribute("r", _$escape(mapNumber((location().accuracyMeters ?? 0) / (EARTH_CIRCUMFERENCE * Math.cos(location().point.lat * Math.PI / 180)) * S), true), false));
|
|
120
|
+
}
|
|
121
|
+
})), _$escape(_$createComponent(Show, {
|
|
122
|
+
get when() {
|
|
123
|
+
return props.ownLocation;
|
|
124
|
+
},
|
|
125
|
+
children: location => _$ssr(_tmpl$6, _$ssrAttribute("aria-label", _$escape(messages().ownLocation, true), false), _$ssrStyle(positionStyle(location().point, props.frame)))
|
|
126
|
+
})), _$ssrAttribute("aria-label", _$escape(messages().pins, true), false), _$escape(_$createComponent(For, {
|
|
127
|
+
get each() {
|
|
128
|
+
return markerIds();
|
|
129
|
+
},
|
|
130
|
+
children: id => {
|
|
131
|
+
const marker = () => markersById().get(id);
|
|
132
|
+
const name = () => marker().mark === undefined ? marker().label : `${marker().mark} ${marker().label}`;
|
|
133
|
+
const style = () => ({
|
|
134
|
+
...positionStyle(marker().point, props.frame),
|
|
135
|
+
"--k2b-map-pin-dx": `${mapNumber(offsets().get(marker().id)?.dx ?? 0)}px`,
|
|
136
|
+
"--k2b-map-pin-dy": `${mapNumber(offsets().get(marker().id)?.dy ?? 0)}px`,
|
|
137
|
+
"--k2b-map-pin-hit": `${mapNumber(hitRadii().get(marker().id) ?? 22)}px`
|
|
138
|
+
});
|
|
139
|
+
if (!props.interactive) return _$ssr(_tmpl$7, _$ssrAttribute("data-id", _$escape(marker().id, true), false) + _$ssrAttribute("data-tone", _$escape(marker().tone ?? "accent", true), false) + _$ssrAttribute("data-stop", _$escape(isStop(marker()) || undefined, true), false) + _$ssrAttribute("data-drop", _$escape(marker().mark === undefined || undefined, true), false) + _$ssrAttribute("data-selected", _$escape(selected()?.id === marker().id || undefined, true), false), _$ssrStyle(style()), _$ssrAttribute("aria-label", _$escape(name(), true), false), _$escape(marker().mark));
|
|
140
|
+
return _$ssr(_tmpl$8, _$ssrAttribute("data-id", _$escape(marker().id, true), false) + _$ssrAttribute("data-tone", _$escape(marker().tone ?? "accent", true), false) + _$ssrAttribute("data-stop", _$escape(isStop(marker()) || undefined, true), false) + _$ssrAttribute("data-drop", _$escape(marker().mark === undefined || undefined, true), false), _$ssrStyle(style()), _$ssrAttribute("aria-label", _$escape(name(), true), false) + _$ssrAttribute("aria-pressed", _$escape(selected()?.id, true) === _$escape(marker().id, true), false) + _$ssrAttribute("tabindex", (selected() ?? markers()[0])?.id === marker().id ? 0 : -1, false), _$escape(marker().mark));
|
|
141
|
+
}
|
|
142
|
+
})));
|
|
143
|
+
}
|
|
144
|
+
export function referenceScale(frame, padding) {
|
|
145
|
+
const center = unprojectPoint(frame.minX + frame.spanX / 2, frame.minY + frame.spanY / 2);
|
|
146
|
+
const spanMeters = frame.spanX * EARTH_CIRCUMFERENCE * Math.cos(center.lat * Math.PI / 180);
|
|
147
|
+
const bar = scaleBar(spanMeters / frame.referenceWidth);
|
|
148
|
+
return {
|
|
149
|
+
label: bar.label,
|
|
150
|
+
width: `calc(${fittedWidth(frame, padding)} * ${bar.meters / spanMeters})`
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
export function MapScaleBar(props) {
|
|
154
|
+
return _$ssr(_tmpl$9, _$ssrStyleProperty("width:", _$escape(props.scale.width, true)), _$escape(props.scale.label));
|
|
155
|
+
}
|
|
156
|
+
/** The scale bar and the attribution share the bottom row, so a long attribution wraps before it covers the scale. */
|
|
157
|
+
export function MapFootRow(props) {
|
|
158
|
+
return _$ssr(_tmpl$0, _$escape(_$createComponent(Show, {
|
|
159
|
+
get when() {
|
|
160
|
+
return props.scale;
|
|
161
|
+
},
|
|
162
|
+
children: scale => _$createComponent(MapScaleBar, {
|
|
163
|
+
get scale() {
|
|
164
|
+
return scale();
|
|
165
|
+
}
|
|
166
|
+
})
|
|
167
|
+
})), _$escape(props.children));
|
|
168
|
+
}
|
|
169
|
+
/** Geometry without a browser, a canvas, or a network dependency; suitable for server rendering and PDF output. */
|
|
170
|
+
export function MapViewFrame(props) {
|
|
171
|
+
const messages = useMapViewMessages();
|
|
172
|
+
const frame = createMemo(() => mapFrame(props, props.height, props.padding ?? DEFAULT_PADDING));
|
|
173
|
+
return _$ssr(_tmpl$1, `k2b-map-view${props.class ? ` ${_$escape(props.class, true)}` : ""}`, _$ssrStyleProperty("height:", `${_$escape(props.height, true)}px`), _$ssrAttribute("aria-label", _$escape(messages().mapLabel, true), false), _$escape(messages().summary({
|
|
174
|
+
count: props.markers?.length ?? 0
|
|
175
|
+
})), _$escape(_$createComponent(Show, {
|
|
176
|
+
get when() {
|
|
177
|
+
return frame();
|
|
178
|
+
},
|
|
179
|
+
children: value => _$createComponent(MapGeometry, _$mergeProps(props, {
|
|
180
|
+
get frame() {
|
|
181
|
+
return value();
|
|
182
|
+
}
|
|
183
|
+
}))
|
|
184
|
+
})), _$escape(_$createComponent(MapFootRow, {
|
|
185
|
+
get scale() {
|
|
186
|
+
return _$memo(() => !!frame())() ? referenceScale(frame(), props.padding ?? DEFAULT_PADDING) : undefined;
|
|
187
|
+
},
|
|
188
|
+
get children() {
|
|
189
|
+
return props.attribution;
|
|
190
|
+
}
|
|
191
|
+
})));
|
|
192
|
+
}
|
|
193
|
+
//# sourceMappingURL=MapViewFrame.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["content/MapViewFrame.tsx"],"sourcesContent":["import { createMemo, For, type JSX, Show } from \"solid-js\";\nimport {\n DEFAULT_PADDING,\n EARTH_CIRCUMFERENCE,\n isStop,\n linePoints,\n type MapFrame,\n mapFrame,\n pinHitRadii,\n pinOffsets,\n projectPoint,\n scaleBar,\n sortMarkers,\n unprojectPoint,\n} from \"./map-view-geometry\";\nimport { useMapViewMessages } from \"./map-view-messages\";\nimport type { MapViewFrameProps, MapViewMarker, MapViewPoint } from \"./map-view-types\";\n\nexport type { MapViewFrameProps } from \"./map-view-types\";\n\nconst S = 1e6;\nexport const mapNumber = (value: number): string => String(Number(value.toFixed(6)));\nexport const selectedMarker = (markers: MapViewMarker[], selectedId?: string): MapViewMarker | undefined =>\n selectedId !== undefined ? markers.find((marker) => marker.id === selectedId) : markers.find((marker) => marker.selected);\n\n/** The CSS form of fitCamera's width rule, so the server lays out exactly what MapLibre shows. */\nconst fittedWidth = (frame: MapFrame, padding: number): string =>\n `max(min(100% - ${2 * padding}px, ${frame.referenceWidth}px), ${frame.minWidth}px)`;\n\nexport function frameStyle(frame: MapFrame, padding: number): JSX.CSSProperties {\n return {\n left: \"50%\",\n top: \"50%\",\n width: fittedWidth(frame, padding),\n \"aspect-ratio\": `${frame.spanX} / ${frame.spanY}`,\n transform: \"translate(-50%, -50%)\",\n };\n}\nconst pointInFrame = (point: MapViewPoint, frame: MapFrame) => {\n const p = projectPoint(point);\n return { x: (p.x - frame.minX) / frame.spanX, y: (p.y - frame.minY) / frame.spanY };\n};\nconst positionStyle = (point: MapViewPoint, frame: MapFrame): JSX.CSSProperties => {\n const p = pointInFrame(point, frame);\n return { left: `${mapNumber(p.x * 100)}%`, top: `${mapNumber(p.y * 100)}%` };\n};\nconst path = (points: MapViewPoint[], frame: MapFrame, closed = false): string =>\n points\n .map((point, index) => {\n const p = projectPoint(point);\n return `${index ? \"L\" : \"M\"}${mapNumber((p.x - frame.minX) * S)} ${mapNumber((p.y - frame.minY) * S)}`;\n })\n .join(\" \") + (closed && points.length ? \" Z\" : \"\");\n\nexport function MapGeometry(\n props: MapViewFrameProps & {\n frame: MapFrame;\n boxStyle?: JSX.CSSProperties;\n onSelect?: (id: string) => void;\n /** Pins are buttons in MapView; the standalone frame draws them as labelled images, never focusable. */\n interactive?: boolean;\n /** 2^(live zoom - fitted zoom), so pin separation follows the person's zoom; 1 until then. */\n zoomFactor?: number;\n },\n): JSX.Element {\n const messages = useMapViewMessages();\n const markers = createMemo(() => sortMarkers(props.markers ?? []));\n const markerIds = createMemo(() => markers().map((marker) => marker.id));\n const markersById = createMemo(() => new Map(markers().map((marker) => [marker.id, marker])));\n const offsets = createMemo(() => pinOffsets(markers(), props.frame, props.zoomFactor, props.ownLocation?.point));\n const hitRadii = createMemo(() => pinHitRadii(markers(), props.frame, offsets(), props.zoomFactor));\n // Input order decides the fallback selection, as in MapView; sorting is only for drawing and keys.\n const selected = createMemo(() => selectedMarker(props.markers ?? [], props.selectedId));\n const keydown = (event: KeyboardEvent & { currentTarget: HTMLButtonElement }, id: string) => {\n const index = markerIds().indexOf(id);\n let next: number;\n switch (event.key) {\n case \"ArrowRight\":\n case \"ArrowDown\":\n next = (index + 1) % markers().length;\n break;\n case \"ArrowLeft\":\n case \"ArrowUp\":\n next = (index + markers().length - 1) % markers().length;\n break;\n case \"Home\":\n next = 0;\n break;\n case \"End\":\n next = markers().length - 1;\n break;\n default:\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n const target = markers()[next];\n if (target) {\n event.currentTarget.parentElement?.querySelectorAll<HTMLButtonElement>(\".k2b-map-view__pin\")[next]?.focus({ preventScroll: true });\n props.onSelect?.(target.id);\n }\n };\n return (\n <div class=\"k2b-map-view__fit\" style={props.boxStyle ?? frameStyle(props.frame, props.padding ?? DEFAULT_PADDING)}>\n <svg\n class=\"k2b-map-view__geometry\"\n viewBox={`0 0 ${mapNumber(props.frame.spanX * S)} ${mapNumber(props.frame.spanY * S)}`}\n preserveAspectRatio=\"none\"\n overflow=\"visible\"\n aria-hidden=\"true\"\n >\n <For each={props.areas}>\n {(area) => (\n <path\n class=\"k2b-map-view__area\"\n data-tone={area.tone ?? \"accent\"}\n d={path(area.polygon, props.frame, true)}\n vector-effect=\"non-scaling-stroke\"\n />\n )}\n </For>\n <For each={props.lines}>\n {(line) => (\n <g class=\"k2b-map-view__line\" data-tone={line.tone ?? \"accent\"}>\n <Show when={!line.tone || line.tone === \"accent\" || line.tone === \"preview\"}>\n <path class=\"k2b-map-view__casing\" d={path(linePoints(line), props.frame)} vector-effect=\"non-scaling-stroke\" />\n </Show>\n <path class=\"k2b-map-view__stroke\" d={path(linePoints(line), props.frame)} vector-effect=\"non-scaling-stroke\" />\n </g>\n )}\n </For>\n <Show when={props.ownLocation}>\n {(location) => {\n const p = () => projectPoint(location().point);\n return (\n <circle\n class=\"k2b-map-view__accuracy\"\n cx={mapNumber((p().x - props.frame.minX) * S)}\n cy={mapNumber((p().y - props.frame.minY) * S)}\n r={mapNumber(\n ((location().accuracyMeters ?? 0) / (EARTH_CIRCUMFERENCE * Math.cos((location().point.lat * Math.PI) / 180))) * S,\n )}\n vector-effect=\"non-scaling-stroke\"\n />\n );\n }}\n </Show>\n </svg>\n <Show when={props.ownLocation}>\n {(location) => (\n <span\n class=\"k2b-map-view__me\"\n role=\"img\"\n aria-label={messages().ownLocation}\n style={positionStyle(location().point, props.frame)}\n />\n )}\n </Show>\n <div class=\"k2b-map-view__pins\" role=\"group\" aria-label={messages().pins}>\n <For each={markerIds()}>\n {(id) => {\n const marker = () => markersById().get(id)!;\n const name = () => (marker().mark === undefined ? marker().label : `${marker().mark} ${marker().label}`);\n const style = () => ({\n ...positionStyle(marker().point, props.frame),\n \"--k2b-map-pin-dx\": `${mapNumber(offsets().get(marker().id)?.dx ?? 0)}px`,\n \"--k2b-map-pin-dy\": `${mapNumber(offsets().get(marker().id)?.dy ?? 0)}px`,\n \"--k2b-map-pin-hit\": `${mapNumber(hitRadii().get(marker().id) ?? 22)}px`,\n });\n if (!props.interactive)\n return (\n <span\n class=\"k2b-map-view__pin\"\n data-id={marker().id}\n data-tone={marker().tone ?? \"accent\"}\n data-stop={isStop(marker()) || undefined}\n data-drop={marker().mark === undefined || undefined}\n data-selected={selected()?.id === marker().id || undefined}\n style={style()}\n role=\"img\"\n aria-label={name()}\n >\n <span aria-hidden=\"true\">{marker().mark}</span>\n </span>\n );\n return (\n <button\n type=\"button\"\n class=\"k2b-map-view__pin\"\n data-id={marker().id}\n data-tone={marker().tone ?? \"accent\"}\n data-stop={isStop(marker()) || undefined}\n data-drop={marker().mark === undefined || undefined}\n style={style()}\n aria-label={name()}\n aria-pressed={selected()?.id === marker().id}\n tabIndex={(selected() ?? markers()[0])?.id === marker().id ? 0 : -1}\n onKeyDown={(event) => keydown(event, id)}\n onClick={() => props.onSelect?.(marker().id)}\n >\n <span aria-hidden=\"true\">{marker().mark}</span>\n </button>\n );\n }}\n </For>\n </div>\n </div>\n );\n}\nexport type MapScale = { label: string; width: string };\nexport function referenceScale(frame: MapFrame, padding: number): MapScale {\n const center = unprojectPoint(frame.minX + frame.spanX / 2, frame.minY + frame.spanY / 2);\n const spanMeters = frame.spanX * EARTH_CIRCUMFERENCE * Math.cos((center.lat * Math.PI) / 180);\n const bar = scaleBar(spanMeters / frame.referenceWidth);\n return { label: bar.label, width: `calc(${fittedWidth(frame, padding)} * ${bar.meters / spanMeters})` };\n}\nexport function MapScaleBar(props: { scale: MapScale }): JSX.Element {\n return (\n <div class=\"k2b-map-view__scale\" style={{ width: props.scale.width }}>\n <span>{props.scale.label}</span>\n <div />\n </div>\n );\n}\n/** The scale bar and the attribution share the bottom row, so a long attribution wraps before it covers the scale. */\nexport function MapFootRow(props: { scale?: MapScale; children?: JSX.Element }): JSX.Element {\n return (\n <div class=\"k2b-map-view__foot-row\">\n <Show when={props.scale}>{(scale) => <MapScaleBar scale={scale()} />}</Show>\n <div class=\"k2b-map-view__attribution\">{props.children}</div>\n </div>\n );\n}\n/** Geometry without a browser, a canvas, or a network dependency; suitable for server rendering and PDF output. */\nexport function MapViewFrame(props: MapViewFrameProps): JSX.Element {\n const messages = useMapViewMessages();\n const frame = createMemo(() => mapFrame(props, props.height, props.padding ?? DEFAULT_PADDING));\n return (\n <div\n class={`k2b-map-view${props.class ? ` ${props.class}` : \"\"}`}\n style={{ height: `${props.height}px` }}\n data-state=\"static\"\n role=\"region\"\n aria-label={messages().mapLabel}\n >\n <span class=\"k2b-sr-only\">{messages().summary({ count: props.markers?.length ?? 0 })}</span>\n <Show when={frame()}>{(value) => <MapGeometry {...props} frame={value()} />}</Show>\n <div class=\"k2b-map-view__foot\">\n <MapFootRow scale={frame() ? referenceScale(frame()!, props.padding ?? DEFAULT_PADDING) : undefined}>\n {props.attribution}\n </MapFootRow>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,SAAS,UAAU,EAAE,GAAG,EAAY,IAAI,QAAQ,UAAU;AAC1D,SACE,eAAe,EACf,mBAAmB,EACnB,MAAM,EACN,UAAU,EAEV,QAAQ,EACR,WAAW,EACX,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,cAAc,QACT,qBAAqB;AAC5B,SAAS,kBAAkB,QAAQ,qBAAqB;AAKxD,MAAM,CAAC,GAAG,GAAG;AACb,OAAO,MAAM,SAAS,GAAI,KAAa,IAAa,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC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C,KAAK,GAAG,aAAI,KAAK,CAAC,KAAK,SAAE,GAAG,EAAE,EAAE,gCAC3C,YAAG,KAAK,CAAC,MAAM,WAAI,yCAGxB,QAAQ,CAAC,CAAC,CAAC,QAAQ,0BAEJ,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC;IAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,MAAM,IAAI;EAAE,CAAC,CAAC,8BACnF,IAAI;IAAA,IAAC,IAAI;MAAA,OAAE,KAAK,CAAC,CAAC;IAAA;IAAA,UAAI,KAAK,sBAAM,WAAW,eAAK,KAAK;MAAA,IAAE,KAAK;QAAA,OAAE,KAAK,CAAC,CAAC;MAAA;IAAA;EAAI,gCAExE,UAAU;IAAA,IAAC,KAAK;MAAA,OAAE,oBAAK,CAAC,CAAC,MAAG,cAAc,CAAC,KAAK,CAAC,CAAC,EAAG,KAAK,CAAC,OAAO,IAAI,eAAe,CAAC,GAAG,SAAS;IAAA;IAAA;MAAA,OAChG,KAAK,CAAC,WAAW;IAAA;EAAA;AAK5B","ignoreList":[]}
|
|
@@ -20,8 +20,13 @@ export { Kbd } from "./Kbd";
|
|
|
20
20
|
export { LabelChip } from "./LabelChip";
|
|
21
21
|
export { default as Lightbox } from "./Lightbox";
|
|
22
22
|
export { default as LogEntriesTable } from "./LogEntriesTable";
|
|
23
|
+
export { MapAttribution } from "./MapAttribution";
|
|
24
|
+
export { MapView } from "./MapView";
|
|
25
|
+
export { MapViewFrame } from "./MapViewFrame";
|
|
23
26
|
export { default as MarkdownView, renderSafeMarkdown } from "./MarkdownView";
|
|
24
27
|
export { MessageRow, MessageSystemRow, startsMessageGroup } from "./MessageRow";
|
|
28
|
+
export { mapPalette } from "./map-palette";
|
|
29
|
+
export { mapAttribution, mapStyle } from "./map-style";
|
|
25
30
|
export { MARKDOWN_CALLOUT_CLASSES, MARKDOWN_CALLOUT_ICON_ATTRIBUTES, markdownInfoBlocks, renderMarkdownInfoBlock, scanMarkdownInfoBlock } from "./markdown-info-blocks";
|
|
26
31
|
export { markdownLinkReference, markdownReferenceIcon, markdownReferenceType, markdownReferenceTypeLabel, markStandaloneLinks, renderMarkdownLink } from "./markdown-links";
|
|
27
32
|
export { Pagination } from "./Pagination";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["content/index.ts"],"sourcesContent":["export type {\n CalendarAttendee,\n CalendarCommand,\n CalendarController,\n CalendarCustomView,\n CalendarDayBadge,\n CalendarEvent,\n CalendarEventColor,\n CalendarEventRenderContext,\n CalendarEventTimeChange,\n CalendarExternalDrag,\n CalendarLabels,\n CalendarProps,\n CalendarQuickCreateControls,\n CalendarRange,\n CalendarRecurrence,\n CalendarResource,\n CalendarSelectionControls,\n CalendarView,\n} from \"./Calendar\";\nexport { default as Calendar } from \"./Calendar\";\n\nexport type { ChartKind, ChartLabels, ChartProps, ChartRenderOptions } from \"./Chart\";\nexport { default as Chart } from \"./Chart\";\nexport type { ChartExplorerColumn, ChartExplorerProps, ChartLegendEntry } from \"./ChartExplorer\";\nexport { ChartExplorer } from \"./ChartExplorer\";\nexport type { ChartExplorerControlsProps } from \"./ChartExplorerControls\";\nexport { ChartExplorerControls } from \"./ChartExplorerControls\";\nexport { ChartFilterControls, type ChartFilterControlsProps } from \"./ChartFilterControls\";\nexport { ChartSnapshotView } from \"./ChartSnapshotView\";\nexport type { CodeDisplayLanguage, CodeDisplayProps } from \"./CodeDisplay\";\nexport { default as CodeDisplay } from \"./CodeDisplay\";\nexport { type ChartCursor, createChartCursor } from \"./chart-cursor\";\nexport type {\n ChartExplorerCharts,\n ChartExplorerController,\n ChartExplorerData,\n ChartExplorerOptions,\n ChartExplorerRequest,\n ChartExplorerRow,\n ChartExplorerSnapshot,\n} from \"./chart-explorer\";\nexport { createChartExplorer } from \"./chart-explorer\";\nexport type { ChartDatumRef, ChartSelection, ChartTooltip, ChartTooltipFormatter } from \"./chart-inspection-core\";\nexport type { ChartSnapshot } from \"./chart-snapshot\";\nexport { prepareChartSnapshot } from \"./chart-snapshot\";\nexport type {\n StateTimelineChartOptions,\n StateTimelineDomain,\n StateTimelineInterval,\n StateTimelineRow,\n StateTimelineState,\n} from \"./chart-state-timeline\";\nexport { type CollectionSelection, createCollectionSelection, type SelectionModifiers } from \"./collection-selection\";\nexport type {\n DataTableColumn,\n DataTableControlsProps,\n DataTableFooter,\n DataTableHeaderProps,\n DataTablePanelFooterProps,\n DataTablePanelProps,\n DataTableProps,\n DataTableRenderCell,\n DataTableRenderHeader,\n DataTableSort,\n} from \"./DataTable\";\nexport { default as DataTable } from \"./DataTable\";\nexport type { DocCodeHighlighter, DocCodeProps, DocConcept, DocNoteVariant, DocRow } from \"./Docs\";\nexport { DocCode, DocConceptGrid, DocInlineCode, DocLead, DocNote, DocPage, DocRows, DocSection } from \"./Docs\";\nexport { FileBrowserPanel, type FileBrowserPanelProps, type FileSource, openFileBrowser } from \"./FileBrowser\";\nexport { FileGrid, type FileGridProps } from \"./FileGrid\";\nexport { default as FileTree, type FileTreeActions, type FileTreeEntry, type FileTreeProps } from \"./FileTree\";\nexport { type FileType, FileTypeIcon, type FileTypeIconProps, fileTypeOf } from \"./FileTypeIcon\";\nexport {\n canPreviewFile,\n default as FileView,\n type FileViewContent,\n type FileViewFile,\n type FileViewPreviewKind,\n type FileViewProps,\n type FileViewRenderer,\n type FileViewRendererProps,\n formatFileViewSize,\n getFileViewPreviewKind,\n} from \"./FileView\";\nexport type { KbdProps } from \"./Kbd\";\nexport { Kbd } from \"./Kbd\";\nexport type { LabelChipProps } from \"./LabelChip\";\nexport { LabelChip } from \"./LabelChip\";\nexport type { LightboxAction, LightboxImage } from \"./Lightbox\";\nexport { default as Lightbox } from \"./Lightbox\";\nexport type { LogTableEntry } from \"./LogEntriesTable\";\nexport { default as LogEntriesTable } from \"./LogEntriesTable\";\nexport { default as MarkdownView, type MarkdownRenderOptions, type MarkdownViewProps, renderSafeMarkdown } from \"./MarkdownView\";\nexport type {\n MessageGroupEntry,\n MessageRowAction,\n MessageRowAttachment,\n MessageRowAuthor,\n MessageRowFile,\n MessageRowMedia,\n MessageRowProgress,\n MessageRowProps,\n MessageRowQuote,\n MessageRowReaction,\n MessageRowStatus,\n MessageRowThread,\n MessageSystemRowProps,\n} from \"./MessageRow\";\nexport { MessageRow, MessageSystemRow, startsMessageGroup } from \"./MessageRow\";\nexport {\n MARKDOWN_CALLOUT_CLASSES,\n MARKDOWN_CALLOUT_ICON_ATTRIBUTES,\n type MarkdownInfoBlock,\n type MarkdownInfoBlockRenderInput,\n type MarkdownInfoBlockType,\n markdownInfoBlocks,\n renderMarkdownInfoBlock,\n scanMarkdownInfoBlock,\n} from \"./markdown-info-blocks\";\nexport {\n type MarkdownLinkInput,\n type MarkdownReference,\n type MarkdownReferenceKind,\n type MarkdownReferenceType,\n markdownLinkReference,\n markdownReferenceIcon,\n markdownReferenceType,\n markdownReferenceTypeLabel,\n markStandaloneLinks,\n renderMarkdownLink,\n} from \"./markdown-links\";\nexport { Pagination, type PaginationProps } from \"./Pagination\";\nexport type { PdfPreviewProps, PdfPreviewRequest } from \"./PdfPreview\";\nexport { default as PdfPreview } from \"./PdfPreview\";\nexport type { RangeOption, RangePickerProps } from \"./RangePicker\";\nexport { default as RangePicker } from \"./RangePicker\";\nexport { ReactionBar, type ReactionBarItem, type ReactionBarProps } from \"./ReactionBar\";\nexport type {\n ReferenceChipObjectProps,\n ReferenceChipPersonProps,\n ReferenceChipProps,\n ReferenceChipTimeProps,\n} from \"./ReferenceChip\";\nexport { REFERENCE_CHIP_MAX_CHARACTERS, ReferenceChip, truncateMiddle } from \"./ReferenceChip\";\nexport type { StepsProps } from \"./Steps\";\nexport { Steps } from \"./Steps\";\nexport type { StructuredDataPreviewMode, StructuredDataPreviewProps, StructuredDataValue } from \"./StructuredDataPreview\";\nexport { default as StructuredDataPreview, isStructuredDataValue } from \"./StructuredDataPreview\";\nexport type { TimelineColor, TimelineController, TimelineItem, TimelineProps } from \"./Timeline\";\nexport { default as Timeline } from \"./Timeline\";\nexport { VideoPlayer, type VideoPlayerProps } from \"./VideoPlayer\";\nexport type { VirtualFeedController, VirtualFeedProps, VirtualFeedScrollOptions } from \"./VirtualFeed\";\nexport { VirtualFeed } from \"./VirtualFeed\";\nexport type { ZoomPanAction, ZoomPanFullscreen, ZoomPanViewportProps } from \"./ZoomPanViewport\";\nexport { ZoomPanViewport } from \"./ZoomPanViewport\";\n"],"mappings":"AAoBA,SAAS,OAAO,IAAI,QAAQ,QAAQ,YAAY;AAGhD,SAAS,OAAO,IAAI,KAAK,QAAQ,SAAS;AAE1C,SAAS,aAAa,QAAQ,iBAAiB;AAE/C,SAAS,qBAAqB,QAAQ,yBAAyB;AAC/D,SAAS,mBAAmB,QAAuC,uBAAuB;AAC1F,SAAS,iBAAiB,QAAQ,qBAAqB;AAEvD,SAAS,OAAO,IAAI,WAAW,QAAQ,eAAe;AACtD,SAA2B,iBAAiB,QAAQ,gBAAgB;AAUpE,SAAS,mBAAmB,QAAQ,kBAAkB;AAGtD,SAAS,oBAAoB,QAAQ,kBAAkB;AAQvD,SAAmC,yBAAyB,QAAiC,wBAAwB;AAarH,SAAS,OAAO,IAAI,SAAS,QAAQ,aAAa;AAElD,SAAS,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,QAAQ,QAAQ;AAC/G,SAAS,gBAAgB,EAA+C,eAAe,QAAQ,eAAe;AAC9G,SAAS,QAAQ,QAA4B,YAAY;AACzD,SAAS,OAAO,IAAI,QAAQ,QAAsE,YAAY;AAC9G,SAAwB,YAAY,EAA0B,UAAU,QAAQ,gBAAgB;AAChG,SACE,cAAc,EACd,OAAO,IAAI,QAAQ,EAOnB,kBAAkB,EAClB,sBAAsB,QACjB,YAAY;AAEnB,SAAS,GAAG,QAAQ,OAAO;AAE3B,SAAS,SAAS,QAAQ,aAAa;AAEvC,SAAS,OAAO,IAAI,QAAQ,QAAQ,YAAY;AAEhD,SAAS,OAAO,IAAI,eAAe,QAAQ,mBAAmB;AAC9D,SAAS,OAAO,IAAI,YAAY,EAAsD,kBAAkB,QAAQ,gBAAgB;AAgBhI,SAAS,UAAU,EAAE,gBAAgB,EAAE,kBAAkB,QAAQ,cAAc;AAC/E,SACE,wBAAwB,EACxB,gCAAgC,EAIhC,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,QAChB,wBAAwB;AAC/B,SAKE,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,mBAAmB,EACnB,kBAAkB,QACb,kBAAkB;AACzB,SAAS,UAAU,QAA8B,cAAc;AAE/D,SAAS,OAAO,IAAI,UAAU,QAAQ,cAAc;AAEpD,SAAS,OAAO,IAAI,WAAW,QAAQ,eAAe;AACtD,SAAS,WAAW,QAAqD,eAAe;AAOxF,SAAS,6BAA6B,EAAE,aAAa,EAAE,cAAc,QAAQ,iBAAiB;AAE9F,SAAS,KAAK,QAAQ,SAAS;AAE/B,SAAS,OAAO,IAAI,qBAAqB,EAAE,qBAAqB,QAAQ,yBAAyB;AAEjG,SAAS,OAAO,IAAI,QAAQ,QAAQ,YAAY;AAChD,SAAS,WAAW,QAA+B,eAAe;AAElE,SAAS,WAAW,QAAQ,eAAe;AAE3C,SAAS,eAAe,QAAQ,mBAAmB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["content/index.ts"],"sourcesContent":["export type {\n CalendarAttendee,\n CalendarCommand,\n CalendarController,\n CalendarCustomView,\n CalendarDayBadge,\n CalendarEvent,\n CalendarEventColor,\n CalendarEventRenderContext,\n CalendarEventTimeChange,\n CalendarExternalDrag,\n CalendarLabels,\n CalendarProps,\n CalendarQuickCreateControls,\n CalendarRange,\n CalendarRecurrence,\n CalendarResource,\n CalendarSelectionControls,\n CalendarView,\n} from \"./Calendar\";\nexport { default as Calendar } from \"./Calendar\";\n\nexport type { ChartKind, ChartLabels, ChartProps, ChartRenderOptions } from \"./Chart\";\nexport { default as Chart } from \"./Chart\";\nexport type { ChartExplorerColumn, ChartExplorerProps, ChartLegendEntry } from \"./ChartExplorer\";\nexport { ChartExplorer } from \"./ChartExplorer\";\nexport type { ChartExplorerControlsProps } from \"./ChartExplorerControls\";\nexport { ChartExplorerControls } from \"./ChartExplorerControls\";\nexport { ChartFilterControls, type ChartFilterControlsProps } from \"./ChartFilterControls\";\nexport { ChartSnapshotView } from \"./ChartSnapshotView\";\nexport type { CodeDisplayLanguage, CodeDisplayProps } from \"./CodeDisplay\";\nexport { default as CodeDisplay } from \"./CodeDisplay\";\nexport { type ChartCursor, createChartCursor } from \"./chart-cursor\";\nexport type {\n ChartExplorerCharts,\n ChartExplorerController,\n ChartExplorerData,\n ChartExplorerOptions,\n ChartExplorerRequest,\n ChartExplorerRow,\n ChartExplorerSnapshot,\n} from \"./chart-explorer\";\nexport { createChartExplorer } from \"./chart-explorer\";\nexport type { ChartDatumRef, ChartSelection, ChartTooltip, ChartTooltipFormatter } from \"./chart-inspection-core\";\nexport type { ChartSnapshot } from \"./chart-snapshot\";\nexport { prepareChartSnapshot } from \"./chart-snapshot\";\nexport type {\n StateTimelineChartOptions,\n StateTimelineDomain,\n StateTimelineInterval,\n StateTimelineRow,\n StateTimelineState,\n} from \"./chart-state-timeline\";\nexport { type CollectionSelection, createCollectionSelection, type SelectionModifiers } from \"./collection-selection\";\nexport type {\n DataTableColumn,\n DataTableControlsProps,\n DataTableFooter,\n DataTableHeaderProps,\n DataTablePanelFooterProps,\n DataTablePanelProps,\n DataTableProps,\n DataTableRenderCell,\n DataTableRenderHeader,\n DataTableSort,\n} from \"./DataTable\";\nexport { default as DataTable } from \"./DataTable\";\nexport type { DocCodeHighlighter, DocCodeProps, DocConcept, DocNoteVariant, DocRow } from \"./Docs\";\nexport { DocCode, DocConceptGrid, DocInlineCode, DocLead, DocNote, DocPage, DocRows, DocSection } from \"./Docs\";\nexport { FileBrowserPanel, type FileBrowserPanelProps, type FileSource, openFileBrowser } from \"./FileBrowser\";\nexport { FileGrid, type FileGridProps } from \"./FileGrid\";\nexport { default as FileTree, type FileTreeActions, type FileTreeEntry, type FileTreeProps } from \"./FileTree\";\nexport { type FileType, FileTypeIcon, type FileTypeIconProps, fileTypeOf } from \"./FileTypeIcon\";\nexport {\n canPreviewFile,\n default as FileView,\n type FileViewContent,\n type FileViewFile,\n type FileViewPreviewKind,\n type FileViewProps,\n type FileViewRenderer,\n type FileViewRendererProps,\n formatFileViewSize,\n getFileViewPreviewKind,\n} from \"./FileView\";\nexport type { KbdProps } from \"./Kbd\";\nexport { Kbd } from \"./Kbd\";\nexport type { LabelChipProps } from \"./LabelChip\";\nexport { LabelChip } from \"./LabelChip\";\nexport type { LightboxAction, LightboxImage } from \"./Lightbox\";\nexport { default as Lightbox } from \"./Lightbox\";\nexport type { LogTableEntry } from \"./LogEntriesTable\";\nexport { default as LogEntriesTable } from \"./LogEntriesTable\";\nexport { MapAttribution } from \"./MapAttribution\";\nexport { MapView } from \"./MapView\";\nexport { MapViewFrame } from \"./MapViewFrame\";\nexport { default as MarkdownView, type MarkdownRenderOptions, type MarkdownViewProps, renderSafeMarkdown } from \"./MarkdownView\";\nexport type {\n MessageGroupEntry,\n MessageRowAction,\n MessageRowAttachment,\n MessageRowAuthor,\n MessageRowFile,\n MessageRowMedia,\n MessageRowProgress,\n MessageRowProps,\n MessageRowQuote,\n MessageRowReaction,\n MessageRowStatus,\n MessageRowThread,\n MessageSystemRowProps,\n} from \"./MessageRow\";\nexport { MessageRow, MessageSystemRow, startsMessageGroup } from \"./MessageRow\";\nexport { type MapPaletteColors, type MapTheme, mapPalette } from \"./map-palette\";\nexport { type MapStyleOptions, mapAttribution, mapStyle } from \"./map-style\";\nexport type {\n MapViewArea,\n MapViewFit,\n MapViewFrameProps,\n MapViewLine,\n MapViewLineTone,\n MapViewMarker,\n MapViewOwnLocation,\n MapViewPoint,\n MapViewProps,\n MapViewStyle,\n MapViewStyleSource,\n MapViewTone,\n} from \"./map-view-types\";\nexport {\n MARKDOWN_CALLOUT_CLASSES,\n MARKDOWN_CALLOUT_ICON_ATTRIBUTES,\n type MarkdownInfoBlock,\n type MarkdownInfoBlockRenderInput,\n type MarkdownInfoBlockType,\n markdownInfoBlocks,\n renderMarkdownInfoBlock,\n scanMarkdownInfoBlock,\n} from \"./markdown-info-blocks\";\nexport {\n type MarkdownLinkInput,\n type MarkdownReference,\n type MarkdownReferenceKind,\n type MarkdownReferenceType,\n markdownLinkReference,\n markdownReferenceIcon,\n markdownReferenceType,\n markdownReferenceTypeLabel,\n markStandaloneLinks,\n renderMarkdownLink,\n} from \"./markdown-links\";\nexport { Pagination, type PaginationProps } from \"./Pagination\";\nexport type { PdfPreviewProps, PdfPreviewRequest } from \"./PdfPreview\";\nexport { default as PdfPreview } from \"./PdfPreview\";\nexport type { RangeOption, RangePickerProps } from \"./RangePicker\";\nexport { default as RangePicker } from \"./RangePicker\";\nexport { ReactionBar, type ReactionBarItem, type ReactionBarProps } from \"./ReactionBar\";\nexport type {\n ReferenceChipObjectProps,\n ReferenceChipPersonProps,\n ReferenceChipProps,\n ReferenceChipTimeProps,\n} from \"./ReferenceChip\";\nexport { REFERENCE_CHIP_MAX_CHARACTERS, ReferenceChip, truncateMiddle } from \"./ReferenceChip\";\nexport type { StepsProps } from \"./Steps\";\nexport { Steps } from \"./Steps\";\nexport type { StructuredDataPreviewMode, StructuredDataPreviewProps, StructuredDataValue } from \"./StructuredDataPreview\";\nexport { default as StructuredDataPreview, isStructuredDataValue } from \"./StructuredDataPreview\";\nexport type { TimelineColor, TimelineController, TimelineItem, TimelineProps } from \"./Timeline\";\nexport { default as Timeline } from \"./Timeline\";\nexport { VideoPlayer, type VideoPlayerProps } from \"./VideoPlayer\";\nexport type { VirtualFeedController, VirtualFeedProps, VirtualFeedScrollOptions } from \"./VirtualFeed\";\nexport { VirtualFeed } from \"./VirtualFeed\";\nexport type { ZoomPanAction, ZoomPanFullscreen, ZoomPanViewportProps } from \"./ZoomPanViewport\";\nexport { ZoomPanViewport } from \"./Zo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,kBAAkB,QAAQ,cAAc;AAC/E,SAA+C,UAAU,QAAQ,eAAe;AAChF,SAA+B,cAAc,EAAE,QAAQ,QAAQ,aAAa;AAe5E,SACE,wBAAwB,EACxB,gCAAgC,EAIhC,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,QAChB,wBAAwB;AAC/B,SAKE,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,mBAAmB,EACnB,kBAAkB,QACb,kBAAkB;AACzB,SAAS,UAAU,QAA8B,cAAc;AAE/D,SAAS,OAAO,IAAI,UAAU,QAAQ,cAAc;AAEpD,SAAS,OAAO,IAAI,WAAW,QAAQ,eAAe;AACtD,SAAS,WAAW,QAAqD,eAAe;AAOxF,SAAS,6BAA6B,EAAE,aAAa,EAAE,cAAc,QAAQ,iBAAiB;AAE9F,SAAS,KAAK,QAAQ,SAAS;AAE/B,SAAS,OAAO,IAAI,qBAAqB,EAAE,qBAAqB,QAAQ,yBAAyB;AAEjG,SAAS,OAAO,IAAI,QAAQ,QAAQ,YAAY;AAChD,SAAS,WAAW,QAA+B,eAAe;AAElE,SAAS,WAAW,QAAQ,eAAe;AAE3C,SAAS,eAAe,QAAQ,mBAAmB","ignoreList":[]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** The map image colours. Each key is also the CSS token `--k2b-map-<kebab-key>` on `.k2b-map-view`. */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Plain data so a server can build the style JSON without CSS. The accent stays with the host's
|
|
5
|
+
* pins and lines; the map image only uses calm land, water, green, and road tones.
|
|
6
|
+
*/
|
|
7
|
+
export const mapPalette = {
|
|
8
|
+
light: {
|
|
9
|
+
land: "#f1efe9",
|
|
10
|
+
green: "#e3ecd9",
|
|
11
|
+
water: "#cfe3f3",
|
|
12
|
+
building: "#e8e5dd",
|
|
13
|
+
road: "#ffffff",
|
|
14
|
+
roadCasing: "#dcd8ce",
|
|
15
|
+
motorway: "#f6c76b",
|
|
16
|
+
motorwayCasing: "#d9a443",
|
|
17
|
+
rail: "#c4bfb4",
|
|
18
|
+
boundary: "#aea89c",
|
|
19
|
+
label: "#52525b",
|
|
20
|
+
labelStrong: "#27272a",
|
|
21
|
+
waterLabel: "#3a6383"
|
|
22
|
+
},
|
|
23
|
+
dark: {
|
|
24
|
+
land: "#1a1f26",
|
|
25
|
+
green: "#1c2a22",
|
|
26
|
+
water: "#14283a",
|
|
27
|
+
building: "#20262e",
|
|
28
|
+
road: "#2c333d",
|
|
29
|
+
roadCasing: "#222830",
|
|
30
|
+
motorway: "#5d6470",
|
|
31
|
+
motorwayCasing: "#444a54",
|
|
32
|
+
rail: "#39404a",
|
|
33
|
+
boundary: "#4f5763",
|
|
34
|
+
label: "#a1a1aa",
|
|
35
|
+
labelStrong: "#e4e4e7",
|
|
36
|
+
waterLabel: "#8fb5d3"
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=map-palette.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["content/map-palette.ts"],"sourcesContent":["/** The map image colours. Each key is also the CSS token `--k2b-map-<kebab-key>` on `.k2b-map-view`. */\nexport type MapPaletteColors = {\n /** Background land, also behind the server frame before the map image arrives. */\n land: string;\n /** Woods, grass, and city green; large protected areas stay plain land. */\n green: string;\n water: string;\n building: string;\n road: string;\n roadCasing: string;\n motorway: string;\n motorwayCasing: string;\n /** Rail lines and footpaths. */\n rail: string;\n boundary: string;\n /** Streets, suburbs, villages, and states. */\n label: string;\n /** Cities, towns, and countries. */\n labelStrong: string;\n waterLabel: string;\n};\nexport type MapTheme = \"light\" | \"dark\";\n\n/**\n * Plain data so a server can build the style JSON without CSS. The accent stays with the host's\n * pins and lines; the map image only uses calm land, water, green, and road tones.\n */\nexport const mapPalette = {\n light: {\n land: \"#f1efe9\",\n green: \"#e3ecd9\",\n water: \"#cfe3f3\",\n building: \"#e8e5dd\",\n road: \"#ffffff\",\n roadCasing: \"#dcd8ce\",\n motorway: \"#f6c76b\",\n motorwayCasing: \"#d9a443\",\n rail: \"#c4bfb4\",\n boundary: \"#aea89c\",\n label: \"#52525b\",\n labelStrong: \"#27272a\",\n waterLabel: \"#3a6383\",\n },\n dark: {\n land: \"#1a1f26\",\n green: \"#1c2a22\",\n water: \"#14283a\",\n building: \"#20262e\",\n road: \"#2c333d\",\n roadCasing: \"#222830\",\n motorway: \"#5d6470\",\n motorwayCasing: \"#444a54\",\n rail: \"#39404a\",\n boundary: \"#4f5763\",\n label: \"#a1a1aa\",\n labelStrong: \"#e4e4e7\",\n waterLabel: \"#8fb5d3\",\n },\n} as const satisfies Record<MapTheme, MapPaletteColors>;\n"],"mappings":"AAAA;;AAuBA;AACA;AACA;AACA;AACA,OAAO,MAAM,UAAU,GAAG;EACxB,KAAK,EAAE;IACL,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,SAAS;IACnB,IAAI,EAAE,SAAS;IACf,UAAU,EAAE,SAAS;IACrB,QAAQ,EAAE,SAAS;IACnB,cAAc,EAAE,SAAS;IACzB,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,SAAS;IACnB,KAAK,EAAE,SAAS;IAChB,WAAW,EAAE,SAAS;IACtB,UAAU,EAAE;EACd,CAAC;EACD,IAAI,EAAE;IACJ,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,SAAS;IACnB,IAAI,EAAE,SAAS;IACf,UAAU,EAAE,SAAS;IACrB,QAAQ,EAAE,SAAS;IACnB,cAAc,EAAE,SAAS;IACzB,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,SAAS;IACnB,KAAK,EAAE,SAAS;IAChB,WAAW,EAAE,SAAS;IACtB,UAAU,EAAE;EACd;AACF,CAAuD","ignoreList":[]}
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import { mapPalette } from "./map-palette";
|
|
2
|
+
/** Attribution for OpenMapTiles-schema maps with OpenStreetMap data from Geoapify, in display order. */
|
|
3
|
+
export const mapAttribution = [{
|
|
4
|
+
label: "© OpenStreetMap",
|
|
5
|
+
href: "https://www.openstreetmap.org/copyright"
|
|
6
|
+
}, {
|
|
7
|
+
label: "© OpenMapTiles",
|
|
8
|
+
href: "https://openmaptiles.org/"
|
|
9
|
+
}, {
|
|
10
|
+
label: "Geoapify",
|
|
11
|
+
href: "https://www.geoapify.com/"
|
|
12
|
+
}];
|
|
13
|
+
const source = "openmaptiles";
|
|
14
|
+
/** One weight keeps the glyph assets small; size and ink carry the label hierarchy. */
|
|
15
|
+
const font = ["IBM Plex Sans Medium"];
|
|
16
|
+
const zoomed = (stops, base = 1.5) => ["interpolate", ["exponential", base], ["zoom"], ...stops.flat()];
|
|
17
|
+
const linear = stops => ["interpolate", ["linear"], ["zoom"], ...stops.flat()];
|
|
18
|
+
/** A casing is the fill plus a fixed edge at every stop, because zoom must stay the outer expression. */
|
|
19
|
+
const widened = (stops, edge) => stops.map(([zoom, width]) => [zoom, width + edge]);
|
|
20
|
+
const classIn = (...classes) => ["in", ["get", "class"], ["literal", classes]];
|
|
21
|
+
const notTunnel = ["!=", ["get", "brunnel"], "tunnel"];
|
|
22
|
+
const tunnelOpacity = ["match", ["get", "brunnel"], "tunnel", 0.5, 1];
|
|
23
|
+
const motorwayWidth = [[5, 0.5], [10, 1.5], [14, 4], [18, 16]];
|
|
24
|
+
const majorWidth = [[8, 0.5], [12, 1.5], [14, 3.5], [18, 14]];
|
|
25
|
+
const secondaryWidth = [[10, 0.5], [13, 1.5], [14, 2.5], [18, 12]];
|
|
26
|
+
const minorWidth = [[13, 0.75], [15, 2.5], [18, 9]];
|
|
27
|
+
// OpenMapTiles files pedestrian streets as paths; they read as streets, so they get the minor road look.
|
|
28
|
+
// Pedestrian squares arrive as polygons and stay plain land.
|
|
29
|
+
const minorFilter = ["any", classIn("minor", "service"), ["all", ["==", ["get", "class"], "path"], ["==", ["get", "subclass"], "pedestrian"], ["==", ["geometry-type"], "LineString"]]];
|
|
30
|
+
|
|
31
|
+
/** `name:<language>`, then the Latin form, then the local name, so a bounded set of glyph ranges covers every label. */
|
|
32
|
+
const labelText = locale => {
|
|
33
|
+
const language = locale.trim().toLowerCase().split(/[-_]/)[0] ?? "";
|
|
34
|
+
const names = [["get", "name:latin"], ["get", "name"]];
|
|
35
|
+
if (/^[a-z]{2,3}$/.test(language)) names.unshift(["get", `name:${language}`]);
|
|
36
|
+
return ["coalesce", ...names];
|
|
37
|
+
};
|
|
38
|
+
const roads = (theme, colors) => {
|
|
39
|
+
const casing = (id, filter, stops, minzoom, color) => ({
|
|
40
|
+
id: `${id}-casing`,
|
|
41
|
+
type: "line",
|
|
42
|
+
source,
|
|
43
|
+
"source-layer": "transportation",
|
|
44
|
+
minzoom,
|
|
45
|
+
filter,
|
|
46
|
+
layout: {
|
|
47
|
+
"line-cap": "round",
|
|
48
|
+
"line-join": "round"
|
|
49
|
+
},
|
|
50
|
+
paint: {
|
|
51
|
+
"line-color": color,
|
|
52
|
+
"line-width": zoomed(widened(stops, 1.5)),
|
|
53
|
+
"line-opacity": tunnelOpacity
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
const fill = (id, filter, stops, minzoom, color) => ({
|
|
57
|
+
id,
|
|
58
|
+
type: "line",
|
|
59
|
+
source,
|
|
60
|
+
"source-layer": "transportation",
|
|
61
|
+
minzoom,
|
|
62
|
+
filter,
|
|
63
|
+
layout: {
|
|
64
|
+
"line-cap": "round",
|
|
65
|
+
"line-join": "round"
|
|
66
|
+
},
|
|
67
|
+
paint: {
|
|
68
|
+
"line-color": color,
|
|
69
|
+
"line-width": zoomed(stops),
|
|
70
|
+
"line-opacity": tunnelOpacity
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
// Far out, roads take whichever tone stands out more from land: on light land a white road disappears, so it
|
|
74
|
+
// starts in the casing tone; on dark land the casing tone is the weaker one. Edges appear as roads widen.
|
|
75
|
+
const far = theme === "light" ? colors.roadCasing : colors.road;
|
|
76
|
+
const road = ["interpolate", ["linear"], ["zoom"], 11, far, 12.5, colors.road];
|
|
77
|
+
return [{
|
|
78
|
+
id: "path",
|
|
79
|
+
type: "line",
|
|
80
|
+
source,
|
|
81
|
+
"source-layer": "transportation",
|
|
82
|
+
minzoom: 15,
|
|
83
|
+
filter: ["all", classIn("path", "track"), ["!=", ["get", "subclass"], "pedestrian"], notTunnel],
|
|
84
|
+
paint: {
|
|
85
|
+
"line-color": colors.rail,
|
|
86
|
+
"line-width": zoomed([[15, 0.75], [18, 1.5]]),
|
|
87
|
+
"line-dasharray": [2, 1.5]
|
|
88
|
+
}
|
|
89
|
+
}, {
|
|
90
|
+
id: "rail",
|
|
91
|
+
type: "line",
|
|
92
|
+
source,
|
|
93
|
+
"source-layer": "transportation",
|
|
94
|
+
minzoom: 11,
|
|
95
|
+
filter: ["all", classIn("rail", "transit"), notTunnel],
|
|
96
|
+
paint: {
|
|
97
|
+
"line-color": colors.rail,
|
|
98
|
+
"line-width": zoomed([[11, 0.75], [18, 2]])
|
|
99
|
+
}
|
|
100
|
+
}, casing("road-minor", minorFilter, minorWidth, 14, colors.roadCasing), casing("road-secondary", classIn("secondary", "tertiary"), secondaryWidth, 12, colors.roadCasing), casing("road-major", classIn("trunk", "primary"), majorWidth, 12, colors.roadCasing), casing("road-motorway", classIn("motorway"), motorwayWidth, 9, colors.motorwayCasing), fill("road-minor", minorFilter, minorWidth, 13, road), fill("road-secondary", classIn("secondary", "tertiary"), secondaryWidth, 10, road), fill("road-major", classIn("trunk", "primary"), majorWidth, 8, road), fill("road-motorway", classIn("motorway"), motorwayWidth, 5, colors.motorway)];
|
|
101
|
+
};
|
|
102
|
+
const labels = (colors, text) => {
|
|
103
|
+
const paint = (color, halo = colors.land) => ({
|
|
104
|
+
"text-color": color,
|
|
105
|
+
"text-halo-color": halo,
|
|
106
|
+
"text-halo-width": 1.5
|
|
107
|
+
});
|
|
108
|
+
const place = (id, classes, minzoom, maxzoom, size, color) => ({
|
|
109
|
+
id: `place-${id}`,
|
|
110
|
+
type: "symbol",
|
|
111
|
+
source,
|
|
112
|
+
"source-layer": "place",
|
|
113
|
+
minzoom,
|
|
114
|
+
maxzoom,
|
|
115
|
+
filter: classIn(...classes),
|
|
116
|
+
layout: {
|
|
117
|
+
"text-field": text,
|
|
118
|
+
"text-font": font,
|
|
119
|
+
"text-size": linear(size),
|
|
120
|
+
"text-max-width": 8,
|
|
121
|
+
"symbol-sort-key": ["coalesce", ["get", "rank"], 99]
|
|
122
|
+
},
|
|
123
|
+
paint: paint(color)
|
|
124
|
+
});
|
|
125
|
+
return [{
|
|
126
|
+
id: "waterway-label",
|
|
127
|
+
type: "symbol",
|
|
128
|
+
source,
|
|
129
|
+
"source-layer": "waterway",
|
|
130
|
+
minzoom: 13,
|
|
131
|
+
filter: classIn("river", "canal"),
|
|
132
|
+
layout: {
|
|
133
|
+
"text-field": text,
|
|
134
|
+
"text-font": font,
|
|
135
|
+
"text-size": 11,
|
|
136
|
+
"symbol-placement": "line",
|
|
137
|
+
"text-letter-spacing": 0.05
|
|
138
|
+
},
|
|
139
|
+
paint: paint(colors.waterLabel, colors.water)
|
|
140
|
+
}, {
|
|
141
|
+
id: "water-name",
|
|
142
|
+
type: "symbol",
|
|
143
|
+
source,
|
|
144
|
+
"source-layer": "water_name",
|
|
145
|
+
filter: ["==", ["geometry-type"], "Point"],
|
|
146
|
+
layout: {
|
|
147
|
+
"text-field": text,
|
|
148
|
+
"text-font": font,
|
|
149
|
+
"text-size": linear([[4, 11], [12, 13]]),
|
|
150
|
+
"text-max-width": 7
|
|
151
|
+
},
|
|
152
|
+
paint: paint(colors.waterLabel, colors.water)
|
|
153
|
+
}, {
|
|
154
|
+
id: "street-label",
|
|
155
|
+
type: "symbol",
|
|
156
|
+
source,
|
|
157
|
+
"source-layer": "transportation_name",
|
|
158
|
+
minzoom: 13,
|
|
159
|
+
filter: classIn("motorway", "trunk", "primary", "secondary", "tertiary", "minor", "service"),
|
|
160
|
+
layout: {
|
|
161
|
+
"text-field": text,
|
|
162
|
+
"text-font": font,
|
|
163
|
+
"text-size": linear([[13, 11], [18, 13]]),
|
|
164
|
+
"symbol-placement": "line",
|
|
165
|
+
"text-max-angle": 30
|
|
166
|
+
},
|
|
167
|
+
paint: paint(colors.label, colors.road)
|
|
168
|
+
}, place("minor", ["suburb", "quarter", "neighbourhood", "hamlet", "locality", "isolated_dwelling"], 12, 18, [[12, 11], [16, 12.5]], colors.label), place("village", ["village"], 10, 17, [[10, 11.5], [14, 13]], colors.label), place("town", ["town"], 7, 16, [[7, 11.5], [10, 13], [14, 15]], colors.labelStrong), place("city", ["city"], 4, 15, [[4, 12], [8, 15], [12, 18]], colors.labelStrong), place("state", ["state", "province"], 4, 8, [[4, 11], [7, 12]], colors.label), place("country", ["country"], 1, 7, [[1, 11], [6, 15]], colors.labelStrong)];
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* A flat Cloud map style for OpenMapTiles-schema vector tiles. The host passes the tile and glyph
|
|
173
|
+
* templates; there are no network defaults, sprites, extrusions, or relief.
|
|
174
|
+
*/
|
|
175
|
+
export function mapStyle(options) {
|
|
176
|
+
const {
|
|
177
|
+
theme,
|
|
178
|
+
locale,
|
|
179
|
+
tiles,
|
|
180
|
+
glyphs,
|
|
181
|
+
maxzoom = 14
|
|
182
|
+
} = options;
|
|
183
|
+
if (!["{z}", "{x}", "{y}"].every(token => tiles.includes(token))) throw new TypeError("mapStyle: tiles needs {z}, {x}, and {y}");
|
|
184
|
+
if (!["{fontstack}", "{range}"].every(token => glyphs.includes(token))) throw new TypeError("mapStyle: glyphs needs {fontstack} and {range}");
|
|
185
|
+
if (!Number.isInteger(maxzoom) || maxzoom < 0 || maxzoom > 24) throw new RangeError("mapStyle: maxzoom must be an integer from 0 to 24");
|
|
186
|
+
const colors = mapPalette[theme];
|
|
187
|
+
const text = labelText(locale);
|
|
188
|
+
// Protected areas (the park layer) cover whole regions, so only woods, grass, and city green are tinted.
|
|
189
|
+
const green = (id, sourceLayer, filter) => ({
|
|
190
|
+
id,
|
|
191
|
+
type: "fill",
|
|
192
|
+
source,
|
|
193
|
+
"source-layer": sourceLayer,
|
|
194
|
+
filter,
|
|
195
|
+
paint: {
|
|
196
|
+
"fill-color": colors.green
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
return {
|
|
200
|
+
version: 8,
|
|
201
|
+
name: `Cloud ${theme}`,
|
|
202
|
+
glyphs,
|
|
203
|
+
sources: {
|
|
204
|
+
[source]: {
|
|
205
|
+
type: "vector",
|
|
206
|
+
tiles: [tiles],
|
|
207
|
+
minzoom: 0,
|
|
208
|
+
maxzoom
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
layers: [{
|
|
212
|
+
id: "land",
|
|
213
|
+
type: "background",
|
|
214
|
+
paint: {
|
|
215
|
+
"background-color": colors.land
|
|
216
|
+
}
|
|
217
|
+
}, green("landcover-green", "landcover", classIn("wood", "grass")), green("landuse-green", "landuse", classIn("cemetery", "pitch", "playground")), {
|
|
218
|
+
id: "water",
|
|
219
|
+
type: "fill",
|
|
220
|
+
source,
|
|
221
|
+
"source-layer": "water",
|
|
222
|
+
filter: notTunnel,
|
|
223
|
+
paint: {
|
|
224
|
+
"fill-color": colors.water
|
|
225
|
+
}
|
|
226
|
+
}, {
|
|
227
|
+
id: "waterway",
|
|
228
|
+
type: "line",
|
|
229
|
+
source,
|
|
230
|
+
"source-layer": "waterway",
|
|
231
|
+
minzoom: 8,
|
|
232
|
+
filter: ["all", notTunnel, ["!=", ["get", "intermittent"], 1]],
|
|
233
|
+
layout: {
|
|
234
|
+
"line-cap": "round",
|
|
235
|
+
"line-join": "round"
|
|
236
|
+
},
|
|
237
|
+
paint: {
|
|
238
|
+
"line-color": colors.water,
|
|
239
|
+
"line-width": ["interpolate", ["exponential", 1.4], ["zoom"], 8, ["match", ["get", "class"], "river", 0.75, 0], 13, ["match", ["get", "class"], "river", 2.5, "canal", 1.5, 0.75], 18, ["match", ["get", "class"], "river", 8, "canal", 5, 2.5]]
|
|
240
|
+
}
|
|
241
|
+
}, {
|
|
242
|
+
id: "building",
|
|
243
|
+
type: "fill",
|
|
244
|
+
source,
|
|
245
|
+
"source-layer": "building",
|
|
246
|
+
minzoom: 13,
|
|
247
|
+
paint: {
|
|
248
|
+
"fill-color": colors.building,
|
|
249
|
+
"fill-opacity": linear([[13, 0], [14, 1]])
|
|
250
|
+
}
|
|
251
|
+
}, {
|
|
252
|
+
id: "boundary-state",
|
|
253
|
+
type: "line",
|
|
254
|
+
source,
|
|
255
|
+
"source-layer": "boundary",
|
|
256
|
+
minzoom: 4,
|
|
257
|
+
filter: ["all", ["==", ["get", "admin_level"], 4], ["!=", ["get", "maritime"], 1]],
|
|
258
|
+
paint: {
|
|
259
|
+
"line-color": colors.boundary,
|
|
260
|
+
"line-width": 0.75,
|
|
261
|
+
"line-dasharray": [3, 2]
|
|
262
|
+
}
|
|
263
|
+
}, {
|
|
264
|
+
id: "boundary-country",
|
|
265
|
+
type: "line",
|
|
266
|
+
source,
|
|
267
|
+
"source-layer": "boundary",
|
|
268
|
+
filter: ["all", ["==", ["get", "admin_level"], 2], ["!=", ["get", "maritime"], 1]],
|
|
269
|
+
paint: {
|
|
270
|
+
"line-color": colors.boundary,
|
|
271
|
+
"line-width": zoomed([[2, 0.75], [10, 1.5]])
|
|
272
|
+
}
|
|
273
|
+
}, ...roads(theme, colors), ...labels(colors, text)]
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
//# sourceMappingURL=map-style.js.map
|