feat: export core primitives for third-party plugin components
WithProps and its types (ElementOptions, Attach, LeafletElement, LeafletElementConstructor, LeafletAddEventListener/LeafletRemoveEventListener), the shared-props.ts fragments (pathProps, latLngProps, tileLayerProps, urlProp, style, getBounds, Positioned/Styleable/Sourced/Bounded), and all of event-types.ts are now part of the public API surface, not just internal to this package's own components. The registration protocol (instanceof Layer/Popup/Tooltip against Leaflet's own base classes) and the icon-changed protocol were already plugin-friendly by design -- a third-party layer, control, or icon component built on Leaflet's own class hierarchy integrates with what's here without any special-casing. This closes the one real gap: those same primitives weren't reachable from the package root, only via undocumented dist/core/* deep imports. A plugin author can now build a component the same way this package's own components are built.
This commit is contained in:
parent
3845e53329
commit
1d91b44372
@ -21,6 +21,13 @@
|
||||
// can go anywhere.
|
||||
export * from './core/register.ts';
|
||||
export * from './core/props.ts';
|
||||
// WithProps, the prop-fragment helpers, and the event-map fragments are the
|
||||
// same toolkit our own components are built from -- exported so a
|
||||
// third-party plugin component can be built the same way, rather than
|
||||
// reaching into dist/core/* directly (undocumented, not a stable contract).
|
||||
export * from './core/with-props.ts';
|
||||
export * from './core/shared-props.ts';
|
||||
export * from './core/event-types.ts';
|
||||
export { LeafletMap } from './components/leaflet-map.ts';
|
||||
export { LeafletControlLayers } from './components/leaflet-control-layers.ts';
|
||||
export { LeafletLayerGroup } from './components/leaflet-layer-group.ts';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user