Pārlūkot izejas kodu

Move window resolver from coreutils into apputils.

Afshin Darian 7 gadi atpakaļ
vecāks
revīzija
afe468685f

+ 3 - 3
packages/apputils-extension/src/index.ts

@@ -8,12 +8,12 @@ import {
 } from '@jupyterlab/application';
 
 import {
-  Dialog, ICommandPalette, ISplashScreen, IThemeManager, ThemeManager
+  Dialog, ICommandPalette, ISplashScreen, IThemeManager, IWindowResolver,
+  ThemeManager, WindowResolver
 } from '@jupyterlab/apputils';
 
 import {
-  DataConnector, ISettingRegistry, IStateDB, IWindowResolver, SettingRegistry,
-  StateDB, URLExt, WindowResolver
+  DataConnector, ISettingRegistry, IStateDB, SettingRegistry, StateDB, URLExt
 } from '@jupyterlab/coreutils';
 
 import {

+ 1 - 0
packages/apputils/src/index.ts

@@ -20,3 +20,4 @@ export * from './styling';
 export * from './thememanager';
 export * from './toolbar';
 export * from './vdom';
+export * from './windowresolver';

+ 1 - 6
packages/coreutils/src/windowresolver.ts → packages/apputils/src/windowresolver.ts

@@ -11,7 +11,7 @@ import {
  * The default window resolver token.
  */
 export
-const IWindowResolver = new Token<IWindowResolver>('@jupyterlab/coreutils:IWindowResolver');
+const IWindowResolver = new Token<IWindowResolver>('@jupyterlab/apputils:IWindowResolver');
 /* tslint:enable */
 
 
@@ -118,11 +118,6 @@ namespace Private {
    * Start the storage event handler.
    */
   function initialize(): void {
-    // If this library is not running in the browser, bail.
-    if (typeof window === 'undefined') {
-      return;
-    }
-
     // Listen to all storage events for beacons and window names.
     window.addEventListener('storage', (event: StorageEvent) => {
       const { key, newValue } = event;

+ 0 - 1
packages/coreutils/src/index.ts

@@ -14,4 +14,3 @@ export * from './text';
 export * from './time';
 export * from './url';
 export * from './uuid';
-export * from './windowresolver';