@difizen/mana-core
Version:
16 lines (15 loc) • 1.5 kB
JavaScript
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { isMacintosh, isLinux, isWindows, isWeb } from '@difizen/mana-common';
import { localize } from "../../nls";
import { RawContextKey } from "./contextkey";
export var IsMacContext = new RawContextKey('isMac', isMacintosh, localize('isMac', 'Whether the operating system is macOS'));
export var IsLinuxContext = new RawContextKey('isLinux', isLinux, localize('isLinux', 'Whether the operating system is Linux'));
export var IsWindowsContext = new RawContextKey('isWindows', isWindows, localize('isWindows', 'Whether the operating system is Windows'));
export var IsWebContext = new RawContextKey('isWeb', isWeb, localize('isWeb', 'Whether the platform is a web browser'));
export var IsMacNativeContext = new RawContextKey('isMacNative', isMacintosh && !isWeb, localize('isMacNative', 'Whether the operating system is macOS on a non-browser platform'));
export var IsDevelopmentContext = new RawContextKey('isDevelopment', false, true);
export var InputFocusedContextKey = 'inputFocus';
export var InputFocusedContext = new RawContextKey(InputFocusedContextKey, false, localize('inputFocus', 'Whether keyboard focus is inside an input box'));