Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
561 commits
Select commit Hold shift + click to select a range
97ee410
PB-2064: Use a better import method.
ismailsunni Nov 13, 2025
b8b3866
PB-2064: Run formmater: new line, indentation, comment formatting, vu…
ismailsunni Nov 13, 2025
ab67173
PB-2064: Fix FileInput validation logic to properly handle activateVa…
ismailsunni Nov 6, 2025
b9b6b97
PB-2064: Refactor FileInput to use destructuring pattern for props
ismailsunni Nov 6, 2025
12c96f4
PB-2064: Make useFieldValidation generic to support File types
ismailsunni Nov 6, 2025
e0ed6b8
PB-2064: Deconstruct prop directly.
ismailsunni Nov 6, 2025
03365f7
PB-2064: Remove unnecessary modelRef wrappers from input components
ismailsunni Nov 7, 2025
20694b2
PB-2064: Prettier.
ismailsunni Nov 7, 2025
7d8de86
PB-2064: Use direct props destructuring in input components
ismailsunni Nov 7, 2025
ae5e475
PB-2064: Extend generic from string, File, and undefined.
ismailsunni Nov 12, 2025
be7e096
PB-2064: Refactor useFieldValidation to use optional parameters
ismailsunni Nov 13, 2025
3184eb6
PB-2064: Clean up.
ismailsunni Nov 13, 2025
4812132
PB-2064: Format.
ismailsunni Nov 14, 2025
2a4c003
PB-2064: Lint.
ismailsunni Nov 14, 2025
2bba698
PB-2064: Fix type error.
ismailsunni Nov 14, 2025
ad09ee9
PB-1383: update libs
pakb Nov 14, 2025
75f0fad
PB-2064: add two new folders to prettier ignore
pakb Nov 14, 2025
00dcf7d
PB-2027: fix icon/text edit popup not working since refactor
pakb Nov 17, 2025
b8cad90
PB-1383: External layers not loaded at startup
ltkum Nov 17, 2025
3fb85c0
PB-2027: fix text placement when drawing a marker
pakb Nov 18, 2025
10f6fdd
PB-1383: infinite redirect during tests with fake Kataster layer
ltkum Nov 18, 2025
8d8d420
adding unit tests to cover the changes
ltkum Nov 24, 2025
03b17ad
PB-2064: load layers after reload lang change or topic selection
Nov 26, 2025
532b297
PB-2064: refactor load topic
Nov 27, 2025
e02942a
PB-2064: fix menu open close
Nov 24, 2025
709a488
PB-2064: fix geocatalog menu open
Nov 28, 2025
7ba7c12
PB-2064: replace last use of removed readStoreValue function
pakb Nov 28, 2025
b438a5e
PB-2064: fix GPX drag&drop and Cesium artifacts
pakb Dec 3, 2025
d44ca53
PB-1383: rename all geoadmin to swissgeo in published packages
pakb Dec 5, 2025
0243ef2
PB-1383: new version and this time I'll publish through pnpm...
pakb Dec 5, 2025
c67b54f
PB-1383: Fix build.
ismailsunni Dec 8, 2025
7f1dd27
PB-2064: Fix failed to parse crosshair.
ismailsunni Dec 3, 2025
2ea9048
PB-2064: fix map ready state parsed legacy state
Dec 4, 2025
ab2f1cb
PB-2064: refactor legacy url parsing state
Dec 9, 2025
6f81c2c
PB-2064: fix change language
Dec 3, 2025
15dfc52
PB-2064: refactor setLang
Dec 9, 2025
fb2f774
PB-2064: fix footer cypress
Dec 2, 2025
c01fde6
PB-2064: fix menuTray cypress
Dec 2, 2025
24864b3
PB-2064: fix feedback
Dec 2, 2025
94fc2fd
PB-2064: refactor change layers on topic change
Dec 9, 2025
ddd5d53
PB-2064: fix import map layers
Nov 21, 2025
2ec5dbd
PB-2064: fix layer children search
Nov 24, 2025
da76592
PB-2064: fix hasDataDisclaimer whitelisting
Nov 24, 2025
536e5b1
PB-2064: catch error wmts parser
Nov 24, 2025
a7739e5
PB-2064: fix wmts layer parsing import map
Nov 26, 2025
89a828e
PB-2064: refactor
Nov 26, 2025
a70d602
PB-2064: fix import map with timeconfig
Nov 27, 2025
4c616ff
PB-2064: cleanup lint
Nov 27, 2025
8307bc0
PB-2064: refactor capabilities
Dec 2, 2025
db7dcfb
PB-2064: fix center test
Dec 2, 2025
21fcb85
PB-2064: run all tests
Dec 4, 2025
99d554e
PB-2058: Fix not zooming when geolocation is activated.
ismailsunni Nov 5, 2025
0cdf342
PB-2058: Typos.
ismailsunni Nov 5, 2025
f10ccb4
PB-2068: Add recenter button.
ismailsunni Nov 10, 2025
d685d27
PB-2068: Improve recenter and compass button visibility logic.
ismailsunni Nov 10, 2025
8657105
PB-2068: Reset map rotation when disabling geolocation with auto-rota…
ismailsunni Nov 10, 2025
4351d90
PB-2068: Add comment about geolocation tracking not working directly …
ismailsunni Nov 11, 2025
757db47
PB-2068: Restore hasTrackingFeedback logic and fix tracking disable e…
ismailsunni Nov 11, 2025
6ffce3b
PB-2068: Fix tracking being disabled when geolocation updates position.
ismailsunni Nov 11, 2025
b7bf7c5
PB-2068: Separate geolocation from tracking controls
ismailsunni Nov 12, 2025
4daef1c
PB-2058: Fix tracking immediately disabled when RecenterButton activa…
ismailsunni Nov 12, 2025
7985ff9
PB-2068: Remove comments.
ismailsunni Nov 12, 2025
83a4763
PB-2068: Add arrows-to-circle icon for RecenterButton
ismailsunni Nov 12, 2025
9ed625a
PB-2068: Hide RecenterButton when tracking is active
ismailsunni Nov 13, 2025
2bc03b5
PB-2068: Format
ismailsunni Nov 14, 2025
3c5259c
PB-2068: Add pnpm run dev:https in the root level
ismailsunni Dec 3, 2025
8890f5e
PB-2068: Set the geolocation.tracking's default to true.
ismailsunni Dec 3, 2025
546f54b
PB-2068: Use options for setCenter intead relying on dispatcher.
ismailsunni Dec 3, 2025
ad73e1e
PB-2068: Fix missing import on 3D geolocation test.
ismailsunni Dec 3, 2025
e13dfc6
PB-2068: Use options bag for setCenter function.
ismailsunni Dec 8, 2025
254c60e
PB-2068: Only recenter on the first geolocation activation or when th…
ismailsunni Dec 9, 2025
76ce971
PB-2068: Better dispatcherOrNothing handler.
ismailsunni Dec 10, 2025
e629360
PB-1383: export prettier config as JS
pakb Dec 11, 2025
e71fc66
PB-1383: initial values not included in external layers
ltkum Nov 17, 2025
e72df25
PB-1383: Avoid concurrency between app setup and URL parsing
ltkum Nov 25, 2025
85eadf5
adding tests
ltkum Nov 28, 2025
0b6b066
PB-1383: adding a failsafe around optionsFromCapabilities, as it coul…
ltkum Dec 1, 2025
1673e55
PB-1383: layer tests
ltkum Dec 2, 2025
d81c762
PB-1383: layer tests
ltkum Dec 2, 2025
be22da8
PB-1383: export types alongside JS with config-prettier
pakb Dec 11, 2025
f08d838
PB-1383: export ESLint config as JS
pakb Dec 12, 2025
fda38d5
PB-1383: streamline the publish process
pakb Dec 12, 2025
61cf125
PB-1383: standardize ESLint rules between JS and TS
pakb Dec 12, 2025
d660a4e
PB-1383: lint viewer project with new rules
pakb Dec 12, 2025
dfc8503
PB-1383: setting all published packages version to RC version 1
pakb Dec 12, 2025
17ad7c3
PB-1383: adding an ESLint plugin/rule to sort TS imports
pakb Dec 12, 2025
15f51fc
PB-1383: adding back data in 3d building tooltips
ltkum Dec 15, 2025
d63166f
PB-2064: fix timeslider
Dec 3, 2025
6ec7d74
PB-2064: fix timeslider years with data
Dec 3, 2025
3b968d2
PB-2064: fix show correct input year
Dec 3, 2025
e6e20f1
PB-2064: fix timeSlider test type errors
Dec 3, 2025
9b1dd4b
PB-2064: fix show all timestamp
Dec 4, 2025
0c459aa
PB-2064: fix timeslider tests
Dec 4, 2025
abb1e4e
PB-2064: fix timeslider all year
Dec 12, 2025
e8eddf6
PB-2064: Fix test geolocation outside switzerland.
ismailsunni Dec 11, 2025
6d0cd79
PB-2064: Fix missing return when changing zoom.
ismailsunni Dec 11, 2025
333a9d0
PB-2064: Enable geolocation 3D test again.
ismailsunni Dec 11, 2025
d6e8107
PB-2064: Add test for handling geolocation tracking and recentering b…
ismailsunni Dec 12, 2025
60f1a05
PB-2064: Fix lint.
ismailsunni Dec 16, 2025
8ee0cce
PB-2054: debug cesium crash
Dec 15, 2025
c5ad5a8
PB-2054: fix select features
Dec 15, 2025
c745789
PB-2064: refactor fix cesium
Dec 15, 2025
d635961
PB-2054: refactor cesium add layer
Dec 15, 2025
855dce9
PB-1383: typing the kmlGeoJson object
ltkum Dec 15, 2025
1c0a0ff
PB-2064: fix reportProblem cypress test
sommerfe Nov 11, 2025
f2a85ca
PB-2064: fix drawing report problem
sommerfe Nov 12, 2025
73c9d2a
PB-2064: report problem
Nov 12, 2025
474ca7e
PB-2064: fix report problem drawing
Nov 14, 2025
02ac548
PB-2064: fix delete drawing
Nov 17, 2025
fac281d
PB-2064: fix report problem field validation
Nov 17, 2025
b86f4e6
PB-2064: refactor code
Nov 18, 2025
d95960c
PB-2064: fix create and delte drawing report problem
Nov 19, 2025
bf07118
PB-2064: fix report problem cypress test
Nov 19, 2025
cd71b57
PB-2064: refactor online mode
Nov 20, 2025
50a6d9e
PB-2027: only request icon in LARGE size, and resize them with the scale
pakb Nov 20, 2025
9f5bf74
PB-2027: fix code so that marker/text test passes
pakb Nov 20, 2025
da2ca18
PB-2027: simplify the useFieldValidation composable
pakb Nov 20, 2025
e7e6873
PB-2027: fix lost validation reactivity with inputs and their props
pakb Nov 21, 2025
e5b5a5b
PB-2027: remove double call to validate
pakb Nov 21, 2025
b2cbd9f
PB-2027: fixing after rebase + linting
pakb Dec 17, 2025
64a31c1
PB-2064: Rearrange tests to make it clearer and less redundant.
ismailsunni Dec 17, 2025
181a723
PB-2064: Add missing prepare script to fix CI build.
ismailsunni Dec 17, 2025
3a3ec73
PB-2064: Update pnpm-lock.yaml
ismailsunni Dec 17, 2025
426b914
PB-2064: add missing vite.config.ts for config package.
ismailsunni Dec 17, 2025
b822ea2
PB-2064: Include all TS in the tsconfig.json
ismailsunni Dec 17, 2025
8bcf5a0
PB-2064: fix decativate tracking
Nov 28, 2025
9286a3e
PB-2064: fix short link zoom
Dec 18, 2025
040b591
PB-1387: move Theme/Style/SCSS elements to a dedicated theme module
pakb Dec 18, 2025
62d872f
PB-2064: Fix theme build error with font file copying
ismailsunni Dec 24, 2025
5acdfcd
PB-2064: Use single thread for vitest to prevent timeout.
ismailsunni Dec 24, 2025
6e49ce9
PB-2064: Simplify fix.
ismailsunni Dec 24, 2025
c01b16e
PB-2064: Fix missing process is not defined.
ismailsunni Dec 25, 2025
e079aff
PB-1387: all API files as a package
pakb Dec 19, 2025
9a9bcf1
PB-1387: move sample for unit test in the relevant location
pakb Jan 6, 2026
95d45f5
PB-1387: update libs
pakb Jan 6, 2026
5fff2b2
PB-1387: increase max size for vite-plugin-pwa's output
pakb Jan 6, 2026
8cb6054
PB-1387: replacing use of utils with new API package in e2e tests
pakb Jan 6, 2026
ff0e44d
PB-1387: update Cypress to latest
pakb Jan 6, 2026
e5dc633
PB-2155: add OL helpers in @swissgeo/coordinates
pakb Jan 7, 2026
3b733b3
PB-2155: use latest tag on npmjs registry (instead of next)
pakb Jan 7, 2026
43bd50c
PB-2155: receive the proj4 instance in OL utils
pakb Jan 7, 2026
99f1f71
PB-2155: only provide OL View config (instead of full-fledge instance)
pakb Jan 7, 2026
e26882d
PB-2155: provide a WMS TileGrid in @swissgeo/coordinates
pakb Jan 12, 2026
fdde497
PB-2155: document the exported packages on the main README.md
pakb Jan 12, 2026
6bbcb09
PB-2155: switch @swissgeo/coordinates dev page to tailwindcss
pakb Jan 12, 2026
0ce2360
PB-2064: fix run webgl in cypress
Dec 17, 2025
c8c2a88
PB-2064: fix cypress startup error
Dec 17, 2025
af581ae
PB-2064: add launch options webgl
Jan 7, 2026
0345c72
PB-1387: publish @swissgeo/tooltip and @swissgeo/elevation-profile
pakb Jan 13, 2026
22a6765
PB-1387: fix infinite redirect when changing crosshair in tests
pakb Jan 13, 2026
4549e53
PB-1387: separate Vitest config from Vite
pakb Jan 14, 2026
1534956
PB-2064: Use markRaw for layer config to optimize performance
ismailsunni Dec 29, 2025
bf3e0f3
PB-2064: Fix search URL parameter removal by deferring cleanup and av…
ismailsunni Dec 26, 2025
c3e6f39
PB-2064: Refactor search actions to use async/await and ensure pinned…
ismailsunni Dec 30, 2025
5b6b95b
PB-2064: Improve search test stability and refactor store actions for…
ismailsunni Dec 30, 2025
3b454c5
PB-2064: Remove console.log
ismailsunni Dec 31, 2025
f8ac82b
PB-2064: Fix lint
ismailsunni Dec 31, 2025
ccc75a7
PB-2064: Fix rebase issue and do not use void.
ismailsunni Jan 12, 2026
84b024f
PB-2064: Remove only.
ismailsunni Jan 14, 2026
ca07438
PB-2064: Revert deletion of setSearchQuery declarations.
ismailsunni Jan 14, 2026
388027d
PB-2064: Revert using cy.wrap.
ismailsunni Jan 14, 2026
9555f94
PB-2064: Use the same approach as before to write test.
ismailsunni Jan 14, 2026
82feb0e
PB-2064: Externalize peer dependencies in api and coordinates packages
ismailsunni Jan 15, 2026
76c87b6
PB-2064: Wire up translations for search location origin prefixes
ismailsunni Jan 15, 2026
e75bd9e
PB-2064: Use wrap for mouse enter and leave test.
ismailsunni Jan 15, 2026
c1cb39b
PB-2064: split crosshair/swisssearch test in multiple tests
pakb Jan 15, 2026
5abe148
PB-2064: fix open drawing module
Jan 13, 2026
8b87bf4
PB-2064: fix use correct staging urls
Jan 13, 2026
676436e
PB-2064: fix add necessary projections to kmlUtils parseKml
Jan 14, 2026
8c41579
PB-2064: refactor staging param
Jan 15, 2026
a6ebcce
PB-2064: fix lint
Jan 15, 2026
4b784dd
PB-2064: lint
Jan 16, 2026
401e740
PB-2064: fix show KML and drawing
Jan 16, 2026
9f4cf19
PB-2064: fix cypress 3d click
Dec 18, 2025
fd90569
PB-2064: fix viewer in feature selection 3d test
Dec 18, 2025
cc81ce6
PB-2064: fix navigation test
Dec 19, 2025
6e31157
PB-2064: fix transitionTo3d cypress test
Jan 7, 2026
bde4bd9
PB-2064: add log launch options cypress
Jan 7, 2026
2d99465
push
Jan 7, 2026
2323028
PB-2064: fix review 3d
Jan 8, 2026
cf06f57
PB-2064: refactor imports
Jan 14, 2026
5d74191
PB-2064: refactor imports
Jan 14, 2026
18ba13b
PB-2064: refactor click test cesium
Jan 14, 2026
242b02c
PB-2064: fix lint
Jan 14, 2026
009cf07
PB-2064: fix report problem test
Jan 15, 2026
8e0c728
PB-2064: refactor report problem test
Jan 15, 2026
82f817b
PB-2169: Fix GeoJSON features issue
ltkum Jan 16, 2026
6243357
PB-2169: move geojson type extension to a `*.d.ts` file
pakb Jan 19, 2026
42e91f0
Raise versions of libs that were recently updated
pakb Jan 21, 2026
936288c
PB-2064: add launch options webgl
Jan 7, 2026
24446b7
PB-2064: fix cypress test 3d layers
Jan 7, 2026
0e5c530
PB-2064: fix cypress 3d layers test
Jan 8, 2026
b1b5b33
PB-2064: fix remove selected features toggle layer
Jan 9, 2026
e088d27
PB-2064: fix cesium geojson layer loading
Jan 9, 2026
ca52104
PB-2064: clean up layers test
Jan 15, 2026
a9b6432
PB-2064: fix geodata
Jan 16, 2026
3ed0e74
PB-2064: refactor geojson layer geojson data
Jan 20, 2026
c9c9295
PB-2064: refactor geojson data
Jan 20, 2026
5fe00f8
PB-2064: refactor toggleLayerVisibility wait for router to finish
Jan 20, 2026
20f311b
PB-2064: refactor cesium geojson
Jan 20, 2026
49c57c5
PB-2064: refactor cesium geojson
Jan 20, 2026
2cd727f
PB-2064: refactor toggleLayerVisibility hook router
Jan 20, 2026
37fd20f
PB-2064: fix unit test layers store
Jan 21, 2026
f4fe006
PB-2064: fix issue with reframe API file
pakb Jan 21, 2026
9df5edb
PB-2064: fix mouseposition.cy.ts test
pakb Jan 21, 2026
420553a
PB-2163: background map revert to default on language change
ltkum Jan 19, 2026
77652c9
PB-2064: fix embed test
pakb Jan 22, 2026
0003b01
PB-2064: fix geolocation test
pakb Jan 22, 2026
66298fc
PB-2064: Update test.
ismailsunni Dec 18, 2025
fb9afe9
PB-2064: Copy file from the working import tool file test.
ismailsunni Dec 23, 2025
5d06717
PB-2064: Fix import file validation not showing errors on empty input
ismailsunni Dec 23, 2025
f2a24ba
PB-2064: Add debugging and uncomment error handling tests
ismailsunni Dec 23, 2025
4324866
PB-2064: Fix error messages being cleared on subsequent loadFile calls
ismailsunni Dec 23, 2025
9126b77
PB-2064: Clear error messages when new file is selected
ismailsunni Dec 23, 2025
9eeb6b6
PB-2064: Run all test.
ismailsunni Dec 24, 2025
819b91a
PB-2064: Remove debug console.
ismailsunni Dec 24, 2025
18f6c80
PB-2064: Make isLocalFile as a function.
ismailsunni Jan 12, 2026
80a935a
PB-2064: externalize @swissgeo/log in all packages
pakb Jan 22, 2026
97f62f3
PB-2064: fix issue with GPX parsing
pakb Jan 22, 2026
45123a1
PB-2064: add zoom-to-extent button for GPX
pakb Jan 22, 2026
f6cfb09
PB-2064: fix GPX/KML parsing in e2e test
pakb Jan 22, 2026
7ff98e9
PB-2064: Fix search URL parameter removal by deferring cleanup and av…
ismailsunni Dec 26, 2025
d5170ee
PB-2064: Refactor search actions to use async/await and ensure pinned…
ismailsunni Dec 30, 2025
ebeedcb
PB-2064: Improve search test stability and refactor store actions for…
ismailsunni Dec 30, 2025
8e4b0df
PB-2064: Remove console.log
ismailsunni Dec 31, 2025
433b1d1
PB-2064: Fix lint
ismailsunni Dec 31, 2025
7d47907
PB-2064: Fix legacy KML adminId import and stabilize associated Cypre…
ismailsunni Dec 31, 2025
15cc987
PB-2064: Fix 3D activation for legacy params and clean up tests
ismailsunni Dec 31, 2025
1a4fd58
PB-2064: fix waiting on pre-selection of feature in legacy parser
pakb Jan 22, 2026
7aaf755
PB-2064: fix search-results test
pakb Jan 22, 2026
6813997
PB-2064: fix search result preview in tests
pakb Jan 23, 2026
adc1499
PB-2064: fix print types
Dec 9, 2025
874af54
PB-2064: fix print orientation current highlight
Dec 9, 2025
927eca1
PB-2064: fix opacity on print layers
Dec 10, 2025
8095088
PB-2064: fix print providers sorting
Dec 15, 2025
26cb141
PB-2064: move print stuff back into viewer package
pakb Jan 28, 2026
5555e04
PB-2064: moving OL bundle to dedicated file
pakb Jan 28, 2026
eba088a
PB-2064: removing tailwind class prefix
pakb Jan 28, 2026
c983692
PB-2064: fix print test
pakb Jan 28, 2026
cc2ab23
PB-2064: lint and update libs
pakb Jan 28, 2026
7501155
PB-2064: raising version of all packages recently edited
pakb Jan 28, 2026
a3acf2f
PB-2064: revert separation of OL in the bunlder
pakb Jan 29, 2026
15c4d49
PB-2064: fix featureSelection.cy.ts test
pakb Jan 30, 2026
d2a6fd8
PB-2064: fix importMap test
pakb Jan 30, 2026
c9c570e
PB-2064: use cypress utils (instead of store) to count features
pakb Jan 30, 2026
5e4056a
PB-1383: revert package name to mapviewer
pakb Feb 24, 2026
1bf8e0e
PB-1383: update libs and adapt to newer linter version
pakb Feb 25, 2026
50ccb32
PB-1383: adaptation to new TS rules/error
pakb Feb 26, 2026
a8a8f41
PB-1383: more fix after rebasing on develop
pakb Feb 27, 2026
b3895a1
PB-1383: add retry-ability to 3D feature tests
pakb Feb 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ package-lock.json
**/scripts/check-layer-providers-results/*invalid_providers_wmts.yaml
**/scripts/check-layer-providers-results/*invalid_providers_content.yaml
**/scripts/check-layer-providers-results/*valid_providers.json

# Dev
.specstory
11 changes: 11 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
pnpm-lock.yaml
.github/
patches/

node_modules/
**/node_modules
packages/**/dist/

packages/viewer/index.html
packages/viewer/public/icon.svg
packages/viewer/src/assets/svg/swiss-flag.svg
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ The store is divided into modules that mostly correspond to the application part
The goal is to have a centralized way of dealing with changes, and not delegate that to each component.

Store plugins can be used to react to store changes.
See the [store read-me](packages/viewer/src/store/README.md) for more information.
See the [store read-me](packages/mapviewer/src/store/README.md) for more information.

### Best practices

- Prefer primitive data or javascript plain object in reactive data (Vue Component data or refs, Vuex store data)
- Don't use a complex object as reactive data
- Avoid using JavaScript getter and setter in class that are used in reactive data

See also [Store Best Practices](packages/viewer/src/store/README.md#best-practices)
See also [Store Best Practices](packages/mapviewer/src/store/README.md#best-practices)

### Vue Composition API

Expand Down
152 changes: 152 additions & 0 deletions PACKAGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
# @swissgeo Packages Dependency Map

State made on the 2026-01-21 (subject to change)

This document maps the dependencies between the packages exported to NPMJS.com under the `@swissgeo` organization.

## Dependency Graph

```mermaid
graph TD
subgraph Core Libraries
api["@swissgeo/api"]
coordinates["@swissgeo/coordinates"]
elevation["@swissgeo/elevation-profile"]
layers["@swissgeo/layers"]
log["@swissgeo/log"]
numbers["@swissgeo/numbers"]
theme["@swissgeo/theme"]
tooltip["@swissgeo/tooltip"]
end

subgraph Configuration Packages
eslint["@swissgeo/config-eslint"]
prettier["@swissgeo/config-prettier"]
stylelint["@swissgeo/config-stylelint"]
typescript["@swissgeo/config-typescript"]
staging["@swissgeo/staging-config"]
end

%% Dependencies
api --> coordinates
api --> layers
api --> log
api --> numbers
api --> staging
api --> theme

coordinates --> log
coordinates --> numbers

elevation --> api
elevation --> coordinates
elevation --> log
elevation --> numbers
elevation --> staging
elevation --> tooltip

layers --> coordinates
layers --> log
layers --> numbers
layers --> staging

numbers --> log

theme --> staging

%% DevDependencies to Config (optional to show, but mapping them helps)
api -.-> eslint
api -.-> prettier
api -.-> typescript

coordinates -.-> eslint
coordinates -.-> typescript

drawing -.-> eslint
drawing -.-> prettier
drawing -.-> stylelint
drawing -.-> typescript

elevation -.-> eslint
elevation -.-> stylelint
elevation -.-> typescript

layers -.-> eslint
layers -.-> typescript

log -.-> eslint
log -.-> typescript

numbers -.-> eslint
numbers -.-> typescript

theme -.-> eslint
theme -.-> stylelint
theme -.-> typescript

tooltip -.-> eslint
tooltip -.-> stylelint
tooltip -.-> typescript

eslint -.-> typescript
prettier -.-> typescript
staging -.-> eslint
staging -.-> typescript
stylelint -.-> typescript

```

## Dependency Table

| Package | Dependencies (@swissgeo) | DevDependencies (@swissgeo) |
| ------- | ------------------------ | --------------------------- |
| `@swissgeo/api` | `coordinates`, `layers`, `log`, `numbers`, `staging-config`, `theme` | `config-eslint`, `config-prettier`, `config-typescript` |
| `@swissgeo/coordinates` | `log`, `numbers` | `config-eslint`, `config-typescript` |
| `@swissgeo/elevation-profile` | `api`, `coordinates`, `log`, `numbers`, `staging-config`, `tooltip` | `config-eslint`, `config-stylelint`, `config-typescript` |
| `@swissgeo/layers` | `coordinates`, `log`, `numbers`, `staging-config` | `config-eslint`, `config-typescript` |
| `@swissgeo/log` | - | `config-eslint`, `config-typescript` |
| `@swissgeo/numbers` | `log` | `config-eslint`, `config-typescript` |
| `@swissgeo/theme` | `staging-config` | `config-eslint`, `config-stylelint`, `config-typescript` |
| `@swissgeo/tooltip` | - | `config-eslint`, `config-stylelint`, `config-typescript` |
| `@swissgeo/config-eslint` | - | `config-typescript` |
| `@swissgeo/config-prettier` | - | `config-typescript` |
| `@swissgeo/config-stylelint` | - | `config-typescript` |
| `@swissgeo/config-typescript` | - | - |
| `@swissgeo/staging-config` | - | `config-eslint`, `config-typescript` |

## Dependency Matrix

This table shows which package imports which dependency.
- **X**: Production dependency
- **d**: Development dependency

| Importing Package | api | coord | draw | elev | layr | log | numb | thme | tool | esl | pret | styl | ts | stag |
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| `@swissgeo/api` | - | X | | | X | X | X | X | | d | | | d | X |
| `@swissgeo/coordinates` | | - | | | | X | X | | | d | | | d | |
| `@swissgeo/elevation-profile` | X | X | | - | | X | X | | X | d | | d | d | X |
| `@swissgeo/layers` | | X | | | - | X | X | | | d | | | d | X |
| `@swissgeo/log` | | | | | | - | | | | d | | | d | |
| `@swissgeo/numbers` | | | | | | X | - | | | d | | | d | |
| `@swissgeo/theme` | | | | | | | | - | | d | | d | d | X |
| `@swissgeo/tooltip` | | | | | | | | | - | d | | d | d | |
| `@swissgeo/config-eslint` | | | | | | | | | | - | | | d | |
| `@swissgeo/config-prettier` | | | | | | | | | | | - | | d | |
| `@swissgeo/config-stylelint` | | | | | | | | | | | | - | d | |
| `@swissgeo/config-typescript` | | | | | | | | | | | | | - | |
| `@swissgeo/staging-config` | | | | | | | | | | d | | | d | - |

**Legend:**
- **api**: `@swissgeo/api`
- **coord**: `@swissgeo/coordinates`
- **elev**: `@swissgeo/elevation-profile`
- **layr**: `@swissgeo/layers`
- **log**: `@swissgeo/log`
- **numb**: `@swissgeo/numbers`
- **thme**: `@swissgeo/theme`
- **tool**: `@swissgeo/tooltip`
- **esl**: `@swissgeo/config-eslint`
- **pret**: `@swissgeo/config-prettier`
- **styl**: `@swissgeo/config-stylelint`
- **ts**: `@swissgeo/config-typescript`
- **stag**: `@swissgeo/staging-config`
33 changes: 31 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,44 @@ pnpm run dev

See [CONTRIBUTING.md](CONTRIBUTING.md)

## Exported Packages

This monorepo contains several packages that are published to [NPMJS.com](https://www.npmjs.com/org/swissgeo) under the `@swissgeo` organization.
Detailed dependency mapping can be found in [PACKAGES.md](PACKAGES.md).

### Core Libraries

| Package | Version | Description |
| ------- | ------- | ----------- |
| [`@swissgeo/api`](https://www.npmjs.com/package/@swissgeo/api) | ![npm (scoped)](https://img.shields.io/npm/v/@swissgeo/api) | API utilities to interact with SWISSGEO's backend services |
| [`@swissgeo/coordinates`](https://www.npmjs.com/package/@swissgeo/coordinates) | ![npm (scoped)](https://img.shields.io/npm/v/@swissgeo/coordinates) | Projection definition and coordinates utils for SWISSGEO projects |
| [`@swissgeo/drawing`](https://www.npmjs.com/package/@swissgeo/drawing) | ![npm (scoped)](https://img.shields.io/npm/v/@swissgeo/drawing) | Components to draw on a map and export the result as KML or GeoJSON |
| [`@swissgeo/elevation-profile`](https://www.npmjs.com/package/@swissgeo/elevation-profile) | ![npm (scoped)](https://img.shields.io/npm/v/@swissgeo/elevation-profile) | Components to request and display an elevation profile over Switzerland |
| [`@swissgeo/layers`](https://www.npmjs.com/package/@swissgeo/layers) | ![npm (scoped)](https://img.shields.io/npm/v/@swissgeo/layers) | Layers definition for SwissGeo |
| [`@swissgeo/log`](https://www.npmjs.com/package/@swissgeo/log) | ![npm (scoped)](https://img.shields.io/npm/v/@swissgeo/log) | Logging utils for SWISSGEO projects |
| [`@swissgeo/numbers`](https://www.npmjs.com/package/@swissgeo/numbers) | ![npm (scoped)](https://img.shields.io/npm/v/@swissgeo/numbers) | Numbers utils for SWISSGEO projects |
| [`@swissgeo/theme`](https://www.npmjs.com/package/@swissgeo/theme) | ![npm (scoped)](https://img.shields.io/npm/v/@swissgeo/theme) | Shared SCSS variable and theme utilities |
| [`@swissgeo/tooltip`](https://www.npmjs.com/package/@swissgeo/tooltip) | ![npm (scoped)](https://img.shields.io/npm/v/@swissgeo/tooltip) | Tooltip for geoadmin |

### Configuration Packages

| Package | Version | Description |
| ------- | ------- | ----------- |
| [`@swissgeo/config-eslint`](https://www.npmjs.com/package/@swissgeo/config-eslint) | ![npm (scoped)](https://img.shields.io/npm/v/@swissgeo/config-eslint) | Shared ESLint config for SWISSGEO projects |
| [`@swissgeo/config-prettier`](https://www.npmjs.com/package/@swissgeo/config-prettier) | ![npm (scoped)](https://img.shields.io/npm/v/@swissgeo/config-prettier) | Shared Prettier config for SWISSGEO projects |
| [`@swissgeo/config-stylelint`](https://www.npmjs.com/package/@swissgeo/config-stylelint) | ![npm (scoped)](https://img.shields.io/npm/v/@swissgeo/config-stylelint) | Shared Stylelint config for SWISSGEO projects |
| [`@swissgeo/config-typescript`](https://www.npmjs.com/package/@swissgeo/config-typescript) | ![npm (scoped)](https://img.shields.io/npm/v/@swissgeo/config-typescript) | TypeScript configuration for SWISSGEO projects |
| [`@swissgeo/staging-config`](https://www.npmjs.com/package/@swissgeo/staging-config) | ![npm (scoped)](https://img.shields.io/npm/v/@swissgeo/staging-config) | Staging config utils for swissgeo |

## Check External Layer Provider list

In the `Import` tool we provide a hardcoded list of provider via the [external-providers.json](packages/viewer/src/modules/menu/components/advancedTools/ImportCatalogue/external-providers.json) file. Because we have quite a lot of provider, we have a CLI tool in order to
In the `Import` tool we provide a hardcoded list of provider via the [external-providers.json](packages/mapviewer/src/modules/menu/components/advancedTools/ImportCatalogue/external-providers.json) file. Because we have quite a lot of provider, we have a CLI tool in order to
check their validity. The tool can also be used with a single url as input parameter to see the URL would be valid
for our application.

```bash
pnpm install
./packages/viewer/scripts/check-external-layers-providers.js
./packages/mapviewer/scripts/check-external-layers-providers.js
```

You can use `-h` option to get more detail on the script.
2 changes: 1 addition & 1 deletion env.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/// <reference types="vite/client" />
/// <reference types="vite/client" />
33 changes: 23 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,42 @@
"build:int": "pnpm --recursive --if-present run build:int",
"build:prod": "pnpm --recursive --if-present run build:prod",
"dev": "pnpm --filter=web-mapviewer run dev ",
"dev:https": "pnpm --filter=web-mapviewer run dev:https ",
"force-reinstall": "node ./scripts/force-pnpm-reinstall.js",
"format": "prettier --write .",
"format:check": "prettier --check .",
"lint": "pnpm run --recursive --parallel --no-bail --if-present lint",
"lint:no-fix": "pnpm run --recursive --parallel --no-bail --if-present lint:no-fix ",
"preview": "pnpm run build-libs && pnpm --filter=web-mapviewer run preview",
"preview:dev": "pnpm run build-libs && pnpm --filter=web-mapviewer run preview:dev ",
"preview:int": "pnpm run build-libs && pnpm --filter=web-mapviewer run preview:int",
"preview:prod": "pnpm run build-libs && pnpm --filter=web-mapviewer run preview:prod",
"preview:test": "pnpm run build-libs && pnpm --filter=web-mapviewer run preview:test",
"preview": "pnpm --filter=web-mapviewer run preview",
"preview:dev": "pnpm --filter=web-mapviewer run preview:dev ",
"preview:int": "pnpm --filter=web-mapviewer run preview:int",
"preview:prod": "pnpm --filter=web-mapviewer run preview:prod",
"preview:test": "pnpm --filter=web-mapviewer run preview:test",
"publish": "pnpm --filter=!web-mapviewer --filter=!@swissgeo/layers --recursive publish --access public --tag latest",
"publish:prepare": "pnpm --filter=!web-mapviewer --filter=!@swissgeo/layers --recursive --parallel build",
"test:component": "pnpm --filter=web-mapviewer run test:component",
"test:component:ci": "pnpm --filter=web-mapviewer run test:component:ci",
"test:e2e": "pnpm --filter=web-mapviewer run test:e2e",
"test:e2e:ci": "pnpm --filter=web-mapviewer run test:e2e:ci",
"test:e2e:headless": "pnpm --filter=web-mapviewer run test:e2e:headless",
"test:unit": "pnpm run --recursive --parallel --no-bail --if-present test:unit",
"test:unit:watch": "pnpm run --recursive --if-present test:unit:watch",
"update:workspace": "node ./scripts/update-pnpm-workspace.js"
"update:workspace": "tsx ./scripts/update-pnpm-workspace.ts"
},
"engines": {
"node": ">=22.18",
"pnpm": ">=10.15"
},
"devDependencies": {
"@prettier/plugin-xml": "catalog:",
"@swissgeo/config-prettier": "workspace:*",
"@types/node": "catalog:",
"prettier": "catalog:",
"prettier-plugin-jsdoc": "catalog:",
"prettier-plugin-packagejson": "catalog:",
"prettier-plugin-tailwindcss": "catalog:",
"tsx": "catalog:",
"vitest": "catalog:",
"yaml": "catalog:"
},
"pnpm": {
Expand All @@ -44,16 +56,17 @@
"sharp",
"vue-demi"
],
"patchedDependencies": {
"@geoblocks/mapfishprint@0.2.22": "patches/@geoblocks__mapfishprint@0.2.22.patch",
"ol@10.8.0": "patches/ol@10.8.0.patch"
},
"ignoredBuiltDependencies": [
"core-js",
"cypress",
"es5-ext",
"esbuild",
"protobufjs",
"sharp"
],
"patchedDependencies": {
"vite": "patches/vite.patch"
}
]
}
}
72 changes: 72 additions & 0 deletions packages/api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# @swissgeo/api

API utilities to interact with SWISSGEO's backend services.

This package provides a collection of functions and types to interact with various SWISSGEO services, including search, elevation (height), profile, print, and more.

## Installation

```bash
pnpm add @swissgeo/api
```

### Peer dependencies

Most functions that deal with coordinates require the [@swissgeo/coordinates](https://www.npmjs.com/package/@swissgeo/coordinates) package to access the coordinate transformation utilities.

```bash
pnpm add @swissgeo/coordinates
```

## Features

This package provides utilities for:

- **Features**: Interaction with geographic features.
- **Feedback**: Sending feedback to the platform.
- **Files**: KML file management. Aimed at the drawing tools on [map.geo.admin.ch](https://map.geo.admin.ch).
- **Height**: Requesting elevation at specific coordinates.
- **Icons**: Accessing platform icons.
- **LV03 Reframe**: Coordinate transformation (LV03 <-> LV95).
- **Print**: Interacting with MapFish Print services.
- **Profile**: Requesting elevation profiles.
- **QR Code**: Generating QR codes.
- **Search**: Searching for locations, layers, and features (in layers).
- **Shortlink**: Generating and resolving shorten URL.
- **Topics**: Accessing map topics and layers metadata.
- **What3Words**: Integration with What3Words services.

## Usage (some samples)

### Search API

```typescript
import { LV95 } from '@swissgeo/coordinates'
import { searchAPI } from '@swissgeo/api'

const results = await searchAPI.search({
queryString: "Bern",
outputProjection: LV95,
lang: 'en',
// in m/px, you can get this from your OpenLayers instance by calling map.getView().getResolution()
resolution: 1000
})
```

### Height API

```typescript
import { LV95, WGS84 } from '@swissgeo/coordinates'
import { heightAPI } from '@swissgeo/api'

const elevation = await getHeightForPosition([2600000, 1200000], LV95)
const elevationWGS84 = await getHeightForPosition([7.530, 46.627], WGS84)
```

## License

BSD-3-Clause

## Repository

[https://github.com/geoadmin/web-mapviewer](https://github.com/geoadmin/web-mapviewer)
12 changes: 12 additions & 0 deletions packages/api/eslint.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import defaultConfig from '@swissgeo/config-eslint'

export default [
...defaultConfig,
{
languageOptions: {
parserOptions: {
tsconfigRootDir: import.meta.dirname,
},
},
},
]
Loading
Loading