UNPKG

transitive-js

Version:

A tool for generating dynamic stylized transit maps that are easy to understand.

175 lines (174 loc) 6.56 kB
declare namespace _default { export { labels }; export { multipointsMerged as multipoints_merged }; export { multipointsPattern as multipoints_pattern }; export { places }; export { segmentLabelContainers as segment_label_containers }; export { segmentLabels as segment_labels }; export { segments }; export { segmentsFront as segments_front }; export { segmentsHalo as segments_halo }; export { stopsMerged as stops_merged }; export { stopsPattern as stops_pattern }; export { utils }; export { wireframeEdges as wireframe_edges }; export { wireframeVertices as wireframe_vertices }; } export default _default; /** * Default label rules */ declare const labels: { 'font-family': string; 'font-size': number; /** * 'orientations' is a transitive-specific attribute used to specify allowable * label placement orientations expressed as one of eight compass directions * relative to the point being labeled: * * 'N' * 'NW' | 'NE' * \ | / * 'W' -- O -- 'E' * / | \ * 'SW' | 'SE' * 'S * * Labels oriented 'E' or 'W' are rendered horizontally, 'N' and 'S' vertically, * and all others at a 45-degree angle. * * Returns an array of allowed orientation codes in the order that they will be * tried by the labeler. */ orientations: string[][]; }; /** * Default MultiPoint rules -- based on Stop rules */ declare const multipointsMerged: { fill: (display: any, point: any, index: any, utils: any) => string; /** * Transitive-specific attribute specifying any additional padding, in pixels, * to apply to main stop marker. A value of zero (default) results in a that * marker is flush to the edges of the pattern segment(s) the point is set against. * A value greater than zero creates a marker that is larger than the width of * the segments(s). */ 'marker-padding': number; /** * Transitive-specific attribute specifying the shape of the main stop marker. * Can be 'roundedrect', 'rectangle' or 'circle' */ 'marker-type': (string | ((display: any, data: any, index: any, utils: any) => "circle" | undefined))[]; r: (display: any, point: any, index: any, utils: any) => any; stroke: (display: any, point: any, index: any, utils: any) => "#000" | "#e0e0e0"; 'stroke-width': (display: any, point: any, index: any, utils: any) => number; visibility: (display: any, data: any) => "hidden" | undefined; }; declare namespace multipointsPattern { export const cx: number; export const cy: number; export const r: (number | ((display: any, data: any, index: any, utils: any) => any))[]; export const stroke: string; export function visibility(display: any, data: any): "hidden" | undefined; } /** * Default place rules */ declare const places: { cx: number; cy: number; fill: string; r: number; stroke: string; 'stroke-width': string; }; /** * Label Containers */ declare const segmentLabelContainers: { fill: (display: any, data: any) => "#e0e0e0" | undefined; rx: number; ry: number; 'stroke-width': (display: any, data: any) => 0 | 1; }; declare const segmentLabels: { background: (string | ((display: any, segment: any) => any))[]; color: (string | ((display: any, segment: any) => any))[]; 'font-family': string; 'font-size': number; }; /** * All path segments * TODO: update old route-pattern-specific code below */ declare const segments: { envelope: ((display: any, data: any, index: any, utils: any) => string)[]; stroke: (string | ((display: any, segment: any) => any))[]; 'stroke-dasharray': (boolean | ((display: any, data: any) => "0, 8" | "8, 3" | "12, 12" | "12, 2" | undefined))[]; 'stroke-linecap': (string | ((display: any, segment: any) => "round" | undefined))[]; 'stroke-width': (number | ((display: any, segment: any, index: any, utils: any) => 4 | 6 | undefined))[]; }; /** * Segments Front */ declare const segmentsFront: { display: (string | ((display: any, data: any, index: any, utils: any) => "inline" | undefined))[]; fill: string; stroke: string; 'stroke-width': (display: any, data: any, index: any, utils: any) => string; }; /** * Segments Halo */ declare const segmentsHalo: { fill: string; stroke: string; 'stroke-linecap': string; 'stroke-width': (display: any, data: any, index: any, utils: any) => any; }; /** * Default Merged Stops Rules */ declare const stopsMerged: { fill: (display: any, point: any, index: any, utils: any) => string; /** * Transitive-specific attribute specifying any additional padding, in pixels, * to apply to main stop marker. A value of zero (default) results in a that * marker is flush to the edges of the pattern segment(s) the point is set against. * A value greater than zero creates a marker that is larger than the width of * the segments(s). */ 'marker-padding': number; /** * Transitive-specific attribute specifying the shape of the main stop marker. * Can be 'roundedrect', 'rectangle' or 'circle' */ 'marker-type': (string | ((display: any, data: any, index: any, utils: any) => "circle" | undefined))[]; r: (display: any, point: any, index: any, utils: any) => any; stroke: (display: any, point: any, index: any, utils: any) => "#000" | "#e0e0e0"; 'stroke-width': (display: any, point: any, index: any, utils: any) => number; visibility: (display: any, data: any) => "hidden" | undefined; }; declare namespace stopsPattern { } declare namespace utils { export function defineSegmentCircleMarker(display: any, segment: any, radius: any, fillColor: any): string; export function fontSize(display: any): number; export function pixels(zoom: any, min: any, normal: any, max: any): number; export function strokeWidth(display: any): number; } declare const wireframeEdges: { fill: string; stroke: string; 'stroke-dasharray': string; 'stroke-width': number; }; declare namespace wireframeVertices { const cx_1: number; export { cx_1 as cx }; const cy_1: number; export { cy_1 as cy }; export const fill: string; const r_1: number; export { r_1 as r }; }