---
'@ux-team/tvu-design-system': patch
---

Fix three consumer-facing packaging defects (INFRA-F114 / F105② / F117).

**1. TypeScript types are now resolvable from the main entry (INFRA-F114).**
`exports["."]` gained a `types` condition. Modern resolvers (`moduleResolution:
bundler` / `node16`) only look inside `exports`, so `import { Button } from
'@ux-team/tvu-design-system'` previously produced TS7016 even though a top-level
`types` field existed. The top-level fallback was itself broken: `dist/index.d.ts`
re-exported from `./icons/index`, a file that never shipped — the build emitted
`dist/icons/index.d.ts` and a later step then deleted the whole `dist/icons`
directory. Both halves are fixed; verified with a real consumer project under
both `bundler` and `node16` resolution (`tsc` exit 0).

⚠️ `./web-components` still has **no** `types` condition — the `dist-wc` build
emits no declarations. Declaring one would point at a nonexistent file. React/CE
consumers remain untyped; tracked as a named exemption in the new gate.

**2. `./web-components` is no longer silently tree-shaken away (INFRA-F105②).**
`sideEffects` was `["**/*.css"]`, i.e. "all JS is side-effect free" — but the
entire value of that entry point is 37 `customElements.define()` side effects.
Bundlers legitimately removed the module: zero bytes added, zero warnings, zero
elements registered. `sideEffects` now also lists `./dist-wc/**`.

⚠️ **Size impact is real and intended**: importing `@ux-team/tvu-design-system/web-components`
now adds ~3.3 MB (unminified) to your bundle, because `dist-wc` is a single
un-split bundle. Before this fix that import did nothing at all. If you only need
a few elements, prefer the Vue entry point or import individual icon assets;
per-component subpath exports are not available yet.

**3. The published tarball no longer carries internal tooling (INFRA-F117).**
`files[]` listed bare `"scripts"` and `"templates"`, shipping 107 internal scripts
into every consumer's `node_modules` — including a real work email address, 57
internal governance audit scripts, and maintainer-absolute paths that made one
template break on copy. `files[]` now whitelists only the scripts consumers are
actually documented to run (`audit-product-code`, `audit-mockup-*`,
`validate-upstream-gate`, `consumer-postinstall`, `setup-consumer`, and their
`scripts/lib/figma-env.mjs` dependency). Package contents: 1039 → 952 files,
16.8 → 15.2 MB unpacked; shipped `scripts/` 107 → 20.

Per `docs/API_STABILITY.md`, `scripts/*.mjs` are not part of the public API, so
this is not a breaking change. Every path documented in
`docs/CONSUMER_AUDIT_SETUP.md` still resolves.

**Regression gate**: new `pnpm audit:exports-types-contract` (pre-commit + `prepublishOnly`)
checks that every code export declares `types` and that each shipped `.d.ts`
resolves its own relative re-exports.
