@inploi/plugin-job-search 8.5.6 → 8.6.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 ADDED
@@ -0,0 +1,56 @@
1
+ # @inploi/plugin-job-search
2
+
3
+ The SDK job-search widget supports an optional map via `JobSearchPluginParams.map`.
4
+ Mapbox remains the default renderer during the MapLibre rollout. Enable MapLibre per embed:
5
+
6
+ ```ts
7
+ map: {
8
+ enabled: true,
9
+ renderer: 'maplibre',
10
+ style: 'default',
11
+ }
12
+ ```
13
+
14
+ CDN embeds load MapLibre on demand from `maplibre-gl.js` beside the plugin's `cdn/index.js`, so pages on
15
+ the Mapbox renderer don't download it. npm builds keep `maplibre-gl` as an external dependency.
16
+
17
+ Enable hosted style ids after `maps.inploi.com` serves the selected style and its tile/glyph resources.
18
+ MapLibre needs no access token. A style id resolves to `https://maps.inploi.com/styles/{id}.json`;
19
+ omitting `style` selects `default`. HTTPS style URLs are also supported. The legacy Mapbox light-v10
20
+ and light-v11 URLs map to `default`; other Mapbox URLs select `default` and emit a warning.
21
+ For new configuration, use `mapbox://` URLs only with the Mapbox renderer. Unsupported style formats throw.
22
+ MapLibre falls back once to OpenFreeMap Positron if the initial style or tile source fails before load,
23
+ or loading takes longer than ten seconds. Styles hosted at `https://maps.inploi.com` show only the linked
24
+ `© OpenStreetMap contributors` credit. OpenFreeMap styles show `© OpenMapTiles` and the OSM credit,
25
+ including immediately on fallback. Other styles show de-duplicated source credits,
26
+ updated as the style and source metadata load. Source attribution is parsed in an inert document and rebuilt
27
+ as text and HTTP(S) links only; remote elements and attributes are never copied into the page.
28
+ OpenStreetMap credit is added if no source provides it.
29
+ Unchanged rendered credits preserve the existing attribution links and keyboard focus during source updates.
30
+ Credits use Mapbox GL's attribution dimensions: 12px/20px Helvetica Neue/Arial, 0 5px padding,
31
+ 50% white background, square corners, and 75% black links, flush to the bottom-right corner.
32
+ Below 480px map width, the credit is initially visible, then collapses after five visible seconds to
33
+ MapLibre's 24px information button (10px inset). The labelled button supports Enter/Space and exposes
34
+ `aria-expanded`. Focused credits never auto-collapse. Style changes disclose the new credit again.
35
+
36
+ [OSMF's interactive-map guidelines](https://osmfoundation.org/wiki/Licence/Attribution_Guidelines#Interactive_maps)
37
+ permit automatic collapse after five seconds with discoverable licence information.
38
+ [Protomaps attribution is optional](https://github.com/protomaps/basemaps#licensing-and-attribution-guidelines);
39
+ its OSM tiles require OSM attribution. [MapLibre's BSD-3 licence](https://github.com/maplibre/maplibre-gl-js/blob/main/LICENSE.txt)
40
+ requires distribution notices, not an on-map credit.
41
+ [OpenFreeMap](https://openfreemap.org/#attribution) makes its own name optional; the
42
+ [OpenMapTiles design licence](https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md#design-license-cc-by-40)
43
+ requires the linked OpenMapTiles credit for its schema-derived maps.
44
+
45
+ The public `@inploi/plugin-job-search/utils` entry exports `resolveMapStyle`, `MAP_FALLBACK_STYLE`,
46
+ and `createMapAttribution(styleUrl)`. Add the latter with `map.addControl(control, 'bottom-right')`
47
+ after loading MapLibre's CSS. Call `control.setStyle(styleUrl)` when swapping styles; MapLibre removes
48
+ its observers, event listeners and scoped stylesheet through the control's `onRemove` lifecycle.
49
+ `resolveMapStyle` returns `{ url, unmapped? }`; callers can use `unmapped` to identify a legacy style
50
+ that needs migrating. Mapbox's `accessToken` remains supported and is deprecated for eventual removal.
51
+ MapLibre's cooperative-gesture hints use the plugin's `map_gesture_windows`, `map_gesture_mac` and
52
+ `map_gesture_mobile` terms, so embeds can localise them through `terms`.
53
+
54
+ For local manual checks, use `?test_renderer=maplibre`. The dev harness uses OpenFreeMap until the
55
+ inploi tile service is live. Add `&test_map_style=hosted` to exercise the hosted default style,
56
+ including browser tests that intercept `https://maps.inploi.com/**`.