3 Commits (11cae8c89f77fa79406ff858589b6eaad3d8755b)

Author SHA1 Message Date
Buddy 85f0fbe216 refactor: use .ts extension for relative imports in source
Change all import specifiers from ".js" to ".ts" in TypeScript source
files. Add allowImportingTsExtensions and rewriteRelativeImportExtensions
to tsconfig so tsc strips them to ".js" in the dist output — no build
pipeline changes needed. Update CLAUDE.md to reflect the new extension policy.
3 months ago
Buddy 3ec2d07115 feat: replace esbuild with Rollup, add CJS/UMD bundles and deep import support
Build pipeline now consists of two passes:
  1. tsc --outDir dist  — individual ESM modules for deep imports
  2. rollup -c           — bundled ESM, CJS, and UMD (minified + unminified)

Package.json changes:
  - main/dist/index.cjs (CJS for require())
  - module/dist/index.js (ESM for bundlers)
  - types/dist/index.d.ts (bundled declarations via rollup-plugin-dts)
  - unpkg/dist/index.umd.js (CDN entry)
  - exports map with ./dist/* wildcard for deep imports
  - sideEffects: true since every component calls customElements.define
  - files: [dist, README.md]

tsconfig.json: adds declarationMap: true for Go-to-Definition to source.

Dependencies: removed esbuild, added rollup, @rollup/plugin-typescript,
@rollup/plugin-terser, rollup-plugin-dts, tslib.
3 months ago
Buddy 6b448ba092 feat: Initial implementation of leaflet-components
Wraps Leaflet.js as native Web Components. Each element maps 1:1 to a
Leaflet object with reactive attribute binding and proper lifecycle cleanup.

Key design decisions:
- LeafletElement base class handles attribute→option mapping, the
  leaflet-register bubble event for parent/child wiring, and
  disconnectedCallback cleanup tracking parent bindings.
- LeafletControl base class for map controls (zoom, attribution, scale).
- leaflet-map uses a PROPS table to drive observedAttributes, getters/setters,
  attributeChangedCallback, and map event listeners from a single source of
  truth. Property types are derived via a mapped type over the table; the
  mixin-base pattern (TypedBase) makes them visible to TypeScript without an
  interface merge.
- Boolean map options that default to true use disable-* attributes.
- Leaflet and its CSS are bundled into dist/index.js via esbuild.
- JSR config included for @buddy/leaflet-components.
4 months ago