Skip to content

Commit

Permalink
fixing imports
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollman committed Mar 2, 2024
1 parent 8d03670 commit ebd1afc
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 40 deletions.
7 changes: 4 additions & 3 deletions src/credentials_provider/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@
/**
* @file Generic facility for providing authentication/authorization credentials.
*/

import { type OAuth2Credentials } from "#src/credentials_provider/oauth2.js";
import type { CancellationToken } from "#src/util/cancellation.js";
import { MultipleConsumerCancellationTokenSource } from "#src/util/cancellation.js";
import type { Owned } from "#src/util/disposable.js";
import { RefCounted } from "#src/util/disposable.js";
import { type HttpError } from "#src/util/http_request.js";
import { StringMemoize } from "#src/util/memoize.js";
import { HttpError } from "#src/util/http_request";
import { OAuth2Credentials } from "#src/credentials_provider/oauth2";



/**
* Wraps an arbitrary JSON credentials object with a generation number.
Expand Down
45 changes: 24 additions & 21 deletions src/datasource/graphene/frontend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,23 @@
*/

import "#src/datasource/graphene/graphene.css";
import { debounce } from "lodash-es";
import {
AnnotationDisplayState,
AnnotationLayerState,
} from "#src/annotation/annotation_layer_state.js";
import type {
AnnotationReference,
Annotation,
AnnotationSource,
AnnotationType,
Line,
Point,
import { type MultiscaleAnnotationSource } from "#src/annotation/frontend_source.js";
import {
type AnnotationReference,
type Annotation,
type AnnotationSource, AnnotationType,
type Line,
type Point,
LocalAnnotationSource,
makeDataBoundsBoundingBoxAnnotationSet,
} from "#src/annotation/index.js";
import { LayerChunkProgressInfo } from "#src/chunk_manager/base.js";
import type { ChunkManager, WithParameters } from "#src/chunk_manager/frontend.js";
import { type ChunkManager, WithParameters } from "#src/chunk_manager/frontend.js";
import { makeIdentityTransform } from "#src/coordinate_transform.js";
import { WithCredentialsProvider } from "#src/credentials_provider/chunk_source_frontend.js";
import type { CredentialsManager } from "#src/credentials_provider/index.js";
Expand All @@ -38,7 +41,6 @@ import type {
ChunkedGraphChunkSpecification,
MultiscaleMeshMetadata,
} from "#src/datasource/graphene/base.js";
import { MultiscaleAnnotationSource } from "#src/annotation/frontend_source";
import {
CHUNKED_GRAPH_LAYER_RPC_ID,
CHUNKED_GRAPH_RENDER_LAYER_UPDATE_SOURCES_RPC_ID,
Expand Down Expand Up @@ -145,27 +147,32 @@ import {
MergedAnnotationStates,
PlaceLineTool,
} from "#src/ui/annotations.js";
import { getDefaultAnnotationListBindings } from "#src/ui/default_input_event_bindings";
import { getDefaultAnnotationListBindings } from "#src/ui/default_input_event_bindings.js";
import {
LayerTool,
makeToolActivationStatusMessageWithHeader,
makeToolButton,
registerLegacyTool,
registerTool,
ToolActivation
type ToolActivation
} from "#src/ui/tool.js";
import type { Uint64Set } from "#src/uint64_set.js";
import { Uint64Set } from "#src/uint64_set.js";
import {
type CancellationToken,
CancellationTokenSource,
} from "#src/util/cancellation.js";
import { packColor } from "#src/util/color.js";
import type { Owned, RefCounted } from "#src/util/disposable.js";
import { ValueOrError, makeValueOrError, valueOrThrow } from "#src/util/error.js";
import { type Owned, RefCounted } from "#src/util/disposable.js";
import { removeChildren } from "#src/util/dom.js";
import { type ValueOrError, makeValueOrError, valueOrThrow } from "#src/util/error.js";
import { EventActionMap } from "#src/util/event_action_map.js";
import { mat4, vec3, vec4 } from "#src/util/geom.js";
import {
HttpError,
isNotFoundError,
responseJson,
} from "#src/util/http_request.js";
import { removeChildren } from "#src/util/dom";

import {
parseArray,
parseFixedLengthArray,
Expand All @@ -186,13 +193,13 @@ import {
verifyString,
verifyStringArray
} from "#src/util/json.js";
import { MouseEventBinder } from "#src/util/mouse_bindings.js";
import { getObjectId } from "#src/util/object_id.js";
import { NullarySignal } from "#src/util/signal.js";
import type {
SpecialProtocolCredentials,
SpecialProtocolCredentialsProvider,
} from "#src/util/special_protocol_request.js";
import { MouseEventBinder } from "#src/util/mouse_bindings";
import {
cancellableFetchSpecialOk,
parseSpecialUrl,
Expand All @@ -202,11 +209,7 @@ import { Uint64 } from "#src/util/uint64.js";
import { makeDeleteButton } from "#src/widget/delete_button.js";
import type { DependentViewContext } from "#src/widget/dependent_view_widget.js";
import { makeIcon } from "#src/widget/icon.js";
import {
CancellationToken,
CancellationTokenSource,
} from "#src/util/cancellation";
import { debounce } from "lodash";

import type { LayerControlDefinition } from "#src/widget/layer_control.js";
import { addLayerControlToOptionsTab } from "#src/widget/layer_control.js";
import { rangeLayerControl } from "#src/widget/layer_control_range.js";
Expand Down
5 changes: 3 additions & 2 deletions src/datasource/middleauth/credentials_provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@ import {
CredentialsProvider,
makeCredentialsGetter,
} from "#src/credentials_provider/index.js";
import { type OAuth2Credentials } from "#src/credentials_provider/oauth2.js";
import { StatusMessage } from "#src/status.js";
import { type HttpError } from "#src/util/http_request.js";
import {
verifyObject,
verifyObjectProperty,
verifyString,
verifyStringArray,
} from "#src/util/json.js";
import { HttpError } from "#src/util/http_request";
import { OAuth2Credentials } from "#src/credentials_provider/oauth2";


export type MiddleAuthToken = {
tokenType: string;
Expand Down
2 changes: 1 addition & 1 deletion src/layer/segmentation/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ import { DisplayOptionsTab } from "#src/ui/segmentation_display_options_tab.js";
import { Uint64Map } from "#src/uint64_map.js";
import { Uint64OrderedSet } from "#src/uint64_ordered_set.js";
import { Uint64Set } from "#src/uint64_set.js";
import { gatherUpdate } from "#src/util/array.js";
import {
packColor,
parseRGBColorSpecification,
Expand All @@ -130,7 +131,6 @@ import { Uint64 } from "#src/util/uint64.js";
import { makeWatchableShaderError } from "#src/webgl/dynamic_shader.js";
import type { DependentViewContext } from "#src/widget/dependent_view_widget.js";
import { registerLayerShaderControlsTool } from "#src/widget/shader_controls.js";
import { gatherUpdate } from "#src/util/array";

export const SKELETON_RENDERING_SHADER_CONTROL_TOOL_ID =
"skeletonShaderControl";
Expand Down
6 changes: 3 additions & 3 deletions src/segmentation_display_state/frontend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,16 @@ import {
} from "#src/util/color.js";
import { RefCounted } from "#src/util/disposable.js";
import { measureElementClone } from "#src/util/dom.js";
import type { vec3 } from "#src/util/geom.js";
import { kOneVec, vec4 } from "#src/util/geom.js";
import { vec3, kOneVec, vec4 } from "#src/util/geom.js";
import { NullarySignal } from "#src/util/signal.js";
import { Uint64 } from "#src/util/uint64.js";
import { withSharedVisibility } from "#src/visibility_priority/frontend.js";
import { ColorWidget } from "#src/widget/color.js";
import { makeCopyButton } from "#src/widget/copy_button.js";
import { makeEyeButton } from "#src/widget/eye_button.js";
import { makeFilterButton } from "#src/widget/filter_button.js";
import { makeStarButton } from "#src/widget/star_button.js";
import { ColorWidget } from "#src/widget/color";


export class Uint64MapEntry {
constructor(
Expand Down
13 changes: 7 additions & 6 deletions src/ui/default_viewer_setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { type UserLayer, type UserLayerConstructor, layerTypes } from "#src/layer/index.js";
import { StatusMessage } from "#src/status.js";
import {
bindDefaultCopyHandler,
Expand All @@ -23,15 +23,16 @@ import { setDefaultInputEventBindings } from "#src/ui/default_input_event_bindin
import { makeDefaultViewer } from "#src/ui/default_viewer.js";
import type { MinimalViewerOptions } from "#src/ui/minimal_viewer.js";
import { bindTitle } from "#src/ui/title.js";
import { type Tool, restoreTool } from "#src/ui/tool.js";
import { UrlHashBinding } from "#src/ui/url_hash_binding.js";
import { UserLayer, UserLayerConstructor } from "#src/layer";
import { Tool, restoreTool } from "./tool";
import { SegmentationUserLayer } from "#src/segmentation_user_layer";
import {
verifyObject,
verifyObjectProperty,
verifyString,
} from "#src/util/json";
} from "#src/util/json.js";




declare let NEUROGLANCER_DEFAULT_STATE_FRAGMENT: string | undefined;

Expand Down Expand Up @@ -63,7 +64,7 @@ export function setupDefaultViewer(options?: Partial<MinimalViewerOptions>) {
desiredLayerType: UserLayerConstructor,
desiredProvider?: string,
) => {
let previousTool: Tool<Object> | undefined;
let previousTool: Tool<object> | undefined;
let previousLayer: UserLayer | undefined;
if (typeof obj === "string") {
obj = { type: obj };
Expand Down
4 changes: 2 additions & 2 deletions src/ui/tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export abstract class LegacyTool<
}
abstract trigger(mouseState: MouseSelectionState): void;
abstract toJSON(): any;
deactivate(): void {}
deactivate(): void { }
abstract description: string;
unbind() {
const { layer } = this;
Expand Down Expand Up @@ -318,7 +318,7 @@ export class GlobalToolBinder extends RefCounted {
this.changed.dispatch();
}

activate(key: string, tool?: Tool<Object>): Borrowed<Tool> | undefined {
activate(key: string, tool?: Tool<object>): Borrowed<Tool> | undefined {
tool = tool || this.get(key);
if (tool === undefined) {
this.deactivate_();
Expand Down
4 changes: 2 additions & 2 deletions src/viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ import { SelectionDetailsPanel } from "#src/ui/selection_details.js";
import { SidePanelManager } from "#src/ui/side_panel.js";
import { StateEditorDialog } from "#src/ui/state_editor.js";
import { StatisticsDisplayState, StatisticsPanel } from "#src/ui/statistics.js";
import { GlobalToolBinder, LocalToolBinder, Tool } from "#src/ui/tool.js";
import { type Tool, GlobalToolBinder, LocalToolBinder } from "#src/ui/tool.js";
import {
ViewerSettingsPanel,
ViewerSettingsPanelState,
Expand Down Expand Up @@ -1124,7 +1124,7 @@ export class Viewer extends RefCounted implements ViewerState {
new LocalToolBinder(this, this.globalToolBinder),
);

activateTool(key: string, tool?: Tool<Object>) {
activateTool(key: string, tool?: Tool<object>) {
this.globalToolBinder.activate(key, tool);
}

Expand Down

0 comments on commit ebd1afc

Please sign in to comment.