Skip to content

Commit

Permalink
fix: Imports / exports have been normalized across the entire code base
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor-pelykh committed May 15, 2024
1 parent ae3eb03 commit 9b2b439
Show file tree
Hide file tree
Showing 189 changed files with 1,353 additions and 1,340 deletions.
14 changes: 7 additions & 7 deletions src/color/color-float16.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/** @format */

import { ArrayUtils } from '../common/array-utils';
import { Float16 } from '../common/float16';
import { Palette } from '../image/palette';
import { Channel } from './channel';
import { Color, ColorConvertOptions } from './color';
import { ColorUtils } from './color-utils';
import { Format } from './format';
import { ArrayUtils } from '../common/array-utils.js';
import { Float16 } from '../common/float16.js';
import { Palette } from '../image/palette.js';
import { Channel } from './channel.js';
import { Color, ColorConvertOptions } from './color.js';
import { ColorUtils } from './color-utils.js';
import { Format } from './format.js';

/**
* A 16-bit floating point color.
Expand Down
12 changes: 6 additions & 6 deletions src/color/color-float32.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/** @format */

import { ArrayUtils } from '../common/array-utils';
import { Palette } from '../image/palette';
import { Channel } from './channel';
import { Color, ColorConvertOptions } from './color';
import { ColorUtils } from './color-utils';
import { Format } from './format';
import { ArrayUtils } from '../common/array-utils.js';
import { Palette } from '../image/palette.js';
import { Channel } from './channel.js';
import { Color, ColorConvertOptions } from './color.js';
import { ColorUtils } from './color-utils.js';
import { Format } from './format.js';

/**
* A 32-bit floating point color.
Expand Down
12 changes: 6 additions & 6 deletions src/color/color-float64.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/** @format */

import { ArrayUtils } from '../common/array-utils';
import { Palette } from '../image/palette';
import { Channel } from './channel';
import { Color, ColorConvertOptions } from './color';
import { ColorUtils } from './color-utils';
import { Format } from './format';
import { ArrayUtils } from '../common/array-utils.js';
import { Palette } from '../image/palette.js';
import { Channel } from './channel.js';
import { Color, ColorConvertOptions } from './color.js';
import { ColorUtils } from './color-utils.js';
import { Format } from './format.js';

/**
* A 64-bit floating point color.
Expand Down
12 changes: 6 additions & 6 deletions src/color/color-int16.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/** @format */

import { ArrayUtils } from '../common/array-utils';
import { Palette } from '../image/palette';
import { Channel } from './channel';
import { Color, ColorConvertOptions } from './color';
import { ColorUtils } from './color-utils';
import { Format } from './format';
import { ArrayUtils } from '../common/array-utils.js';
import { Palette } from '../image/palette.js';
import { Channel } from './channel.js';
import { Color, ColorConvertOptions } from './color.js';
import { ColorUtils } from './color-utils.js';
import { Format } from './format.js';

/**
* A 16-bit integer color.
Expand Down
12 changes: 6 additions & 6 deletions src/color/color-int32.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/** @format */

import { ArrayUtils } from '../common/array-utils';
import { Palette } from '../image/palette';
import { Channel } from './channel';
import { Color, ColorConvertOptions } from './color';
import { ColorUtils } from './color-utils';
import { Format } from './format';
import { ArrayUtils } from '../common/array-utils.js';
import { Palette } from '../image/palette.js';
import { Channel } from './channel.js';
import { Color, ColorConvertOptions } from './color.js';
import { ColorUtils } from './color-utils.js';
import { Format } from './format.js';

/**
* A 32-bit integer color.
Expand Down
12 changes: 6 additions & 6 deletions src/color/color-int8.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/** @format */

import { ArrayUtils } from '../common/array-utils';
import { Palette } from '../image/palette';
import { Channel } from './channel';
import { Color, ColorConvertOptions } from './color';
import { ColorUtils } from './color-utils';
import { Format } from './format';
import { ArrayUtils } from '../common/array-utils.js';
import { Palette } from '../image/palette.js';
import { Channel } from './channel.js';
import { Color, ColorConvertOptions } from './color.js';
import { ColorUtils } from './color-utils.js';
import { Format } from './format.js';

/**
* A 8-bit integer color.
Expand Down
2 changes: 1 addition & 1 deletion src/color/color-rgb8.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @format */

import { ColorUint8 } from './color-uint8';
import { ColorUint8 } from './color-uint8.js';

export class ColorRgb8 extends ColorUint8 {
constructor(r: number, g: number, b: number) {
Expand Down
2 changes: 1 addition & 1 deletion src/color/color-rgba8.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @format */

import { ColorUint8 } from './color-uint8';
import { ColorUint8 } from './color-uint8.js';

export class ColorRgba8 extends ColorUint8 {
constructor(r: number, g: number, b: number, a: number) {
Expand Down
12 changes: 6 additions & 6 deletions src/color/color-uint1.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/** @format */

import { ArrayUtils } from '../common/array-utils';
import { Palette } from '../image/palette';
import { Channel } from './channel';
import { Color, ColorConvertOptions } from './color';
import { ColorUtils } from './color-utils';
import { Format } from './format';
import { ArrayUtils } from '../common/array-utils.js';
import { Palette } from '../image/palette.js';
import { Channel } from './channel.js';
import { Color, ColorConvertOptions } from './color.js';
import { ColorUtils } from './color-utils.js';
import { Format } from './format.js';

/**
* A 1-bit unsigned int color with channel values in the range [0, 1].
Expand Down
12 changes: 6 additions & 6 deletions src/color/color-uint16.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/** @format */

import { ArrayUtils } from '../common/array-utils';
import { Palette } from '../image/palette';
import { Channel } from './channel';
import { Color, ColorConvertOptions } from './color';
import { ColorUtils } from './color-utils';
import { Format } from './format';
import { ArrayUtils } from '../common/array-utils.js';
import { Palette } from '../image/palette.js';
import { Channel } from './channel.js';
import { Color, ColorConvertOptions } from './color.js';
import { ColorUtils } from './color-utils.js';
import { Format } from './format.js';

/**
* A 16-bit unsigned int color with channel values in the range [0, 65535].
Expand Down
12 changes: 6 additions & 6 deletions src/color/color-uint2.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/** @format */

import { ArrayUtils } from '../common/array-utils';
import { Palette } from '../image/palette';
import { Channel } from './channel';
import { Color, ColorConvertOptions } from './color';
import { ColorUtils } from './color-utils';
import { Format } from './format';
import { ArrayUtils } from '../common/array-utils.js';
import { Palette } from '../image/palette.js';
import { Channel } from './channel.js';
import { Color, ColorConvertOptions } from './color.js';
import { ColorUtils } from './color-utils.js';
import { Format } from './format.js';

/**
* A 2-bit unsigned int color with channel values in the range [0, 3].
Expand Down
12 changes: 6 additions & 6 deletions src/color/color-uint32.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/** @format */

import { ArrayUtils } from '../common/array-utils';
import { Palette } from '../image/palette';
import { Channel } from './channel';
import { Color, ColorConvertOptions } from './color';
import { ColorUtils } from './color-utils';
import { Format } from './format';
import { ArrayUtils } from '../common/array-utils.js';
import { Palette } from '../image/palette.js';
import { Channel } from './channel.js';
import { Color, ColorConvertOptions } from './color.js';
import { ColorUtils } from './color-utils.js';
import { Format } from './format.js';

/**
* A 32-bit unsigned int color.
Expand Down
14 changes: 7 additions & 7 deletions src/color/color-uint4.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/** @format */

import { ArrayUtils } from '../common/array-utils';
import { MathUtils } from '../common/math-utils';
import { Palette } from '../image/palette';
import { Channel } from './channel';
import { Color, ColorConvertOptions } from './color';
import { ColorUtils } from './color-utils';
import { Format } from './format';
import { ArrayUtils } from '../common/array-utils.js';
import { MathUtils } from '../common/math-utils.js';
import { Palette } from '../image/palette.js';
import { Channel } from './channel.js';
import { Color, ColorConvertOptions } from './color.js';
import { ColorUtils } from './color-utils.js';
import { Format } from './format.js';

/**
* A 4-bit unsigned int color with channel values in the range [0, 15].
Expand Down
12 changes: 6 additions & 6 deletions src/color/color-uint8.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/** @format */

import { ArrayUtils } from '../common/array-utils';
import { Palette } from '../image/palette';
import { Channel } from './channel';
import { Color, ColorConvertOptions } from './color';
import { ColorUtils } from './color-utils';
import { Format } from './format';
import { ArrayUtils } from '../common/array-utils.js';
import { Palette } from '../image/palette.js';
import { Channel } from './channel.js';
import { Color, ColorConvertOptions } from './color.js';
import { ColorUtils } from './color-utils.js';
import { Format } from './format.js';

/**
* An 8-bit unsigned int color with channel values in the range [0, 255].
Expand Down
32 changes: 16 additions & 16 deletions src/color/color-utils.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
/** @format */

import { MathUtils } from '../common/math-utils';
import { LibError } from '../error/lib-error';
import { Color } from './color';
import { ColorFloat16 } from './color-float16';
import { ColorFloat32 } from './color-float32';
import { ColorFloat64 } from './color-float64';
import { ColorInt16 } from './color-int16';
import { ColorInt32 } from './color-int32';
import { ColorInt8 } from './color-int8';
import { ColorUint1 } from './color-uint1';
import { ColorUint16 } from './color-uint16';
import { ColorUint2 } from './color-uint2';
import { ColorUint32 } from './color-uint32';
import { ColorUint4 } from './color-uint4';
import { ColorUint8 } from './color-uint8';
import { convertFormatValue, Format } from './format';
import { MathUtils } from '../common/math-utils.js';
import { LibError } from '../error/lib-error.js';
import { Color } from './color.js';
import { ColorFloat16 } from './color-float16.js';
import { ColorFloat32 } from './color-float32.js';
import { ColorFloat64 } from './color-float64.js';
import { ColorInt16 } from './color-int16.js';
import { ColorInt32 } from './color-int32.js';
import { ColorInt8 } from './color-int8.js';
import { ColorUint1 } from './color-uint1.js';
import { ColorUint16 } from './color-uint16.js';
import { ColorUint2 } from './color-uint2.js';
import { ColorUint32 } from './color-uint32.js';
import { ColorUint4 } from './color-uint4.js';
import { ColorUint8 } from './color-uint8.js';
import { convertFormatValue, Format } from './format.js';

export interface ConvertColorOptions {
from: Color;
Expand Down
6 changes: 3 additions & 3 deletions src/color/color.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** @format */

import { Palette } from '../image/palette';
import { Channel } from './channel';
import { Format } from './format';
import { Palette } from '../image/palette.js';
import { Channel } from './channel.js';
import { Format } from './format.js';

export interface ColorConvertOptions {
format?: Format;
Expand Down
4 changes: 2 additions & 2 deletions src/color/format.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @format */

import { MathUtils } from '../common/math-utils';
import { LibError } from '../error/lib-error';
import { MathUtils } from '../common/math-utils.js';
import { LibError } from '../error/lib-error.js';

/**
* The format of a color or image.
Expand Down
6 changes: 3 additions & 3 deletions src/common/array-utils.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** @format */

import { LibError } from '../error/lib-error';
import { Rational } from './rational';
import { TypedArray } from './typings';
import { LibError } from '../error/lib-error.js';
import { Rational } from './rational.js';
import { TypedArray } from './typings.js';

export abstract class ArrayUtils {
public static copyInt8(
Expand Down
2 changes: 1 addition & 1 deletion src/common/float16.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @format */

import { BitUtils } from './bit-utils';
import { BitUtils } from './bit-utils.js';

/**
* A 16-bit floating-point number, used by high-dynamic-range image formats
Expand Down
10 changes: 5 additions & 5 deletions src/common/input-buffer.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/** @format */

import { LibError } from '../error/lib-error';
import { ArrayUtils } from './array-utils';
import { BitUtils } from './bit-utils';
import { StringUtils } from './string-utils';
import { TypedArray } from './typings';
import { LibError } from '../error/lib-error.js';
import { ArrayUtils } from './array-utils.js';
import { BitUtils } from './bit-utils.js';
import { StringUtils } from './string-utils.js';
import { TypedArray } from './typings.js';

export interface InputBufferInitOptions<T extends TypedArray> {
buffer: T;
Expand Down
2 changes: 1 addition & 1 deletion src/common/line.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @format */

import { Point } from './point';
import { Point } from './point.js';

export class Line {
private _x1: number;
Expand Down
4 changes: 2 additions & 2 deletions src/common/output-buffer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @format */

import { InputBuffer } from './input-buffer';
import { ArrayUtils } from './array-utils';
import { InputBuffer } from './input-buffer.js';
import { ArrayUtils } from './array-utils.js';

export interface OutputBufferInitOptions {
bigEndian?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions src/common/rational.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @format */

import { MathUtils } from './math-utils';
import { StringUtils } from './string-utils';
import { MathUtils } from './math-utils.js';
import { StringUtils } from './string-utils.js';

export class Rational {
private _numerator: number;
Expand Down
2 changes: 1 addition & 1 deletion src/common/rectangle.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @format */

import { Point } from './point';
import { Point } from './point.js';

export class Rectangle {
private readonly _left;
Expand Down
2 changes: 1 addition & 1 deletion src/common/string-utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @format */

import { LibError } from '../error/lib-error';
import { LibError } from '../error/lib-error.js';

export abstract class StringUtils {
public static readonly utf8Decoder = new TextDecoder('utf8');
Expand Down
Loading

0 comments on commit 9b2b439

Please sign in to comment.