diff options
| -rw-r--r-- | types/ext/display-audio.d.ts | 1 | ||||
| -rw-r--r-- | types/ext/display.d.ts | 12 | ||||
| -rw-r--r-- | types/ext/document-util.d.ts | 4 | ||||
| -rw-r--r-- | types/ext/event-listener-collection.d.ts | 1 | ||||
| -rw-r--r-- | types/ext/frontend.d.ts | 3 | ||||
| -rw-r--r-- | types/ext/popup-menu.d.ts | 2 | ||||
| -rw-r--r-- | types/ext/popup.d.ts | 4 | ||||
| -rw-r--r-- | types/ext/settings-controller.d.ts | 5 | ||||
| -rw-r--r-- | types/ext/text-scanner.d.ts | 1 | ||||
| -rw-r--r-- | types/ext/text-source.d.ts | 3 | ||||
| -rw-r--r-- | types/ext/translator.d.ts | 8 | 
11 files changed, 35 insertions, 9 deletions
| diff --git a/types/ext/display-audio.d.ts b/types/ext/display-audio.d.ts index 2ef252b1..759e5ee6 100644 --- a/types/ext/display-audio.d.ts +++ b/types/ext/display-audio.d.ts @@ -18,6 +18,7 @@  import type * as Audio from './audio';  import type * as Settings from './settings';  import type * as AudioDownloader from './audio-downloader'; +import type {TextToSpeechAudio} from '../../ext/js/media/text-to-speech-audio';  export type CacheItem = {      sourceMap: Map<number, CachedInfoList>; diff --git a/types/ext/display.d.ts b/types/ext/display.d.ts index feb049fb..533fc441 100644 --- a/types/ext/display.d.ts +++ b/types/ext/display.d.ts @@ -19,8 +19,12 @@ import type * as Core from './core';  import type * as Dictionary from './dictionary';  import type * as Extension from './extension';  import type * as Settings from './settings'; -import type * as TextScanner from './text-scanner'; +import type * as TextScannerTypes from './text-scanner';  import type * as TextSource from './text-source'; +import type {DisplayContentManager} from '../../ext/js/display/display-content-manager'; +import type {HotkeyHelpController} from '../../ext/js/input/hotkey-help-controller'; +import type {JapaneseUtil} from '../../ext/js/language/sandbox/japanese-util'; +import type {TextScanner} from '../../ext/js/language/text-scanner';  export type HistoryMode = 'clear' | 'overwrite' | 'new'; @@ -114,7 +118,7 @@ export type SearchPersistentStateControllerEventType = 'modeChange';  export type SearchMode = null | 'popup' | 'action-popup'; -export type GetSearchContextCallback = TextScanner.GetSearchContextCallbackSync; +export type GetSearchContextCallback = TextScannerTypes.GetSearchContextCallbackSync;  export type QueryParserConstructorDetails = {      getSearchContext: GetSearchContextCallback; @@ -127,7 +131,7 @@ export type QueryParserOptions = {      readingMode: Settings.ParsingReadingMode;      useInternalParser: boolean;      useMecabParser: boolean; -    scanning: TextScanner.Options; +    scanning: TextScannerTypes.Options;  };  export type QueryParserEventType = 'searched'; @@ -137,7 +141,7 @@ export type QueryParserSearchedEvent = {      type: PageType;      dictionaryEntries: Dictionary.DictionaryEntry[];      sentence: HistoryStateSentence; -    inputInfo: TextScanner.InputInfo; +    inputInfo: TextScannerTypes.InputInfo;      textSource: TextSource.TextSource;      optionsContext: Settings.OptionsContext;      sentenceOffset: number | null; diff --git a/types/ext/document-util.d.ts b/types/ext/document-util.d.ts index 28dfe899..aa655a67 100644 --- a/types/ext/document-util.d.ts +++ b/types/ext/document-util.d.ts @@ -15,6 +15,8 @@   * along with this program.  If not, see <https://www.gnu.org/licenses/>.   */ +import type * as TextSource from './text-source'; +  export type NormalizedWritingMode = 'horizontal-tb' | 'vertical-rl' | 'vertical-lr' | 'sideways-rl' | 'sideways-lr';  /** @@ -44,7 +46,7 @@ export type GetRangeFromPointHandler = (      y: number,      /** Options to configure how element detection is performed. */      options: GetRangeFromPointOptions, -) => (TextSourceRange | TextSourceElement | null); +) => (TextSource.TextSource | null);  export type ToNumberConstraints = {      min?: string | number; diff --git a/types/ext/event-listener-collection.d.ts b/types/ext/event-listener-collection.d.ts index daeeecab..f22d6bcc 100644 --- a/types/ext/event-listener-collection.d.ts +++ b/types/ext/event-listener-collection.d.ts @@ -16,6 +16,7 @@   */  import type * as Core from './core'; +import type {EventDispatcher} from '../../ext/js/core';  export type EventListenerFunction = (...args: Core.SafeAny[]) => unknown; diff --git a/types/ext/frontend.d.ts b/types/ext/frontend.d.ts index 3acafe0a..73b24dc3 100644 --- a/types/ext/frontend.d.ts +++ b/types/ext/frontend.d.ts @@ -15,6 +15,9 @@   * along with this program.  If not, see <https://www.gnu.org/licenses/>.   */ +import type {PopupFactory} from '../../ext/js/app/popup-factory'; +import type {HotkeyHandler} from '../../ext/js/input/hotkey-handler'; +  /** Details about how to set up the instance. */  export type ConstructorDetails = {      /** The type of page, one of 'web', 'popup', or 'search'. */ diff --git a/types/ext/popup-menu.d.ts b/types/ext/popup-menu.d.ts index c20ebf69..b6e37316 100644 --- a/types/ext/popup-menu.d.ts +++ b/types/ext/popup-menu.d.ts @@ -15,6 +15,8 @@   * along with this program.  If not, see <https://www.gnu.org/licenses/>.   */ +import type {PopupMenu} from '../../ext/js/dom/popup-menu'; +  export type EventType = 'close';  export type CloseReason = 'close' | 'outside' | 'item' | 'resize'; diff --git a/types/ext/popup.d.ts b/types/ext/popup.d.ts index bcbc8662..aaeb676a 100644 --- a/types/ext/popup.d.ts +++ b/types/ext/popup.d.ts @@ -17,6 +17,10 @@  import type * as DocumentUtil from './document-util';  import type * as Settings from './settings'; +import type {FrameOffsetForwarder} from '../../ext/js/comm/frame-offset-forwarder'; +import type {Popup} from '../../ext/js/app/popup'; +import type {PopupProxy} from '../../ext/js/app/popup-proxy'; +import type {PopupWindow} from '../../ext/js/app/popup-window';  export type PopupAny = Popup | PopupWindow | PopupProxy; diff --git a/types/ext/settings-controller.d.ts b/types/ext/settings-controller.d.ts index 4a5bef3d..37399bc3 100644 --- a/types/ext/settings-controller.d.ts +++ b/types/ext/settings-controller.d.ts @@ -15,9 +15,12 @@   * along with this program.  If not, see <https://www.gnu.org/licenses/>.   */ +import type * as Core from './core';  import type * as Settings from './settings';  import type * as SettingsModifications from './settings-modifications'; -import type * as Core from './core'; +import type {DictionaryController} from '../../ext/js/pages/settings/dictionary-controller'; +import type {ScanInputsController} from '../../ext/js/pages/settings/scan-inputs-controller'; +import type {ScanInputsSimpleController} from '../../ext/js/pages/settings/scan-inputs-simple-controller';  export type PageExitPrevention = {      end: () => void; diff --git a/types/ext/text-scanner.d.ts b/types/ext/text-scanner.d.ts index 494c1a52..5ff62819 100644 --- a/types/ext/text-scanner.d.ts +++ b/types/ext/text-scanner.d.ts @@ -20,6 +20,7 @@ import type * as Display from './display';  import type * as Input from './input';  import type * as Settings from './settings';  import type * as TextSource from './text-source'; +import type {TextScanner} from '../../ext/js/language/text-scanner';  export type SearchResultDetail = {      documentTitle: string; diff --git a/types/ext/text-source.d.ts b/types/ext/text-source.d.ts index 37c65bd9..7e085176 100644 --- a/types/ext/text-source.d.ts +++ b/types/ext/text-source.d.ts @@ -15,4 +15,7 @@   * along with this program.  If not, see <https://www.gnu.org/licenses/>.   */ +import type {TextSourceElement} from '../../ext/js/dom/text-source-element'; +import type {TextSourceRange} from '../../ext/js/dom/text-source-range'; +  export type TextSource = TextSourceRange | TextSourceElement; diff --git a/types/ext/translator.d.ts b/types/ext/translator.d.ts index e7d45295..838ae171 100644 --- a/types/ext/translator.d.ts +++ b/types/ext/translator.d.ts @@ -16,7 +16,9 @@   */  import type * as Dictionary from './dictionary'; -import type * as DictionaryDatabase from './dictionary-database'; +import type * as DictionaryDatabaseTypes from './dictionary-database'; +import type {DictionaryDatabase} from '../../ext/js/language/dictionary-database'; +import type {JapaneseUtil} from '../../ext/js/language/sandbox/japanese-util';  export type ConstructorDetails = {      /** An instance of JapaneseUtil. */ @@ -57,7 +59,7 @@ export type TagExpansionTarget = {  export type DictionaryTagCache = Map<string, TagCache>; -export type TagCache = Map<string, DictionaryDatabase.Tag | null>; +export type TagCache = Map<string, DictionaryDatabaseTypes.Tag | null>;  export type TagTargetMap = Map<string, Map<string, TagTargetItem>>; @@ -66,7 +68,7 @@ export type TagTargetItem = {      dictionary: string;      tagName: string;      cache: TagCache | null; -    databaseTag: DictionaryDatabase.Tag | null; +    databaseTag: DictionaryDatabaseTypes.Tag | null;      targets: Dictionary.Tag[][];  }; |