Skip to content

Commit ec194e7

Browse files
committed
fix: resolve design token source imports
1 parent 6a88681 commit ec194e7

10 files changed

Lines changed: 48 additions & 45 deletions

File tree

libs/design-tokens/src/index.ts

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
export { typography } from './lib/typography.js';
2-
export type { Typography } from './lib/typography.js';
3-
export { space } from './lib/space.js';
4-
export type { Space } from './lib/space.js';
5-
export { radius } from './lib/radius.js';
6-
export type { Radius } from './lib/radius.js';
7-
export { shadows } from './lib/shadows.js';
8-
export type { Shadows } from './lib/shadows.js';
9-
export { colors } from './lib/colors.js';
10-
export type { Colors } from './lib/colors.js';
11-
export { surfaces } from './lib/surfaces.js';
12-
export type { Surfaces } from './lib/surfaces.js';
13-
export { tokens } from './lib/tokens.js';
14-
export type { Tokens } from './lib/tokens.js';
1+
export { typography } from './lib/typography.ts';
2+
export type { Typography } from './lib/typography.ts';
3+
export { space } from './lib/space.ts';
4+
export type { Space } from './lib/space.ts';
5+
export { radius } from './lib/radius.ts';
6+
export type { Radius } from './lib/radius.ts';
7+
export { shadows } from './lib/shadows.ts';
8+
export type { Shadows } from './lib/shadows.ts';
9+
export { colors } from './lib/colors.ts';
10+
export type { Colors } from './lib/colors.ts';
11+
export { surfaces } from './lib/surfaces.ts';
12+
export type { Surfaces } from './lib/surfaces.ts';
13+
export { tokens } from './lib/tokens.ts';
14+
export type { Tokens } from './lib/tokens.ts';
1515

1616
// New theme-aware exports
17-
export { baseTokens } from './lib/base.js';
18-
export type { BaseTokens } from './lib/base.js';
19-
export { lightOverrides } from './lib/light.js';
20-
export type { LightOverrides } from './lib/light.js';
21-
export { darkOverrides } from './lib/dark.js';
22-
export type { DarkOverrides } from './lib/dark.js';
23-
export type { Theme } from './lib/theme.js';
17+
export { baseTokens } from './lib/base.ts';
18+
export type { BaseTokens } from './lib/base.ts';
19+
export { lightOverrides } from './lib/light.ts';
20+
export type { LightOverrides } from './lib/light.ts';
21+
export { darkOverrides } from './lib/dark.ts';
22+
export type { DarkOverrides } from './lib/dark.ts';
23+
export type { Theme } from './lib/theme.ts';
2424

25-
export { cssVars } from './lib/css-vars.js';
26-
export type { CssVars } from './lib/css-vars.js';
25+
export { cssVars } from './lib/css-vars.ts';
26+
export type { CssVars } from './lib/css-vars.ts';

libs/design-tokens/src/lib/base.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { typography } from './typography.js';
2-
import { space } from './space.js';
3-
import { radius } from './radius.js';
4-
import { shadows } from './shadows.js';
1+
import { typography } from './typography.ts';
2+
import { space } from './space.ts';
3+
import { radius } from './radius.ts';
4+
import { shadows } from './shadows.ts';
55

66
/**
77
* Theme-invariant tokens. Same values in light and dark.

libs/design-tokens/src/lib/colors.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
* resolved values from `lightOverrides`. Existing website consumers
99
* (which are light-only) continue to work without modification.
1010
*/
11-
import { baseTokens } from './base.js';
12-
import { lightOverrides } from './light.js';
11+
import { baseTokens } from './base.ts';
12+
import { lightOverrides } from './light.ts';
1313

1414
export const colors = Object.freeze({
1515
// Theme-invariant brand identity

libs/design-tokens/src/lib/css-vars.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { baseTokens } from './base.js';
2-
import { lightOverrides } from './light.js';
3-
import { darkOverrides } from './dark.js';
4-
import type { Theme } from './theme.js';
1+
import { baseTokens } from './base.ts';
2+
import { lightOverrides } from './light.ts';
3+
import { darkOverrides } from './dark.ts';
4+
import type { Theme } from './theme.ts';
55

66
const overridesByTheme = {
77
light: lightOverrides,

libs/design-tokens/src/lib/dark.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { baseTokens } from './base.js';
1+
import { baseTokens } from './base.ts';
22

33
/**
44
* Theme-variant tokens resolved for the dark theme.

libs/design-tokens/src/lib/light.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { baseTokens } from './base.js';
1+
import { baseTokens } from './base.ts';
22

33
/**
44
* Theme-variant tokens resolved for the light theme.

libs/design-tokens/src/lib/surfaces.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* light-theme resolved values. Existing website consumers (light-only)
88
* continue to work without modification.
99
*/
10-
import { lightOverrides } from './light.js';
10+
import { lightOverrides } from './light.ts';
1111

1212
export const surfaces = Object.freeze({
1313
canvas: lightOverrides.canvas,

libs/design-tokens/src/lib/tokens.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { baseTokens } from './base.js';
2-
import { lightOverrides } from './light.js';
3-
import { darkOverrides } from './dark.js';
4-
import { colors } from './colors.js';
5-
import { surfaces } from './surfaces.js';
1+
import { baseTokens } from './base.ts';
2+
import { lightOverrides } from './light.ts';
3+
import { darkOverrides } from './dark.ts';
4+
import { colors } from './colors.ts';
5+
import { surfaces } from './surfaces.ts';
66

77
/**
88
* Combined token shape. Consumers that need theme resolution should
@@ -23,6 +23,6 @@ export const tokens = Object.freeze({
2323

2424
export type Tokens = typeof tokens;
2525

26-
export { baseTokens } from './base.js';
27-
export { lightOverrides } from './light.js';
28-
export { darkOverrides } from './dark.js';
26+
export { baseTokens } from './base.ts';
27+
export { lightOverrides } from './light.ts';
28+
export { darkOverrides } from './dark.ts';

libs/design-tokens/tsconfig.lib.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"compilerOptions": {
44
"outDir": "../../dist/out-tsc",
55
"declaration": true,
6-
"emitDeclarationOnly": false
6+
"emitDeclarationOnly": false,
7+
"rewriteRelativeImportExtensions": true
78
},
89
"include": ["src/**/*.ts"],
910
"exclude": ["src/**/*.spec.ts"]

tsconfig.base.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
"lib": ["es2022"],
99
"module": "ES2022",
1010
"moduleResolution": "bundler",
11+
"allowImportingTsExtensions": true,
12+
"rewriteRelativeImportExtensions": true,
1113
"noEmitOnError": true,
1214
"noFallthroughCasesInSwitch": true,
1315
"noImplicitOverride": true,

0 commit comments

Comments
 (0)