You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Buddy b7f7a43113 chore: prep 0.1.0 for npm + JSR publish
npm name `leaflet-components` is taken by another author, so the npm package
is renamed to `leaflet-web-components`; JSR stays `@buddy/leaflet-components`.
Adds the MIT `LICENSE` file (was declared but missing).

Entry split so JSR can publish with no slow types:

- `src/index.ts` is the shared/JSR entry and no longer carries any
  `declare global`.
- `src/core/globals.ts` (new) holds the `HTMLElementTagNameMap` /
  `HTMLElementEventMap` augmentations; imported only by the new npm entry
  `src/index.npm.ts` and by `test/setup.ts`, and listed in `jsr.json`'s
  `publish.exclude` so it never enters JSR's module graph.
- `package.json` `.`/`main`/`module`/`types` now point at `dist/index.npm.*`.

Every element file switches from `class extends WithProps({...})` to a
`const PROPS` (with an explicit type) plus
`const Base: LeafletElementConstructor<TheClass, typeof PROPS> = WithProps(PROPS)`,
which is what clears JSR's `unsupported-super-class-expr` /
`missing-explicit-type` errors. Adds a `Positional<T, Obj>` alias in
`props.ts` and explicit object types on the `shared-props.ts` fragments to
keep those annotations short. Empty group tables use `Record<never, never>`.

`npx jsr publish --dry-run` now reports "Success" with zero slow-type
errors; `npm run typecheck`, `lint`, `test` (76) and `build` all pass.

CLAUDE.md, docs/ and README.md updated for the rename, the entry split, and
the `const PROPS` / `const Base` pattern.
2 weeks ago
..
01-architecture.md chore: prep 0.1.0 for npm + JSR publish 2 weeks ago
02-props-and-attributes.md chore: prep 0.1.0 for npm + JSR publish 2 weeks ago
03-component-tree.md docs: add design docs breaking down architecture and major decisions 3 weeks ago
04-events.md chore: prep 0.1.0 for npm + JSR publish 2 weeks ago
05-special-cases.md chore: prep 0.1.0 for npm + JSR publish 2 weeks ago
06-load-order.md chore: prep 0.1.0 for npm + JSR publish 2 weeks ago
07-tooling-and-build.md chore: prep 0.1.0 for npm + JSR publish 2 weeks ago
README.md refactor: split element classes from customElements.define 2 weeks ago

README.md

Design docs

These describe how leaflet-components is built and why — the load-bearing decisions, in their current form. They are not a usage guide (that's the top-level README.md) and not a working cheat-sheet (that's CLAUDE.md).

Doc Covers
01 — Architecture Element-per-Leaflet-object, the WithProps mixin, the lifecycle it owns
02 — Props & attributes The PropDef model, the codec factories, two-way attribute↔object sync
03 — Component tree & registration The leaflet-register bubbling protocol, attach modes, the other announcement events
04 — Events Re-emitting Leaflet events as leaflet:<type>, and how they're typed
05 — Per-component special cases Where a component does something the mixin can't express generically
06 — Load order Why the ./components/* import order in src/index.ts is load-bearing
07 — Tooling & build TypeScript 7, oxlint, oxfmt, Vitest, the no-bundle build, dual publish

The one-paragraph version

Each leaflet-* custom element wraps exactly one Leaflet object. A mixin (WithProps) generates the element class from a table of property descriptors: it derives observedAttributes, builds the Leaflet options object from the current attributes, calls the component's createLeafletObject(), keeps attributes and the live object in sync in both directions, and re-fires every Leaflet event on the element. Components join each other through a DOM-event registration protocol that bubbles up to <leaflet-map> at the root — no component ever reads another component's state or queries the DOM for its relatives. The build is tsc with no bundler; Leaflet is always external.