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.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012QpbBzyzsMCzDu2nX1zVUx
63 lines
1.5 KiB
JSON
63 lines
1.5 KiB
JSON
{
|
|
"name": "leaflet-web-components",
|
|
"version": "0.1.0",
|
|
"description": "LeafletJS as Web Components",
|
|
"main": "dist/index.npm.js",
|
|
"module": "dist/index.npm.js",
|
|
"types": "dist/index.npm.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.npm.d.ts",
|
|
"import": "./dist/index.npm.js"
|
|
},
|
|
"./elements": {
|
|
"types": "./dist/elements/index.d.ts",
|
|
"import": "./dist/elements/index.js"
|
|
},
|
|
"./elements/*.js": {
|
|
"types": "./dist/elements/*.d.ts",
|
|
"import": "./dist/elements/*.js"
|
|
},
|
|
"./components/*.js": {
|
|
"types": "./dist/components/*.d.ts",
|
|
"import": "./dist/components/*.js"
|
|
},
|
|
"./dist/*": "./dist/*",
|
|
"./package.json": "./package.json"
|
|
},
|
|
"sideEffects": true,
|
|
"files": [
|
|
"dist",
|
|
"README.md",
|
|
"LICENSE"
|
|
],
|
|
"scripts": {
|
|
"build": "rm -rf dist && tsc --outDir dist",
|
|
"typecheck": "tsc --noEmit && tsc -p tsconfig.test.json",
|
|
"lint": "oxlint src test",
|
|
"format": "oxfmt '*.md' 'docs/**/*.md' 'src/**/*.{ts,js,json,md}' 'test/**/*.ts'",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"prepublishOnly": "npm run build"
|
|
},
|
|
"keywords": [
|
|
"leaflet",
|
|
"web-components",
|
|
"maps"
|
|
],
|
|
"author": "buddy",
|
|
"license": "MIT",
|
|
"type": "module",
|
|
"dependencies": {
|
|
"leaflet": "^1.9.4"
|
|
},
|
|
"devDependencies": {
|
|
"@types/leaflet": "^1.9.21",
|
|
"jsdom": "^30.0.1",
|
|
"oxfmt": "^0.66.0",
|
|
"oxlint": "^1.79.0",
|
|
"typescript": "^7.0.2",
|
|
"vitest": "^4.1.11"
|
|
}
|
|
}
|