@planet/maps
Advanced tools
Comparing version 10.3.0 to 11.0.0-dev.1740075628963
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLAttribution from 'ol/control/Attribution.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Attribution = forwardRef((props, ref) => { | ||
return createElement('control', {cls: OLAttribution, ref, ...props}); | ||
}); | ||
export default Attribution; | ||
export default function Attribution(props) { | ||
return createElement('control', {cls: OLAttribution, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLControl from 'ol/control/Control.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Control = forwardRef((props, ref) => { | ||
return createElement('control', {cls: OLControl, ref, ...props}); | ||
}); | ||
export default Control; | ||
export default function Control(props) { | ||
return createElement('control', {cls: OLControl, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLFullScreen from 'ol/control/FullScreen.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const FullScreen = forwardRef((props, ref) => { | ||
return createElement('control', {cls: OLFullScreen, ref, ...props}); | ||
}); | ||
export default FullScreen; | ||
export default function FullScreen(props) { | ||
return createElement('control', {cls: OLFullScreen, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLMousePosition from 'ol/control/MousePosition.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const MousePosition = forwardRef((props, ref) => { | ||
return createElement('control', {cls: OLMousePosition, ref, ...props}); | ||
}); | ||
export default MousePosition; | ||
export default function MousePosition(props) { | ||
return createElement('control', {cls: OLMousePosition, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLOverviewMap from 'ol/control/OverviewMap.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const OverviewMap = forwardRef((props, ref) => { | ||
return createElement('control', {cls: OLOverviewMap, ref, ...props}); | ||
}); | ||
export default OverviewMap; | ||
export default function OverviewMap(props) { | ||
return createElement('control', {cls: OLOverviewMap, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLRotate from 'ol/control/Rotate.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Rotate = forwardRef((props, ref) => { | ||
return createElement('control', {cls: OLRotate, ref, ...props}); | ||
}); | ||
export default Rotate; | ||
export default function Rotate(props) { | ||
return createElement('control', {cls: OLRotate, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLScaleLine from 'ol/control/ScaleLine.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const ScaleLine = forwardRef((props, ref) => { | ||
return createElement('control', {cls: OLScaleLine, ref, ...props}); | ||
}); | ||
export default ScaleLine; | ||
export default function ScaleLine(props) { | ||
return createElement('control', {cls: OLScaleLine, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLZoom from 'ol/control/Zoom.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Zoom = forwardRef((props, ref) => { | ||
return createElement('control', {cls: OLZoom, ref, ...props}); | ||
}); | ||
export default Zoom; | ||
export default function Zoom(props) { | ||
return createElement('control', {cls: OLZoom, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLZoomSlider from 'ol/control/ZoomSlider.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const ZoomSlider = forwardRef((props, ref) => { | ||
return createElement('control', {cls: OLZoomSlider, ref, ...props}); | ||
}); | ||
export default ZoomSlider; | ||
export default function ZoomSlider(props) { | ||
return createElement('control', {cls: OLZoomSlider, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLZoomToExtent from 'ol/control/ZoomToExtent.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const ZoomToExtent = forwardRef((props, ref) => { | ||
return createElement('control', {cls: OLZoomToExtent, ref, ...props}); | ||
}); | ||
export default ZoomToExtent; | ||
export default function ZoomToExtent(props) { | ||
return createElement('control', {cls: OLZoomToExtent, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLDblClickDragZoom from 'ol/interaction/DblClickDragZoom.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const DblClickDragZoom = forwardRef((props, ref) => { | ||
return createElement('interaction', {cls: OLDblClickDragZoom, ref, ...props}); | ||
}); | ||
export default DblClickDragZoom; | ||
export default function DblClickDragZoom(props) { | ||
return createElement('interaction', {cls: OLDblClickDragZoom, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLDoubleClickZoom from 'ol/interaction/DoubleClickZoom.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const DoubleClickZoom = forwardRef((props, ref) => { | ||
return createElement('interaction', {cls: OLDoubleClickZoom, ref, ...props}); | ||
}); | ||
export default DoubleClickZoom; | ||
export default function DoubleClickZoom(props) { | ||
return createElement('interaction', {cls: OLDoubleClickZoom, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLDragAndDrop from 'ol/interaction/DragAndDrop.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const DragAndDrop = forwardRef((props, ref) => { | ||
return createElement('interaction', {cls: OLDragAndDrop, ref, ...props}); | ||
}); | ||
export default DragAndDrop; | ||
export default function DragAndDrop(props) { | ||
return createElement('interaction', {cls: OLDragAndDrop, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLDragBox from 'ol/interaction/DragBox.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const DragBox = forwardRef((props, ref) => { | ||
return createElement('interaction', {cls: OLDragBox, ref, ...props}); | ||
}); | ||
export default DragBox; | ||
export default function DragBox(props) { | ||
return createElement('interaction', {cls: OLDragBox, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLDragPan from 'ol/interaction/DragPan.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const DragPan = forwardRef((props, ref) => { | ||
return createElement('interaction', {cls: OLDragPan, ref, ...props}); | ||
}); | ||
export default DragPan; | ||
export default function DragPan(props) { | ||
return createElement('interaction', {cls: OLDragPan, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLDragRotate from 'ol/interaction/DragRotate.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const DragRotate = forwardRef((props, ref) => { | ||
return createElement('interaction', {cls: OLDragRotate, ref, ...props}); | ||
}); | ||
export default DragRotate; | ||
export default function DragRotate(props) { | ||
return createElement('interaction', {cls: OLDragRotate, ...props}); | ||
} |
@@ -18,12 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLDragRotateAndZoom from 'ol/interaction/DragRotateAndZoom.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const DragRotateAndZoom = forwardRef((props, ref) => { | ||
return createElement('interaction', { | ||
cls: OLDragRotateAndZoom, | ||
ref, | ||
...props, | ||
}); | ||
}); | ||
export default DragRotateAndZoom; | ||
export default function DragRotateAndZoom(props) { | ||
return createElement('interaction', {cls: OLDragRotateAndZoom, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLDragZoom from 'ol/interaction/DragZoom.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const DragZoom = forwardRef((props, ref) => { | ||
return createElement('interaction', {cls: OLDragZoom, ref, ...props}); | ||
}); | ||
export default DragZoom; | ||
export default function DragZoom(props) { | ||
return createElement('interaction', {cls: OLDragZoom, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLDraw from 'ol/interaction/Draw.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Draw = forwardRef((props, ref) => { | ||
return createElement('interaction', {cls: OLDraw, ref, ...props}); | ||
}); | ||
export default Draw; | ||
export default function Draw(props) { | ||
return createElement('interaction', {cls: OLDraw, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLExtent from 'ol/interaction/Extent.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Extent = forwardRef((props, ref) => { | ||
return createElement('interaction', {cls: OLExtent, ref, ...props}); | ||
}); | ||
export default Extent; | ||
export default function Extent(props) { | ||
return createElement('interaction', {cls: OLExtent, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLInteraction from 'ol/interaction/Interaction.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Interaction = forwardRef((props, ref) => { | ||
return createElement('interaction', {cls: OLInteraction, ref, ...props}); | ||
}); | ||
export default Interaction; | ||
export default function Interaction(props) { | ||
return createElement('interaction', {cls: OLInteraction, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLKeyboardPan from 'ol/interaction/KeyboardPan.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const KeyboardPan = forwardRef((props, ref) => { | ||
return createElement('interaction', {cls: OLKeyboardPan, ref, ...props}); | ||
}); | ||
export default KeyboardPan; | ||
export default function KeyboardPan(props) { | ||
return createElement('interaction', {cls: OLKeyboardPan, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLKeyboardZoom from 'ol/interaction/KeyboardZoom.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const KeyboardZoom = forwardRef((props, ref) => { | ||
return createElement('interaction', {cls: OLKeyboardZoom, ref, ...props}); | ||
}); | ||
export default KeyboardZoom; | ||
export default function KeyboardZoom(props) { | ||
return createElement('interaction', {cls: OLKeyboardZoom, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLLink from 'ol/interaction/Link.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Link = forwardRef((props, ref) => { | ||
return createElement('interaction', {cls: OLLink, ref, ...props}); | ||
}); | ||
export default Link; | ||
export default function Link(props) { | ||
return createElement('interaction', {cls: OLLink, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLModify from 'ol/interaction/Modify.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Modify = forwardRef((props, ref) => { | ||
return createElement('interaction', {cls: OLModify, ref, ...props}); | ||
}); | ||
export default Modify; | ||
export default function Modify(props) { | ||
return createElement('interaction', {cls: OLModify, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLMouseWheelZoom from 'ol/interaction/MouseWheelZoom.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const MouseWheelZoom = forwardRef((props, ref) => { | ||
return createElement('interaction', {cls: OLMouseWheelZoom, ref, ...props}); | ||
}); | ||
export default MouseWheelZoom; | ||
export default function MouseWheelZoom(props) { | ||
return createElement('interaction', {cls: OLMouseWheelZoom, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLPinchRotate from 'ol/interaction/PinchRotate.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const PinchRotate = forwardRef((props, ref) => { | ||
return createElement('interaction', {cls: OLPinchRotate, ref, ...props}); | ||
}); | ||
export default PinchRotate; | ||
export default function PinchRotate(props) { | ||
return createElement('interaction', {cls: OLPinchRotate, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLPinchZoom from 'ol/interaction/PinchZoom.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const PinchZoom = forwardRef((props, ref) => { | ||
return createElement('interaction', {cls: OLPinchZoom, ref, ...props}); | ||
}); | ||
export default PinchZoom; | ||
export default function PinchZoom(props) { | ||
return createElement('interaction', {cls: OLPinchZoom, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLPointer from 'ol/interaction/Pointer.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Pointer = forwardRef((props, ref) => { | ||
return createElement('interaction', {cls: OLPointer, ref, ...props}); | ||
}); | ||
export default Pointer; | ||
export default function Pointer(props) { | ||
return createElement('interaction', {cls: OLPointer, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLProperty from 'ol/interaction/Property.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Property = forwardRef((props, ref) => { | ||
return createElement('interaction', {cls: OLProperty, ref, ...props}); | ||
}); | ||
export default Property; | ||
export default function Property(props) { | ||
return createElement('interaction', {cls: OLProperty, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLSelect from 'ol/interaction/Select.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Select = forwardRef((props, ref) => { | ||
return createElement('interaction', {cls: OLSelect, ref, ...props}); | ||
}); | ||
export default Select; | ||
export default function Select(props) { | ||
return createElement('interaction', {cls: OLSelect, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLSnap from 'ol/interaction/Snap.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Snap = forwardRef((props, ref) => { | ||
return createElement('interaction', {cls: OLSnap, ref, ...props}); | ||
}); | ||
export default Snap; | ||
export default function Snap(props) { | ||
return createElement('interaction', {cls: OLSnap, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLTranslate from 'ol/interaction/Translate.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Translate = forwardRef((props, ref) => { | ||
return createElement('interaction', {cls: OLTranslate, ref, ...props}); | ||
}); | ||
export default Translate; | ||
export default function Translate(props) { | ||
return createElement('interaction', {cls: OLTranslate, ...props}); | ||
} |
/** | ||
* The constants below represent the primitive element types handled by the renderer. | ||
*/ | ||
export const MAP = 'map'; | ||
export const VIEW = 'view'; | ||
@@ -5,0 +6,0 @@ export const OVERLAY = 'overlay'; |
@@ -13,2 +13,3 @@ import BaseLayer from 'ol/layer/Base.js'; | ||
DefaultEventPriority, | ||
NoEventPriority, | ||
} from 'react-reconciler/constants.js'; | ||
@@ -45,16 +46,48 @@ import { | ||
export function updateInstanceFromProps(instance, props, oldProps = {}) { | ||
for (const key in props) { | ||
/** | ||
* @param {Array} a1 An array. | ||
* @param {Array} a2 An array. | ||
* @return {boolean} All elements in the array are the same; | ||
*/ | ||
function arrayEquals(a1, a2) { | ||
if (!a1 || !a2) { | ||
return false; | ||
} | ||
const len1 = a1.length; | ||
const len2 = a2.length; | ||
if (len1 !== len2) { | ||
return false; | ||
} | ||
for (let i = 0; i < len1; i += 1) { | ||
const v1 = a1[i]; | ||
const v2 = a2[i]; | ||
if (v1 !== v2) { | ||
return false; | ||
} | ||
} | ||
return true; | ||
} | ||
export function updateInstanceFromProps(instance, type, oldProps, newProps) { | ||
for (const key in newProps) { | ||
if (reservedProps[key]) { | ||
continue; | ||
} | ||
const newValue = newProps[key]; | ||
const oldValue = oldProps[key]; | ||
if (oldValue === newValue) { | ||
continue; | ||
} | ||
if (listenerRegex.test(key)) { | ||
const listener = props[key]; | ||
const type = key | ||
const listener = newProps[key]; | ||
const eventType = key | ||
.replace(listenerColonRegex, 'onChange:') | ||
.replace(listenerRegex, '$1') | ||
.toLowerCase(); | ||
instance.on(type, listener); | ||
if (oldProps[key]) { | ||
instance.un(type, oldProps[key]); | ||
instance.on(eventType, listener); | ||
const oldListener = oldProps[key]; | ||
if (oldListener) { | ||
instance.un(eventType, oldListener); | ||
if (instance.changed) { | ||
@@ -67,5 +100,9 @@ instance.changed(); | ||
if (key === 'center' && arrayEquals(newValue, oldValue)) { | ||
continue; | ||
} | ||
const setter = setterName(key); | ||
if (typeof instance[setter] === 'function') { | ||
instance[setter](props[key]); | ||
instance[setter](newValue); | ||
continue; | ||
@@ -77,3 +114,3 @@ } | ||
instance.clear(true); | ||
instance.addFeatures(props[key]); | ||
instance.addFeatures(newValue); | ||
continue; | ||
@@ -87,3 +124,3 @@ } | ||
instance.getInteractions().clear(); | ||
props[key].forEach(interaction => instance.addInteraction(interaction)); | ||
newValue.forEach(interaction => instance.addInteraction(interaction)); | ||
continue; | ||
@@ -93,3 +130,3 @@ } | ||
instance.getControls().clear(); | ||
props[key].forEach(control => instance.addControl(control)); | ||
newValue.forEach(control => instance.addControl(control)); | ||
continue; | ||
@@ -111,3 +148,3 @@ } | ||
const instance = new Constructor(props.options || {}); | ||
updateInstanceFromProps(instance, props); | ||
updateInstanceFromProps(instance, type, {}, props); | ||
return instance; | ||
@@ -177,4 +214,4 @@ } | ||
function commitUpdate(instance, updatePayload, type, oldProps) { | ||
updateInstanceFromProps(instance, updatePayload, oldProps); | ||
function commitUpdate(instance, type, oldProps, newProps) { | ||
updateInstanceFromProps(instance, type, oldProps, newProps); | ||
} | ||
@@ -258,2 +295,5 @@ | ||
const noContext = {}; | ||
let currentUpdatePriority = NoEventPriority; | ||
const reconciler = ReactReconciler({ | ||
@@ -272,6 +312,47 @@ supportsMutation: true, | ||
removeChild, | ||
insertInContainerBefore, | ||
insertBefore, | ||
noTimeout: -1, | ||
getInstanceFromNode() { | ||
return null; | ||
}, | ||
shouldAttemptEagerTransition() { | ||
return false; | ||
}, | ||
requestPostPaintCallback() {}, | ||
maySuspendCommit() { | ||
return false; | ||
}, | ||
preloadInstance() { | ||
return true; | ||
}, | ||
startSuspendingCommit() {}, | ||
suspendInstance() {}, | ||
waitForCommitToBeReady() { | ||
return null; | ||
}, | ||
setCurrentUpdatePriority(newPriority) { | ||
currentUpdatePriority = newPriority; | ||
}, | ||
getCurrentUpdatePriority() { | ||
return currentUpdatePriority; | ||
}, | ||
resolveUpdatePriority() { | ||
if (currentUpdatePriority) { | ||
return currentUpdatePriority; | ||
} | ||
return DefaultEventPriority; | ||
}, | ||
finalizeInitialChildren() { | ||
@@ -281,3 +362,5 @@ return false; | ||
getChildHostContext() {}, | ||
getChildHostContext() { | ||
return noContext; | ||
}, | ||
@@ -288,3 +371,5 @@ getPublicInstance(instance) { | ||
getRootHostContext() {}, | ||
getRootHostContext() { | ||
return noContext; | ||
}, | ||
@@ -314,5 +399,3 @@ getCurrentEventPriority() { | ||
const logRecoverableError = | ||
typeof reportError === 'function' | ||
? reportError // eslint-disable-line no-undef | ||
: console.error; // eslint-disable-line no-console | ||
typeof reportError === 'function' ? reportError : console.error; // eslint-disable-line no-console | ||
@@ -319,0 +402,0 @@ root = reconciler.createContainer( |
@@ -17,2 +17,3 @@ function arrayEquals(a, b) { | ||
options: true, | ||
ref: true, // TODO: deal with changing ref | ||
}; | ||
@@ -19,0 +20,0 @@ |
@@ -19,7 +19,7 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import propTypes from 'prop-types'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Base = forwardRef(({children, ...props}, ref) => { | ||
return createElement('layer', {cls: OLBase, ref, ...props}, children); | ||
}); | ||
export default function Base({children, ...props}) { | ||
return createElement('layer', {cls: OLBase, ...props}, children); | ||
} | ||
@@ -29,3 +29,1 @@ Base.propTypes = { | ||
}; | ||
export default Base; |
@@ -19,7 +19,7 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import propTypes from 'prop-types'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const BaseImage = forwardRef(({children, ...props}, ref) => { | ||
return createElement('layer', {cls: OLBaseImage, ref, ...props}, children); | ||
}); | ||
export default function BaseImage({children, ...props}) { | ||
return createElement('layer', {cls: OLBaseImage, ...props}, children); | ||
} | ||
@@ -29,3 +29,1 @@ BaseImage.propTypes = { | ||
}; | ||
export default BaseImage; |
@@ -19,7 +19,7 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import propTypes from 'prop-types'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const BaseTile = forwardRef(({children, ...props}, ref) => { | ||
return createElement('layer', {cls: OLBaseTile, ref, ...props}, children); | ||
}); | ||
export default function BaseTile({children, ...props}) { | ||
return createElement('layer', {cls: OLBaseTile, ...props}, children); | ||
} | ||
@@ -29,3 +29,1 @@ BaseTile.propTypes = { | ||
}; | ||
export default BaseTile; |
@@ -19,7 +19,7 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import propTypes from 'prop-types'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const BaseVector = forwardRef(({children, ...props}, ref) => { | ||
return createElement('layer', {cls: OLBaseVector, ref, ...props}, children); | ||
}); | ||
export default function BaseVector({children, ...props}) { | ||
return createElement('layer', {cls: OLBaseVector, ...props}, children); | ||
} | ||
@@ -29,3 +29,1 @@ BaseVector.propTypes = { | ||
}; | ||
export default BaseVector; |
@@ -19,7 +19,7 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import propTypes from 'prop-types'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Flow = forwardRef(({children, ...props}, ref) => { | ||
return createElement('layer', {cls: OLFlow, ref, ...props}, children); | ||
}); | ||
export default function Flow({children, ...props}) { | ||
return createElement('layer', {cls: OLFlow, ...props}, children); | ||
} | ||
@@ -29,3 +29,1 @@ Flow.propTypes = { | ||
}; | ||
export default Flow; |
@@ -19,7 +19,7 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import propTypes from 'prop-types'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Graticule = forwardRef(({children, ...props}, ref) => { | ||
return createElement('layer', {cls: OLGraticule, ref, ...props}, children); | ||
}); | ||
export default function Graticule({children, ...props}) { | ||
return createElement('layer', {cls: OLGraticule, ...props}, children); | ||
} | ||
@@ -29,3 +29,1 @@ Graticule.propTypes = { | ||
}; | ||
export default Graticule; |
@@ -19,7 +19,7 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import propTypes from 'prop-types'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Group = forwardRef(({children, ...props}, ref) => { | ||
return createElement('layer', {cls: OLGroup, ref, ...props}, children); | ||
}); | ||
export default function Group({children, ...props}) { | ||
return createElement('layer', {cls: OLGroup, ...props}, children); | ||
} | ||
@@ -29,3 +29,1 @@ Group.propTypes = { | ||
}; | ||
export default Group; |
@@ -19,7 +19,7 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import propTypes from 'prop-types'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Heatmap = forwardRef(({children, ...props}, ref) => { | ||
return createElement('layer', {cls: OLHeatmap, ref, ...props}, children); | ||
}); | ||
export default function Heatmap({children, ...props}) { | ||
return createElement('layer', {cls: OLHeatmap, ...props}, children); | ||
} | ||
@@ -29,3 +29,1 @@ Heatmap.propTypes = { | ||
}; | ||
export default Heatmap; |
@@ -19,7 +19,7 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import propTypes from 'prop-types'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Image = forwardRef(({children, ...props}, ref) => { | ||
return createElement('layer', {cls: OLImage, ref, ...props}, children); | ||
}); | ||
export default function Image({children, ...props}) { | ||
return createElement('layer', {cls: OLImage, ...props}, children); | ||
} | ||
@@ -29,3 +29,1 @@ Image.propTypes = { | ||
}; | ||
export default Image; |
@@ -19,7 +19,7 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import propTypes from 'prop-types'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Layer = forwardRef(({children, ...props}, ref) => { | ||
return createElement('layer', {cls: OLLayer, ref, ...props}, children); | ||
}); | ||
export default function Layer({children, ...props}) { | ||
return createElement('layer', {cls: OLLayer, ...props}, children); | ||
} | ||
@@ -29,3 +29,1 @@ Layer.propTypes = { | ||
}; | ||
export default Layer; |
@@ -19,11 +19,7 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import {MapboxVectorLayer as OLMBVectorLayer} from 'ol-mapbox-style'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const MapboxVector = forwardRef(({children, ...props}, ref) => { | ||
return createElement( | ||
'layer', | ||
{cls: OLMBVectorLayer, ref, ...props}, | ||
children, | ||
); | ||
}); | ||
export default function MapboxVector({children, ...props}) { | ||
return createElement('layer', {cls: OLMBVectorLayer, ...props}, children); | ||
} | ||
@@ -33,3 +29,1 @@ MapboxVector.propTypes = { | ||
}; | ||
export default MapboxVector; |
@@ -19,7 +19,7 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import propTypes from 'prop-types'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Tile = forwardRef(({children, ...props}, ref) => { | ||
return createElement('layer', {cls: OLTile, ref, ...props}, children); | ||
}); | ||
export default function Tile({children, ...props}) { | ||
return createElement('layer', {cls: OLTile, ...props}, children); | ||
} | ||
@@ -29,3 +29,1 @@ Tile.propTypes = { | ||
}; | ||
export default Tile; |
@@ -19,7 +19,7 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import propTypes from 'prop-types'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Vector = forwardRef(({children, ...props}, ref) => { | ||
return createElement('layer', {cls: OLVector, ref, ...props}, children); | ||
}); | ||
export default function Vector({children, ...props}) { | ||
return createElement('layer', {cls: OLVector, ...props}, children); | ||
} | ||
@@ -29,3 +29,1 @@ Vector.propTypes = { | ||
}; | ||
export default Vector; |
@@ -19,7 +19,7 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import propTypes from 'prop-types'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const VectorImage = forwardRef(({children, ...props}, ref) => { | ||
return createElement('layer', {cls: OLVectorImage, ref, ...props}, children); | ||
}); | ||
export default function VectorImage({children, ...props}) { | ||
return createElement('layer', {cls: OLVectorImage, ...props}, children); | ||
} | ||
@@ -29,3 +29,1 @@ VectorImage.propTypes = { | ||
}; | ||
export default VectorImage; |
@@ -19,7 +19,7 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import propTypes from 'prop-types'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const VectorTile = forwardRef(({children, ...props}, ref) => { | ||
return createElement('layer', {cls: OLVectorTile, ref, ...props}, children); | ||
}); | ||
export default function VectorTile({children, ...props}) { | ||
return createElement('layer', {cls: OLVectorTile, ...props}, children); | ||
} | ||
@@ -29,3 +29,1 @@ VectorTile.propTypes = { | ||
}; | ||
export default VectorTile; |
@@ -19,7 +19,7 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import propTypes from 'prop-types'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const WebGLPoints = forwardRef(({children, ...props}, ref) => { | ||
return createElement('layer', {cls: OLWebGLPoints, ref, ...props}, children); | ||
}); | ||
export default function WebGLPoints({children, ...props}) { | ||
return createElement('layer', {cls: OLWebGLPoints, ...props}, children); | ||
} | ||
@@ -29,3 +29,1 @@ WebGLPoints.propTypes = { | ||
}; | ||
export default WebGLPoints; |
@@ -19,7 +19,7 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import propTypes from 'prop-types'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const WebGLTile = forwardRef(({children, ...props}, ref) => { | ||
return createElement('layer', {cls: OLWebGLTile, ref, ...props}, children); | ||
}); | ||
export default function WebGLTile({children, ...props}) { | ||
return createElement('layer', {cls: OLWebGLTile, ...props}, children); | ||
} | ||
@@ -29,3 +29,1 @@ WebGLTile.propTypes = { | ||
}; | ||
export default WebGLTile; |
@@ -19,7 +19,7 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import propTypes from 'prop-types'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const WebGLVector = forwardRef(({children, ...props}, ref) => { | ||
return createElement('layer', {cls: OLWebGLVector, ref, ...props}, children); | ||
}); | ||
export default function WebGLVector({children, ...props}) { | ||
return createElement('layer', {cls: OLWebGLVector, ...props}, children); | ||
} | ||
@@ -29,3 +29,1 @@ WebGLVector.propTypes = { | ||
}; | ||
export default WebGLVector; |
75
Map.js
@@ -18,3 +18,4 @@ /** | ||
import propTypes from 'prop-types'; | ||
import {Component, createElement, createRef, forwardRef} from 'react'; | ||
import {MAP} from './internal/config.js'; | ||
import {createElement, useCallback, useEffect, useRef} from 'react'; | ||
import {render, updateInstanceFromProps} from './internal/render.js'; | ||
@@ -27,34 +28,47 @@ | ||
class Map extends Component { | ||
constructor(props) { | ||
super(props); | ||
export default function Map({ | ||
id, | ||
style = defaultDivStyle, | ||
className, | ||
children, | ||
ref, | ||
options, | ||
...mapProps | ||
}) { | ||
const targetRef = useRef(); | ||
const mapRef = useRef(); | ||
this.targetRef = createRef(); | ||
const getMap = useCallback(() => { | ||
// avoid creating new map when options object is different | ||
if (mapRef.current) { | ||
return mapRef.current; | ||
} | ||
const {id, style, className, innerRef, options, ...mapProps} = props; | ||
this.map = new OLMap({...options}); | ||
if (innerRef) { | ||
if (typeof innerRef === 'function') { | ||
innerRef(this.map); | ||
const map = new OLMap(options); | ||
mapRef.current = map; | ||
return map; | ||
}, [options]); | ||
useEffect(() => { | ||
const map = getMap(); | ||
map.setTarget(targetRef.current); | ||
}, [getMap]); | ||
useEffect(() => { | ||
const map = getMap(); | ||
if (ref) { | ||
if (typeof ref === 'function') { | ||
ref(map); | ||
} else { | ||
innerRef.current = this.map; | ||
ref.current = map; | ||
} | ||
} | ||
updateInstanceFromProps(this.map, mapProps); | ||
} | ||
if (!mapRef.current) { | ||
return; | ||
} | ||
updateInstanceFromProps(map, MAP, {}, mapProps); | ||
render(children, map); | ||
}, [children, getMap, mapProps, ref]); | ||
componentDidMount() { | ||
this.map.setTarget(this.targetRef.current); | ||
render(this.props.children, this.map); | ||
} | ||
componentDidUpdate() { | ||
// TODO: apply map prop changes | ||
render(this.props.children, this.map); | ||
} | ||
render() { | ||
const {id, style = defaultDivStyle, className} = this.props; | ||
return createElement('div', {ref: this.targetRef, id, style, className}); | ||
} | ||
return createElement('div', {ref: targetRef, id, style, className}); | ||
} | ||
@@ -67,3 +81,4 @@ | ||
children: propTypes.node, | ||
innerRef: propTypes.oneOfType([ | ||
options: propTypes.object, | ||
ref: propTypes.oneOfType([ | ||
propTypes.func, | ||
@@ -73,5 +88,1 @@ propTypes.shape({current: propTypes.any}), | ||
}; | ||
export default forwardRef((props, ref) => | ||
createElement(Map, {innerRef: ref, ...props}), | ||
); |
@@ -18,8 +18,6 @@ /** | ||
import {OVERLAY} from './internal/config.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Overlay = forwardRef((props, ref) => { | ||
return createElement(OVERLAY, {cls: OLOverlay, ref, ...props}); | ||
}); | ||
export default Overlay; | ||
export default function Overlay(props) { | ||
return createElement(OVERLAY, {cls: OLOverlay, ...props}); | ||
} |
{ | ||
"name": "@planet/maps", | ||
"version": "10.3.0", | ||
"version": "11.0.0-dev.1740075628963", | ||
"description": "Declarative mapping components for React", | ||
@@ -25,3 +25,3 @@ "type": "module", | ||
"dependencies": { | ||
"react-reconciler": "^0.29.0" | ||
"react-reconciler": "^0.31.0" | ||
}, | ||
@@ -31,14 +31,14 @@ "peerDependencies": { | ||
"ol-mapbox-style": "*", | ||
"react": "*" | ||
"react": ">=19" | ||
}, | ||
"devDependencies": { | ||
"@astrojs/mdx": "^3.0.0", | ||
"@astrojs/react": "^3.0.2", | ||
"@astrojs/mdx": "^4.0.3", | ||
"@astrojs/react": "^4.0.0", | ||
"@octokit/rest": "^21.0.0", | ||
"@playwright/test": "^1.25.2", | ||
"@testing-library/react": "^16.0.0", | ||
"@types/react": "^18.0.27", | ||
"@types/react-dom": "^18.0.10", | ||
"@vitest/browser": "^2.0.3", | ||
"astro": "^4.0.3", | ||
"@types/react": "^19.0.2", | ||
"@types/react-dom": "^19.0.2", | ||
"@vitest/browser": "^3.0.3", | ||
"astro": "^5.1.1", | ||
"es-main": "^1.2.0", | ||
@@ -56,4 +56,4 @@ "eslint": "^8.57.0", | ||
"prop-types": "^15.8.1", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react": "^19.0.0", | ||
"react-dom": "^19.0.0", | ||
"remark-html": "^16.0.1", | ||
@@ -66,3 +66,3 @@ "remark-parse": "^11.0.0", | ||
"vite": "^6.0.1", | ||
"vitest": "^2.0.3", | ||
"vitest": "^3.0.3", | ||
"yargs-parser": "^21.1.1" | ||
@@ -86,2 +86,3 @@ }, | ||
"astro:content", | ||
"astro/config", | ||
"@astrojs/*", | ||
@@ -107,3 +108,4 @@ "@octokit/rest" | ||
"files": [ | ||
"*.jsx" | ||
"*.jsx", | ||
"*.js" | ||
], | ||
@@ -114,3 +116,15 @@ "extends": [ | ||
"rules": { | ||
"import/named": "off" | ||
"import/named": "off", | ||
"import/default": "off", | ||
"import/no-unresolved": [ | ||
"error", | ||
{ | ||
"ignore": [ | ||
"astro:content", | ||
"astro/config", | ||
"@astrojs/*", | ||
"@octokit/rest" | ||
] | ||
} | ||
] | ||
} | ||
@@ -117,0 +131,0 @@ }, |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLBingMaps from 'ol/source/BingMaps.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const BingMaps = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLBingMaps, ref, ...props}); | ||
}); | ||
export default BingMaps; | ||
export default function BingMaps(props) { | ||
return createElement('source', {cls: OLBingMaps, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLCartoDB from 'ol/source/CartoDB.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const CartoDB = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLCartoDB, ref, ...props}); | ||
}); | ||
export default CartoDB; | ||
export default function CartoDB(props) { | ||
return createElement('source', {cls: OLCartoDB, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLCluster from 'ol/source/Cluster.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Cluster = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLCluster, ref, ...props}); | ||
}); | ||
export default Cluster; | ||
export default function Cluster(props) { | ||
return createElement('source', {cls: OLCluster, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLDataTile from 'ol/source/DataTile.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const DataTile = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLDataTile, ref, ...props}); | ||
}); | ||
export default DataTile; | ||
export default function DataTile(props) { | ||
return createElement('source', {cls: OLDataTile, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLGeoTIFF from 'ol/source/GeoTIFF.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const GeoTIFF = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLGeoTIFF, ref, ...props}); | ||
}); | ||
export default GeoTIFF; | ||
export default function GeoTIFF(props) { | ||
return createElement('source', {cls: OLGeoTIFF, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLGoogle from 'ol/source/Google.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Google = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLGoogle, ref, ...props}); | ||
}); | ||
export default Google; | ||
export default function Google(props) { | ||
return createElement('source', {cls: OLGoogle, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLIIIF from 'ol/source/IIIF.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const IIIF = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLIIIF, ref, ...props}); | ||
}); | ||
export default IIIF; | ||
export default function IIIF(props) { | ||
return createElement('source', {cls: OLIIIF, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLImage from 'ol/source/Image.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Image = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLImage, ref, ...props}); | ||
}); | ||
export default Image; | ||
export default function Image(props) { | ||
return createElement('source', {cls: OLImage, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLImageArcGISRest from 'ol/source/ImageArcGISRest.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const ImageArcGISRest = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLImageArcGISRest, ref, ...props}); | ||
}); | ||
export default ImageArcGISRest; | ||
export default function ImageArcGISRest(props) { | ||
return createElement('source', {cls: OLImageArcGISRest, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLImageCanvas from 'ol/source/ImageCanvas.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const ImageCanvas = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLImageCanvas, ref, ...props}); | ||
}); | ||
export default ImageCanvas; | ||
export default function ImageCanvas(props) { | ||
return createElement('source', {cls: OLImageCanvas, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLImageMapGuide from 'ol/source/ImageMapGuide.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const ImageMapGuide = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLImageMapGuide, ref, ...props}); | ||
}); | ||
export default ImageMapGuide; | ||
export default function ImageMapGuide(props) { | ||
return createElement('source', {cls: OLImageMapGuide, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLImageStatic from 'ol/source/ImageStatic.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const ImageStatic = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLImageStatic, ref, ...props}); | ||
}); | ||
export default ImageStatic; | ||
export default function ImageStatic(props) { | ||
return createElement('source', {cls: OLImageStatic, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLImageTile from 'ol/source/ImageTile.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const ImageTile = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLImageTile, ref, ...props}); | ||
}); | ||
export default ImageTile; | ||
export default function ImageTile(props) { | ||
return createElement('source', {cls: OLImageTile, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLImageWMS from 'ol/source/ImageWMS.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const ImageWMS = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLImageWMS, ref, ...props}); | ||
}); | ||
export default ImageWMS; | ||
export default function ImageWMS(props) { | ||
return createElement('source', {cls: OLImageWMS, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLOGCMapTile from 'ol/source/OGCMapTile.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const OGCMapTile = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLOGCMapTile, ref, ...props}); | ||
}); | ||
export default OGCMapTile; | ||
export default function OGCMapTile(props) { | ||
return createElement('source', {cls: OLOGCMapTile, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLOGCVectorTile from 'ol/source/OGCVectorTile.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const OGCVectorTile = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLOGCVectorTile, ref, ...props}); | ||
}); | ||
export default OGCVectorTile; | ||
export default function OGCVectorTile(props) { | ||
return createElement('source', {cls: OLOGCVectorTile, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLOSM from 'ol/source/OSM.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const OSM = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLOSM, ref, ...props}); | ||
}); | ||
export default OSM; | ||
export default function OSM(props) { | ||
return createElement('source', {cls: OLOSM, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLRaster from 'ol/source/Raster.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Raster = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLRaster, ref, ...props}); | ||
}); | ||
export default Raster; | ||
export default function Raster(props) { | ||
return createElement('source', {cls: OLRaster, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLSentinelHub from 'ol/source/SentinelHub.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const SentinelHub = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLSentinelHub, ref, ...props}); | ||
}); | ||
export default SentinelHub; | ||
export default function SentinelHub(props) { | ||
return createElement('source', {cls: OLSentinelHub, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLSource from 'ol/source/Source.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Source = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLSource, ref, ...props}); | ||
}); | ||
export default Source; | ||
export default function Source(props) { | ||
return createElement('source', {cls: OLSource, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLStadiaMaps from 'ol/source/StadiaMaps.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const StadiaMaps = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLStadiaMaps, ref, ...props}); | ||
}); | ||
export default StadiaMaps; | ||
export default function StadiaMaps(props) { | ||
return createElement('source', {cls: OLStadiaMaps, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLTile from 'ol/source/Tile.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Tile = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLTile, ref, ...props}); | ||
}); | ||
export default Tile; | ||
export default function Tile(props) { | ||
return createElement('source', {cls: OLTile, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLTileArcGISRest from 'ol/source/TileArcGISRest.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const TileArcGISRest = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLTileArcGISRest, ref, ...props}); | ||
}); | ||
export default TileArcGISRest; | ||
export default function TileArcGISRest(props) { | ||
return createElement('source', {cls: OLTileArcGISRest, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLTileDebug from 'ol/source/TileDebug.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const TileDebug = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLTileDebug, ref, ...props}); | ||
}); | ||
export default TileDebug; | ||
export default function TileDebug(props) { | ||
return createElement('source', {cls: OLTileDebug, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLTileImage from 'ol/source/TileImage.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const TileImage = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLTileImage, ref, ...props}); | ||
}); | ||
export default TileImage; | ||
export default function TileImage(props) { | ||
return createElement('source', {cls: OLTileImage, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLTileJSON from 'ol/source/TileJSON.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const TileJSON = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLTileJSON, ref, ...props}); | ||
}); | ||
export default TileJSON; | ||
export default function TileJSON(props) { | ||
return createElement('source', {cls: OLTileJSON, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLTileWMS from 'ol/source/TileWMS.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const TileWMS = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLTileWMS, ref, ...props}); | ||
}); | ||
export default TileWMS; | ||
export default function TileWMS(props) { | ||
return createElement('source', {cls: OLTileWMS, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLUrlTile from 'ol/source/UrlTile.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const UrlTile = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLUrlTile, ref, ...props}); | ||
}); | ||
export default UrlTile; | ||
export default function UrlTile(props) { | ||
return createElement('source', {cls: OLUrlTile, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLUTFGrid from 'ol/source/UTFGrid.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const UTFGrid = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLUTFGrid, ref, ...props}); | ||
}); | ||
export default UTFGrid; | ||
export default function UTFGrid(props) { | ||
return createElement('source', {cls: OLUTFGrid, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLVector from 'ol/source/Vector.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Vector = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLVector, ref, ...props}); | ||
}); | ||
export default Vector; | ||
export default function Vector(props) { | ||
return createElement('source', {cls: OLVector, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLVectorTile from 'ol/source/VectorTile.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const VectorTile = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLVectorTile, ref, ...props}); | ||
}); | ||
export default VectorTile; | ||
export default function VectorTile(props) { | ||
return createElement('source', {cls: OLVectorTile, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLWMTS from 'ol/source/WMTS.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const WMTS = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLWMTS, ref, ...props}); | ||
}); | ||
export default WMTS; | ||
export default function WMTS(props) { | ||
return createElement('source', {cls: OLWMTS, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLXYZ from 'ol/source/XYZ.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const XYZ = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLXYZ, ref, ...props}); | ||
}); | ||
export default XYZ; | ||
export default function XYZ(props) { | ||
return createElement('source', {cls: OLXYZ, ...props}); | ||
} |
@@ -18,8 +18,6 @@ // This file is generated by tools/generate.js. DO NOT EDIT. | ||
import OLZoomify from 'ol/source/Zoomify.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const Zoomify = forwardRef((props, ref) => { | ||
return createElement('source', {cls: OLZoomify, ref, ...props}); | ||
}); | ||
export default Zoomify; | ||
export default function Zoomify(props) { | ||
return createElement('source', {cls: OLZoomify, ...props}); | ||
} |
10
View.js
@@ -18,8 +18,6 @@ /** | ||
import {VIEW} from './internal/config.js'; | ||
import {createElement, forwardRef} from 'react'; | ||
import {createElement} from 'react'; | ||
const View = forwardRef((props, ref) => { | ||
return createElement(VIEW, {cls: OLView, ref, ...props}); | ||
}); | ||
export default View; | ||
export default function View(props) { | ||
return createElement(VIEW, {cls: OLView, ...props}); | ||
} |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
98225
2450
2
+ Addedreact-reconciler@0.31.0(transitive)
+ Addedscheduler@0.25.0(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedloose-envify@1.4.0(transitive)
- Removedreact@18.3.1(transitive)
- Removedreact-reconciler@0.29.2(transitive)
- Removedscheduler@0.23.2(transitive)
Updatedreact-reconciler@^0.31.0