From 565b79a89c24b755ebf948e9e1f6a93d1d91a04e Mon Sep 17 00:00:00 2001 From: Buddy Date: Tue, 9 Jun 2026 09:50:42 -0700 Subject: [PATCH] chore: remove unused exports and dead css.d.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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) --- src/core/path-style.ts | 2 +- src/core/register.ts | 4 ++-- src/core/utils.ts | 6 ------ src/types/css.d.ts | 4 ---- 4 files changed, 3 insertions(+), 13 deletions(-) delete mode 100644 src/types/css.d.ts diff --git a/src/core/path-style.ts b/src/core/path-style.ts index 075a0a1..fe1f8cb 100644 --- a/src/core/path-style.ts +++ b/src/core/path-style.ts @@ -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', diff --git a/src/core/register.ts b/src/core/register.ts index b6f6e8d..b032eba 100644 --- a/src/core/register.ts +++ b/src/core/register.ts @@ -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) { +function createChildRegisterHandler(layer: Layer, children: Map) { return function (e: LeafletRegisterEvent) { const obj = e.detail.leafletObject; const el = e.detail.element; diff --git a/src/core/utils.ts b/src/core/utils.ts index 9d81fa2..3faf660 100644 --- a/src/core/utils.ts +++ b/src/core/utils.ts @@ -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. diff --git a/src/types/css.d.ts b/src/types/css.d.ts deleted file mode 100644 index 31f07ea..0000000 --- a/src/types/css.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module '*.css' { - const content: string; - export default content; -}