chore: remove unused exports and dead css.d.ts

- camelCase removed entirely (never imported anywhere)
- PATH_STYLE_ATTRS, ChildEntry, createChildRegisterHandler made private
  (used only internally within their modules)
- src/types/css.d.ts deleted (leftover from an earlier
  approach — no .css imports exist in the source)
main
Buddy 3 months ago
parent 3ec2d07115
commit 565b79a89c

@ -5,7 +5,7 @@ import { parseAttributeValue } from './utils.js';
// These are handled specially because Leaflet exposes them through
// setStyle() rather than individual setter methods, and they are shared
// across many vector components (polyline, polygon, circle, rectangle).
export const PATH_STYLE_ATTRS = new Set([
const PATH_STYLE_ATTRS = new Set([
'color',
'weight',
'opacity',

@ -17,7 +17,7 @@ declare global {
// Tracks whether a child registered as a plain layer, popup, or tooltip --
// used by the controls panel and by cleanup logic.
export type ChildEntry = {
type ChildEntry = {
type: 'layer' | 'popup' | 'tooltip';
};
@ -26,7 +26,7 @@ export type ChildEntry = {
// Popup → bindPopup, Tooltip → bindTooltip, Layer → addLayer (if the
// parent supports it). The handler stops propagation so the event
// bubbles no further (the nearest parent claims the child).
export function createChildRegisterHandler(layer: Layer, children: Map<HTMLElement, ChildEntry>) {
function createChildRegisterHandler(layer: Layer, children: Map<HTMLElement, ChildEntry>) {
return function (e: LeafletRegisterEvent) {
const obj = e.detail.leafletObject;
const el = e.detail.element;

@ -1,12 +1,6 @@
import type { PropDef, PropTypesFromTable } from '../types/props.js';
import type { LatLngBoundsExpression } from 'leaflet';
// Converts kebab-case to camelCase (e.g. "fill-color" → "fillColor").
// Used when component PROPS tables map attribute names to Leaflet option keys.
export function camelCase(str: string): string {
return str.replace(/-([a-z])/g, (g) => g[1].toUpperCase());
}
// Parses an HTML attribute string into a typed JS value:
// null → null, "true"/"false" → boolean, numeric strings → number,
// valid JSON → parsed object/array, otherwise the raw string.

@ -1,4 +0,0 @@
declare module '*.css' {
const content: string;
export default content;
}
Loading…
Cancel
Save