Commit fc3bfbc
fix(editor): ship type declarations instead of raw source
@pascal-app/editor exposed only its .tsx source via
exports["."] = "./src/index.tsx", so every TypeScript consumer
type-checked the editor's whole source tree — surfacing the internal
R3F JSX augmentation (declare module 'react/jsx-runtime' in
box-select-tool.tsx), which conflicts with React 19 DOM element types
and pollutes the global JSX.IntrinsicElements union downstream.
Emit declaration-only output to dist/ (tsc -p tsconfig.build.json) and
point the `types` export condition at dist/index.d.ts; runtime stays on
src for embedders' bundlers. Consumers now resolve the public type
surface — the augmentation lives only in box-select-tool's declaration,
which nothing in the public type graph imports, so it stops leaking.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 92144b4 commit fc3bfbc
3 files changed
Lines changed: 53 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
9 | 17 | | |
| 18 | + | |
10 | 19 | | |
| 20 | + | |
| 21 | + | |
11 | 22 | | |
12 | 23 | | |
13 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
0 commit comments