This repository has been archived by the owner on Feb 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable declaration file emission. Fix issues that arrise from this
Because of typescript bug microsoft/TypeScript#17744 all protected and private members were made public and a comment added indicating whether they were previously private or public
- Loading branch information
Showing
108 changed files
with
2,052 additions
and
238 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export declare function DefaultTextInputHandler(initialInput: string): Promise<string>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import type { Root } from './Root'; | ||
export interface Driver { | ||
update(root: Root): void; | ||
onEnable(root: Root): void; | ||
onDisable(root: Root): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export declare enum FocusType { | ||
Pointer = 0, | ||
Keyboard = 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export declare type PointerStyleHandler = (newPointerStyle: string) => void; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import type { PointerStyleHandler } from './PointerStyleHandler'; | ||
import type { TextInputHandler } from './TextInputHandler'; | ||
import type { Widget } from '../widgets/Widget'; | ||
import type { Event } from '../events/Event'; | ||
import type { Theme } from '../theme/Theme'; | ||
import { FocusType } from './FocusType'; | ||
import type { Driver } from './Driver'; | ||
import { Viewport } from './Viewport'; | ||
export declare class Root { | ||
readonly child: Widget; | ||
viewport: Viewport; | ||
drivers: Set<Driver>; | ||
_enabled: boolean; | ||
pointerStyle: string; | ||
_currentPointerStyle: string; | ||
pointerStyleHandler: PointerStyleHandler | null; | ||
readonly foci: Map<FocusType, Widget | null>; | ||
readonly lastFociCapturers: Map<FocusType, Widget | null>; | ||
textInputHandler: TextInputHandler | null; | ||
_mobileTextInUse: boolean; | ||
constructor(child: Widget, pointerStyleHandler?: PointerStyleHandler | null, theme?: Theme); | ||
get maxDimensions(): [number, number]; | ||
set maxDimensions(maxDimensions: [number, number]); | ||
get canvasDimensions(): [number, number]; | ||
get dimensions(): [number, number]; | ||
get enabled(): boolean; | ||
set enabled(newEnabled: boolean); | ||
get canvas(): HTMLCanvasElement; | ||
resolveLayout(): boolean; | ||
paint(): boolean; | ||
dispatchEvent(event: Event): void; | ||
preLayoutUpdate(): void; | ||
postLayoutUpdate(): void; | ||
updatePointerStyle(newStyle?: string | null): void; | ||
requestFocus(focusType: FocusType, widget: Widget): void; | ||
dropFocus(focusType: FocusType, widget: Widget): void; | ||
clearFocus(focusType: FocusType): void; | ||
registerDriver(driver: Driver): void; | ||
unregisterDriver(driver: Driver): void; | ||
clearDrivers(): void; | ||
get hasMobileTextInput(): boolean; | ||
get usingMobileTextInput(): boolean; | ||
getTextInput(initialInput?: string): Promise<string | null>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export declare type TextInputHandler = (initialInput: string) => Promise<string>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import type { Widget } from '../widgets/Widget'; | ||
export declare class Viewport { | ||
_maxDimensions: [number, number]; | ||
vertical: boolean; | ||
forceLayout: boolean; | ||
readonly canvas: HTMLCanvasElement; | ||
readonly context: CanvasRenderingContext2D; | ||
constructor(startingWidth?: number, startingHeight?: number); | ||
get canvasDimensions(): [number, number]; | ||
set maxDimensions(maxDimensions: [number, number]); | ||
get maxDimensions(): [number, number]; | ||
resolveChildsLayout(child: Widget): boolean; | ||
paintToCanvas(child: Widget): boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export * from './DefaultTextInputHandler'; | ||
export * from './Driver'; | ||
export * from './FocusType'; | ||
export * from './PointerStyleHandler'; | ||
export * from './Root'; | ||
export * from './TextInputHandler'; | ||
export * from './Viewport'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import type { Driver } from '../core/Driver'; | ||
import type { Root } from '../core/Root'; | ||
export declare class KeyboardDriver implements Driver { | ||
private eventQueue; | ||
constructor(listenElem: HTMLElement); | ||
onEnable(_root: Root): void; | ||
onDisable(_root: Root): void; | ||
update(root: Root): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './KeyboardDriver'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import type { FocusType } from '../core/FocusType'; | ||
import type { Widget } from '../widgets/Widget'; | ||
export declare abstract class Event { | ||
readonly target: Widget | null; | ||
readonly focusType: FocusType | null; | ||
readonly needsFocus: boolean; | ||
constructor(target: Widget | null, focusType: FocusType | null, needsFocus: boolean); | ||
abstract cloneWithTarget(target: Widget | null): Event; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import type { Widget } from '../widgets/Widget'; | ||
import { Event } from './Event'; | ||
export declare abstract class KeyEvent extends Event { | ||
readonly key: string; | ||
constructor(key: string, target: Widget | null); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { Widget } from '../widgets/Widget'; | ||
import { KeyEvent } from './KeyEvent'; | ||
export declare class KeyPress extends KeyEvent { | ||
cloneWithTarget(target: Widget | null): KeyPress; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { Widget } from '../widgets/Widget'; | ||
import { KeyEvent } from './KeyEvent'; | ||
export declare class KeyRelease extends KeyEvent { | ||
cloneWithTarget(target: Widget | null): KeyRelease; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { Widget } from '../widgets/Widget'; | ||
import { Event } from './Event'; | ||
export declare class Leave extends Event { | ||
constructor(target?: Widget | null); | ||
cloneWithTarget(target: Widget | null): Leave; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import type { Widget } from '../widgets/Widget'; | ||
import { FocusType } from '../core/FocusType'; | ||
import { Event } from './Event'; | ||
export declare abstract class PointerEvent extends Event { | ||
readonly x: number; | ||
readonly y: number; | ||
constructor(x: number, y: number, target?: Widget | null, focusType?: FocusType | null); | ||
abstract correctOffset(xOffset: number, yOffset: number): PointerEvent; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { PointerEvent } from './PointerEvent'; | ||
import { Widget } from '../widgets/Widget'; | ||
export declare class PointerMove extends PointerEvent { | ||
constructor(x: number, y: number, target?: Widget | null); | ||
correctOffset(xOffset: number, yOffset: number): PointerMove; | ||
cloneWithTarget(target: Widget | null): PointerMove; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { PointerEvent } from './PointerEvent'; | ||
import { Widget } from '../widgets/Widget'; | ||
export declare class PointerPress extends PointerEvent { | ||
constructor(x: number, y: number, target?: Widget | null); | ||
correctOffset(xOffset: number, yOffset: number): PointerPress; | ||
cloneWithTarget(target: Widget | null): PointerPress; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { PointerEvent } from './PointerEvent'; | ||
import { Widget } from '../widgets/Widget'; | ||
export declare class PointerRelease extends PointerEvent { | ||
constructor(x: number, y: number, target?: Widget | null); | ||
correctOffset(xOffset: number, yOffset: number): PointerRelease; | ||
cloneWithTarget(target: Widget | null): PointerRelease; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export * from './Event'; | ||
export * from './KeyEvent'; | ||
export * from './KeyPress'; | ||
export * from './KeyRelease'; | ||
export * from './Leave'; | ||
export * from './PointerEvent'; | ||
export * from './PointerMove'; | ||
export * from './PointerPress'; | ||
export * from './PointerRelease'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default function (number: number, roundUp?: boolean): number; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export * as core from './core/index'; | ||
export * as drivers from './drivers/index'; | ||
export * as events from './events/index'; | ||
export * as interfaces from './interfaces/index'; | ||
export * as mixins from './mixins/index'; | ||
export * as templates from './templates/index'; | ||
export * as theme from './theme/index'; | ||
export * as widgets from './widgets/index'; |
Oops, something went wrong.