@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,6 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
/**
|
|
3
|
+
* The required credits for maps built with `mapStyle()`, each one a link, for MapView's `attribution` slot.
|
|
4
|
+
* @example <MapView style={style} attribution={<MapAttribution />} height={320} />
|
|
5
|
+
*/
|
|
6
|
+
export declare function MapAttribution(): JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
import type { MapViewProps } from "./map-view-types";
|
|
3
|
+
export type { MapViewProps } from "./map-view-types";
|
|
4
|
+
/** A static server frame enhanced with a same-origin MapLibre worker only after it enters the viewport. */
|
|
5
|
+
export declare function MapView(props: MapViewProps): JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
import { type MapFrame } from "./map-view-geometry";
|
|
3
|
+
import type { MapViewFrameProps, MapViewMarker } from "./map-view-types";
|
|
4
|
+
export type { MapViewFrameProps } from "./map-view-types";
|
|
5
|
+
export declare const mapNumber: (value: number) => string;
|
|
6
|
+
export declare const selectedMarker: (markers: MapViewMarker[], selectedId?: string) => MapViewMarker | undefined;
|
|
7
|
+
export declare function frameStyle(frame: MapFrame, padding: number): JSX.CSSProperties;
|
|
8
|
+
export declare function MapGeometry(props: MapViewFrameProps & {
|
|
9
|
+
frame: MapFrame;
|
|
10
|
+
boxStyle?: JSX.CSSProperties;
|
|
11
|
+
onSelect?: (id: string) => void;
|
|
12
|
+
/** Pins are buttons in MapView; the standalone frame draws them as labelled images, never focusable. */
|
|
13
|
+
interactive?: boolean;
|
|
14
|
+
/** 2^(live zoom - fitted zoom), so pin separation follows the person's zoom; 1 until then. */
|
|
15
|
+
zoomFactor?: number;
|
|
16
|
+
}): JSX.Element;
|
|
17
|
+
export type MapScale = {
|
|
18
|
+
label: string;
|
|
19
|
+
width: string;
|
|
20
|
+
};
|
|
21
|
+
export declare function referenceScale(frame: MapFrame, padding: number): MapScale;
|
|
22
|
+
export declare function MapScaleBar(props: {
|
|
23
|
+
scale: MapScale;
|
|
24
|
+
}): JSX.Element;
|
|
25
|
+
/** The scale bar and the attribution share the bottom row, so a long attribution wraps before it covers the scale. */
|
|
26
|
+
export declare function MapFootRow(props: {
|
|
27
|
+
scale?: MapScale;
|
|
28
|
+
children?: JSX.Element;
|
|
29
|
+
}): JSX.Element;
|
|
30
|
+
/** Geometry without a browser, a canvas, or a network dependency; suitable for server rendering and PDF output. */
|
|
31
|
+
export declare function MapViewFrame(props: MapViewFrameProps): JSX.Element;
|
|
@@ -35,9 +35,15 @@ export type { LightboxAction, LightboxImage } from "./Lightbox";
|
|
|
35
35
|
export { default as Lightbox } from "./Lightbox";
|
|
36
36
|
export type { LogTableEntry } from "./LogEntriesTable";
|
|
37
37
|
export { default as LogEntriesTable } from "./LogEntriesTable";
|
|
38
|
+
export { MapAttribution } from "./MapAttribution";
|
|
39
|
+
export { MapView } from "./MapView";
|
|
40
|
+
export { MapViewFrame } from "./MapViewFrame";
|
|
38
41
|
export { default as MarkdownView, type MarkdownRenderOptions, type MarkdownViewProps, renderSafeMarkdown } from "./MarkdownView";
|
|
39
42
|
export type { MessageGroupEntry, MessageRowAction, MessageRowAttachment, MessageRowAuthor, MessageRowFile, MessageRowMedia, MessageRowProgress, MessageRowProps, MessageRowQuote, MessageRowReaction, MessageRowStatus, MessageRowThread, MessageSystemRowProps, } from "./MessageRow";
|
|
40
43
|
export { MessageRow, MessageSystemRow, startsMessageGroup } from "./MessageRow";
|
|
44
|
+
export { type MapPaletteColors, type MapTheme, mapPalette } from "./map-palette";
|
|
45
|
+
export { type MapStyleOptions, mapAttribution, mapStyle } from "./map-style";
|
|
46
|
+
export type { MapViewArea, MapViewFit, MapViewFrameProps, MapViewLine, MapViewLineTone, MapViewMarker, MapViewOwnLocation, MapViewPoint, MapViewProps, MapViewStyle, MapViewStyleSource, MapViewTone, } from "./map-view-types";
|
|
41
47
|
export { MARKDOWN_CALLOUT_CLASSES, MARKDOWN_CALLOUT_ICON_ATTRIBUTES, type MarkdownInfoBlock, type MarkdownInfoBlockRenderInput, type MarkdownInfoBlockType, markdownInfoBlocks, renderMarkdownInfoBlock, scanMarkdownInfoBlock, } from "./markdown-info-blocks";
|
|
42
48
|
export { type MarkdownLinkInput, type MarkdownReference, type MarkdownReferenceKind, type MarkdownReferenceType, markdownLinkReference, markdownReferenceIcon, markdownReferenceType, markdownReferenceTypeLabel, markStandaloneLinks, renderMarkdownLink, } from "./markdown-links";
|
|
43
49
|
export { Pagination, type PaginationProps } from "./Pagination";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/** The map image colours. Each key is also the CSS token `--k2b-map-<kebab-key>` on `.k2b-map-view`. */
|
|
2
|
+
export type MapPaletteColors = {
|
|
3
|
+
/** Background land, also behind the server frame before the map image arrives. */
|
|
4
|
+
land: string;
|
|
5
|
+
/** Woods, grass, and city green; large protected areas stay plain land. */
|
|
6
|
+
green: string;
|
|
7
|
+
water: string;
|
|
8
|
+
building: string;
|
|
9
|
+
road: string;
|
|
10
|
+
roadCasing: string;
|
|
11
|
+
motorway: string;
|
|
12
|
+
motorwayCasing: string;
|
|
13
|
+
/** Rail lines and footpaths. */
|
|
14
|
+
rail: string;
|
|
15
|
+
boundary: string;
|
|
16
|
+
/** Streets, suburbs, villages, and states. */
|
|
17
|
+
label: string;
|
|
18
|
+
/** Cities, towns, and countries. */
|
|
19
|
+
labelStrong: string;
|
|
20
|
+
waterLabel: string;
|
|
21
|
+
};
|
|
22
|
+
export type MapTheme = "light" | "dark";
|
|
23
|
+
/**
|
|
24
|
+
* Plain data so a server can build the style JSON without CSS. The accent stays with the host's
|
|
25
|
+
* pins and lines; the map image only uses calm land, water, green, and road tones.
|
|
26
|
+
*/
|
|
27
|
+
export declare const mapPalette: {
|
|
28
|
+
readonly light: {
|
|
29
|
+
readonly land: "#f1efe9";
|
|
30
|
+
readonly green: "#e3ecd9";
|
|
31
|
+
readonly water: "#cfe3f3";
|
|
32
|
+
readonly building: "#e8e5dd";
|
|
33
|
+
readonly road: "#ffffff";
|
|
34
|
+
readonly roadCasing: "#dcd8ce";
|
|
35
|
+
readonly motorway: "#f6c76b";
|
|
36
|
+
readonly motorwayCasing: "#d9a443";
|
|
37
|
+
readonly rail: "#c4bfb4";
|
|
38
|
+
readonly boundary: "#aea89c";
|
|
39
|
+
readonly label: "#52525b";
|
|
40
|
+
readonly labelStrong: "#27272a";
|
|
41
|
+
readonly waterLabel: "#3a6383";
|
|
42
|
+
};
|
|
43
|
+
readonly dark: {
|
|
44
|
+
readonly land: "#1a1f26";
|
|
45
|
+
readonly green: "#1c2a22";
|
|
46
|
+
readonly water: "#14283a";
|
|
47
|
+
readonly building: "#20262e";
|
|
48
|
+
readonly road: "#2c333d";
|
|
49
|
+
readonly roadCasing: "#222830";
|
|
50
|
+
readonly motorway: "#5d6470";
|
|
51
|
+
readonly motorwayCasing: "#444a54";
|
|
52
|
+
readonly rail: "#39404a";
|
|
53
|
+
readonly boundary: "#4f5763";
|
|
54
|
+
readonly label: "#a1a1aa";
|
|
55
|
+
readonly labelStrong: "#e4e4e7";
|
|
56
|
+
readonly waterLabel: "#8fb5d3";
|
|
57
|
+
};
|
|
58
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { StyleSpecification } from "maplibre-gl";
|
|
2
|
+
import { type MapTheme } from "./map-palette";
|
|
3
|
+
export type MapStyleOptions = {
|
|
4
|
+
theme: MapTheme;
|
|
5
|
+
/** Request locale such as `de` or `de-DE`; labels prefer `name:<language>`. */
|
|
6
|
+
locale: string;
|
|
7
|
+
/** Vector tile template with `{z}`, `{x}`, and `{y}`, for example `/_geo/tiles/{z}/{x}/{y}.pbf`. */
|
|
8
|
+
tiles: string;
|
|
9
|
+
/** Glyph template with `{fontstack}` and `{range}`, served from `@k2b/ui/map-glyphs/*`. */
|
|
10
|
+
glyphs: string;
|
|
11
|
+
/** Highest zoom the tiles carry; the map scales the last level up beyond it. Defaults to 14. */
|
|
12
|
+
maxzoom?: number;
|
|
13
|
+
};
|
|
14
|
+
/** Attribution for OpenMapTiles-schema maps with OpenStreetMap data from Geoapify, in display order. */
|
|
15
|
+
export declare const mapAttribution: readonly [{
|
|
16
|
+
readonly label: "© OpenStreetMap";
|
|
17
|
+
readonly href: "https://www.openstreetmap.org/copyright";
|
|
18
|
+
}, {
|
|
19
|
+
readonly label: "© OpenMapTiles";
|
|
20
|
+
readonly href: "https://openmaptiles.org/";
|
|
21
|
+
}, {
|
|
22
|
+
readonly label: "Geoapify";
|
|
23
|
+
readonly href: "https://www.geoapify.com/";
|
|
24
|
+
}];
|
|
25
|
+
/**
|
|
26
|
+
* A flat Cloud map style for OpenMapTiles-schema vector tiles. The host passes the tile and glyph
|
|
27
|
+
* templates; there are no network defaults, sprites, extrusions, or relief.
|
|
28
|
+
*/
|
|
29
|
+
export declare function mapStyle(options: MapStyleOptions): StyleSpecification;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { MapViewFrameProps, MapViewLine, MapViewMarker, MapViewPoint } from "./map-view-types";
|
|
2
|
+
export declare const MIN_SPAN: number;
|
|
3
|
+
export declare const EARTH_CIRCUMFERENCE = 40075016.686;
|
|
4
|
+
/** Room around the fitted geometry: clears the floating controls, the notice, the scale bar and the attribution. */
|
|
5
|
+
export declare const DEFAULT_PADDING = 64;
|
|
6
|
+
/**
|
|
7
|
+
* `referenceWidth` is the fitted width when the container is wide enough; `minWidth` keeps the whole world at least as
|
|
8
|
+
* tall as the map, the smallest zoom MapLibre allows, so a world-scale fit lands where MapLibre puts it.
|
|
9
|
+
*/
|
|
10
|
+
export type MapFrame = {
|
|
11
|
+
minX: number;
|
|
12
|
+
minY: number;
|
|
13
|
+
spanX: number;
|
|
14
|
+
spanY: number;
|
|
15
|
+
aspect: number;
|
|
16
|
+
referenceWidth: number;
|
|
17
|
+
minWidth: number;
|
|
18
|
+
/** The fitted width on a 320 px phone: pins are kept apart from this scale up, so they never cover each other there. */
|
|
19
|
+
overlapWidth: number;
|
|
20
|
+
};
|
|
21
|
+
export declare function decodePolyline6(encoded: string): MapViewPoint[];
|
|
22
|
+
export declare const linePoints: (line: MapViewLine) => MapViewPoint[];
|
|
23
|
+
export declare function projectPoint(point: MapViewPoint): {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
};
|
|
27
|
+
export declare function unprojectPoint(x: number, y: number): MapViewPoint;
|
|
28
|
+
export declare function mapFrame(geometry: Pick<MapViewFrameProps, "markers" | "lines" | "areas" | "ownLocation" | "fit">, height: number, padding?: number): MapFrame | null;
|
|
29
|
+
export declare function fitCamera(frame: MapFrame, width: number, padding?: number): {
|
|
30
|
+
center: [number, number];
|
|
31
|
+
zoom: number;
|
|
32
|
+
};
|
|
33
|
+
export declare const isStop: (marker: MapViewMarker) => boolean;
|
|
34
|
+
export declare function sortMarkers(markers: MapViewMarker[]): MapViewMarker[];
|
|
35
|
+
type PinOffset = {
|
|
36
|
+
dx: number;
|
|
37
|
+
dy: number;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Pin offsets in px, decided from the data alone: at the phone fit and checked for every wider fit up to the widest
|
|
41
|
+
* one, so they hold at any width. `zoomFactor` is 2^(live zoom - fitted zoom): 1 for the server frame, the first client
|
|
42
|
+
* frame and the untouched live map, so all three agree; when the person zooms, separation is decided for the new scale.
|
|
43
|
+
*/
|
|
44
|
+
export declare function pinOffsets(sortedMarkers: MapViewMarker[], frame: MapFrame, zoomFactor?: number, ownLocation?: MapViewPoint): Map<string, PinOffset>;
|
|
45
|
+
/**
|
|
46
|
+
* The touch hit radius of each pin in px: up to 22 px (a 44 px target), but never into a neighbour's visible mark
|
|
47
|
+
* (radius up to 14 px) at any width, so a tap on a visible pin always reaches it.
|
|
48
|
+
*/
|
|
49
|
+
export declare function pinHitRadii(sortedMarkers: MapViewMarker[], frame: MapFrame, offsets: Map<string, PinOffset>, zoomFactor?: number): Map<string, number>;
|
|
50
|
+
export declare const metersPerPixel: (lat: number, zoom: number) => number;
|
|
51
|
+
export declare function scaleBar(mpp: number, maxPx?: number): {
|
|
52
|
+
meters: number;
|
|
53
|
+
label: string;
|
|
54
|
+
};
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const useMapViewMessages: () => () => {
|
|
2
|
+
mapLabel: string;
|
|
3
|
+
summary: ({ count }: {
|
|
4
|
+
count: number;
|
|
5
|
+
}) => string;
|
|
6
|
+
pins: string;
|
|
7
|
+
zoomIn: string;
|
|
8
|
+
zoomOut: string;
|
|
9
|
+
locate: string;
|
|
10
|
+
loading: string;
|
|
11
|
+
error: string;
|
|
12
|
+
retry: string;
|
|
13
|
+
reload: string;
|
|
14
|
+
noWebgl: string;
|
|
15
|
+
ownLocation: string;
|
|
16
|
+
canvasTitle: string;
|
|
17
|
+
gestureWindows: string;
|
|
18
|
+
gestureMac: string;
|
|
19
|
+
gestureMobile: string;
|
|
20
|
+
};
|
|
21
|
+
export declare const checkMapViewMessages: () => import("@k2b/stdlib").CatalogIssue[];
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { StyleSpecification } from "maplibre-gl";
|
|
2
|
+
import type { JSX } from "solid-js";
|
|
3
|
+
export type MapViewPoint = {
|
|
4
|
+
lat: number;
|
|
5
|
+
lon: number;
|
|
6
|
+
};
|
|
7
|
+
export type MapViewTone = "accent" | "second" | "neutral" | "warning";
|
|
8
|
+
export type MapViewMarker = {
|
|
9
|
+
id: string;
|
|
10
|
+
point: MapViewPoint;
|
|
11
|
+
/** A number, a single letter, or "+". Omit for a drop pin. */
|
|
12
|
+
mark?: number | string;
|
|
13
|
+
label: string;
|
|
14
|
+
tone?: MapViewTone;
|
|
15
|
+
selected?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export type MapViewLineTone = "accent" | "muted" | "preview" | "previous";
|
|
18
|
+
export type MapViewLine = {
|
|
19
|
+
id: string;
|
|
20
|
+
tone?: MapViewLineTone;
|
|
21
|
+
} & ({
|
|
22
|
+
polyline6: string;
|
|
23
|
+
} | {
|
|
24
|
+
points: MapViewPoint[];
|
|
25
|
+
});
|
|
26
|
+
export type MapViewArea = {
|
|
27
|
+
id: string;
|
|
28
|
+
polygon: MapViewPoint[];
|
|
29
|
+
tone?: MapViewTone;
|
|
30
|
+
};
|
|
31
|
+
export type MapViewOwnLocation = {
|
|
32
|
+
point: MapViewPoint;
|
|
33
|
+
accuracyMeters?: number;
|
|
34
|
+
};
|
|
35
|
+
export type MapViewStyle = string | StyleSpecification;
|
|
36
|
+
export type MapViewStyleSource = MapViewStyle | {
|
|
37
|
+
light: MapViewStyle;
|
|
38
|
+
dark: MapViewStyle;
|
|
39
|
+
};
|
|
40
|
+
export type MapViewFit = "all" | "markers";
|
|
41
|
+
export type MapViewFrameProps = {
|
|
42
|
+
markers?: MapViewMarker[];
|
|
43
|
+
lines?: MapViewLine[];
|
|
44
|
+
areas?: MapViewArea[];
|
|
45
|
+
ownLocation?: MapViewOwnLocation;
|
|
46
|
+
height: number;
|
|
47
|
+
padding?: number;
|
|
48
|
+
fit?: MapViewFit;
|
|
49
|
+
selectedId?: string;
|
|
50
|
+
attribution?: JSX.Element;
|
|
51
|
+
class?: string;
|
|
52
|
+
};
|
|
53
|
+
export type MapViewProps = Omit<MapViewFrameProps, "attribution"> & {
|
|
54
|
+
style: MapViewStyleSource;
|
|
55
|
+
attribution: JSX.Element;
|
|
56
|
+
onSelect?: (id: string) => void;
|
|
57
|
+
infoTile?: (marker: MapViewMarker) => JSX.Element;
|
|
58
|
+
notice?: JSX.Element;
|
|
59
|
+
empty?: JSX.Element;
|
|
60
|
+
onLocate?: () => void;
|
|
61
|
+
};
|
|
@@ -15,6 +15,7 @@ export type OpenDialogOptions = {
|
|
|
15
15
|
* Without it, only the synthetic Back on close is suppressed.
|
|
16
16
|
* Island disposal closes every open dialog immediately and forgets its marker without traversing history.
|
|
17
17
|
* The same-URL entry remains for the router to replace and counts as a page entry for later dialogs.
|
|
18
|
+
* A traversal that `@k2b/ssr/nav` hides from popstate listeners reaches this core through `ssr:nav-popstate`.
|
|
18
19
|
*/
|
|
19
20
|
history?: boolean;
|
|
20
21
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type LinkNavigateEvent, type NavigationScrollMode } from "@k2b/ssr/nav";
|
|
2
2
|
import { type JSX } from "solid-js";
|
|
3
3
|
import { type AppWorkspaceLayoutState } from "./app-workspace-state";
|
|
4
|
+
import { type AppWorkspaceWidthShare } from "./app-workspace-width";
|
|
4
5
|
import type { ScrollAreaProps } from "./ScrollArea";
|
|
5
6
|
import { type AppWorkspaceSidebarSwitcherProps } from "./SidebarSwitcher";
|
|
7
|
+
export type { AppWorkspaceWidthShare } from "./app-workspace-width";
|
|
6
8
|
export type AppWorkspaceHeadProps = {
|
|
7
9
|
/** View tabs, usually a ViewTabs. */
|
|
8
10
|
views?: JSX.Element;
|
|
@@ -63,13 +65,13 @@ export type AppWorkspaceMainProps = {
|
|
|
63
65
|
/** `"content"` centers the children as one reading column with the shared page width on large screens. */
|
|
64
66
|
width?: "full" | "content";
|
|
65
67
|
/**
|
|
66
|
-
* The width in px that Main keeps beside the sidebar and an open Detail,
|
|
68
|
+
* The width in px or a workspace width share that Main keeps beside the sidebar and an open Detail,
|
|
67
69
|
* from 48rem (768 px); at least the default 320. A Detail that does not fit
|
|
68
70
|
* beside it waits behind the head's Details button, and from 64rem of host
|
|
69
71
|
* width a sidebar that does not fit becomes the overlay. CSS decides, so
|
|
70
72
|
* the server renders the first frame.
|
|
71
73
|
*/
|
|
72
|
-
minWidth?: number;
|
|
74
|
+
minWidth?: number | AppWorkspaceWidthShare;
|
|
73
75
|
mobilePane?: string;
|
|
74
76
|
/** Levels in DOM order, shallowest first. The URL selects the deepest level by id. */
|
|
75
77
|
level?: string;
|
|
@@ -93,7 +95,7 @@ export type AppWorkspaceMainPaneProps = {
|
|
|
93
95
|
open?: boolean;
|
|
94
96
|
resizable?: boolean;
|
|
95
97
|
resizeShadow?: boolean;
|
|
96
|
-
defaultSize?: number;
|
|
98
|
+
defaultSize?: number | AppWorkspaceWidthShare;
|
|
97
99
|
minSize?: number;
|
|
98
100
|
maxSize?: number;
|
|
99
101
|
class?: string;
|
|
@@ -395,6 +397,8 @@ export type AppWorkspaceNavTreeItemProps = {
|
|
|
395
397
|
type AppWorkspaceNavTreeComponent = ((props: AppWorkspaceNavTreeProps) => JSX.Element) & {
|
|
396
398
|
Item: (props: AppWorkspaceNavTreeItemProps) => JSX.Element;
|
|
397
399
|
};
|
|
400
|
+
/** The Detail region's DOM id, for application controls that target it with aria-controls. */
|
|
401
|
+
export declare const appWorkspaceDetailElementId: (id: string) => string;
|
|
398
402
|
type AppWorkspaceComponent = ((props: AppWorkspaceProps) => JSX.Element) & {
|
|
399
403
|
LayoutStateProvider: (props: AppWorkspaceLayoutStateProviderProps) => JSX.Element;
|
|
400
404
|
Head: (props: AppWorkspaceHeadProps) => JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** A width that follows the workspace's own border-box width: clamp(min, share × workspace width + offset, max), in px. */
|
|
2
|
+
export type AppWorkspaceWidthShare = {
|
|
3
|
+
share: number;
|
|
4
|
+
offset?: number;
|
|
5
|
+
min: number;
|
|
6
|
+
max: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const isAppWorkspaceWidthShare: (value: unknown) => value is AppWorkspaceWidthShare;
|
|
9
|
+
export declare const appWorkspaceWidthToken: (value: number | AppWorkspaceWidthShare) => string;
|
|
10
|
+
export declare const readAppWorkspaceWidth: (token: string | undefined) => number | AppWorkspaceWidthShare | undefined;
|
|
11
|
+
export declare const resolveAppWorkspaceWidth: (value: number | AppWorkspaceWidthShare, workspaceWidth: number) => number;
|
|
12
|
+
export declare const appWorkspaceWidthCss: (value: number | AppWorkspaceWidthShare, width: string) => string;
|
|
13
|
+
export declare const appWorkspaceInverseWidthCss: (value: AppWorkspaceWidthShare, width: string) => string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type { AppOverviewCardsProps, AppOverviewEmptyStateProps, AppOverviewPanelProps, AppOverviewProps, } from "./AppOverview";
|
|
2
2
|
export { default as AppOverview } from "./AppOverview";
|
|
3
|
-
export type { AppWorkspaceBottomDrawerHeight, AppWorkspaceBottomDrawerProps, AppWorkspaceContentProps, AppWorkspaceDetailProps, AppWorkspaceDetailWidth, AppWorkspaceHeadProps, AppWorkspaceMainPaneProps, AppWorkspaceMainProps, AppWorkspaceNavTreeItemProps, AppWorkspaceNavTreeMove, AppWorkspaceNavTreeProps, AppWorkspaceProps, AppWorkspaceSidebarAccessoryVisibility, AppWorkspaceSidebarBodyProps, AppWorkspaceSidebarIconActionProps, AppWorkspaceSidebarIconActionTone, AppWorkspaceSidebarIconGridProps, AppWorkspaceSidebarItemActionProps, AppWorkspaceSidebarItemActionsProps, AppWorkspaceSidebarItemIconProps, AppWorkspaceSidebarItemLabelProps, AppWorkspaceSidebarItemMetaProps, AppWorkspaceSidebarItemProps, AppWorkspaceSidebarItemStatusProps, AppWorkspaceSidebarItemTone, AppWorkspaceSidebarProps, AppWorkspaceSidebarSectionProps, AppWorkspaceSidebarVisibility, } from "./AppWorkspace";
|
|
4
|
-
export { default as AppWorkspace } from "./AppWorkspace";
|
|
3
|
+
export type { AppWorkspaceBottomDrawerHeight, AppWorkspaceBottomDrawerProps, AppWorkspaceContentProps, AppWorkspaceDetailProps, AppWorkspaceDetailWidth, AppWorkspaceHeadProps, AppWorkspaceMainPaneProps, AppWorkspaceMainProps, AppWorkspaceNavTreeItemProps, AppWorkspaceNavTreeMove, AppWorkspaceNavTreeProps, AppWorkspaceProps, AppWorkspaceSidebarAccessoryVisibility, AppWorkspaceSidebarBodyProps, AppWorkspaceSidebarIconActionProps, AppWorkspaceSidebarIconActionTone, AppWorkspaceSidebarIconGridProps, AppWorkspaceSidebarItemActionProps, AppWorkspaceSidebarItemActionsProps, AppWorkspaceSidebarItemIconProps, AppWorkspaceSidebarItemLabelProps, AppWorkspaceSidebarItemMetaProps, AppWorkspaceSidebarItemProps, AppWorkspaceSidebarItemStatusProps, AppWorkspaceSidebarItemTone, AppWorkspaceSidebarProps, AppWorkspaceSidebarSectionProps, AppWorkspaceSidebarVisibility, AppWorkspaceWidthShare, } from "./AppWorkspace";
|
|
4
|
+
export { appWorkspaceDetailElementId, default as AppWorkspace } from "./AppWorkspace";
|
|
5
5
|
export { watchAppHostWidth } from "./app-host-width";
|
|
6
6
|
export type { AppWorkspaceControllerOptions } from "./app-workspace-controller";
|
|
7
7
|
export { installAppWorkspaceController, parkWorkspaceDetailDrawers } from "./app-workspace-controller";
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2019 IBM Corp. All rights reserved. IBMPlexSans-Italic[wdth,wght].ttf: Copyright 2019 IBM Corp. All rights reserved.
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k2b/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "Production-ready components for SolidJS applications.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,10 +31,12 @@
|
|
|
31
31
|
"browser": "./dist/browser/chart-inspection.js",
|
|
32
32
|
"default": "./dist/browser/chart-inspection.js"
|
|
33
33
|
},
|
|
34
|
-
"./package.json": "./package.json"
|
|
34
|
+
"./package.json": "./package.json",
|
|
35
|
+
"./map-glyphs/*": "./map-glyphs/*"
|
|
35
36
|
},
|
|
36
37
|
"files": [
|
|
37
38
|
"dist",
|
|
39
|
+
"map-glyphs",
|
|
38
40
|
"README.md"
|
|
39
41
|
],
|
|
40
42
|
"scripts": {
|
|
@@ -52,17 +54,18 @@
|
|
|
52
54
|
"@fontsource/ibm-plex-sans": "5.3.0",
|
|
53
55
|
"@k2b/stdlib": "0.30.0",
|
|
54
56
|
"@tabler/icons-webfont": "3.48.0",
|
|
57
|
+
"maplibre-gl": "6.14.0",
|
|
55
58
|
"marked": "18.0.14",
|
|
56
59
|
"qr-scanner": "1.4.2"
|
|
57
60
|
},
|
|
58
61
|
"peerDependencies": {
|
|
59
|
-
"@k2b/ssr": "^0.12.0 || ^0.13.0 || ^0.14.0 || ^0.15.0 || ^0.16.0 || ^0.17.0 || ^0.18.0",
|
|
62
|
+
"@k2b/ssr": "^0.12.0 || ^0.13.0 || ^0.14.0 || ^0.15.0 || ^0.16.0 || ^0.17.0 || ^0.18.0 || ^0.19.0",
|
|
60
63
|
"solid-js": "^1.9.10"
|
|
61
64
|
},
|
|
62
65
|
"devDependencies": {
|
|
63
66
|
"@babel/core": "8.0.6",
|
|
64
67
|
"@babel/preset-typescript": "8.0.1",
|
|
65
|
-
"@k2b/ssr": "0.
|
|
68
|
+
"@k2b/ssr": "0.19.0",
|
|
66
69
|
"@types/babel__core": "7.20.5",
|
|
67
70
|
"@types/bun": "1.4.2",
|
|
68
71
|
"axe-core": "4.11.0",
|
|
@@ -76,7 +79,9 @@
|
|
|
76
79
|
"solid-js": "1.9.15",
|
|
77
80
|
"tailwindcss": "4.3.3",
|
|
78
81
|
"typescript": "7.0.2",
|
|
79
|
-
"@typescript/typescript6": "6.0.2"
|
|
82
|
+
"@typescript/typescript6": "6.0.2",
|
|
83
|
+
"@maplibre/maplibre-gl-style-spec": "26.4.4",
|
|
84
|
+
"fontnik": "0.7.7"
|
|
80
85
|
},
|
|
81
86
|
"publishConfig": {
|
|
82
87
|
"access": "public"
|