@deck.gl/react 9.0.34 → 9.1.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"deckgl.d.ts","sourceRoot":"","sources":["../src/deckgl.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,IAAI,EAAC,MAAM,eAAe,CAAC;AAGnC,OAAyB,EAAC,oBAAoB,EAAC,sCAAmC;AAIlF,OAAO,KAAK,EAAC,kBAAkB,EAAC,iDAA8C;AAC9E,OAAO,KAAK,EAAC,SAAS,EAAE,IAAI,EAAW,MAAM,eAAe,CAAC;AAE7D,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;AAe/C,mCAAmC;AACnC,MAAM,MAAM,WAAW,CAAC,MAAM,SAAS,WAAW,GAAG,IAAI,IAAI,IAAI,CAC/D,SAAS,CAAC,MAAM,CAAC,EACjB,OAAO,GAAG,QAAQ,GAAG,IAAI,GAAG,QAAQ,GAAG,QAAQ,GAAG,eAAe,CAClE,GAAG;IACF,IAAI,CAAC,EAAE,OAAO,IAAI,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,oBAAoB,CAAC;IAClD,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IACnC,eAAe,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,UAAU,CAAC,CAAC;CACjE,CAAC;AAEF,MAAM,MAAM,SAAS,CAAC,MAAM,SAAS,WAAW,GAAG,IAAI,IAAI;IACzD,IAAI,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,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AAEF,MAAM,MAAM,SAAS,CAAC,MAAM,SAAS,WAAW,GAAG,IAAI,IAAI;IACzD,IAAI,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACpB,UAAU,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IAC/B,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IACjC,mBAAmB,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;CAClD,CAAC;AAsNF,QAAA,MAAM,MAAM,EAAsC,CAAC,MAA0B,SAAX,WAAW,EAC3E,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,KACvB,KAAK,CAAC,YAAY,CAAC;AAExB,eAAe,MAAM,CAAC"}
package/dist/deckgl.js CHANGED
@@ -1,22 +1,6 @@
1
- // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
2
- //
3
- // Permission is hereby granted, free of charge, to any person obtaining a copy
4
- // of this software and associated documentation files (the "Software"), to deal
5
- // in the Software without restriction, including without limitation the rights
6
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- // copies of the Software, and to permit persons to whom the Software is
8
- // furnished to do so, subject to the following conditions:
9
- //
10
- // The above copyright notice and this permission notice shall be included in
11
- // all copies or substantial portions of the Software.
12
- //
13
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- // THE SOFTWARE.
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
20
4
  import * as React from 'react';
21
5
  import { createElement, useRef, useState, useMemo, useEffect, useImperativeHandle } from 'react';
22
6
  import { Deck } from '@deck.gl/core';
package/dist/index.cjs CHANGED
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -209,7 +213,9 @@ function positionChildrenUnderViews({ children, deck, ContextProvider }) {
209
213
  if (ContextProvider) {
210
214
  const contextValue = {
211
215
  viewport,
216
+ // @ts-expect-error accessing protected property
212
217
  container: deck.canvas.offsetParent,
218
+ // @ts-expect-error accessing protected property
213
219
  eventManager: deck.eventManager,
214
220
  onViewStateChange: (params) => {
215
221
  params.viewId = viewId;
@@ -257,6 +263,7 @@ function getRefHandles(thisRef) {
257
263
  get deck() {
258
264
  return thisRef.deck;
259
265
  },
266
+ // The following method can only be called after ref is available, by which point deck is defined in useEffect
260
267
  pickObject: (opts) => thisRef.deck.pickObject(opts),
261
268
  pickMultipleObjects: (opts) => thisRef.deck.pickMultipleObjects(opts),
262
269
  pickObjects: (opts) => thisRef.deck.pickObjects(opts)
@@ -271,6 +278,9 @@ function redrawDeck(thisRef) {
271
278
  function createDeckInstance(thisRef, DeckClass, props) {
272
279
  const deck = new DeckClass({
273
280
  ...props,
281
+ // The Deck's animation loop is independent from React's render cycle, causing potential
282
+ // synchronization issues. We provide this custom render function to make sure that React
283
+ // and Deck update on the same schedule.
274
284
  _customRender: (redrawReason) => {
275
285
  thisRef.redrawReason = redrawReason;
276
286
  const viewports = deck.getViewports();
@@ -316,6 +326,7 @@ function DeckGLWithRef(props, ref) {
316
326
  const deckProps = (0, import_react5.useMemo)(() => {
317
327
  const forwardProps = {
318
328
  ...props,
329
+ // Override user styling props. We will set the canvas style in render()
319
330
  style: null,
320
331
  width: "100%",
321
332
  height: "100%",
@@ -358,7 +369,8 @@ function DeckGLWithRef(props, ref) {
358
369
  const currentViewports = thisRef.deck && thisRef.deck.isInitialized ? thisRef.deck.getViewports() : void 0;
359
370
  const { ContextProvider, width = "100%", height = "100%", id, style } = props;
360
371
  const { containerStyle, canvasStyle } = (0, import_react5.useMemo)(() => extractStyles({ width, height, style }), [width, height, style]);
361
- if (!thisRef.viewStateUpdateRequested && thisRef.lastRenderedViewports === currentViewports || thisRef.version !== version) {
372
+ if (!thisRef.viewStateUpdateRequested && thisRef.lastRenderedViewports === currentViewports || // case 2
373
+ thisRef.version !== version) {
362
374
  thisRef.lastRenderedViewports = currentViewports;
363
375
  thisRef.version = version;
364
376
  const childrenUnderViews = positionChildrenUnderViews({
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["index.js", "deckgl.js", "utils/use-isomorphic-layout-effect.js", "utils/extract-jsx-layers.js", "utils/inherits-from.js", "utils/evaluate-children.js", "utils/position-children-under-views.js", "utils/extract-styles.js"],
4
- "sourcesContent": ["// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\nexport { default as DeckGL } from \"./deckgl.js\";\nexport { default } from \"./deckgl.js\";\n", "// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\nimport * as React from 'react';\nimport { createElement, useRef, useState, useMemo, useEffect, useImperativeHandle } from 'react';\nimport { Deck } from '@deck.gl/core';\nimport useIsomorphicLayoutEffect from \"./utils/use-isomorphic-layout-effect.js\";\nimport extractJSXLayers from \"./utils/extract-jsx-layers.js\";\nimport positionChildrenUnderViews from \"./utils/position-children-under-views.js\";\nimport extractStyles from \"./utils/extract-styles.js\";\nfunction getRefHandles(thisRef) {\n return {\n get deck() {\n return thisRef.deck;\n },\n // The following method can only be called after ref is available, by which point deck is defined in useEffect\n pickObject: opts => thisRef.deck.pickObject(opts),\n pickMultipleObjects: opts => thisRef.deck.pickMultipleObjects(opts),\n pickObjects: opts => thisRef.deck.pickObjects(opts)\n };\n}\nfunction redrawDeck(thisRef) {\n if (thisRef.redrawReason) {\n // Only redraw if we have received a dirty flag\n // @ts-expect-error accessing protected method\n thisRef.deck._drawLayers(thisRef.redrawReason);\n thisRef.redrawReason = null;\n }\n}\nfunction createDeckInstance(thisRef, DeckClass, props) {\n const deck = new DeckClass({\n ...props,\n // The Deck's animation loop is independent from React's render cycle, causing potential\n // synchronization issues. We provide this custom render function to make sure that React\n // and Deck update on the same schedule.\n _customRender: redrawReason => {\n // Save the dirty flag for later\n thisRef.redrawReason = redrawReason;\n // Viewport/view state is passed to child components as props.\n // If they have changed, we need to trigger a React rerender to update children props.\n const viewports = deck.getViewports();\n if (thisRef.lastRenderedViewports !== viewports) {\n // Viewports have changed, update children props first.\n // This will delay the Deck canvas redraw till after React update (in useLayoutEffect)\n // so that the canvas does not get rendered before the child components update.\n thisRef.forceUpdate();\n }\n else {\n redrawDeck(thisRef);\n }\n }\n });\n return deck;\n}\nfunction DeckGLWithRef(props, ref) {\n // A mechanism to force redraw\n const [version, setVersion] = useState(0);\n // A reference to persistent states\n const _thisRef = useRef({\n control: null,\n version,\n forceUpdate: () => setVersion(v => v + 1)\n });\n const thisRef = _thisRef.current;\n // DOM refs\n const containerRef = useRef(null);\n const canvasRef = useRef(null);\n // extract any deck.gl layers masquerading as react elements from props.children\n const jsxProps = useMemo(() => extractJSXLayers(props), [props.layers, props.views, props.children]);\n // Callbacks\n let inRender = true;\n const handleViewStateChange = params => {\n if (inRender && props.viewState) {\n // Callback may invoke a state update. Defer callback to after render() to avoid React error\n // In React StrictMode, render is executed twice and useEffect/useLayoutEffect is executed once\n // Store deferred parameters in ref so that we can access it in another render\n thisRef.viewStateUpdateRequested = params;\n return null;\n }\n thisRef.viewStateUpdateRequested = null;\n return props.onViewStateChange?.(params);\n };\n const handleInteractionStateChange = params => {\n if (inRender) {\n // Callback may invoke a state update. Defer callback to after render() to avoid React error\n // In React StrictMode, render is executed twice and useEffect/useLayoutEffect is executed once\n // Store deferred parameters in ref so that we can access it in another render\n thisRef.interactionStateUpdateRequested = params;\n }\n else {\n thisRef.interactionStateUpdateRequested = null;\n props.onInteractionStateChange?.(params);\n }\n };\n // Update Deck's props. If Deck needs redraw, this will trigger a call to `_customRender` in\n // the next animation frame.\n // Needs to be called both from initial mount, and when new props are received\n const deckProps = useMemo(() => {\n const forwardProps = {\n ...props,\n // Override user styling props. We will set the canvas style in render()\n style: null,\n width: '100%',\n height: '100%',\n parent: containerRef.current,\n canvas: canvasRef.current,\n layers: jsxProps.layers,\n views: jsxProps.views,\n onViewStateChange: handleViewStateChange,\n onInteractionStateChange: handleInteractionStateChange\n };\n // The defaultValue for _customRender is null, which would overwrite the definition\n // of _customRender. Remove to avoid frequently redeclaring the method here.\n delete forwardProps._customRender;\n if (thisRef.deck) {\n thisRef.deck.setProps(forwardProps);\n }\n return forwardProps;\n }, [props]);\n useEffect(() => {\n const DeckClass = props.Deck || Deck;\n thisRef.deck = createDeckInstance(thisRef, DeckClass, {\n ...deckProps,\n parent: containerRef.current,\n canvas: canvasRef.current\n });\n return () => thisRef.deck?.finalize();\n }, []);\n useIsomorphicLayoutEffect(() => {\n // render has just been called. The children are positioned based on the current view state.\n // Redraw Deck canvas immediately, if necessary, using the current view state, so that it\n // matches the child components.\n redrawDeck(thisRef);\n // Execute deferred callbacks\n const { viewStateUpdateRequested, interactionStateUpdateRequested } = thisRef;\n if (viewStateUpdateRequested) {\n handleViewStateChange(viewStateUpdateRequested);\n }\n if (interactionStateUpdateRequested) {\n handleInteractionStateChange(interactionStateUpdateRequested);\n }\n });\n useImperativeHandle(ref, () => getRefHandles(thisRef), []);\n const currentViewports = thisRef.deck && thisRef.deck.isInitialized ? thisRef.deck.getViewports() : undefined;\n const { ContextProvider, width = '100%', height = '100%', id, style } = props;\n const { containerStyle, canvasStyle } = useMemo(() => extractStyles({ width, height, style }), [width, height, style]);\n // Props changes may lead to 3 types of updates:\n // 1. Only the WebGL canvas - updated in Deck's render cycle (next animation frame)\n // 2. Only the DOM - updated in React's lifecycle (now)\n // 3. Both the WebGL canvas and the DOM - defer React rerender to next animation frame just\n // before Deck redraw to ensure perfect synchronization & avoid excessive redraw\n // This is because multiple changes may happen to Deck between two frames e.g. transition\n if ((!thisRef.viewStateUpdateRequested && thisRef.lastRenderedViewports === currentViewports) || // case 2\n thisRef.version !== version // case 3 just before deck redraws\n ) {\n thisRef.lastRenderedViewports = currentViewports;\n thisRef.version = version;\n // Render the background elements (typically react-map-gl instances)\n // using the view descriptors\n const childrenUnderViews = positionChildrenUnderViews({\n children: jsxProps.children,\n deck: thisRef.deck,\n ContextProvider\n });\n const canvas = createElement('canvas', {\n key: 'canvas',\n id: id || 'deckgl-overlay',\n ref: canvasRef,\n style: canvasStyle\n });\n // Render deck.gl as the last child\n thisRef.control = createElement('div', { id: `${id || 'deckgl'}-wrapper`, ref: containerRef, style: containerStyle }, [canvas, childrenUnderViews]);\n }\n inRender = false;\n return thisRef.control;\n}\nconst DeckGL = React.forwardRef(DeckGLWithRef);\nexport default DeckGL;\n", "// From https://github.com/streamich/react-use/blob/master/src/useIsomorphicLayoutEffect.ts\n// useLayoutEffect but does not trigger warning in server-side rendering\nimport { useEffect, useLayoutEffect } from 'react';\nconst useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;\nexport default useIsomorphicLayoutEffect;\n", "import * as React from 'react';\nimport { createElement } from 'react';\nimport { inheritsFrom } from \"./inherits-from.js\";\nimport { Layer, View } from '@deck.gl/core';\nimport { isComponent } from \"./evaluate-children.js\";\n// recursively wrap render callbacks in `View`\nfunction wrapInView(node) {\n if (typeof node === 'function') {\n // React.Children does not traverse functions.\n // All render callbacks must be protected under a <View>\n // @ts-expect-error View is not a ReactJSXElement constructor. Only used as a temporary wrapper and will be removed in extractJSXLayers\n return createElement(View, {}, node);\n }\n if (Array.isArray(node)) {\n return node.map(wrapInView);\n }\n if (isComponent(node)) {\n if (node.type === React.Fragment) {\n return wrapInView(node.props.children);\n }\n if (inheritsFrom(node.type, View)) {\n return node;\n }\n }\n return node;\n}\n// extracts any deck.gl layers masquerading as react elements from props.children\nexport default function extractJSXLayers({ children, layers = [], views = null }) {\n const reactChildren = []; // extract real react elements (i.e. not deck.gl layers)\n const jsxLayers = []; // extracted layer from react children, will add to deck.gl layer array\n const jsxViews = {};\n // React.children\n React.Children.forEach(wrapInView(children), reactElement => {\n if (isComponent(reactElement)) {\n // For some reason Children.forEach doesn't filter out `null`s\n const ElementType = reactElement.type;\n if (inheritsFrom(ElementType, Layer)) {\n const layer = createLayer(ElementType, reactElement.props);\n jsxLayers.push(layer);\n }\n else {\n reactChildren.push(reactElement);\n }\n // empty id => default view\n if (inheritsFrom(ElementType, View) && ElementType !== View && reactElement.props.id) {\n // @ts-ignore Cannot instantiate an abstract class (View)\n const view = new ElementType(reactElement.props);\n jsxViews[view.id] = view;\n }\n }\n else if (reactElement) {\n reactChildren.push(reactElement);\n }\n });\n // Avoid modifying views if no JSX views were found\n if (Object.keys(jsxViews).length > 0) {\n // If a view is specified in both views prop and JSX, use the one in views\n if (Array.isArray(views)) {\n views.forEach(view => {\n jsxViews[view.id] = view;\n });\n }\n else if (views) {\n jsxViews[views.id] = views;\n }\n views = Object.values(jsxViews);\n }\n // Avoid modifying layers array if no JSX layers were found\n layers = jsxLayers.length > 0 ? [...jsxLayers, ...layers] : layers;\n return { layers, children: reactChildren, views };\n}\nfunction createLayer(LayerType, reactProps) {\n const props = {};\n // Layer.defaultProps is treated as ReactElement.defaultProps and merged into react props\n // Remove them\n const defaultProps = LayerType.defaultProps || {};\n for (const key in reactProps) {\n if (defaultProps[key] !== reactProps[key]) {\n props[key] = reactProps[key];\n }\n }\n // @ts-ignore Cannot instantiate an abstract class (Layer)\n return new LayerType(props);\n}\n", "// Check if one JavaScript class inherits from another\nexport function inheritsFrom(Type, ParentType) {\n while (Type) {\n if (Type === ParentType) {\n return true;\n }\n Type = Object.getPrototypeOf(Type);\n }\n return false;\n}\n", "import { cloneElement } from 'react';\nconst MAP_STYLE = { position: 'absolute', zIndex: -1 };\nexport default function evaluateChildren(children, childProps) {\n if (typeof children === 'function') {\n return children(childProps);\n }\n if (Array.isArray(children)) {\n return children.map(child => evaluateChildren(child, childProps));\n }\n if (isComponent(children)) {\n // Special treatment for react-map-gl's Map component\n // to support shorthand use case <DeckGL><StaticMap /></DeckGL>\n if (isReactMap(children)) {\n // Place map under the canvas\n childProps.style = MAP_STYLE;\n return cloneElement(children, childProps);\n }\n if (needsDeckGLViewProps(children)) {\n return cloneElement(children, childProps);\n }\n }\n return children;\n}\nexport function isComponent(child) {\n return (child && typeof child === 'object' && 'type' in child) || false;\n}\nfunction isReactMap(child) {\n return child.props?.mapStyle;\n}\nfunction needsDeckGLViewProps(child) {\n const componentClass = child.type;\n // @ts-expect-error deckGLViewProps is a custom hack defined on the constructor (nebula.gl)\n return componentClass && componentClass.deckGLViewProps;\n}\n", "import { createElement } from 'react';\nimport { View } from '@deck.gl/core';\nimport { inheritsFrom } from \"./inherits-from.js\";\nimport evaluateChildren, { isComponent } from \"./evaluate-children.js\";\n// Iterate over views and reposition children associated with views\n// TODO - Can we supply a similar function for the non-React case?\nexport default function positionChildrenUnderViews({ children, deck, ContextProvider }) {\n // @ts-expect-error accessing protected property\n const { viewManager } = deck || {};\n if (!viewManager || !viewManager.views.length) {\n return [];\n }\n const views = {};\n const defaultViewId = viewManager.views[0].id;\n // Sort children by view id\n for (const child of children) {\n // Unless child is a View, position / render as part of the default view\n let viewId = defaultViewId;\n let viewChildren = child;\n if (isComponent(child) && inheritsFrom(child.type, View)) {\n viewId = child.props.id || defaultViewId;\n viewChildren = child.props.children;\n }\n const viewport = viewManager.getViewport(viewId);\n const viewState = viewManager.getViewState(viewId);\n // Drop (auto-hide) elements with viewId that are not matched by any current view\n if (viewport) {\n viewState.padding = viewport.padding;\n const { x, y, width, height } = viewport;\n // Resolve potentially relative dimensions using the deck.gl container size\n viewChildren = evaluateChildren(viewChildren, {\n x,\n y,\n width,\n height,\n viewport,\n viewState\n });\n if (!views[viewId]) {\n views[viewId] = {\n viewport,\n children: []\n };\n }\n views[viewId].children.push(viewChildren);\n }\n }\n // Render views\n return Object.keys(views).map(viewId => {\n const { viewport, children: viewChildren } = views[viewId];\n const { x, y, width, height } = viewport;\n const style = {\n position: 'absolute',\n left: x,\n top: y,\n width,\n height\n };\n const key = `view-${viewId}`;\n // If children is passed as an array, React will throw the \"each element in a list needs\n // a key\" warning. Sending each child as separate arguments removes this requirement.\n const viewElement = createElement('div', { key, id: key, style }, ...viewChildren);\n if (ContextProvider) {\n const contextValue = {\n viewport,\n // @ts-expect-error accessing protected property\n container: deck.canvas.offsetParent,\n // @ts-expect-error accessing protected property\n eventManager: deck.eventManager,\n onViewStateChange: params => {\n params.viewId = viewId;\n // @ts-expect-error accessing protected method\n deck._onViewStateChange(params);\n }\n };\n return createElement(ContextProvider, { key, value: contextValue }, viewElement);\n }\n return viewElement;\n });\n}\n", "const CANVAS_ONLY_STYLES = {\n mixBlendMode: null\n};\nexport default function extractStyles({ width, height, style }) {\n // This styling is enforced for correct positioning with children\n const containerStyle = {\n position: 'absolute',\n zIndex: 0,\n left: 0,\n top: 0,\n width,\n height\n };\n // Fill the container\n const canvasStyle = {\n left: 0,\n top: 0\n };\n if (style) {\n for (const key in style) {\n if (key in CANVAS_ONLY_STYLES) {\n // apply style to the canvas, but not deck's children, e.g. mix-blend-mode\n canvasStyle[key] = style[key];\n }\n else {\n // apply style to the container, e.g. position/flow settings\n containerStyle[key] = style[key];\n }\n }\n }\n return { containerStyle, canvasStyle };\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;A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Q,SAAS,QAAQ,IAAI,MAAM,IAAI;AACxE,QAAM,EAAE,gBAAgB,YAAY,QAAI,uBAAQ,MAAM,cAAc,EAAE,OAAO,QAAQ,MAAM,CAAC,GAAG,CAAC,OAAO,QAAQ,KAAK,CAAC;AAOrH,MAAK,CAAC,QAAQ,4BAA4B,QAAQ,0BAA0B,oBACxE,QAAQ,YAAY,SACtB;AACE,YAAQ,wBAAwB;AAChC,YAAQ,UAAU;AAGlB,UAAM,qBAAqB,2BAA2B;AAAA,MAClD,UAAU,SAAS;AAAA,MACnB,MAAM,QAAQ;AAAA,MACd;AAAA,IACJ,CAAC;AACD,UAAM,aAAS,6BAAc,UAAU;AAAA,MACnC,KAAK;AAAA,MACL,IAAI,MAAM;AAAA,MACV,KAAK;AAAA,MACL,OAAO;AAAA,IACX,CAAC;AAED,YAAQ,cAAU,6BAAc,OAAO,EAAE,IAAI,GAAG,MAAM,oBAAoB,KAAK,cAAc,OAAO,eAAe,GAAG,CAAC,QAAQ,kBAAkB,CAAC;AAAA,EACtJ;AACA,aAAW;AACX,SAAO,QAAQ;AACnB;AACA,IAAM,SAAe,kBAAW,aAAa;AAC7C,IAAO,iBAAQ;",
4
+ "sourcesContent": ["// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nexport { default as DeckGL } from \"./deckgl.js\";\nexport { default } from \"./deckgl.js\";\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport * as React from 'react';\nimport { createElement, useRef, useState, useMemo, useEffect, useImperativeHandle } from 'react';\nimport { Deck } from '@deck.gl/core';\nimport useIsomorphicLayoutEffect from \"./utils/use-isomorphic-layout-effect.js\";\nimport extractJSXLayers from \"./utils/extract-jsx-layers.js\";\nimport positionChildrenUnderViews from \"./utils/position-children-under-views.js\";\nimport extractStyles from \"./utils/extract-styles.js\";\nfunction getRefHandles(thisRef) {\n return {\n get deck() {\n return thisRef.deck;\n },\n // The following method can only be called after ref is available, by which point deck is defined in useEffect\n pickObject: opts => thisRef.deck.pickObject(opts),\n pickMultipleObjects: opts => thisRef.deck.pickMultipleObjects(opts),\n pickObjects: opts => thisRef.deck.pickObjects(opts)\n };\n}\nfunction redrawDeck(thisRef) {\n if (thisRef.redrawReason) {\n // Only redraw if we have received a dirty flag\n // @ts-expect-error accessing protected method\n thisRef.deck._drawLayers(thisRef.redrawReason);\n thisRef.redrawReason = null;\n }\n}\nfunction createDeckInstance(thisRef, DeckClass, props) {\n const deck = new DeckClass({\n ...props,\n // The Deck's animation loop is independent from React's render cycle, causing potential\n // synchronization issues. We provide this custom render function to make sure that React\n // and Deck update on the same schedule.\n _customRender: redrawReason => {\n // Save the dirty flag for later\n thisRef.redrawReason = redrawReason;\n // Viewport/view state is passed to child components as props.\n // If they have changed, we need to trigger a React rerender to update children props.\n const viewports = deck.getViewports();\n if (thisRef.lastRenderedViewports !== viewports) {\n // Viewports have changed, update children props first.\n // This will delay the Deck canvas redraw till after React update (in useLayoutEffect)\n // so that the canvas does not get rendered before the child components update.\n thisRef.forceUpdate();\n }\n else {\n redrawDeck(thisRef);\n }\n }\n });\n return deck;\n}\nfunction DeckGLWithRef(props, ref) {\n // A mechanism to force redraw\n const [version, setVersion] = useState(0);\n // A reference to persistent states\n const _thisRef = useRef({\n control: null,\n version,\n forceUpdate: () => setVersion(v => v + 1)\n });\n const thisRef = _thisRef.current;\n // DOM refs\n const containerRef = useRef(null);\n const canvasRef = useRef(null);\n // extract any deck.gl layers masquerading as react elements from props.children\n const jsxProps = useMemo(() => extractJSXLayers(props), [props.layers, props.views, props.children]);\n // Callbacks\n let inRender = true;\n const handleViewStateChange = params => {\n if (inRender && props.viewState) {\n // Callback may invoke a state update. Defer callback to after render() to avoid React error\n // In React StrictMode, render is executed twice and useEffect/useLayoutEffect is executed once\n // Store deferred parameters in ref so that we can access it in another render\n thisRef.viewStateUpdateRequested = params;\n return null;\n }\n thisRef.viewStateUpdateRequested = null;\n return props.onViewStateChange?.(params);\n };\n const handleInteractionStateChange = params => {\n if (inRender) {\n // Callback may invoke a state update. Defer callback to after render() to avoid React error\n // In React StrictMode, render is executed twice and useEffect/useLayoutEffect is executed once\n // Store deferred parameters in ref so that we can access it in another render\n thisRef.interactionStateUpdateRequested = params;\n }\n else {\n thisRef.interactionStateUpdateRequested = null;\n props.onInteractionStateChange?.(params);\n }\n };\n // Update Deck's props. If Deck needs redraw, this will trigger a call to `_customRender` in\n // the next animation frame.\n // Needs to be called both from initial mount, and when new props are received\n const deckProps = useMemo(() => {\n const forwardProps = {\n ...props,\n // Override user styling props. We will set the canvas style in render()\n style: null,\n width: '100%',\n height: '100%',\n parent: containerRef.current,\n canvas: canvasRef.current,\n layers: jsxProps.layers,\n views: jsxProps.views,\n onViewStateChange: handleViewStateChange,\n onInteractionStateChange: handleInteractionStateChange\n };\n // The defaultValue for _customRender is null, which would overwrite the definition\n // of _customRender. Remove to avoid frequently redeclaring the method here.\n delete forwardProps._customRender;\n if (thisRef.deck) {\n thisRef.deck.setProps(forwardProps);\n }\n return forwardProps;\n }, [props]);\n useEffect(() => {\n const DeckClass = props.Deck || Deck;\n thisRef.deck = createDeckInstance(thisRef, DeckClass, {\n ...deckProps,\n parent: containerRef.current,\n canvas: canvasRef.current\n });\n return () => thisRef.deck?.finalize();\n }, []);\n useIsomorphicLayoutEffect(() => {\n // render has just been called. The children are positioned based on the current view state.\n // Redraw Deck canvas immediately, if necessary, using the current view state, so that it\n // matches the child components.\n redrawDeck(thisRef);\n // Execute deferred callbacks\n const { viewStateUpdateRequested, interactionStateUpdateRequested } = thisRef;\n if (viewStateUpdateRequested) {\n handleViewStateChange(viewStateUpdateRequested);\n }\n if (interactionStateUpdateRequested) {\n handleInteractionStateChange(interactionStateUpdateRequested);\n }\n });\n useImperativeHandle(ref, () => getRefHandles(thisRef), []);\n const currentViewports = thisRef.deck && thisRef.deck.isInitialized ? thisRef.deck.getViewports() : undefined;\n const { ContextProvider, width = '100%', height = '100%', id, style } = props;\n const { containerStyle, canvasStyle } = useMemo(() => extractStyles({ width, height, style }), [width, height, style]);\n // Props changes may lead to 3 types of updates:\n // 1. Only the WebGL canvas - updated in Deck's render cycle (next animation frame)\n // 2. Only the DOM - updated in React's lifecycle (now)\n // 3. Both the WebGL canvas and the DOM - defer React rerender to next animation frame just\n // before Deck redraw to ensure perfect synchronization & avoid excessive redraw\n // This is because multiple changes may happen to Deck between two frames e.g. transition\n if ((!thisRef.viewStateUpdateRequested && thisRef.lastRenderedViewports === currentViewports) || // case 2\n thisRef.version !== version // case 3 just before deck redraws\n ) {\n thisRef.lastRenderedViewports = currentViewports;\n thisRef.version = version;\n // Render the background elements (typically react-map-gl instances)\n // using the view descriptors\n const childrenUnderViews = positionChildrenUnderViews({\n children: jsxProps.children,\n deck: thisRef.deck,\n ContextProvider\n });\n const canvas = createElement('canvas', {\n key: 'canvas',\n id: id || 'deckgl-overlay',\n ref: canvasRef,\n style: canvasStyle\n });\n // Render deck.gl as the last child\n thisRef.control = createElement('div', { id: `${id || 'deckgl'}-wrapper`, ref: containerRef, style: containerStyle }, [canvas, childrenUnderViews]);\n }\n inRender = false;\n return thisRef.control;\n}\nconst DeckGL = React.forwardRef(DeckGLWithRef);\nexport default DeckGL;\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n// From https://github.com/streamich/react-use/blob/master/src/useIsomorphicLayoutEffect.ts\n// useLayoutEffect but does not trigger warning in server-side rendering\nimport { useEffect, useLayoutEffect } from 'react';\nconst useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;\nexport default useIsomorphicLayoutEffect;\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport * as React from 'react';\nimport { createElement } from 'react';\nimport { inheritsFrom } from \"./inherits-from.js\";\nimport { Layer, View } from '@deck.gl/core';\nimport { isComponent } from \"./evaluate-children.js\";\n// recursively wrap render callbacks in `View`\nfunction wrapInView(node) {\n if (typeof node === 'function') {\n // React.Children does not traverse functions.\n // All render callbacks must be protected under a <View>\n // @ts-expect-error View is not a ReactJSXElement constructor. Only used as a temporary wrapper and will be removed in extractJSXLayers\n return createElement(View, {}, node);\n }\n if (Array.isArray(node)) {\n return node.map(wrapInView);\n }\n if (isComponent(node)) {\n if (node.type === React.Fragment) {\n return wrapInView(node.props.children);\n }\n if (inheritsFrom(node.type, View)) {\n return node;\n }\n }\n return node;\n}\n// extracts any deck.gl layers masquerading as react elements from props.children\nexport default function extractJSXLayers({ children, layers = [], views = null }) {\n const reactChildren = []; // extract real react elements (i.e. not deck.gl layers)\n const jsxLayers = []; // extracted layer from react children, will add to deck.gl layer array\n const jsxViews = {};\n // React.children\n React.Children.forEach(wrapInView(children), reactElement => {\n if (isComponent(reactElement)) {\n // For some reason Children.forEach doesn't filter out `null`s\n const ElementType = reactElement.type;\n if (inheritsFrom(ElementType, Layer)) {\n const layer = createLayer(ElementType, reactElement.props);\n jsxLayers.push(layer);\n }\n else {\n reactChildren.push(reactElement);\n }\n // empty id => default view\n if (inheritsFrom(ElementType, View) && ElementType !== View && reactElement.props.id) {\n // @ts-ignore Cannot instantiate an abstract class (View)\n const view = new ElementType(reactElement.props);\n jsxViews[view.id] = view;\n }\n }\n else if (reactElement) {\n reactChildren.push(reactElement);\n }\n });\n // Avoid modifying views if no JSX views were found\n if (Object.keys(jsxViews).length > 0) {\n // If a view is specified in both views prop and JSX, use the one in views\n if (Array.isArray(views)) {\n views.forEach(view => {\n jsxViews[view.id] = view;\n });\n }\n else if (views) {\n jsxViews[views.id] = views;\n }\n views = Object.values(jsxViews);\n }\n // Avoid modifying layers array if no JSX layers were found\n layers = jsxLayers.length > 0 ? [...jsxLayers, ...layers] : layers;\n return { layers, children: reactChildren, views };\n}\nfunction createLayer(LayerType, reactProps) {\n const props = {};\n // Layer.defaultProps is treated as ReactElement.defaultProps and merged into react props\n // Remove them\n const defaultProps = LayerType.defaultProps || {};\n for (const key in reactProps) {\n if (defaultProps[key] !== reactProps[key]) {\n props[key] = reactProps[key];\n }\n }\n // @ts-ignore Cannot instantiate an abstract class (Layer)\n return new LayerType(props);\n}\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n// Check if one JavaScript class inherits from another\nexport function inheritsFrom(Type, ParentType) {\n while (Type) {\n if (Type === ParentType) {\n return true;\n }\n Type = Object.getPrototypeOf(Type);\n }\n return false;\n}\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { cloneElement } from 'react';\nconst MAP_STYLE = { position: 'absolute', zIndex: -1 };\nexport default function evaluateChildren(children, childProps) {\n if (typeof children === 'function') {\n return children(childProps);\n }\n if (Array.isArray(children)) {\n return children.map(child => evaluateChildren(child, childProps));\n }\n if (isComponent(children)) {\n // Special treatment for react-map-gl's Map component\n // to support shorthand use case <DeckGL><StaticMap /></DeckGL>\n if (isReactMap(children)) {\n // Place map under the canvas\n childProps.style = MAP_STYLE;\n return cloneElement(children, childProps);\n }\n if (needsDeckGLViewProps(children)) {\n return cloneElement(children, childProps);\n }\n }\n return children;\n}\nexport function isComponent(child) {\n return (child && typeof child === 'object' && 'type' in child) || false;\n}\nfunction isReactMap(child) {\n return child.props?.mapStyle;\n}\nfunction needsDeckGLViewProps(child) {\n const componentClass = child.type;\n // @ts-expect-error deckGLViewProps is a custom hack defined on the constructor (nebula.gl)\n return componentClass && componentClass.deckGLViewProps;\n}\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { createElement } from 'react';\nimport { View } from '@deck.gl/core';\nimport { inheritsFrom } from \"./inherits-from.js\";\nimport evaluateChildren, { isComponent } from \"./evaluate-children.js\";\n// Iterate over views and reposition children associated with views\n// TODO - Can we supply a similar function for the non-React case?\nexport default function positionChildrenUnderViews({ children, deck, ContextProvider }) {\n // @ts-expect-error accessing protected property\n const { viewManager } = deck || {};\n if (!viewManager || !viewManager.views.length) {\n return [];\n }\n const views = {};\n const defaultViewId = viewManager.views[0].id;\n // Sort children by view id\n for (const child of children) {\n // Unless child is a View, position / render as part of the default view\n let viewId = defaultViewId;\n let viewChildren = child;\n if (isComponent(child) && inheritsFrom(child.type, View)) {\n viewId = child.props.id || defaultViewId;\n viewChildren = child.props.children;\n }\n const viewport = viewManager.getViewport(viewId);\n const viewState = viewManager.getViewState(viewId);\n // Drop (auto-hide) elements with viewId that are not matched by any current view\n if (viewport) {\n viewState.padding = viewport.padding;\n const { x, y, width, height } = viewport;\n // Resolve potentially relative dimensions using the deck.gl container size\n viewChildren = evaluateChildren(viewChildren, {\n x,\n y,\n width,\n height,\n viewport,\n viewState\n });\n if (!views[viewId]) {\n views[viewId] = {\n viewport,\n children: []\n };\n }\n views[viewId].children.push(viewChildren);\n }\n }\n // Render views\n return Object.keys(views).map(viewId => {\n const { viewport, children: viewChildren } = views[viewId];\n const { x, y, width, height } = viewport;\n const style = {\n position: 'absolute',\n left: x,\n top: y,\n width,\n height\n };\n const key = `view-${viewId}`;\n // If children is passed as an array, React will throw the \"each element in a list needs\n // a key\" warning. Sending each child as separate arguments removes this requirement.\n const viewElement = createElement('div', { key, id: key, style }, ...viewChildren);\n if (ContextProvider) {\n const contextValue = {\n viewport,\n // @ts-expect-error accessing protected property\n container: deck.canvas.offsetParent,\n // @ts-expect-error accessing protected property\n eventManager: deck.eventManager,\n onViewStateChange: params => {\n params.viewId = viewId;\n // @ts-expect-error accessing protected method\n deck._onViewStateChange(params);\n }\n };\n return createElement(ContextProvider, { key, value: contextValue }, viewElement);\n }\n return viewElement;\n });\n}\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nconst CANVAS_ONLY_STYLES = {\n mixBlendMode: null\n};\nexport default function extractStyles({ width, height, style }) {\n // This styling is enforced for correct positioning with children\n const containerStyle = {\n position: 'absolute',\n zIndex: 0,\n left: 0,\n top: 0,\n width,\n height\n };\n // Fill the container\n const canvasStyle = {\n left: 0,\n top: 0\n };\n if (style) {\n for (const key in style) {\n if (key in CANVAS_ONLY_STYLES) {\n // apply style to the canvas, but not deck's children, e.g. mix-blend-mode\n canvasStyle[key] = style[key];\n }\n else {\n // apply style to the container, e.g. position/flow settings\n containerStyle[key] = style[key];\n }\n }\n }\n return { containerStyle, canvasStyle };\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACGA,IAAAA,SAAuB;AACvB,IAAAC,gBAAyF;AACzF,IAAAC,eAAqB;;;ACArB,mBAA2C;AAC3C,IAAM,4BAA4B,OAAO,WAAW,cAAc,+BAAkB;AACpF,IAAO,uCAAQ;;;ACJf,YAAuB;AACvB,IAAAC,gBAA8B;;;ACAvB,SAAS,aAAa,MAAM,YAAY;AAC3C,SAAO,MAAM;AACT,QAAI,SAAS,YAAY;AACrB,aAAO;AAAA,IACX;AACA,WAAO,OAAO,eAAe,IAAI;AAAA,EACrC;AACA,SAAO;AACX;;;ADNA,kBAA4B;;;AEH5B,IAAAC,gBAA6B;AAC7B,IAAM,YAAY,EAAE,UAAU,YAAY,QAAQ,GAAG;AACtC,SAAR,iBAAkC,UAAU,YAAY;AAC3D,MAAI,OAAO,aAAa,YAAY;AAChC,WAAO,SAAS,UAAU;AAAA,EAC9B;AACA,MAAI,MAAM,QAAQ,QAAQ,GAAG;AACzB,WAAO,SAAS,IAAI,WAAS,iBAAiB,OAAO,UAAU,CAAC;AAAA,EACpE;AACA,MAAI,YAAY,QAAQ,GAAG;AAGvB,QAAI,WAAW,QAAQ,GAAG;AAEtB,iBAAW,QAAQ;AACnB,iBAAO,4BAAa,UAAU,UAAU;AAAA,IAC5C;AACA,QAAI,qBAAqB,QAAQ,GAAG;AAChC,iBAAO,4BAAa,UAAU,UAAU;AAAA,IAC5C;AAAA,EACJ;AACA,SAAO;AACX;AACO,SAAS,YAAY,OAAO;AAC/B,SAAQ,SAAS,OAAO,UAAU,YAAY,UAAU,SAAU;AACtE;AACA,SAAS,WAAW,OAAO;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A0B,MAAM;AAI5B,eAAW,OAAO;AAElB,UAAM,EAAE,0BAA0B,gCAAgC,IAAI;AACtE,QAAI,0BAA0B;AAC1B,4BAAsB,wBAAwB;AAAA,IAClD;AACA,QAAI,iCAAiC;AACjC,mCAA6B,+BAA+B;AAAA,IAChE;AAAA,EACJ,CAAC;AACD,yCAAoB,KAAK,MAAM,cAAc,OAAO,GAAG,CAAC,CAAC;AACzD,QAAM,mBAAmB,QAAQ,QAAQ,QAAQ,KAAK,gBAAgB,QAAQ,KAAK,aAAa,IAAI;AACpG,QAAM,EAAE,iBAAiB,QAAQ,QAAQ,SAAS,QAAQ,IAAI,MAAM,IAAI;AACxE,QAAM,EAAE,gBAAgB,YAAY,QAAI,uBAAQ,MAAM,cAAc,EAAE,OAAO,QAAQ,MAAM,CAAC,GAAG,CAAC,OAAO,QAAQ,KAAK,CAAC;AAOrH,MAAK,CAAC,QAAQ,4BAA4B,QAAQ,0BAA0B;AAAA,EACxE,QAAQ,YAAY,SACtB;AACE,YAAQ,wBAAwB;AAChC,YAAQ,UAAU;AAGlB,UAAM,qBAAqB,2BAA2B;AAAA,MAClD,UAAU,SAAS;AAAA,MACnB,MAAM,QAAQ;AAAA,MACd;AAAA,IACJ,CAAC;AACD,UAAM,aAAS,6BAAc,UAAU;AAAA,MACnC,KAAK;AAAA,MACL,IAAI,MAAM;AAAA,MACV,KAAK;AAAA,MACL,OAAO;AAAA,IACX,CAAC;AAED,YAAQ,cAAU,6BAAc,OAAO,EAAE,IAAI,GAAG,MAAM,oBAAoB,KAAK,cAAc,OAAO,eAAe,GAAG,CAAC,QAAQ,kBAAkB,CAAC;AAAA,EACtJ;AACA,aAAW;AACX,SAAO,QAAQ;AACnB;AACA,IAAM,SAAe,kBAAW,aAAa;AAC7C,IAAO,iBAAQ;",
6
6
  "names": ["React", "import_react", "import_core", "import_react", "import_react", "import_react", "import_core"]
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,oBAAiB;AAC3C,OAAO,EAAC,OAAO,EAAC,oBAAiB;AAGjC,YAAY,EAAC,kBAAkB,EAAC,iDAA8C;AAC9E,YAAY,EAAC,SAAS,EAAE,WAAW,EAAC,oBAAiB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,oBAAiB;AAC3C,OAAO,EAAC,OAAO,EAAC,oBAAiB;AAGjC,YAAY,EAAC,kBAAkB,EAAC,iDAA8C;AAC9E,YAAY,EAAC,SAAS,EAAE,WAAW,EAAC,oBAAiB"}
package/dist/index.js CHANGED
@@ -1,21 +1,5 @@
1
- // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
2
- //
3
- // Permission is hereby granted, free of charge, to any person obtaining a copy
4
- // of this software and associated documentation files (the "Software"), to deal
5
- // in the Software without restriction, including without limitation the rights
6
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- // copies of the Software, and to permit persons to whom the Software is
8
- // furnished to do so, subject to the following conditions:
9
- //
10
- // The above copyright notice and this permission notice shall be included in
11
- // all copies or substantial portions of the Software.
12
- //
13
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- // THE SOFTWARE.
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
20
4
  export { default as DeckGL } from "./deckgl.js";
21
5
  export { default } from "./deckgl.js";
@@ -1 +1 @@
1
- {"version":3,"file":"evaluate-children.d.ts","sourceRoot":"","sources":["../../src/utils/evaluate-children.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,QAAQ,EAAE,KAAK,CAAC,SAAS,GAAG,QAAQ,EACpC,UAAU,EAAE,GAAG,GACd,KAAK,CAAC,SAAS,CAqBjB;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,IAAI,KAAK,CAAC,YAAY,CAE/E"}
1
+ {"version":3,"file":"evaluate-children.d.ts","sourceRoot":"","sources":["../../src/utils/evaluate-children.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,QAAQ,EAAE,KAAK,CAAC,SAAS,GAAG,QAAQ,EACpC,UAAU,EAAE,GAAG,GACd,KAAK,CAAC,SAAS,CAqBjB;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,IAAI,KAAK,CAAC,YAAY,CAE/E"}
@@ -1,3 +1,6 @@
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
1
4
  import { cloneElement } from 'react';
2
5
  const MAP_STYLE = { position: 'absolute', zIndex: -1 };
3
6
  export default function evaluateChildren(children, childProps) {
@@ -1 +1 @@
1
- {"version":3,"file":"extract-jsx-layers.d.ts","sourceRoot":"","sources":["../../src/utils/extract-jsx-layers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAQ,IAAI,EAAC,MAAM,eAAe,CAAC;AAE1C,OAAO,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ACV;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,EAAE,GAAG,CAAC;IACf;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,CAAC,IAAI,EAAE,wBAAwB,KAAK,KAAK,CAAC,SAAS,CAAC;AAyBvF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,QAAQ,EACR,MAAW,EACX,KAAY,EACb,EAAE;IACD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,oBAAoB,CAAC;IAClD,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,KAAK,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;CAC9B,GAAG;IACF,QAAQ,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;IAC5B,MAAM,EAAE,UAAU,CAAC;IACnB,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;CAC7B,CA6CA"}
@@ -1,3 +1,6 @@
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
1
4
  import * as React from 'react';
2
5
  import { createElement } from 'react';
3
6
  import { inheritsFrom } from "./inherits-from.js";
@@ -1 +1 @@
1
- {"version":3,"file":"extract-styles.d.ts","sourceRoot":"","sources":["../../src/utils/extract-styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,KAAK,EACL,MAAM,EACN,KAAK,EACN,EAAE;IACD,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,GAAG,IAAI,CAAC;CAC7C,GAAG;IACF,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC;IACpC,WAAW,EAAE,KAAK,CAAC,aAAa,CAAC;CAClC,CA8BA"}
1
+ {"version":3,"file":"extract-styles.d.ts","sourceRoot":"","sources":["../../src/utils/extract-styles.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,KAAK,EACL,MAAM,EACN,KAAK,EACN,EAAE;IACD,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,GAAG,IAAI,CAAC;CAC7C,GAAG;IACF,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC;IACpC,WAAW,EAAE,KAAK,CAAC,aAAa,CAAC;CAClC,CA8BA"}
@@ -1,3 +1,6 @@
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
1
4
  const CANVAS_ONLY_STYLES = {
2
5
  mixBlendMode: null
3
6
  };
@@ -1 +1 @@
1
- {"version":3,"file":"inherits-from.d.ts","sourceRoot":"","sources":["../../src/utils/inherits-from.ts"],"names":[],"mappings":"AACA,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,GAAG,IAAI,IAAI,CAAC,CAQnE"}
1
+ {"version":3,"file":"inherits-from.d.ts","sourceRoot":"","sources":["../../src/utils/inherits-from.ts"],"names":[],"mappings":"AAKA,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,GAAG,IAAI,IAAI,CAAC,CAQnE"}
@@ -1,3 +1,6 @@
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
1
4
  // Check if one JavaScript class inherits from another
2
5
  export function inheritsFrom(Type, ParentType) {
3
6
  while (Type) {
@@ -1 +1 @@
1
- {"version":3,"file":"position-children-under-views.d.ts","sourceRoot":"","sources":["../../src/utils/position-children-under-views.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAC,WAAW,EAAC,qBAAkB;AAC3C,OAAO,KAAK,EAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAC,MAAM,eAAe,CAAC;AAC7D,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,YAAY,CAAC;AAE7C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,EAAE,WAAW,CAAC;IACvB,YAAY,EAAE,YAAY,CAAC;IAC3B,iBAAiB,EAAE,SAAS,CAAC,mBAAmB,CAAC,CAAC;CACnD,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAAC,MAAM,SAAS,WAAW,EAAE,EAC7E,QAAQ,EACR,IAAI,EACJ,eAAe,EAChB,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;IAC5B,IAAI,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACpB,eAAe,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,UAAU,CAAC,CAAC;CACjE,GAAG,KAAK,CAAC,SAAS,EAAE,CA0FpB"}
1
+ {"version":3,"file":"position-children-under-views.d.ts","sourceRoot":"","sources":["../../src/utils/position-children-under-views.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAC,WAAW,EAAC,qBAAkB;AAC3C,OAAO,KAAK,EAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAC,MAAM,eAAe,CAAC;AAC7D,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,YAAY,CAAC;AAE7C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,EAAE,WAAW,CAAC;IACvB,YAAY,EAAE,YAAY,CAAC;IAC3B,iBAAiB,EAAE,SAAS,CAAC,mBAAmB,CAAC,CAAC;CACnD,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAAC,MAAM,SAAS,WAAW,EAAE,EAC7E,QAAQ,EACR,IAAI,EACJ,eAAe,EAChB,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;IAC5B,IAAI,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACpB,eAAe,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,UAAU,CAAC,CAAC;CACjE,GAAG,KAAK,CAAC,SAAS,EAAE,CA0FpB"}
@@ -1,3 +1,6 @@
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
1
4
  import { createElement } from 'react';
2
5
  import { View } from '@deck.gl/core';
3
6
  import { inheritsFrom } from "./inherits-from.js";
@@ -1 +1 @@
1
- {"version":3,"file":"use-isomorphic-layout-effect.d.ts","sourceRoot":"","sources":["../../src/utils/use-isomorphic-layout-effect.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,eAAe,EAAC,MAAM,OAAO,CAAC;AAEjD,QAAA,MAAM,yBAAyB,wBAA8D,CAAC;AAE9F,eAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"use-isomorphic-layout-effect.d.ts","sourceRoot":"","sources":["../../src/utils/use-isomorphic-layout-effect.ts"],"names":[],"mappings":"AAMA,OAAO,EAAY,eAAe,EAAC,MAAM,OAAO,CAAC;AAEjD,QAAA,MAAM,yBAAyB,wBAA8D,CAAC;AAE9F,eAAe,yBAAyB,CAAC"}
@@ -1,3 +1,6 @@
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
1
4
  // From https://github.com/streamich/react-use/blob/master/src/useIsomorphicLayoutEffect.ts
2
5
  // useLayoutEffect but does not trigger warning in server-side rendering
3
6
  import { useEffect, useLayoutEffect } from 'react';
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "React Components for deck.gl",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
- "version": "9.0.34",
6
+ "version": "9.1.0-beta.1",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -34,7 +34,7 @@
34
34
  "sideEffects": false,
35
35
  "scripts": {},
36
36
  "peerDependencies": {
37
- "@deck.gl/core": "^9.0.0",
37
+ "@deck.gl/core": "9.0.0-alpha.0",
38
38
  "react": ">=16.3.0",
39
39
  "react-dom": ">=16.3.0"
40
40
  },
@@ -44,5 +44,5 @@
44
44
  "react": "^18.2.0",
45
45
  "react-dom": "^18.2.0"
46
46
  },
47
- "gitHead": "eb03446717e49042747ef6f7b1be581561a2249e"
47
+ "gitHead": "a86fb154cf323eacc3f56ef087f636fb9f6c30b6"
48
48
  }
package/src/deckgl.ts CHANGED
@@ -1,22 +1,7 @@
1
- // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
2
- //
3
- // Permission is hereby granted, free of charge, to any person obtaining a copy
4
- // of this software and associated documentation files (the "Software"), to deal
5
- // in the Software without restriction, including without limitation the rights
6
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- // copies of the Software, and to permit persons to whom the Software is
8
- // furnished to do so, subject to the following conditions:
9
- //
10
- // The above copyright notice and this permission notice shall be included in
11
- // all copies or substantial portions of the Software.
12
- //
13
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- // THE SOFTWARE.
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+
20
5
  import * as React from 'react';
21
6
  import {createElement, useRef, useState, useMemo, useEffect, useImperativeHandle} from 'react';
22
7
  import {Deck} from '@deck.gl/core';
package/src/index.ts CHANGED
@@ -1,22 +1,6 @@
1
- // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
2
- //
3
- // Permission is hereby granted, free of charge, to any person obtaining a copy
4
- // of this software and associated documentation files (the "Software"), to deal
5
- // in the Software without restriction, including without limitation the rights
6
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- // copies of the Software, and to permit persons to whom the Software is
8
- // furnished to do so, subject to the following conditions:
9
- //
10
- // The above copyright notice and this permission notice shall be included in
11
- // all copies or substantial portions of the Software.
12
- //
13
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- // THE SOFTWARE.
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
20
4
 
21
5
  export {default as DeckGL} from './deckgl';
22
6
  export {default} from './deckgl';
@@ -1,3 +1,7 @@
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+
1
5
  import * as React from 'react';
2
6
  import {cloneElement} from 'react';
3
7
 
@@ -1,3 +1,7 @@
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+
1
5
  import * as React from 'react';
2
6
  import {createElement} from 'react';
3
7
  import {inheritsFrom} from './inherits-from';
@@ -1,3 +1,7 @@
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+
1
5
  import * as React from 'react';
2
6
 
3
7
  const CANVAS_ONLY_STYLES = {
@@ -1,3 +1,7 @@
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+
1
5
  // Check if one JavaScript class inherits from another
2
6
  export function inheritsFrom<T>(Type: any, ParentType: T): Type is T {
3
7
  while (Type) {
@@ -1,3 +1,7 @@
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+
1
5
  import * as React from 'react';
2
6
  import {createElement} from 'react';
3
7
  import {View} from '@deck.gl/core';
@@ -1,3 +1,7 @@
1
+ // deck.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+
1
5
  // From https://github.com/streamich/react-use/blob/master/src/useIsomorphicLayoutEffect.ts
2
6
  // useLayoutEffect but does not trigger warning in server-side rendering
3
7
  import {useEffect, useLayoutEffect} from 'react';