Skip to content

Commit a3d57c1

Browse files
committed
Remove ts extensions
1 parent cdca7ab commit a3d57c1

File tree

10 files changed

+26
-27
lines changed

10 files changed

+26
-27
lines changed

packages/theme/scripts/generate-primitive-tokens/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
DEFAULT_SEED_COLORS,
1414
buildBgRamp,
1515
buildAccentRamp,
16-
} from '../../src/color-ramps/index.ts';
16+
} from '../../src/color-ramps/index';
1717

1818
const __filename = fileURLToPath( import.meta.url );
1919
const __dirname = path.dirname( __filename );

packages/theme/scripts/terrazzo-plugin-figma-ds-token-manager/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import Color from 'colorjs.io';
88
/**
99
* Internal dependencies
1010
*/
11-
import { FORMAT_JSON_ID } from './lib.ts';
11+
import { FORMAT_JSON_ID } from './lib';
1212

1313
function titleCase( str: string ) {
1414
return str[ 0 ].toUpperCase() + str.slice( 1 );

packages/theme/src/color-ramps/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ import Color from 'colorjs.io';
66
/**
77
* Internal dependencies
88
*/
9-
import { buildRamp } from './lib/index.ts';
10-
import { clampAccentScaleReferenceLightness } from './lib/utils.ts';
11-
import { BG_RAMP_CONFIG, ACCENT_RAMP_CONFIG } from './lib/ramp-configs.ts';
9+
import { buildRamp } from './lib/index';
10+
import { clampAccentScaleReferenceLightness } from './lib/utils';
11+
import { BG_RAMP_CONFIG, ACCENT_RAMP_CONFIG } from './lib/ramp-configs';
1212
import type {
1313
RampResult as InternalRampResult,
1414
RampDirection,
1515
Ramp,
16-
} from './lib/types.ts';
17-
import { getCachedContrast } from './lib/cache-utils.ts';
18-
import { CONTRAST_COMBINATIONS } from './lib/constants.ts';
19-
export { DEFAULT_SEED_COLORS } from './lib/constants.ts';
16+
} from './lib/types';
17+
import { getCachedContrast } from './lib/cache-utils';
18+
import { CONTRAST_COMBINATIONS } from './lib/constants';
19+
export { DEFAULT_SEED_COLORS } from './lib/constants';
2020

2121
/**
2222
* Creates a background ramp.

packages/theme/src/color-ramps/lib/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Color from 'colorjs.io';
66
/**
77
* Internal dependencies
88
*/
9-
import type { Ramp } from './types.ts';
9+
import type { Ramp } from './types';
1010

1111
export const WHITE = new Color( '#fff' ).to( 'oklch' );
1212
export const BLACK = new Color( '#000' ).to( 'oklch' );

packages/theme/src/color-ramps/lib/find-color-with-constraints.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ import Color from 'colorjs.io';
66
/**
77
* Internal dependencies
88
*/
9-
import { clampToGamut } from './utils.ts';
9+
import { clampToGamut } from './utils';
1010
import {
1111
WHITE,
1212
BLACK,
1313
LIGHTNESS_EPSILON,
1414
MAX_BISECTION_ITERATIONS,
15-
} from './constants.ts';
16-
import { getCachedContrast } from './cache-utils.ts';
17-
import { type TaperChromaOptions, taperChroma } from './taper-chroma.ts';
15+
} from './constants';
16+
import { getCachedContrast } from './cache-utils';
17+
import { type TaperChromaOptions, taperChroma } from './taper-chroma';
1818

1919
/**
2020
* Solve for L such that:

packages/theme/src/color-ramps/lib/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import Color from 'colorjs.io';
66
/**
77
* Internal dependencies
88
*/
9-
import { getCachedContrast, getColorString } from './cache-utils.ts';
10-
import { findColorMeetingRequirements } from './find-color-with-constraints.ts';
9+
import { getCachedContrast, getColorString } from './cache-utils';
10+
import { findColorMeetingRequirements } from './find-color-with-constraints';
1111
import {
1212
clampToGamut,
1313
sortByDependency,
1414
computeBetterFgColorDirection,
1515
adjustContrastTarget,
16-
} from './utils.ts';
16+
} from './utils';
1717

1818
import type {
1919
FollowDirection,
@@ -22,7 +22,7 @@ import type {
2222
RampConfig,
2323
RampResult,
2424
} from './types';
25-
import { LIGHTNESS_EPSILON, MAX_BISECTION_ITERATIONS } from './constants.ts';
25+
import { LIGHTNESS_EPSILON, MAX_BISECTION_ITERATIONS } from './constants';
2626

2727
/**
2828
* Calculate a complete color ramp based on the provided configuration.

packages/theme/src/color-ramps/lib/ramp-configs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**
22
* Internal dependencies
33
*/
4-
import type { RampStepConfig, RampConfig, RampDirection } from './types.ts';
5-
import type { TaperChromaOptions } from './taper-chroma.ts';
4+
import type { RampStepConfig, RampConfig, RampDirection } from './types';
5+
import type { TaperChromaOptions } from './taper-chroma';
66

77
const lightnessConstraintForegroundHighContrast = (
88
direction: RampDirection

packages/theme/src/color-ramps/lib/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import {
1212
UNIVERSAL_CONTRAST_TOPUP,
1313
WHITE_TEXT_CONTRAST_MARGIN,
1414
ACCENT_SCALE_BASE_LIGHTNESS_THRESHOLDS,
15-
} from './constants.ts';
16-
import type { Ramp, RampStepConfig, RampDirection } from './types.ts';
17-
import { getCachedContrast } from './cache-utils.ts';
15+
} from './constants';
16+
import type { Ramp, RampStepConfig, RampDirection } from './types';
17+
import { getCachedContrast } from './cache-utils';
1818

1919
/**
2020
* Make sure that a color is valid in the p3 gamut, and converts it to oklch.

packages/theme/terrazzo.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import { makeCSSVar } from '@terrazzo/token-tools/css';
77
/**
88
* Internal dependencies
99
*/
10-
import pluginFigmaDsTokenManager from './scripts/terrazzo-plugin-figma-ds-token-manager/index.ts';
11-
import pluginKnownWpdsCssVariables from './scripts/terrazzo-plugin-known-wpds-css-variables/index.ts';
12-
import pluginDsTokenDocs from './scripts/terrazzo-plugin-ds-tokens-docs/index.ts';
10+
import pluginFigmaDsTokenManager from './scripts/terrazzo-plugin-figma-ds-token-manager/index';
11+
import pluginKnownWpdsCssVariables from './scripts/terrazzo-plugin-known-wpds-css-variables/index';
12+
import pluginDsTokenDocs from './scripts/terrazzo-plugin-ds-tokens-docs/index';
1313

1414
export default defineConfig( {
1515
tokens: [

packages/theme/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"outDir": "./build",
66
"rootDir": ".",
77
"moduleResolution": "bundler",
8-
"allowImportingTsExtensions": true,
98
"types": [ "jest", "@testing-library/jest-dom" ]
109
},
1110
"references": [ { "path": "../element" } ],

0 commit comments

Comments
 (0)