@g9tm/lynxcontrols-map 0.0.0-stage → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,18 @@
1
- # Temporary Holding Version
1
+ # @g9tm/lynxcontrols-map
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A map without a map SDK: tiles from the app's tile source as images, pins and zones drawn over them, and the
4
+ web-mercator math to place them. Opt-in.
5
+
6
+ ```tsx
7
+ import { G9StaticMap } from '@g9tm/lynxcontrols-map';
8
+
9
+ <G9StaticMap tileTemplate="https://{s}.example.com/{z}/{x}/{y}.png" subdomains="abc" attribution="© OpenStreetMap"
10
+ height={220} fit pins={branches} shapes={[{ id: 'zone', kind: 'zone', points: area }]} />
11
+ ```
12
+
13
+ **`G9StaticMap`** shows the tiles that cover its box, the pins (numbered or labelled) and zones or routes. `fit` frames
14
+ every pin and shape; the attribution is always shown. The tile source belongs to the app, usually with a map service
15
+ key: a test build without a key can show the outlines on a plain background.
16
+
17
+ Model (pure, tested): `project` / `unproject` (web mercator), `fitBounds`, `tilesFor`, `tileUrl`, `toView`, `pathOf`,
18
+ `distanceMeters`, `insidePolygon`, `g9TileSize`.
@@ -0,0 +1 @@
1
+ {"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/@types/react/global.d.ts","../../../node_modules/@types/react/node_modules/csstype/index.d.ts","../../../node_modules/@types/prop-types/index.d.ts","../../../node_modules/@types/react/index.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/animation.d.ts","../../../node_modules/csstype/index.d.ts","../../../node_modules/@lynx-js/types/types/common/csstype.d.ts","../../../node_modules/@lynx-js/types/types/main-thread/animation.d.ts","../../../node_modules/@lynx-js/types/types/main-thread/element.d.ts","../../../node_modules/@lynx-js/types/types/common/events.d.ts","../../../node_modules/@lynx-js/types/types/common/system-info.d.ts","../../../node_modules/@lynx-js/types/types/common/performance.d.ts","../../../node_modules/@lynx-js/types/types/main-thread/lynx.d.ts","../../../node_modules/@lynx-js/types/types/main-thread/events.d.ts","../../../node_modules/@lynx-js/types/types/main-thread/index.d.ts","../../../node_modules/@lynx-js/types/types/common/lynx.d.ts","../../../node_modules/@lynx-js/types/types/common/global.d.ts","../../../node_modules/@lynx-js/types/types/common/props.d.ts","../../../node_modules/@lynx-js/types/types/common/element/component.d.ts","../../../node_modules/@lynx-js/types/types/common/element/filter-image.d.ts","../../../node_modules/@lynx-js/types/types/common/element/image.d.ts","../../../node_modules/@lynx-js/types/types/common/element/common.d.ts","../../../node_modules/@lynx-js/types/types/common/element/inline-image.d.ts","../../../node_modules/@lynx-js/types/types/common/element/list.d.ts","../../../node_modules/@lynx-js/types/types/common/element/list-item.d.ts","../../../node_modules/@lynx-js/types/types/common/element/page.d.ts","../../../node_modules/@lynx-js/types/types/common/element/scroll-view.d.ts","../../../node_modules/@lynx-js/types/types/common/element/text.d.ts","../../../node_modules/@lynx-js/types/types/common/element/view.d.ts","../../../node_modules/@lynx-js/types/types/common/element/input.d.ts","../../../node_modules/@lynx-js/types/types/common/element/textarea.d.ts","../../../node_modules/@lynx-js/types/types/common/element/title-bar-view.d.ts","../../../node_modules/@lynx-js/types/types/common/element/svg.d.ts","../../../node_modules/@lynx-js/types/types/common/element/refresh.d.ts","../../../node_modules/@lynx-js/types/types/common/element/scroll-coordinator.d.ts","../../../node_modules/@lynx-js/types/types/common/element/viewpager.d.ts","../../../node_modules/@lynx-js/types/types/common/element/blur-view.d.ts","../../../node_modules/@lynx-js/types/types/common/element/webview.d.ts","../../../node_modules/@lynx-js/types/types/common/element/markdown.d.ts","../../../node_modules/@lynx-js/types/types/common/element/video.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/lynx-performance-entry.d.ts","../../../node_modules/@lynx-js/types/types/common/element/frame.d.ts","../../../node_modules/@lynx-js/types/types/common/element/overlay.d.ts","../../../node_modules/@lynx-js/types/types/common/element/element.d.ts","../../../node_modules/@lynx-js/types/types/common/element/methods.d.ts","../../../node_modules/@lynx-js/types/types/common/element/attributes.d.ts","../../../node_modules/@lynx-js/types/types/common/element/index.d.ts","../../../node_modules/@lynx-js/types/types/common/console.d.ts","../../../node_modules/@lynx-js/types/types/common/index.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/event.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/nodes-ref.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/app.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/performance.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/fetch.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/lynx.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/native-modules.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/text-encoder-decoder.d.ts","../../../node_modules/@lynx-js/types/types/background-thread/index.d.ts","../../../node_modules/@lynx-js/types/types/index.d.ts","../../../node_modules/@types/react/jsx-runtime.d.ts","../../../node_modules/@lynx-js/react/runtime/jsx-runtime/index.d.ts","../src/model.ts","../../../node_modules/@lynx-js/react/runtime/lib/runtime-marker.d.ts","../../../node_modules/preact/src/jsx.d.ts","../../../node_modules/preact/src/dom.d.ts","../../../node_modules/preact/src/index.d.ts","../../../node_modules/preact/hooks/src/index.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/core/hooks/react.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/snapshot/lynx/runwithforce.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/lynx.d.ts","../../../node_modules/preact/compat/src/suspense.d.ts","../../../node_modules/preact/compat/src/index.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/snapshot/lynx/children.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/snapshot/lynx/element.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/snapshot/lynx/portalspending.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/snapshot/lynx/portals.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/snapshot/lynx/suspense.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/core/hooks/uselynxglobaleventlistener.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/core/globalprops.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/core/initdata.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/core/lynx-data-processors.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/core/background-function/run-on-background.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/snapshot/worklet/call/runonmainthread.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/worklet-runtime/api/animation/effect.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/worklet-runtime/api/animation/animation.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/worklet-runtime/api/element.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/worklet-runtime/bindings/types.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/core/main-thread-ref.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/core/main-thread-object.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/lynx-api.d.ts","../../../node_modules/@lynx-js/react/runtime/lib/index.d.ts","../../../node_modules/@lynx-js/react/types/react.docs.d.ts","../../../node_modules/@lynx-js/react/types/react.d.ts","../../foundation/dist/collections.d.ts","../../foundation/dist/culture/bidi.d.ts","../../foundation/dist/culture/digits.d.ts","../../foundation/dist/culture/culture.d.ts","../../foundation/dist/culture/calendar.d.ts","../../foundation/dist/culture/coordinates.d.ts","../../foundation/dist/culture/date-format.d.ts","../../foundation/dist/culture/duration.d.ts","../../foundation/dist/culture/natural-date.d.ts","../../foundation/dist/culture/numbers.d.ts","../../foundation/dist/culture/strings.d.ts","../../foundation/dist/culture/relative-time.d.ts","../../foundation/dist/culture/text.d.ts","../../foundation/dist/culture/index.d.ts","../../foundation/dist/enums/index.d.ts","../../foundation/dist/errors.d.ts","../../foundation/dist/exec/diagnostics.d.ts","../../foundation/dist/services/abort.d.ts","../../foundation/dist/exec/options.d.ts","../../foundation/dist/services/clock.d.ts","../../foundation/dist/exec/trace.d.ts","../../foundation/dist/exec/safe-executor.d.ts","../../foundation/dist/exec/index.d.ts","../../foundation/dist/icons/generated/glyph-svg.d.ts","../../foundation/dist/icons/glyph.d.ts","../../foundation/dist/icons/icon.d.ts","../../foundation/dist/icons/glyph-slots.d.ts","../../foundation/dist/icons/icon-fonts.d.ts","../../foundation/dist/icons/packs.d.ts","../../foundation/dist/icons/svg.d.ts","../../foundation/dist/icons/index.d.ts","../../foundation/dist/layout/index.d.ts","../../foundation/dist/route/address.d.ts","../../foundation/dist/route/catalogue.d.ts","../../foundation/dist/route/journey.d.ts","../../foundation/dist/route/sink.d.ts","../../foundation/dist/route/resolve.d.ts","../../foundation/dist/route/view.d.ts","../../foundation/dist/route/index.d.ts","../../foundation/dist/services/feedback.d.ts","../../foundation/dist/services/preferences.d.ts","../../foundation/dist/services/contracts.d.ts","../../foundation/dist/services/keys.d.ts","../../foundation/dist/services/motion.d.ts","../../foundation/dist/services/index.d.ts","../../foundation/dist/tokens/generated/palettes.d.ts","../../foundation/dist/theme/aliases.d.ts","../../foundation/dist/tokens/shape.d.ts","../../foundation/dist/theme/color.d.ts","../../foundation/dist/theme/theme.d.ts","../../foundation/dist/theme/brand.d.ts","../../foundation/dist/theme/appearance.d.ts","../../foundation/dist/theme/contrast.d.ts","../../foundation/dist/theme/control-colors.d.ts","../../foundation/dist/theme/css-color.d.ts","../../foundation/dist/theme/design.d.ts","../../foundation/dist/theme/oklch.d.ts","../../foundation/dist/theme/recipe.d.ts","../../foundation/dist/tokens/generated/metrics.d.ts","../../foundation/dist/tokens/layout-metrics.d.ts","../../foundation/dist/tokens/css-vars.d.ts","../../foundation/dist/tokens/derived.d.ts","../../foundation/dist/theme/variants.d.ts","../../foundation/dist/theme/index.d.ts","../../foundation/dist/tokens/index.d.ts","../../foundation/dist/index.d.ts","../../controls/dist/anchor/registry.d.ts","../../controls/dist/anchor/hooks.d.ts","../../controls/dist/base/control.d.ts","../../controls/dist/base/corner-badge.d.ts","../../controls/dist/base/disposer.d.ts","../../controls/dist/base/press.d.ts","../../controls/dist/base/pressable.d.ts","../../controls/dist/display/shimmer.d.ts","../../controls/dist/sheet/options.d.ts","../../controls/dist/guide/settings.d.ts","../../controls/dist/popup/types.d.ts","../../controls/dist/provider/settings.d.ts","../../controls/dist/icon/icon.d.ts","../../controls/dist/base/selection-item.d.ts","../../controls/dist/base/timers.d.ts","../../controls/dist/base/tone.d.ts","../../controls/dist/base/use-controllable-state.d.ts","../../controls/dist/base/use-stable-callback.d.ts","../../controls/dist/base/index.d.ts","../src/static-map.tsx","../src/index.ts"],"fileIdsList":[[41,96,97,130],[103,104,109,115],[41,104],[41,103,104,109,115],[41,124],[100,103,105,107,109,110,111,113,114,127],[41,115,116,117,118,119,120,125,126],[105,106],[103,109],[41,96,130],[41,96,103,112,130],[103],[121],[123],[122],[41,96,98,129,130],[41,105,127,128],[42,86,87,88],[53],[42,78,87,88,89,90,92,93,94],[42,86,87,88,90,91],[86,88],[42,86],[49,78],[43],[44],[51,55],[47],[41,51,55,56,57,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,79,80],[47,51,55,78],[47,51,55],[56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,79,80,81,82,83],[58,59],[47,51,55,59],[47,61,64],[46],[48,52,53,95],[44,47,48,49,51,53,54,55,84,85],[44,47],[52,86,95],[45,86],[46,47,55],[45,46,50,51],[49,86],[38,39,40],[41],[101,103,104,108],[101,102],[96,130,197],[96,130,196],[96,130,197,198],[130],[199,200,201,202,203,210,211,212,213,214],[130,199,202],[196,209],[196,205],[41,130,196,208],[130,196,209],[130,196,205,206,207],[130,196,204,209],[134],[133],[133,134,135],[132,133,134,135,136,137,138,139,140,141,142,143],[135],[141],[147,149,151,152],[148],[141,147,148,149,150,151],[147,150],[156],[155],[154,155,156,157,158,159,160],[131,144,145,146,153,161,162,169,175,194,195],[146],[146,163],[163,164,165,166,167,168],[164],[163,164,166],[163],[146,148,150,166,170,171],[148,150,170,171,172,173,174],[176],[176,178,180,181],[176,179,180],[179,180],[179],[178,180],[177,179,180,181,182,183,184,185,186,187,188,193],[176,179],[145,176,179,192],[176,189,190],[176,191],[176,178,189,190,191,192],[98,99,216],[98],[98,99,130,215]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb5b19b86227ace1d29ea4cf81387279d04bb34051e944bc53df69f58914b788","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6fdd3074ba01fc8aff89a11055a33516aff7a42a3599fc0e7dce64047a5e3fd","impliedFormat":1},{"version":"87d9d29dbc745f182683f63187bf3d53fd8673e5fca38ad5eaab69798ed29fbc","impliedFormat":1},{"version":"035312d4945d13efa134ae482f6dc56a1a9346f7ac3be7ccbad5741058ce87f3","affectsGlobalScope":true,"impliedFormat":1},{"version":"07b03f752ae52a7130e06c5a8399d3a0dde07a1a634f8430b80cd6236c56b5c8","impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"acbac4ca6cd4b2b459debc4a274535775cb6278a8315be383fafa623ab78f18e","impliedFormat":1},{"version":"e421d0b097c78304a2597c1f33da586630e1dc665ae381c0c36e5ebc4aaf4566","impliedFormat":1},{"version":"adf624c89a0d509a789f3c0bf522969d2c47033dbeb50920b37cd89be475a65e","impliedFormat":1},{"version":"f4664d05efc95a0fb8ee228d391e5271a1c8fc9bc3452c7bd760f9ca18b5a837","impliedFormat":1},{"version":"b32b532dcbe0a91d71fd94cb780e94bdfdce10be21608d914c29fb4b8939b24a","impliedFormat":1},{"version":"eb2b64881998b562a4fe9330e55aa2466cd3a41a1a57e93feac6555218cec06f","impliedFormat":1},{"version":"6db1694d205177322d792d924335b046b80607445a45c0d2de1fcffd190b48c0","impliedFormat":1},{"version":"d5465281e0aaffe267f46382c5f014740dc16e7fd8e1c57a0b0ddf8a2eab9be4","impliedFormat":1},{"version":"f7e5c3960dd9df65d83408b9be446f7119fa1db1dd8266dd343349d90c3bf2ce","impliedFormat":1},{"version":"09c6491ed74af89a4155feafedecaf77780f5751c66d4b65b18d30fc0e053a75","impliedFormat":1},{"version":"188b01044640e5ef65f6edf0dd6e6454f02dd19f4ead66b9e03ebe26cc7298ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d34d6de13412a24e8d9252040d972edce68b4db8d8a64a3f7fd63ca1fda3a67f","impliedFormat":1},{"version":"5bf51107315834a209b08395b141e262b7d143d14f6b4e4d403d8e020cef7e32","impliedFormat":1},{"version":"db0dcbe48d5cb38315083b412c8ab6995b0d42dc73b286833e296827feb0e5b4","impliedFormat":1},{"version":"b3e4a49a3ba19463662e7b821544948b953d2f6708370d42406bda558084000c","impliedFormat":1},{"version":"7c5e49b3d96da389b07d4ae3705c9f33a03dadcd04e6c0e76edece6d636f4ce7","impliedFormat":1},{"version":"24e9add3c802e7c9431b2c99edbbda02c1899901fd955dfb2e9ee3e9cdc93c4c","impliedFormat":1},{"version":"cd6611fd8cd9d40de1bdec02a3c5027c968c4aaf7639ee88ee48b2c41edeaddc","impliedFormat":1},{"version":"32d1e153cac16ca3a3f5f6b68fae76cddcda509950fa00d038c465776359db0c","impliedFormat":1},{"version":"0d85d0fa55dd433acf924675d7e976c025c8521c91a76079844cd15e52855ccf","impliedFormat":1},{"version":"89da6ea3ee9735e712691227b0e5ee74381779f9ad8b0f4fb7ced0247b16735a","impliedFormat":1},{"version":"77fbe475cb649a3598aa8f932ab5f6fe011444d94b52d329078c1f6d63c5d3bd","impliedFormat":1},{"version":"7618f7fdf0abf7f712cefe766ac1ab7fcd1f8e753c513e57d3ada9ada3a57257","impliedFormat":1},{"version":"db0441149b37984c225e945a112713d07616b34552d64f814c5cbf8e8c95f165","impliedFormat":1},{"version":"51f5a8fa3de5f13b21ba2604b4de8f0aae3d97acadab981d536a282ea26257af","impliedFormat":1},{"version":"0e323630cbfda771430e2720f6a2f02f257becd8fb9722aa975ae773fb572210","impliedFormat":1},{"version":"56dbc770513baae28f7cfbadeba5078bb13a37a13132a5292e98a8b103312b98","impliedFormat":1},{"version":"84ff906032fe12e816bfb7441cee6726243e5a7316c4f2d6b0a6c149f1a91a16","impliedFormat":1},{"version":"446e9432c63958893f65b4f7eea86fb5b506c2e0e7dd971a1f75e361b333a3db","impliedFormat":1},{"version":"dcbbe1fb0f2c0efc12e29db8bbccb5b82513384d01d7a55342065cb0611da272","impliedFormat":1},{"version":"af209189a194cf5ad1f7b22dd680b52843fec2e30f1283be20b2977872fd4424","impliedFormat":1},{"version":"18e37ffc10db360e66b0af639e55bcc66496830994734f64a97c6751458f7f3a","impliedFormat":1},{"version":"14137199a98201c616a7ee925bfaa9809b659dfbec733f86fa5dc5348a897de6","impliedFormat":1},{"version":"f64cd565aca17df45f4666473da75e4ce51a2610e2ed1c31198e9f9325747a24","impliedFormat":1},{"version":"e415a17ab6a413d6be640457231e045541405eab1f0f370c7dd1e5567aa25999","impliedFormat":1},{"version":"8c03a41d6dc701b6648db83d71a92dc27147d7677ab5d70f32675e7e37b3795a","impliedFormat":1},{"version":"e27b62f2410bb10697800d1c09ae2c48db46cd1eca18ffdd35022b1802bfd6d5","impliedFormat":1},{"version":"2ec0bfa713f313f8b2dc2bf64c5962433722ea7b413f69428106a65584656dc9","impliedFormat":1},{"version":"b2d74af681f440a07e714ae9a33e3ea49c79870b9674058114c0404d2aa2f190","impliedFormat":1},{"version":"24f31e43eb3505e5d2946315e7b8ee8b426dfbe92c3031e435a4eb2d9dd8d69f","affectsGlobalScope":true,"impliedFormat":1},{"version":"5b6a59d1e98f908badf07f243deb42ebd926b4e3d33ec00a5f50cbb8d0464488","impliedFormat":1},{"version":"c669ee7ba01fa6a60b17c3535f96b65fa82dfd2a475a8760364f2f3952f9bcbd","impliedFormat":1},{"version":"a8b121f6a75d603075e62793ff0c109112e882dd6ca2b70bdccbd8d8f753429b","impliedFormat":1},{"version":"f378d7ed5e3ecbe382ade55127a9c98e826c76f786e06effad6fde91a7023d55","impliedFormat":1},{"version":"4e3e9539df72b3bfcc56fa13140070020dac72f1eff39237b11253482cb99847","impliedFormat":1},{"version":"5a47b3a2bbe2c9b015fe356462afe0abe391c592fffbe277126e2415e0811967","impliedFormat":1},{"version":"b1248e5931d2a49c697203e69449c58dacd3d19f12d76bf11d816600a0cf423b","impliedFormat":1},{"version":"0b02aebd8c41453aefd3b1f33b9b9862a57770f8b21e916ecc5b35c0bedcc52b","impliedFormat":1},{"version":"e52840670587e82e129c9bfc6a2f42d9c2f2e1fd6ce176fea998383a8c941ea5","impliedFormat":1},{"version":"31ca1ee726f5d7c7709913b98be76fc40fdfaaca6ad7fafc222108981e11227c","impliedFormat":1},{"version":"556db73da59f5162cdf5c7ea1bc3b063b6ccb758078ef6517ad6f6e4ae7b199a","impliedFormat":1},{"version":"0a2c8ef08611f5a5f711c7b10ba70d10dc1c6af0c9dba8168cbbf34911b74188","impliedFormat":1},{"version":"1d6ef45145a9939a43062fe18188d4f7bdfdf4547978e1f6b7c9089fe53e81e5","impliedFormat":1},{"version":"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","impliedFormat":1},{"version":"509a86836776d5c821901abc16a2d21de674d2c8943ceb8d018049bf324bc56c","impliedFormat":99},{"version":"77550048eedeca07db2c8125e817f0b2805eaa8830d168160d83ca5c0a371e3b","signature":"5f905b1c538f275ad904507013777fab0706bd26733336f77a8a808d795b22e1"},{"version":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":99},{"version":"8a2ef120c4da7aab664148ed8d283aa0b98df4d5f15c570d830c8998ef05718b","impliedFormat":1},{"version":"4433d18f82991634feae5150a68f9b30f5b05b55416af8ff9f7251fb29431ed5","impliedFormat":1},{"version":"cc5d0b221824b7d8597e8a2bbdad2383af877eb564eaca392992049839e88c9e","impliedFormat":1},{"version":"21898d939444825cee1232af435330610b09171bea22a2f892cf2058d764b63d","impliedFormat":1},{"version":"2baebea93983e898000858daeeeb2ac29938891b6b8db72ebce294837fc9499f","impliedFormat":99},{"version":"d9d320cf31f6d63659484f6c9ca4db4ae673daefa65118dd8589838925ff1397","impliedFormat":99},{"version":"027cf2216d065a97bf5a8ea126b3ea2734fab6cfe32adaff81ab4e94a1b51bbe","impliedFormat":99},{"version":"f6e6313fad233c5141220f7d25eae120cdd6e5079fbe0aba56821a1e99d05df8","impliedFormat":1},{"version":"9534c35b4577c193e499178deb47419fdadddd5e53af5ec8cb88218848013f65","impliedFormat":1},{"version":"97f43a6558157a3abae4e32256cc74ba34f69ab30473008ffa13011bf0932986","impliedFormat":99},{"version":"45b8adde5735e97329752dd5598b7ecd85202f221a1d0e8aa90137ce5810f21c","impliedFormat":99},{"version":"dfe6945467765f8e7843442a9dfbcf6b5526b6465b07b4c75a54a750329b5f17","impliedFormat":99},{"version":"7f9f6c9fe0e48c401d855d849e28112ffe2425569eca01b08b8c6112b8200695","impliedFormat":99},{"version":"68fcdc663627d12d336b420b19b3e54258844d0cbca0879f711c22aafd853352","impliedFormat":99},{"version":"d3dd47deefa1cc5dd6f1b866132506ec8dfd678ae0ddaa44de188505df14fcc4","impliedFormat":99},{"version":"a5946bc88dac85da2afacdfa3471ff3bc2bbda7c0e34efde184cf17e6bceb6bc","impliedFormat":99},{"version":"75b68165b9bcc07579562f182d327e83583b89b91d62e76b86f4001feee699ba","impliedFormat":99},{"version":"a9d1030f6773d29b383f49e2c647a7e6e464906e1de97a6bc33d2528d957c4d7","impliedFormat":99},{"version":"37b997d60987b68ce8117da783442b4602c8a85d47680823d469fdc90d29e3b8","impliedFormat":99},{"version":"600850ecc310012e3b1a562629d97a1d78662ae8c477357513dd2e6aa704079b","impliedFormat":99},{"version":"335226d599a9382c9bea07d37e23bf998c1022c0f67e4d6d2b69633de6ac118f","impliedFormat":99},{"version":"ae430fd9bac320e71c3fe9299d90dcf67555d9a4f97ecaa35947b430ba8648ea","impliedFormat":99},{"version":"9061ff14146280f47d740b344ddd641c16df526ecaa868c348852277a9fb8686","impliedFormat":99},{"version":"49ee4555c2fafa01119cccc62436baad88ed937ff55d6a655e764ada6b0721e3","impliedFormat":99},{"version":"e059fb9064bc023bc06945ddda6b00e711c18e8657c82514b51c1c1b828642e9","impliedFormat":99},{"version":"f01b3b376946defc432893dcbbbc79472076b6a55a316b0a461a1b38d09e961c","impliedFormat":99},{"version":"da74d8af20172cfee988a2daf92c560f3fdc816fb9c0537f2cc37ef27b1552a8","impliedFormat":99},{"version":"feed66ae8815d1981ad575482766fb9a82385e75cce35ae2f13be58e50c4349f","impliedFormat":99},{"version":"21305b3c41b1e29c0f0d8f43fe227bca82493f6e4c6407a3363c6f729f1c04ba","affectsGlobalScope":true,"impliedFormat":99},{"version":"20c1041fbd4f1537686af4b707872b87c90a22201f8979e5def4554d28b46a5b","impliedFormat":99},"d533d1fe3018752aa47ee74ae5dbdca34377441b891176ad99bd33366a64372f","577287aa28cdd2976297531706a5baea4ba5171512f500731d3feba37057d851","44b82e4f46178400732ea809a906f7ffb9dd38efab331ca23e7ca4586bf903ef","d3dcff003bac57338c3e60be409d0ff167ec1ff513539a5534c7679332dbc992","16d64c89cec74fa23e8cee7c72acc7549f117dcf7845051870c40366c7522d09","706c787ed201e67534e550d765eecfb18a8c39f46e04fcec600d0bb9d1bb6231","11f9f682c02d51de68eed569f8de1e91c56df296a78f3a6c520b93d52aac2308","28b43630d8d29a300e1e5b0f5efb04c8f994d372fff1b653ce8bb70d4e011e1a","08521f5befe6ec3f1c3a881651321f875ca6fc79db15a6130283d409f5d47d1b","b06c48902c3d127098839c1a6500f41d3e21b2f07f277ba7de23ec730df7275d","946d8fa2088c22a4cbc85875ec7c700c93cf53d7b52057fe4e6730fd613c7925","a7a0e658ca429cfb5268d4bf2e2e6e9fe871ffd06b6588d65424ba4eba35338f","2dbadaab8fa70d9d874b29e23e808b0978fd2dbaf34e3caf8303508e2b88c603","54b8f865e3bea736798e54bc95b49435f472599aea762bd17bb02a18b198c7d1","5e621ae454f5ff6bfea91a558b93eb3dee64eac6f66ad8d6739a4a7c396a42f7","ccd708c3fff99b4ec315e14315dce6b9e85f4c96d10131e9fd219edb6efbdb26","abc924fce33b86b9f8588de3a5be04c609fafa6cb1dc42629b3e9e3e18f7d018","f919e3a8b2d274b631ee4fee0c50eba1d3f39ceaccba04dff915e9f61e9f153c","3ae17ae844491c7326d070c3e70a94a9239394e7a1e84eb203eb1d57470e752e","d1b2970d348eb9f89ef0f0c6730d27e9331067a28f21c8bd667ba1138d5d3e93","b2c4833e6308888c3947953770b3343deaf4276c803bb36148991a3fb90b4f6a","41b7c8204ea79a93e380a228f5c744e9c9a80183133ac62633a4c76e3fdbd7db","d0a441df587b0632c16a813117f110574d903ddd0bc4d28599cc82ff8af7c094","b24ac81f4fcff56ed9827736abcf2f92ea5f86e16d66eb2ee3ccfa0bb8143bc9","068309ff581d08c276c4a772ddf3ab9c8090e591fc9917fdc6cdffc12c95a5bf","5c1d368a451520260ebb6c06121201f18abf86d80540290df6e424d372c5d0ed","bb3ccaacf5c19a7170939b7f735c6a94537fd95ad16b4247a6ad572b23183e74","2c8b86d9d29c4ea62762c3815ffe4fdb0c5dbc0dd096b9703236010f4a17c255","7ec540fd5fb0761576c417b27ea61ec08123412487b020942c893510dce970db","f858a10d167e011155bfe5a3532f599e677bced6727c07366f380c02010650d4","465f5d53f09ac1978002bc264b8a4c0aea749c79dd2bd1917dffe57fddcb9543","cf4ef9c41637cb6995fee096890a0e6113141bcce82cc7d5754c281f03ad889e","40f34f36aba872decb7540030db33dc84f1a53d4778fd8c8ad840d68f2023f3a","10347593c1b262343845f577673e5956217a8a571c859d83e2de50a54729541f","e0a192de84052b553230c5f649307dfb49df6dce54fdc538de15078d895f5f66","228e7d711e429183ddf7fc8c331d00540557ade296fb8132d5bfc48d5c933f89","e8906c76ded4f87db27adfe3e8f9e1a729be51a6a0c2c458f31662c6278b1925","49bca6d49d9c5a525146bba60a48e448e1eabe79be789a7b5238ac10a2f620b3","08fe86bcae8e02f769d215958438d6858dc19aeed2a61c7d7327f052b0db25fc","cd3a9799c8e0996b4d31d5235a8ae105b79a7fa31ba8f660ca35b043048ef757","ee4e73f46ce2f6517e82434bd9fc63c8b6b2179d37d74525899f124a76d06669","773c827d0235c76288ab0092202c357730c5b21314241831b7dd88ef6017818e","ced97526e899f0222df6d805e008cd5bc63fee326838a9002919453f9a2a8c9b","216aa3f63d62f13b158445ff6a3bea8ccfd110f2bf219d607175518c9cc5b29d","be77edbe4d276441584b1c7b297bd8596c78913c22c590dc136d987b82a3976c","faa64d270fa523f80fd31bc7340ee7f6a21632c2ea0cea6535bf5a34bcc6adf7","931d70c96033881193232b90c39210c6cd14865f28b339843c56b5688e7fd10d","0a995ec8876b2bdf48ad2a95dbd7c38d37d2b77940cd39d6f68947e1c383d940","29e6e980f179ac2981d68954462dfd4a4545f73c021f6a4c8a5f442c0e16e56c","67fe56b931e013e9980dec2a605908d44484c7bbd81d2ee9912872c11bc76515","d4924e2b191fee9b43aaeef651c87a7084281d425a30a9a8cf50de8f92b64f6d","8fc678b640b298b07d4f52a5a4f0b3a57e07e45da7a0ad25f1ffde53a152d3be","a59554ba3751ea9ad27f6948f1c71ef57f1e28bb526a53eacb0dfa76bc1df452","ea5a5d5873c239b97d846fb8c78437e08ffd731924764f746c0ebcb7731d7648","da401323d4c96e3f5b8fa8b7ecd200d47a9e340b09cefbea553d2b2b5a345e60","ead4a7fd25e5e2b756a5e71546bd8eae855c7b0ecbffd891f7fb0b6f7d80c0c1","eaea9f8e5b90d87160a885c2afc4afcd2434e149ae5a5368d4b61eed66a6a597","cc44cf86b3ddb7d61f7de3fd32116089decb662a8b6421013bd4a8ee9a079881","ab7ed47f18899e74299db14911a028a0aaf1acae17f870a64ead7d91953d40b3","298f8d2584216932ea238927177ef343d0b8da735eb40a5ba96b1f92e3675e33","c8082c78975419ed5a9f7daa655643425cdd98fee91bb82fd92d25f908c78465","24a588d942a36d853d18dfe63711e9b180ea0448b956dadce7833f4d6455f0c8","c263cc53a55cc822c360481e94d0fe999acebf92f01f2ca84225a168a182657f","11aba4fbd2d4539d8440169f219974378731ad1e65d4656bd9d8a579b79241e6","b2792748a96701780faae92a11922b38e9e37d54b31df3df70acd32fd586c508","56cac1d8d4be53381e236d675f43c1b2342161ca45d31dfaaf340b0612d14bc5","121adbf7463954a594a796c4914376017a201d6c7bb40cb33b6b6e2f7f3c1bb8","1dd2073db39016abc797e46c711630cd39c497c28063e3a75993940c72eb9792","ad4f365726b33c965a6cf7e20ee8a7984866e08632a6c37b13bbe4d08c6e0a03","1492a06643311a66d01dc0c15259c0dbe7c4d336e7a85cb7ece67085afd2e84f","47ace7a5fa09cb19907ed7cb83a867b05ecff3e10bb229888e24f82b2c03b869","65f72380cb90b44b22370dfb07890bdd557d2e211ffb023363d8c87621c2535a","42278f72f154d26b400dcce641e8ed2227fb0102bff628f831bae44018ec4313","c1e64c51dadfcea7b7995040c64b5ac7e8f954f2a4adf4eb92e7a462ba5275e8","0cf0840523da6e63c4d0d096f3a1220da866a39314acc8d624551d4580d5567e","15e170fc85990c9cbdc7d3799b9490183b2d15202f1ccd0794abe5afb6f351eb","2f166c686866f475aee63ff5f7cf42413169d34e60c03fc5c761b2281ea49df0","40eef65c285d2b03f5c07d8455c675ecac1b90330cffd6d97f7008811ff8dd22","4f257d6caa2adab87c7532a456be55604cbd3861d81f38458812eedd84555e04","a270eff1cca84fc69223b8f4ce8db3cb4b4abf0dad0d054f7b3bcfb99ba9a343","665236eec0c0da8d3f7cdba8f01f98233425d8c065058e513b33385e417a56d2","1e771191631caaa4b5d3429c51e23c23c2f609ea1e99f4183e913c5e7fd2311b","50e8918146f4e8a9240bf867a07cf8aa0deb21fee8d4507e74ff62c8c6af42e9","666640b08e3ce76b6a8c76ce1f9f5b986923d3c76663b7fa4bc36e3af734ec46","6454e0780201a5e155d56f4fd4609a3a626d49e2c0300a2a74bf3f65e8c7fb92",{"version":"e65fffb311c8cbe35df1204501ba49c9386b370b06a84d672507ac47a25b70cc","signature":"9e9d6aee028a5f9ab3c7fc81b154bf86ead437095f80b4e3da7c119870268000"},"d6b02d2af4282e1c8ca18aa6c5df7cf9f14ba3e1a32f18ca13f376e37b82735a"],"root":[99,216,217],"options":{"composite":true,"declaration":true,"declarationDir":"./","declarationMap":true,"emitDeclarationOnly":true,"exactOptionalPropertyTypes":true,"jsx":4,"jsxImportSource":"@lynx-js/react","module":99,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noUncheckedIndexedAccess":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"strict":true,"target":6,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":true},"referencedMap":[[98,1],[116,2],[105,3],[117,4],[125,5],[128,6],[127,7],[107,8],[110,9],[111,10],[113,11],[114,12],[122,13],[121,14],[123,15],[124,14],[130,16],[129,17],[89,18],[91,19],[95,20],[92,21],[93,22],[88,23],[90,24],[44,25],[83,26],[74,27],[59,28],[56,27],[81,29],[57,27],[79,30],[58,31],[84,32],[60,33],[67,31],[62,27],[61,34],[76,31],[82,35],[80,31],[63,27],[71,31],[72,31],[64,34],[70,31],[65,34],[68,31],[69,27],[77,31],[66,27],[73,31],[75,31],[47,36],[54,37],[86,38],[55,39],[96,40],[45,36],[46,41],[51,42],[52,43],[50,44],[41,45],[97,46],[109,47],[108,12],[104,12],[102,12],[103,48],[101,12],[198,49],[197,50],[199,51],[200,52],[215,53],[203,54],[210,55],[204,52],[206,56],[209,57],[207,58],[208,59],[205,60],[135,61],[136,62],[134,62],[137,63],[144,64],[139,65],[140,62],[142,66],[141,61],[143,62],[153,67],[149,68],[152,69],[151,70],[157,71],[158,71],[156,72],[161,73],[160,72],[196,74],[163,75],[164,76],[169,77],[165,78],[167,79],[166,80],[172,81],[175,82],[177,83],[182,84],[181,85],[179,75],[183,83],[184,86],[185,87],[186,88],[194,89],[187,87],[188,84],[180,90],[193,91],[191,92],[192,93],[195,94],[217,95],[99,96],[216,97]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.3"}
@@ -0,0 +1,3 @@
1
+ export * from './model.js';
2
+ export { type G9MapPin, type G9MapShape, G9StaticMap, type G9StaticMapProps } from './static-map.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,UAAU,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC"}
package/dist/index.jsx ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./model.jsx";
2
+ export { G9StaticMap } from "./static-map.jsx";
package/dist/map.css ADDED
@@ -0,0 +1,56 @@
1
+ .g9-map {
2
+ border-radius: var(--g9-radius-card);
3
+ background-color: var(--g9-surface-container);
4
+ position: relative;
5
+ overflow: hidden;
6
+ }
7
+
8
+ .g9-map__tile {
9
+ width: 256px;
10
+ height: 256px;
11
+ position: absolute;
12
+ }
13
+
14
+ .g9-map__shapes {
15
+ position: absolute;
16
+ top: 0;
17
+ left: 0;
18
+ }
19
+
20
+ .g9-map__pin {
21
+ display: flex;
22
+ position: absolute;
23
+ transform: translate(-50%, -100%);
24
+ }
25
+
26
+ .g9-map__dot {
27
+ background-color: var(--g9-primary);
28
+ border: 2px solid #fff;
29
+ border-radius: 12px;
30
+ justify-content: center;
31
+ align-items: center;
32
+ min-width: 24px;
33
+ height: 24px;
34
+ padding: 0 6px;
35
+ display: flex;
36
+ box-shadow: 0 2px 6px #0000004d;
37
+ }
38
+
39
+ .g9-map__dot-text {
40
+ color: var(--g9-on-primary);
41
+ font-size: 11px;
42
+ font-weight: 800;
43
+ }
44
+
45
+ .g9-map__attribution {
46
+ color: #333;
47
+ background-color: #ffffffb3;
48
+ padding: 0 4px;
49
+ font-size: 9px;
50
+ position: absolute;
51
+ bottom: 2px;
52
+ right: 4px;
53
+ }
54
+
55
+
56
+ /*# sourceMappingURL=map.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["webpack://./src/map.css"],"names":[],"mappings":"AACA;EAAE,oCAAoC;EACpC,6CAA6C;EAC7C,kBAAkB;EAClB,gBAAgB;AAClB;;AAGA;EAAE,YAAY;EACZ,aAAa;EACb,kBAAkB;AACpB;;AAGA;EAAE,kBAAkB;EAClB,MAAM;EACN,OAAO;AACT;;AAGA;EAAE,aAAa;EACb,kBAAkB;EAClB,iCAAiC;AACnC;;AAGA;EAAE,mCAAmC;EACnC,sBAAsB;EACtB,mBAAmB;EACnB,uBAAuB;EACvB,mBAAmB;EACnB,eAAe;EACf,YAAY;EACZ,cAAc;EACd,aAAa;EACb,+BAA+B;AACjC;;AAKA;EAFE,2BAA2B;EAC3B,eAAe;EACf,gBAAgB;AAClB;;AAKA;EAFE,WAAW;EACX,2BAA2B;EAC3B,cAAc;EACd,cAAc;EACd,kBAAkB;EAClB,WAAW;EACX,UAAU;AACZ","sourcesContent":["/* G9StaticMap. One class per selector. */\n.g9-map {\n position: relative;\n overflow: hidden;\n border-radius: var(--g9-radius-card);\n background-color: var(--g9-surface-container);\n}\n\n.g9-map__tile {\n position: absolute;\n width: 256px;\n height: 256px;\n}\n\n.g9-map__shapes {\n position: absolute;\n left: 0px;\n top: 0px;\n}\n\n.g9-map__pin {\n position: absolute;\n display: flex;\n transform: translate(-50%, -100%);\n}\n\n.g9-map__dot {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 24px;\n height: 24px;\n padding: 0px 6px;\n border-radius: 12px;\n border-width: 2px;\n border-style: solid;\n border-color: #ffffff;\n background-color: var(--g9-primary);\n box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.3);\n}\n\n.g9-map__dot-text {\n font-size: 11px;\n font-weight: 800;\n color: var(--g9-on-primary);\n}\n\n.g9-map__attribution {\n position: absolute;\n right: 4px;\n bottom: 2px;\n padding: 0px 4px;\n font-size: 9px;\n color: #333333;\n background-color: rgba(255, 255, 255, 0.7);\n}\n"],"sourceRoot":""}
@@ -0,0 +1,49 @@
1
+ /** A point on the map: latitude and longitude in degrees. */
2
+ export interface G9LatLng {
3
+ readonly lat: number;
4
+ readonly lng: number;
5
+ }
6
+ /** The size (px) of the area a map is drawn in. */
7
+ export interface G9Viewport {
8
+ readonly width: number;
9
+ readonly height: number;
10
+ }
11
+ /** The edge (px) of a web-mercator map tile. */
12
+ export declare const g9TileSize = 256;
13
+ /** World pixel (at `zoom`, tiles of 256) of a point. */
14
+ export declare function project(p: G9LatLng, zoom: number): {
15
+ readonly x: number;
16
+ readonly y: number;
17
+ };
18
+ /** The point at a world pixel. */
19
+ export declare function unproject(x: number, y: number, zoom: number): G9LatLng;
20
+ /** One tile to draw: its address and where its top-left corner sits in the view. */
21
+ export interface G9Tile {
22
+ readonly z: number;
23
+ readonly x: number;
24
+ readonly y: number;
25
+ readonly left: number;
26
+ readonly top: number;
27
+ readonly key: string;
28
+ }
29
+ /** The tiles covering a viewport centred on `center` at integer `zoom` (x wraps around the world; y does not). */
30
+ export declare function tilesFor(center: G9LatLng, zoom: number, view: G9Viewport): G9Tile[];
31
+ /** A tile URL from a template (`https://tile.example/{z}/{x}/{y}.png`, `{s}` → a subdomain). */
32
+ export declare function tileUrl(template: string, t: G9Tile, subdomains?: string): string;
33
+ /** A point in view coordinates (dp from the top-left of the map). */
34
+ export declare function toView(p: G9LatLng, center: G9LatLng, zoom: number, view: G9Viewport): {
35
+ readonly x: number;
36
+ readonly y: number;
37
+ };
38
+ /** The center and the largest integer zoom (≤ maxZoom) that show every point inside the padded viewport. */
39
+ export declare function fitBounds(points: readonly G9LatLng[], view: G9Viewport, padding?: number, maxZoom?: number): {
40
+ readonly center: G9LatLng;
41
+ readonly zoom: number;
42
+ };
43
+ /** An SVG path (`M … L … [Z]`) of points in view coordinates. */
44
+ export declare function pathOf(points: readonly G9LatLng[], center: G9LatLng, zoom: number, view: G9Viewport, closed: boolean): string;
45
+ /** Great-circle distance in metres (haversine). */
46
+ export declare function distanceMeters(a: G9LatLng, b: G9LatLng): number;
47
+ /** True when `p` is inside the polygon (ray casting; a delivery zone). */
48
+ export declare function insidePolygon(p: G9LatLng, polygon: readonly G9LatLng[]): boolean;
49
+ //# sourceMappingURL=model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAGA,6DAA6D;AAC7D,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,mDAAmD;AACnD,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,gDAAgD;AAChD,eAAO,MAAM,UAAU,MAAM,CAAC;AAG9B,wDAAwD;AACxD,wBAAgB,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG;IAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAK7F;AAED,kCAAkC;AAClC,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,CAKtE;AAED,oFAAoF;AACpF,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,kHAAkH;AAClH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,EAAE,CAsBnF;AAED,gGAAgG;AAChG,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,UAAU,SAAQ,GAAG,MAAM,CAG/E;AAED,qEAAqE;AACrE,wBAAgB,MAAM,CACpB,CAAC,EAAE,QAAQ,EACX,MAAM,EAAE,QAAQ,EAChB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,UAAU,GACf;IAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAK5C;AAED,4GAA4G;AAC5G,wBAAgB,SAAS,CACvB,MAAM,EAAE,SAAS,QAAQ,EAAE,EAC3B,IAAI,EAAE,UAAU,EAChB,OAAO,SAAK,EACZ,OAAO,SAAK,GACX;IAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAuBtD;AAED,iEAAiE;AACjE,wBAAgB,MAAM,CACpB,MAAM,EAAE,SAAS,QAAQ,EAAE,EAC3B,MAAM,EAAE,QAAQ,EAChB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,OAAO,GACd,MAAM,CASR;AAED,mDAAmD;AACnD,wBAAgB,cAAc,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,GAAG,MAAM,CAO/D;AAED,0EAA0E;AAC1E,wBAAgB,aAAa,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,QAAQ,EAAE,GAAG,OAAO,CAShF"}
package/dist/model.jsx ADDED
@@ -0,0 +1,122 @@
1
+ const g9TileSize = 256;
2
+ const MAX_LAT = 85.05112878;
3
+ function project(p, zoom) {
4
+ const lat = Math.max(-MAX_LAT, Math.min(MAX_LAT, p.lat));
5
+ const scale = g9TileSize * 2 ** zoom;
6
+ const sin = Math.sin(lat * Math.PI / 180);
7
+ return {
8
+ x: (p.lng + 180) / 360 * scale,
9
+ y: (0.5 - Math.log((1 + sin) / (1 - sin)) / (4 * Math.PI)) * scale
10
+ };
11
+ }
12
+ function unproject(x, y, zoom) {
13
+ const scale = g9TileSize * 2 ** zoom;
14
+ const lng = x / scale * 360 - 180;
15
+ const n = Math.PI - 2 * Math.PI * y / scale;
16
+ return {
17
+ lat: 180 / Math.PI * Math.atan(0.5 * (Math.exp(n) - Math.exp(-n))),
18
+ lng
19
+ };
20
+ }
21
+ function tilesFor(center, zoom, view) {
22
+ const z = Math.round(zoom);
23
+ const c = project(center, z);
24
+ const x0 = c.x - view.width / 2;
25
+ const y0 = c.y - view.height / 2;
26
+ const n = 2 ** z;
27
+ const out = [];
28
+ for(let ty = Math.floor(y0 / g9TileSize); ty <= Math.floor((y0 + view.height) / g9TileSize); ty++)if (!(ty < 0) && !(ty >= n)) for(let tx = Math.floor(x0 / g9TileSize); tx <= Math.floor((x0 + view.width) / g9TileSize); tx++){
29
+ const wrapped = (tx % n + n) % n;
30
+ out.push({
31
+ z,
32
+ x: wrapped,
33
+ y: ty,
34
+ left: tx * g9TileSize - x0,
35
+ top: ty * g9TileSize - y0,
36
+ key: `${z}/${tx}/${ty}`
37
+ });
38
+ }
39
+ return out;
40
+ }
41
+ function tileUrl(template, t, subdomains = 'abc') {
42
+ const s = subdomains.charAt((t.x + t.y) % Math.max(1, subdomains.length));
43
+ return template.replace('{z}', String(t.z)).replace('{x}', String(t.x)).replace('{y}', String(t.y)).replace('{s}', s);
44
+ }
45
+ function toView(p, center, zoom, view) {
46
+ const z = Math.round(zoom);
47
+ const a = project(p, z);
48
+ const c = project(center, z);
49
+ return {
50
+ x: a.x - c.x + view.width / 2,
51
+ y: a.y - c.y + view.height / 2
52
+ };
53
+ }
54
+ function fitBounds(points, view, padding = 32, maxZoom = 17) {
55
+ if (!points.length) return {
56
+ center: {
57
+ lat: 0,
58
+ lng: 0
59
+ },
60
+ zoom: 1
61
+ };
62
+ let minLat = 90;
63
+ let maxLat = -90;
64
+ let minLng = 180;
65
+ let maxLng = -180;
66
+ for (const p of points){
67
+ minLat = Math.min(minLat, p.lat);
68
+ maxLat = Math.max(maxLat, p.lat);
69
+ minLng = Math.min(minLng, p.lng);
70
+ maxLng = Math.max(maxLng, p.lng);
71
+ }
72
+ const w = Math.max(1, view.width - 2 * padding);
73
+ const h = Math.max(1, view.height - 2 * padding);
74
+ let zoom = maxZoom;
75
+ for(; zoom > 0; zoom--){
76
+ const a = project({
77
+ lat: maxLat,
78
+ lng: minLng
79
+ }, zoom);
80
+ const b = project({
81
+ lat: minLat,
82
+ lng: maxLng
83
+ }, zoom);
84
+ if (b.x - a.x <= w && b.y - a.y <= h) break;
85
+ }
86
+ const a = project({
87
+ lat: maxLat,
88
+ lng: minLng
89
+ }, zoom);
90
+ const b = project({
91
+ lat: minLat,
92
+ lng: maxLng
93
+ }, zoom);
94
+ return {
95
+ center: unproject((a.x + b.x) / 2, (a.y + b.y) / 2, zoom),
96
+ zoom
97
+ };
98
+ }
99
+ function pathOf(points, center, zoom, view, closed) {
100
+ return points.map((p, i)=>{
101
+ const v = toView(p, center, zoom, view);
102
+ return `${i ? 'L' : 'M'}${v.x.toFixed(1)} ${v.y.toFixed(1)}`;
103
+ }).join(' ') + (closed && points.length > 2 ? ' Z' : '');
104
+ }
105
+ function distanceMeters(a, b) {
106
+ const R = 6371000;
107
+ const toRad = (d)=>d * Math.PI / 180;
108
+ const dLat = toRad(b.lat - a.lat);
109
+ const dLng = toRad(b.lng - a.lng);
110
+ const h = Math.sin(dLat / 2) ** 2 + Math.cos(toRad(a.lat)) * Math.cos(toRad(b.lat)) * Math.sin(dLng / 2) ** 2;
111
+ return 2 * R * Math.asin(Math.min(1, Math.sqrt(h)));
112
+ }
113
+ function insidePolygon(p, polygon) {
114
+ let inside = false;
115
+ for(let i = 0, j = polygon.length - 1; i < polygon.length; j = i++){
116
+ const a = polygon[i];
117
+ const b = polygon[j];
118
+ if (a.lat > p.lat !== b.lat > p.lat && p.lng < (b.lng - a.lng) * (p.lat - a.lat) / (b.lat - a.lat) + a.lng) inside = !inside;
119
+ }
120
+ return inside;
121
+ }
122
+ export { distanceMeters, fitBounds, g9TileSize, insidePolygon, pathOf, project, tileUrl, tilesFor, toView, unproject };
@@ -0,0 +1,43 @@
1
+ import './map.css';
2
+ import { type ReactNode } from '@lynx-js/react';
3
+ import { type G9LatLng } from './model.js';
4
+ /** A pin on the map. */
5
+ export interface G9MapPin {
6
+ readonly id: string;
7
+ readonly at: G9LatLng;
8
+ readonly label?: string;
9
+ readonly color?: string;
10
+ /** Anything instead of the default dot (a photo, a price). */
11
+ readonly content?: ReactNode;
12
+ }
13
+ /** A line or a zone. */
14
+ export interface G9MapShape {
15
+ readonly id: string;
16
+ readonly points: readonly G9LatLng[];
17
+ readonly kind: 'line' | 'zone';
18
+ readonly color?: string;
19
+ readonly width?: number;
20
+ /** Fill opacity of a zone. Default 0.18. */
21
+ readonly fillOpacity?: number;
22
+ }
23
+ /** Props of {@link G9StaticMap}. */
24
+ export interface G9StaticMapProps {
25
+ readonly id?: string;
26
+ readonly className?: string;
27
+ /** `https://{s}.tile.example/{z}/{x}/{y}.png`. */
28
+ readonly tileTemplate: string;
29
+ readonly subdomains?: string;
30
+ readonly attribution: string;
31
+ readonly center?: G9LatLng;
32
+ readonly zoom?: number;
33
+ /** Fit these points instead of center/zoom (pins and shapes are fitted when `fit` is `true`). */
34
+ readonly fit?: readonly G9LatLng[] | true;
35
+ readonly height: number;
36
+ readonly pins?: readonly G9MapPin[];
37
+ readonly shapes?: readonly G9MapShape[];
38
+ readonly onPinPress?: (pin: G9MapPin) => void;
39
+ readonly accessibilityLabel?: string;
40
+ }
41
+ /** A static tile map with pins, lines and zones; measures its width and draws only the tiles it shows. */
42
+ export declare function G9StaticMap(props: G9StaticMapProps): ReactNode;
43
+ //# sourceMappingURL=static-map.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"static-map.d.ts","sourceRoot":"","sources":["../src/static-map.tsx"],"names":[],"mappings":"AAGA,OAAO,WAAW,CAAC;AAEnB,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAa,KAAK,QAAQ,EAAqC,MAAM,SAAS,CAAC;AAEtF,wBAAwB;AACxB,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,8DAA8D;IAC9D,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;CAC9B;AAED,wBAAwB;AACxB,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,SAAS,QAAQ,EAAE,CAAC;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,4CAA4C;IAC5C,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,oCAAoC;AACpC,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,kDAAkD;IAClD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,iGAAiG;IACjG,QAAQ,CAAC,GAAG,CAAC,EAAE,SAAS,QAAQ,EAAE,GAAG,IAAI,CAAC;IAC1C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAC;IACpC,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IACxC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,QAAQ,KAAK,IAAI,CAAC;IAC9C,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CACtC;AAED,0GAA0G;AAC1G,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,SAAS,CA4E9D"}
@@ -0,0 +1,90 @@
1
+ import "./map.css";
2
+ import { g9IdProps } from "@g9tm/lynxcontrols/base";
3
+ import { useMemo, useState } from "@lynx-js/react";
4
+ import { fitBounds, pathOf, tileUrl, tilesFor, toView } from "./model.jsx";
5
+ function G9StaticMap(props) {
6
+ var _props_pins, _props_shapes, _props_accessibilityLabel, _props_pins1;
7
+ var _props_center, _props_center1;
8
+ const [width, setWidth] = useState(0);
9
+ const view1 = {
10
+ width,
11
+ height: props.height
12
+ };
13
+ const fitPoints = true === props.fit ? [
14
+ ...(null != (_props_pins = props.pins) ? _props_pins : []).map((p)=>p.at),
15
+ ...(null != (_props_shapes = props.shapes) ? _props_shapes : []).flatMap((s)=>s.points)
16
+ ] : props.fit;
17
+ const camera = useMemo(()=>{
18
+ var _props_center, _props_zoom;
19
+ return fitPoints && fitPoints.length && width ? fitBounds(fitPoints, view1, 36) : {
20
+ center: null != (_props_center = props.center) ? _props_center : {
21
+ lat: 35.6997,
22
+ lng: 51.338
23
+ },
24
+ zoom: null != (_props_zoom = props.zoom) ? _props_zoom : 12
25
+ };
26
+ }, [
27
+ width,
28
+ props.height,
29
+ null == (_props_center = props.center) ? void 0 : _props_center.lat,
30
+ null == (_props_center1 = props.center) ? void 0 : _props_center1.lng,
31
+ props.zoom,
32
+ JSON.stringify(null != fitPoints ? fitPoints : null)
33
+ ]);
34
+ const tiles = width ? tilesFor(camera.center, camera.zoom, view1) : [];
35
+ const svg1 = useMemo(()=>{
36
+ var _props_shapes;
37
+ if (!width || !(null == (_props_shapes = props.shapes) ? void 0 : _props_shapes.length)) return '';
38
+ const paths = props.shapes.map((s)=>{
39
+ var _s_color, _s_fillOpacity, _s_width, _s_width1;
40
+ const d = pathOf(s.points, camera.center, camera.zoom, view1, 'zone' === s.kind);
41
+ const c = null != (_s_color = s.color) ? _s_color : '#2B6FB3';
42
+ return 'zone' === s.kind ? `<path d="${d}" fill="${c}" fill-opacity="${null != (_s_fillOpacity = s.fillOpacity) ? _s_fillOpacity : 0.18}" stroke="${c}" stroke-width="${null != (_s_width = s.width) ? _s_width : 2}"/>` : `<path d="${d}" fill="none" stroke="${c}" stroke-width="${null != (_s_width1 = s.width) ? _s_width1 : 4}" stroke-linecap="round" stroke-linejoin="round"/>`;
43
+ }).join('');
44
+ return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${width} ${props.height}">${paths}</svg>`;
45
+ }, [
46
+ width,
47
+ props.height,
48
+ props.shapes,
49
+ camera.center.lat,
50
+ camera.center.lng,
51
+ camera.zoom
52
+ ]);
53
+ return <view className={`g9-map${props.className ? ` ${props.className}` : ''}`} {...g9IdProps(props.id)} style={{
54
+ height: `${props.height}px`
55
+ }} bindlayoutchange={(e)=>{
56
+ const w = Math.round(e.detail.width);
57
+ if (w !== width) setWidth(w);
58
+ }} accessibility-element={true} accessibility-label={null != (_props_accessibilityLabel = props.accessibilityLabel) ? _props_accessibilityLabel : ''}>
59
+ {tiles.map((t)=><image key={t.key} className="g9-map__tile" src={tileUrl(props.tileTemplate, t, props.subdomains)} style={{
60
+ left: `${t.left}px`,
61
+ top: `${t.top}px`
62
+ }}/>)}
63
+ {svg1 ? <svg className="g9-map__shapes" content={svg1} style={{
64
+ width: `${width}px`,
65
+ height: `${props.height}px`
66
+ }}/> : null}
67
+ {width ? (null != (_props_pins1 = props.pins) ? _props_pins1 : []).map((p)=>{
68
+ var _p_label, _p_content;
69
+ const v = toView(p.at, camera.center, camera.zoom, view1);
70
+ if (v.x < -40 || v.y < -40 || v.x > width + 40 || v.y > props.height + 40) return null;
71
+ return <view key={p.id} className="g9-map__pin" style={{
72
+ left: `${v.x}px`,
73
+ top: `${v.y}px`
74
+ }} {...props.onPinPress ? {
75
+ bindtap: ()=>{
76
+ var _props_onPinPress;
77
+ return null == (_props_onPinPress = props.onPinPress) ? void 0 : _props_onPinPress.call(props, p);
78
+ }
79
+ } : {}} accessibility-element={true} accessibility-label={null != (_p_label = p.label) ? _p_label : ''}>
80
+ {null != (_p_content = p.content) ? _p_content : <view className="g9-map__dot" style={p.color ? {
81
+ backgroundColor: p.color
82
+ } : {}}>
83
+ {p.label ? <text className="g9-map__dot-text">{p.label}</text> : null}
84
+ </view>}
85
+ </view>;
86
+ }) : null}
87
+ <text className="g9-map__attribution">{props.attribution}</text>
88
+ </view>;
89
+ }
90
+ export { G9StaticMap };
package/package.json CHANGED
@@ -1,6 +1,36 @@
1
1
  {
2
2
  "name": "@g9tm/lynxcontrols-map",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "2.2.0",
4
+ "description": "Map for G9LynxControls: Web Mercator tile math, fit-bounds, and G9StaticMap \u2014 tiles, pins, polylines and polygons with no native map SDK (G9Hub places, ShopManager delivery zones).",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "sideEffects": [
8
+ "**/*.css"
9
+ ],
10
+ "exports": {
11
+ ".": {
12
+ "source": "./src/index.ts",
13
+ "types": "./dist/index.d.ts",
14
+ "default": "./dist/index.jsx"
15
+ },
16
+ "./model": {
17
+ "source": "./src/model.ts",
18
+ "types": "./dist/model.d.ts",
19
+ "default": "./dist/model.jsx"
20
+ }
21
+ },
22
+ "files": [
23
+ "dist",
24
+ "README.md"
25
+ ],
26
+ "scripts": {
27
+ "build": "rslib build"
28
+ },
29
+ "dependencies": {
30
+ "@g9tm/lynxcontrols-foundation": "2.2.0"
31
+ },
32
+ "peerDependencies": {
33
+ "@g9tm/lynxcontrols": "2.2.0",
34
+ "@lynx-js/react": ">=0.129.3 <0.130.0"
35
+ }
36
+ }