@deck.gl-community/react 9.1.0-beta.3 → 9.1.0-beta.4
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/dist/components/icon.js +1 -0
- package/dist/components/icon.js.map +1 -0
- package/dist/components/long-press-button.js +1 -0
- package/dist/components/long-press-button.js.map +1 -0
- package/dist/components/modal.js +1 -0
- package/dist/components/modal.js.map +1 -0
- package/dist/components/positioned-view-control.js +1 -0
- package/dist/components/positioned-view-control.js.map +1 -0
- package/dist/components/view-control.js +1 -0
- package/dist/components/view-control.js.map +1 -0
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -0
- package/dist/overlays/html-cluster-overlay.js +1 -0
- package/dist/overlays/html-cluster-overlay.js.map +1 -0
- package/dist/overlays/html-overlay-item.js +1 -0
- package/dist/overlays/html-overlay-item.js.map +1 -0
- package/dist/overlays/html-overlay.js +1 -0
- package/dist/overlays/html-overlay.js.map +1 -0
- package/dist/overlays/html-tooltip-overlay.js +1 -0
- package/dist/overlays/html-tooltip-overlay.js.map +1 -0
- package/package.json +2 -2
package/dist/components/icon.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.js","sourceRoot":"","sources":["../../src/components/icon.tsx"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,CAAC;AAElB,MAAM,UAAU,IAAI,CAAC,KAAK;IACxB,wBAAwB;IACxB,OAAO,kCAAU,KAAK,EAAC,cAAc,KAAK,KAAK,GAAI,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"long-press-button.js","sourceRoot":"","sources":["../../src/components/long-press-button.tsx"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,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;AACJ,CAAC"}
|
|
@@ -6,3 +6,4 @@ import React from 'react';
|
|
|
6
6
|
// A wrapper for positioning the ViewControl component
|
|
7
7
|
export const PositionedViewControl = ({ fitBounds, panBy, zoomBy, zoomLevel, maxZoom = 20, minZoom = -20 }) => (React.createElement("div", { style: { position: 'relative', top: '20px', left: '20px' } },
|
|
8
8
|
React.createElement(ViewControl, { fitBounds: fitBounds, panBy: panBy, zoomBy: zoomBy, zoomLevel: zoomLevel, maxZoom: maxZoom, minZoom: minZoom })));
|
|
9
|
+
//# sourceMappingURL=positioned-view-control.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"positioned-view-control.js","sourceRoot":"","sources":["../../src/components/positioned-view-control.tsx"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,EAAC,WAAW,EAAC,0BAAuB;AAC3C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,sDAAsD;AACtD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EACpC,SAAS,EACT,KAAK,EACL,MAAM,EACN,SAAS,EACT,OAAO,GAAG,EAAE,EACZ,OAAO,GAAG,CAAC,EAAE,EACd,EAAE,EAAE,CAAC,CACJ,6BAAK,KAAK,EAAE,EAAC,QAAQ,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAC;IAC3D,oBAAC,WAAW,IACV,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,GAChB,CACE,CACP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view-control.js","sourceRoot":"","sources":["../../src/components/view-control.tsx"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,+BAA+B;AAC/B,oCAAoC;AAEpC,mBAAmB;AAEn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C,OAAO,IAAG,CAAC,CAAC,OAAO,CAAmB,CACjD,CACpB,CAAC;gBAEF,oBAAC,gBAAgB,YAAO,MAAM,WAAS,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,IACzE,GAAG,CACa,CACO;YAC5B,oBAAC,kBAAkB;gBACjB,oBAAC,iBAAiB;oBAChB,oBAAC,eAAe,IAAC,OAAO,EAAE,IAAI,CAAC,MAAM,IAAG,GAAG,CAAmB,CAC5C;gBACpB,oBAAC,cAAc;oBACb,+BACE,IAAI,EAAC,OAAO,EACZ,KAAK,EAAG,IAAI,CAAC,KAAa,CAAC,SAAS,EACpC,GAAG,EAAG,IAAI,CAAC,KAAa,CAAC,OAAO,EAChC,GAAG,EAAG,IAAI,CAAC,KAAa,CAAC,OAAO,EAChC,IAAI,EAAG,IAAI,CAAC,KAAa,CAAC,SAAS,EACnC,QAAQ,EAAE,IAAI,CAAC,iBAAiB;wBAChC,2BAA2B;wBAC3B,MAAM,EAAC,UAAU,GACjB,CACa;gBACjB,oBAAC,iBAAiB;oBAChB,oBAAC,eAAe,IAAC,OAAO,EAAE,IAAI,CAAC,OAAO,IAAG,GAAG,CAAmB,CAC7C,CACD,CACF,CACtB,CAAC;IACJ,CAAC"}
|
package/dist/index.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["index.
|
|
4
|
-
"sourcesContent": ["// deck.gl-community\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n// Components (originally from @deck.gl-community/graph-layers)\nexport { LongPressButton } from \"./components/long-press-button.js\";\nexport { ViewControl } from \"./components/view-control.js\";\nexport { PositionedViewControl } from \"./components/positioned-view-control.js\";\n// Components (originally from @nebula.gl/editor)\nexport { EditorModal as Modal } from \"./components/modal.js\";\nexport { Button } from \"./components/modal.js\";\nexport { Icon } from \"./components/icon.js\";\n// Overlays (originally from @nebula.gl/overlays)\nexport { HtmlOverlay } from \"./overlays/html-overlay.js\";\nexport { HtmlOverlayItem } from \"./overlays/html-overlay-item.js\";\nexport { HtmlClusterOverlay } from \"./overlays/html-cluster-overlay.js\";\nexport { HtmlTooltipOverlay } from \"./overlays/html-tooltip-overlay.js\";\n", "// deck.gl-community\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nexport class LongPressButton extends PureComponent {\n static propTypes = {\n onClick: PropTypes.func.isRequired,\n // eslint-disable-next-line react/forbid-prop-types\n children: PropTypes.any.isRequired\n };\n buttonPressTimer = null;\n _repeat = () => {\n if (this.buttonPressTimer) {\n this.props.onClick();\n this.buttonPressTimer = setTimeout(this._repeat, 100);\n }\n };\n _handleButtonPress = () => {\n this.buttonPressTimer = setTimeout(this._repeat, 100);\n };\n _handleButtonRelease = () => {\n if (this.buttonPressTimer) {\n clearTimeout(this.buttonPressTimer);\n }\n this.buttonPressTimer = null;\n };\n render() {\n return (React.createElement(\"div\", { onMouseDown: (event) => {\n this._handleButtonPress();\n document.addEventListener('mouseup', this._handleButtonRelease, { once: true });\n } }, this.props.children));\n }\n}\n", "// deck.gl-community\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n// @ts-nocheck TODO\nimport React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from 'styled-components';\nimport { LongPressButton } from \"./long-press-button.js\";\nexport const ViewControlWrapper = styled.div `\n align-items: center;\n display: flex;\n flex-direction: column;\n position: absolute;\n z-index: 99;\n user-select: none;\n`;\nexport const NavigationButtonContainer = styled.div `\n background: #f7f7f7;\n border-radius: 23px;\n border: 0.5px solid #eaeaea;\n box-shadow: inset 11px 11px 5px -7px rgba(230, 230, 230, 0.49);\n height: 46px;\n width: 46px;\n`;\nexport const NavigationButton = styled.div `\n color: #848484;\n cursor: pointer;\n left: ${(props) => props.$left};\n position: absolute;\n top: ${(props) => props.$top};\n transform: rotate(${(props) => props.rotate || 0}deg);\n\n &:hover,\n &:active {\n color: #00ade6;\n }\n`;\nexport const ZoomControlWrapper = styled.div `\n align-items: center;\n background: #f7f7f7;\n border: 0.5px solid #eaeaea;\n display: flex;\n flex-direction: column;\n margin-top: 6px;\n padding: 2px 0;\n width: 18px;\n`;\nexport const VerticalSlider = styled.div `\n display: inline-block;\n height: 100px;\n padding: 0;\n width: 10px;\n\n > input[type='range'][orient='vertical'] {\n writing-mode: vertical-lr;\n height: 100px;\n padding: 0;\n margin: 0;\n width: 10px;\n }\n`;\nexport const ZoomControlButton = styled.div `\n cursor: pointer;\n font-size: 14px;\n font-weight: 500;\n margin: -4px;\n\n &:hover,\n &:active {\n color: #00ade6;\n }\n`;\nexport class ViewControl extends PureComponent {\n static displayName = 'ViewControl';\n static propTypes = {\n // functions\n fitBounds: PropTypes.func,\n panBy: PropTypes.func,\n zoomBy: PropTypes.func,\n // current zoom level\n zoomLevel: PropTypes.number,\n // configuration\n minZoom: PropTypes.number,\n maxZoom: PropTypes.number,\n deltaPan: PropTypes.number,\n deltaZoom: PropTypes.number\n };\n static defaultProps = {\n fitBounds: () => { },\n panBy: () => { },\n zoomBy: () => { },\n deltaPan: 10,\n deltaZoom: 0.1,\n minZoom: 0.1,\n maxZoom: 1\n };\n // pan actions\n panUp = () => this.props.panBy(0, this.props.deltaPan);\n panDown = () => this.props.panBy(0, -1 * this.props.deltaPan);\n panLeft = () => this.props.panBy(this.props.deltaPan, 0);\n panRight = () => this.props.panBy(-1 * this.props.deltaPan, 0);\n // zoom actions\n zoomIn = () => this.props.zoomBy(this.props.deltaZoom);\n zoomOut = () => this.props.zoomBy(-1 * this.props.deltaZoom);\n onChangeZoomLevel = (evt) => {\n const delta = evt.target.value - this.props.zoomLevel;\n this.props.zoomBy(delta);\n };\n render() {\n const buttons = [\n { top: -2, left: 14, rotate: 0, onClick: this.panUp, content: '\u25B2', key: 'up' },\n { top: 12, left: 0, rotate: -90, onClick: this.panLeft, content: '\u25C0', key: 'left' },\n { top: 12, left: 28, rotate: 90, onClick: this.panRight, content: '\u25B6', key: 'right' },\n { top: 25, left: 14, rotate: 180, onClick: this.panDown, content: '\u25BC', key: 'down' }\n ];\n return (React.createElement(ViewControlWrapper, null,\n React.createElement(NavigationButtonContainer, null,\n buttons.map((b) => (React.createElement(NavigationButton, { key: b.key, \"$top\": `${b.top}px`, \"$left\": `${b.left}px`, rotate: b.rotate },\n React.createElement(LongPressButton, { onClick: b.onClick }, b.content)))),\n React.createElement(NavigationButton, { \"$top\": '12px', \"$left\": '16px', onClick: this.props.fitBounds }, '\u00A4')),\n React.createElement(ZoomControlWrapper, null,\n React.createElement(ZoomControlButton, null,\n React.createElement(LongPressButton, { onClick: this.zoomIn }, '+')),\n React.createElement(VerticalSlider, null,\n React.createElement(\"input\", { type: \"range\", value: this.props.zoomLevel, min: this.props.minZoom, max: this.props.maxZoom, step: this.props.deltaZoom, onChange: this.onChangeZoomLevel, \n /* @ts-expect-error TODO */\n orient: \"vertical\" })),\n React.createElement(ZoomControlButton, null,\n React.createElement(LongPressButton, { onClick: this.zoomOut }, '-')))));\n }\n}\n", "// deck.gl-community\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { ViewControl } from \"./view-control.js\";\nimport React from 'react';\n// A wrapper for positioning the ViewControl component\nexport const PositionedViewControl = ({ fitBounds, panBy, zoomBy, zoomLevel, maxZoom = 20, minZoom = -20 }) => (React.createElement(\"div\", { style: { position: 'relative', top: '20px', left: '20px' } },\n React.createElement(ViewControl, { fitBounds: fitBounds, panBy: panBy, zoomBy: zoomBy, zoomLevel: zoomLevel, maxZoom: maxZoom, minZoom: minZoom })));\n", "// deck.gl-community\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n/* eslint-env browser */\nimport * as React from 'react';\nimport Modal, { ModalProvider } from 'styled-react-modal';\nimport { styled } from 'styled-components';\nexport const Button = styled.button `\n display: inline-block;\n color: #fff;\n background-color: rgb(90, 98, 94);\n font-size: 1em;\n margin: 0.25em;\n padding: 0.375em 0.75em;\n border: 1px solid transparent;\n border-radius: 0.25em;\n display: block;\n`;\nconst StyledModal = Modal.styled `\n position: relative;\n display: block;\n width: 50rem;\n height: auto;\n max-width: 500px;\n margin: 1.75rem auto;\n box-sizing: border-box;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n font-size: 1rem;\n font-weight: 400;\n color: rgb(21, 25, 29);\n line-height: 1.5;\n text-align: left;\n`;\nconst Content = styled.div `\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n pointer-events: auto;\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 0.3rem;\n outline: 0;\n`;\nconst HeaderRow = styled.div `\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n padding: 0.75rem 0.75rem;\n border-bottom: 1px solid rgb(222, 226, 230);\n`;\nconst Header = styled.h5 `\n font-size: 1.25rem;\n font-weight: 500;\n margin: 0;\n`;\nexport function EditorModal(props) {\n const [isOpen, setIsOpen] = React.useState(true);\n function toggleModal() {\n if (isOpen) {\n props.onClose();\n }\n setIsOpen(!isOpen);\n }\n return (React.createElement(React.Fragment, null,\n React.createElement(ModalProvider, null,\n React.createElement(StyledModal, { isOpen: isOpen, onBackgroundClick: toggleModal, onEscapeKeydown: toggleModal },\n React.createElement(Content, null,\n React.createElement(HeaderRow, null,\n React.createElement(Header, null, props.title)),\n props.content)))));\n}\n", "// deck.gl-community\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport * as React from 'react';\nimport 'boxicons';\nexport function Icon(props) {\n // @ts-expect-error TODO\n return React.createElement(\"box-icon\", { color: \"currentColor\", ...props });\n}\n", "// deck.gl-community\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport * as React from 'react';\nconst styles = {\n mainContainer: {\n width: '100%',\n height: '100%',\n position: 'absolute',\n pointerEvents: 'none',\n overflow: 'hidden'\n }\n};\nexport class HtmlOverlay extends React.Component {\n // This is needed for Deck.gl 8.0+\n static deckGLViewProps = true;\n // Override this to provide your items\n getItems() {\n const { children } = this.props;\n if (children) {\n return Array.isArray(children) ? children : [children];\n }\n return [];\n }\n getCoords(coordinates) {\n const pos = this.props.viewport.project(coordinates);\n if (!pos)\n return [-1, -1];\n return pos;\n }\n inView([x, y]) {\n const { viewport, overflowMargin = 0 } = this.props;\n const { width, height } = viewport;\n return !(x < -overflowMargin ||\n y < -overflowMargin ||\n x > width + overflowMargin ||\n y > height + overflowMargin);\n }\n scaleWithZoom(n) {\n const { zoom } = this.props.viewport;\n return n / Math.pow(2, 20 - zoom);\n }\n breakpointWithZoom(threshold, a, b) {\n const { zoom } = this.props.viewport;\n return zoom > threshold ? a : b;\n }\n getViewport() {\n return this.props.viewport;\n }\n getZoom() {\n return this.props.viewport.zoom;\n }\n render() {\n const { zIndex = 1 } = this.props;\n const style = Object.assign({ zIndex }, styles.mainContainer);\n const renderItems = [];\n this.getItems()\n .filter(Boolean)\n .forEach((item, index) => {\n const [x, y] = this.getCoords(item.props.coordinates);\n if (this.inView([x, y])) {\n const key = item.key === null || item.key === undefined ? index : item.key;\n renderItems.push(React.cloneElement(item, { x, y, key }));\n }\n });\n return React.createElement(\"div\", { style: style }, renderItems);\n }\n}\n", "// deck.gl-community\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport * as React from 'react';\nexport class HtmlOverlayItem extends React.Component {\n render() {\n const { x, y, children, style, /* coordinates, */ ...props } = this.props;\n const { zIndex = 'auto', ...remainingStyle } = style || {};\n return (\n // Using transform translate to position overlay items will result in a smooth zooming\n // effect, whereas using the top/left css properties will cause overlay items to\n // jiggle when zooming\n React.createElement(\"div\", { style: { transform: `translate(${x}px, ${y}px)`, position: 'absolute', zIndex } },\n React.createElement(\"div\", { style: { userSelect: 'none', ...remainingStyle }, ...props }, children)));\n }\n}\n", "// deck.gl-community\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { point } from '@turf/helpers';\nimport Supercluster from 'supercluster';\nimport { HtmlOverlay } from \"./html-overlay.js\";\nexport class HtmlClusterOverlay extends HtmlOverlay {\n _superCluster;\n _lastObjects = null;\n getItems() {\n // supercluster().load() is expensive and we want to run it only\n // when necessary and not for every frame.\n // TODO: Warn if this is running many times / sec\n const newObjects = this.getAllObjects();\n if (newObjects !== this._lastObjects) {\n this._superCluster = new Supercluster(this.getClusterOptions());\n this._superCluster.load(newObjects.map((object) => point(this.getObjectCoordinates(object), { object })));\n this._lastObjects = newObjects;\n // console.log('new Supercluster() run');\n }\n const clusters = this._superCluster.getClusters([-180, -90, 180, 90], Math.round(this.getZoom()));\n return clusters.map(({ geometry: { coordinates }, properties: { cluster, point_count: pointCount, cluster_id: clusterId, object } }) => cluster\n ? this.renderCluster(coordinates, clusterId, pointCount)\n : this.renderObject(coordinates, object));\n }\n getClusterObjects(clusterId) {\n return this._superCluster\n .getLeaves(clusterId, Infinity)\n .map((object) => object.properties.object);\n }\n // Override to provide items that need clustering.\n // If the items have not changed please provide the same array to avoid\n // regeneration of the cluster which causes performance issues.\n getAllObjects() {\n return [];\n }\n // override to provide coordinates for each object of getAllObjects()\n getObjectCoordinates(obj) {\n return [0, 0];\n }\n // Get options object used when instantiating supercluster\n getClusterOptions() {\n return {\n maxZoom: 20\n };\n }\n // override to return an HtmlOverlayItem\n renderObject(coordinates, obj) {\n return null;\n }\n // override to return an HtmlOverlayItem\n // use getClusterObjects() to get cluster contents\n renderCluster(coordinates, clusterId, pointCount) {\n return null;\n }\n}\n", "// deck.gl-community\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport * as React from 'react';\nimport { HtmlOverlay } from \"./html-overlay.js\";\nimport { HtmlOverlayItem } from \"./html-overlay-item.js\";\nconst styles = {\n tooltip: {\n transform: 'translate(-50%,-100%)',\n backgroundColor: 'rgba(0, 0, 0, 0.3)',\n padding: '4px 8px',\n borderRadius: 8,\n color: 'white'\n }\n};\nconst SHOW_TOOLTIP_TIMEOUT = 250;\nexport class HtmlTooltipOverlay extends HtmlOverlay {\n constructor(props) {\n super(props);\n this.state = { visible: false, pickingInfo: null };\n }\n componentWillMount() {\n this.context.nebula.queryObjectEvents.on('pick', ({ event, pickingInfo }) => {\n if (this.timeoutID !== null) {\n window.clearTimeout(this.timeoutID);\n }\n this.timeoutID = null;\n if (pickingInfo && this._getTooltip(pickingInfo)) {\n this.timeoutID = window.setTimeout(() => {\n this.setState({ visible: true, pickingInfo });\n }, SHOW_TOOLTIP_TIMEOUT);\n }\n else {\n this.setState({ visible: false });\n }\n });\n }\n timeoutID = null;\n state = undefined;\n _getTooltip(pickingInfo) {\n return pickingInfo.object.style.tooltip;\n }\n _makeOverlay() {\n const { pickingInfo } = this.state;\n if (pickingInfo) {\n return (React.createElement(HtmlOverlayItem, { key: 0, coordinates: pickingInfo.lngLat, style: styles.tooltip }, this._getTooltip(pickingInfo)));\n }\n return null;\n }\n getItems() {\n if (this.state.visible) {\n return [this._makeOverlay()];\n }\n return [];\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA
|
|
3
|
+
"sources": ["../src/index.ts", "../src/components/long-press-button.tsx", "../src/components/view-control.tsx", "../src/components/positioned-view-control.tsx", "../src/components/modal.tsx", "../src/components/icon.tsx", "../src/overlays/html-overlay.tsx", "../src/overlays/html-overlay-item.tsx", "../src/overlays/html-cluster-overlay.ts", "../src/overlays/html-tooltip-overlay.tsx"],
|
|
4
|
+
"sourcesContent": ["// deck.gl-community\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n// Components (originally from @deck.gl-community/graph-layers)\n\nexport {LongPressButton} from './components/long-press-button';\nexport {ViewControl} from './components/view-control';\nexport {PositionedViewControl} from './components/positioned-view-control';\n\n// Components (originally from @nebula.gl/editor)\n\nexport {EditorModal as Modal} from './components/modal';\nexport {Button} from './components/modal';\nexport {Icon} from './components/icon';\n\n// Overlays (originally from @nebula.gl/overlays)\n\nexport {HtmlOverlay} from './overlays/html-overlay';\nexport {HtmlOverlayItem} from './overlays/html-overlay-item';\nexport {HtmlClusterOverlay} from './overlays/html-cluster-overlay';\n\nexport {HtmlTooltipOverlay} from './overlays/html-tooltip-overlay';\n", "// deck.gl-community\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport React, {PureComponent} from 'react';\nimport PropTypes from 'prop-types';\n\nexport class LongPressButton extends PureComponent {\n static propTypes = {\n onClick: PropTypes.func.isRequired,\n // eslint-disable-next-line react/forbid-prop-types\n children: PropTypes.any.isRequired\n };\n\n buttonPressTimer: ReturnType<typeof setTimeout> | null = null;\n\n _repeat = () => {\n if (this.buttonPressTimer) {\n (this.props as any).onClick();\n this.buttonPressTimer = setTimeout(this._repeat, 100);\n }\n };\n\n _handleButtonPress = () => {\n this.buttonPressTimer = setTimeout(this._repeat, 100);\n };\n\n _handleButtonRelease = () => {\n if (this.buttonPressTimer) {\n clearTimeout(this.buttonPressTimer);\n }\n this.buttonPressTimer = null;\n };\n\n render() {\n return (\n <div\n onMouseDown={(event) => {\n this._handleButtonPress();\n document.addEventListener('mouseup', this._handleButtonRelease, {once: true});\n }}\n >\n {(this.props as any).children}\n </div>\n );\n }\n}\n", "// deck.gl-community\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n// @ts-nocheck TODO\n\nimport React, {PureComponent} from 'react';\nimport PropTypes from 'prop-types';\nimport {styled} from 'styled-components';\nimport {LongPressButton} from './long-press-button';\n\nexport const ViewControlWrapper = styled.div`\n align-items: center;\n display: flex;\n flex-direction: column;\n position: absolute;\n z-index: 99;\n user-select: none;\n`;\n\nexport const NavigationButtonContainer = styled.div`\n background: #f7f7f7;\n border-radius: 23px;\n border: 0.5px solid #eaeaea;\n box-shadow: inset 11px 11px 5px -7px rgba(230, 230, 230, 0.49);\n height: 46px;\n width: 46px;\n`;\n\nexport const NavigationButton = styled.div`\n color: #848484;\n cursor: pointer;\n left: ${(props: any) => props.$left};\n position: absolute;\n top: ${(props: any) => props.$top};\n transform: rotate(${(props: any) => props.rotate || 0}deg);\n\n &:hover,\n &:active {\n color: #00ade6;\n }\n`;\n\nexport const ZoomControlWrapper = styled.div`\n align-items: center;\n background: #f7f7f7;\n border: 0.5px solid #eaeaea;\n display: flex;\n flex-direction: column;\n margin-top: 6px;\n padding: 2px 0;\n width: 18px;\n`;\n\nexport const VerticalSlider = styled.div`\n display: inline-block;\n height: 100px;\n padding: 0;\n width: 10px;\n\n > input[type='range'][orient='vertical'] {\n writing-mode: vertical-lr;\n height: 100px;\n padding: 0;\n margin: 0;\n width: 10px;\n }\n`;\n\nexport const ZoomControlButton = styled.div`\n cursor: pointer;\n font-size: 14px;\n font-weight: 500;\n margin: -4px;\n\n &:hover,\n &:active {\n color: #00ade6;\n }\n`;\n\nexport class ViewControl extends PureComponent {\n static displayName = 'ViewControl';\n\n static propTypes = {\n // functions\n fitBounds: PropTypes.func,\n panBy: PropTypes.func,\n zoomBy: PropTypes.func,\n // current zoom level\n zoomLevel: PropTypes.number,\n // configuration\n minZoom: PropTypes.number,\n maxZoom: PropTypes.number,\n deltaPan: PropTypes.number,\n deltaZoom: PropTypes.number\n };\n\n static defaultProps = {\n fitBounds: () => {},\n panBy: () => {},\n zoomBy: () => {},\n deltaPan: 10,\n deltaZoom: 0.1,\n minZoom: 0.1,\n maxZoom: 1\n };\n\n // pan actions\n panUp = () => (this.props as any).panBy(0, (this.props as any).deltaPan);\n panDown = () => (this.props as any).panBy(0, -1 * (this.props as any).deltaPan);\n panLeft = () => (this.props as any).panBy((this.props as any).deltaPan, 0);\n panRight = () => (this.props as any).panBy(-1 * (this.props as any).deltaPan, 0);\n\n // zoom actions\n zoomIn = () => (this.props as any).zoomBy((this.props as any).deltaZoom);\n zoomOut = () => (this.props as any).zoomBy(-1 * (this.props as any).deltaZoom);\n onChangeZoomLevel = (evt) => {\n const delta = evt.target.value - (this.props as any).zoomLevel;\n (this.props as any).zoomBy(delta);\n };\n\n render() {\n const buttons = [\n {top: -2, left: 14, rotate: 0, onClick: this.panUp, content: '\u25B2', key: 'up'},\n {top: 12, left: 0, rotate: -90, onClick: this.panLeft, content: '\u25C0', key: 'left'},\n {top: 12, left: 28, rotate: 90, onClick: this.panRight, content: '\u25B6', key: 'right'},\n {top: 25, left: 14, rotate: 180, onClick: this.panDown, content: '\u25BC', key: 'down'}\n ];\n\n return (\n <ViewControlWrapper>\n <NavigationButtonContainer>\n {buttons.map((b: any) => (\n <NavigationButton\n key={b.key}\n $top={`${b.top}px`}\n $left={`${b.left}px`}\n rotate={b.rotate}\n >\n <LongPressButton onClick={b.onClick}>{b.content}</LongPressButton>\n </NavigationButton>\n ))}\n {/* @ts-expect-error TODO */}\n <NavigationButton $top={'12px'} $left={'16px'} onClick={this.props.fitBounds}>\n {'\u00A4'}\n </NavigationButton>\n </NavigationButtonContainer>\n <ZoomControlWrapper>\n <ZoomControlButton>\n <LongPressButton onClick={this.zoomIn}>{'+'}</LongPressButton>\n </ZoomControlButton>\n <VerticalSlider>\n <input\n type=\"range\"\n value={(this.props as any).zoomLevel}\n min={(this.props as any).minZoom}\n max={(this.props as any).maxZoom}\n step={(this.props as any).deltaZoom}\n onChange={this.onChangeZoomLevel}\n /* @ts-expect-error TODO */\n orient=\"vertical\"\n />\n </VerticalSlider>\n <ZoomControlButton>\n <LongPressButton onClick={this.zoomOut}>{'-'}</LongPressButton>\n </ZoomControlButton>\n </ZoomControlWrapper>\n </ViewControlWrapper>\n );\n }\n}\n", "// deck.gl-community\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {ViewControl} from './view-control';\nimport React from 'react';\n\n// A wrapper for positioning the ViewControl component\nexport const PositionedViewControl = ({\n fitBounds,\n panBy,\n zoomBy,\n zoomLevel,\n maxZoom = 20,\n minZoom = -20\n}) => (\n <div style={{position: 'relative', top: '20px', left: '20px'}}>\n <ViewControl\n fitBounds={fitBounds}\n panBy={panBy}\n zoomBy={zoomBy}\n zoomLevel={zoomLevel}\n maxZoom={maxZoom}\n minZoom={minZoom}\n />\n </div>\n);\n", "// deck.gl-community\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n/* eslint-env browser */\n\nimport * as React from 'react';\nimport Modal, {ModalProvider} from 'styled-react-modal';\nimport {styled} from 'styled-components';\n\nexport const Button = styled.button`\n display: inline-block;\n color: #fff;\n background-color: rgb(90, 98, 94);\n font-size: 1em;\n margin: 0.25em;\n padding: 0.375em 0.75em;\n border: 1px solid transparent;\n border-radius: 0.25em;\n display: block;\n`;\n\nconst StyledModal = Modal.styled`\n position: relative;\n display: block;\n width: 50rem;\n height: auto;\n max-width: 500px;\n margin: 1.75rem auto;\n box-sizing: border-box;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n font-size: 1rem;\n font-weight: 400;\n color: rgb(21, 25, 29);\n line-height: 1.5;\n text-align: left;\n`;\n\nconst Content = styled.div`\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n pointer-events: auto;\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 0.3rem;\n outline: 0;\n`;\n\nconst HeaderRow = styled.div`\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n padding: 0.75rem 0.75rem;\n border-bottom: 1px solid rgb(222, 226, 230);\n`;\n\nconst Header = styled.h5`\n font-size: 1.25rem;\n font-weight: 500;\n margin: 0;\n`;\n\nexport type ModalProps = {\n title: any;\n content: any;\n onClose: () => unknown;\n};\n\nexport function EditorModal(props: ModalProps) {\n const [isOpen, setIsOpen] = React.useState(true);\n\n function toggleModal() {\n if (isOpen) {\n props.onClose();\n }\n setIsOpen(!isOpen);\n }\n\n return (\n <>\n <ModalProvider>\n <StyledModal isOpen={isOpen} onBackgroundClick={toggleModal} onEscapeKeydown={toggleModal}>\n <Content>\n <HeaderRow>\n <Header>{props.title}</Header>\n </HeaderRow>\n {props.content}\n </Content>\n </StyledModal>\n </ModalProvider>\n </>\n );\n}\n", "// deck.gl-community\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport * as React from 'react';\nimport 'boxicons';\n\nexport function Icon(props) {\n // @ts-expect-error TODO\n return <box-icon color=\"currentColor\" {...props} />;\n}\n", "// deck.gl-community\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport * as React from 'react';\n\nconst styles = {\n mainContainer: {\n width: '100%',\n height: '100%',\n position: 'absolute',\n pointerEvents: 'none',\n overflow: 'hidden'\n }\n};\n\ninterface Props {\n viewport?: Record<string, any>;\n zIndex?: number;\n children?: React.ReactNode;\n // Overlay items abruptly disappear when their anchor point passes the edge of the map, which is\n // visible to the user. The overflowMargin prop is used to effectively create a hidden buffer\n // zone that extends from all sides of the map while leaving the visible edge of the map\n // unchanged. With this, overlay items can move into the buffer zone and disappear only when\n // their anchor passes the edge of the buffer zone. This produces a perceived effect of overlay\n // items being rendered as part of the map, instead of separate entities tacked on to the map.\n overflowMargin?: number;\n}\n\nexport class HtmlOverlay extends React.Component<Props> {\n // This is needed for Deck.gl 8.0+\n static deckGLViewProps = true;\n\n // Override this to provide your items\n getItems(): Array<any> {\n const {children} = this.props;\n if (children) {\n return Array.isArray(children) ? children : [children];\n }\n return [];\n }\n\n getCoords(coordinates: number[]): [number, number] {\n const pos = this.props.viewport.project(coordinates);\n if (!pos) return [-1, -1];\n return pos;\n }\n\n inView([x, y]: number[]): boolean {\n const {viewport, overflowMargin = 0} = this.props;\n const {width, height} = viewport;\n return !(\n x < -overflowMargin ||\n y < -overflowMargin ||\n x > width + overflowMargin ||\n y > height + overflowMargin\n );\n }\n\n scaleWithZoom(n: number) {\n const {zoom} = this.props.viewport;\n return n / Math.pow(2, 20 - zoom);\n }\n\n breakpointWithZoom(threshold: number, a: any, b: any): any {\n const {zoom} = this.props.viewport;\n return zoom > threshold ? a : b;\n }\n\n getViewport() {\n return this.props.viewport;\n }\n\n getZoom() {\n return this.props.viewport.zoom;\n }\n\n render() {\n const {zIndex = 1} = this.props;\n const style = Object.assign({zIndex} as any, styles.mainContainer);\n\n const renderItems = [];\n this.getItems()\n .filter(Boolean)\n .forEach((item, index) => {\n const [x, y] = this.getCoords(item.props.coordinates);\n if (this.inView([x, y])) {\n const key = item.key === null || item.key === undefined ? index : item.key;\n renderItems.push(React.cloneElement(item, {x, y, key}));\n }\n });\n\n return <div style={style}>{renderItems}</div>;\n }\n}\n", "// deck.gl-community\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport * as React from 'react';\n\ntype Props = {\n // Injected by HtmlOverlay\n x?: number;\n y?: number;\n\n // User provided\n coordinates: number[];\n children: any;\n style?: Record<string, any>;\n};\n\nexport class HtmlOverlayItem extends React.Component<Props> {\n render() {\n const {x, y, children, style, /* coordinates, */ ...props} = this.props;\n const {zIndex = 'auto', ...remainingStyle} = style || {};\n\n return (\n // Using transform translate to position overlay items will result in a smooth zooming\n // effect, whereas using the top/left css properties will cause overlay items to\n // jiggle when zooming\n <div style={{transform: `translate(${x}px, ${y}px)`, position: 'absolute', zIndex}}>\n <div style={{userSelect: 'none', ...remainingStyle}} {...props}>\n {children}\n </div>\n </div>\n );\n }\n}\n", "// deck.gl-community\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {point} from '@turf/helpers';\nimport Supercluster from 'supercluster';\nimport {HtmlOverlay} from './html-overlay';\n\nexport class HtmlClusterOverlay<ObjType> extends HtmlOverlay {\n _superCluster: Supercluster;\n _lastObjects: ObjType[] | null | undefined = null;\n\n getItems(): Record<string, any>[] {\n // supercluster().load() is expensive and we want to run it only\n // when necessary and not for every frame.\n\n // TODO: Warn if this is running many times / sec\n\n const newObjects = this.getAllObjects();\n if (newObjects !== this._lastObjects) {\n this._superCluster = new Supercluster(this.getClusterOptions());\n this._superCluster.load(\n newObjects.map((object) => point(this.getObjectCoordinates(object), {object}))\n );\n this._lastObjects = newObjects;\n // console.log('new Supercluster() run');\n }\n\n const clusters = this._superCluster.getClusters(\n [-180, -90, 180, 90],\n Math.round(this.getZoom())\n );\n\n return clusters.map(\n ({\n geometry: {coordinates},\n properties: {cluster, point_count: pointCount, cluster_id: clusterId, object}\n }) =>\n cluster\n ? this.renderCluster(coordinates, clusterId, pointCount)\n : this.renderObject(coordinates, object)\n );\n }\n\n getClusterObjects(clusterId: number): ObjType[] {\n return this._superCluster\n .getLeaves(clusterId, Infinity)\n .map((object) => object.properties.object);\n }\n\n // Override to provide items that need clustering.\n // If the items have not changed please provide the same array to avoid\n // regeneration of the cluster which causes performance issues.\n getAllObjects(): ObjType[] {\n return [];\n }\n\n // override to provide coordinates for each object of getAllObjects()\n getObjectCoordinates(obj: ObjType): [number, number] {\n return [0, 0];\n }\n\n // Get options object used when instantiating supercluster\n getClusterOptions(): Record<string, any> | null | undefined {\n return {\n maxZoom: 20\n };\n }\n\n // override to return an HtmlOverlayItem\n renderObject(coordinates: number[], obj: ObjType): Record<string, any> | null | undefined {\n return null;\n }\n\n // override to return an HtmlOverlayItem\n // use getClusterObjects() to get cluster contents\n renderCluster(\n coordinates: number[],\n clusterId: number,\n pointCount: number\n ): Record<string, any> | null | undefined {\n return null;\n }\n}\n", "// deck.gl-community\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport * as React from 'react';\n\nimport {HtmlOverlay} from './html-overlay';\nimport {HtmlOverlayItem} from './html-overlay-item';\n\ntype State = {\n visible: boolean;\n pickingInfo: Record<string, any> | null | undefined;\n};\n\nconst styles = {\n tooltip: {\n transform: 'translate(-50%,-100%)',\n backgroundColor: 'rgba(0, 0, 0, 0.3)',\n padding: '4px 8px',\n borderRadius: 8,\n color: 'white'\n }\n};\n\nconst SHOW_TOOLTIP_TIMEOUT = 250;\n\nexport class HtmlTooltipOverlay extends HtmlOverlay {\n constructor(props: any) {\n super(props);\n this.state = {visible: false, pickingInfo: null};\n }\n\n componentWillMount() {\n (this.context as any).nebula.queryObjectEvents.on('pick', ({event, pickingInfo}) => {\n if (this.timeoutID !== null) {\n window.clearTimeout(this.timeoutID);\n }\n this.timeoutID = null;\n\n if (pickingInfo && this._getTooltip(pickingInfo)) {\n this.timeoutID = window.setTimeout(() => {\n this.setState({visible: true, pickingInfo});\n }, SHOW_TOOLTIP_TIMEOUT);\n } else {\n this.setState({visible: false});\n }\n });\n }\n\n timeoutID: number | null | undefined = null;\n state: State = undefined!;\n\n _getTooltip(pickingInfo: Record<string, any>): string {\n return pickingInfo.object.style.tooltip;\n }\n\n _makeOverlay() {\n const {pickingInfo} = this.state;\n\n if (pickingInfo) {\n return (\n <HtmlOverlayItem key={0} coordinates={pickingInfo.lngLat} style={styles.tooltip}>\n {this._getTooltip(pickingInfo)}\n </HtmlOverlayItem>\n );\n }\n\n return null;\n }\n\n getItems(): Array<Record<string, any> | null | undefined> {\n if (this.state.visible) {\n return [this._makeOverlay()];\n }\n\n return [];\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;ACIA,mBAAmC;AACnC,wBAAsB;AAEhB,IAAO,kBAAP,cAA+B,2BAAa;EAOhD,mBAAyD;EAEzD,UAAU,MAAK;AACb,QAAI,KAAK,kBAAkB;AACxB,WAAK,MAAc,QAAO;AAC3B,WAAK,mBAAmB,WAAW,KAAK,SAAS,GAAG;IACtD;EACF;EAEA,qBAAqB,MAAK;AACxB,SAAK,mBAAmB,WAAW,KAAK,SAAS,GAAG;EACtD;EAEA,uBAAuB,MAAK;AAC1B,QAAI,KAAK,kBAAkB;AACzB,mBAAa,KAAK,gBAAgB;IACpC;AACA,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AAe,KAAK,YAAY,WAAW,GAAG;AAChD,aAAK,YAAY,OAAO,WAAW,MAAK;AACtC,eAAK,SAAS,EAAC,SAAS,MAAM,YAAW,CAAC;QAC5C,GAAG,oBAAoB;MACzB,OAAO;AACL,aAAK,SAAS,EAAC,SAAS,MAAK,CAAC;MAChC;IACF,CAAC;EACH;EAEA,YAAuC;EACvC,QAAe;EAEf,YAAY,aAAgC;AAC1C,WAAO,YAAY,OAAO,MAAM;EAClC;EAEA,eAAY;AACV,UAAM,EAAC,YAAW,IAAI,KAAK;AAE3B,QAAI,aAAa;AACf,aACE,qBAAC,iBAAe,EAAC,KAAK,GAAG,aAAa,YAAY,QAAQ,OAAOA,QAAO,QAAO,GAC5E,KAAK,YAAY,WAAW,CAAC;IAGpC;AAEA,WAAO;EACT;EAEA,WAAQ;AACN,QAAI,KAAK,MAAM,SAAS;AACtB,aAAO,CAAC,KAAK,aAAY,CAAE;IAC7B;AAEA,WAAO,CAAA;EACT;;",
|
|
6
6
|
"names": ["React", "PropTypes", "import_react", "import_prop_types", "React", "PropTypes", "import_react", "React", "React", "import_styled_components", "Modal", "React", "React", "React", "Supercluster", "React", "styles"]
|
|
7
7
|
}
|
package/dist/index.js
CHANGED
|
@@ -14,3 +14,4 @@ export { HtmlOverlay } from "./overlays/html-overlay.js";
|
|
|
14
14
|
export { HtmlOverlayItem } from "./overlays/html-overlay-item.js";
|
|
15
15
|
export { HtmlClusterOverlay } from "./overlays/html-cluster-overlay.js";
|
|
16
16
|
export { HtmlTooltipOverlay } from "./overlays/html-tooltip-overlay.js";
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,+BAA+B;AAC/B,oCAAoC;AAEpC,+DAA+D;AAE/D,OAAO,EAAC,eAAe,EAAC,0CAAuC;AAC/D,OAAO,EAAC,WAAW,EAAC,qCAAk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ACrB,SAAiB,EACjB,UAAkB;QAElB,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html-overlay-item.js","sourceRoot":"","sources":["../../src/overlays/html-overlay-item.tsx"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,MAAM,OAAO,eAAgB,SAAQ,KAAK,CAAC,SAAgB;IACzD,MAAM;QACJ,MAAM,EAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,kBAAkB,CAAC,GAAG,KAAK,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QACxE,MAAM,EAAC,MAAM,GAAG,MAAM,EAAE,GAAG,cAAc,EAAC,GAAG,KAAK,IAAI,EAAE,CAAC;QAEzD,OAAO;QACL,sFAAsF;QACtF,gFAAgF;QAChF,sBAAsB;QACtB,6BAAK,KAAK,EAAE,EAAC,SAAS,EAAE,aAAa,CAAC,OAAO,CAAC,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAC;YAChF,6BAAK,KAAK,EAAE,EAAC,UAAU,EAAE,MAAM,EAAE,GAAG,cAAc,EAAC,KAAM,KAAK,IAC3D,QAAQ,CACL,CACF,CACP,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html-overlay.js","sourceRoot":"","sources":["../../src/overlays/html-overlay.tsx"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,MAAM,GAAG;IACb,aAAa,EAAE;QACb,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,MAAM;QACd,QAAQ,EAAE,UAAU;QACpB,aAAa,EAAE,MAAM;QACrB,QAAQ,EAAE,QAAQ;KACnB;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Q,CAAC,EAAC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAC,CAAC,CAAC;gBAC9C,CAAC,EAAE,oBAAoB,CAAC,CAAC;YAC3B,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,QAAQ,CAAC,EAAC,OAAO,EAAE,KAAK,EAAC,CAAC,CAAC;YAClC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,SAAS,GAA8B,IAAI,CAAC;IAC5C,KAAK,GAAU,SAAU,CAAC;IAE1B,WAAW,CAAC,WAAgC;QAC1C,OAAO,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC;IAC1C,CAAC;IAED,YAAY;QACV,MAAM,EAAC,WAAW,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QAEjC,IAAI,WAAW,EAAE,CAAC;YAChB,OAAO,CACL,oBAAC,eAAe,IAAC,GAAG,EAAE,CAAC,EAAE,WAAW,EAAE,WAAW,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,IAC5E,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CACd,CACnB,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED,QAAQ;QACN,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;YACvB,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;QAC/B,CAAC;QAED,OAAO,EAAE,CAAC;IACZ,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@deck.gl-community/react",
|
|
3
3
|
"description": "React components for deck.gl",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "9.1.0-beta.
|
|
5
|
+
"version": "9.1.0-beta.4",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/visgl/deck.gl-community"
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"styled-react-modal": "^3.1.1",
|
|
46
46
|
"supercluster": "^8.0.1"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "f87e45dc74667f31df173d265c79235db5c688c5"
|
|
49
49
|
}
|