@panneau/fields 5.0.0-alpha.2 → 5.0.0-alpha.21
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 +186 -20
- package/dist/address/AddressField.css +44 -0
- package/dist/address/AddressField.d.ts +37 -0
- package/dist/address/AddressField.d.ts.map +1 -0
- package/dist/address/AddressField.js +411 -0
- package/dist/address/AddressField.js.map +1 -0
- package/dist/address/AddressField.module.js +22 -0
- package/dist/address/AddressField.module.js.map +1 -0
- package/dist/address/address.d.ts +23 -0
- package/dist/address/address.d.ts.map +1 -0
- package/dist/address/address.js +58 -0
- package/dist/address/address.js.map +1 -0
- package/dist/address/index.d.ts +3 -0
- package/dist/address/index.d.ts.map +1 -0
- package/dist/address/index.js +3 -0
- package/dist/boolean/BooleanField.d.ts +1 -1
- package/dist/boolean/BooleanField.js +78 -17
- package/dist/boolean/BooleanField.js.map +1 -1
- package/dist/boolean/index.d.ts +1 -1
- package/dist/color/ColorField.css +9 -0
- package/dist/color/ColorField.d.ts +12 -5
- package/dist/color/ColorField.d.ts.map +1 -1
- package/dist/color/ColorField.js +341 -81
- package/dist/color/ColorField.js.map +1 -1
- package/dist/color/ColorField.module.js +4 -2
- package/dist/color/ColorField.module.js.map +1 -1
- package/dist/color/index.d.ts +2 -1
- package/dist/color/index.d.ts.map +1 -1
- package/dist/color/index.js +3 -1
- package/dist/color/palette.d.ts +23 -0
- package/dist/color/palette.d.ts.map +1 -0
- package/dist/color/palette.js +34 -0
- package/dist/color/palette.js.map +1 -0
- package/dist/compound/Compound.css +26 -0
- package/dist/compound/Compound.module.js +16 -0
- package/dist/compound/Compound.module.js.map +1 -0
- package/dist/compound/compound.d.ts +56 -0
- package/dist/compound/compound.d.ts.map +1 -0
- package/dist/compound/compound.js +186 -0
- package/dist/compound/compound.js.map +1 -0
- package/dist/country/CountryField.css +42 -0
- package/dist/country/CountryField.d.ts +32 -0
- package/dist/country/CountryField.d.ts.map +1 -0
- package/dist/country/CountryField.js +424 -0
- package/dist/country/CountryField.js.map +1 -0
- package/dist/country/CountryField.module.js +20 -0
- package/dist/country/CountryField.module.js.map +1 -0
- package/dist/country/codes.d.ts +6 -0
- package/dist/country/codes.d.ts.map +1 -0
- package/dist/country/codes.js +261 -0
- package/dist/country/codes.js.map +1 -0
- package/dist/country/countries.d.ts +32 -0
- package/dist/country/countries.d.ts.map +1 -0
- package/dist/country/countries.js +60 -0
- package/dist/country/countries.js.map +1 -0
- package/dist/country/index.d.ts +3 -0
- package/dist/country/index.d.ts.map +1 -0
- package/dist/country/index.js +4 -0
- package/dist/credits/CreditsField.d.ts +15 -0
- package/dist/credits/CreditsField.d.ts.map +1 -0
- package/dist/credits/CreditsField.js +58 -0
- package/dist/credits/CreditsField.js.map +1 -0
- package/dist/credits/credits.d.ts +18 -0
- package/dist/credits/credits.d.ts.map +1 -0
- package/dist/credits/credits.js +33 -0
- package/dist/credits/credits.js.map +1 -0
- package/dist/credits/index.d.ts +5 -0
- package/dist/credits/index.d.ts.map +1 -0
- package/dist/credits/index.js +3 -0
- package/dist/date/DateField.d.ts +1 -1
- package/dist/date/DateField.js.map +1 -1
- package/dist/date/index.d.ts +1 -1
- package/dist/daterange/DateRangeField.css +9 -0
- package/dist/daterange/DateRangeField.d.ts +31 -0
- package/dist/daterange/DateRangeField.d.ts.map +1 -0
- package/dist/daterange/DateRangeField.js +372 -0
- package/dist/daterange/DateRangeField.js.map +1 -0
- package/dist/daterange/DateRangeField.module.js +12 -0
- package/dist/daterange/DateRangeField.module.js.map +1 -0
- package/dist/daterange/index.d.ts +3 -0
- package/dist/daterange/index.d.ts.map +1 -0
- package/dist/daterange/index.js +3 -0
- package/dist/daterange/range.d.ts +61 -0
- package/dist/daterange/range.d.ts.map +1 -0
- package/dist/daterange/range.js +119 -0
- package/dist/daterange/range.js.map +1 -0
- package/dist/datetime/DateTimeField.d.ts +1 -1
- package/dist/datetime/DateTimeField.js +107 -20
- package/dist/datetime/DateTimeField.js.map +1 -1
- package/dist/datetime/index.d.ts +1 -1
- package/dist/duration/DurationField.css +11 -0
- package/dist/duration/DurationField.d.ts +67 -0
- package/dist/duration/DurationField.d.ts.map +1 -0
- package/dist/duration/DurationField.js +260 -0
- package/dist/duration/DurationField.js.map +1 -0
- package/dist/duration/DurationField.module.js +12 -0
- package/dist/duration/DurationField.module.js.map +1 -0
- package/dist/duration/index.d.ts +2 -0
- package/dist/duration/index.d.ts.map +1 -0
- package/dist/duration/index.js +1 -0
- package/dist/email/EmailField.d.ts +2 -2
- package/dist/email/EmailField.js.map +1 -1
- package/dist/email/index.d.ts +1 -1
- package/dist/embed/EmbedField.css +60 -0
- package/dist/embed/EmbedField.d.ts +29 -0
- package/dist/embed/EmbedField.d.ts.map +1 -0
- package/dist/embed/EmbedField.js +309 -0
- package/dist/embed/EmbedField.js.map +1 -0
- package/dist/embed/EmbedField.module.js +22 -0
- package/dist/embed/EmbedField.module.js.map +1 -0
- package/dist/embed/index.d.ts +3 -0
- package/dist/embed/index.d.ts.map +1 -0
- package/dist/embed/index.js +3 -0
- package/dist/file/FileField.css +54 -0
- package/dist/file/FileField.d.ts +50 -0
- package/dist/file/FileField.d.ts.map +1 -0
- package/dist/file/FileField.js +288 -0
- package/dist/file/FileField.js.map +1 -0
- package/dist/file/FileField.module.js +22 -0
- package/dist/file/FileField.module.js.map +1 -0
- package/dist/file/index.d.ts +3 -0
- package/dist/file/index.d.ts.map +1 -0
- package/dist/file/index.js +1 -0
- package/dist/group/GroupField.css +20 -3
- package/dist/group/GroupField.d.ts +10 -4
- package/dist/group/GroupField.d.ts.map +1 -1
- package/dist/group/GroupField.js +71 -66
- package/dist/group/GroupField.js.map +1 -1
- package/dist/group/GroupField.module.js +10 -2
- package/dist/group/GroupField.module.js.map +1 -1
- package/dist/group/index.d.ts +1 -1
- package/dist/index.d.ts +21 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -2
- package/dist/json/JsonField.css +7 -0
- package/dist/json/JsonField.d.ts +22 -0
- package/dist/json/JsonField.d.ts.map +1 -0
- package/dist/json/JsonField.js +207 -0
- package/dist/json/JsonField.js.map +1 -0
- package/dist/json/JsonField.module.js +8 -0
- package/dist/json/JsonField.module.js.map +1 -0
- package/dist/json/index.d.ts +2 -0
- package/dist/json/index.d.ts.map +1 -0
- package/dist/json/index.js +1 -0
- package/dist/link/LinkField.css +12 -0
- package/dist/link/LinkField.d.ts +38 -0
- package/dist/link/LinkField.d.ts.map +1 -0
- package/dist/link/LinkField.js +742 -0
- package/dist/link/LinkField.js.map +1 -0
- package/dist/link/LinkField.module.js +8 -0
- package/dist/link/LinkField.module.js.map +1 -0
- package/dist/link/index.d.ts +3 -0
- package/dist/link/index.d.ts.map +1 -0
- package/dist/link/index.js +3 -0
- package/dist/link/link.d.ts +30 -0
- package/dist/link/link.d.ts.map +1 -0
- package/dist/link/link.js +63 -0
- package/dist/link/link.js.map +1 -0
- package/dist/link/pages.d.ts +17 -0
- package/dist/link/pages.d.ts.map +1 -0
- package/dist/link/pages.js +104 -0
- package/dist/link/pages.js.map +1 -0
- package/dist/locales/index.js.map +1 -1
- package/dist/localized/LocalizedField.css +27 -6
- package/dist/localized/LocalizedField.d.ts +19 -8
- package/dist/localized/LocalizedField.d.ts.map +1 -1
- package/dist/localized/LocalizedField.js +238 -105
- package/dist/localized/LocalizedField.js.map +1 -1
- package/dist/localized/LocalizedField.module.js +10 -4
- package/dist/localized/LocalizedField.module.js.map +1 -1
- package/dist/localized/index.d.ts +1 -1
- package/dist/location/LocationField.css +54 -0
- package/dist/location/LocationField.d.ts +31 -0
- package/dist/location/LocationField.d.ts.map +1 -0
- package/dist/location/LocationField.js +487 -0
- package/dist/location/LocationField.js.map +1 -0
- package/dist/location/LocationField.module.js +22 -0
- package/dist/location/LocationField.module.js.map +1 -0
- package/dist/location/LocationMap.d.ts +25 -0
- package/dist/location/LocationMap.d.ts.map +1 -0
- package/dist/location/LocationMap.js +205 -0
- package/dist/location/LocationMap.js.map +1 -0
- package/dist/location/index.d.ts +5 -0
- package/dist/location/index.d.ts.map +1 -0
- package/dist/location/index.js +4 -0
- package/dist/location/leafletCss.d.ts +2 -0
- package/dist/location/leafletCss.d.ts.map +1 -0
- package/dist/location/leafletCss.js +6 -0
- package/dist/location/leafletCss.js.map +1 -0
- package/dist/location/nominatim.d.ts +23 -0
- package/dist/location/nominatim.d.ts.map +1 -0
- package/dist/location/nominatim.js +79 -0
- package/dist/location/nominatim.js.map +1 -0
- package/dist/location/search.d.ts +10 -0
- package/dist/location/search.d.ts.map +1 -0
- package/dist/location/search.js +83 -0
- package/dist/location/search.js.map +1 -0
- package/dist/location/types.d.ts +46 -0
- package/dist/location/types.d.ts.map +1 -0
- package/dist/missing/MissingField.d.ts +4 -3
- package/dist/missing/MissingField.d.ts.map +1 -1
- package/dist/missing/MissingField.js +3 -2
- package/dist/missing/MissingField.js.map +1 -1
- package/dist/money/MoneyField.d.ts +28 -0
- package/dist/money/MoneyField.d.ts.map +1 -0
- package/dist/money/MoneyField.js +269 -0
- package/dist/money/MoneyField.js.map +1 -0
- package/dist/money/index.d.ts +3 -0
- package/dist/money/index.d.ts.map +1 -0
- package/dist/money/index.js +3 -0
- package/dist/money/money.d.ts +27 -0
- package/dist/money/money.d.ts.map +1 -0
- package/dist/money/money.js +56 -0
- package/dist/money/money.js.map +1 -0
- package/dist/number/NumberField.d.ts +1 -1
- package/dist/number/NumberField.js.map +1 -1
- package/dist/number/index.d.ts +1 -1
- package/dist/range/RangeField.d.ts +22 -0
- package/dist/range/RangeField.d.ts.map +1 -0
- package/dist/range/RangeField.js +203 -0
- package/dist/range/RangeField.js.map +1 -0
- package/dist/range/index.d.ts +2 -0
- package/dist/range/index.d.ts.map +1 -0
- package/dist/range/index.js +1 -0
- package/dist/region/RegionField.d.ts +23 -0
- package/dist/region/RegionField.d.ts.map +1 -0
- package/dist/region/RegionField.js +174 -0
- package/dist/region/RegionField.js.map +1 -0
- package/dist/region/RegionFlag.css +9 -0
- package/dist/region/RegionFlag.d.ts +20 -0
- package/dist/region/RegionFlag.d.ts.map +1 -0
- package/dist/region/RegionFlag.js +61 -0
- package/dist/region/RegionFlag.js.map +1 -0
- package/dist/region/RegionFlag.module.js +8 -0
- package/dist/region/RegionFlag.module.js.map +1 -0
- package/dist/region/data.d.ts +5 -0
- package/dist/region/data.d.ts.map +1 -0
- package/dist/region/data.js +513 -0
- package/dist/region/data.js.map +1 -0
- package/dist/region/flags/CA.d.ts +4 -0
- package/dist/region/flags/CA.d.ts.map +1 -0
- package/dist/region/flags/CA.js +21 -0
- package/dist/region/flags/CA.js.map +1 -0
- package/dist/region/flags/US.d.ts +4 -0
- package/dist/region/flags/US.d.ts.map +1 -0
- package/dist/region/flags/US.js +65 -0
- package/dist/region/flags/US.js.map +1 -0
- package/dist/region/flags.d.ts +17 -0
- package/dist/region/flags.d.ts.map +1 -0
- package/dist/region/flags.js +84 -0
- package/dist/region/flags.js.map +1 -0
- package/dist/region/index.d.ts +5 -0
- package/dist/region/index.d.ts.map +1 -0
- package/dist/region/index.js +5 -0
- package/dist/region/regions.d.ts +15 -0
- package/dist/region/regions.d.ts.map +1 -0
- package/dist/region/regions.js +29 -0
- package/dist/region/regions.js.map +1 -0
- package/dist/relation/RelationField.d.ts +2 -2
- package/dist/relation/RelationField.d.ts.map +1 -1
- package/dist/relation/RelationField.js +511 -171
- package/dist/relation/RelationField.js.map +1 -1
- package/dist/relation/index.d.ts +2 -2
- package/dist/repeater/RepeaterField.d.ts +13 -2
- package/dist/repeater/RepeaterField.d.ts.map +1 -1
- package/dist/repeater/RepeaterField.js +138 -50
- package/dist/repeater/RepeaterField.js.map +1 -1
- package/dist/repeater/index.d.ts +1 -1
- package/dist/select/SelectField.d.ts +1 -1
- package/dist/select/SelectField.js.map +1 -1
- package/dist/select/index.d.ts +1 -1
- package/dist/sessions/SessionsField.d.ts +15 -0
- package/dist/sessions/SessionsField.d.ts.map +1 -0
- package/dist/sessions/SessionsField.js +49 -0
- package/dist/sessions/SessionsField.js.map +1 -0
- package/dist/sessions/index.d.ts +4 -0
- package/dist/sessions/index.d.ts.map +1 -0
- package/dist/sessions/index.js +1 -0
- package/dist/shared/CodeComboBox.d.ts +21 -0
- package/dist/shared/CodeComboBox.d.ts.map +1 -0
- package/dist/shared/CodeComboBox.js +238 -0
- package/dist/shared/CodeComboBox.js.map +1 -0
- package/dist/shared/DefinitionField.d.ts +9 -4
- package/dist/shared/DefinitionField.d.ts.map +1 -1
- package/dist/shared/DefinitionField.js +98 -78
- package/dist/shared/DefinitionField.js.map +1 -1
- package/dist/shared/builtIn.d.ts +7 -3
- package/dist/shared/builtIn.d.ts.map +1 -1
- package/dist/shared/builtIn.js +39 -7
- package/dist/shared/builtIn.js.map +1 -1
- package/dist/shared/check.d.ts +27 -0
- package/dist/shared/check.d.ts.map +1 -0
- package/dist/shared/check.js +18 -0
- package/dist/shared/check.js.map +1 -0
- package/dist/shared/context.d.ts +33 -5
- package/dist/shared/context.d.ts.map +1 -1
- package/dist/shared/context.js +36 -20
- package/dist/shared/context.js.map +1 -1
- package/dist/shared/cx.js.map +1 -1
- package/dist/shared/dates.js +2 -2
- package/dist/shared/dates.js.map +1 -1
- package/dist/shared/embed.d.ts +19 -0
- package/dist/shared/embed.d.ts.map +1 -0
- package/dist/shared/embed.js +14 -0
- package/dist/shared/embed.js.map +1 -0
- package/dist/shared/entry.d.ts +13 -4
- package/dist/shared/entry.d.ts.map +1 -1
- package/dist/shared/entry.js +24 -7
- package/dist/shared/entry.js.map +1 -1
- package/dist/shared/flow.d.ts +8 -0
- package/dist/shared/flow.d.ts.map +1 -0
- package/dist/shared/flow.js +38 -0
- package/dist/shared/flow.js.map +1 -0
- package/dist/shared/part.d.ts +26 -0
- package/dist/shared/part.d.ts.map +1 -0
- package/dist/shared/part.js +64 -0
- package/dist/shared/part.js.map +1 -0
- package/dist/shared/relation.js.map +1 -1
- package/dist/shared/reveal.d.ts +16 -0
- package/dist/shared/reveal.d.ts.map +1 -0
- package/dist/shared/reveal.js +46 -0
- package/dist/shared/reveal.js.map +1 -0
- package/dist/shared/types.d.ts +12 -0
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/slug/SlugField.css +18 -0
- package/dist/slug/SlugField.d.ts +33 -5
- package/dist/slug/SlugField.d.ts.map +1 -1
- package/dist/slug/SlugField.js +346 -126
- package/dist/slug/SlugField.js.map +1 -1
- package/dist/slug/SlugField.module.js +14 -0
- package/dist/slug/SlugField.module.js.map +1 -0
- package/dist/slug/index.d.ts +1 -1
- package/dist/slug/index.d.ts.map +1 -1
- package/dist/slug/index.js +1 -1
- package/dist/tags/TagsField.d.ts +17 -0
- package/dist/tags/TagsField.d.ts.map +1 -0
- package/dist/tags/TagsField.js +120 -0
- package/dist/tags/TagsField.js.map +1 -0
- package/dist/tags/index.d.ts +2 -0
- package/dist/tags/index.d.ts.map +1 -0
- package/dist/tags/index.js +1 -0
- package/dist/tel/TelField.css +25 -0
- package/dist/tel/TelField.d.ts +34 -0
- package/dist/tel/TelField.d.ts.map +1 -0
- package/dist/tel/TelField.js +390 -0
- package/dist/tel/TelField.js.map +1 -0
- package/dist/tel/TelField.module.js +12 -0
- package/dist/tel/TelField.module.js.map +1 -0
- package/dist/tel/index.d.ts +3 -0
- package/dist/tel/index.d.ts.map +1 -0
- package/dist/tel/index.js +3 -0
- package/dist/tel/phone.d.ts +59 -0
- package/dist/tel/phone.d.ts.map +1 -0
- package/dist/tel/phone.js +107 -0
- package/dist/tel/phone.js.map +1 -0
- package/dist/text/TextField.d.ts +12 -4
- package/dist/text/TextField.d.ts.map +1 -1
- package/dist/text/TextField.js +104 -60
- package/dist/text/TextField.js.map +1 -1
- package/dist/text/index.d.ts +1 -1
- package/dist/textarea/TextAreaField.d.ts +1 -1
- package/dist/textarea/TextAreaField.js.map +1 -1
- package/dist/textarea/index.d.ts +1 -1
- package/dist/time/TimeField.d.ts +1 -1
- package/dist/time/TimeField.js +64 -10
- package/dist/time/TimeField.js.map +1 -1
- package/dist/time/index.d.ts +1 -1
- package/dist/upload/FilePicker.css +24 -0
- package/dist/upload/FilePicker.d.ts +14 -0
- package/dist/upload/FilePicker.d.ts.map +1 -0
- package/dist/upload/FilePicker.js +130 -0
- package/dist/upload/FilePicker.js.map +1 -0
- package/dist/upload/FilePicker.module.js +12 -0
- package/dist/upload/FilePicker.module.js.map +1 -0
- package/dist/upload/UploadList.css +93 -0
- package/dist/upload/UploadList.d.ts +18 -0
- package/dist/upload/UploadList.d.ts.map +1 -0
- package/dist/upload/UploadList.js +144 -0
- package/dist/upload/UploadList.js.map +1 -0
- package/dist/upload/UploadList.module.js +32 -0
- package/dist/upload/UploadList.module.js.map +1 -0
- package/dist/upload/files.d.ts +5 -0
- package/dist/upload/files.d.ts.map +1 -0
- package/dist/upload/files.js +26 -0
- package/dist/upload/files.js.map +1 -0
- package/dist/upload/types.d.ts +58 -0
- package/dist/upload/types.d.ts.map +1 -0
- package/dist/upload/useRejectionMessage.d.ts +4 -0
- package/dist/upload/useRejectionMessage.d.ts.map +1 -0
- package/dist/upload/useRejectionMessage.js +25 -0
- package/dist/upload/useRejectionMessage.js.map +1 -0
- package/dist/upload/useUploads.d.ts +30 -0
- package/dist/upload/useUploads.d.ts.map +1 -0
- package/dist/upload/useUploads.js +115 -0
- package/dist/upload/useUploads.js.map +1 -0
- package/dist/uppy/index.d.ts +3 -0
- package/dist/uppy/index.d.ts.map +1 -0
- package/dist/uppy/index.js +1 -0
- package/dist/uppy/uploader.d.ts +44 -0
- package/dist/uppy/uploader.d.ts.map +1 -0
- package/dist/uppy/uploader.js +139 -0
- package/dist/uppy/uploader.js.map +1 -0
- package/dist/url/UrlField.d.ts +2 -2
- package/dist/url/UrlField.d.ts.map +1 -1
- package/dist/url/UrlField.js +69 -14
- package/dist/url/UrlField.js.map +1 -1
- package/dist/url/index.d.ts +1 -1
- package/package.json +110 -7
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import LocationField_module_default from "./LocationField.module.js";
|
|
2
|
+
import { LEAFLET_CSS } from "./leafletCss.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { useEffect, useEffectEvent, useRef } from "react";
|
|
6
|
+
//#region src/location/LocationMap.tsx
|
|
7
|
+
var STYLE_ID = "panneau-leaflet-css";
|
|
8
|
+
/** Loads Leaflet, outside the component: the React Compiler doesn't handle `import()`. */
|
|
9
|
+
async function loadLeaflet() {
|
|
10
|
+
const module = await import("leaflet");
|
|
11
|
+
return module.default ?? module;
|
|
12
|
+
}
|
|
13
|
+
/** Adds Leaflet's stylesheet to the document of the map, once. */
|
|
14
|
+
function injectStyles(document) {
|
|
15
|
+
if (document.getElementById(STYLE_ID) === null) {
|
|
16
|
+
const style = document.createElement("style");
|
|
17
|
+
style.id = STYLE_ID;
|
|
18
|
+
style.textContent = LEAFLET_CSS;
|
|
19
|
+
document.head.append(style);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A Leaflet map with a marker on the point. Clicking the map or dragging the marker moves the
|
|
24
|
+
* point. Leaflet and its stylesheet load when the map first shows.
|
|
25
|
+
*/
|
|
26
|
+
function LocationMap(t0) {
|
|
27
|
+
const $ = c(34);
|
|
28
|
+
const { point, onChange, tiles, center, zoom, readOnly: t1, label, className } = t0;
|
|
29
|
+
const readOnly = t1 === void 0 ? false : t1;
|
|
30
|
+
const container = useRef(null);
|
|
31
|
+
const map = useRef(null);
|
|
32
|
+
let t2;
|
|
33
|
+
if ($[0] !== onChange || $[1] !== readOnly) {
|
|
34
|
+
t2 = {
|
|
35
|
+
onChange,
|
|
36
|
+
readOnly
|
|
37
|
+
};
|
|
38
|
+
$[0] = onChange;
|
|
39
|
+
$[1] = readOnly;
|
|
40
|
+
$[2] = t2;
|
|
41
|
+
} else t2 = $[2];
|
|
42
|
+
const latest = useRef(t2);
|
|
43
|
+
let t3;
|
|
44
|
+
if ($[3] !== onChange || $[4] !== readOnly) {
|
|
45
|
+
t3 = () => {
|
|
46
|
+
latest.current = {
|
|
47
|
+
onChange,
|
|
48
|
+
readOnly
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
$[3] = onChange;
|
|
52
|
+
$[4] = readOnly;
|
|
53
|
+
$[5] = t3;
|
|
54
|
+
} else t3 = $[5];
|
|
55
|
+
useEffect(t3);
|
|
56
|
+
let t4;
|
|
57
|
+
if ($[6] !== zoom) {
|
|
58
|
+
t4 = function sync(next, pan) {
|
|
59
|
+
const current = map.current;
|
|
60
|
+
if (current === null) return;
|
|
61
|
+
if (next === null) {
|
|
62
|
+
current.marker?.remove();
|
|
63
|
+
current.marker = null;
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (current.marker === null) {
|
|
67
|
+
const marker = current.leaflet.marker(next, {
|
|
68
|
+
draggable: !latest.current.readOnly,
|
|
69
|
+
keyboard: false,
|
|
70
|
+
icon: current.leaflet.divIcon({
|
|
71
|
+
className: LocationField_module_default.marker,
|
|
72
|
+
html: `<span class="${LocationField_module_default.pin}"></span>`,
|
|
73
|
+
iconSize: [24, 24],
|
|
74
|
+
iconAnchor: [12, 29]
|
|
75
|
+
})
|
|
76
|
+
}).addTo(current.map);
|
|
77
|
+
marker.on("dragend", () => {
|
|
78
|
+
const position = marker.getLatLng();
|
|
79
|
+
latest.current.onChange?.({
|
|
80
|
+
lat: position.lat,
|
|
81
|
+
lng: position.lng
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
current.marker = marker;
|
|
85
|
+
} else current.marker.setLatLng(next);
|
|
86
|
+
if (pan && !current.map.getBounds().contains(next)) current.map.setView(next, Math.max(current.map.getZoom(), zoom));
|
|
87
|
+
};
|
|
88
|
+
$[6] = zoom;
|
|
89
|
+
$[7] = t4;
|
|
90
|
+
} else t4 = $[7];
|
|
91
|
+
const sync = t4;
|
|
92
|
+
let t5;
|
|
93
|
+
if ($[8] !== center || $[9] !== point || $[10] !== sync || $[11] !== tiles.attribution || $[12] !== tiles.maxZoom || $[13] !== zoom) {
|
|
94
|
+
t5 = (leaflet, element, url) => {
|
|
95
|
+
injectStyles(element.ownerDocument);
|
|
96
|
+
const instance = leaflet.map(element, { attributionControl: true });
|
|
97
|
+
leaflet.tileLayer(url, {
|
|
98
|
+
attribution: tiles.attribution,
|
|
99
|
+
maxZoom: tiles.maxZoom ?? 19
|
|
100
|
+
}).addTo(instance);
|
|
101
|
+
instance.on("click", (event) => {
|
|
102
|
+
if (!latest.current.readOnly) latest.current.onChange?.({
|
|
103
|
+
lat: event.latlng.lat,
|
|
104
|
+
lng: event.latlng.lng
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
map.current = {
|
|
108
|
+
leaflet,
|
|
109
|
+
map: instance,
|
|
110
|
+
marker: null
|
|
111
|
+
};
|
|
112
|
+
instance.setView(point ?? center, point !== null ? zoom : 2);
|
|
113
|
+
sync(point, false);
|
|
114
|
+
};
|
|
115
|
+
$[8] = center;
|
|
116
|
+
$[9] = point;
|
|
117
|
+
$[10] = sync;
|
|
118
|
+
$[11] = tiles.attribution;
|
|
119
|
+
$[12] = tiles.maxZoom;
|
|
120
|
+
$[13] = zoom;
|
|
121
|
+
$[14] = t5;
|
|
122
|
+
} else t5 = $[14];
|
|
123
|
+
const create = useEffectEvent(t5);
|
|
124
|
+
const url_0 = tiles.url;
|
|
125
|
+
let t6;
|
|
126
|
+
if ($[15] !== create || $[16] !== url_0) {
|
|
127
|
+
t6 = () => {
|
|
128
|
+
const element_0 = container.current;
|
|
129
|
+
if (element_0 === null) return;
|
|
130
|
+
let cancelled = false;
|
|
131
|
+
loadLeaflet().then((leaflet_0) => {
|
|
132
|
+
if (!cancelled) create(leaflet_0, element_0, url_0);
|
|
133
|
+
});
|
|
134
|
+
return () => {
|
|
135
|
+
cancelled = true;
|
|
136
|
+
map.current?.map.remove();
|
|
137
|
+
map.current = null;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
$[15] = create;
|
|
141
|
+
$[16] = url_0;
|
|
142
|
+
$[17] = t6;
|
|
143
|
+
} else t6 = $[17];
|
|
144
|
+
let t7;
|
|
145
|
+
if ($[18] !== url_0) {
|
|
146
|
+
t7 = [url_0];
|
|
147
|
+
$[18] = url_0;
|
|
148
|
+
$[19] = t7;
|
|
149
|
+
} else t7 = $[19];
|
|
150
|
+
useEffect(t6, t7);
|
|
151
|
+
const lat = point?.lat;
|
|
152
|
+
const lng = point?.lng;
|
|
153
|
+
let t8;
|
|
154
|
+
if ($[20] !== sync) {
|
|
155
|
+
t8 = (next_0) => sync(next_0, true);
|
|
156
|
+
$[20] = sync;
|
|
157
|
+
$[21] = t8;
|
|
158
|
+
} else t8 = $[21];
|
|
159
|
+
const show = useEffectEvent(t8);
|
|
160
|
+
let t9;
|
|
161
|
+
if ($[22] !== lat || $[23] !== lng || $[24] !== show) {
|
|
162
|
+
t9 = () => {
|
|
163
|
+
show(lat !== void 0 && lng !== void 0 ? {
|
|
164
|
+
lat,
|
|
165
|
+
lng
|
|
166
|
+
} : null);
|
|
167
|
+
};
|
|
168
|
+
$[22] = lat;
|
|
169
|
+
$[23] = lng;
|
|
170
|
+
$[24] = show;
|
|
171
|
+
$[25] = t9;
|
|
172
|
+
} else t9 = $[25];
|
|
173
|
+
let t10;
|
|
174
|
+
if ($[26] !== lat || $[27] !== lng) {
|
|
175
|
+
t10 = [lat, lng];
|
|
176
|
+
$[26] = lat;
|
|
177
|
+
$[27] = lng;
|
|
178
|
+
$[28] = t10;
|
|
179
|
+
} else t10 = $[28];
|
|
180
|
+
useEffect(t9, t10);
|
|
181
|
+
let t11;
|
|
182
|
+
if ($[29] !== className) {
|
|
183
|
+
t11 = [LocationField_module_default.map, className].filter(Boolean);
|
|
184
|
+
$[29] = className;
|
|
185
|
+
$[30] = t11;
|
|
186
|
+
} else t11 = $[30];
|
|
187
|
+
const t12 = t11.join(" ");
|
|
188
|
+
let t13;
|
|
189
|
+
if ($[31] !== label || $[32] !== t12) {
|
|
190
|
+
t13 = /* @__PURE__ */ jsx("div", {
|
|
191
|
+
ref: container,
|
|
192
|
+
className: t12,
|
|
193
|
+
role: "application",
|
|
194
|
+
"aria-label": label
|
|
195
|
+
});
|
|
196
|
+
$[31] = label;
|
|
197
|
+
$[32] = t12;
|
|
198
|
+
$[33] = t13;
|
|
199
|
+
} else t13 = $[33];
|
|
200
|
+
return t13;
|
|
201
|
+
}
|
|
202
|
+
//#endregion
|
|
203
|
+
export { LocationMap };
|
|
204
|
+
|
|
205
|
+
//# sourceMappingURL=LocationMap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocationMap.js","names":["LeafletModule","useEffect","useEffectEvent","useRef","styles","LEAFLET_CSS","MapTiles","Leaflet","LeafletMap","Map","LeafletMarker","Marker","STYLE_ID","loadLeaflet","Promise","module","default","injectStyles","document","Document","getElementById","style","createElement","id","textContent","head","append","Point","lat","lng","LocationMapProps","point","onChange","tiles","center","zoom","readOnly","label","className","LocationMap","t0","$","_c","t1","undefined","container","map","t2","latest","t3","current","t4","sync","next","pan","marker","remove","leaflet","draggable","keyboard","icon","divIcon","html","pin","iconSize","iconAnchor","addTo","on","position","getLatLng","setLatLng","getBounds","contains","setView","Math","max","getZoom","t5","attribution","maxZoom","element","url","ownerDocument","instance","attributionControl","tileLayer","event","latlng","create","url_0","t6","element_0","cancelled","then","leaflet_0","t7","t8","next_0","show","t9","t10","t11","filter","Boolean","t12","join","t13","_c","styles"],"sources":["../../src/location/LocationMap.tsx"],"sourcesContent":["import type * as LeafletModule from 'leaflet';\nimport { useEffect, useEffectEvent, useRef } from 'react';\n\nimport styles from './LocationField.module.css';\nimport { LEAFLET_CSS } from './leafletCss';\nimport type { MapTiles } from './types';\n\ntype Leaflet = typeof LeafletModule;\ntype LeafletMap = LeafletModule.Map;\ntype LeafletMarker = LeafletModule.Marker;\n\nconst STYLE_ID = 'panneau-leaflet-css';\n\n/** Loads Leaflet, outside the component: the React Compiler doesn't handle `import()`. */\nasync function loadLeaflet(): Promise<Leaflet> {\n const module = await import('leaflet');\n return ((module as { default?: Leaflet }).default ?? module) as Leaflet;\n}\n\n/** Adds Leaflet's stylesheet to the document of the map, once. */\nfunction injectStyles(document: Document) {\n if (document.getElementById(STYLE_ID) === null) {\n const style = document.createElement('style');\n style.id = STYLE_ID;\n style.textContent = LEAFLET_CSS;\n document.head.append(style);\n }\n}\n\nexport interface Point {\n lat: number;\n lng: number;\n}\n\nexport interface LocationMapProps {\n point: Point | null;\n /** Called with the point clicked, or where the marker was dropped. */\n onChange?: (point: Point) => void;\n tiles: MapTiles;\n /** Where the map opens without a point. */\n center: Point;\n /** Zoom of the map on a point; the map opens wider without one. */\n zoom: number;\n readOnly?: boolean;\n /** Accessible name of the map. */\n label: string;\n className?: string;\n}\n\n/**\n * A Leaflet map with a marker on the point. Clicking the map or dragging the marker moves the\n * point. Leaflet and its stylesheet load when the map first shows.\n */\nexport function LocationMap({\n point,\n onChange,\n tiles,\n center,\n zoom,\n readOnly = false,\n label,\n className,\n}: LocationMapProps) {\n const container = useRef<HTMLDivElement>(null);\n const map = useRef<{ leaflet: Leaflet; map: LeafletMap; marker: LeafletMarker | null } | null>(\n null,\n );\n // The latest values, for the handlers of the map\n const latest = useRef({ onChange, readOnly });\n useEffect(() => {\n latest.current = { onChange, readOnly };\n });\n\n /** Puts the marker on the point, and the point in view. */\n function sync(next: Point | null, pan: boolean) {\n const current = map.current;\n if (current === null) {\n return;\n }\n if (next === null) {\n current.marker?.remove();\n current.marker = null;\n return;\n }\n if (current.marker === null) {\n const marker = current.leaflet\n .marker(next, {\n draggable: !latest.current.readOnly,\n keyboard: false,\n icon: current.leaflet.divIcon({\n className: styles.marker,\n // Leaflet places the icon with `transform`: the pin turns inside it\n html: `<span class=\"${styles.pin}\"></span>`,\n iconSize: [24, 24],\n iconAnchor: [12, 29],\n }),\n })\n .addTo(current.map);\n marker.on('dragend', () => {\n const position = marker.getLatLng();\n latest.current.onChange?.({ lat: position.lat, lng: position.lng });\n });\n current.marker = marker;\n } else {\n current.marker.setLatLng(next);\n }\n if (pan && !current.map.getBounds().contains(next)) {\n current.map.setView(next, Math.max(current.map.getZoom(), zoom));\n }\n }\n\n // Creates the map once Leaflet is loaded, with the latest props. It is made again for other\n // tiles only: later points go through the effect below.\n const create = useEffectEvent((leaflet: Leaflet, element: HTMLDivElement, url: string) => {\n injectStyles(element.ownerDocument);\n const instance = leaflet.map(element, { attributionControl: true });\n leaflet\n .tileLayer(url, {\n attribution: tiles.attribution,\n maxZoom: tiles.maxZoom ?? 19,\n })\n .addTo(instance);\n instance.on('click', (event) => {\n if (!latest.current.readOnly) {\n latest.current.onChange?.({ lat: event.latlng.lat, lng: event.latlng.lng });\n }\n });\n map.current = { leaflet, map: instance, marker: null };\n instance.setView(point ?? center, point !== null ? zoom : 2);\n sync(point, false);\n });\n const url = tiles.url;\n useEffect(() => {\n const element = container.current;\n if (element === null) {\n return undefined;\n }\n let cancelled = false;\n void loadLeaflet().then((leaflet) => {\n if (!cancelled) {\n create(leaflet, element, url);\n }\n });\n return () => {\n cancelled = true;\n map.current?.map.remove();\n map.current = null;\n };\n }, [url]);\n\n const lat = point?.lat;\n const lng = point?.lng;\n const show = useEffectEvent((next: Point | null) => sync(next, true));\n useEffect(() => {\n show(lat !== undefined && lng !== undefined ? { lat, lng } : null);\n }, [lat, lng]);\n\n return (\n <div\n ref={container}\n className={[styles.map, className].filter(Boolean).join(' ')}\n role=\"application\"\n aria-label={label}\n />\n );\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { LocationField, LocationFieldEntry, type LocationFieldProps, type LocationValue, OPEN_STREET_MAP_TILES, isLocation, } from './LocationField.js';
|
|
2
|
+
export { LocationMap, type LocationMapProps, type Point } from './LocationMap.js';
|
|
3
|
+
export { createNominatimSource, type NominatimSourceOptions } from './nominatim.js';
|
|
4
|
+
export type { GeocodingResult, GeocodingSource, MapTiles, MapsConfig } from './types.js';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/location/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,aAAa,EACb,kBAAkB,EAClB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,qBAAqB,EACrB,UAAU,GACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,qBAAqB,EAAE,KAAK,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACjF,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { LocationMap } from "./LocationMap.js";
|
|
2
|
+
import { LocationField, LocationFieldEntry, OPEN_STREET_MAP_TILES, isLocation } from "./LocationField.js";
|
|
3
|
+
import { createNominatimSource } from "./nominatim.js";
|
|
4
|
+
export { LocationField, LocationFieldEntry, LocationMap, OPEN_STREET_MAP_TILES, createNominatimSource, isLocation };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const LEAFLET_CSS = ".leaflet-pane,\r\n.leaflet-tile,\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow,\r\n.leaflet-tile-container,\r\n.leaflet-pane > svg,\r\n.leaflet-pane > canvas,\r\n.leaflet-zoom-box,\r\n.leaflet-image-layer,\r\n.leaflet-layer {\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\t}\r\n.leaflet-container {\r\n\toverflow: hidden;\r\n\t}\r\n.leaflet-tile,\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow {\r\n\t-webkit-user-select: none;\r\n\t -moz-user-select: none;\r\n\t user-select: none;\r\n\t -webkit-user-drag: none;\r\n\t}\r\n.leaflet-tile::selection {\r\n\tbackground: transparent;\r\n}\r\n.leaflet-safari .leaflet-tile {\r\n\timage-rendering: -webkit-optimize-contrast;\r\n\t}\r\n.leaflet-safari .leaflet-tile-container {\r\n\twidth: 1600px;\r\n\theight: 1600px;\r\n\t-webkit-transform-origin: 0 0;\r\n\t}\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow {\r\n\tdisplay: block;\r\n\t}\r\n.leaflet-container .leaflet-overlay-pane svg {\r\n\tmax-width: none !important;\r\n\tmax-height: none !important;\r\n\t}\r\n.leaflet-container .leaflet-marker-pane img,\r\n.leaflet-container .leaflet-shadow-pane img,\r\n.leaflet-container .leaflet-tile-pane img,\r\n.leaflet-container img.leaflet-image-layer,\r\n.leaflet-container .leaflet-tile {\r\n\tmax-width: none !important;\r\n\tmax-height: none !important;\r\n\twidth: auto;\r\n\tpadding: 0;\r\n\t}\r\n.leaflet-container img.leaflet-tile {\r\n\tmix-blend-mode: plus-lighter;\r\n}\r\n.leaflet-container.leaflet-touch-zoom {\r\n\t-ms-touch-action: pan-x pan-y;\r\n\ttouch-action: pan-x pan-y;\r\n\t}\r\n.leaflet-container.leaflet-touch-drag {\r\n\t-ms-touch-action: pinch-zoom;\r\n\ttouch-action: none;\r\n\ttouch-action: pinch-zoom;\r\n}\r\n.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {\r\n\t-ms-touch-action: none;\r\n\ttouch-action: none;\r\n}\r\n.leaflet-container {\r\n\t-webkit-tap-highlight-color: transparent;\r\n}\r\n.leaflet-container a {\r\n\t-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);\r\n}\r\n.leaflet-tile {\r\n\tfilter: inherit;\r\n\tvisibility: hidden;\r\n\t}\r\n.leaflet-tile-loaded {\r\n\tvisibility: inherit;\r\n\t}\r\n.leaflet-zoom-box {\r\n\twidth: 0;\r\n\theight: 0;\r\n\t-moz-box-sizing: border-box;\r\n\t box-sizing: border-box;\r\n\tz-index: 800;\r\n\t}\r\n.leaflet-overlay-pane svg {\r\n\t-moz-user-select: none;\r\n\t}\r\n.leaflet-pane { z-index: 400; }\r\n.leaflet-tile-pane { z-index: 200; }\r\n.leaflet-overlay-pane { z-index: 400; }\r\n.leaflet-shadow-pane { z-index: 500; }\r\n.leaflet-marker-pane { z-index: 600; }\r\n.leaflet-tooltip-pane { z-index: 650; }\r\n.leaflet-popup-pane { z-index: 700; }\r\n.leaflet-map-pane canvas { z-index: 100; }\r\n.leaflet-map-pane svg { z-index: 200; }\r\n.leaflet-vml-shape {\r\n\twidth: 1px;\r\n\theight: 1px;\r\n\t}\r\n.lvml {\r\n\tbehavior: url(#default#VML);\r\n\tdisplay: inline-block;\r\n\tposition: absolute;\r\n\t}\r\n.leaflet-control {\r\n\tposition: relative;\r\n\tz-index: 800;\r\n\tpointer-events: visiblePainted; \r\n\tpointer-events: auto;\r\n\t}\r\n.leaflet-top,\r\n.leaflet-bottom {\r\n\tposition: absolute;\r\n\tz-index: 1000;\r\n\tpointer-events: none;\r\n\t}\r\n.leaflet-top {\r\n\ttop: 0;\r\n\t}\r\n.leaflet-right {\r\n\tright: 0;\r\n\t}\r\n.leaflet-bottom {\r\n\tbottom: 0;\r\n\t}\r\n.leaflet-left {\r\n\tleft: 0;\r\n\t}\r\n.leaflet-control {\r\n\tfloat: left;\r\n\tclear: both;\r\n\t}\r\n.leaflet-right .leaflet-control {\r\n\tfloat: right;\r\n\t}\r\n.leaflet-top .leaflet-control {\r\n\tmargin-top: 10px;\r\n\t}\r\n.leaflet-bottom .leaflet-control {\r\n\tmargin-bottom: 10px;\r\n\t}\r\n.leaflet-left .leaflet-control {\r\n\tmargin-left: 10px;\r\n\t}\r\n.leaflet-right .leaflet-control {\r\n\tmargin-right: 10px;\r\n\t}\r\n.leaflet-fade-anim .leaflet-popup {\r\n\topacity: 0;\r\n\t-webkit-transition: opacity 0.2s linear;\r\n\t -moz-transition: opacity 0.2s linear;\r\n\t transition: opacity 0.2s linear;\r\n\t}\r\n.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {\r\n\topacity: 1;\r\n\t}\r\n.leaflet-zoom-animated {\r\n\t-webkit-transform-origin: 0 0;\r\n\t -ms-transform-origin: 0 0;\r\n\t transform-origin: 0 0;\r\n\t}\r\nsvg.leaflet-zoom-animated {\r\n\twill-change: transform;\r\n}\r\n.leaflet-zoom-anim .leaflet-zoom-animated {\r\n\t-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t transition: transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t}\r\n.leaflet-zoom-anim .leaflet-tile,\r\n.leaflet-pan-anim .leaflet-tile {\r\n\t-webkit-transition: none;\r\n\t -moz-transition: none;\r\n\t transition: none;\r\n\t}\r\n.leaflet-zoom-anim .leaflet-zoom-hide {\r\n\tvisibility: hidden;\r\n\t}\r\n.leaflet-interactive {\r\n\tcursor: pointer;\r\n\t}\r\n.leaflet-grab {\r\n\tcursor: -webkit-grab;\r\n\tcursor: -moz-grab;\r\n\tcursor: grab;\r\n\t}\r\n.leaflet-crosshair,\r\n.leaflet-crosshair .leaflet-interactive {\r\n\tcursor: crosshair;\r\n\t}\r\n.leaflet-popup-pane,\r\n.leaflet-control {\r\n\tcursor: auto;\r\n\t}\r\n.leaflet-dragging .leaflet-grab,\r\n.leaflet-dragging .leaflet-grab .leaflet-interactive,\r\n.leaflet-dragging .leaflet-marker-draggable {\r\n\tcursor: move;\r\n\tcursor: -webkit-grabbing;\r\n\tcursor: -moz-grabbing;\r\n\tcursor: grabbing;\r\n\t}\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow,\r\n.leaflet-image-layer,\r\n.leaflet-pane > svg path,\r\n.leaflet-tile-container {\r\n\tpointer-events: none;\r\n\t}\r\n.leaflet-marker-icon.leaflet-interactive,\r\n.leaflet-image-layer.leaflet-interactive,\r\n.leaflet-pane > svg path.leaflet-interactive,\r\nsvg.leaflet-image-layer.leaflet-interactive path {\r\n\tpointer-events: visiblePainted; \r\n\tpointer-events: auto;\r\n\t}\r\n.leaflet-container {\r\n\tbackground: #ddd;\r\n\toutline-offset: 1px;\r\n\t}\r\n.leaflet-container a {\r\n\tcolor: #0078A8;\r\n\t}\r\n.leaflet-zoom-box {\r\n\tborder: 2px dotted #38f;\r\n\tbackground: rgba(255,255,255,0.5);\r\n\t}\r\n.leaflet-container {\r\n\tfont-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n\tfont-size: 12px;\r\n\tfont-size: 0.75rem;\r\n\tline-height: 1.5;\r\n\t}\r\n.leaflet-bar {\r\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.65);\r\n\tborder-radius: 4px;\r\n\t}\r\n.leaflet-bar a {\r\n\tbackground-color: #fff;\r\n\tborder-bottom: 1px solid #ccc;\r\n\twidth: 26px;\r\n\theight: 26px;\r\n\tline-height: 26px;\r\n\tdisplay: block;\r\n\ttext-align: center;\r\n\ttext-decoration: none;\r\n\tcolor: black;\r\n\t}\r\n.leaflet-bar a,\r\n.leaflet-control-layers-toggle {\r\n\tbackground-position: 50% 50%;\r\n\tbackground-repeat: no-repeat;\r\n\tdisplay: block;\r\n\t}\r\n.leaflet-bar a:hover,\r\n.leaflet-bar a:focus {\r\n\tbackground-color: #f4f4f4;\r\n\t}\r\n.leaflet-bar a:first-child {\r\n\tborder-top-left-radius: 4px;\r\n\tborder-top-right-radius: 4px;\r\n\t}\r\n.leaflet-bar a:last-child {\r\n\tborder-bottom-left-radius: 4px;\r\n\tborder-bottom-right-radius: 4px;\r\n\tborder-bottom: none;\r\n\t}\r\n.leaflet-bar a.leaflet-disabled {\r\n\tcursor: default;\r\n\tbackground-color: #f4f4f4;\r\n\tcolor: #bbb;\r\n\t}\r\n.leaflet-touch .leaflet-bar a {\r\n\twidth: 30px;\r\n\theight: 30px;\r\n\tline-height: 30px;\r\n\t}\r\n.leaflet-touch .leaflet-bar a:first-child {\r\n\tborder-top-left-radius: 2px;\r\n\tborder-top-right-radius: 2px;\r\n\t}\r\n.leaflet-touch .leaflet-bar a:last-child {\r\n\tborder-bottom-left-radius: 2px;\r\n\tborder-bottom-right-radius: 2px;\r\n\t}\r\n.leaflet-control-zoom-in,\r\n.leaflet-control-zoom-out {\r\n\tfont: bold 18px 'Lucida Console', Monaco, monospace;\r\n\ttext-indent: 1px;\r\n\t}\r\n.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {\r\n\tfont-size: 22px;\r\n\t}\r\n.leaflet-control-layers {\r\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.4);\r\n\tbackground: #fff;\r\n\tborder-radius: 5px;\r\n\t}\r\n.leaflet-control-layers-toggle {\r\n\tbackground-image: url(images/layers.png);\r\n\twidth: 36px;\r\n\theight: 36px;\r\n\t}\r\n.leaflet-retina .leaflet-control-layers-toggle {\r\n\tbackground-image: url(images/layers-2x.png);\r\n\tbackground-size: 26px 26px;\r\n\t}\r\n.leaflet-touch .leaflet-control-layers-toggle {\r\n\twidth: 44px;\r\n\theight: 44px;\r\n\t}\r\n.leaflet-control-layers .leaflet-control-layers-list,\r\n.leaflet-control-layers-expanded .leaflet-control-layers-toggle {\r\n\tdisplay: none;\r\n\t}\r\n.leaflet-control-layers-expanded .leaflet-control-layers-list {\r\n\tdisplay: block;\r\n\tposition: relative;\r\n\t}\r\n.leaflet-control-layers-expanded {\r\n\tpadding: 6px 10px 6px 6px;\r\n\tcolor: #333;\r\n\tbackground: #fff;\r\n\t}\r\n.leaflet-control-layers-scrollbar {\r\n\toverflow-y: scroll;\r\n\toverflow-x: hidden;\r\n\tpadding-right: 5px;\r\n\t}\r\n.leaflet-control-layers-selector {\r\n\tmargin-top: 2px;\r\n\tposition: relative;\r\n\ttop: 1px;\r\n\t}\r\n.leaflet-control-layers label {\r\n\tdisplay: block;\r\n\tfont-size: 13px;\r\n\tfont-size: 1.08333em;\r\n\t}\r\n.leaflet-control-layers-separator {\r\n\theight: 0;\r\n\tborder-top: 1px solid #ddd;\r\n\tmargin: 5px -10px 5px -6px;\r\n\t}\r\n.leaflet-default-icon-path { \r\n\tbackground-image: url(images/marker-icon.png);\r\n\t}\r\n.leaflet-container .leaflet-control-attribution {\r\n\tbackground: #fff;\r\n\tbackground: rgba(255, 255, 255, 0.8);\r\n\tmargin: 0;\r\n\t}\r\n.leaflet-control-attribution,\r\n.leaflet-control-scale-line {\r\n\tpadding: 0 5px;\r\n\tcolor: #333;\r\n\tline-height: 1.4;\r\n\t}\r\n.leaflet-control-attribution a {\r\n\ttext-decoration: none;\r\n\t}\r\n.leaflet-control-attribution a:hover,\r\n.leaflet-control-attribution a:focus {\r\n\ttext-decoration: underline;\r\n\t}\r\n.leaflet-attribution-flag {\r\n\tdisplay: inline !important;\r\n\tvertical-align: baseline !important;\r\n\twidth: 1em;\r\n\theight: 0.6669em;\r\n\t}\r\n.leaflet-left .leaflet-control-scale {\r\n\tmargin-left: 5px;\r\n\t}\r\n.leaflet-bottom .leaflet-control-scale {\r\n\tmargin-bottom: 5px;\r\n\t}\r\n.leaflet-control-scale-line {\r\n\tborder: 2px solid #777;\r\n\tborder-top: none;\r\n\tline-height: 1.1;\r\n\tpadding: 2px 5px 1px;\r\n\twhite-space: nowrap;\r\n\t-moz-box-sizing: border-box;\r\n\t box-sizing: border-box;\r\n\tbackground: rgba(255, 255, 255, 0.8);\r\n\ttext-shadow: 1px 1px #fff;\r\n\t}\r\n.leaflet-control-scale-line:not(:first-child) {\r\n\tborder-top: 2px solid #777;\r\n\tborder-bottom: none;\r\n\tmargin-top: -2px;\r\n\t}\r\n.leaflet-control-scale-line:not(:first-child):not(:last-child) {\r\n\tborder-bottom: 2px solid #777;\r\n\t}\r\n.leaflet-touch .leaflet-control-attribution,\r\n.leaflet-touch .leaflet-control-layers,\r\n.leaflet-touch .leaflet-bar {\r\n\tbox-shadow: none;\r\n\t}\r\n.leaflet-touch .leaflet-control-layers,\r\n.leaflet-touch .leaflet-bar {\r\n\tborder: 2px solid rgba(0,0,0,0.2);\r\n\tbackground-clip: padding-box;\r\n\t}\r\n.leaflet-popup {\r\n\tposition: absolute;\r\n\ttext-align: center;\r\n\tmargin-bottom: 20px;\r\n\t}\r\n.leaflet-popup-content-wrapper {\r\n\tpadding: 1px;\r\n\ttext-align: left;\r\n\tborder-radius: 12px;\r\n\t}\r\n.leaflet-popup-content {\r\n\tmargin: 13px 24px 13px 20px;\r\n\tline-height: 1.3;\r\n\tfont-size: 13px;\r\n\tfont-size: 1.08333em;\r\n\tmin-height: 1px;\r\n\t}\r\n.leaflet-popup-content p {\r\n\tmargin: 17px 0;\r\n\tmargin: 1.3em 0;\r\n\t}\r\n.leaflet-popup-tip-container {\r\n\twidth: 40px;\r\n\theight: 20px;\r\n\tposition: absolute;\r\n\tleft: 50%;\r\n\tmargin-top: -1px;\r\n\tmargin-left: -20px;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\t}\r\n.leaflet-popup-tip {\r\n\twidth: 17px;\r\n\theight: 17px;\r\n\tpadding: 1px;\r\n\tmargin: -10px auto 0;\r\n\tpointer-events: auto;\r\n\t-webkit-transform: rotate(45deg);\r\n\t -moz-transform: rotate(45deg);\r\n\t -ms-transform: rotate(45deg);\r\n\t transform: rotate(45deg);\r\n\t}\r\n.leaflet-popup-content-wrapper,\r\n.leaflet-popup-tip {\r\n\tbackground: white;\r\n\tcolor: #333;\r\n\tbox-shadow: 0 3px 14px rgba(0,0,0,0.4);\r\n\t}\r\n.leaflet-container a.leaflet-popup-close-button {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tborder: none;\r\n\ttext-align: center;\r\n\twidth: 24px;\r\n\theight: 24px;\r\n\tfont: 16px/24px Tahoma, Verdana, sans-serif;\r\n\tcolor: #757575;\r\n\ttext-decoration: none;\r\n\tbackground: transparent;\r\n\t}\r\n.leaflet-container a.leaflet-popup-close-button:hover,\r\n.leaflet-container a.leaflet-popup-close-button:focus {\r\n\tcolor: #585858;\r\n\t}\r\n.leaflet-popup-scrolled {\r\n\toverflow: auto;\r\n\t}\r\n.leaflet-oldie .leaflet-popup-content-wrapper {\r\n\t-ms-zoom: 1;\r\n\t}\r\n.leaflet-oldie .leaflet-popup-tip {\r\n\twidth: 24px;\r\n\tmargin: 0 auto;\r\n\t-ms-filter: \"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";\r\n\tfilter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);\r\n\t}\r\n.leaflet-oldie .leaflet-control-zoom,\r\n.leaflet-oldie .leaflet-control-layers,\r\n.leaflet-oldie .leaflet-popup-content-wrapper,\r\n.leaflet-oldie .leaflet-popup-tip {\r\n\tborder: 1px solid #999;\r\n\t}\r\n.leaflet-div-icon {\r\n\tbackground: #fff;\r\n\tborder: 1px solid #666;\r\n\t}\r\n.leaflet-tooltip {\r\n\tposition: absolute;\r\n\tpadding: 6px;\r\n\tbackground-color: #fff;\r\n\tborder: 1px solid #fff;\r\n\tborder-radius: 3px;\r\n\tcolor: #222;\r\n\twhite-space: nowrap;\r\n\t-webkit-user-select: none;\r\n\t-moz-user-select: none;\r\n\t-ms-user-select: none;\r\n\tuser-select: none;\r\n\tpointer-events: none;\r\n\tbox-shadow: 0 1px 3px rgba(0,0,0,0.4);\r\n\t}\r\n.leaflet-tooltip.leaflet-interactive {\r\n\tcursor: pointer;\r\n\tpointer-events: auto;\r\n\t}\r\n.leaflet-tooltip-top:before,\r\n.leaflet-tooltip-bottom:before,\r\n.leaflet-tooltip-left:before,\r\n.leaflet-tooltip-right:before {\r\n\tposition: absolute;\r\n\tpointer-events: none;\r\n\tborder: 6px solid transparent;\r\n\tbackground: transparent;\r\n\tcontent: \"\";\r\n\t}\r\n.leaflet-tooltip-bottom {\r\n\tmargin-top: 6px;\r\n}\r\n.leaflet-tooltip-top {\r\n\tmargin-top: -6px;\r\n}\r\n.leaflet-tooltip-bottom:before,\r\n.leaflet-tooltip-top:before {\r\n\tleft: 50%;\r\n\tmargin-left: -6px;\r\n\t}\r\n.leaflet-tooltip-top:before {\r\n\tbottom: 0;\r\n\tmargin-bottom: -12px;\r\n\tborder-top-color: #fff;\r\n\t}\r\n.leaflet-tooltip-bottom:before {\r\n\ttop: 0;\r\n\tmargin-top: -12px;\r\n\tmargin-left: -6px;\r\n\tborder-bottom-color: #fff;\r\n\t}\r\n.leaflet-tooltip-left {\r\n\tmargin-left: -6px;\r\n}\r\n.leaflet-tooltip-right {\r\n\tmargin-left: 6px;\r\n}\r\n.leaflet-tooltip-left:before,\r\n.leaflet-tooltip-right:before {\r\n\ttop: 50%;\r\n\tmargin-top: -6px;\r\n\t}\r\n.leaflet-tooltip-left:before {\r\n\tright: 0;\r\n\tmargin-right: -12px;\r\n\tborder-left-color: #fff;\r\n\t}\r\n.leaflet-tooltip-right:before {\r\n\tleft: 0;\r\n\tmargin-left: -12px;\r\n\tborder-right-color: #fff;\r\n\t}\r\n@media print {\r\n\t.leaflet-control {\r\n\t\t-webkit-print-color-adjust: exact;\r\n\t\tprint-color-adjust: exact;\r\n\t\t}\r\n\t}";
|
|
2
|
+
//# sourceMappingURL=leafletCss.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"leafletCss.d.ts","sourceRoot":"","sources":["../../src/location/leafletCss.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,gqdACqod,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
//#region src/location/leafletCss.ts
|
|
2
|
+
var LEAFLET_CSS = ".leaflet-pane,\r\n.leaflet-tile,\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow,\r\n.leaflet-tile-container,\r\n.leaflet-pane > svg,\r\n.leaflet-pane > canvas,\r\n.leaflet-zoom-box,\r\n.leaflet-image-layer,\r\n.leaflet-layer {\r\n position: absolute;\r\n left: 0;\r\n top: 0;\r\n }\r\n.leaflet-container {\r\n overflow: hidden;\r\n }\r\n.leaflet-tile,\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow {\r\n -webkit-user-select: none;\r\n -moz-user-select: none;\r\n user-select: none;\r\n -webkit-user-drag: none;\r\n }\r\n.leaflet-tile::selection {\r\n background: transparent;\r\n}\r\n.leaflet-safari .leaflet-tile {\r\n image-rendering: -webkit-optimize-contrast;\r\n }\r\n.leaflet-safari .leaflet-tile-container {\r\n width: 1600px;\r\n height: 1600px;\r\n -webkit-transform-origin: 0 0;\r\n }\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow {\r\n display: block;\r\n }\r\n.leaflet-container .leaflet-overlay-pane svg {\r\n max-width: none !important;\r\n max-height: none !important;\r\n }\r\n.leaflet-container .leaflet-marker-pane img,\r\n.leaflet-container .leaflet-shadow-pane img,\r\n.leaflet-container .leaflet-tile-pane img,\r\n.leaflet-container img.leaflet-image-layer,\r\n.leaflet-container .leaflet-tile {\r\n max-width: none !important;\r\n max-height: none !important;\r\n width: auto;\r\n padding: 0;\r\n }\r\n.leaflet-container img.leaflet-tile {\r\n mix-blend-mode: plus-lighter;\r\n}\r\n.leaflet-container.leaflet-touch-zoom {\r\n -ms-touch-action: pan-x pan-y;\r\n touch-action: pan-x pan-y;\r\n }\r\n.leaflet-container.leaflet-touch-drag {\r\n -ms-touch-action: pinch-zoom;\r\n touch-action: none;\r\n touch-action: pinch-zoom;\r\n}\r\n.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {\r\n -ms-touch-action: none;\r\n touch-action: none;\r\n}\r\n.leaflet-container {\r\n -webkit-tap-highlight-color: transparent;\r\n}\r\n.leaflet-container a {\r\n -webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);\r\n}\r\n.leaflet-tile {\r\n filter: inherit;\r\n visibility: hidden;\r\n }\r\n.leaflet-tile-loaded {\r\n visibility: inherit;\r\n }\r\n.leaflet-zoom-box {\r\n width: 0;\r\n height: 0;\r\n -moz-box-sizing: border-box;\r\n box-sizing: border-box;\r\n z-index: 800;\r\n }\r\n.leaflet-overlay-pane svg {\r\n -moz-user-select: none;\r\n }\r\n.leaflet-pane { z-index: 400; }\r\n.leaflet-tile-pane { z-index: 200; }\r\n.leaflet-overlay-pane { z-index: 400; }\r\n.leaflet-shadow-pane { z-index: 500; }\r\n.leaflet-marker-pane { z-index: 600; }\r\n.leaflet-tooltip-pane { z-index: 650; }\r\n.leaflet-popup-pane { z-index: 700; }\r\n.leaflet-map-pane canvas { z-index: 100; }\r\n.leaflet-map-pane svg { z-index: 200; }\r\n.leaflet-vml-shape {\r\n width: 1px;\r\n height: 1px;\r\n }\r\n.lvml {\r\n behavior: url(#default#VML);\r\n display: inline-block;\r\n position: absolute;\r\n }\r\n.leaflet-control {\r\n position: relative;\r\n z-index: 800;\r\n pointer-events: visiblePainted; \r\n pointer-events: auto;\r\n }\r\n.leaflet-top,\r\n.leaflet-bottom {\r\n position: absolute;\r\n z-index: 1000;\r\n pointer-events: none;\r\n }\r\n.leaflet-top {\r\n top: 0;\r\n }\r\n.leaflet-right {\r\n right: 0;\r\n }\r\n.leaflet-bottom {\r\n bottom: 0;\r\n }\r\n.leaflet-left {\r\n left: 0;\r\n }\r\n.leaflet-control {\r\n float: left;\r\n clear: both;\r\n }\r\n.leaflet-right .leaflet-control {\r\n float: right;\r\n }\r\n.leaflet-top .leaflet-control {\r\n margin-top: 10px;\r\n }\r\n.leaflet-bottom .leaflet-control {\r\n margin-bottom: 10px;\r\n }\r\n.leaflet-left .leaflet-control {\r\n margin-left: 10px;\r\n }\r\n.leaflet-right .leaflet-control {\r\n margin-right: 10px;\r\n }\r\n.leaflet-fade-anim .leaflet-popup {\r\n opacity: 0;\r\n -webkit-transition: opacity 0.2s linear;\r\n -moz-transition: opacity 0.2s linear;\r\n transition: opacity 0.2s linear;\r\n }\r\n.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {\r\n opacity: 1;\r\n }\r\n.leaflet-zoom-animated {\r\n -webkit-transform-origin: 0 0;\r\n -ms-transform-origin: 0 0;\r\n transform-origin: 0 0;\r\n }\r\nsvg.leaflet-zoom-animated {\r\n will-change: transform;\r\n}\r\n.leaflet-zoom-anim .leaflet-zoom-animated {\r\n -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);\r\n -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);\r\n transition: transform 0.25s cubic-bezier(0,0,0.25,1);\r\n }\r\n.leaflet-zoom-anim .leaflet-tile,\r\n.leaflet-pan-anim .leaflet-tile {\r\n -webkit-transition: none;\r\n -moz-transition: none;\r\n transition: none;\r\n }\r\n.leaflet-zoom-anim .leaflet-zoom-hide {\r\n visibility: hidden;\r\n }\r\n.leaflet-interactive {\r\n cursor: pointer;\r\n }\r\n.leaflet-grab {\r\n cursor: -webkit-grab;\r\n cursor: -moz-grab;\r\n cursor: grab;\r\n }\r\n.leaflet-crosshair,\r\n.leaflet-crosshair .leaflet-interactive {\r\n cursor: crosshair;\r\n }\r\n.leaflet-popup-pane,\r\n.leaflet-control {\r\n cursor: auto;\r\n }\r\n.leaflet-dragging .leaflet-grab,\r\n.leaflet-dragging .leaflet-grab .leaflet-interactive,\r\n.leaflet-dragging .leaflet-marker-draggable {\r\n cursor: move;\r\n cursor: -webkit-grabbing;\r\n cursor: -moz-grabbing;\r\n cursor: grabbing;\r\n }\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow,\r\n.leaflet-image-layer,\r\n.leaflet-pane > svg path,\r\n.leaflet-tile-container {\r\n pointer-events: none;\r\n }\r\n.leaflet-marker-icon.leaflet-interactive,\r\n.leaflet-image-layer.leaflet-interactive,\r\n.leaflet-pane > svg path.leaflet-interactive,\r\nsvg.leaflet-image-layer.leaflet-interactive path {\r\n pointer-events: visiblePainted; \r\n pointer-events: auto;\r\n }\r\n.leaflet-container {\r\n background: #ddd;\r\n outline-offset: 1px;\r\n }\r\n.leaflet-container a {\r\n color: #0078A8;\r\n }\r\n.leaflet-zoom-box {\r\n border: 2px dotted #38f;\r\n background: rgba(255,255,255,0.5);\r\n }\r\n.leaflet-container {\r\n font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n font-size: 12px;\r\n font-size: 0.75rem;\r\n line-height: 1.5;\r\n }\r\n.leaflet-bar {\r\n box-shadow: 0 1px 5px rgba(0,0,0,0.65);\r\n border-radius: 4px;\r\n }\r\n.leaflet-bar a {\r\n background-color: #fff;\r\n border-bottom: 1px solid #ccc;\r\n width: 26px;\r\n height: 26px;\r\n line-height: 26px;\r\n display: block;\r\n text-align: center;\r\n text-decoration: none;\r\n color: black;\r\n }\r\n.leaflet-bar a,\r\n.leaflet-control-layers-toggle {\r\n background-position: 50% 50%;\r\n background-repeat: no-repeat;\r\n display: block;\r\n }\r\n.leaflet-bar a:hover,\r\n.leaflet-bar a:focus {\r\n background-color: #f4f4f4;\r\n }\r\n.leaflet-bar a:first-child {\r\n border-top-left-radius: 4px;\r\n border-top-right-radius: 4px;\r\n }\r\n.leaflet-bar a:last-child {\r\n border-bottom-left-radius: 4px;\r\n border-bottom-right-radius: 4px;\r\n border-bottom: none;\r\n }\r\n.leaflet-bar a.leaflet-disabled {\r\n cursor: default;\r\n background-color: #f4f4f4;\r\n color: #bbb;\r\n }\r\n.leaflet-touch .leaflet-bar a {\r\n width: 30px;\r\n height: 30px;\r\n line-height: 30px;\r\n }\r\n.leaflet-touch .leaflet-bar a:first-child {\r\n border-top-left-radius: 2px;\r\n border-top-right-radius: 2px;\r\n }\r\n.leaflet-touch .leaflet-bar a:last-child {\r\n border-bottom-left-radius: 2px;\r\n border-bottom-right-radius: 2px;\r\n }\r\n.leaflet-control-zoom-in,\r\n.leaflet-control-zoom-out {\r\n font: bold 18px 'Lucida Console', Monaco, monospace;\r\n text-indent: 1px;\r\n }\r\n.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {\r\n font-size: 22px;\r\n }\r\n.leaflet-control-layers {\r\n box-shadow: 0 1px 5px rgba(0,0,0,0.4);\r\n background: #fff;\r\n border-radius: 5px;\r\n }\r\n.leaflet-control-layers-toggle {\r\n background-image: url(images/layers.png);\r\n width: 36px;\r\n height: 36px;\r\n }\r\n.leaflet-retina .leaflet-control-layers-toggle {\r\n background-image: url(images/layers-2x.png);\r\n background-size: 26px 26px;\r\n }\r\n.leaflet-touch .leaflet-control-layers-toggle {\r\n width: 44px;\r\n height: 44px;\r\n }\r\n.leaflet-control-layers .leaflet-control-layers-list,\r\n.leaflet-control-layers-expanded .leaflet-control-layers-toggle {\r\n display: none;\r\n }\r\n.leaflet-control-layers-expanded .leaflet-control-layers-list {\r\n display: block;\r\n position: relative;\r\n }\r\n.leaflet-control-layers-expanded {\r\n padding: 6px 10px 6px 6px;\r\n color: #333;\r\n background: #fff;\r\n }\r\n.leaflet-control-layers-scrollbar {\r\n overflow-y: scroll;\r\n overflow-x: hidden;\r\n padding-right: 5px;\r\n }\r\n.leaflet-control-layers-selector {\r\n margin-top: 2px;\r\n position: relative;\r\n top: 1px;\r\n }\r\n.leaflet-control-layers label {\r\n display: block;\r\n font-size: 13px;\r\n font-size: 1.08333em;\r\n }\r\n.leaflet-control-layers-separator {\r\n height: 0;\r\n border-top: 1px solid #ddd;\r\n margin: 5px -10px 5px -6px;\r\n }\r\n.leaflet-default-icon-path { \r\n background-image: url(images/marker-icon.png);\r\n }\r\n.leaflet-container .leaflet-control-attribution {\r\n background: #fff;\r\n background: rgba(255, 255, 255, 0.8);\r\n margin: 0;\r\n }\r\n.leaflet-control-attribution,\r\n.leaflet-control-scale-line {\r\n padding: 0 5px;\r\n color: #333;\r\n line-height: 1.4;\r\n }\r\n.leaflet-control-attribution a {\r\n text-decoration: none;\r\n }\r\n.leaflet-control-attribution a:hover,\r\n.leaflet-control-attribution a:focus {\r\n text-decoration: underline;\r\n }\r\n.leaflet-attribution-flag {\r\n display: inline !important;\r\n vertical-align: baseline !important;\r\n width: 1em;\r\n height: 0.6669em;\r\n }\r\n.leaflet-left .leaflet-control-scale {\r\n margin-left: 5px;\r\n }\r\n.leaflet-bottom .leaflet-control-scale {\r\n margin-bottom: 5px;\r\n }\r\n.leaflet-control-scale-line {\r\n border: 2px solid #777;\r\n border-top: none;\r\n line-height: 1.1;\r\n padding: 2px 5px 1px;\r\n white-space: nowrap;\r\n -moz-box-sizing: border-box;\r\n box-sizing: border-box;\r\n background: rgba(255, 255, 255, 0.8);\r\n text-shadow: 1px 1px #fff;\r\n }\r\n.leaflet-control-scale-line:not(:first-child) {\r\n border-top: 2px solid #777;\r\n border-bottom: none;\r\n margin-top: -2px;\r\n }\r\n.leaflet-control-scale-line:not(:first-child):not(:last-child) {\r\n border-bottom: 2px solid #777;\r\n }\r\n.leaflet-touch .leaflet-control-attribution,\r\n.leaflet-touch .leaflet-control-layers,\r\n.leaflet-touch .leaflet-bar {\r\n box-shadow: none;\r\n }\r\n.leaflet-touch .leaflet-control-layers,\r\n.leaflet-touch .leaflet-bar {\r\n border: 2px solid rgba(0,0,0,0.2);\r\n background-clip: padding-box;\r\n }\r\n.leaflet-popup {\r\n position: absolute;\r\n text-align: center;\r\n margin-bottom: 20px;\r\n }\r\n.leaflet-popup-content-wrapper {\r\n padding: 1px;\r\n text-align: left;\r\n border-radius: 12px;\r\n }\r\n.leaflet-popup-content {\r\n margin: 13px 24px 13px 20px;\r\n line-height: 1.3;\r\n font-size: 13px;\r\n font-size: 1.08333em;\r\n min-height: 1px;\r\n }\r\n.leaflet-popup-content p {\r\n margin: 17px 0;\r\n margin: 1.3em 0;\r\n }\r\n.leaflet-popup-tip-container {\r\n width: 40px;\r\n height: 20px;\r\n position: absolute;\r\n left: 50%;\r\n margin-top: -1px;\r\n margin-left: -20px;\r\n overflow: hidden;\r\n pointer-events: none;\r\n }\r\n.leaflet-popup-tip {\r\n width: 17px;\r\n height: 17px;\r\n padding: 1px;\r\n margin: -10px auto 0;\r\n pointer-events: auto;\r\n -webkit-transform: rotate(45deg);\r\n -moz-transform: rotate(45deg);\r\n -ms-transform: rotate(45deg);\r\n transform: rotate(45deg);\r\n }\r\n.leaflet-popup-content-wrapper,\r\n.leaflet-popup-tip {\r\n background: white;\r\n color: #333;\r\n box-shadow: 0 3px 14px rgba(0,0,0,0.4);\r\n }\r\n.leaflet-container a.leaflet-popup-close-button {\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n border: none;\r\n text-align: center;\r\n width: 24px;\r\n height: 24px;\r\n font: 16px/24px Tahoma, Verdana, sans-serif;\r\n color: #757575;\r\n text-decoration: none;\r\n background: transparent;\r\n }\r\n.leaflet-container a.leaflet-popup-close-button:hover,\r\n.leaflet-container a.leaflet-popup-close-button:focus {\r\n color: #585858;\r\n }\r\n.leaflet-popup-scrolled {\r\n overflow: auto;\r\n }\r\n.leaflet-oldie .leaflet-popup-content-wrapper {\r\n -ms-zoom: 1;\r\n }\r\n.leaflet-oldie .leaflet-popup-tip {\r\n width: 24px;\r\n margin: 0 auto;\r\n -ms-filter: \"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";\r\n filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);\r\n }\r\n.leaflet-oldie .leaflet-control-zoom,\r\n.leaflet-oldie .leaflet-control-layers,\r\n.leaflet-oldie .leaflet-popup-content-wrapper,\r\n.leaflet-oldie .leaflet-popup-tip {\r\n border: 1px solid #999;\r\n }\r\n.leaflet-div-icon {\r\n background: #fff;\r\n border: 1px solid #666;\r\n }\r\n.leaflet-tooltip {\r\n position: absolute;\r\n padding: 6px;\r\n background-color: #fff;\r\n border: 1px solid #fff;\r\n border-radius: 3px;\r\n color: #222;\r\n white-space: nowrap;\r\n -webkit-user-select: none;\r\n -moz-user-select: none;\r\n -ms-user-select: none;\r\n user-select: none;\r\n pointer-events: none;\r\n box-shadow: 0 1px 3px rgba(0,0,0,0.4);\r\n }\r\n.leaflet-tooltip.leaflet-interactive {\r\n cursor: pointer;\r\n pointer-events: auto;\r\n }\r\n.leaflet-tooltip-top:before,\r\n.leaflet-tooltip-bottom:before,\r\n.leaflet-tooltip-left:before,\r\n.leaflet-tooltip-right:before {\r\n position: absolute;\r\n pointer-events: none;\r\n border: 6px solid transparent;\r\n background: transparent;\r\n content: \"\";\r\n }\r\n.leaflet-tooltip-bottom {\r\n margin-top: 6px;\r\n}\r\n.leaflet-tooltip-top {\r\n margin-top: -6px;\r\n}\r\n.leaflet-tooltip-bottom:before,\r\n.leaflet-tooltip-top:before {\r\n left: 50%;\r\n margin-left: -6px;\r\n }\r\n.leaflet-tooltip-top:before {\r\n bottom: 0;\r\n margin-bottom: -12px;\r\n border-top-color: #fff;\r\n }\r\n.leaflet-tooltip-bottom:before {\r\n top: 0;\r\n margin-top: -12px;\r\n margin-left: -6px;\r\n border-bottom-color: #fff;\r\n }\r\n.leaflet-tooltip-left {\r\n margin-left: -6px;\r\n}\r\n.leaflet-tooltip-right {\r\n margin-left: 6px;\r\n}\r\n.leaflet-tooltip-left:before,\r\n.leaflet-tooltip-right:before {\r\n top: 50%;\r\n margin-top: -6px;\r\n }\r\n.leaflet-tooltip-left:before {\r\n right: 0;\r\n margin-right: -12px;\r\n border-left-color: #fff;\r\n }\r\n.leaflet-tooltip-right:before {\r\n left: 0;\r\n margin-left: -12px;\r\n border-right-color: #fff;\r\n }\r\n@media print {\r\n .leaflet-control {\r\n -webkit-print-color-adjust: exact;\r\n print-color-adjust: exact;\r\n }\r\n }";
|
|
3
|
+
//#endregion
|
|
4
|
+
export { LEAFLET_CSS };
|
|
5
|
+
|
|
6
|
+
//# sourceMappingURL=leafletCss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"leafletCss.js","names":["LEAFLET_CSS"],"sources":["../../src/location/leafletCss.ts"],"sourcesContent":["// The stylesheet of Leaflet 1.9.4 (BSD-2-Clause, (c) Volodymyr Agafonkin and CloudMade), without\n// its comments: Leaflet's own classes, injected once when a map first shows. Regenerate it from\n// leaflet/dist/leaflet.css when Leaflet is updated.\nexport const LEAFLET_CSS =\n '.leaflet-pane,\\r\\n.leaflet-tile,\\r\\n.leaflet-marker-icon,\\r\\n.leaflet-marker-shadow,\\r\\n.leaflet-tile-container,\\r\\n.leaflet-pane > svg,\\r\\n.leaflet-pane > canvas,\\r\\n.leaflet-zoom-box,\\r\\n.leaflet-image-layer,\\r\\n.leaflet-layer {\\r\\n\\tposition: absolute;\\r\\n\\tleft: 0;\\r\\n\\ttop: 0;\\r\\n\\t}\\r\\n.leaflet-container {\\r\\n\\toverflow: hidden;\\r\\n\\t}\\r\\n.leaflet-tile,\\r\\n.leaflet-marker-icon,\\r\\n.leaflet-marker-shadow {\\r\\n\\t-webkit-user-select: none;\\r\\n\\t -moz-user-select: none;\\r\\n\\t user-select: none;\\r\\n\\t -webkit-user-drag: none;\\r\\n\\t}\\r\\n.leaflet-tile::selection {\\r\\n\\tbackground: transparent;\\r\\n}\\r\\n.leaflet-safari .leaflet-tile {\\r\\n\\timage-rendering: -webkit-optimize-contrast;\\r\\n\\t}\\r\\n.leaflet-safari .leaflet-tile-container {\\r\\n\\twidth: 1600px;\\r\\n\\theight: 1600px;\\r\\n\\t-webkit-transform-origin: 0 0;\\r\\n\\t}\\r\\n.leaflet-marker-icon,\\r\\n.leaflet-marker-shadow {\\r\\n\\tdisplay: block;\\r\\n\\t}\\r\\n.leaflet-container .leaflet-overlay-pane svg {\\r\\n\\tmax-width: none !important;\\r\\n\\tmax-height: none !important;\\r\\n\\t}\\r\\n.leaflet-container .leaflet-marker-pane img,\\r\\n.leaflet-container .leaflet-shadow-pane img,\\r\\n.leaflet-container .leaflet-tile-pane img,\\r\\n.leaflet-container img.leaflet-image-layer,\\r\\n.leaflet-container .leaflet-tile {\\r\\n\\tmax-width: none !important;\\r\\n\\tmax-height: none !important;\\r\\n\\twidth: auto;\\r\\n\\tpadding: 0;\\r\\n\\t}\\r\\n.leaflet-container img.leaflet-tile {\\r\\n\\tmix-blend-mode: plus-lighter;\\r\\n}\\r\\n.leaflet-container.leaflet-touch-zoom {\\r\\n\\t-ms-touch-action: pan-x pan-y;\\r\\n\\ttouch-action: pan-x pan-y;\\r\\n\\t}\\r\\n.leaflet-container.leaflet-touch-drag {\\r\\n\\t-ms-touch-action: pinch-zoom;\\r\\n\\ttouch-action: none;\\r\\n\\ttouch-action: pinch-zoom;\\r\\n}\\r\\n.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {\\r\\n\\t-ms-touch-action: none;\\r\\n\\ttouch-action: none;\\r\\n}\\r\\n.leaflet-container {\\r\\n\\t-webkit-tap-highlight-color: transparent;\\r\\n}\\r\\n.leaflet-container a {\\r\\n\\t-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);\\r\\n}\\r\\n.leaflet-tile {\\r\\n\\tfilter: inherit;\\r\\n\\tvisibility: hidden;\\r\\n\\t}\\r\\n.leaflet-tile-loaded {\\r\\n\\tvisibility: inherit;\\r\\n\\t}\\r\\n.leaflet-zoom-box {\\r\\n\\twidth: 0;\\r\\n\\theight: 0;\\r\\n\\t-moz-box-sizing: border-box;\\r\\n\\t box-sizing: border-box;\\r\\n\\tz-index: 800;\\r\\n\\t}\\r\\n.leaflet-overlay-pane svg {\\r\\n\\t-moz-user-select: none;\\r\\n\\t}\\r\\n.leaflet-pane { z-index: 400; }\\r\\n.leaflet-tile-pane { z-index: 200; }\\r\\n.leaflet-overlay-pane { z-index: 400; }\\r\\n.leaflet-shadow-pane { z-index: 500; }\\r\\n.leaflet-marker-pane { z-index: 600; }\\r\\n.leaflet-tooltip-pane { z-index: 650; }\\r\\n.leaflet-popup-pane { z-index: 700; }\\r\\n.leaflet-map-pane canvas { z-index: 100; }\\r\\n.leaflet-map-pane svg { z-index: 200; }\\r\\n.leaflet-vml-shape {\\r\\n\\twidth: 1px;\\r\\n\\theight: 1px;\\r\\n\\t}\\r\\n.lvml {\\r\\n\\tbehavior: url(#default#VML);\\r\\n\\tdisplay: inline-block;\\r\\n\\tposition: absolute;\\r\\n\\t}\\r\\n.leaflet-control {\\r\\n\\tposition: relative;\\r\\n\\tz-index: 800;\\r\\n\\tpointer-events: visiblePainted; \\r\\n\\tpointer-events: auto;\\r\\n\\t}\\r\\n.leaflet-top,\\r\\n.leaflet-bottom {\\r\\n\\tposition: absolute;\\r\\n\\tz-index: 1000;\\r\\n\\tpointer-events: none;\\r\\n\\t}\\r\\n.leaflet-top {\\r\\n\\ttop: 0;\\r\\n\\t}\\r\\n.leaflet-right {\\r\\n\\tright: 0;\\r\\n\\t}\\r\\n.leaflet-bottom {\\r\\n\\tbottom: 0;\\r\\n\\t}\\r\\n.leaflet-left {\\r\\n\\tleft: 0;\\r\\n\\t}\\r\\n.leaflet-control {\\r\\n\\tfloat: left;\\r\\n\\tclear: both;\\r\\n\\t}\\r\\n.leaflet-right .leaflet-control {\\r\\n\\tfloat: right;\\r\\n\\t}\\r\\n.leaflet-top .leaflet-control {\\r\\n\\tmargin-top: 10px;\\r\\n\\t}\\r\\n.leaflet-bottom .leaflet-control {\\r\\n\\tmargin-bottom: 10px;\\r\\n\\t}\\r\\n.leaflet-left .leaflet-control {\\r\\n\\tmargin-left: 10px;\\r\\n\\t}\\r\\n.leaflet-right .leaflet-control {\\r\\n\\tmargin-right: 10px;\\r\\n\\t}\\r\\n.leaflet-fade-anim .leaflet-popup {\\r\\n\\topacity: 0;\\r\\n\\t-webkit-transition: opacity 0.2s linear;\\r\\n\\t -moz-transition: opacity 0.2s linear;\\r\\n\\t transition: opacity 0.2s linear;\\r\\n\\t}\\r\\n.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {\\r\\n\\topacity: 1;\\r\\n\\t}\\r\\n.leaflet-zoom-animated {\\r\\n\\t-webkit-transform-origin: 0 0;\\r\\n\\t -ms-transform-origin: 0 0;\\r\\n\\t transform-origin: 0 0;\\r\\n\\t}\\r\\nsvg.leaflet-zoom-animated {\\r\\n\\twill-change: transform;\\r\\n}\\r\\n.leaflet-zoom-anim .leaflet-zoom-animated {\\r\\n\\t-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);\\r\\n\\t -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);\\r\\n\\t transition: transform 0.25s cubic-bezier(0,0,0.25,1);\\r\\n\\t}\\r\\n.leaflet-zoom-anim .leaflet-tile,\\r\\n.leaflet-pan-anim .leaflet-tile {\\r\\n\\t-webkit-transition: none;\\r\\n\\t -moz-transition: none;\\r\\n\\t transition: none;\\r\\n\\t}\\r\\n.leaflet-zoom-anim .leaflet-zoom-hide {\\r\\n\\tvisibility: hidden;\\r\\n\\t}\\r\\n.leaflet-interactive {\\r\\n\\tcursor: pointer;\\r\\n\\t}\\r\\n.leaflet-grab {\\r\\n\\tcursor: -webkit-grab;\\r\\n\\tcursor: -moz-grab;\\r\\n\\tcursor: grab;\\r\\n\\t}\\r\\n.leaflet-crosshair,\\r\\n.leaflet-crosshair .leaflet-interactive {\\r\\n\\tcursor: crosshair;\\r\\n\\t}\\r\\n.leaflet-popup-pane,\\r\\n.leaflet-control {\\r\\n\\tcursor: auto;\\r\\n\\t}\\r\\n.leaflet-dragging .leaflet-grab,\\r\\n.leaflet-dragging .leaflet-grab .leaflet-interactive,\\r\\n.leaflet-dragging .leaflet-marker-draggable {\\r\\n\\tcursor: move;\\r\\n\\tcursor: -webkit-grabbing;\\r\\n\\tcursor: -moz-grabbing;\\r\\n\\tcursor: grabbing;\\r\\n\\t}\\r\\n.leaflet-marker-icon,\\r\\n.leaflet-marker-shadow,\\r\\n.leaflet-image-layer,\\r\\n.leaflet-pane > svg path,\\r\\n.leaflet-tile-container {\\r\\n\\tpointer-events: none;\\r\\n\\t}\\r\\n.leaflet-marker-icon.leaflet-interactive,\\r\\n.leaflet-image-layer.leaflet-interactive,\\r\\n.leaflet-pane > svg path.leaflet-interactive,\\r\\nsvg.leaflet-image-layer.leaflet-interactive path {\\r\\n\\tpointer-events: visiblePainted; \\r\\n\\tpointer-events: auto;\\r\\n\\t}\\r\\n.leaflet-container {\\r\\n\\tbackground: #ddd;\\r\\n\\toutline-offset: 1px;\\r\\n\\t}\\r\\n.leaflet-container a {\\r\\n\\tcolor: #0078A8;\\r\\n\\t}\\r\\n.leaflet-zoom-box {\\r\\n\\tborder: 2px dotted #38f;\\r\\n\\tbackground: rgba(255,255,255,0.5);\\r\\n\\t}\\r\\n.leaflet-container {\\r\\n\\tfont-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\\r\\n\\tfont-size: 12px;\\r\\n\\tfont-size: 0.75rem;\\r\\n\\tline-height: 1.5;\\r\\n\\t}\\r\\n.leaflet-bar {\\r\\n\\tbox-shadow: 0 1px 5px rgba(0,0,0,0.65);\\r\\n\\tborder-radius: 4px;\\r\\n\\t}\\r\\n.leaflet-bar a {\\r\\n\\tbackground-color: #fff;\\r\\n\\tborder-bottom: 1px solid #ccc;\\r\\n\\twidth: 26px;\\r\\n\\theight: 26px;\\r\\n\\tline-height: 26px;\\r\\n\\tdisplay: block;\\r\\n\\ttext-align: center;\\r\\n\\ttext-decoration: none;\\r\\n\\tcolor: black;\\r\\n\\t}\\r\\n.leaflet-bar a,\\r\\n.leaflet-control-layers-toggle {\\r\\n\\tbackground-position: 50% 50%;\\r\\n\\tbackground-repeat: no-repeat;\\r\\n\\tdisplay: block;\\r\\n\\t}\\r\\n.leaflet-bar a:hover,\\r\\n.leaflet-bar a:focus {\\r\\n\\tbackground-color: #f4f4f4;\\r\\n\\t}\\r\\n.leaflet-bar a:first-child {\\r\\n\\tborder-top-left-radius: 4px;\\r\\n\\tborder-top-right-radius: 4px;\\r\\n\\t}\\r\\n.leaflet-bar a:last-child {\\r\\n\\tborder-bottom-left-radius: 4px;\\r\\n\\tborder-bottom-right-radius: 4px;\\r\\n\\tborder-bottom: none;\\r\\n\\t}\\r\\n.leaflet-bar a.leaflet-disabled {\\r\\n\\tcursor: default;\\r\\n\\tbackground-color: #f4f4f4;\\r\\n\\tcolor: #bbb;\\r\\n\\t}\\r\\n.leaflet-touch .leaflet-bar a {\\r\\n\\twidth: 30px;\\r\\n\\theight: 30px;\\r\\n\\tline-height: 30px;\\r\\n\\t}\\r\\n.leaflet-touch .leaflet-bar a:first-child {\\r\\n\\tborder-top-left-radius: 2px;\\r\\n\\tborder-top-right-radius: 2px;\\r\\n\\t}\\r\\n.leaflet-touch .leaflet-bar a:last-child {\\r\\n\\tborder-bottom-left-radius: 2px;\\r\\n\\tborder-bottom-right-radius: 2px;\\r\\n\\t}\\r\\n.leaflet-control-zoom-in,\\r\\n.leaflet-control-zoom-out {\\r\\n\\tfont: bold 18px \\'Lucida Console\\', Monaco, monospace;\\r\\n\\ttext-indent: 1px;\\r\\n\\t}\\r\\n.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {\\r\\n\\tfont-size: 22px;\\r\\n\\t}\\r\\n.leaflet-control-layers {\\r\\n\\tbox-shadow: 0 1px 5px rgba(0,0,0,0.4);\\r\\n\\tbackground: #fff;\\r\\n\\tborder-radius: 5px;\\r\\n\\t}\\r\\n.leaflet-control-layers-toggle {\\r\\n\\tbackground-image: url(images/layers.png);\\r\\n\\twidth: 36px;\\r\\n\\theight: 36px;\\r\\n\\t}\\r\\n.leaflet-retina .leaflet-control-layers-toggle {\\r\\n\\tbackground-image: url(images/layers-2x.png);\\r\\n\\tbackground-size: 26px 26px;\\r\\n\\t}\\r\\n.leaflet-touch .leaflet-control-layers-toggle {\\r\\n\\twidth: 44px;\\r\\n\\theight: 44px;\\r\\n\\t}\\r\\n.leaflet-control-layers .leaflet-control-layers-list,\\r\\n.leaflet-control-layers-expanded .leaflet-control-layers-toggle {\\r\\n\\tdisplay: none;\\r\\n\\t}\\r\\n.leaflet-control-layers-expanded .leaflet-control-layers-list {\\r\\n\\tdisplay: block;\\r\\n\\tposition: relative;\\r\\n\\t}\\r\\n.leaflet-control-layers-expanded {\\r\\n\\tpadding: 6px 10px 6px 6px;\\r\\n\\tcolor: #333;\\r\\n\\tbackground: #fff;\\r\\n\\t}\\r\\n.leaflet-control-layers-scrollbar {\\r\\n\\toverflow-y: scroll;\\r\\n\\toverflow-x: hidden;\\r\\n\\tpadding-right: 5px;\\r\\n\\t}\\r\\n.leaflet-control-layers-selector {\\r\\n\\tmargin-top: 2px;\\r\\n\\tposition: relative;\\r\\n\\ttop: 1px;\\r\\n\\t}\\r\\n.leaflet-control-layers label {\\r\\n\\tdisplay: block;\\r\\n\\tfont-size: 13px;\\r\\n\\tfont-size: 1.08333em;\\r\\n\\t}\\r\\n.leaflet-control-layers-separator {\\r\\n\\theight: 0;\\r\\n\\tborder-top: 1px solid #ddd;\\r\\n\\tmargin: 5px -10px 5px -6px;\\r\\n\\t}\\r\\n.leaflet-default-icon-path { \\r\\n\\tbackground-image: url(images/marker-icon.png);\\r\\n\\t}\\r\\n.leaflet-container .leaflet-control-attribution {\\r\\n\\tbackground: #fff;\\r\\n\\tbackground: rgba(255, 255, 255, 0.8);\\r\\n\\tmargin: 0;\\r\\n\\t}\\r\\n.leaflet-control-attribution,\\r\\n.leaflet-control-scale-line {\\r\\n\\tpadding: 0 5px;\\r\\n\\tcolor: #333;\\r\\n\\tline-height: 1.4;\\r\\n\\t}\\r\\n.leaflet-control-attribution a {\\r\\n\\ttext-decoration: none;\\r\\n\\t}\\r\\n.leaflet-control-attribution a:hover,\\r\\n.leaflet-control-attribution a:focus {\\r\\n\\ttext-decoration: underline;\\r\\n\\t}\\r\\n.leaflet-attribution-flag {\\r\\n\\tdisplay: inline !important;\\r\\n\\tvertical-align: baseline !important;\\r\\n\\twidth: 1em;\\r\\n\\theight: 0.6669em;\\r\\n\\t}\\r\\n.leaflet-left .leaflet-control-scale {\\r\\n\\tmargin-left: 5px;\\r\\n\\t}\\r\\n.leaflet-bottom .leaflet-control-scale {\\r\\n\\tmargin-bottom: 5px;\\r\\n\\t}\\r\\n.leaflet-control-scale-line {\\r\\n\\tborder: 2px solid #777;\\r\\n\\tborder-top: none;\\r\\n\\tline-height: 1.1;\\r\\n\\tpadding: 2px 5px 1px;\\r\\n\\twhite-space: nowrap;\\r\\n\\t-moz-box-sizing: border-box;\\r\\n\\t box-sizing: border-box;\\r\\n\\tbackground: rgba(255, 255, 255, 0.8);\\r\\n\\ttext-shadow: 1px 1px #fff;\\r\\n\\t}\\r\\n.leaflet-control-scale-line:not(:first-child) {\\r\\n\\tborder-top: 2px solid #777;\\r\\n\\tborder-bottom: none;\\r\\n\\tmargin-top: -2px;\\r\\n\\t}\\r\\n.leaflet-control-scale-line:not(:first-child):not(:last-child) {\\r\\n\\tborder-bottom: 2px solid #777;\\r\\n\\t}\\r\\n.leaflet-touch .leaflet-control-attribution,\\r\\n.leaflet-touch .leaflet-control-layers,\\r\\n.leaflet-touch .leaflet-bar {\\r\\n\\tbox-shadow: none;\\r\\n\\t}\\r\\n.leaflet-touch .leaflet-control-layers,\\r\\n.leaflet-touch .leaflet-bar {\\r\\n\\tborder: 2px solid rgba(0,0,0,0.2);\\r\\n\\tbackground-clip: padding-box;\\r\\n\\t}\\r\\n.leaflet-popup {\\r\\n\\tposition: absolute;\\r\\n\\ttext-align: center;\\r\\n\\tmargin-bottom: 20px;\\r\\n\\t}\\r\\n.leaflet-popup-content-wrapper {\\r\\n\\tpadding: 1px;\\r\\n\\ttext-align: left;\\r\\n\\tborder-radius: 12px;\\r\\n\\t}\\r\\n.leaflet-popup-content {\\r\\n\\tmargin: 13px 24px 13px 20px;\\r\\n\\tline-height: 1.3;\\r\\n\\tfont-size: 13px;\\r\\n\\tfont-size: 1.08333em;\\r\\n\\tmin-height: 1px;\\r\\n\\t}\\r\\n.leaflet-popup-content p {\\r\\n\\tmargin: 17px 0;\\r\\n\\tmargin: 1.3em 0;\\r\\n\\t}\\r\\n.leaflet-popup-tip-container {\\r\\n\\twidth: 40px;\\r\\n\\theight: 20px;\\r\\n\\tposition: absolute;\\r\\n\\tleft: 50%;\\r\\n\\tmargin-top: -1px;\\r\\n\\tmargin-left: -20px;\\r\\n\\toverflow: hidden;\\r\\n\\tpointer-events: none;\\r\\n\\t}\\r\\n.leaflet-popup-tip {\\r\\n\\twidth: 17px;\\r\\n\\theight: 17px;\\r\\n\\tpadding: 1px;\\r\\n\\tmargin: -10px auto 0;\\r\\n\\tpointer-events: auto;\\r\\n\\t-webkit-transform: rotate(45deg);\\r\\n\\t -moz-transform: rotate(45deg);\\r\\n\\t -ms-transform: rotate(45deg);\\r\\n\\t transform: rotate(45deg);\\r\\n\\t}\\r\\n.leaflet-popup-content-wrapper,\\r\\n.leaflet-popup-tip {\\r\\n\\tbackground: white;\\r\\n\\tcolor: #333;\\r\\n\\tbox-shadow: 0 3px 14px rgba(0,0,0,0.4);\\r\\n\\t}\\r\\n.leaflet-container a.leaflet-popup-close-button {\\r\\n\\tposition: absolute;\\r\\n\\ttop: 0;\\r\\n\\tright: 0;\\r\\n\\tborder: none;\\r\\n\\ttext-align: center;\\r\\n\\twidth: 24px;\\r\\n\\theight: 24px;\\r\\n\\tfont: 16px/24px Tahoma, Verdana, sans-serif;\\r\\n\\tcolor: #757575;\\r\\n\\ttext-decoration: none;\\r\\n\\tbackground: transparent;\\r\\n\\t}\\r\\n.leaflet-container a.leaflet-popup-close-button:hover,\\r\\n.leaflet-container a.leaflet-popup-close-button:focus {\\r\\n\\tcolor: #585858;\\r\\n\\t}\\r\\n.leaflet-popup-scrolled {\\r\\n\\toverflow: auto;\\r\\n\\t}\\r\\n.leaflet-oldie .leaflet-popup-content-wrapper {\\r\\n\\t-ms-zoom: 1;\\r\\n\\t}\\r\\n.leaflet-oldie .leaflet-popup-tip {\\r\\n\\twidth: 24px;\\r\\n\\tmargin: 0 auto;\\r\\n\\t-ms-filter: \"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";\\r\\n\\tfilter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);\\r\\n\\t}\\r\\n.leaflet-oldie .leaflet-control-zoom,\\r\\n.leaflet-oldie .leaflet-control-layers,\\r\\n.leaflet-oldie .leaflet-popup-content-wrapper,\\r\\n.leaflet-oldie .leaflet-popup-tip {\\r\\n\\tborder: 1px solid #999;\\r\\n\\t}\\r\\n.leaflet-div-icon {\\r\\n\\tbackground: #fff;\\r\\n\\tborder: 1px solid #666;\\r\\n\\t}\\r\\n.leaflet-tooltip {\\r\\n\\tposition: absolute;\\r\\n\\tpadding: 6px;\\r\\n\\tbackground-color: #fff;\\r\\n\\tborder: 1px solid #fff;\\r\\n\\tborder-radius: 3px;\\r\\n\\tcolor: #222;\\r\\n\\twhite-space: nowrap;\\r\\n\\t-webkit-user-select: none;\\r\\n\\t-moz-user-select: none;\\r\\n\\t-ms-user-select: none;\\r\\n\\tuser-select: none;\\r\\n\\tpointer-events: none;\\r\\n\\tbox-shadow: 0 1px 3px rgba(0,0,0,0.4);\\r\\n\\t}\\r\\n.leaflet-tooltip.leaflet-interactive {\\r\\n\\tcursor: pointer;\\r\\n\\tpointer-events: auto;\\r\\n\\t}\\r\\n.leaflet-tooltip-top:before,\\r\\n.leaflet-tooltip-bottom:before,\\r\\n.leaflet-tooltip-left:before,\\r\\n.leaflet-tooltip-right:before {\\r\\n\\tposition: absolute;\\r\\n\\tpointer-events: none;\\r\\n\\tborder: 6px solid transparent;\\r\\n\\tbackground: transparent;\\r\\n\\tcontent: \"\";\\r\\n\\t}\\r\\n.leaflet-tooltip-bottom {\\r\\n\\tmargin-top: 6px;\\r\\n}\\r\\n.leaflet-tooltip-top {\\r\\n\\tmargin-top: -6px;\\r\\n}\\r\\n.leaflet-tooltip-bottom:before,\\r\\n.leaflet-tooltip-top:before {\\r\\n\\tleft: 50%;\\r\\n\\tmargin-left: -6px;\\r\\n\\t}\\r\\n.leaflet-tooltip-top:before {\\r\\n\\tbottom: 0;\\r\\n\\tmargin-bottom: -12px;\\r\\n\\tborder-top-color: #fff;\\r\\n\\t}\\r\\n.leaflet-tooltip-bottom:before {\\r\\n\\ttop: 0;\\r\\n\\tmargin-top: -12px;\\r\\n\\tmargin-left: -6px;\\r\\n\\tborder-bottom-color: #fff;\\r\\n\\t}\\r\\n.leaflet-tooltip-left {\\r\\n\\tmargin-left: -6px;\\r\\n}\\r\\n.leaflet-tooltip-right {\\r\\n\\tmargin-left: 6px;\\r\\n}\\r\\n.leaflet-tooltip-left:before,\\r\\n.leaflet-tooltip-right:before {\\r\\n\\ttop: 50%;\\r\\n\\tmargin-top: -6px;\\r\\n\\t}\\r\\n.leaflet-tooltip-left:before {\\r\\n\\tright: 0;\\r\\n\\tmargin-right: -12px;\\r\\n\\tborder-left-color: #fff;\\r\\n\\t}\\r\\n.leaflet-tooltip-right:before {\\r\\n\\tleft: 0;\\r\\n\\tmargin-left: -12px;\\r\\n\\tborder-right-color: #fff;\\r\\n\\t}\\r\\n@media print {\\r\\n\\t.leaflet-control {\\r\\n\\t\\t-webkit-print-color-adjust: exact;\\r\\n\\t\\tprint-color-adjust: exact;\\r\\n\\t\\t}\\r\\n\\t}';\n"],"mappings":";AAGA,IAAaA,cACT"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { GeocodingResult, GeocodingSource } from './types.js';
|
|
2
|
+
export interface NominatimSourceOptions {
|
|
3
|
+
/** The Nominatim server. Defaults to OpenStreetMap's, whose policy allows one request a second. */
|
|
4
|
+
endpoint?: string;
|
|
5
|
+
/** An email, which OpenStreetMap's server asks of apps that send many requests. */
|
|
6
|
+
email?: string;
|
|
7
|
+
/** Limits the search to these countries (`['ca']`). */
|
|
8
|
+
countryCodes?: readonly string[];
|
|
9
|
+
/** Most results of a search. Defaults to 5. */
|
|
10
|
+
limit?: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The parts of the address of a place, from Nominatim's `addressdetails`: the region as its code
|
|
14
|
+
* for the countries whose regions Panneau knows (`QC`, from `CA-QC`), the postal code normalized.
|
|
15
|
+
*/
|
|
16
|
+
export declare function toAddressParts(details: unknown): GeocodingResult['address'] | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* An address search on Nominatim, OpenStreetMap's geocoder, with the parts of the addresses it
|
|
19
|
+
* finds. Fine for an admin panel: its public
|
|
20
|
+
* server allows one request a second and no heavy use. For more, run a server or use a service.
|
|
21
|
+
*/
|
|
22
|
+
export declare function createNominatimSource({ endpoint, email, countryCodes, limit, }?: NominatimSourceOptions): GeocodingSource;
|
|
23
|
+
//# sourceMappingURL=nominatim.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nominatim.d.ts","sourceRoot":"","sources":["../../src/location/nominatim.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAEhE,MAAM,WAAW,sBAAsB;IACnC,mGAAmG;IACnG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mFAAmF;IACnF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAYD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,eAAe,CAAC,SAAS,CAAC,GAAG,SAAS,CAiCvF;AAYD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,EAClC,QAAgD,EAChD,KAAK,EACL,YAAY,EACZ,KAAS,GACZ,GAAE,sBAA2B,GAAG,eAAe,CAiD/C"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { REGION_COUNTRIES } from "../region/regions.js";
|
|
2
|
+
import { normalizePostalCode } from "@panneau/protocol/runtime";
|
|
3
|
+
//#region src/location/nominatim.ts
|
|
4
|
+
var text = (value) => typeof value === "string" && value.trim() !== "" ? value.trim() : void 0;
|
|
5
|
+
/**
|
|
6
|
+
* The parts of the address of a place, from Nominatim's `addressdetails`: the region as its code
|
|
7
|
+
* for the countries whose regions Panneau knows (`QC`, from `CA-QC`), the postal code normalized.
|
|
8
|
+
*/
|
|
9
|
+
function toAddressParts(details) {
|
|
10
|
+
if (details === null || typeof details !== "object") return;
|
|
11
|
+
const parts = details;
|
|
12
|
+
const country = text(parts.country_code)?.toUpperCase();
|
|
13
|
+
const street = [text(parts.house_number), text(parts.road) ?? text(parts.pedestrian)].filter((part) => part !== void 0).join(" ");
|
|
14
|
+
const city = text(parts.city) ?? text(parts.town) ?? text(parts.village) ?? text(parts.municipality) ?? text(parts.hamlet);
|
|
15
|
+
const iso = text(parts["ISO3166-2-lvl4"]);
|
|
16
|
+
const region = country !== void 0 && REGION_COUNTRIES.includes(country) && iso?.startsWith(`${country}-`) === true ? iso.slice(country.length + 1) : text(parts.state);
|
|
17
|
+
const postalCode = text(parts.postcode);
|
|
18
|
+
const address = {
|
|
19
|
+
...street !== "" ? { street } : {},
|
|
20
|
+
...city !== void 0 ? { city } : {},
|
|
21
|
+
...region !== void 0 ? { region } : {},
|
|
22
|
+
...postalCode !== void 0 ? { postalCode: normalizePostalCode(postalCode, country) } : {},
|
|
23
|
+
...country !== void 0 ? { country } : {}
|
|
24
|
+
};
|
|
25
|
+
return Object.keys(address).length > 0 ? address : void 0;
|
|
26
|
+
}
|
|
27
|
+
function toResult(place) {
|
|
28
|
+
const lat = Number(place.lat);
|
|
29
|
+
const lng = Number(place.lon);
|
|
30
|
+
if (typeof place.display_name !== "string" || Number.isNaN(lat) || Number.isNaN(lng)) return null;
|
|
31
|
+
const address = toAddressParts(place.address);
|
|
32
|
+
return {
|
|
33
|
+
label: place.display_name,
|
|
34
|
+
lat,
|
|
35
|
+
lng,
|
|
36
|
+
...address !== void 0 ? { address } : {}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* An address search on Nominatim, OpenStreetMap's geocoder, with the parts of the addresses it
|
|
41
|
+
* finds. Fine for an admin panel: its public
|
|
42
|
+
* server allows one request a second and no heavy use. For more, run a server or use a service.
|
|
43
|
+
*/
|
|
44
|
+
function createNominatimSource({ endpoint = "https://nominatim.openstreetmap.org", email, countryCodes, limit = 5 } = {}) {
|
|
45
|
+
const base = endpoint.replace(/\/$/, "");
|
|
46
|
+
const request = async (path, params, { signal, locale }) => {
|
|
47
|
+
const query = new URLSearchParams({
|
|
48
|
+
format: "jsonv2",
|
|
49
|
+
addressdetails: "1",
|
|
50
|
+
...params
|
|
51
|
+
});
|
|
52
|
+
if (email !== void 0) query.set("email", email);
|
|
53
|
+
if (locale !== void 0) query.set("accept-language", locale);
|
|
54
|
+
const response = await fetch(`${base}${path}?${query}`, { signal });
|
|
55
|
+
if (!response.ok) throw new Error(`Nominatim answered ${response.status}.`);
|
|
56
|
+
return response.json();
|
|
57
|
+
};
|
|
58
|
+
return {
|
|
59
|
+
async search(text, options) {
|
|
60
|
+
const places = await request("/search", {
|
|
61
|
+
q: text,
|
|
62
|
+
limit: String(limit),
|
|
63
|
+
...countryCodes !== void 0 && countryCodes.length > 0 ? { countrycodes: countryCodes.join(",") } : {}
|
|
64
|
+
}, options);
|
|
65
|
+
return Array.isArray(places) ? places.flatMap((place) => toResult(place) ?? []) : [];
|
|
66
|
+
},
|
|
67
|
+
async reverse({ lat, lng }, options) {
|
|
68
|
+
const place = await request("/reverse", {
|
|
69
|
+
lat: String(lat),
|
|
70
|
+
lon: String(lng)
|
|
71
|
+
}, options);
|
|
72
|
+
return place !== null && typeof place === "object" ? toResult(place) : null;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
//#endregion
|
|
77
|
+
export { createNominatimSource, toAddressParts };
|
|
78
|
+
|
|
79
|
+
//# sourceMappingURL=nominatim.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nominatim.js","names":["normalizePostalCode","REGION_COUNTRIES","GeocodingResult","GeocodingSource","NominatimSourceOptions","endpoint","email","countryCodes","limit","NominatimPlace","display_name","lat","lon","address","text","value","trim","undefined","toAddressParts","details","parts","Record","country","country_code","toUpperCase","street","house_number","road","pedestrian","filter","part","join","city","town","village","municipality","hamlet","iso","region","includes","startsWith","slice","length","state","postalCode","postcode","Object","keys","toResult","place","Number","lng","isNaN","label","createNominatimSource","base","replace","request","path","params","signal","locale","AbortSignal","Promise","query","URLSearchParams","format","addressdetails","set","response","fetch","ok","Error","status","json","search","options","places","q","String","countrycodes","Array","isArray","flatMap","reverse"],"sources":["../../src/location/nominatim.ts"],"sourcesContent":["import { normalizePostalCode } from '@panneau/protocol/runtime';\n\nimport { REGION_COUNTRIES } from '../region/regions';\nimport type { GeocodingResult, GeocodingSource } from './types';\n\nexport interface NominatimSourceOptions {\n /** The Nominatim server. Defaults to OpenStreetMap's, whose policy allows one request a second. */\n endpoint?: string;\n /** An email, which OpenStreetMap's server asks of apps that send many requests. */\n email?: string;\n /** Limits the search to these countries (`['ca']`). */\n countryCodes?: readonly string[];\n /** Most results of a search. Defaults to 5. */\n limit?: number;\n}\n\ninterface NominatimPlace {\n display_name?: unknown;\n lat?: unknown;\n lon?: unknown;\n address?: unknown;\n}\n\nconst text = (value: unknown): string | undefined =>\n typeof value === 'string' && value.trim() !== '' ? value.trim() : undefined;\n\n/**\n * The parts of the address of a place, from Nominatim's `addressdetails`: the region as its code\n * for the countries whose regions Panneau knows (`QC`, from `CA-QC`), the postal code normalized.\n */\nexport function toAddressParts(details: unknown): GeocodingResult['address'] | undefined {\n if (details === null || typeof details !== 'object') {\n return undefined;\n }\n const parts = details as Record<string, unknown>;\n const country = text(parts.country_code)?.toUpperCase();\n const street = [text(parts.house_number), text(parts.road) ?? text(parts.pedestrian)]\n .filter((part) => part !== undefined)\n .join(' ');\n const city =\n text(parts.city) ??\n text(parts.town) ??\n text(parts.village) ??\n text(parts.municipality) ??\n text(parts.hamlet);\n const iso = text(parts['ISO3166-2-lvl4']);\n const region =\n country !== undefined &&\n REGION_COUNTRIES.includes(country) &&\n iso?.startsWith(`${country}-`) === true\n ? iso.slice(country.length + 1)\n : text(parts.state);\n const postalCode = text(parts.postcode);\n const address = {\n ...(street !== '' ? { street } : {}),\n ...(city !== undefined ? { city } : {}),\n ...(region !== undefined ? { region } : {}),\n ...(postalCode !== undefined\n ? { postalCode: normalizePostalCode(postalCode, country) }\n : {}),\n ...(country !== undefined ? { country } : {}),\n };\n return Object.keys(address).length > 0 ? address : undefined;\n}\n\nfunction toResult(place: NominatimPlace): GeocodingResult | null {\n const lat = Number(place.lat);\n const lng = Number(place.lon);\n if (typeof place.display_name !== 'string' || Number.isNaN(lat) || Number.isNaN(lng)) {\n return null;\n }\n const address = toAddressParts(place.address);\n return { label: place.display_name, lat, lng, ...(address !== undefined ? { address } : {}) };\n}\n\n/**\n * An address search on Nominatim, OpenStreetMap's geocoder, with the parts of the addresses it\n * finds. Fine for an admin panel: its public\n * server allows one request a second and no heavy use. For more, run a server or use a service.\n */\nexport function createNominatimSource({\n endpoint = 'https://nominatim.openstreetmap.org',\n email,\n countryCodes,\n limit = 5,\n}: NominatimSourceOptions = {}): GeocodingSource {\n const base = endpoint.replace(/\\/$/, '');\n const request = async (\n path: string,\n params: Record<string, string>,\n { signal, locale }: { signal: AbortSignal; locale?: string },\n ): Promise<unknown> => {\n // The parts of addresses, for `address` fields\n const query = new URLSearchParams({ format: 'jsonv2', addressdetails: '1', ...params });\n if (email !== undefined) {\n query.set('email', email);\n }\n if (locale !== undefined) {\n query.set('accept-language', locale);\n }\n const response = await fetch(`${base}${path}?${query}`, { signal });\n if (!response.ok) {\n throw new Error(`Nominatim answered ${response.status}.`);\n }\n return response.json();\n };\n return {\n async search(text, options) {\n const places = await request(\n '/search',\n {\n q: text,\n limit: String(limit),\n ...(countryCodes !== undefined && countryCodes.length > 0\n ? { countrycodes: countryCodes.join(',') }\n : {}),\n },\n options,\n );\n return Array.isArray(places)\n ? places.flatMap((place: NominatimPlace) => toResult(place) ?? [])\n : [];\n },\n async reverse({ lat, lng }, options) {\n const place = await request(\n '/reverse',\n { lat: String(lat), lon: String(lng) },\n options,\n );\n return place !== null && typeof place === 'object'\n ? toResult(place as NominatimPlace)\n : null;\n },\n };\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { GeocodingResult, GeocodingSource } from './types.js';
|
|
2
|
+
/** The shortest text that the address search looks for. */
|
|
3
|
+
export declare const SEARCH_MIN_LENGTH = 3;
|
|
4
|
+
/** The search of addresses: results of the text typed, after a pause. */
|
|
5
|
+
export declare function useAddressSearch(geocoding: GeocodingSource | null, query: string, locale: string): {
|
|
6
|
+
query: string;
|
|
7
|
+
results: GeocodingResult[];
|
|
8
|
+
loading: boolean;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/location/search.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAGhE,2DAA2D;AAC3D,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAEnC,yEAAyE;AACzE,wBAAgB,gBAAgB,CAC5B,SAAS,EAAE,eAAe,GAAG,IAAI,EACjC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACf;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,eAAe,EAAE,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CA6BjE"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { c } from "react/compiler-runtime";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
//#region src/location/search.ts
|
|
4
|
+
var SEARCH_DELAY = 400;
|
|
5
|
+
/** The search of addresses: results of the text typed, after a pause. */
|
|
6
|
+
function useAddressSearch(geocoding, query, locale) {
|
|
7
|
+
const $ = c(9);
|
|
8
|
+
let t0;
|
|
9
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10
|
+
t0 = {
|
|
11
|
+
query: "",
|
|
12
|
+
results: [],
|
|
13
|
+
loading: false
|
|
14
|
+
};
|
|
15
|
+
$[0] = t0;
|
|
16
|
+
} else t0 = $[0];
|
|
17
|
+
const [state, setState] = useState(t0);
|
|
18
|
+
let t1;
|
|
19
|
+
let t2;
|
|
20
|
+
if ($[1] !== geocoding || $[2] !== locale || $[3] !== query) {
|
|
21
|
+
t1 = () => {
|
|
22
|
+
const text = query.trim();
|
|
23
|
+
if (geocoding === null || text.length < 3) return;
|
|
24
|
+
const controller = new AbortController();
|
|
25
|
+
const timeout = window.setTimeout(() => {
|
|
26
|
+
setState(_temp);
|
|
27
|
+
geocoding.search(text, {
|
|
28
|
+
signal: controller.signal,
|
|
29
|
+
locale
|
|
30
|
+
}).then((results) => setState({
|
|
31
|
+
query: text,
|
|
32
|
+
results,
|
|
33
|
+
loading: false
|
|
34
|
+
})).catch(() => {
|
|
35
|
+
if (!controller.signal.aborted) setState({
|
|
36
|
+
query: text,
|
|
37
|
+
results: [],
|
|
38
|
+
loading: false
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
}, SEARCH_DELAY);
|
|
42
|
+
return () => {
|
|
43
|
+
window.clearTimeout(timeout);
|
|
44
|
+
controller.abort();
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
t2 = [
|
|
48
|
+
geocoding,
|
|
49
|
+
query,
|
|
50
|
+
locale
|
|
51
|
+
];
|
|
52
|
+
$[1] = geocoding;
|
|
53
|
+
$[2] = locale;
|
|
54
|
+
$[3] = query;
|
|
55
|
+
$[4] = t1;
|
|
56
|
+
$[5] = t2;
|
|
57
|
+
} else {
|
|
58
|
+
t1 = $[4];
|
|
59
|
+
t2 = $[5];
|
|
60
|
+
}
|
|
61
|
+
useEffect(t1, t2);
|
|
62
|
+
let t3;
|
|
63
|
+
if ($[6] !== query || $[7] !== state) {
|
|
64
|
+
t3 = query.trim().length >= 3 ? state : {
|
|
65
|
+
...state,
|
|
66
|
+
results: []
|
|
67
|
+
};
|
|
68
|
+
$[6] = query;
|
|
69
|
+
$[7] = state;
|
|
70
|
+
$[8] = t3;
|
|
71
|
+
} else t3 = $[8];
|
|
72
|
+
return t3;
|
|
73
|
+
}
|
|
74
|
+
function _temp(current) {
|
|
75
|
+
return {
|
|
76
|
+
...current,
|
|
77
|
+
loading: true
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
//#endregion
|
|
81
|
+
export { useAddressSearch };
|
|
82
|
+
|
|
83
|
+
//# sourceMappingURL=search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.js","names":["useEffect","useState","GeocodingResult","GeocodingSource","SEARCH_DELAY","SEARCH_MIN_LENGTH","useAddressSearch","geocoding","query","locale","$","_c","t0","Symbol","for","results","loading","state","setState","t1","t2","text","trim","length","controller","AbortController","timeout","window","setTimeout","_temp","search","signal","then","catch","aborted","clearTimeout","abort","t3","current","_c"],"sources":["../../src/location/search.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport type { GeocodingResult, GeocodingSource } from './types';\n\nconst SEARCH_DELAY = 400;\n/** The shortest text that the address search looks for. */\nexport const SEARCH_MIN_LENGTH = 3;\n\n/** The search of addresses: results of the text typed, after a pause. */\nexport function useAddressSearch(\n geocoding: GeocodingSource | null,\n query: string,\n locale: string,\n): { query: string; results: GeocodingResult[]; loading: boolean } {\n const [state, setState] = useState<{\n query: string;\n results: GeocodingResult[];\n loading: boolean;\n }>({ query: '', results: [], loading: false });\n useEffect(() => {\n const text = query.trim();\n if (geocoding === null || text.length < SEARCH_MIN_LENGTH) {\n return undefined;\n }\n const controller = new AbortController();\n const timeout = window.setTimeout(() => {\n setState((current) => ({ ...current, loading: true }));\n geocoding\n .search(text, { signal: controller.signal, locale })\n .then((results) => setState({ query: text, results, loading: false }))\n .catch(() => {\n if (!controller.signal.aborted) {\n setState({ query: text, results: [], loading: false });\n }\n });\n }, SEARCH_DELAY);\n return () => {\n window.clearTimeout(timeout);\n controller.abort();\n };\n }, [geocoding, query, locale]);\n return query.trim().length >= SEARCH_MIN_LENGTH ? state : { ...state, results: [] };\n}\n"],"mappings":";;;AAIA,IAAMI,eAAe;;AAKrB,SAAOE,iBAAAC,WAAAC,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAG,OAAAC,IAAA,2BAAA,GAAA;EASAF,KAAA;GAAAJ,OAAS;GAAEO,SAAW,CAAA;GAAEC,SAAW;EAAM;EAACN,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAJ7C,MAAA,CAAAO,OAAAC,YAA0BjB,SAIvBW,EAA0C;CAAE,IAAAO;CAAA,IAAAC;CAAA,IAAAV,EAAA,OAAAH,aAAAG,EAAA,OAAAD,UAAAC,EAAA,OAAAF,OAAA;EACrCW,WAAA;GACN,MAAAE,OAAab,MAAKc,KAAM;GACxB,IAAIf,cAAc,QAAQc,KAAIE,SAAAA,GAA2B;GAGzD,MAAAC,aAAmB,IAAIC,gBAAgB;GACvC,MAAAC,UAAgBC,OAAMC,iBAAY;IAC9BV,SAASW,KAA4C;IACrDtB,UAASuB,OACGT,MAAM;KAAAU,QAAUP,WAAUO;KAAOtB;IAAS,CAAC,CAAC,CAAAuB,MAC9CjB,YAAaG,SAAS;KAAAV,OAASa;KAAIN;KAAAC,SAAoB;IAAM,CAAC,CAAC,CAAC,CAAAiB,YAC/D;KACH,IAAI,CAACT,WAAUO,OAAOG,SAClBhB,SAAS;MAAAV,OAASa;MAAIN,SAAW,CAAA;MAAEC,SAAW;KAAM,CAAC;IACxD,CACJ;GAAC,GACPZ,YAAY;GAAE,aACV;IACHuB,OAAMQ,aAAcT,OAAO;IAC3BF,WAAUY,MAAO;GAAC;EACrB;EACFhB,KAAA;GAACb;GAAWC;GAAOC;EAAM;EAACC,EAAA,KAAAH;EAAAG,EAAA,KAAAD;EAAAC,EAAA,KAAAF;EAAAE,EAAA,KAAAS;EAAAT,EAAA,KAAAU;CAAA,OAAA;EAAAD,KAAAT,EAAA;EAAAU,KAAAV,EAAA;CAAA;CArB7BV,UAAUmB,IAqBPC,EAA0B;CAAC,IAAAiB;CAAA,IAAA3B,EAAA,OAAAF,SAAAE,EAAA,OAAAO,OAAA;EACvBoB,KAAA7B,MAAKc,KAAM,CAAC,CAAAC,UAAAA,IAAZN,QAAA;GAAA,GAAwDA;GAAKF,SAAW,CAAA;EAAG;EAACL,EAAA,KAAAF;EAAAE,EAAA,KAAAO;EAAAP,EAAA,KAAA2B;CAAA,OAAAA,KAAA3B,EAAA;CAAA,OAA5E2B;AAA4E;AAhChF,SAAAR,MAAAS,SAAA;CAAA,OAiB4B;EAAA,GAAKA;EAAOtB,SAAW;CAAK;AAAC"}
|