Skip to content

Commit

Permalink
Use export default, see #398
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Mar 2, 2023
1 parent 4266288 commit 7a012e7
Show file tree
Hide file tree
Showing 58 changed files with 63 additions and 122 deletions.
5 changes: 2 additions & 3 deletions js/quadrilateral/QuadrilateralScreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import QuadrilateralOptionsModel from './model/QuadrilateralOptionsModel.js';
import optionize, { EmptySelfOptions } from '../../../phet-core/js/optionize.js';
import QuadrilateralKeyboardHelpContent from './view/QuadrilateralKeyboardHelpContent.js';

class QuadrilateralScreen extends Screen<QuadrilateralModel, QuadrilateralScreenView> {
export default class QuadrilateralScreen extends Screen<QuadrilateralModel, QuadrilateralScreenView> {
public constructor( optionsModel: QuadrilateralOptionsModel, providedOptions: ScreenOptions ) {

const options = optionize<ScreenOptions, EmptySelfOptions, ScreenOptions>()( {
Expand All @@ -30,5 +30,4 @@ class QuadrilateralScreen extends Screen<QuadrilateralModel, QuadrilateralScreen
}
}

quadrilateral.register( 'QuadrilateralScreen', QuadrilateralScreen );
export default QuadrilateralScreen;
quadrilateral.register( 'QuadrilateralScreen', QuadrilateralScreen );
3 changes: 1 addition & 2 deletions js/quadrilateral/model/NamedQuadrilateral.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Enumeration from '../../../../phet-core/js/Enumeration.js';
import EnumerationValue from '../../../../phet-core/js/EnumerationValue.js';
import quadrilateral from '../../quadrilateral.js';

class NamedQuadrilateral extends EnumerationValue {
export default class NamedQuadrilateral extends EnumerationValue {
public static readonly SQUARE = new NamedQuadrilateral();
public static readonly RECTANGLE = new NamedQuadrilateral();
public static readonly RHOMBUS = new NamedQuadrilateral();
Expand All @@ -30,4 +30,3 @@ class NamedQuadrilateral extends EnumerationValue {
}

quadrilateral.register( 'NamedQuadrilateral', NamedQuadrilateral );
export default NamedQuadrilateral;
3 changes: 1 addition & 2 deletions js/quadrilateral/model/ParallelSideChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import SidePair from './SidePair.js';
import QuadrilateralSide from './QuadrilateralSide.js';
import QuadrilateralShapeModel from './QuadrilateralShapeModel.js';

class ParallelSideChecker {
export default class ParallelSideChecker {

// The tolerance interval used to compare angles in the calculation that determines if two opposite sides are
// parallel. Without a bit of tolerance it would be extremely difficult to create parallel sides. This value
Expand Down Expand Up @@ -97,4 +97,3 @@ class ParallelSideChecker {
}

quadrilateral.register( 'ParallelSideChecker', ParallelSideChecker );
export default ParallelSideChecker;
3 changes: 1 addition & 2 deletions js/quadrilateral/model/QuadrilateralModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import TangibleConnectionModel from './prototype/TangibleConnectionModel.js';
import QuadrilateralVisibilityModel from './QuadrilateralVisibilityModel.js';
import TModel from '../../../../joist/js/TModel.js';

class QuadrilateralModel implements TModel {
export default class QuadrilateralModel implements TModel {

// Manages visibility of view components
public readonly visibilityModel: QuadrilateralVisibilityModel;
Expand Down Expand Up @@ -253,4 +253,3 @@ class QuadrilateralModel implements TModel {
}

quadrilateral.register( 'QuadrilateralModel', QuadrilateralModel );
export default QuadrilateralModel;
3 changes: 1 addition & 2 deletions js/quadrilateral/model/QuadrilateralMovable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Property from '../../../../axon/js/Property.js';
import Tandem from '../../../../tandem/js/Tandem.js';
import quadrilateral from '../../quadrilateral.js';

class QuadrilateralMovable {
export default class QuadrilateralMovable {

// Indicates that this component is "pressed" for user interaction.
public readonly isPressedProperty: Property<boolean>;
Expand All @@ -34,4 +34,3 @@ class QuadrilateralMovable {
}

quadrilateral.register( 'QuadrilateralMovable', QuadrilateralMovable );
export default QuadrilateralMovable;
3 changes: 1 addition & 2 deletions js/quadrilateral/model/QuadrilateralOptionsModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ import quadrilateral from '../../quadrilateral.js';
import QuadrilateralSoundOptionsModel from './QuadrilateralSoundOptionsModel.js';
import QuadrilateralTangibleOptionsModel from './QuadrilateralTangibleOptionsModel.js';

class QuadrilateralOptionsModel {
export default class QuadrilateralOptionsModel {
public readonly soundOptionsModel = new QuadrilateralSoundOptionsModel();
public readonly tangibleOptionsModel = new QuadrilateralTangibleOptionsModel();
}

quadrilateral.register( 'QuadrilateralOptionsModel', QuadrilateralOptionsModel );
export default QuadrilateralOptionsModel;
3 changes: 1 addition & 2 deletions js/quadrilateral/model/QuadrilateralShapeDetector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const SQUARE_MASK = ONE_PARALLEL_PAIR |
TWO_EQUAL_OPPOSITE_SIDE_PAIR |
ALL_EQUAL_SIDE;

class QuadrilateralShapeDetector {
export default class QuadrilateralShapeDetector {
private readonly quadrilateralShapeModel: QuadrilateralShapeModel;

public constructor( quadrilateralShapeModel: QuadrilateralShapeModel ) {
Expand Down Expand Up @@ -220,4 +220,3 @@ class QuadrilateralShapeDetector {
}

quadrilateral.register( 'QuadrilateralShapeDetector', QuadrilateralShapeDetector );
export default QuadrilateralShapeDetector;
3 changes: 1 addition & 2 deletions js/quadrilateral/model/QuadrilateralShapeModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ type QuadrilateralShapeModelOptions = {
tandem: Tandem;
};

class QuadrilateralShapeModel {
export default class QuadrilateralShapeModel {

// Vertices of the quadrilateral.
public readonly vertexA: QuadrilateralVertex;
Expand Down Expand Up @@ -712,4 +712,3 @@ class QuadrilateralShapeModel {
}

quadrilateral.register( 'QuadrilateralShapeModel', QuadrilateralShapeModel );
export default QuadrilateralShapeModel;
3 changes: 1 addition & 2 deletions js/quadrilateral/model/QuadrilateralSide.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import QuadrilateralMovable from './QuadrilateralMovable.js';
import Property from '../../../../axon/js/Property.js';
import TProperty from '../../../../axon/js/TProperty.js';

class QuadrilateralSide extends QuadrilateralMovable {
export default class QuadrilateralSide extends QuadrilateralMovable {

// Reference to the vertices that compose this QuadrilateralSide.
public readonly vertex1: QuadrilateralVertex;
Expand Down Expand Up @@ -129,4 +129,3 @@ class QuadrilateralSide extends QuadrilateralMovable {
}

quadrilateral.register( 'QuadrilateralSide', QuadrilateralSide );
export default QuadrilateralSide;
3 changes: 1 addition & 2 deletions js/quadrilateral/model/QuadrilateralSoundOptionsModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class SoundDesign extends EnumerationValue {
public static readonly enumeration = new Enumeration( SoundDesign );
}

class QuadrilateralSoundOptionsModel {
export default class QuadrilateralSoundOptionsModel {

// The selected sound design
public soundDesignProperty = new EnumerationProperty( SoundDesign.enumeration.getValue( QuadrilateralQueryParameters.soundDesign! ) );
Expand All @@ -33,4 +33,3 @@ class QuadrilateralSoundOptionsModel {

quadrilateral.register( 'QuadrilateralSoundOptionsModel', QuadrilateralSoundOptionsModel );
export { SoundDesign };
export default QuadrilateralSoundOptionsModel;
3 changes: 1 addition & 2 deletions js/quadrilateral/model/QuadrilateralTangibleOptionsModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import quadrilateral from '../../quadrilateral.js';
import Range from '../../../../dot/js/Range.js';
import QuadrilateralQueryParameters from '../QuadrilateralQueryParameters.js';

class QuadrilateralTangibleOptionsModel {
export default class QuadrilateralTangibleOptionsModel {

// How many values to save and use in the average for calculating new vertex positions. Higher value will reduce
// noise but the sim will respond slower.
Expand All @@ -33,4 +33,3 @@ class QuadrilateralTangibleOptionsModel {
}

quadrilateral.register( 'QuadrilateralTangibleOptionsModel', QuadrilateralTangibleOptionsModel );
export default QuadrilateralTangibleOptionsModel;
3 changes: 1 addition & 2 deletions js/quadrilateral/model/QuadrilateralUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export type LineIntersectionPair = {
intersectionPoint: Vector2;
};

class QuadrilateralUtils {
export default class QuadrilateralUtils {

/**
* A workaround for https://github.com/phetsims/kite/issues/94. Shape.containsPoint implementation does not work
Expand Down Expand Up @@ -316,4 +316,3 @@ class QuadrilateralUtils {
}

quadrilateral.register( 'QuadrilateralUtils', QuadrilateralUtils );
export default QuadrilateralUtils;
3 changes: 1 addition & 2 deletions js/quadrilateral/model/QuadrilateralVertex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const VERTEX_BOUNDS = new Bounds2( 0, 0, 0.1, 0.1 );
const HALF_WIDTH = VERTEX_BOUNDS.width / 2;
const HALF_HEIGHT = VERTEX_BOUNDS.height / 2;

class QuadrilateralVertex extends QuadrilateralMovable {
export default class QuadrilateralVertex extends QuadrilateralMovable {

// The position of the vertex in model coordinates.
public readonly positionProperty: Property<Vector2>;
Expand Down Expand Up @@ -210,4 +210,3 @@ class QuadrilateralVertex extends QuadrilateralMovable {
}

quadrilateral.register( 'QuadrilateralVertex', QuadrilateralVertex );
export default QuadrilateralVertex;
3 changes: 1 addition & 2 deletions js/quadrilateral/model/QuadrilateralVisibilityModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Tandem from '../../../../tandem/js/Tandem.js';
import quadrilateral from '../../quadrilateral.js';
import QuadrilateralQueryParameters from '../QuadrilateralQueryParameters.js';

class QuadrilateralVisibilityModel {
export default class QuadrilateralVisibilityModel {

// Whether markers are visible in this sim - including ticks along the sides, interior, and exerior angle indicators.
public readonly markersVisibleProperty: BooleanProperty;
Expand Down Expand Up @@ -67,4 +67,3 @@ class QuadrilateralVisibilityModel {
}

quadrilateral.register( 'QuadrilateralVisibilityModel', QuadrilateralVisibilityModel );
export default QuadrilateralVisibilityModel;
3 changes: 1 addition & 2 deletions js/quadrilateral/model/ShapeSnapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import SideLabel from './SideLabel.js';
import VertexLabel from './VertexLabel.js';
import NamedQuadrilateral from './NamedQuadrilateral.js';

class ShapeSnapshot {
export default class ShapeSnapshot {
public readonly isParallelogram: boolean;
public readonly sideABsideCDParallel: boolean;
public readonly sideBCsideDAParallel: boolean;
Expand Down Expand Up @@ -173,4 +173,3 @@ class ShapeSnapshot {
}

quadrilateral.register( 'ShapeSnapshot', ShapeSnapshot );
export default ShapeSnapshot;
3 changes: 1 addition & 2 deletions js/quadrilateral/model/SideLabel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Enumeration from '../../../../phet-core/js/Enumeration.js';
import EnumerationValue from '../../../../phet-core/js/EnumerationValue.js';
import quadrilateral from '../../quadrilateral.js';

class SideLabel extends EnumerationValue {
export default class SideLabel extends EnumerationValue {
public static readonly SIDE_AB = new SideLabel();
public static readonly SIDE_BC = new SideLabel();
public static readonly SIDE_CD = new SideLabel();
Expand All @@ -20,4 +20,3 @@ class SideLabel extends EnumerationValue {
}

quadrilateral.register( 'SideLabel', SideLabel );
export default SideLabel;
3 changes: 1 addition & 2 deletions js/quadrilateral/model/SidePair.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import quadrilateral from '../../quadrilateral.js';
import QuadrilateralSide from './QuadrilateralSide.js';

class SidePair {
export default class SidePair {
public readonly side1: QuadrilateralSide;
public readonly side2: QuadrilateralSide;

Expand All @@ -36,4 +36,3 @@ class SidePair {
}

quadrilateral.register( 'SidePair', SidePair );
export default SidePair;
3 changes: 1 addition & 2 deletions js/quadrilateral/model/VertexLabel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Enumeration from '../../../../phet-core/js/Enumeration.js';
import EnumerationValue from '../../../../phet-core/js/EnumerationValue.js';
import quadrilateral from '../../quadrilateral.js';

class VertexLabel extends EnumerationValue {
export default class VertexLabel extends EnumerationValue {
public static readonly VERTEX_A = new VertexLabel();
public static readonly VERTEX_B = new VertexLabel();
public static readonly VERTEX_C = new VertexLabel();
Expand All @@ -20,4 +20,3 @@ class VertexLabel extends EnumerationValue {
}

quadrilateral.register( 'VertexLabel', VertexLabel );
export default VertexLabel;
3 changes: 1 addition & 2 deletions js/quadrilateral/model/VertexPair.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import quadrilateral from '../../quadrilateral.js';
import QuadrilateralVertex from './QuadrilateralVertex.js';

class VertexPair {
export default class VertexPair {
public readonly vertex1: QuadrilateralVertex;
public readonly vertex2: QuadrilateralVertex;

Expand All @@ -36,4 +36,3 @@ class VertexPair {
}

quadrilateral.register( 'VertexPair', VertexPair );
export default VertexPair;
3 changes: 1 addition & 2 deletions js/quadrilateral/model/prototype/MarkerDetectionModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import TReadOnlyProperty from '../../../../../axon/js/TReadOnlyProperty.js';
import Tandem from '../../../../../tandem/js/Tandem.js';
import quadrilateral from '../../../quadrilateral.js';

class MarkerDetectionModel {
export default class MarkerDetectionModel {

// A Property that indicates that all markers are observed by the camera to control this simulation. Part of
// a prototype for using OpenCV as an input method for the simulation
Expand Down Expand Up @@ -58,4 +58,3 @@ class MarkerDetectionModel {
}

quadrilateral.register( 'MarkerDetectionModel', MarkerDetectionModel );
export default MarkerDetectionModel;
3 changes: 1 addition & 2 deletions js/quadrilateral/model/prototype/TangibleConnectionModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import QuadrilateralShapeModel, { VertexWithProposedPosition } from '../Quadrila
import QuadrilateralTangibleOptionsModel from '../QuadrilateralTangibleOptionsModel.js';
import MarkerDetectionModel from './MarkerDetectionModel.js';

class TangibleConnectionModel {
export default class TangibleConnectionModel {

// True when we are connected to a device in some way, either bluetooth, serial, or OpenCV.
// REVIEW: Some boolean attribute start with "is" but some do not
Expand Down Expand Up @@ -189,4 +189,3 @@ class TangibleConnectionModel {
}

quadrilateral.register( 'TangibleConnectionModel', TangibleConnectionModel );
export default TangibleConnectionModel;
3 changes: 1 addition & 2 deletions js/quadrilateral/view/CornerGuideNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const OUTER_RADIUS = QuadrilateralVertex.VERTEX_WIDTH / 2 + WEDGE_RADIAL_LENGTH;

const EXTERNAL_ANGLE_GUIDE_LENGTH = WEDGE_RADIAL_LENGTH * 8;

class CornerGuideNode extends Node {
export default class CornerGuideNode extends Node {
public static readonly WEDGE_SIZE_RADIANS = WEDGE_SIZE_RADIANS;

/**
Expand Down Expand Up @@ -175,4 +175,3 @@ class CornerGuideNode extends Node {
}

quadrilateral.register( 'CornerGuideNode', CornerGuideNode );
export default CornerGuideNode;
3 changes: 1 addition & 2 deletions js/quadrilateral/view/MoveShapeHelpSection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import QuadrilateralKeyboardHelpContent from './QuadrilateralKeyboardHelpContent
const moveShapeDescriptionString = QuadrilateralStrings.a11y.keyboardHelpDialog.moveShapeDescription;
const smallerStepsDescriptionString = QuadrilateralStrings.a11y.keyboardHelpDialog.smallerStepsDescription;

class MoveShapeHelpSection extends KeyboardHelpSection {
export default class MoveShapeHelpSection extends KeyboardHelpSection {
public constructor() {

// basic movement
Expand Down Expand Up @@ -53,4 +53,3 @@ class MoveShapeHelpSection extends KeyboardHelpSection {
}

quadrilateral.register( 'MoveShapeHelpSection', MoveShapeHelpSection );
export default MoveShapeHelpSection;
3 changes: 1 addition & 2 deletions js/quadrilateral/view/QuadrilateralAlerter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const ANGLE_RESPONSE_THRESHOLD = Math.PI / 12;
// changed sufficiently to describe changes in angles over other information.
const ANGLE_DIFFERENCES_LARGE_THRESHOLD = Math.PI / 24;

class QuadrilateralAlerter extends Alerter {
export default class QuadrilateralAlerter extends Alerter {
private readonly model: QuadrilateralModel;
private readonly quadrilateralShapeModel: QuadrilateralShapeModel;
private readonly modelViewTransform: ModelViewTransform2;
Expand Down Expand Up @@ -941,4 +941,3 @@ class QuadrilateralAlerter extends Alerter {
}

quadrilateral.register( 'QuadrilateralAlerter', QuadrilateralAlerter );
export default QuadrilateralAlerter;
3 changes: 1 addition & 2 deletions js/quadrilateral/view/QuadrilateralDebuggingPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const VALUE_WITH_DEGREES_PATTERN_STRING = '{{label}}: {{value}} ({{degrees}} deg
const CONTENT_PADDING = 10;
const VBOX_OPTIONS: VBoxOptions = { align: 'left' };

class QuadrilateralDebuggingPanel extends Node {
export default class QuadrilateralDebuggingPanel extends Node {
public constructor( model: QuadrilateralModel, providedOptions?: NodeOptions ) {

// Length readouts
Expand Down Expand Up @@ -218,4 +218,3 @@ class QuadrilateralDebuggingPanel extends Node {
}

quadrilateral.register( 'QuadrilateralDebuggingPanel', QuadrilateralDebuggingPanel );
export default QuadrilateralDebuggingPanel;
3 changes: 1 addition & 2 deletions js/quadrilateral/view/QuadrilateralDescriber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const VERY_SMALL_THRESHOLD = GRID_CELL_AREA * 12;
const SMALL_THRESHOLD = GRID_CELL_AREA * 24;
const MEDIUM_SIZED_THRESHOLD = GRID_CELL_AREA * 48;

class QuadrilateralDescriber {
export default class QuadrilateralDescriber {
private readonly shapeModel: QuadrilateralShapeModel;
private readonly shapeNameVisibleProperty: TReadOnlyProperty<boolean>;
private readonly markersVisibleProperty: TReadOnlyProperty<boolean>;
Expand Down Expand Up @@ -819,4 +819,3 @@ class QuadrilateralDescriber {
}

quadrilateral.register( 'QuadrilateralDescriber', QuadrilateralDescriber );
export default QuadrilateralDescriber;
3 changes: 1 addition & 2 deletions js/quadrilateral/view/QuadrilateralDiagonalGuidesNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const LINE_NODE_OPTIONS = {
stroke: QuadrilateralColors.diagonalGuidesStrokeColorProperty
};

class QuadrilateralDiagonalGuidesNode extends Node {
export default class QuadrilateralDiagonalGuidesNode extends Node {
public constructor(
quadrilateralShapeModel: QuadrilateralShapeModel,
bounds: Bounds2,
Expand Down Expand Up @@ -107,4 +107,3 @@ class QuadrilateralDiagonalGuidesNode extends Node {
}

quadrilateral.register( 'QuadrilateralDiagonalGuidesNode', QuadrilateralDiagonalGuidesNode );
export default QuadrilateralDiagonalGuidesNode;
3 changes: 1 addition & 2 deletions js/quadrilateral/view/QuadrilateralGridNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const MINOR_GRID_LINE_OPTIONS = {

const BORDER_RECTANGLE_LINE_WIDTH = 2;

class QuadrilateralGridNode extends Node {
export default class QuadrilateralGridNode extends Node {
public constructor( modelBounds: Bounds2, visibleProperty: TReadOnlyProperty<boolean>, modelViewTransform: ModelViewTransform2 ) {
super();

Expand Down Expand Up @@ -106,4 +106,3 @@ class QuadrilateralGridNode extends Node {
}

quadrilateral.register( 'QuadrilateralGridNode', QuadrilateralGridNode );
export default QuadrilateralGridNode;
Loading

0 comments on commit 7a012e7

Please sign in to comment.