@osm-editor-kit/osm-editor-links 0.1.0-alpha.1 → 1.0.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 CHANGED
@@ -1,16 +1,25 @@
1
1
  # `@osm-editor-kit/osm-editor-links`
2
2
 
3
+ Link lists for an OpenStreetMap element, changeset or user (website, history, editors, viewers, imagery), plus URL builders and a JOSM remote-control click handler. For apps that send people from their data to OSM tools.
4
+
3
5
  > [!NOTE]
4
- > This package is an **alpha** release and still under active development. APIs may change; install with the npm `alpha` dist-tag.
6
+ > Claude Opus 5.5 wrote and reviewed the code of this package. [@tordans](https://github.com/tordans) specified what it should do and tested and verified its user-facing behavior.
7
+
8
+ ## Install
9
+
10
+ ```bash
11
+ npm install @osm-editor-kit/osm-editor-links
12
+ ```
5
13
 
6
14
  ## What it does
7
15
 
8
- - Link lists for one OSM element, one changeset or one user: the OSM website, history, editors, viewers and JOSM, with a stable `id` and an English label per link
9
- - `linksIn` keeps the links offered at a country (for example TILDA only in Germany)
10
- - Deep links to osm.org element and changeset pages, web editors (iD, Rapid), JOSM remote control, OSM API map downloads, Mapillary, OSM Deep History, OSMCha and TILDA inspector URLs
11
- - OSM type helpers and a JOSM link-click handler
16
+ - Builds the link list for one OSM element, one changeset or one user. Each link has a stable `id` and an English `label`.
17
+ - `linksIn` keeps the links offered in a country (for example TILDA only in Germany).
18
+ - Builds single URLs: osm.org pages, iD, JOSM remote control, OSM API map downloads, Mapillary, OSM Deep History, OSMCha and the TILDA inspector.
19
+ - Converts OSM types between long and short form (`way` and `w`).
20
+ - `handleJosmLinkClick` sends a JOSM link to JOSM without navigating away.
12
21
 
13
- ## Link lists
22
+ ## Usage
14
23
 
15
24
  ```ts
16
25
  import { elementLinks, changesetLinks, userLinks, linksIn } from '@osm-editor-kit/osm-editor-links'
@@ -23,35 +32,49 @@ changesetLinks({ id: 42 }) // osm-changeset, osmcha, achavi, resultmaps, osm-rev
23
32
  userLinks({ name: 'Anna Müller' }) // osm-user, hdyc, osmcha-user, missingmaps
24
33
  ```
25
34
 
26
- Each link is `{ id, label, url, countries?, josm? }`. Apps translate by `id` and fall back to `label`. A link with `josm: true` opens with `handleJosmLinkClick` (JOSM remote control) instead of a new tab.
35
+ Each link is `{ id, label, url, countries?, josm? }`. Apps translate by `id` and fall back to `label`. A link with `josm: true` opens with `handleJosmLinkClick` instead of a new tab.
27
36
 
28
- Pass `server` to edit on another OSM website, for example the development server `https://master.apis.dev.openstreetmap.org`. The default is `https://www.openstreetmap.org`. Other servers get only their own links (element history and object page, changeset page, user profile); third-party tools only read production data.
37
+ `loc` adds the imagery and TILDA links; `zoom` (default 17) sets their map zoom.
38
+
39
+ Pass `server` to edit on another OSM website, for example the development server `https://master.apis.dev.openstreetmap.org`. The default is `https://www.openstreetmap.org`. Other servers get only their own links (element history and object page, changeset page, user profile), because third-party tools only read production data.
29
40
 
30
41
  ```ts
31
42
  const links = elementLinks({ type: 'way', id: 123, loc: { lat: 52.5, lng: 13.4 } })
32
43
  const offered = linksIn(links, ['de']) // keeps TILDA; with ['fr'] it is dropped
33
44
  ```
34
45
 
35
- ## Other helpers
46
+ ## JOSM links
47
+
48
+ JOSM remote control answers the request itself, so the browser must not follow the link. `handleJosmLinkClick` cancels the navigation and fetches the link instead. It rejects when JOSM is not running.
49
+
50
+ ```ts
51
+ import { handleJosmLinkClick } from '@osm-editor-kit/osm-editor-links'
52
+
53
+ link.addEventListener('click', handleJosmLinkClick)
54
+ ```
55
+
56
+ In React, pass the event as is: `onClick={handleJosmLinkClick}`. The handler reads the link from `event.target`, so attach it to the `<a>` or a parent of it.
57
+
58
+ ## Single URLs
36
59
 
37
60
  ```ts
38
61
  import {
39
62
  osmOrgUrl,
40
63
  osmEditIdUrl,
41
64
  josmLoadObjectUrl,
65
+ josmImportUrl,
42
66
  idEditorUrl,
43
67
  getUrl,
44
68
  mapillaryUrl,
45
69
  osmchaChangesetUrl,
46
70
  tildaInspectorUrl,
47
- handleJosmLinkClick,
48
- osmProdUrl,
49
71
  } from '@osm-editor-kit/osm-editor-links'
50
72
 
51
- osmOrgUrl({ osmType: 'way', osmId: 123 }) // → https://www.openstreetmap.org/way/123
73
+ osmOrgUrl({ osmType: 'way', osmId: 123 }) // https://www.openstreetmap.org/way/123
52
74
  osmEditIdUrl({ osmType: 'way', osmId: 123, hashtags: 'TILDA' })
53
75
 
54
- josmLoadObjectUrl({ osmType: 'way', osmId: 123 }) // http://127.0.0.1:8111/load_object?…
76
+ josmLoadObjectUrl({ osmType: 'way', osmId: 123 }) // http://127.0.0.1:8111/load_object?objects=w123
77
+ josmImportUrl('https://example.org/data.osm') // http://127.0.0.1:8111/import?url=https://example.org/data.osm
55
78
  idEditorUrl({ center: { lat: 52.47, lng: 13.44 }, zoom: 16 })
56
79
 
57
80
  getUrl({ west: 13.4, south: 52.4, east: 13.5, north: 52.5 }, false) // OSM API map bbox URL
@@ -61,10 +84,18 @@ osmchaChangesetUrl(12345)
61
84
  tildaInspectorUrl({
62
85
  regionSlug: 'radinfra',
63
86
  map: { zoom: 16, lat: 52.47, lng: 13.44 },
64
- features: { sourceId: 'atlas_bikelanes', featureId: 123, coords: [13.44, 52.47] },
87
+ features: {
88
+ sourceId: 'atlas_bikelanes',
89
+ featureId: 123,
90
+ coords: { kind: 'point', lon: 13.44, lat: 52.47 },
91
+ },
65
92
  })
66
-
67
- await handleJosmLinkClick(event) // JOSM remote-control link click (fetches the link, no navigation)
68
93
  ```
69
94
 
70
- Depends on `@osm-editor-kit/osm-data` for shared map bounds and OSM object types.
95
+ URL builders that take an OSM type and id return `undefined` when either is missing.
96
+
97
+ `@osm-editor-kit/osm-data` is installed as a dependency; it provides the shared map bounds and OSM object types.
98
+
99
+ ## License
100
+
101
+ MIT
package/dist/editors.d.ts CHANGED
@@ -1,8 +1,5 @@
1
- import type { LatLngLiteral } from '@osm-editor-kit/osm-data';
2
- import { type OsmNode, type OsmRelation, type OsmWay } from '@osm-editor-kit/osm-data';
3
- import { josmUrl } from './hosts';
1
+ import type { LatLngLiteral, OsmNode, OsmRelation, OsmWay } from '@osm-editor-kit/osm-data';
4
2
  import type { OsmObjectType } from './osm-type';
5
- export { josmUrl };
6
3
  type IdEditorUrlProps = {
7
4
  center?: LatLngLiteral;
8
5
  zoom?: number;
@@ -21,23 +18,18 @@ type OsmEditIdUrlProps = {
21
18
  };
22
19
  /** Official OSM.org iD edit URL (TILDA-style, with optional hashtags). */
23
20
  export declare function osmEditIdUrl({ osmType, osmId, comment, hashtags, source, }: OsmEditIdUrlProps): string | undefined;
24
- export declare function osmEditRapidUrl(options: {
25
- osmType: OsmObjectType | null | undefined;
26
- osmId: number | string | null | undefined;
27
- hashtags?: string;
28
- locale?: string;
29
- }): string | undefined;
30
- export declare function osmEditKyleKiwiIdUrl(options: {
31
- osmType: OsmObjectType | null | undefined;
32
- osmId: number | string | null | undefined;
33
- hashtags?: string;
34
- locale?: string;
35
- }): string | undefined;
36
21
  /** JOSM remote control `load_object` for a single OSM element. */
37
22
  export declare function josmLoadObjectUrl(options: {
38
23
  osmType: OsmObjectType | null | undefined;
39
24
  osmId: number | string | null | undefined;
25
+ /** Pre-fills the changeset hashtags in JOSM. Left out when empty. */
40
26
  changesetHashtags?: string;
41
27
  }): string | undefined;
42
- /** Prefix for JOSM `import?url=` (Overpass / map download). Same as `josmUrl`. */
43
- export declare function josmImportUrl(): string;
28
+ /**
29
+ * JOSM remote control `import?url=`: loads the data at `url` (an Overpass query, a map download
30
+ * or a changeset download). The url is appended as is: JOSM reads everything after `url=` as the
31
+ * URL, including `&`, so it must stay the last parameter and needs no percent-encoding.
32
+ * @see https://josm.openstreetmap.de/wiki/Help/RemoteControlCommands#import
33
+ */
34
+ export declare function josmImportUrl(url: string): string;
35
+ export {};
package/dist/hosts.d.ts CHANGED
@@ -1,7 +1,5 @@
1
- /** JOSM remote-control base for `import?url=` (Overpass / map download). */
1
+ /** JOSM remote-control base. */
2
2
  export declare const josmRemoteBase = "http://127.0.0.1:8111";
3
- /** @deprecated Prefer `josmImportUrl` / `josmLoadObjectUrl`; kept for existing callers. */
4
- export declare const josmUrl = "http://127.0.0.1:8111/import?url=";
5
3
  export declare const osmProdUrl = "https://www.openstreetmap.org";
6
4
  /** Production OSM API host (OAuth, map downloads, changeset upload). */
7
5
  export declare const osmProdApiUrl = "https://api.openstreetmap.org";
@@ -12,7 +10,7 @@ export declare const osmDeepHistoryBase = "https://osmlab.github.io/osm-deep-his
12
10
  /** Third-party viewers and editors, used by the link lists. */
13
11
  export declare const pewuHistoryBase = "https://pewu.github.io/osm-history";
14
12
  export declare const rapidBase = "https://rapideditor.org";
15
- export declare const level0Base = "http://level0.osmz.ru";
13
+ export declare const level0Base = "https://level0.osmz.ru";
16
14
  export declare const mapillaryBase = "https://www.mapillary.com";
17
15
  export declare const panoramaxBase = "https://api.panoramax.xyz";
18
16
  export declare const tildaViewerBase = "https://viewer.tilda-geo.de";
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  export { fillEditorUrlTemplate, type EditorUrlTemplateVars } from './editor-template';
2
- export { idEditorUrl, josmImportUrl, josmLoadObjectUrl, josmUrl, osmEditIdUrl, osmEditKyleKiwiIdUrl, osmEditRapidUrl, } from './editors';
2
+ export { idEditorUrl, josmImportUrl, josmLoadObjectUrl, osmEditIdUrl } from './editors';
3
3
  export { osmDeepHistoryUrl } from './history';
4
- export { josmRemoteBase, osmchaBase, osmDeepHistoryBase, osmDevUrl, osmProdApiUrl, osmProdUrl, tildaGeoBase, } from './hosts';
5
- export { handleJosmLinkClick } from './josm';
4
+ export { osmDevUrl, osmProdApiUrl, osmProdUrl } from './hosts';
5
+ export { handleJosmLinkClick, type JosmClickEvent } from './josm';
6
6
  export { changesetLinks, elementLinks, linksIn, userLinks, type ChangesetLinksOptions, type ElementLinksOptions, type OsmLink, type UserLinksOptions, } from './link-lists';
7
7
  export { getUrl } from './map-download-url';
8
8
  export { mapillaryRecentPanosUrl, mapillaryUrl, type MapillaryUrlOptions } from './mapillary';
9
9
  export { osmChangesetUrl, osmObjectHistoryUrl, osmOrgUrl, type OsmTypeId } from './osm-object';
10
- export { longOsmType, shortOsmType, toLongOsmType, toShortOsmType, type OsmObjectType, type OsmShortType, } from './osm-type';
10
+ export { toLongOsmType, toShortOsmType, type OsmObjectType, type OsmShortType } from './osm-type';
11
11
  export { osmchaChangesetUrl, osmchaFiltersUrl, type OsmchaFiltersInput, type OsmchaFilterValue, } from './osmcha';
12
- export { serializeTildaFeaturesParam, TILDA_INFRA_PRESETS, TILDA_SOURCE_NUMERIC_IDS, tildaInfraSourceNumericId, tildaInspectorUrl, tildaInspectorUrlForInfra, tildaSourceIdFromNumeric, tildaSourceNumericId, type TildaFeatureCoord, type TildaFeatureParam, type TildaInfra, type TildaInfraPreset, type TildaInspectorForInfraOptions, type TildaInspectorUrlOptions, type TildaMapPosition, } from './tilda';
12
+ export { serializeTildaFeaturesParam, tildaInspectorUrl, tildaInspectorUrlForInfra, type TildaFeatureCoord, type TildaFeatureParam, type TildaInfra, type TildaInspectorForInfraOptions, type TildaInspectorUrlOptions, type TildaMapPosition, } from './tilda';
package/dist/index.js CHANGED
@@ -36,7 +36,6 @@ function fillEditorUrlTemplate(urlTemplate, vars) {
36
36
 
37
37
  // src/hosts.ts
38
38
  var josmRemoteBase = "http://127.0.0.1:8111";
39
- var josmUrl = `${josmRemoteBase}/import?url=`;
40
39
  var osmProdUrl = "https://www.openstreetmap.org";
41
40
  var osmProdApiUrl = "https://api.openstreetmap.org";
42
41
  var osmDevUrl = "https://master.apis.dev.openstreetmap.org";
@@ -45,7 +44,7 @@ var tildaGeoBase = "https://tilda-geo.de";
45
44
  var osmDeepHistoryBase = "https://osmlab.github.io/osm-deep-history";
46
45
  var pewuHistoryBase = "https://pewu.github.io/osm-history";
47
46
  var rapidBase = "https://rapideditor.org";
48
- var level0Base = "http://level0.osmz.ru";
47
+ var level0Base = "https://level0.osmz.ru";
49
48
  var mapillaryBase = "https://www.mapillary.com";
50
49
  var panoramaxBase = "https://api.panoramax.xyz";
51
50
  var tildaViewerBase = "https://viewer.tilda-geo.de";
@@ -90,22 +89,8 @@ function osmEditIdUrl({
90
89
  const hash = hashParams.toString();
91
90
  return hash ? `${url.toString()}#${hash}` : url.toString();
92
91
  }
93
- function osmEditRapidUrl(options) {
94
- const { osmType, osmId, hashtags = "TILDA", locale = "de" } = options;
95
- if (!osmType || osmId == null || osmId === "") return void 0;
96
- const short = toShortOsmType(osmType);
97
- if (!short) return void 0;
98
- return `https://rapideditor.org/edit#id=${short}${osmId}&disable_features=boundaries&locale=${locale}&hashtags=${hashtags}`;
99
- }
100
- function osmEditKyleKiwiIdUrl(options) {
101
- const { osmType, osmId, hashtags = "TILDA", locale = "en" } = options;
102
- if (!osmType || osmId == null || osmId === "") return void 0;
103
- const short = toShortOsmType(osmType);
104
- if (!short) return void 0;
105
- return `https://kyle.kiwi/iD/#id=${short}${osmId}&locale=${locale}&disable_features=boundaries&hashtags=${hashtags}`;
106
- }
107
92
  function josmLoadObjectUrl(options) {
108
- const { osmType, osmId, changesetHashtags = "TILDA" } = options;
93
+ const { osmType, osmId, changesetHashtags } = options;
109
94
  if (!osmType || osmId == null || osmId === "") return void 0;
110
95
  const short = toShortOsmType(osmType);
111
96
  if (!short) return void 0;
@@ -114,8 +99,8 @@ function josmLoadObjectUrl(options) {
114
99
  if (changesetHashtags) url.searchParams.set("changeset_hashtags", changesetHashtags);
115
100
  return url.toString();
116
101
  }
117
- function josmImportUrl() {
118
- return josmUrl;
102
+ function josmImportUrl(url) {
103
+ return `${josmRemoteBase}/import?url=${url}`;
119
104
  }
120
105
 
121
106
  // src/history.ts
@@ -129,8 +114,8 @@ function osmDeepHistoryUrl(options) {
129
114
  async function handleJosmLinkClick(e) {
130
115
  const anchor = e.target instanceof Element ? e.target.closest("a") : null;
131
116
  if (!anchor) return;
132
- await fetch(anchor.href);
133
117
  e.preventDefault();
118
+ await fetch(anchor.href);
134
119
  }
135
120
 
136
121
  // src/osm-object.ts
@@ -192,11 +177,9 @@ function elementLinks({ type, id, loc, zoom = 17, server }) {
192
177
  link(
193
178
  "rapid",
194
179
  "Rapid",
195
- id === "" ? void 0 : `${rapidBase}/edit#id=${shortOsmType[type]}${id}`
180
+ id === "" ? void 0 : `${rapidBase}/edit#id=${toShortOsmType(type)}${id}`
196
181
  ),
197
- link("josm", "JOSM", josmLoadObjectUrl({ osmType: type, osmId: id, changesetHashtags: "" }), {
198
- josm: true
199
- }),
182
+ link("josm", "JOSM", josmLoadObjectUrl(object), { josm: true }),
200
183
  link("level0", "Level0", id === "" ? void 0 : `${level0Base}/?url=${type}/${id}`)
201
184
  );
202
185
  if (loc) {
@@ -228,7 +211,7 @@ function changesetLinks({ id, server }) {
228
211
  link("achavi", "achavi", `${achaviBase}/?changeset=${id}&relations=true`),
229
212
  link("resultmaps", "ResultMaps", `${resultMapsBase}/osm-change-viz?c=${id}`),
230
213
  link("osm-revert", "osm-revert", `${osmRevertBase}/?changesets=${id}`),
231
- link("josm", "JOSM", `${josmImportUrl()}${osmProdUrl}/api/0.6/changeset/${id}/download`, {
214
+ link("josm", "JOSM", josmImportUrl(`${osmProdUrl}/api/0.6/changeset/${id}/download`), {
232
215
  josm: true
233
216
  }),
234
217
  link("level0", "Level0", `${level0Base}/?url=changeset/${id}`)
@@ -337,9 +320,6 @@ var sourceIdToNumeric = new Map(
337
320
  function tildaSourceNumericId(sourceId) {
338
321
  return sourceIdToNumeric.get(sourceId);
339
322
  }
340
- function tildaSourceIdFromNumeric(numericId) {
341
- return TILDA_SOURCE_NUMERIC_IDS[numericId];
342
- }
343
323
 
344
324
  // src/tilda/features-param.ts
345
325
  var COORD_PRECISION = 6;
@@ -412,8 +392,5 @@ function tildaInspectorUrlForInfra(infra, options) {
412
392
  baseUrl: options.baseUrl
413
393
  });
414
394
  }
415
- function tildaInfraSourceNumericId(infra) {
416
- return tildaSourceNumericId(TILDA_INFRA_PRESETS[infra].sourceId);
417
- }
418
395
 
419
- export { TILDA_INFRA_PRESETS, TILDA_SOURCE_NUMERIC_IDS, changesetLinks, elementLinks, fillEditorUrlTemplate, getUrl, handleJosmLinkClick, idEditorUrl, josmImportUrl, josmLoadObjectUrl, josmRemoteBase, josmUrl, linksIn, longOsmType, mapillaryRecentPanosUrl, mapillaryUrl, osmChangesetUrl, osmDeepHistoryBase, osmDeepHistoryUrl, osmDevUrl, osmEditIdUrl, osmEditKyleKiwiIdUrl, osmEditRapidUrl, osmObjectHistoryUrl, osmOrgUrl, osmProdApiUrl, osmProdUrl, osmchaBase, osmchaChangesetUrl, osmchaFiltersUrl, serializeTildaFeaturesParam, shortOsmType, tildaGeoBase, tildaInfraSourceNumericId, tildaInspectorUrl, tildaInspectorUrlForInfra, tildaSourceIdFromNumeric, tildaSourceNumericId, toLongOsmType, toShortOsmType, userLinks };
396
+ export { changesetLinks, elementLinks, fillEditorUrlTemplate, getUrl, handleJosmLinkClick, idEditorUrl, josmImportUrl, josmLoadObjectUrl, linksIn, mapillaryRecentPanosUrl, mapillaryUrl, osmChangesetUrl, osmDeepHistoryUrl, osmDevUrl, osmEditIdUrl, osmObjectHistoryUrl, osmOrgUrl, osmProdApiUrl, osmProdUrl, osmchaChangesetUrl, osmchaFiltersUrl, serializeTildaFeaturesParam, tildaInspectorUrl, tildaInspectorUrlForInfra, toLongOsmType, toShortOsmType, userLinks };
package/dist/josm.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ /** The part of a click event the handler needs: a native `Event` or a React synthetic event. */
2
+ export type JosmClickEvent = Pick<Event, 'target' | 'preventDefault'>;
1
3
  /**
2
4
  * Click handler for a JOSM remote-control link (`http://127.0.0.1:8111/...`).
3
5
  *
@@ -5,4 +7,4 @@
5
7
  * instead, and the default action is cancelled. JOSM sends CORS headers, so the fetch works from
6
8
  * any page. The promise rejects when JOSM is not running, as the request fails.
7
9
  */
8
- export declare function handleJosmLinkClick(e: Event): Promise<void>;
10
+ export declare function handleJosmLinkClick(e: JosmClickEvent): Promise<void>;
@@ -8,7 +8,7 @@ export type MapillaryUrlOptions = {
8
8
  panosOnly?: boolean;
9
9
  /** Map zoom; defaults to 17. */
10
10
  zoom?: number;
11
- /** When set, adds `trafficSign=` (default `all` when omitted from options entirely uses `all`). */
11
+ /** `'all'` adds `trafficSign=all` (the default); `false` leaves the parameter out. */
12
12
  trafficSign?: 'all' | false;
13
13
  };
14
14
  export declare function mapillaryUrl(center: LatLngLiteral, options?: MapillaryUrlOptions): string;
@@ -1,6 +1,4 @@
1
1
  export type OsmObjectType = 'way' | 'node' | 'relation';
2
2
  export type OsmShortType = 'w' | 'n' | 'r';
3
- export declare const longOsmType: Record<string, OsmObjectType>;
4
- export declare const shortOsmType: Record<string, OsmShortType>;
5
3
  export declare function toLongOsmType(type: string): OsmObjectType | undefined;
6
4
  export declare function toShortOsmType(type: string): OsmShortType | undefined;
@@ -1,3 +1,2 @@
1
1
  export { serializeTildaFeaturesParam, type TildaFeatureCoord, type TildaFeatureParam, } from './features-param';
2
- export { TILDA_INFRA_PRESETS, tildaInfraSourceNumericId, tildaInspectorUrl, tildaInspectorUrlForInfra, type TildaInfra, type TildaInfraPreset, type TildaInspectorForInfraOptions, type TildaInspectorUrlOptions, type TildaMapPosition, } from './inspector';
3
- export { TILDA_SOURCE_NUMERIC_IDS, tildaSourceIdFromNumeric, tildaSourceNumericId } from './sources';
2
+ export { tildaInspectorUrl, tildaInspectorUrlForInfra, type TildaInfra, type TildaInspectorForInfraOptions, type TildaInspectorUrlOptions, type TildaMapPosition, } from './inspector';
@@ -1,16 +1,5 @@
1
1
  import { type TildaFeatureCoord, type TildaFeatureParam } from './features-param';
2
2
  export type TildaInfra = 'bikelanes' | 'parking';
3
- export type TildaInfraPreset = {
4
- regionSlug: string;
5
- sourceId: string;
6
- /** Layer visibility config; drifts in TILDA — override per call if needed. */
7
- defaultConfig: string;
8
- };
9
- /**
10
- * Infra → public TILDA region presets.
11
- * Roads (width/surface/lanes) have no public region — omit those callers.
12
- */
13
- export declare const TILDA_INFRA_PRESETS: Record<TildaInfra, TildaInfraPreset>;
14
3
  export type TildaMapPosition = {
15
4
  zoom: number;
16
5
  lat: number;
@@ -37,8 +26,6 @@ export type TildaInspectorForInfraOptions = {
37
26
  };
38
27
  /**
39
28
  * Build inspector URL for a known infra preset.
40
- * Returns viewport-only URL when `featureId`/`coords` are omitted.
41
- * Returns `null` only when map position is incomplete (should not happen with typed input).
29
+ * Returns a viewport-only URL when `featureId`/`coords` are omitted.
42
30
  */
43
31
  export declare function tildaInspectorUrlForInfra(infra: TildaInfra, options: TildaInspectorForInfraOptions): string;
44
- export declare function tildaInfraSourceNumericId(infra: TildaInfra): number | undefined;
@@ -1,8 +1,2 @@
1
- /**
2
- * TILDA `f` parameter sourceNumericId ↔ source name.
3
- * Mirrors tilda-geo `useFeaturesParam/url.ts` (atlas / Lars / Mapillary / TILDA parking).
4
- */
5
- export declare const TILDA_SOURCE_NUMERIC_IDS: Record<number, string>;
6
1
  /** Resolve TILDA source name → compact numeric id used in `f=`. */
7
2
  export declare function tildaSourceNumericId(sourceId: string): number | undefined;
8
- export declare function tildaSourceIdFromNumeric(numericId: number): string | undefined;
package/package.json CHANGED
@@ -1,13 +1,20 @@
1
1
  {
2
2
  "name": "@osm-editor-kit/osm-editor-links",
3
- "version": "0.1.0-alpha.1",
3
+ "version": "1.0.0",
4
4
  "description": "OpenStreetMap link lists for elements, changesets and users (editors, history, viewers, imagery), with JOSM remote-control helpers.",
5
- "homepage": "https://github.com/osmberlin/street-space-editor/tree/main/packages/osm-editor-links",
5
+ "keywords": [
6
+ "id-editor",
7
+ "josm",
8
+ "links",
9
+ "openstreetmap",
10
+ "osm"
11
+ ],
12
+ "homepage": "https://github.com/osm-editor-kit/street-space-editor/tree/main/packages/osm-editor-links",
6
13
  "license": "MIT",
7
14
  "author": "Tobias Jordans",
8
15
  "repository": {
9
16
  "type": "git",
10
- "url": "git+https://github.com/osmberlin/street-space-editor.git",
17
+ "url": "git+https://github.com/osm-editor-kit/street-space-editor.git",
11
18
  "directory": "packages/osm-editor-links"
12
19
  },
13
20
  "files": [
@@ -23,8 +30,7 @@
23
30
  "./package.json": "./package.json"
24
31
  },
25
32
  "publishConfig": {
26
- "access": "public",
27
- "tag": "alpha"
33
+ "access": "public"
28
34
  },
29
35
  "scripts": {
30
36
  "build": "tsup && rm -f .tsbuildinfo && tsc -p tsconfig.build.json",
@@ -36,7 +42,7 @@
36
42
  "postpack": "bun ../../scripts/package-exports-restore.ts"
37
43
  },
38
44
  "dependencies": {
39
- "@osm-editor-kit/osm-data": "^0.1.0-alpha.1"
45
+ "@osm-editor-kit/osm-data": "^1.0.0"
40
46
  },
41
47
  "devDependencies": {
42
48
  "bun-types": "^1.2.20",