@swr-data-lab/components 1.13.0 → 1.13.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 (325) hide show
  1. package/dist/Autocomplete/Autocomplete.stories.svelte.d.ts +27 -0
  2. package/dist/Autocomplete/Autocomplete.svelte +237 -0
  3. package/dist/Autocomplete/Autocomplete.svelte.d.ts +34 -0
  4. package/dist/Autocomplete/index.d.ts +2 -0
  5. package/dist/Button/Button.stories.svelte +19 -0
  6. package/dist/Button/Button.stories.svelte.d.ts +19 -0
  7. package/dist/Button/Button.svelte +38 -0
  8. package/dist/Button/Button.svelte.d.ts +10 -0
  9. package/dist/Button/index.d.ts +2 -0
  10. package/dist/Caption/Caption.stories.svelte.d.ts +27 -0
  11. package/dist/Caption/Caption.svelte +21 -0
  12. package/dist/Caption/Caption.svelte.d.ts +8 -0
  13. package/dist/Caption/index.js +2 -0
  14. package/dist/Card/Card.stories.svelte +17 -0
  15. package/dist/Card/Card.stories.svelte.d.ts +19 -0
  16. package/dist/Card/Card.svelte +25 -0
  17. package/dist/Card/Card.svelte.d.ts +7 -0
  18. package/dist/Card/index.d.ts +2 -0
  19. package/dist/ChartFooter/ChartFooter.stories.svelte.d.ts +27 -0
  20. package/dist/ChartFooter/ChartFooter.svelte +38 -0
  21. package/dist/ChartFooter/ChartFooter.svelte.d.ts +8 -0
  22. package/dist/ChartFooter/index.d.ts +2 -0
  23. package/dist/ChartHeader/ChartHeader.stories.svelte.d.ts +27 -0
  24. package/{src → dist}/ChartHeader/ChartHeader.svelte +4 -12
  25. package/dist/ChartHeader/ChartHeader.svelte.d.ts +9 -0
  26. package/dist/ChartHeader/index.d.ts +2 -0
  27. package/dist/ChartList/ChartList.stories.svelte.d.ts +27 -0
  28. package/{src → dist}/ChartList/ChartList.svelte +2 -16
  29. package/dist/ChartList/ChartList.svelte.d.ts +14 -0
  30. package/dist/ChartList/index.js +2 -0
  31. package/dist/Copy/Copy.stories.svelte.d.ts +27 -0
  32. package/dist/Copy/Copy.svelte +21 -0
  33. package/dist/Copy/Copy.svelte.d.ts +8 -0
  34. package/dist/Copy/index.js +2 -0
  35. package/dist/DesignTokens/DesignTokens.svelte +58 -0
  36. package/dist/DesignTokens/DesignTokens.svelte.d.ts +7 -0
  37. package/dist/DesignTokens/Tokens.d.ts +26 -0
  38. package/dist/DesignTokens/Tokens.js +171 -0
  39. package/dist/DesignTokens/index.d.ts +8 -0
  40. package/dist/FormLabel/FormLabel.stories.svelte.d.ts +27 -0
  41. package/{src → dist}/FormLabel/FormLabel.svelte +2 -9
  42. package/dist/FormLabel/FormLabel.svelte.d.ts +9 -0
  43. package/dist/FormLabel/index.js +2 -0
  44. package/dist/Headline/Headline.stories.svelte.d.ts +27 -0
  45. package/{src → dist}/Headline/Headline.svelte +2 -7
  46. package/dist/Headline/Headline.svelte.d.ts +7 -0
  47. package/dist/Headline/index.js +2 -0
  48. package/{src → dist}/HighlightCard/HighlightCard.stories.svelte +7 -9
  49. package/dist/HighlightCard/HighlightCard.stories.svelte.d.ts +19 -0
  50. package/dist/HighlightCard/HighlightCard.svelte +54 -0
  51. package/dist/HighlightCard/HighlightCard.svelte.d.ts +9 -0
  52. package/dist/HighlightCard/index.d.ts +2 -0
  53. package/dist/Input/Input.svelte +32 -0
  54. package/dist/Input/Input.svelte.d.ts +23 -0
  55. package/dist/Input/index.d.ts +2 -0
  56. package/dist/Logotype/Logotype.stories.svelte +14 -0
  57. package/dist/Logotype/Logotype.stories.svelte.d.ts +19 -0
  58. package/dist/Logotype/Logotype.svelte.d.ts +26 -0
  59. package/dist/Middot/Middot.stories.svelte +14 -0
  60. package/dist/Middot/Middot.stories.svelte.d.ts +19 -0
  61. package/dist/Middot/Middot.svelte.d.ts +26 -0
  62. package/dist/Middot/index.d.ts +2 -0
  63. package/dist/Note/Note.stories.svelte.d.ts +27 -0
  64. package/dist/Note/Note.svelte +28 -0
  65. package/dist/Note/Note.svelte.d.ts +7 -0
  66. package/dist/Note/index.js +2 -0
  67. package/{src → dist}/Select/Select.stories.svelte +12 -15
  68. package/dist/Select/Select.stories.svelte.d.ts +19 -0
  69. package/dist/Select/Select.svelte +39 -0
  70. package/dist/Select/Select.svelte.d.ts +4 -0
  71. package/{src/Select/Select.types.ts → dist/Select/Select.types.d.ts} +1 -2
  72. package/dist/Select/Select.types.js +1 -0
  73. package/dist/Select/SelectStoriesTemplate.svelte.d.ts +15 -0
  74. package/dist/Select/index.d.ts +2 -0
  75. package/dist/Switcher/Switcher.stories.svelte.d.ts +27 -0
  76. package/dist/Switcher/Switcher.svelte +111 -0
  77. package/dist/Switcher/Switcher.svelte.d.ts +21 -0
  78. package/dist/Switcher/index.d.ts +2 -0
  79. package/dist/assets/close-circle.svg.svelte.d.ts +26 -0
  80. package/dist/assets/grow.svg.svelte.d.ts +26 -0
  81. package/dist/assets/hand-pointer.svg.svelte.d.ts +26 -0
  82. package/dist/assets/shrink.svg.svelte.d.ts +26 -0
  83. package/dist/assets/tap.svg.svelte.d.ts +26 -0
  84. package/dist/assets/times-circle-solid.svg.svelte.d.ts +26 -0
  85. package/dist/index.d.ts +29 -0
  86. package/dist/maplibre/AttributionControl/AttributionControl.stories.svelte +27 -0
  87. package/dist/maplibre/AttributionControl/AttributionControl.stories.svelte.d.ts +19 -0
  88. package/dist/maplibre/AttributionControl/AttributionControl.svelte +15 -0
  89. package/dist/maplibre/AttributionControl/AttributionControl.svelte.d.ts +8 -0
  90. package/dist/maplibre/AttributionControl/index.d.ts +2 -0
  91. package/dist/maplibre/GeocoderControl/GeocoderAPIs.d.ts +6 -0
  92. package/dist/maplibre/GeocoderControl/GeocoderAPIs.js +40 -0
  93. package/{src → dist}/maplibre/GeocoderControl/GeocoderControl.stories.svelte +10 -14
  94. package/dist/maplibre/GeocoderControl/GeocoderControl.stories.svelte.d.ts +19 -0
  95. package/dist/maplibre/GeocoderControl/GeocoderControl.svelte +25 -0
  96. package/dist/maplibre/GeocoderControl/GeocoderControl.svelte.d.ts +27 -0
  97. package/dist/maplibre/GeocoderControl/index.d.ts +2 -0
  98. package/dist/maplibre/Map/FallbackStyle.d.ts +3 -0
  99. package/dist/maplibre/Map/FallbackStyle.js +15 -0
  100. package/{src → dist}/maplibre/Map/Map.stories.svelte +19 -24
  101. package/dist/maplibre/Map/Map.stories.svelte.d.ts +19 -0
  102. package/dist/maplibre/Map/Map.svelte +91 -0
  103. package/dist/maplibre/Map/Map.svelte.d.ts +23 -0
  104. package/dist/maplibre/Map/index.d.ts +2 -0
  105. package/dist/maplibre/MapControl/MapControl.stories.svelte +46 -0
  106. package/dist/maplibre/MapControl/MapControl.stories.svelte.d.ts +19 -0
  107. package/dist/maplibre/MapControl/MapControl.svelte +29 -0
  108. package/dist/maplibre/MapControl/MapControl.svelte.d.ts +11 -0
  109. package/dist/maplibre/MapControl/index.d.ts +2 -0
  110. package/dist/maplibre/MapStyle/SWRDataLabLight.d.ts +3 -0
  111. package/dist/maplibre/MapStyle/SWRDataLabLight.js +60 -0
  112. package/{src → dist}/maplibre/MapStyle/SWRDataLabLight.stories.svelte +10 -12
  113. package/dist/maplibre/MapStyle/SWRDataLabLight.stories.svelte.d.ts +18 -0
  114. package/dist/maplibre/MapStyle/components/Admin.d.ts +1 -0
  115. package/dist/maplibre/MapStyle/components/Admin.js +170 -0
  116. package/dist/maplibre/MapStyle/components/Buildings.d.ts +1 -0
  117. package/dist/maplibre/MapStyle/components/Buildings.js +21 -0
  118. package/dist/maplibre/MapStyle/components/Landuse.d.ts +1 -0
  119. package/dist/maplibre/MapStyle/components/Landuse.js +497 -0
  120. package/dist/maplibre/MapStyle/components/Natural.d.ts +1 -0
  121. package/dist/maplibre/MapStyle/components/Natural.js +1 -0
  122. package/dist/maplibre/MapStyle/components/PlaceLabels.d.ts +4 -0
  123. package/dist/maplibre/MapStyle/components/PlaceLabels.js +194 -0
  124. package/dist/maplibre/MapStyle/components/Roads.d.ts +8 -0
  125. package/dist/maplibre/MapStyle/components/Roads.js +2327 -0
  126. package/dist/maplibre/MapStyle/components/Transit.d.ts +7 -0
  127. package/dist/maplibre/MapStyle/components/Transit.js +499 -0
  128. package/dist/maplibre/MapStyle/components/Walking.d.ts +1 -0
  129. package/dist/maplibre/MapStyle/components/Walking.js +1530 -0
  130. package/dist/maplibre/MapStyle/index.d.ts +2 -0
  131. package/dist/maplibre/MapStyle/tokens.d.ts +20 -0
  132. package/dist/maplibre/MapStyle/tokens.js +20 -0
  133. package/{src → dist}/maplibre/NavigationControl/NavigationControl.stories.svelte +9 -11
  134. package/dist/maplibre/NavigationControl/NavigationControl.stories.svelte.d.ts +19 -0
  135. package/dist/maplibre/NavigationControl/NavigationControl.svelte +9 -0
  136. package/dist/maplibre/NavigationControl/NavigationControl.svelte.d.ts +12 -0
  137. package/dist/maplibre/NavigationControl/index.d.ts +2 -0
  138. package/{src → dist}/maplibre/ScaleControl/ScaleControl.stories.svelte +10 -13
  139. package/dist/maplibre/ScaleControl/ScaleControl.stories.svelte.d.ts +19 -0
  140. package/dist/maplibre/ScaleControl/ScaleControl.svelte +9 -0
  141. package/dist/maplibre/ScaleControl/ScaleControl.svelte.d.ts +9 -0
  142. package/dist/maplibre/ScaleControl/index.d.ts +2 -0
  143. package/dist/maplibre/Source/MapSource.stories.svelte +7 -0
  144. package/dist/maplibre/Source/MapSource.stories.svelte.d.ts +19 -0
  145. package/dist/maplibre/Source/MapSource.svelte +43 -0
  146. package/dist/maplibre/Source/MapSource.svelte.d.ts +13 -0
  147. package/dist/maplibre/Source/index.d.ts +2 -0
  148. package/dist/maplibre/Source/source.d.ts +28 -0
  149. package/dist/maplibre/Source/source.js +76 -0
  150. package/{src → dist}/maplibre/Tooltip/Tooltip.stories.svelte +17 -23
  151. package/dist/maplibre/Tooltip/Tooltip.stories.svelte.d.ts +19 -0
  152. package/dist/maplibre/Tooltip/Tooltip.svelte +46 -0
  153. package/dist/maplibre/Tooltip/Tooltip.svelte.d.ts +25 -0
  154. package/dist/maplibre/Tooltip/index.d.ts +2 -0
  155. package/{src → dist}/maplibre/VectorLayer/VectorLayer.stories.svelte +11 -14
  156. package/dist/maplibre/VectorLayer/VectorLayer.stories.svelte.d.ts +19 -0
  157. package/dist/maplibre/VectorLayer/VectorLayer.svelte +73 -0
  158. package/dist/maplibre/VectorLayer/VectorLayer.svelte.d.ts +21 -0
  159. package/dist/maplibre/VectorLayer/index.d.ts +2 -0
  160. package/{src → dist}/maplibre/VectorTileSource/VectorTileSource.stories.svelte +11 -13
  161. package/dist/maplibre/VectorTileSource/VectorTileSource.stories.svelte.d.ts +19 -0
  162. package/dist/maplibre/VectorTileSource/VectorTileSource.svelte +13 -0
  163. package/dist/maplibre/VectorTileSource/VectorTileSource.svelte.d.ts +11 -0
  164. package/dist/maplibre/VectorTileSource/index.d.ts +2 -0
  165. package/dist/maplibre/WithLinkLocation/WithLinkLocation.stories.svelte +27 -0
  166. package/dist/maplibre/WithLinkLocation/WithLinkLocation.stories.svelte.d.ts +19 -0
  167. package/dist/maplibre/WithLinkLocation/WithLinkLocation.svelte +44 -0
  168. package/dist/maplibre/WithLinkLocation/WithLinkLocation.svelte.d.ts +19 -0
  169. package/dist/maplibre/WithLinkLocation/index.d.ts +2 -0
  170. package/dist/maplibre/context.svelte.d.ts +33 -0
  171. package/dist/maplibre/context.svelte.js +73 -0
  172. package/{src/maplibre/types.ts → dist/maplibre/types.d.ts} +3 -5
  173. package/dist/maplibre/types.js +1 -0
  174. package/dist/maplibre/utils.d.ts +4 -0
  175. package/dist/maplibre/utils.js +34 -0
  176. package/dist/utils/formatDate.d.ts +5 -0
  177. package/dist/utils/formatNumber.d.ts +18 -0
  178. package/dist/utils/getColorsBetween.d.ts +9 -0
  179. package/dist/utils/getComparisonDiffs.d.ts +6 -0
  180. package/dist/utils/getEmbedContext.d.ts +7 -0
  181. package/dist/utils/getEmbedContext.js +27 -0
  182. package/dist/utils/getLaenderFromTopo.d.ts +10 -0
  183. package/dist/utils/getLaenderNicenameFromAgs.d.ts +7 -0
  184. package/dist/utils/isSvelteComponent.d.ts +7 -0
  185. package/dist/utils/prepareSophoraModel.d.ts +2 -0
  186. package/dist/utils/scrollIntoViewWithOffset.d.ts +7 -0
  187. package/dist/utils/slugify.d.ts +1 -0
  188. package/dist/utils/slugify.js +11 -0
  189. package/dist/utils/topoToGeo.d.ts +7 -0
  190. package/package.json +30 -7
  191. package/.storybook/blocks/Mermaid.jsx +0 -9
  192. package/.storybook/main.ts +0 -34
  193. package/.storybook/preview-head.html +0 -13
  194. package/.storybook/preview.ts +0 -47
  195. package/.storybook/vitest.setup.ts +0 -9
  196. package/src/Autocomplete/Autocomplete.svelte +0 -237
  197. package/src/Button/Button.stories.svelte +0 -21
  198. package/src/Button/Button.svelte +0 -52
  199. package/src/Caption/Caption.svelte +0 -29
  200. package/src/Card/Card.stories.svelte +0 -19
  201. package/src/Card/Card.svelte +0 -34
  202. package/src/ChartFooter/ChartFooter.svelte +0 -46
  203. package/src/Copy/Copy.svelte +0 -29
  204. package/src/DesignTokens/DesignTokens.svelte +0 -71
  205. package/src/DesignTokens/Tokens.ts +0 -186
  206. package/src/HighlightCard/HighlightCard.svelte +0 -65
  207. package/src/Input/Input.svelte +0 -21
  208. package/src/Logotype/Logotype.stories.svelte +0 -16
  209. package/src/Middot/Middot.stories.svelte +0 -16
  210. package/src/Note/Note.svelte +0 -38
  211. package/src/Select/Select.svelte +0 -76
  212. package/src/Switcher/Switcher.svelte +0 -130
  213. package/src/maplibre/AttributionControl/AttributionControl.stories.svelte +0 -29
  214. package/src/maplibre/AttributionControl/AttributionControl.svelte +0 -45
  215. package/src/maplibre/GeocoderControl/GeocoderAPIs.ts +0 -49
  216. package/src/maplibre/GeocoderControl/GeocoderControl.svelte +0 -211
  217. package/src/maplibre/Map/FallbackStyle.ts +0 -18
  218. package/src/maplibre/Map/Map.svelte +0 -287
  219. package/src/maplibre/MapControl/MapControl.stories.svelte +0 -56
  220. package/src/maplibre/MapControl/MapControl.svelte +0 -41
  221. package/src/maplibre/MapStyle/SWRDataLabLight.ts +0 -72
  222. package/src/maplibre/MapStyle/components/Admin.ts +0 -173
  223. package/src/maplibre/MapStyle/components/Buildings.ts +0 -23
  224. package/src/maplibre/MapStyle/components/Landuse.ts +0 -499
  225. package/src/maplibre/MapStyle/components/Natural.ts +0 -1
  226. package/src/maplibre/MapStyle/components/PlaceLabels.ts +0 -199
  227. package/src/maplibre/MapStyle/components/Roads.ts +0 -2345
  228. package/src/maplibre/MapStyle/components/Transit.ts +0 -507
  229. package/src/maplibre/MapStyle/components/Walking.ts +0 -1538
  230. package/src/maplibre/MapStyle/tokens.ts +0 -21
  231. package/src/maplibre/NavigationControl/NavigationControl.svelte +0 -36
  232. package/src/maplibre/ScaleControl/ScaleControl.svelte +0 -25
  233. package/src/maplibre/Source/MapSource.stories.svelte +0 -9
  234. package/src/maplibre/Source/MapSource.svelte +0 -61
  235. package/src/maplibre/Source/source.ts +0 -89
  236. package/src/maplibre/Tooltip/Tooltip.svelte +0 -183
  237. package/src/maplibre/VectorLayer/VectorLayer.svelte +0 -146
  238. package/src/maplibre/VectorTileSource/VectorTileSource.svelte +0 -24
  239. package/src/maplibre/WithLinkLocation/WithLinkLocation.stories.svelte +0 -29
  240. package/src/maplibre/WithLinkLocation/WithLinkLocation.svelte +0 -83
  241. package/src/maplibre/context.svelte.ts +0 -89
  242. package/src/maplibre/utils.ts +0 -52
  243. package/src/utils/getEmbedContext.js +0 -28
  244. package/src/utils/slugify.ts +0 -12
  245. package/static/favicon.png +0 -0
  246. package/svelte.config.js +0 -18
  247. package/tsconfig.json +0 -19
  248. package/vite.config.ts +0 -6
  249. package/vitest.workspace.ts +0 -32
  250. /package/{src → dist}/Autocomplete/Autocomplete.stories.svelte +0 -0
  251. /package/{src → dist}/Autocomplete/index.js +0 -0
  252. /package/{src → dist}/Button/index.js +0 -0
  253. /package/{src → dist}/Caption/Caption.stories.svelte +0 -0
  254. /package/{src/Caption/index.ts → dist/Caption/index.d.ts} +0 -0
  255. /package/{src → dist}/Card/index.js +0 -0
  256. /package/{src → dist}/ChartFooter/ChartFooter.mdx +0 -0
  257. /package/{src → dist}/ChartFooter/ChartFooter.stories.svelte +0 -0
  258. /package/{src → dist}/ChartFooter/index.js +0 -0
  259. /package/{src → dist}/ChartHeader/ChartHeader.mdx +0 -0
  260. /package/{src → dist}/ChartHeader/ChartHeader.stories.svelte +0 -0
  261. /package/{src → dist}/ChartHeader/index.js +0 -0
  262. /package/{src → dist}/ChartList/ChartList.mdx +0 -0
  263. /package/{src → dist}/ChartList/ChartList.stories.svelte +0 -0
  264. /package/{src/ChartList/index.ts → dist/ChartList/index.d.ts} +0 -0
  265. /package/{src → dist}/Copy/Copy.stories.svelte +0 -0
  266. /package/{src/Copy/index.ts → dist/Copy/index.d.ts} +0 -0
  267. /package/{src → dist}/DesignTokens/DesignTokens.mdx +0 -0
  268. /package/{src → dist}/DesignTokens/index.js +0 -0
  269. /package/{src → dist}/FormLabel/FormLabel.mdx +0 -0
  270. /package/{src → dist}/FormLabel/FormLabel.stories.svelte +0 -0
  271. /package/{src/FormLabel/index.ts → dist/FormLabel/index.d.ts} +0 -0
  272. /package/{src → dist}/Headline/Headline.stories.svelte +0 -0
  273. /package/{src/Headline/index.ts → dist/Headline/index.d.ts} +0 -0
  274. /package/{src → dist}/HighlightCard/index.js +0 -0
  275. /package/{src → dist}/Input/index.js +0 -0
  276. /package/{src → dist}/Intro.mdx +0 -0
  277. /package/{src → dist}/Logotype/Logotype.svelte +0 -0
  278. /package/{src → dist}/Middot/Middot.svelte +0 -0
  279. /package/{src → dist}/Middot/index.js +0 -0
  280. /package/{src → dist}/Note/Note.stories.svelte +0 -0
  281. /package/{src/Note/index.ts → dist/Note/index.d.ts} +0 -0
  282. /package/{src → dist}/Select/Select.mdx +0 -0
  283. /package/{src → dist}/Select/SelectStoriesTemplate.svelte +0 -0
  284. /package/{src → dist}/Select/index.js +0 -0
  285. /package/{src → dist}/Select/mock_data/jobs.json +0 -0
  286. /package/{src → dist}/Switcher/Switcher.mdx +0 -0
  287. /package/{src → dist}/Switcher/Switcher.stories.svelte +0 -0
  288. /package/{src → dist}/Switcher/index.js +0 -0
  289. /package/{src → dist}/app.d.ts +0 -0
  290. /package/{src → dist}/app.html +0 -0
  291. /package/{src → dist}/assets/close-circle.svg.svelte +0 -0
  292. /package/{src → dist}/assets/grow.svg.svelte +0 -0
  293. /package/{src → dist}/assets/hand-pointer.svg.svelte +0 -0
  294. /package/{src → dist}/assets/shrink.svg.svelte +0 -0
  295. /package/{src → dist}/assets/tap.svg.svelte +0 -0
  296. /package/{src → dist}/assets/times-circle-solid.svg.svelte +0 -0
  297. /package/{src → dist}/index.js +0 -0
  298. /package/{src → dist}/maplibre/AttributionControl/index.js +0 -0
  299. /package/{src → dist}/maplibre/GeocoderControl/index.js +0 -0
  300. /package/{src → dist}/maplibre/Map/index.js +0 -0
  301. /package/{src → dist}/maplibre/MapControl/MapControl.mdx +0 -0
  302. /package/{src → dist}/maplibre/MapControl/index.js +0 -0
  303. /package/{src → dist}/maplibre/MapStyle/SWRDataLabLight.mdx +0 -0
  304. /package/{src → dist}/maplibre/MapStyle/index.js +0 -0
  305. /package/{src → dist}/maplibre/Maplibre.mdx +0 -0
  306. /package/{src → dist}/maplibre/NavigationControl/index.js +0 -0
  307. /package/{src → dist}/maplibre/ScaleControl/index.js +0 -0
  308. /package/{src → dist}/maplibre/Source/index.js +0 -0
  309. /package/{src → dist}/maplibre/Tooltip/index.js +0 -0
  310. /package/{src → dist}/maplibre/VectorLayer/index.js +0 -0
  311. /package/{src → dist}/maplibre/VectorTileSource/VectorTileSource.mdx +0 -0
  312. /package/{src → dist}/maplibre/VectorTileSource/index.js +0 -0
  313. /package/{src → dist}/maplibre/WithLinkLocation/WithLinkLocation.mdx +0 -0
  314. /package/{src → dist}/maplibre/WithLinkLocation/index.js +0 -0
  315. /package/{src → dist}/styles/base.scss +0 -0
  316. /package/{src → dist}/utils/formatDate.js +0 -0
  317. /package/{src → dist}/utils/formatNumber.js +0 -0
  318. /package/{src → dist}/utils/getColorsBetween.js +0 -0
  319. /package/{src → dist}/utils/getComparisonDiffs.js +0 -0
  320. /package/{src → dist}/utils/getLaenderFromTopo.js +0 -0
  321. /package/{src → dist}/utils/getLaenderNicenameFromAgs.js +0 -0
  322. /package/{src → dist}/utils/isSvelteComponent.js +0 -0
  323. /package/{src → dist}/utils/prepareSophoraModel.js +0 -0
  324. /package/{src → dist}/utils/scrollIntoViewWithOffset.js +0 -0
  325. /package/{src → dist}/utils/topoToGeo.js +0 -0
@@ -1,83 +0,0 @@
1
- <script lang="ts">
2
- import { onMount, setContext, type Snippet } from 'svelte';
3
- import { MaptilerGeocoderAPI } from '../GeocoderControl/GeocoderAPIs';
4
- import {
5
- type GeocodingCountry,
6
- type GeocodingLanguage,
7
- type GeocodingService,
8
- type Location
9
- } from '../types';
10
-
11
- import type {
12
- MaplibreGeocoderApi,
13
- MaplibreGeocoderApiConfig
14
- } from '@maplibre/maplibre-gl-geocoder';
15
-
16
- interface WithLinkLocationProps {
17
- service?: GeocodingService;
18
- /**
19
- * API key for selected geocoding `service`
20
- */
21
- key: string;
22
- /**
23
- * Limit search to one or more countries
24
- */
25
- countries?: GeocodingLanguage | GeocodingCountry[];
26
- languages?: GeocodingLanguage | GeocodingLanguage[];
27
- urlParameter?: string;
28
- children: Snippet;
29
- }
30
-
31
- const {
32
- key,
33
- service = 'maptiler',
34
- countries = 'de',
35
- languages = 'de',
36
- urlParameter = 'location',
37
- children
38
- }: WithLinkLocationProps = $props();
39
-
40
- const countriesArr = Array.isArray(countries) ? countries : [countries];
41
- const languagesArr = Array.isArray(languages) ? languages : [languages];
42
-
43
- let geocoder: MaplibreGeocoderApi;
44
- if (service === 'maptiler') {
45
- geocoder = new MaptilerGeocoderAPI(key);
46
- }
47
-
48
- let location: Location | boolean | undefined = $state();
49
-
50
- function bboxToArea(bbox: [number, number, number, number]) {
51
- return (bbox[2] - bbox[0]) * (bbox[3] - bbox[1]);
52
- }
53
-
54
- onMount(async () => {
55
- const params = new URLSearchParams(window.location.search);
56
- if (params.has(urlParameter)) {
57
- const config: MaplibreGeocoderApiConfig = {
58
- countries: countriesArr.join(','),
59
- language: languagesArr.join(','),
60
- query: params.get(urlParameter)?.toString(),
61
- limit: 1
62
- };
63
- const res = await geocoder.forwardGeocode(config);
64
- if (res.features[0].bbox && res.features[0].geometry.type === 'Point') {
65
- location = {
66
- lat: res.features[0].geometry.coordinates[1],
67
- lng: res.features[0].geometry.coordinates[0],
68
- zoom: 11 - bboxToArea(res.features[0].bbox) * 5.5
69
- };
70
- }
71
- } else {
72
- location = false;
73
- }
74
- });
75
-
76
- $effect.pre(() => {
77
- setContext('initialLocation', location);
78
- });
79
- </script>
80
-
81
- {#if location !== undefined}
82
- {@render children?.()}
83
- {/if}
@@ -1,89 +0,0 @@
1
- import type { Map as MapLibre, Marker, LayerSpecification } from 'maplibre-gl';
2
- import { getContext, setContext } from 'svelte';
3
-
4
- const MAP_CONTEXT_KEY = Symbol.for('map-context');
5
- const SOURCE_CONTEXT_KEY = Symbol.for('source-context');
6
- const LAYER_CONTEXT_KEY = Symbol.for('layer-context');
7
- const POPUP_TARGET_KEY = Symbol.for('popup-target');
8
-
9
- export class Box<T> {
10
- value = $state() as T;
11
-
12
- constructor(initialValue: T) {
13
- this.value = initialValue;
14
- }
15
- }
16
-
17
- export class MapContext {
18
- _map = $state(null) as MapLibre | null;
19
- minzoom = $state(0);
20
- maxzoom = $state(24);
21
- styleLoaded = $state(false);
22
- private _listener?: maplibregl.Listener = undefined;
23
-
24
- get map() {
25
- return this._map;
26
- }
27
-
28
- set map(value: maplibregl.Map | null) {
29
- // Unbind any old event listeners
30
- if (this._listener) {
31
- this._map?.off('styledata', this._listener);
32
- this._listener = undefined;
33
- }
34
- // Set new map instance and bind new event listeners
35
- this._map = value;
36
- if (this._map) {
37
- this._listener = this._onstyledata.bind(this);
38
- this._map.on('styledata', this._listener);
39
- }
40
- }
41
-
42
- private _onstyledata(e: maplibregl.MapStyleDataEvent) {
43
- this.styleLoaded = true;
44
- }
45
- }
46
-
47
- export class SourceContext {
48
- _source = $state();
49
- loaded = $state(false);
50
- minzoom = $state(0);
51
- maxzoom = $state(24);
52
-
53
- get source() {
54
- return this._source;
55
- }
56
- }
57
- export class LayerContext {
58
- layer = $state() as LayerSpecification;
59
- }
60
-
61
- export function setPopupTarget(value: Box<Marker | string | undefined>) {
62
- setContext(POPUP_TARGET_KEY, value);
63
- }
64
-
65
- export function getPopupTarget(): Box<Marker | string> | undefined {
66
- return getContext(POPUP_TARGET_KEY);
67
- }
68
-
69
- export function createMapContext(): MapContext {
70
- return setContext(MAP_CONTEXT_KEY, new MapContext());
71
- }
72
- export function getMapContext(): MapContext {
73
- return getContext(MAP_CONTEXT_KEY);
74
- }
75
-
76
- export function createSourceContext(): SourceContext {
77
- return setContext(SOURCE_CONTEXT_KEY, new SourceContext());
78
- }
79
- export function getSourceContext(): SourceContext {
80
- return getContext(SOURCE_CONTEXT_KEY);
81
- }
82
-
83
- export function getLayerContext(): LayerContext {
84
- return getContext(LAYER_CONTEXT_KEY);
85
- }
86
-
87
- export function setLayerContext(value: string) {
88
- setContext(LAYER_CONTEXT_KEY, value);
89
- }
@@ -1,52 +0,0 @@
1
- // Source: https://github.com/MIERUNE/svelte-maplibre-gl/blob/main/src/lib/maplibre/utils.ts
2
-
3
- import type { Evented, Listener, Map, MapLayerEventType, Popup } from 'maplibre-gl';
4
-
5
- export function resetEventListener(
6
- evented: Evented | null | undefined,
7
- type: string,
8
- listener: Listener | undefined
9
- ) {
10
- if (listener) {
11
- evented?.on(type, listener);
12
- }
13
- const prevListener = listener;
14
- return () => {
15
- if (prevListener) {
16
- evented?.off(type, prevListener);
17
- }
18
- };
19
- }
20
-
21
- export function resetLayerEventListener(
22
- map: Map | null,
23
- type: keyof MapLayerEventType,
24
- layer: string,
25
- listener: Listener | undefined
26
- ) {
27
- if (listener) {
28
- map?.on(type, layer, listener);
29
- }
30
- const prevListener = listener;
31
- return () => {
32
- if (prevListener) {
33
- map?.off(type, layer, prevListener);
34
- }
35
- };
36
- }
37
-
38
- export function resetPopupEventListener(
39
- popup: Popup | null,
40
- type: 'open' | 'close',
41
- listener: Listener | undefined
42
- ) {
43
- if (listener) {
44
- popup?.on(type, listener);
45
- }
46
- const prevListener = listener;
47
- return () => {
48
- if (prevListener) {
49
- popup?.off(type, prevListener);
50
- }
51
- };
52
- }
@@ -1,28 +0,0 @@
1
- /**
2
- * Get current url params or - if on production - params from embed url.
3
- * @param {object} embed root dom element
4
- * @returns {object} url params
5
- */
6
-
7
- const getEmbedContext = (target) => {
8
- let url;
9
- if (
10
- import.meta.env.DEV ||
11
- window.location.origin === 'https://d.swr.de' ||
12
- window.location.origin === 'https://static.datenhub.net' ||
13
- window.location.href.includes('apidata.googleusercontent.com') ||
14
- window.location.href.includes('storage.googleapis.com')
15
- ) {
16
- url = window.location.href;
17
- } else {
18
- const parent = target.parentNode || target.parentNode.parentNode;
19
- url = parent.dataset.url;
20
- }
21
- const data = {};
22
- for (const [key, value] of new URL(url).searchParams) {
23
- data[key] = value;
24
- }
25
- return data;
26
- };
27
-
28
- export default getEmbedContext;
@@ -1,12 +0,0 @@
1
- // Source: https://svelte.dev/playground/b130be5e485441a1842ae97e4ce4f244?version=5.20.0
2
-
3
- export default function slugify(str: string): string {
4
- return str
5
- .replace(/\s+/g, '-')
6
- .replace(/-+/g, '-')
7
- .trim()
8
- .normalize('NFKD')
9
- .replace(/[\u0300-\u036f]/g, '')
10
- .toLowerCase()
11
- .replace(/[^a-z0-9 -]/g, '');
12
- }
Binary file
package/svelte.config.js DELETED
@@ -1,18 +0,0 @@
1
- import adapter from '@sveltejs/adapter-auto';
2
- import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
3
-
4
- /** @type {import('@sveltejs/kit').Config} */
5
- const config = {
6
- // Consult https://kit.svelte.dev/docs/integrations#preprocessors
7
- // for more information about preprocessors
8
- preprocess: vitePreprocess(),
9
-
10
- kit: {
11
- // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
12
- // If your environment is not supported, or you settled on a specific environment, switch out the adapter.
13
- // See https://kit.svelte.dev/docs/adapters for more information about adapters.
14
- adapter: adapter()
15
- }
16
- };
17
-
18
- export default config;
package/tsconfig.json DELETED
@@ -1,19 +0,0 @@
1
- {
2
- "extends": "./.svelte-kit/tsconfig.json",
3
- "compilerOptions": {
4
- "allowJs": true,
5
- "checkJs": true,
6
- "esModuleInterop": true,
7
- "forceConsistentCasingInFileNames": true,
8
- "resolveJsonModule": true,
9
- "skipLibCheck": true,
10
- "sourceMap": true,
11
- "strict": true,
12
- "moduleResolution": "bundler"
13
- }
14
- // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
15
- // except $lib which is handled by https://kit.svelte.dev/docs/configuration#files
16
- //
17
- // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
18
- // from the referenced tsconfig.json - TypeScript does not merge them in
19
- }
package/vite.config.ts DELETED
@@ -1,6 +0,0 @@
1
- import { sveltekit } from '@sveltejs/kit/vite';
2
- import { defineConfig } from 'vite';
3
-
4
- export default defineConfig({
5
- plugins: [sveltekit()]
6
- });
@@ -1,32 +0,0 @@
1
- import path from 'node:path';
2
- import { fileURLToPath } from 'node:url';
3
-
4
- import { defineWorkspace } from 'vitest/config';
5
-
6
- import { storybookTest } from '@storybook/addon-vitest/vitest-plugin';
7
-
8
- const dirname =
9
- typeof __dirname !== 'undefined' ? __dirname : path.dirname(fileURLToPath(import.meta.url));
10
-
11
- // More info at: https://storybook.js.org/docs/writing-tests/test-addon
12
- export default defineWorkspace([
13
- 'vite.config.ts',
14
- {
15
- extends: 'vite.config.ts',
16
- plugins: [
17
- // The plugin will run tests for the stories defined in your Storybook config
18
- // See options at: https://storybook.js.org/docs/writing-tests/test-addon#storybooktest
19
- storybookTest({ configDir: path.join(dirname, '.storybook') })
20
- ],
21
- test: {
22
- name: 'storybook',
23
- browser: {
24
- enabled: true,
25
- headless: true,
26
- name: 'chromium',
27
- provider: 'playwright'
28
- },
29
- setupFiles: ['.storybook/vitest.setup.ts']
30
- }
31
- }
32
- ]);
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes