@dxos/solid-ui-geo 0.10.0 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/lib/chunk-countries-110m.mjs +11548 -0
  2. package/dist/lib/chunk-countries-110m.mjs.map +1 -0
  3. package/dist/lib/data.mjs +8 -0
  4. package/dist/lib/data.mjs.map +1 -0
  5. package/dist/lib/index.mjs +980 -0
  6. package/dist/lib/index.mjs.map +1 -0
  7. package/dist/lib/translations.mjs +12 -0
  8. package/dist/lib/translations.mjs.map +1 -0
  9. package/dist/types/tsconfig.tsbuildinfo +1 -1
  10. package/package.json +13 -14
  11. package/dist/lib/browser/chunk-RMZP4JBX.mjs +0 -9
  12. package/dist/lib/browser/chunk-RMZP4JBX.mjs.map +0 -7
  13. package/dist/lib/browser/countries-110m-MXSNZ6PF.mjs +0 -37859
  14. package/dist/lib/browser/countries-110m-MXSNZ6PF.mjs.map +0 -7
  15. package/dist/lib/browser/data.mjs +0 -7
  16. package/dist/lib/browser/data.mjs.map +0 -7
  17. package/dist/lib/browser/index.mjs +0 -1217
  18. package/dist/lib/browser/index.mjs.map +0 -7
  19. package/dist/lib/browser/meta.json +0 -1
  20. package/dist/lib/browser/translations.mjs +0 -19
  21. package/dist/lib/browser/translations.mjs.map +0 -7
  22. package/dist/lib/node-esm/chunk-ICM52DKE.mjs +0 -11
  23. package/dist/lib/node-esm/chunk-ICM52DKE.mjs.map +0 -7
  24. package/dist/lib/node-esm/countries-110m-HEHEK3AV.mjs +0 -37861
  25. package/dist/lib/node-esm/countries-110m-HEHEK3AV.mjs.map +0 -7
  26. package/dist/lib/node-esm/data.mjs +0 -8
  27. package/dist/lib/node-esm/data.mjs.map +0 -7
  28. package/dist/lib/node-esm/index.mjs +0 -1218
  29. package/dist/lib/node-esm/index.mjs.map +0 -7
  30. package/dist/lib/node-esm/meta.json +0 -1
  31. package/dist/lib/node-esm/translations.mjs +0 -21
  32. package/dist/lib/node-esm/translations.mjs.map +0 -7
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/hooks/context.tsx","../../src/util/debug.ts","../../src/util/inertia.ts","../../src/util/path.ts","../../src/util/render.ts","../../src/hooks/useDrag.ts","../../src/hooks/useGlobeZoomHandler.ts","../../src/hooks/useMapZoomHandler.ts","../../src/hooks/useSpinner.ts","../../src/hooks/useTour.ts","../../src/components/Toolbar/Controls.tsx","../../src/components/Globe/Globe.tsx","../../src/components/Map/Map.tsx"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Accessor, type JSX, type Setter, createContext, createEffect, createSignal, useContext } from 'solid-js';\n\nimport { raise } from '@dxos/debug';\n\nimport { type LatLngLiteral } from '../types';\n\n// TODO(burdon): Factor out common geometry types.\nexport type Size = { width: number; height: number };\nexport type Point = { x: number; y: number };\nexport type Vector = [number, number, number];\n\nexport type GlobeContextType = {\n size: Accessor<Size>;\n center: Accessor<LatLngLiteral | undefined>;\n zoom: Accessor<number>;\n translation: Accessor<Point | undefined>;\n rotation: Accessor<Vector | undefined>;\n setCenter: Setter<LatLngLiteral | undefined>;\n setZoom: Setter<number>;\n setTranslation: Setter<Point | undefined>;\n setRotation: Setter<Vector | undefined>;\n};\n\nconst defaults = {\n center: { lat: 51, lng: 0 } as LatLngLiteral,\n zoom: 4,\n} as const;\n\nconst GlobeContext = createContext<GlobeContextType>();\n\nexport type GlobeContextProviderProps = {\n children: JSX.Element;\n size?: Size;\n center?: LatLngLiteral;\n zoom?: number;\n translation?: Point;\n rotation?: Vector;\n};\n\nexport const GlobeContextProvider = (props: GlobeContextProviderProps) => {\n const [size, setSize] = createSignal<Size>(props.size ?? { width: 0, height: 0 });\n const [center, setCenter] = createSignal<LatLngLiteral | undefined>(props.center ?? defaults.center);\n const [zoom, setZoom] = createSignal(props.zoom ?? defaults.zoom);\n const [translation, setTranslation] = createSignal<Point | undefined>(props.translation);\n const [rotation, setRotation] = createSignal<Vector | undefined>(props.rotation);\n\n // Update size when prop changes\n createEffect(() => {\n if (props.size) {\n setSize(props.size);\n }\n });\n\n return (\n <GlobeContext.Provider\n value={{\n size,\n center,\n zoom,\n translation,\n rotation,\n setCenter,\n setZoom,\n setTranslation,\n setRotation,\n }}\n >\n {props.children}\n </GlobeContext.Provider>\n );\n};\n\nexport const useGlobeContext = () => {\n return useContext(GlobeContext) ?? raise(new Error('Missing GlobeContext'));\n};\n","//\n// Copyright 2025 DXOS.org\n//\n\nconst debug = false;\n\nexport const timer = <T = void>(cb: () => T): T => {\n const start = Date.now();\n const data = cb();\n const t = Date.now() - start / 1_000;\n if (debug) {\n // eslint-disable-next-line no-console\n console.log({ t, data });\n }\n\n return data;\n};\n","//\n// Copyright 2017 Philippe Rivière\n// Copyright 2025 DXOS.org\n// https://github.com/Fil/d3-inertia\n//\n\nimport { drag, select, timer } from 'd3';\nimport versor from 'versor';\n\nexport const restrictAxis =\n (axis: boolean[]) =>\n (original: number[], current: number[]): number[] =>\n current.map((d, i) => (axis[i] ? d : original[i]));\n\n/**\n * Applies a drag handler to the specified target element.\n */\n// TODO(burdon): Define type.\nexport const geoInertiaDrag = (target, render, projection, options) => {\n if (!options) {\n options = {};\n }\n\n // Target can be an element, a selector, a function, or a selection\n // but in case of a selection we make sure to reselect it with d3-selection.\n if (target.node) {\n target = target.node();\n }\n target = select(target);\n\n // Complete params: (projection, render, startDrag, dragging, endDrag).\n const inertia = geoInertiaDragHelper({\n projection,\n render: (rotation) => {\n projection.rotate(rotation);\n render && render();\n },\n axis: restrictAxis(options.xAxis ? [true, false, false] : [true, true, true]),\n start: options.start,\n move: options.move,\n end: options.end,\n stop: options.stop,\n finish: options.finish,\n time: options.time,\n hold: options.hold,\n });\n\n target.call(drag().on('start', inertia.start).on('drag', inertia.move).on('end', inertia.end));\n return inertia;\n};\n\n/**\n * A versor is a compact way to describe a rotation in 3D space.\n * It consists of four components [𝑤,x,y,z], where:\n * 𝑤 is a scalar representing the angle of rotation.\n * x, y, z are the vector components, representing the axis of rotation.\n */\nconst geoInertiaDragHelper = (opt) => {\n const projection = opt.projection;\n\n let v0; // Mouse position in Cartesian coordinates at start of drag gesture.\n let r0; // Projection rotation as Euler angles at start.\n let q0; // Projection rotation as versor at start.\n let v10; // Mouse position in Cartesian coordinates just before end of drag gesture.\n let v11; // Mouse position in Cartesian coordinates at end.\n let q10; // Projection rotation as versor at end.\n\n const inertia = inertiaHelper({\n axis: opt.axis,\n\n start: () => {\n v0 = versor.cartesian(projection.invert(inertia.position));\n r0 = projection.rotate();\n q0 = versor(r0);\n opt.start && opt.start();\n },\n\n move: () => {\n const inv = projection.rotate(r0).invert(inertia.position);\n if (isNaN(inv[0])) {\n return;\n }\n const v1 = versor.cartesian(inv);\n const q1 = versor.multiply(q0, versor.delta(v0, v1));\n const r1 = versor.rotation(q1);\n const r2 = opt.axis(r0, r1);\n opt.render(r2);\n opt.move && opt.move();\n },\n\n end: () => {\n // Velocity.\n v10 = versor.cartesian(projection.invert(inertia.position.map((d, i) => d - inertia.velocity[i] / 1_000)));\n q10 = versor(projection.rotate());\n v11 = versor.cartesian(projection.invert(inertia.position));\n opt.end && opt.end();\n },\n\n stop: opt.stop,\n\n finish: opt.finish,\n\n render: (t) => {\n const r1 = versor.rotation(versor.multiply(q10, versor.delta(v10, v11, t * 1_000)));\n const r2 = opt.axis(r0, r1);\n opt.render && opt.render(r2);\n },\n\n time: opt.time,\n });\n\n return inertia;\n};\n\nfunction inertiaHelper(opt) {\n const A = opt.time || 5_000; // Reference time in ms.\n const limit = 1.0001;\n const B = -Math.log(1 - 1 / limit);\n const inertia = {\n position: [0, 0],\n velocity: [0, 0], // Velocity in pixels/s.\n timer: timer(() => {}),\n time: 0,\n t: 0,\n\n start: function (ev) {\n const position = [ev.x, ev.y];\n inertia.position = position;\n inertia.velocity = [0, 0];\n inertia.timer.stop();\n this.classList.remove('inertia');\n this.classList.add('dragging');\n opt.start && opt.start.call(this, position);\n },\n\n move: function (ev) {\n const position = [ev.x, ev.y];\n const time = performance.now();\n const deltaTime = time - inertia.time;\n const decay = 1 - Math.exp(-deltaTime / 1_000);\n inertia.velocity = inertia.velocity.map((d, i) => {\n const deltaPos = position[i] - inertia.position[i];\n const deltaTime = time - inertia.time;\n return (1_000 * (1 - decay) * deltaPos) / deltaTime + d * decay;\n });\n\n // Clamp velocity axis.\n inertia.velocity = opt.axis([0, 0], inertia.velocity);\n\n inertia.time = time;\n inertia.position = position;\n opt.move && opt.move.call(this, position);\n },\n\n end: function (ev) {\n this.classList.remove('dragging', 'inertia');\n\n const v = inertia.velocity;\n if (v[0] * v[0] + v[1] * v[1] < 100) {\n inertia.timer.stop();\n return opt.stop && opt.stop();\n }\n\n const time = performance.now();\n const deltaTime = time - inertia.time;\n\n if (opt.hold === undefined) {\n opt.hold = 100;\n } // Default flick->drag threshold time (0 disables inertia).\n\n if (deltaTime >= opt.hold) {\n inertia.timer.stop();\n return opt.stop && opt.stop();\n }\n\n this.classList.add('inertia');\n opt.end && opt.end();\n\n const self = this;\n inertia.timer.restart((e) => {\n inertia.t = limit * (1 - Math.exp((-B * e) / A));\n opt.render && opt.render(inertia.t);\n if (inertia.t > 1) {\n inertia.timer.stop();\n self.classList.remove('inertia');\n inertia.velocity = [0, 0];\n inertia.t = 1;\n opt.finish && opt.finish();\n }\n });\n },\n };\n\n inertia.timer.stop();\n return inertia;\n}\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport { type GeoGeometryObjects, geoCircle as d3GeoCircle } from 'd3';\nimport { type Point, type Polygon, type Position } from 'geojson';\nimport { type LatLngLiteral } from 'leaflet';\n\nimport type { Vector } from '../hooks';\n\nexport const positionToRotation = ([lng, lat]: [number, number], tilt = 0): Vector => [-lng, tilt - lat, 0];\n\nexport const geoToPosition = ({ lat, lng }: LatLngLiteral): [number, number] => [lng, lat];\n\nexport const geoPoint = (point: LatLngLiteral): Point => ({ type: 'Point', coordinates: geoToPosition(point) });\n\n// https://github.com/d3/d3-geo#geoCircle\nexport const geoCircle = ({ lat, lng }: LatLngLiteral, radius: number): Polygon =>\n d3GeoCircle().radius(radius).center([lng, lat])();\n\nexport const geoLine = (p1: LatLngLiteral, p2: LatLngLiteral): GeoGeometryObjects => ({\n type: 'LineString',\n coordinates: [\n [p1.lng, p1.lat],\n [p2.lng, p2.lat],\n ],\n});\n\nexport const closestPoint = (points: Position[], target: Position): Position | null => {\n if (points.length === 0) {\n return target;\n }\n\n let closestPoint = points[0];\n let minDistance = getDistance(points[0], target);\n\n for (const point of points) {\n const distance = getDistance(point, target);\n if (distance < minDistance) {\n minDistance = distance;\n closestPoint = point;\n }\n }\n\n return closestPoint;\n};\n\nexport const getDistance = (point1: Position, point2: Position): number => {\n const dx = point1[0] - point2[0];\n const dy = point1[1] - point2[1];\n return Math.sqrt(dx * dx + dy * dy);\n};\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport { type GeoPath, type GeoPermissibleObjects, geoGraticule } from 'd3';\nimport { feature, mesh } from 'topojson-client';\nimport { type Topology } from 'topojson-specification';\n\nimport { type LatLngLiteral } from '../types';\nimport { geoLine, geoPoint } from './path';\n\nexport type Styles = Record<string, any>;\n\nexport type Style =\n | 'background'\n | 'water'\n | 'graticule'\n | 'land'\n | 'border'\n | 'dots'\n | 'point'\n | 'line'\n | 'cursor'\n | 'arc';\n\nexport type StyleSet = Partial<Record<Style, Styles>>;\n\nexport type Features = {\n points?: LatLngLiteral[];\n lines?: { source: LatLngLiteral; target: LatLngLiteral }[];\n};\n\nexport type Layer = {\n styles: Styles;\n path: GeoPermissibleObjects;\n};\n\n/**\n * Create rendering layers.\n */\nexport const createLayers = (topology: Topology, features: Features, styles: StyleSet): Layer[] => {\n const layers: Layer[] = [];\n\n if (styles.water) {\n layers.push({\n styles: styles.water,\n path: {\n type: 'Sphere',\n },\n });\n }\n\n if (styles.graticule) {\n layers.push({\n styles: styles.graticule,\n path: geoGraticule().step([6, 6])(),\n });\n }\n\n //\n // Topology.\n //\n\n if (topology) {\n if (topology.objects.land && styles.land) {\n layers.push({\n styles: styles.land,\n path: feature(topology, topology.objects.land),\n });\n }\n\n if (topology.objects.countries && styles.border) {\n layers.push({\n styles: styles.border,\n path: mesh(topology, topology.objects.countries, (a: any, b: any) => a !== b),\n });\n }\n\n if (topology.objects.dots && styles.dots) {\n layers.push({\n styles: styles.dots,\n path: topology.objects.dots as any, // TODO(burdon): Type.\n });\n }\n }\n\n //\n // Features.\n //\n\n if (features) {\n const { points, lines } = features;\n\n if (points && styles.point) {\n layers.push({\n styles: styles.point,\n path: {\n type: 'GeometryCollection',\n geometries: points.map((point) => geoPoint(point)),\n },\n });\n }\n\n if (lines && styles.line) {\n layers.push({\n styles: styles.line,\n path: {\n type: 'GeometryCollection',\n geometries: lines.map(({ source, target }) => geoLine(source, target)),\n },\n });\n }\n }\n\n return layers;\n};\n\n/**\n * Render layers created above.\n */\nexport const renderLayers = (generator: GeoPath, layers: Layer[] = [], scale: number, styles: StyleSet) => {\n const context: CanvasRenderingContext2D = generator.context();\n const {\n canvas: { width, height },\n } = context;\n context.reset();\n\n // Clear background.\n if (styles.background) {\n context.fillStyle = styles.background.fillStyle;\n context.fillRect(0, 0, width, height);\n } else {\n context.clearRect(0, 0, width, height);\n }\n\n // Render features.\n // https://github.com/d3/d3-geo#_path\n layers.forEach(({ path, styles }) => {\n context.save();\n let fill = false;\n let stroke = false;\n if (styles) {\n Object.entries(styles).forEach(([key, value]) => {\n if (key === 'pointRadius') {\n generator.pointRadius(value * scale);\n } else {\n context[key] = value;\n fill ||= key === 'fillStyle';\n stroke ||= key === 'strokeStyle';\n }\n });\n }\n\n context.beginPath();\n\n generator(path);\n fill && context.fill();\n stroke && context.stroke();\n context.restore();\n });\n\n return context;\n};\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport { select } from 'd3';\nimport { createEffect, onCleanup } from 'solid-js';\n\nimport { type GlobeController } from '../components';\nimport { geoInertiaDrag } from '../util';\n\nexport type GlobeDragEvent = {\n type: 'start' | 'move' | 'end';\n controller: GlobeController;\n};\n\nexport type DragOptions = {\n disabled?: boolean;\n duration?: number;\n xAxis?: boolean; // TODO(burdon): Generalize.\n onUpdate?: (event: GlobeDragEvent) => void;\n};\n\n/**\n * Allows user to drag globe.\n */\nexport const useDrag = (controller?: GlobeController | null, options: DragOptions = {}) => {\n createEffect(() => {\n const canvas = controller?.canvas;\n if (!canvas || options.disabled) {\n return;\n }\n\n geoInertiaDrag(\n select(canvas),\n () => {\n controller.setRotation(controller.projection.rotate());\n options.onUpdate?.({ type: 'move', controller });\n },\n controller.projection,\n {\n xAxis: options.xAxis,\n time: 3_000,\n start: () => options.onUpdate?.({ type: 'start', controller }),\n finish: () => options.onUpdate?.({ type: 'end', controller }),\n },\n );\n\n onCleanup(() => {\n cancelDrag(select(canvas));\n });\n });\n};\n\nconst cancelDrag = (node) => node.on('.drag', null);\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport { type ControlProps, type GlobeController } from '../components';\n\nconst ZOOM_FACTOR = 0.1;\n\nexport const useGlobeZoomHandler = (controller: GlobeController | null | undefined): ControlProps['onAction'] => {\n return (event) => {\n if (!controller) {\n return;\n }\n\n switch (event) {\n case 'zoom-in': {\n controller.setZoom((zoom) => {\n return zoom * (1 + ZOOM_FACTOR);\n });\n break;\n }\n case 'zoom-out': {\n controller.setZoom((zoom) => {\n return zoom * (1 - ZOOM_FACTOR);\n });\n break;\n }\n }\n };\n};\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport { type ControlProps, type MapController } from '../components';\n\nexport const useMapZoomHandler = (controller: MapController | null | undefined): ControlProps['onAction'] => {\n return (event) => {\n if (!controller) {\n return;\n }\n\n switch (event) {\n case 'zoom-in': {\n controller.setZoom((scale) => scale + 1);\n break;\n }\n case 'zoom-out': {\n controller.setZoom((scale) => scale - 1);\n break;\n }\n }\n };\n};\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport { timer as d3Timer } from 'd3';\nimport { type Timer } from 'd3';\nimport { createEffect, createSignal, onCleanup } from 'solid-js';\n\nimport { type GlobeController } from '../components';\nimport { type Vector } from './context';\n\nexport type SpinnerOptions = {\n disabled?: boolean;\n delta?: Vector;\n};\n\n/**\n * Rotates globe.\n */\nexport const useSpinner = (controller?: GlobeController | null, options: SpinnerOptions = {}) => {\n const [running, setRunning] = createSignal(false);\n\n createEffect(() => {\n let timer: Timer | undefined;\n\n const start = () => {\n const delta: Vector = options.delta ?? [0.001, 0, 0];\n\n let t = 0;\n let lastRotation = controller!.projection.rotate();\n timer = d3Timer((elapsed) => {\n const dt = elapsed - t;\n t = elapsed;\n\n const rotation: Vector = [\n lastRotation[0] + delta[0] * dt,\n lastRotation[1] + delta[1] * dt,\n lastRotation[2] + delta[2] * dt,\n ];\n\n lastRotation = rotation;\n controller!.setRotation(rotation);\n });\n };\n\n const stop = () => {\n if (timer) {\n timer.stop();\n timer = undefined;\n }\n };\n\n if (controller && running()) {\n start();\n } else {\n stop();\n }\n\n onCleanup(() => stop());\n });\n\n return {\n start: () => {\n if (!options.disabled) {\n setRunning(true);\n }\n },\n stop: () => setRunning(false),\n };\n};\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport { selection as d3Selection, geoDistance, geoInterpolate, geoPath } from 'd3';\nimport { type Accessor, type Setter, createEffect, createSignal, onCleanup } from 'solid-js';\nimport versor from 'versor';\n\nimport type { GlobeController } from '../components';\nimport { type LatLngLiteral } from '../types';\nimport { type StyleSet, geoToPosition, positionToRotation } from '../util';\n\nconst TRANSITION_NAME = 'globe-tour';\n\nconst defaultDuration = 1_500;\n\nexport type TourOptions = {\n running?: boolean;\n disabled?: boolean;\n duration?: number;\n loop?: boolean;\n tilt?: number;\n autoRotate?: boolean;\n styles?: StyleSet;\n};\n\n/**\n * Iterates between points.\n * Inspired by: https://observablehq.com/@mbostock/top-100-cities\n */\nexport const useTour = (\n controller?: GlobeController | null,\n points?: LatLngLiteral[],\n options: TourOptions = {},\n): { running: Accessor<boolean>; setRunning: Setter<boolean> } => {\n const selection = d3Selection();\n const [running, setRunning] = createSignal(options.running ?? false);\n\n createEffect(() => {\n if (!running()) {\n selection.interrupt(TRANSITION_NAME);\n return;\n }\n\n let t: ReturnType<typeof setTimeout>;\n if (controller && running()) {\n t = setTimeout(async () => {\n const { canvas, projection, setRotation } = controller;\n const context = canvas.getContext('2d', { alpha: false });\n const path = geoPath(projection, context).pointRadius(2);\n\n const tilt = options.tilt ?? 0;\n let last: LatLngLiteral;\n try {\n const p = [...(points ?? [])];\n if (options.loop) {\n p.push(p[0]);\n }\n\n for (const next of p) {\n if (!running()) {\n break;\n }\n\n // Points.\n const p1 = last ? geoToPosition(last) : undefined;\n const p2 = geoToPosition(next);\n const ip = geoInterpolate(p1 || p2, p2);\n const distance = geoDistance(p1 || p2, p2);\n\n // Rotation.\n const r1 = p1 ? positionToRotation(p1, tilt) : controller.projection.rotate();\n const r2 = positionToRotation(p2, tilt);\n const iv = versor.interpolate(r1, r2);\n\n const transition = selection\n .transition(TRANSITION_NAME)\n .duration(Math.max(options.duration ?? defaultDuration, distance * 2_000))\n .tween('render', () => (t) => {\n const t1 = Math.max(0, Math.min(1, t * 2 - 1));\n const t2 = Math.min(1, t * 2);\n\n context.save();\n {\n context.beginPath();\n context.strokeStyle = options?.styles?.arc?.strokeStyle ?? 'yellow';\n context.lineWidth = (options?.styles?.arc?.lineWidth ?? 1.5) * (controller?.zoom ?? 1);\n context.setLineDash(options?.styles?.arc?.lineDash ?? []);\n path({ type: 'LineString', coordinates: [ip(t1), ip(t2)] });\n context.stroke();\n\n context.beginPath();\n context.fillStyle = options?.styles?.cursor?.fillStyle ?? 'orange';\n path.pointRadius((options?.styles?.cursor?.pointRadius ?? 2) * (controller?.zoom ?? 1));\n path({ type: 'Point', coordinates: ip(t2) });\n context.fill();\n }\n context.restore();\n\n // TODO(burdon): This has to come after rendering above. Add to features to correct order?\n projection.rotate(iv(t));\n setRotation(projection.rotate());\n });\n\n // Throws if interrupted.\n await transition.end();\n last = next;\n }\n } catch {\n // Ignore.\n } finally {\n setRunning(false);\n }\n });\n\n onCleanup(() => {\n clearTimeout(t);\n selection.interrupt(TRANSITION_NAME);\n });\n }\n });\n\n return { running, setRunning };\n};\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport { type ControlPosition } from 'leaflet';\nimport { type JSX } from 'solid-js';\n\nexport type ControlAction = 'toggle' | 'start' | 'zoom-in' | 'zoom-out';\n\nexport type ControlProps = {\n class?: string;\n onAction?: (action: ControlAction) => void;\n};\n\nexport const controlPositions: Record<ControlPosition, string> = {\n topleft: 'top-2 left-2',\n topright: 'top-2 right-2',\n bottomleft: 'bottom-2 left-2',\n bottomright: 'bottom-2 right-2',\n};\n\nexport const ZoomControls = (props: ControlProps): JSX.Element => {\n return (\n <div class={`flex flex-row gap-2 ${props.class ?? ''}`}>\n <button\n type='button'\n class='dx-button dx-focus-ring w-10 h-10 min-h-[2.5rem] px-3 rounded-xs flex items-center justify-center'\n onClick={() => props.onAction?.('zoom-in')}\n title='Zoom in'\n >\n <span class='text-xl'>+</span>\n </button>\n <button\n type='button'\n class='dx-button dx-focus-ring w-10 h-10 min-h-[2.5rem] px-3 rounded-xs flex items-center justify-center'\n onClick={() => props.onAction?.('zoom-out')}\n title='Zoom out'\n >\n <span class='text-xl'>−</span>\n </button>\n </div>\n );\n};\n\nexport const ActionControls = (props: ControlProps): JSX.Element => {\n return (\n <div class={`flex flex-row gap-2 ${props.class ?? ''}`}>\n <button\n type='button'\n class='dx-button dx-focus-ring w-10 h-10 min-h-[2.5rem] px-3 rounded-xs flex items-center justify-center'\n onClick={() => props.onAction?.('start')}\n title='Start'\n >\n <span class='text-xl'>▶</span>\n </button>\n <button\n type='button'\n class='dx-button dx-focus-ring w-10 h-10 min-h-[2.5rem] px-3 rounded-xs flex items-center justify-center'\n onClick={() => props.onAction?.('toggle')}\n title='Toggle'\n >\n <span class='text-xl'>🌍</span>\n </button>\n </div>\n );\n};\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport { createResizeObserver } from '@solid-primitives/resize-observer';\nimport {\n type GeoProjection,\n easeLinear,\n easeSinOut,\n geoMercator,\n geoOrthographic,\n geoPath,\n geoTransverseMercator,\n interpolateNumber,\n transition,\n} from 'd3';\nimport { type ControlPosition } from 'leaflet';\nimport { type Accessor, type JSX, type Setter, Show, createEffect, createMemo, createSignal } from 'solid-js';\nimport { type Topology } from 'topojson-specification';\n\nimport { mx } from '@dxos/ui-theme';\n\nimport { GlobeContextProvider, type GlobeContextProviderProps, useGlobeContext } from '../../hooks';\nimport {\n type Features,\n type StyleSet,\n createLayers,\n geoToPosition,\n positionToRotation,\n renderLayers,\n timer,\n} from '../../util';\nimport { ActionControls, type ControlProps, ZoomControls, controlPositions } from '../Toolbar';\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute\n */\nconst defaultStyles: Record<string, StyleSet> = {\n light: {\n background: {\n fillStyle: '#EEE',\n },\n\n water: {\n fillStyle: '#555',\n },\n\n land: {\n fillStyle: '#999',\n },\n\n line: {\n strokeStyle: 'darkred',\n },\n\n point: {\n fillStyle: '#111111',\n strokeStyle: '#111111',\n strokeWidth: 1,\n pointRadius: 0.5,\n },\n },\n dark: {\n background: {\n fillStyle: '#111111',\n },\n\n water: {\n fillStyle: '#123E6A',\n },\n\n land: {\n fillStyle: '#032153',\n },\n\n line: {\n strokeStyle: '#111111',\n },\n\n point: {\n fillStyle: '#111111',\n strokeStyle: '#111111',\n strokeWidth: 1,\n pointRadius: 0.5,\n },\n },\n};\n\nexport type GlobeController = {\n canvas: HTMLCanvasElement;\n projection: GeoProjection;\n zoom: number;\n translation: Accessor<{ x: number; y: number } | undefined>;\n rotation: Accessor<[number, number, number] | undefined>;\n setZoom: (zoom: number | ((prev: number) => number)) => void;\n setTranslation: Setter<{ x: number; y: number } | undefined>;\n setRotation: (rotation: [number, number, number]) => void;\n};\n\nexport type ProjectionType = 'orthographic' | 'mercator' | 'transverse-mercator';\n\nconst projectionMap: Record<ProjectionType, () => GeoProjection> = {\n 'orthographic': geoOrthographic,\n 'mercator': geoMercator,\n 'transverse-mercator': geoTransverseMercator,\n};\n\nconst getProjection = (type: GlobeCanvasProps['projection'] = 'orthographic'): GeoProjection => {\n if (typeof type === 'string') {\n const constructor = projectionMap[type] ?? geoOrthographic;\n return constructor();\n }\n\n return type ?? geoOrthographic();\n};\n\n//\n// Root\n//\n\ntype GlobeRootProps = {\n children: JSX.Element;\n class?: string;\n} & Partial<GlobeContextProviderProps> &\n JSX.HTMLAttributes<HTMLDivElement>;\n\nconst GlobeRoot = (props: GlobeRootProps) => {\n let containerRef: HTMLDivElement | undefined;\n const [size, setSize] = createSignal({ width: 0, height: 0 });\n\n // Use @solid-primitives/resize-observer\n createResizeObserver(\n () => containerRef,\n ({ width, height }) => {\n setSize({ width, height });\n },\n );\n\n return (\n <GlobeContextProvider size={size()} {...props}>\n <div ref={containerRef} class={mx('relative dx-container')} {...props}>\n {props.children}\n </div>\n </GlobeContextProvider>\n );\n};\n\n//\n// Canvas\n//\n\ntype GlobeCanvasProps = {\n ref?: (controller: GlobeController) => void;\n projection?: ProjectionType | GeoProjection;\n topology?: Topology;\n features?: Features;\n styles?: StyleSet;\n};\n\n/**\n * Basic globe renderer.\n * https://github.com/topojson/world-atlas\n */\n\nconst GlobeCanvas = (props: GlobeCanvasProps) => {\n const themeMode = 'dark'; // TODO: Get from theme context\n const styles = createMemo(() => props.styles ?? defaultStyles[themeMode]);\n\n // Canvas.\n const [canvas, setCanvas] = createSignal<HTMLCanvasElement | null>(null);\n\n // Projection.\n const projection = createMemo(() => getProjection(props.projection));\n\n // Layers.\n const layers = createMemo(() => {\n return timer(() => createLayers(props.topology as Topology, props.features, styles()));\n });\n\n // State.\n const { size, center, zoom, translation, rotation, setCenter, setZoom, setTranslation, setRotation } =\n useGlobeContext();\n\n let zoomValue = zoom();\n let zooming = false;\n\n createEffect(() => {});\n\n // Update rotation.\n createEffect(() => {\n const c = center();\n if (c) {\n setZoom(1);\n setRotation(positionToRotation(geoToPosition(c)));\n }\n });\n\n // External controller.\n createEffect(() => {\n const canvasEl = canvas();\n if (canvasEl && props.ref) {\n const controller: GlobeController = {\n canvas: canvasEl,\n projection: projection(),\n get zoom() {\n return zoomValue;\n },\n translation,\n rotation,\n setZoom: (state) => {\n if (typeof state === 'function') {\n const is = interpolateNumber(zoomValue, state(zoomValue));\n // Stop easing if already zooming.\n transition()\n .ease(zooming ? easeLinear : easeSinOut)\n .duration(200)\n .tween('scale', () => (t) => {\n const newZoom = is(t);\n zoomValue = newZoom;\n setZoom(newZoom);\n })\n .on('end', () => {\n zooming = false;\n });\n } else {\n zoomValue = state;\n setZoom(state);\n }\n },\n setTranslation,\n setRotation,\n };\n props.ref(controller);\n }\n });\n\n // https://d3js.org/d3-geo/path#geoPath\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext\n const generator = createMemo(() => {\n const canvasEl = canvas();\n const proj = projection();\n return canvasEl && proj && geoPath(proj, canvasEl.getContext('2d', { alpha: false }));\n });\n\n // Render on change.\n createEffect(() => {\n const canvasEl = canvas();\n const proj = projection();\n const gen = generator();\n const z = zoom();\n const t = translation();\n const r = rotation();\n const s = size();\n\n if (canvasEl && proj && gen) {\n timer(() => {\n // https://d3js.org/d3-geo/projection\n proj\n .scale((Math.min(s.width, s.height) / 2) * z)\n .translate([s.width / 2 + (t?.x ?? 0), s.height / 2 + (t?.y ?? 0)])\n .rotate(r ?? [0, 0, 0]);\n\n renderLayers(gen, layers(), z, styles());\n });\n }\n });\n\n return (\n <Show when={size().width > 0 && size().height > 0}>\n <canvas ref={setCanvas} width={size().width} height={size().height} />\n </Show>\n );\n};\n\n//\n// Debug\n//\n\nconst GlobeDebug = (props: { position?: ControlPosition }) => {\n const { size, zoom, translation, rotation } = useGlobeContext();\n return (\n <div\n class={`z-10 absolute w-96 p-2 overflow-hidden border border-green-700 rounded-sm ${\n controlPositions[props.position ?? 'topleft']\n }`}\n >\n <pre class='font-mono text-xs text-green-700'>\n {JSON.stringify({ size, zoom: zoom(), translation: translation(), rotation: rotation() }, null, 2)}\n </pre>\n </div>\n );\n};\n\n//\n// Panel\n//\n\nconst GlobePanel = (props: { children: JSX.Element; position?: ControlPosition; class?: string }) => {\n return (\n <div class={`z-10 absolute overflow-hidden ${controlPositions[props.position ?? 'topleft']} ${props.class ?? ''}`}>\n {props.children}\n </div>\n );\n};\n\n//\n// Controls\n//\n\nconst CustomControl = (props: { children: JSX.Element; position: ControlPosition }) => {\n return <div class={`z-10 absolute overflow-hidden ${controlPositions[props.position]}`}>{props.children}</div>;\n};\n\ntype GlobeControlProps = { position?: ControlPosition } & Pick<ControlProps, 'onAction'>;\n\nconst GlobeZoom = (props: GlobeControlProps) => (\n <CustomControl position={props.position ?? 'bottomleft'}>\n <ZoomControls onAction={props.onAction} />\n </CustomControl>\n);\n\nconst GlobeAction = (props: GlobeControlProps) => (\n <CustomControl position={props.position ?? 'bottomright'}>\n <ActionControls onAction={props.onAction} />\n </CustomControl>\n);\n\n//\n// Globe\n//\n\nexport const Globe = {\n Root: GlobeRoot,\n Canvas: GlobeCanvas,\n Zoom: GlobeZoom,\n Action: GlobeAction,\n Debug: GlobeDebug,\n Panel: GlobePanel,\n};\n\nexport type { GlobeCanvasProps, GlobeRootProps };\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport 'leaflet/dist/leaflet.css';\n\nimport L, { type ControlPosition, type LatLngLiteral, latLngBounds } from 'leaflet';\nimport {\n type Accessor,\n type JSX,\n type Setter,\n Show,\n createContext,\n createEffect,\n createSignal,\n onCleanup,\n onMount,\n useContext,\n} from 'solid-js';\n\nimport { type GeoMarker } from '../../types';\nimport { ActionControls, type ControlProps, ZoomControls, controlPositions } from '../Toolbar';\n\n// TODO(burdon): Guess initial location.\n\nconst defaults = {\n center: { lat: 51, lng: 0 } as L.LatLngLiteral,\n zoom: 4,\n} as const;\n\n//\n// Controller\n//\n\nexport type MapController = {\n setCenter: (center: LatLngLiteral, zoom?: number) => void;\n setZoom: (cb: (zoom: number) => number) => void;\n};\n\n//\n// Context\n//\n\ntype MapContextValue = {\n map: Accessor<L.Map | null>;\n attention: Accessor<boolean>;\n setAttention: Setter<boolean>;\n onChange?: (ev: { center: LatLngLiteral; zoom: number }) => void;\n};\n\nconst MapContext = createContext<MapContextValue>();\n\nconst useMapContext = (displayName: string) => {\n const context = useContext(MapContext);\n if (!context) {\n throw new Error(`${displayName} must be used within Map.Root`);\n }\n\n return context;\n};\n\n//\n// Root\n//\n\ntype MapRootProps = {\n ref?: (controller: MapController) => void;\n children: JSX.Element;\n class?: string;\n scrollWheelZoom?: boolean;\n doubleClickZoom?: boolean;\n touchZoom?: boolean;\n center?: LatLngLiteral;\n zoom?: number;\n onChange?: (ev: { center: LatLngLiteral; zoom: number }) => void;\n};\n\n/**\n * https://leafletjs.com/reference.html#map\n */\n\nconst MapRoot = (props: MapRootProps) => {\n let mapContainer: HTMLDivElement | undefined;\n const [map, setMap] = createSignal<L.Map | null>(null);\n const [attention, setAttention] = createSignal(false);\n\n onMount(() => {\n if (!mapContainer) {\n return;\n }\n\n const leafletMap = L.map(mapContainer, {\n center: props.center ?? defaults.center,\n zoom: props.zoom ?? defaults.zoom,\n attributionControl: false,\n zoomControl: false,\n scrollWheelZoom: props.scrollWheelZoom ?? true,\n doubleClickZoom: props.doubleClickZoom ?? true,\n touchZoom: props.touchZoom ?? true,\n });\n\n setMap(leafletMap);\n\n // Set up controller\n if (props.ref) {\n props.ref({\n setCenter: (center: LatLngLiteral, zoom?: number) => {\n leafletMap.setView(center, zoom);\n },\n setZoom: (cb: (zoom: number) => number) => {\n leafletMap.setZoom(cb(leafletMap.getZoom()));\n },\n });\n }\n\n onCleanup(() => {\n leafletMap.remove();\n });\n });\n\n // Enable/disable scroll wheel zoom based on attention\n createEffect(() => {\n const leafletMap = map();\n if (!leafletMap) {\n return;\n }\n\n if (attention()) {\n leafletMap.scrollWheelZoom.enable();\n } else {\n leafletMap.scrollWheelZoom.disable();\n }\n });\n\n return (\n <MapContext.Provider value={{ map, attention, setAttention, onChange: props.onChange }}>\n <div\n ref={mapContainer}\n class={`group relative grid h-full w-full bg-gray-100 dark:bg-gray-900 ${props.class ?? ''}`}\n style={{ 'z-index': '0' }}\n />\n <Show when={map()}>{props.children}</Show>\n </MapContext.Provider>\n );\n};\n\n//\n// Tiles\n//\n\nconst MapTiles = () => {\n const { map, onChange, attention } = useMapContext(MapTiles.name);\n let tileLayer: L.TileLayer | null = null;\n\n createEffect(() => {\n const leafletMap = map();\n if (!leafletMap) {\n return;\n }\n\n const att = attention();\n tileLayer = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {\n detectRetina: true,\n keepBuffer: 4,\n className: `dark:grayscale dark:invert ${att ? '' : 'opacity-80'}`,\n });\n\n tileLayer.addTo(leafletMap);\n\n // Set up event listeners\n leafletMap.on('zoomstart', (ev) => {\n onChange?.({\n center: ev.target.getCenter(),\n zoom: ev.target.getZoom(),\n });\n });\n\n onCleanup(() => {\n if (tileLayer) {\n tileLayer.remove();\n tileLayer = null;\n }\n });\n });\n\n // Update tile layer class when attention changes\n createEffect(() => {\n const att = attention();\n if (tileLayer) {\n const container = tileLayer.getContainer();\n if (container) {\n container.className = `dark:grayscale dark:invert ${att ? '' : 'opacity-80'}`;\n }\n }\n });\n\n return null;\n};\n\n//\n// Markers\n//\n\ntype MapMarkersProps = {\n markers?: Accessor<GeoMarker[]>;\n};\n\nconst MapMarkers = (props: MapMarkersProps) => {\n const { map } = useMapContext(MapMarkers.name);\n const leafletMarkers: L.Marker[] = [];\n let lastMarkerIds = new Set<string>();\n\n // Clean up all markers when component unmounts\n onCleanup(() => {\n leafletMarkers.forEach((marker) => marker.remove());\n leafletMarkers.length = 0;\n });\n\n createEffect(() => {\n const leafletMap = map();\n if (!leafletMap) {\n return;\n }\n\n const markerList = props.markers?.() ?? [];\n const currentIds = new Set(markerList.map((m) => m.id));\n\n // Skip if the markers haven't actually changed\n if (\n currentIds.size === lastMarkerIds.size &&\n [...currentIds].every((id) => lastMarkerIds.has(id)) &&\n leafletMarkers.length > 0\n ) {\n return;\n }\n\n // Clear existing markers\n leafletMarkers.forEach((marker) => marker.remove());\n leafletMarkers.length = 0;\n lastMarkerIds = currentIds;\n\n if (markerList.length > 0) {\n const bounds = latLngBounds(markerList.map((marker) => marker.location));\n leafletMap.fitBounds(bounds);\n\n // Add new markers\n markerList.forEach(({ title, location }) => {\n const marker = L.marker(location, {\n icon: new L.Icon({\n iconUrl: 'https://dxos.network/marker-icon.png',\n iconRetinaUrl: 'https://dxos.network/marker-icon-2x.png',\n shadowUrl: 'https://dxos.network/marker-shadow.png',\n iconSize: [25, 41],\n iconAnchor: [12, 41],\n popupAnchor: [1, -34],\n shadowSize: [41, 41],\n }),\n });\n\n if (title) {\n marker.bindPopup(title);\n }\n\n marker.addTo(leafletMap);\n leafletMarkers.push(marker);\n });\n } else {\n leafletMap.setView(defaults.center, defaults.zoom);\n }\n });\n\n return null;\n};\n\n//\n// Controls\n//\n\nconst CustomControl = (props: { children: JSX.Element; position: ControlPosition }) => {\n const { map: mapAccessor } = useMapContext(CustomControl.name);\n let controlContainer: HTMLDivElement | undefined;\n\n createEffect(() => {\n const map = mapAccessor();\n if (!map || !controlContainer) {\n return;\n }\n\n const Control = L.Control.extend({\n onAdd: () => {\n const container = L.DomUtil.create('div', `${controlPositions[props.position]} m-0!`);\n L.DomEvent.disableClickPropagation(container);\n L.DomEvent.disableScrollPropagation(container);\n\n if (controlContainer) {\n container.appendChild(controlContainer);\n }\n\n return container;\n },\n });\n\n const control = new Control({ position: props.position });\n control.addTo(map);\n\n onCleanup(() => {\n control.remove();\n });\n });\n\n return (\n <div ref={controlContainer} style={{ display: 'contents' }}>\n {props.children}\n </div>\n );\n};\n\ntype MapControlProps = { position?: ControlPosition } & Pick<ControlProps, 'onAction'>;\n\nconst MapZoom = (props: MapControlProps) => (\n <CustomControl position={props.position ?? 'bottomleft'}>\n <ZoomControls onAction={props.onAction} />\n </CustomControl>\n);\n\nconst MapAction = (props: MapControlProps) => (\n <CustomControl position={props.position ?? 'bottomright'}>\n <ActionControls onAction={props.onAction} />\n </CustomControl>\n);\n\n//\n// Map\n//\n\nexport const Map = {\n Root: MapRoot,\n Tiles: MapTiles,\n Markers: MapMarkers,\n Zoom: MapZoom,\n Action: MapAction,\n};\n\nexport { type MapControlProps, type MapMarkersProps, type MapRootProps };\n"],"mappings":";;;;;;;;;;;;AA2BA,IAAM,aAAW;CACf,QAAQ;EAAE,KAAK;EAAI,KAAK;CAAE;CAC1B,MAAM;AACR;AAEA,IAAM,eAAe,cAAgC;AAWrD,IAAa,wBAAwB,UAAqC;CACxE,MAAM,CAAC,MAAM,WAAW,aAAmB,MAAM,QAAQ;EAAE,OAAO;EAAG,QAAQ;CAAE,CAAC;CAChF,MAAM,CAAC,QAAQ,aAAa,aAAwC,MAAM,UAAU,WAAS,MAAM;CACnG,MAAM,CAAC,MAAM,WAAW,aAAa,MAAM,QAAQ,WAAS,IAAI;CAChE,MAAM,CAAC,aAAa,kBAAkB,aAAgC,MAAM,WAAW;CACvF,MAAM,CAAC,UAAU,eAAe,aAAiC,MAAM,QAAQ;CAG/E,mBAAmB;EACjB,IAAI,MAAM,MACR,QAAQ,MAAM,IAAI;CAEtB,CAAC;CAED,OAAA,gBACG,aAAa,UAAO;EACnB,OAAO;GACL;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAAC,IAAA,WAAA;GAAA,OAEA,MAAM;EAAQ;CAAA,CAAA;AAGrB;AAEA,IAAa,wBAAwB;CACnC,OAAO,WAAW,YAAY,KAAK,sBAAM,IAAI,MAAM,sBAAsB,CAAC;AAC5E;;;ACxEA,IAAa,SAAmB,OAAmB;CACjD,MAAM,QAAQ,KAAK,IAAI;CACvB,MAAM,OAAO,GAAG;CACN,KAAK,IAAI,IAAI,QAAQ;CAM/B,OAAO;AACT;;;ACPA,IAAa,gBACV,UACA,UAAoB,YACnB,QAAQ,KAAK,GAAG,MAAO,KAAK,KAAK,IAAI,SAAS,EAAG;;;;AAMrD,IAAa,kBAAkB,QAAQ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AS,wBAAwB,SAAS;GAC5C,EAAE,SAAS,yBAAyB,SAAS;GAE7C,IAAI,kBACF,UAAU,YAAY,gBAAgB;GAGxC,OAAO;EACT,EACF,CAEoB,GAAQ,EAAE,UAAU,MAAM,SAAS,CAAC;EACxD,QAAQ,MAAM,GAAG;EAEjB,gBAAgB;GACd,QAAQ,OAAO;EACjB,CAAC;CACH,CAAC;CAED,cAAA;EAAA,IAAA,QAAA,QAAA;EAAA,IAAA,SACY;EAAgB,OAAA,WAAA,aAAA,IAAA,QAAA,KAAA,IAAhB,mBAAgB;EAAA,OAAA,aACvB,MAAM,QAAQ;EAAA,OAAA;CAAA,EAAA,CAAA;AAGrB;AAIA,IAAM,WAAW,UAAsB,gBACpC,eAAa;CAAA,IAAC,WAAQ;EAAA,OAAE,MAAM,YAAY;CAAY;CAAA,IAAA,WAAA;EAAA,OAAA,gBACpD,cAAY,EAAA,IAAC,WAAQ;GAAA,OAAE,MAAM;EAAQ,EAAA,CAAA;CAAA;AAAA,CAAA;AAI1C,IAAM,aAAa,UAAsB,gBACtC,eAAa;CAAA,IAAC,WAAQ;EAAA,OAAE,MAAM,YAAY;CAAa;CAAA,IAAA,WAAA;EAAA,OAAA,gBACrD,gBAAc,EAAA,IAAC,WAAQ;GAAA,OAAE,MAAM;EAAQ,EAAA,CAAA;CAAA;AAAA,CAAA;AAQ5C,IAAa,MAAM;CACjB,MAAM;CACN,OAAO;CACP,SAAS;CACT,MAAM;CACN,QAAQ;AACV"}
@@ -0,0 +1,12 @@
1
+ //#region src/translations.ts
2
+ var translationKey = "@dxos/react-ui-geo";
3
+ var translations = [{ "en-US": { [translationKey]: {
4
+ "zoom in icon button": "Zoom in",
5
+ "zoom out icon button": "Zoom out",
6
+ "start icon button": "Start",
7
+ "toggle icon button": "Toggle"
8
+ } } }];
9
+ //#endregion
10
+ export { translationKey, translations };
11
+
12
+ //# sourceMappingURL=translations.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translations.mjs","names":[],"sources":["../../src/translations.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nexport const translationKey = '@dxos/react-ui-geo';\n\nexport const translations = [\n {\n 'en-US': {\n [translationKey]: {\n 'zoom in icon button': 'Zoom in',\n 'zoom out icon button': 'Zoom out',\n 'start icon button': 'Start',\n 'toggle icon button': 'Toggle',\n },\n },\n },\n] as const;\n"],"mappings":";AAIA,IAAa,iBAAiB;AAE9B,IAAa,eAAe,CAC1B,EACE,SAAS,GACN,iBAAiB;CAChB,uBAAuB;CACvB,wBAAwB;CACxB,qBAAqB;CACrB,sBAAsB;AACxB,EACF,EACF,CACF"}