UNPKG

@difizen/mana-core

Version:

22 lines (20 loc) 2.15 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.IsWindowsContext = exports.IsWebContext = exports.IsMacNativeContext = exports.IsMacContext = exports.IsLinuxContext = exports.IsDevelopmentContext = exports.InputFocusedContextKey = exports.InputFocusedContext = void 0; var _manaCommon = require("@difizen/mana-common"); var _nls = require("../../nls"); var _contextkey = require("./contextkey"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ var IsMacContext = exports.IsMacContext = new _contextkey.RawContextKey('isMac', _manaCommon.isMacintosh, (0, _nls.localize)('isMac', 'Whether the operating system is macOS')); var IsLinuxContext = exports.IsLinuxContext = new _contextkey.RawContextKey('isLinux', _manaCommon.isLinux, (0, _nls.localize)('isLinux', 'Whether the operating system is Linux')); var IsWindowsContext = exports.IsWindowsContext = new _contextkey.RawContextKey('isWindows', _manaCommon.isWindows, (0, _nls.localize)('isWindows', 'Whether the operating system is Windows')); var IsWebContext = exports.IsWebContext = new _contextkey.RawContextKey('isWeb', _manaCommon.isWeb, (0, _nls.localize)('isWeb', 'Whether the platform is a web browser')); var IsMacNativeContext = exports.IsMacNativeContext = new _contextkey.RawContextKey('isMacNative', _manaCommon.isMacintosh && !_manaCommon.isWeb, (0, _nls.localize)('isMacNative', 'Whether the operating system is macOS on a non-browser platform')); var IsDevelopmentContext = exports.IsDevelopmentContext = new _contextkey.RawContextKey('isDevelopment', false, true); var InputFocusedContextKey = exports.InputFocusedContextKey = 'inputFocus'; var InputFocusedContext = exports.InputFocusedContext = new _contextkey.RawContextKey(InputFocusedContextKey, false, (0, _nls.localize)('inputFocus', 'Whether keyboard focus is inside an input box'));