Problem
@cofoundy/ui package.json points at raw source with no compiled output:
main: ./src/index.ts
exports["."]: ./src/index.ts
types: absent
- no
build script
So any consumer that runs tsc against an import from @cofoundy/ui descends into the entire ui source tree and surfaces its internal/pre-existing type errors (collapsible / email / transports), breaking the consumer's build. Vite/runtime bundles fine, but typecheck fails.
Impact (observed)
products/forms (Vite + React, no Tailwind) importing LogoHeader → tsc -b broke. Workaround was a local type-shim (src/types/cofoundy-ui.d.ts + tsconfig paths) — runtime uses the real package, but it's friction every consumer outside the Next/Tailwind setup will re-hit.
Proposed fix
- Add a
build step (tsup/vite-lib/tsc) emitting dist/ + .d.ts.
package.json: main/module → dist/, types → dist/index.d.ts, exports["."] with import/types conditions.
- Resolve the pre-existing type errors in collapsible/email/transports as part of it.
- Keep subpath exports (
@cofoundy/ui/hero-shader, /styles) building too.
Context
Surfaced during forms Typeform redesign (T-017), 2026-05-29. Local shim is the interim; this is the upstream fix.
Problem
@cofoundy/uipackage.jsonpoints at raw source with no compiled output:main: ./src/index.tsexports["."]: ./src/index.tstypes: absentbuildscriptSo any consumer that runs
tscagainst an import from@cofoundy/uidescends into the entire ui source tree and surfaces its internal/pre-existing type errors (collapsible / email / transports), breaking the consumer's build. Vite/runtime bundles fine, but typecheck fails.Impact (observed)
products/forms(Vite + React, no Tailwind) importingLogoHeader→tsc -bbroke. Workaround was a local type-shim (src/types/cofoundy-ui.d.ts+ tsconfigpaths) — runtime uses the real package, but it's friction every consumer outside the Next/Tailwind setup will re-hit.Proposed fix
buildstep (tsup/vite-lib/tsc) emittingdist/+.d.ts.package.json:main/module→dist/,types→dist/index.d.ts,exports["."]withimport/typesconditions.@cofoundy/ui/hero-shader,/styles) building too.Context
Surfaced during forms Typeform redesign (T-017), 2026-05-29. Local shim is the interim; this is the upstream fix.