Skip to content

Commit

Permalink
auto organize imports, phetsims/chipper#1462
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Sep 30, 2024
1 parent 27d9287 commit 626b7e0
Show file tree
Hide file tree
Showing 41 changed files with 116 additions and 113 deletions.
2 changes: 1 addition & 1 deletion js/display/DisplayTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ QUnit.test( 'Renderer order bitmask', assert => {
assert.equal( Renderer.bitmaskOrder( mask, 3 ), Renderer.bitmaskSVG );
// console.log( mask.toString( 16 ) );
} );


QUnit.test( 'Empty Display usage', assert => {
const n = new Node();
Expand Down
6 changes: 3 additions & 3 deletions js/filters/ColorMatrixFilter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ export default class ColorMatrixFilter extends Filter {
* [ 1 ]
*/
public constructor( m00: number, m01: number, m02: number, m03: number, m04: number,
m10: number, m11: number, m12: number, m13: number, m14: number,
m20: number, m21: number, m22: number, m23: number, m24: number,
m30: number, m31: number, m32: number, m33: number, m34: number ) {
m10: number, m11: number, m12: number, m13: number, m14: number,
m20: number, m21: number, m22: number, m23: number, m24: number,
m30: number, m31: number, m32: number, m33: number, m34: number ) {

assert && assert( isFinite( m00 ), 'm00 should be a finite number' );
assert && assert( isFinite( m01 ), 'm01 should be a finite number' );
Expand Down
8 changes: 4 additions & 4 deletions js/input/Hotkey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@
* @author Jonathan Olson <[email protected]>
*/

import { AllowedKeysString, EnglishStringToCodeMap, hotkeyManager, KeyDescriptor, OneKeyStroke, scenery } from '../imports.js';
import optionize from '../../../phet-core/js/optionize.js';
import EnabledComponent, { EnabledComponentOptions } from '../../../axon/js/EnabledComponent.js';
import TProperty from '../../../axon/js/TProperty.js';
import BooleanProperty from '../../../axon/js/BooleanProperty.js';
import CallbackTimer from '../../../axon/js/CallbackTimer.js';
import DerivedProperty from '../../../axon/js/DerivedProperty.js';
import EnabledComponent, { EnabledComponentOptions } from '../../../axon/js/EnabledComponent.js';
import TProperty from '../../../axon/js/TProperty.js';
import TReadOnlyProperty from '../../../axon/js/TReadOnlyProperty.js';
import optionize from '../../../phet-core/js/optionize.js';
import { AllowedKeysString, EnglishStringToCodeMap, hotkeyManager, KeyDescriptor, OneKeyStroke, scenery } from '../imports.js';

export type HotkeyFireOnHoldTiming = 'browser' | 'custom';

Expand Down
6 changes: 3 additions & 3 deletions js/input/HotkeyData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
* @author Jesse Greenberg (PhET Interactive Simulations)
*/

import { KeyDescriptor, OneKeyStroke, scenery } from '../../../scenery/js/imports.js';
import optionize from '../../../phet-core/js/optionize.js';
import TReadOnlyProperty from '../../../axon/js/TReadOnlyProperty.js';
import DerivedProperty from '../../../axon/js/DerivedProperty.js';
import TReadOnlyProperty from '../../../axon/js/TReadOnlyProperty.js';
import InstanceRegistry from '../../../phet-core/js/documentation/InstanceRegistry.js';
import optionize from '../../../phet-core/js/optionize.js';
import { KeyDescriptor, OneKeyStroke, scenery } from '../../../scenery/js/imports.js';

// The type for a serialized HotkeyData object for documentation (binder).
type SerializedHotkeyData = {
Expand Down
14 changes: 7 additions & 7 deletions js/input/Input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,22 +158,22 @@
* @author Sam Reid (PhET Interactive Simulations)
*/

import PhetioAction from '../../../tandem/js/PhetioAction.js';
import stepTimer from '../../../axon/js/stepTimer.js';
import TEmitter from '../../../axon/js/TEmitter.js';
import TinyEmitter from '../../../axon/js/TinyEmitter.js';
import Vector2 from '../../../dot/js/Vector2.js';
import cleanArray from '../../../phet-core/js/cleanArray.js';
import optionize, { EmptySelfOptions } from '../../../phet-core/js/optionize.js';
import platform from '../../../phet-core/js/platform.js';
import PickOptional from '../../../phet-core/js/types/PickOptional.js';
import EventType from '../../../tandem/js/EventType.js';
import PhetioAction from '../../../tandem/js/PhetioAction.js';
import PhetioObject, { PhetioObjectOptions } from '../../../tandem/js/PhetioObject.js';
import ArrayIO from '../../../tandem/js/types/ArrayIO.js';
import IOType from '../../../tandem/js/types/IOType.js';
import NullableIO from '../../../tandem/js/types/NullableIO.js';
import NumberIO from '../../../tandem/js/types/NumberIO.js';
import { BatchedDOMEvent, BatchedDOMEventCallback, BatchedDOMEventType, BrowserEvents, Display, EventContext, EventContextIO, Mouse, Node, PDOMInstance, PDOMPointer, PDOMUtils, Pen, Pointer, scenery, SceneryEvent, SceneryListenerFunction, SupportedEventTypes, TInputListener, Touch, Trail, WindowTouch } from '../imports.js';
import PhetioObject, { PhetioObjectOptions } from '../../../tandem/js/PhetioObject.js';
import IOType from '../../../tandem/js/types/IOType.js';
import ArrayIO from '../../../tandem/js/types/ArrayIO.js';
import PickOptional from '../../../phet-core/js/types/PickOptional.js';
import TEmitter from '../../../axon/js/TEmitter.js';
import stepTimer from '../../../axon/js/stepTimer.js';

const ArrayIOPointerIO = ArrayIO( Pointer.PointerIO );

Expand Down
2 changes: 1 addition & 1 deletion js/input/Pointer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import Enumeration from '../../../phet-core/js/Enumeration.js';
import EnumerationValue from '../../../phet-core/js/EnumerationValue.js';
import IOType from '../../../tandem/js/types/IOType.js';
import StringIO from '../../../tandem/js/types/StringIO.js';
import TAttachableInputListener from './TAttachableInputListener.js';
import { EventContext, scenery, SceneryEvent, TInputListener, Trail } from '../imports.js';
import TAttachableInputListener from './TAttachableInputListener.js';

export class Intent extends EnumerationValue {
// listener attached to the pointer will be used for dragging
Expand Down
3 changes: 2 additions & 1 deletion js/input/globalHotkeyRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
* @author Jonathan Olson <[email protected]>
*/

import { Hotkey, scenery } from '../imports.js';
import TinyProperty from '../../../axon/js/TinyProperty.js';
import TProperty from '../../../axon/js/TProperty.js';
import { Hotkey, scenery } from '../imports.js';

class GlobalHotkeyRegistry {

Expand All @@ -28,6 +28,7 @@ class GlobalHotkeyRegistry {
this.hotkeysProperty.value = new Set( [ ...this.hotkeysProperty.value ].filter( value => value !== hotkey ) );
}
}

scenery.register( 'GlobalHotkeyRegistry', GlobalHotkeyRegistry );

const globalHotkeyRegistry = new GlobalHotkeyRegistry();
Expand Down
8 changes: 4 additions & 4 deletions js/listeners/AnimatedPanZoomListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
* @author Jesse Greenberg
*/

import BooleanProperty from '../../../axon/js/BooleanProperty.js';
import { PropertyLinkListener } from '../../../axon/js/TReadOnlyProperty.js';
import Bounds2 from '../../../dot/js/Bounds2.js';
import Matrix3 from '../../../dot/js/Matrix3.js';
import Utils from '../../../dot/js/Utils.js';
import Vector2 from '../../../dot/js/Vector2.js';
import optionize, { EmptySelfOptions } from '../../../phet-core/js/optionize.js';
import platform from '../../../phet-core/js/platform.js';
import EventType from '../../../tandem/js/EventType.js';
import isSettingPhetioStateProperty from '../../../tandem/js/isSettingPhetioStateProperty.js';
import PhetioAction from '../../../tandem/js/PhetioAction.js';
import { EventIO, Focus, FocusManager, globalKeyStateTracker, Intent, KeyboardDragListener, KeyboardUtils, KeyboardZoomUtils, KeyStateTracker, LimitPanDirection, Mouse, MultiListenerPress, Node, PanZoomListener, PanZoomListenerOptions, PDOMPointer, PDOMUtils, Pointer, PressListener, scenery, SceneryEvent, Trail, TransformTracker } from '../imports.js';
import optionize, { EmptySelfOptions } from '../../../phet-core/js/optionize.js';
import Tandem from '../../../tandem/js/Tandem.js';
import BooleanProperty from '../../../axon/js/BooleanProperty.js';
import { PropertyLinkListener } from '../../../axon/js/TReadOnlyProperty.js';
import { EventIO, Focus, FocusManager, globalKeyStateTracker, Intent, KeyboardDragListener, KeyboardUtils, KeyboardZoomUtils, KeyStateTracker, LimitPanDirection, Mouse, MultiListenerPress, Node, PanZoomListener, PanZoomListenerOptions, PDOMPointer, PDOMUtils, Pointer, PressListener, scenery, SceneryEvent, Trail, TransformTracker } from '../imports.js';

// constants
const MOVE_CURSOR = 'all-scroll';
Expand Down
4 changes: 2 additions & 2 deletions js/nodes/Circle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
* @author Jonathan Olson <[email protected]>
*/

import TReadOnlyProperty from '../../../axon/js/TReadOnlyProperty.js';
import Bounds2 from '../../../dot/js/Bounds2.js';
import StrictOmit from '../../../phet-core/js/types/StrictOmit.js';
import Matrix3 from '../../../dot/js/Matrix3.js';
import Vector2 from '../../../dot/js/Vector2.js';
import { Shape } from '../../../kite/js/imports.js';
import extendDefined from '../../../phet-core/js/extendDefined.js';
import StrictOmit from '../../../phet-core/js/types/StrictOmit.js';
import { CanvasContextWrapper, CanvasSelfDrawable, CircleCanvasDrawable, CircleDOMDrawable, CircleSVGDrawable, DOMSelfDrawable, Features, Instance, Path, PathOptions, Renderer, scenery, SVGSelfDrawable, TCircleDrawable, VoicingOptions } from '../imports.js';
import TReadOnlyProperty from '../../../axon/js/TReadOnlyProperty.js';

const CIRCLE_OPTION_KEYS = [
'radius' // {number} - see setRadius() for more documentation
Expand Down
10 changes: 5 additions & 5 deletions js/nodes/Image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
* @author Jonathan Olson <[email protected]>
*/

import TReadOnlyProperty, { isTReadOnlyProperty } from '../../../axon/js/TReadOnlyProperty.js';
import Bounds2 from '../../../dot/js/Bounds2.js';
import IOType from '../../../tandem/js/types/IOType.js';
import StringIO from '../../../tandem/js/types/StringIO.js';
import VoidIO from '../../../tandem/js/types/VoidIO.js';
import Matrix3 from '../../../dot/js/Matrix3.js';
import Vector2 from '../../../dot/js/Vector2.js';
import { Shape } from '../../../kite/js/imports.js';
import { CanvasContextWrapper, CanvasSelfDrawable, DOMSelfDrawable, Imageable, ImageableImage, ImageableOptions, ImageCanvasDrawable, ImageDOMDrawable, ImageSVGDrawable, ImageWebGLDrawable, Instance, Node, NodeOptions, Renderer, scenery, SpriteSheet, SVGSelfDrawable, TImageDrawable, WebGLSelfDrawable } from '../imports.js';
import optionize, { combineOptions, EmptySelfOptions } from '../../../phet-core/js/optionize.js';
import TReadOnlyProperty, { isTReadOnlyProperty } from '../../../axon/js/TReadOnlyProperty.js';
import IOType from '../../../tandem/js/types/IOType.js';
import StringIO from '../../../tandem/js/types/StringIO.js';
import VoidIO from '../../../tandem/js/types/VoidIO.js';
import { CanvasContextWrapper, CanvasSelfDrawable, DOMSelfDrawable, Imageable, ImageableImage, ImageableOptions, ImageCanvasDrawable, ImageDOMDrawable, ImageSVGDrawable, ImageWebGLDrawable, Instance, Node, NodeOptions, Renderer, scenery, SpriteSheet, SVGSelfDrawable, TImageDrawable, WebGLSelfDrawable } from '../imports.js';


// Image-specific options that can be passed in the constructor or mutate() call.
Expand Down
16 changes: 8 additions & 8 deletions js/nodes/Imageable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
* @author Jonathan Olson <[email protected]>
*/

import TEmitter from '../../../axon/js/TEmitter.js';
import TinyEmitter from '../../../axon/js/TinyEmitter.js';
import TinyForwardingProperty from '../../../axon/js/TinyForwardingProperty.js';
import TProperty from '../../../axon/js/TProperty.js';
import TReadOnlyProperty from '../../../axon/js/TReadOnlyProperty.js';
import Matrix3 from '../../../dot/js/Matrix3.js';
import Utils from '../../../dot/js/Utils.js';
import Vector2 from '../../../dot/js/Vector2.js';
import { Shape } from '../../../kite/js/imports.js';
import cleanArray from '../../../phet-core/js/cleanArray.js';
import Matrix3 from '../../../dot/js/Matrix3.js';
import Vector2 from '../../../dot/js/Vector2.js';
import { scenery, svgns, xlinkns } from '../imports.js';
import IntentionalAny from '../../../phet-core/js/types/IntentionalAny.js';
import TEmitter from '../../../axon/js/TEmitter.js';
import TinyForwardingProperty from '../../../axon/js/TinyForwardingProperty.js';
import TReadOnlyProperty from '../../../axon/js/TReadOnlyProperty.js';
import TProperty from '../../../axon/js/TProperty.js';
import Constructor from '../../../phet-core/js/types/Constructor.js';
import IntentionalAny from '../../../phet-core/js/types/IntentionalAny.js';
import { scenery, svgns, xlinkns } from '../imports.js';

// Need to poly-fill on some browsers
const log2 = Math.log2 || function( x: number ) { return Math.log( x ) / Math.LN2; };
Expand Down
2 changes: 1 addition & 1 deletion js/nodes/IndexedNodeIO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
* @author Sam Reid (PhET Interactive Simulations)
*/

import deprecationWarning from '../../../phet-core/js/deprecationWarning.js';
import FunctionIO from '../../../tandem/js/types/FunctionIO.js';
import IOType from '../../../tandem/js/types/IOType.js';
import NullableIO from '../../../tandem/js/types/NullableIO.js';
import NumberIO from '../../../tandem/js/types/NumberIO.js';
import VoidIO from '../../../tandem/js/types/VoidIO.js';
import { Node, scenery } from '../imports.js';
import deprecationWarning from '../../../phet-core/js/deprecationWarning.js';

export type IndexedNodeIOParent = {
onIndexedNodeIOChildMoved: ( node: Node ) => void;
Expand Down
4 changes: 2 additions & 2 deletions js/nodes/Leaf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
* @author Jonathan Olson <[email protected]>
*/

import { Node, scenery } from '../imports.js';
import memoize from '../../../phet-core/js/memoize.js';
import IntentionalAny from '../../../phet-core/js/types/IntentionalAny.js';
import Constructor from '../../../phet-core/js/types/Constructor.js';
import IntentionalAny from '../../../phet-core/js/types/IntentionalAny.js';
import { Node, scenery } from '../imports.js';

const Leaf = memoize( <SuperType extends Constructor<Node>>( type: SuperType ): SuperType => {

Expand Down
4 changes: 2 additions & 2 deletions js/nodes/Line.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
* @author Jonathan Olson <[email protected]>
*/

import TReadOnlyProperty from '../../../axon/js/TReadOnlyProperty.js';
import Bounds2 from '../../../dot/js/Bounds2.js';
import StrictOmit from '../../../phet-core/js/types/StrictOmit.js';
import Matrix3 from '../../../dot/js/Matrix3.js';
import Vector2 from '../../../dot/js/Vector2.js';
import { Shape } from '../../../kite/js/imports.js';
import extendDefined from '../../../phet-core/js/extendDefined.js';
import StrictOmit from '../../../phet-core/js/types/StrictOmit.js';
import { CanvasContextWrapper, CanvasSelfDrawable, Instance, LineCanvasDrawable, LineSVGDrawable, Path, PathOptions, Renderer, scenery, SVGSelfDrawable, TLineDrawable } from '../imports.js';
import TReadOnlyProperty from '../../../axon/js/TReadOnlyProperty.js';

const LINE_OPTION_KEYS = [
'p1', // {Vector2} - Start position
Expand Down
12 changes: 6 additions & 6 deletions js/nodes/Node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,28 +154,28 @@
import BooleanProperty, { BooleanPropertyOptions } from '../../../axon/js/BooleanProperty.js';
import EnabledProperty, { EnabledPropertyOptions } from '../../../axon/js/EnabledProperty.js';
import Property, { PropertyOptions } from '../../../axon/js/Property.js';
import TEmitter from '../../../axon/js/TEmitter.js';
import TinyEmitter from '../../../axon/js/TinyEmitter.js';
import TinyForwardingProperty from '../../../axon/js/TinyForwardingProperty.js';
import TinyProperty from '../../../axon/js/TinyProperty.js';
import TinyStaticProperty from '../../../axon/js/TinyStaticProperty.js';
import TProperty from '../../../axon/js/TProperty.js';
import TReadOnlyProperty from '../../../axon/js/TReadOnlyProperty.js';
import Bounds2 from '../../../dot/js/Bounds2.js';
import Matrix3 from '../../../dot/js/Matrix3.js';
import Transform3 from '../../../dot/js/Transform3.js';
import Utils from '../../../dot/js/Utils.js';
import Vector2 from '../../../dot/js/Vector2.js';
import { Shape } from '../../../kite/js/imports.js';
import arrayDifference from '../../../phet-core/js/arrayDifference.js';
import deprecationWarning from '../../../phet-core/js/deprecationWarning.js';
import optionize, { combineOptions, EmptySelfOptions, optionize3 } from '../../../phet-core/js/optionize.js';
import IntentionalAny from '../../../phet-core/js/types/IntentionalAny.js';
import PhetioObject, { PhetioObjectOptions } from '../../../tandem/js/PhetioObject.js';
import Tandem from '../../../tandem/js/Tandem.js';
import BooleanIO from '../../../tandem/js/types/BooleanIO.js';
import IOType from '../../../tandem/js/types/IOType.js';
import TProperty from '../../../axon/js/TProperty.js';
import { ACCESSIBILITY_OPTION_KEYS, CanvasContextWrapper, CanvasSelfDrawable, Display, DOMSelfDrawable, Drawable, Features, Filter, hotkeyManager, Image, ImageOptions, Instance, isHeightSizable, isWidthSizable, LayoutConstraint, Mouse, ParallelDOM, ParallelDOMOptions, Picker, Pointer, Renderer, RendererSummary, scenery, serializeConnectedNodes, SVGSelfDrawable, TInputListener, TLayoutOptions, Trail, WebGLSelfDrawable } from '../imports.js';
import optionize, { combineOptions, EmptySelfOptions, optionize3 } from '../../../phet-core/js/optionize.js';
import IntentionalAny from '../../../phet-core/js/types/IntentionalAny.js';
import Utils from '../../../dot/js/Utils.js';
import TReadOnlyProperty from '../../../axon/js/TReadOnlyProperty.js';
import TEmitter from '../../../axon/js/TEmitter.js';
import SceneryQueryParameters from '../SceneryQueryParameters.js';

let globalIdCounter = 1;
Expand Down
8 changes: 4 additions & 4 deletions js/nodes/Paintable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
* @author Jonathan Olson <[email protected]>
*/

import { isTReadOnlyProperty } from '../../../axon/js/TReadOnlyProperty.js';
import Vector2 from '../../../dot/js/Vector2.js';
import { LINE_STYLE_DEFAULT_OPTIONS, LineCap, LineJoin, LineStyles } from '../../../kite/js/imports.js';
import arrayRemove from '../../../phet-core/js/arrayRemove.js';
import assertHasProperties from '../../../phet-core/js/assertHasProperties.js';
import inheritance from '../../../phet-core/js/inheritance.js';
import platform from '../../../phet-core/js/platform.js';
import memoize from '../../../phet-core/js/memoize.js';
import { CanvasContextWrapper, Color, Gradient, LinearGradient, Node, Paint, PaintDef, Path, Pattern, RadialGradient, Renderer, scenery, Text, TPaint, TPaintableDrawable } from '../imports.js';
import platform from '../../../phet-core/js/platform.js';
import Constructor from '../../../phet-core/js/types/Constructor.js';
import IntentionalAny from '../../../phet-core/js/types/IntentionalAny.js';
import Vector2 from '../../../dot/js/Vector2.js';
import { isTReadOnlyProperty } from '../../../axon/js/TReadOnlyProperty.js';
import { CanvasContextWrapper, Color, Gradient, LinearGradient, Node, Paint, PaintDef, Path, Pattern, RadialGradient, Renderer, scenery, Text, TPaint, TPaintableDrawable } from '../imports.js';

const isSafari5 = platform.safari5;

Expand Down
12 changes: 6 additions & 6 deletions js/nodes/Path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
* @author Jonathan Olson <[email protected]>
*/

import TinyForwardingProperty from '../../../axon/js/TinyForwardingProperty.js';
import TProperty from '../../../axon/js/TProperty.js';
import TReadOnlyProperty, { isTReadOnlyProperty } from '../../../axon/js/TReadOnlyProperty.js';
import Bounds2 from '../../../dot/js/Bounds2.js';
import { Shape } from '../../../kite/js/imports.js';
import Matrix3 from '../../../dot/js/Matrix3.js';
import Vector2 from '../../../dot/js/Vector2.js';
import { CanvasContextWrapper, CanvasSelfDrawable, Instance, Node, NodeOptions, Paint, Paintable, PAINTABLE_DRAWABLE_MARK_FLAGS, PAINTABLE_OPTION_KEYS, PaintableOptions, PathCanvasDrawable, PathSVGDrawable, Renderer, scenery, SVGSelfDrawable, TPathDrawable } from '../imports.js';
import { Shape } from '../../../kite/js/imports.js';
import optionize, { combineOptions } from '../../../phet-core/js/optionize.js';
import TReadOnlyProperty, { isTReadOnlyProperty } from '../../../axon/js/TReadOnlyProperty.js';
import WithRequired from '../../../phet-core/js/types/WithRequired.js';
import StrictOmit from '../../../phet-core/js/types/StrictOmit.js';
import TinyForwardingProperty from '../../../axon/js/TinyForwardingProperty.js';
import TProperty from '../../../axon/js/TProperty.js';
import WithRequired from '../../../phet-core/js/types/WithRequired.js';
import { CanvasContextWrapper, CanvasSelfDrawable, Instance, Node, NodeOptions, Paint, Paintable, PAINTABLE_DRAWABLE_MARK_FLAGS, PAINTABLE_OPTION_KEYS, PaintableOptions, PathCanvasDrawable, PathSVGDrawable, Renderer, scenery, SVGSelfDrawable, TPathDrawable } from '../imports.js';

const PATH_OPTION_KEYS = [
'boundsMethod',
Expand Down
Loading

0 comments on commit 626b7e0

Please sign in to comment.