Skip to content

Commit b8215bd

Browse files
amir-zahediclaude
andauthored
fix(AG-17604): add missing subpath exports and types condition for tsgo compatibility (#1315)
The tree-shaking exports change in 4.53.0 (AG-18132) introduced an exports field that strict TypeScript resolvers (tsgo / @typescript/native-preview 7.0) enforce. Several symbols used by MFE consumers were not re-exported from component indexes, and the ./dist/* catch-all lacked a types condition. Component index additions: - Positioner: EAlignment (alongside EPositionerAlignment) - Radio: useRadioContext - Badge: BadgeProps type - Columns: SprinklesColumnWidth type - OverdriveProvider: ProviderProps type New public component: - HintText: re-export from private/InputBase/HintText Exports field additions: - ./themes and ./utils barrel exports - ./themes/base, ./themes/flat_red, ./themes/neutral directory exports - ./package.json self-reference - types condition on ./dist/* catch-all Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3651021 commit b8215bd

File tree

8 files changed

+48
-3
lines changed

8 files changed

+48
-3
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
"@autoguru/overdrive": patch
3+
---
4+
5+
fix(exports): add missing subpath exports and types condition for tsgo compatibility
6+
7+
- Add `EAlignment` re-export from `Positioner` index (alongside existing `EPositionerAlignment`)
8+
- Add `useRadioContext` export from `Radio` index
9+
- Add `BadgeProps` type export from `Badge` index
10+
- Add `SprinklesColumnWidth` type export from `Columns` index
11+
- Add `ProviderProps` type export from `OverdriveProvider` index
12+
- Create public `HintText` component re-export (previously only available via private path)
13+
- Add `./themes` and `./utils` barrel exports to package.json exports field
14+
- Add explicit `./themes/base`, `./themes/flat_red`, `./themes/neutral` directory exports
15+
- Add `./package.json` self-reference export for tooling compatibility
16+
- Add `types` condition to `./dist/*` catch-all for strict TypeScript resolvers (tsgo)

lib/components/Badge/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export { Badge } from './Badge';
2+
export type { BadgeProps } from './Badge';

lib/components/Columns/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export { Columns } from './Columns';
22
export { Column } from './Column';
3+
export type { SprinklesColumnWidth } from './Column.css';

lib/components/HintText/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export { HintText } from '../private/InputBase/HintText';
2+
export type { HintTextProps } from '../private/InputBase/HintText';

lib/components/OverdriveProvider/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export {
33
useRuntimeTokens,
44
useTheme,
55
} from './OverdriveProvider';
6+
export type { ProviderProps } from './OverdriveProvider';
67

78
export {
89
FallbackProvider as ThemeProvider,

lib/components/Positioner/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export { EAlignment as EPositionerAlignment } from './alignment';
1+
export { EAlignment, EAlignment as EPositionerAlignment } from './alignment';
22
export { Positioner } from './Positioner';

lib/components/Radio/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
export { Radio } from './Radio';
2-
export { RadioGroup } from './RadioGroup';
2+
export { RadioGroup, useRadioContext } from './RadioGroup';

package.json

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"types": "./dist/index.d.ts",
1111
"default": "./dist/index.js"
1212
},
13+
"./package.json": "./package.json",
1314
"./components/*": {
1415
"types": "./dist/components/*/index.d.ts",
1516
"default": "./dist/components/*/index.js"
@@ -30,15 +31,38 @@
3031
"types": "./dist/styles/*.d.ts",
3132
"default": "./dist/styles/*.js"
3233
},
34+
"./themes": {
35+
"types": "./dist/themes/index.d.ts",
36+
"default": "./dist/themes/index.js"
37+
},
38+
"./themes/base": {
39+
"types": "./dist/themes/base/index.d.ts",
40+
"default": "./dist/themes/base/index.js"
41+
},
42+
"./themes/flat_red": {
43+
"types": "./dist/themes/flat_red/index.d.ts",
44+
"default": "./dist/themes/flat_red/index.js"
45+
},
46+
"./themes/neutral": {
47+
"types": "./dist/themes/neutral/index.d.ts",
48+
"default": "./dist/themes/neutral/index.js"
49+
},
3350
"./themes/*": {
3451
"types": "./dist/themes/*.d.ts",
3552
"default": "./dist/themes/*.js"
3653
},
54+
"./utils": {
55+
"types": "./dist/utils/index.d.ts",
56+
"default": "./dist/utils/index.js"
57+
},
3758
"./utils/*": {
3859
"types": "./dist/utils/*.d.ts",
3960
"default": "./dist/utils/*.js"
4061
},
41-
"./dist/*": "./dist/*"
62+
"./dist/*": {
63+
"types": "./dist/*.d.ts",
64+
"default": "./dist/*"
65+
}
4266
},
4367
"keywords": [
4468
"component",

0 commit comments

Comments
 (0)