@codingame/monaco-vscode-api 1.69.0 → 1.69.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/dist/configuration.js +179 -6
- package/dist/contextkey.js +387 -0
- package/dist/extHost.js +3 -2
- package/dist/files.js +226 -226
- package/dist/keybindings.js +2 -2
- package/dist/languageConfiguration.d.ts +1 -151
- package/dist/languageConfiguration.js +7 -11
- package/dist/languageService.js +2 -2
- package/dist/messages.js +6 -6
- package/dist/missing-services.js +507 -378
- package/dist/modelEditor.js +2 -2
- package/dist/monaco.d.ts +236 -99
- package/dist/monaco.js +25 -6
- package/dist/services.d.ts +19 -1
- package/dist/services.js +1 -0
- package/dist/services2.js +1 -1
- package/dist/snippets.js +10 -49
- package/dist/textmate.d.ts +3 -2
- package/dist/textmate.js +8 -9
- package/dist/theme.d.ts +4 -3
- package/dist/theme.js +2 -2
- package/dist/tokenClassification.js +5 -7
- package/dist/tools.js +16 -2
- package/dist/workspaceContext.js +49 -0
- package/package.json +7 -7
- package/dist/tslib.es6.js +0 -21
package/dist/missing-services.js
CHANGED
|
@@ -6,7 +6,7 @@ import { mixin, equals, deepClone, deepFreeze } from 'monaco-editor/esm/vs/base/
|
|
|
6
6
|
import { RunOnceScheduler, Promises, timeout } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
7
7
|
import { trackFocus, show, hide, createStyleSheet } from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
8
8
|
import { isNumber, isObject as isObject$1, isUndefinedOrNull as isUndefinedOrNull$1 } from 'monaco-editor/esm/vs/base/common/types.js';
|
|
9
|
-
import { Color } from 'monaco-editor/esm/vs/base/common/color.js';
|
|
9
|
+
import { Color as Color$1 } from 'monaco-editor/esm/vs/base/common/color.js';
|
|
10
10
|
import { LanguageService as LanguageService$1 } from 'monaco-editor/esm/vs/editor/common/services/languageService.js';
|
|
11
11
|
import { LanguagesRegistry as LanguagesRegistry$1 } from 'monaco-editor/esm/vs/editor/common/services/languagesRegistry.js';
|
|
12
12
|
import { firstOrDefault, distinct, equals as equals$1, binarySearch, range } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
@@ -20,8 +20,8 @@ import { DefaultConfigurationModel } from 'monaco-editor/esm/vs/platform/configu
|
|
|
20
20
|
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
21
21
|
import { TernarySearchTree as TernarySearchTree$1, ResourceMap as ResourceMap$1 } from 'monaco-editor/esm/vs/base/common/map.js';
|
|
22
22
|
import { compare, regExpLeadsToEndlessLoop, compareIgnoreCase, compareSubstring, compareSubstringIgnoreCase } from 'monaco-editor/esm/vs/base/common/strings.js';
|
|
23
|
-
import { RawContextKey
|
|
24
|
-
import {
|
|
23
|
+
import { RawContextKey, ContextKeyExpr, ContextKeyDefinedExpr, IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
24
|
+
import { _ as __decorate, a as __param, R as RawContextKey$1 } from './contextkey.js';
|
|
25
25
|
import { ErrorHandler as ErrorHandler$1, onUnexpectedError, CancellationError } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
26
26
|
import { clearPlatformLanguageAssociations, registerPlatformLanguageAssociation, getLanguageIds } from 'monaco-editor/esm/vs/editor/common/services/languagesAssociations.js';
|
|
27
27
|
import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
@@ -35,6 +35,7 @@ import { DomEmitter, stopEvent } from 'monaco-editor/esm/vs/base/browser/event.j
|
|
|
35
35
|
import { StandardKeyboardEvent } from 'monaco-editor/esm/vs/base/browser/keyboardEvent.js';
|
|
36
36
|
import { ListError } from 'monaco-editor/esm/vs/base/browser/ui/list/list.js';
|
|
37
37
|
import { clamp } from 'monaco-editor/esm/vs/base/common/numbers.js';
|
|
38
|
+
import { OS, isMacintosh } from 'monaco-editor/esm/vs/base/common/platform.js';
|
|
38
39
|
import { alert } from 'monaco-editor/esm/vs/base/browser/ui/aria/aria.js';
|
|
39
40
|
import { matchesPrefix } from 'monaco-editor/esm/vs/base/common/filters.js';
|
|
40
41
|
import { Gesture } from 'monaco-editor/esm/vs/base/browser/touch.js';
|
|
@@ -42,7 +43,6 @@ import { SnippetParser } from 'monaco-editor/esm/vs/editor/contrib/snippet/brows
|
|
|
42
43
|
import { QuickInputController } from 'monaco-editor/esm/vs/base/parts/quickinput/browser/quickInput.js';
|
|
43
44
|
import { getSingletonServiceDescriptors, registerSingleton } from 'monaco-editor/esm/vs/platform/instantiation/common/extensions.js';
|
|
44
45
|
import { ILabelService } from 'monaco-editor/esm/vs/platform/label/common/label.js';
|
|
45
|
-
import { _ as __decorate, a as __param } from './tslib.es6.js';
|
|
46
46
|
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
|
|
47
47
|
import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
48
48
|
import { ExtensionIdentifier } from 'monaco-editor/esm/vs/platform/extensions/common/extensions.js';
|
|
@@ -1009,7 +1009,7 @@ const CSS_INFINITE = 'infinite';
|
|
|
1009
1009
|
const CSS_INFINITE_LONG_RUNNING = 'infinite-long-running';
|
|
1010
1010
|
const CSS_DISCRETE = 'discrete';
|
|
1011
1011
|
const defaultOpts = {
|
|
1012
|
-
progressBarBackground: ( (Color.fromHex('#0E70C0')))
|
|
1012
|
+
progressBarBackground: ( (Color$1.fromHex('#0E70C0')))
|
|
1013
1013
|
};
|
|
1014
1014
|
class ProgressBar extends Disposable {
|
|
1015
1015
|
constructor(container, options) {
|
|
@@ -3414,362 +3414,6 @@ function compareConfigurationContents(to, from) {
|
|
|
3414
3414
|
}
|
|
3415
3415
|
return { added, removed, updated };
|
|
3416
3416
|
}
|
|
3417
|
-
const CONSTANT_VALUES = ( (new Map()));
|
|
3418
|
-
CONSTANT_VALUES.set('false', false);
|
|
3419
|
-
CONSTANT_VALUES.set('true', true);
|
|
3420
|
-
CONSTANT_VALUES.set('isMac', isMacintosh);
|
|
3421
|
-
CONSTANT_VALUES.set('isLinux', isLinux);
|
|
3422
|
-
CONSTANT_VALUES.set('isWindows', isWindows);
|
|
3423
|
-
CONSTANT_VALUES.set('isWeb', isWeb);
|
|
3424
|
-
CONSTANT_VALUES.set('isMacNative', isMacintosh && !isWeb);
|
|
3425
|
-
CONSTANT_VALUES.set('isEdge', isEdge);
|
|
3426
|
-
CONSTANT_VALUES.set('isFirefox', isFirefox);
|
|
3427
|
-
CONSTANT_VALUES.set('isChrome', isChrome);
|
|
3428
|
-
CONSTANT_VALUES.set('isSafari', isSafari);
|
|
3429
|
-
class ContextKeyFalseExpr {
|
|
3430
|
-
constructor() {
|
|
3431
|
-
this.type = 0 ;
|
|
3432
|
-
}
|
|
3433
|
-
cmp(other) {
|
|
3434
|
-
return this.type - other.type;
|
|
3435
|
-
}
|
|
3436
|
-
equals(other) {
|
|
3437
|
-
return (other.type === this.type);
|
|
3438
|
-
}
|
|
3439
|
-
substituteConstants() {
|
|
3440
|
-
return this;
|
|
3441
|
-
}
|
|
3442
|
-
evaluate(context) {
|
|
3443
|
-
return false;
|
|
3444
|
-
}
|
|
3445
|
-
serialize() {
|
|
3446
|
-
return 'false';
|
|
3447
|
-
}
|
|
3448
|
-
keys() {
|
|
3449
|
-
return [];
|
|
3450
|
-
}
|
|
3451
|
-
map(mapFnc) {
|
|
3452
|
-
return this;
|
|
3453
|
-
}
|
|
3454
|
-
negate() {
|
|
3455
|
-
return ContextKeyTrueExpr.INSTANCE;
|
|
3456
|
-
}
|
|
3457
|
-
}
|
|
3458
|
-
ContextKeyFalseExpr.INSTANCE = ( (new ContextKeyFalseExpr()));
|
|
3459
|
-
class ContextKeyTrueExpr {
|
|
3460
|
-
constructor() {
|
|
3461
|
-
this.type = 1 ;
|
|
3462
|
-
}
|
|
3463
|
-
cmp(other) {
|
|
3464
|
-
return this.type - other.type;
|
|
3465
|
-
}
|
|
3466
|
-
equals(other) {
|
|
3467
|
-
return (other.type === this.type);
|
|
3468
|
-
}
|
|
3469
|
-
substituteConstants() {
|
|
3470
|
-
return this;
|
|
3471
|
-
}
|
|
3472
|
-
evaluate(context) {
|
|
3473
|
-
return true;
|
|
3474
|
-
}
|
|
3475
|
-
serialize() {
|
|
3476
|
-
return 'true';
|
|
3477
|
-
}
|
|
3478
|
-
keys() {
|
|
3479
|
-
return [];
|
|
3480
|
-
}
|
|
3481
|
-
map(mapFnc) {
|
|
3482
|
-
return this;
|
|
3483
|
-
}
|
|
3484
|
-
negate() {
|
|
3485
|
-
return ContextKeyFalseExpr.INSTANCE;
|
|
3486
|
-
}
|
|
3487
|
-
}
|
|
3488
|
-
ContextKeyTrueExpr.INSTANCE = ( (new ContextKeyTrueExpr()));
|
|
3489
|
-
class ContextKeyDefinedExpr {
|
|
3490
|
-
constructor(key, negated) {
|
|
3491
|
-
this.key = key;
|
|
3492
|
-
this.negated = negated;
|
|
3493
|
-
this.type = 2 ;
|
|
3494
|
-
}
|
|
3495
|
-
static create(key, negated = null) {
|
|
3496
|
-
const constantValue = CONSTANT_VALUES.get(key);
|
|
3497
|
-
if (typeof constantValue === 'boolean') {
|
|
3498
|
-
return constantValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE;
|
|
3499
|
-
}
|
|
3500
|
-
return (
|
|
3501
|
-
(new ContextKeyDefinedExpr(key, negated))
|
|
3502
|
-
);
|
|
3503
|
-
}
|
|
3504
|
-
cmp(other) {
|
|
3505
|
-
if (other.type !== this.type) {
|
|
3506
|
-
return this.type - other.type;
|
|
3507
|
-
}
|
|
3508
|
-
return cmp1(this.key, other.key);
|
|
3509
|
-
}
|
|
3510
|
-
equals(other) {
|
|
3511
|
-
if (other.type === this.type) {
|
|
3512
|
-
return (this.key === other.key);
|
|
3513
|
-
}
|
|
3514
|
-
return false;
|
|
3515
|
-
}
|
|
3516
|
-
substituteConstants() {
|
|
3517
|
-
const constantValue = CONSTANT_VALUES.get(this.key);
|
|
3518
|
-
if (typeof constantValue === 'boolean') {
|
|
3519
|
-
return constantValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE;
|
|
3520
|
-
}
|
|
3521
|
-
return this;
|
|
3522
|
-
}
|
|
3523
|
-
evaluate(context) {
|
|
3524
|
-
return (!!context.getValue(this.key));
|
|
3525
|
-
}
|
|
3526
|
-
serialize() {
|
|
3527
|
-
return this.key;
|
|
3528
|
-
}
|
|
3529
|
-
keys() {
|
|
3530
|
-
return [this.key];
|
|
3531
|
-
}
|
|
3532
|
-
map(mapFnc) {
|
|
3533
|
-
return mapFnc.mapDefined(this.key);
|
|
3534
|
-
}
|
|
3535
|
-
negate() {
|
|
3536
|
-
if (!this.negated) {
|
|
3537
|
-
this.negated = ContextKeyNotExpr.create(this.key, this);
|
|
3538
|
-
}
|
|
3539
|
-
return this.negated;
|
|
3540
|
-
}
|
|
3541
|
-
}
|
|
3542
|
-
class ContextKeyEqualsExpr {
|
|
3543
|
-
constructor(key, value, negated) {
|
|
3544
|
-
this.key = key;
|
|
3545
|
-
this.value = value;
|
|
3546
|
-
this.negated = negated;
|
|
3547
|
-
this.type = 4 ;
|
|
3548
|
-
}
|
|
3549
|
-
static create(key, value, negated = null) {
|
|
3550
|
-
if (typeof value === 'boolean') {
|
|
3551
|
-
return (value ? ContextKeyDefinedExpr.create(key, negated) : ContextKeyNotExpr.create(key, negated));
|
|
3552
|
-
}
|
|
3553
|
-
const constantValue = CONSTANT_VALUES.get(key);
|
|
3554
|
-
if (typeof constantValue === 'boolean') {
|
|
3555
|
-
const trueValue = constantValue ? 'true' : 'false';
|
|
3556
|
-
return (value === trueValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE);
|
|
3557
|
-
}
|
|
3558
|
-
return (
|
|
3559
|
-
(new ContextKeyEqualsExpr(key, value, negated))
|
|
3560
|
-
);
|
|
3561
|
-
}
|
|
3562
|
-
cmp(other) {
|
|
3563
|
-
if (other.type !== this.type) {
|
|
3564
|
-
return this.type - other.type;
|
|
3565
|
-
}
|
|
3566
|
-
return cmp2(this.key, this.value, other.key, other.value);
|
|
3567
|
-
}
|
|
3568
|
-
equals(other) {
|
|
3569
|
-
if (other.type === this.type) {
|
|
3570
|
-
return (this.key === other.key && this.value === other.value);
|
|
3571
|
-
}
|
|
3572
|
-
return false;
|
|
3573
|
-
}
|
|
3574
|
-
substituteConstants() {
|
|
3575
|
-
const constantValue = CONSTANT_VALUES.get(this.key);
|
|
3576
|
-
if (typeof constantValue === 'boolean') {
|
|
3577
|
-
const trueValue = constantValue ? 'true' : 'false';
|
|
3578
|
-
return (this.value === trueValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE);
|
|
3579
|
-
}
|
|
3580
|
-
return this;
|
|
3581
|
-
}
|
|
3582
|
-
evaluate(context) {
|
|
3583
|
-
return (context.getValue(this.key) == this.value);
|
|
3584
|
-
}
|
|
3585
|
-
serialize() {
|
|
3586
|
-
return `${this.key} == '${this.value}'`;
|
|
3587
|
-
}
|
|
3588
|
-
keys() {
|
|
3589
|
-
return [this.key];
|
|
3590
|
-
}
|
|
3591
|
-
map(mapFnc) {
|
|
3592
|
-
return mapFnc.mapEquals(this.key, this.value);
|
|
3593
|
-
}
|
|
3594
|
-
negate() {
|
|
3595
|
-
if (!this.negated) {
|
|
3596
|
-
this.negated = ContextKeyNotEqualsExpr.create(this.key, this.value, this);
|
|
3597
|
-
}
|
|
3598
|
-
return this.negated;
|
|
3599
|
-
}
|
|
3600
|
-
}
|
|
3601
|
-
class ContextKeyNotEqualsExpr {
|
|
3602
|
-
constructor(key, value, negated) {
|
|
3603
|
-
this.key = key;
|
|
3604
|
-
this.value = value;
|
|
3605
|
-
this.negated = negated;
|
|
3606
|
-
this.type = 5 ;
|
|
3607
|
-
}
|
|
3608
|
-
static create(key, value, negated = null) {
|
|
3609
|
-
if (typeof value === 'boolean') {
|
|
3610
|
-
if (value) {
|
|
3611
|
-
return ContextKeyNotExpr.create(key, negated);
|
|
3612
|
-
}
|
|
3613
|
-
return ContextKeyDefinedExpr.create(key, negated);
|
|
3614
|
-
}
|
|
3615
|
-
const constantValue = CONSTANT_VALUES.get(key);
|
|
3616
|
-
if (typeof constantValue === 'boolean') {
|
|
3617
|
-
const falseValue = constantValue ? 'true' : 'false';
|
|
3618
|
-
return (value === falseValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);
|
|
3619
|
-
}
|
|
3620
|
-
return (
|
|
3621
|
-
(new ContextKeyNotEqualsExpr(key, value, negated))
|
|
3622
|
-
);
|
|
3623
|
-
}
|
|
3624
|
-
cmp(other) {
|
|
3625
|
-
if (other.type !== this.type) {
|
|
3626
|
-
return this.type - other.type;
|
|
3627
|
-
}
|
|
3628
|
-
return cmp2(this.key, this.value, other.key, other.value);
|
|
3629
|
-
}
|
|
3630
|
-
equals(other) {
|
|
3631
|
-
if (other.type === this.type) {
|
|
3632
|
-
return (this.key === other.key && this.value === other.value);
|
|
3633
|
-
}
|
|
3634
|
-
return false;
|
|
3635
|
-
}
|
|
3636
|
-
substituteConstants() {
|
|
3637
|
-
const constantValue = CONSTANT_VALUES.get(this.key);
|
|
3638
|
-
if (typeof constantValue === 'boolean') {
|
|
3639
|
-
const falseValue = constantValue ? 'true' : 'false';
|
|
3640
|
-
return (this.value === falseValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);
|
|
3641
|
-
}
|
|
3642
|
-
return this;
|
|
3643
|
-
}
|
|
3644
|
-
evaluate(context) {
|
|
3645
|
-
return (context.getValue(this.key) != this.value);
|
|
3646
|
-
}
|
|
3647
|
-
serialize() {
|
|
3648
|
-
return `${this.key} != '${this.value}'`;
|
|
3649
|
-
}
|
|
3650
|
-
keys() {
|
|
3651
|
-
return [this.key];
|
|
3652
|
-
}
|
|
3653
|
-
map(mapFnc) {
|
|
3654
|
-
return mapFnc.mapNotEquals(this.key, this.value);
|
|
3655
|
-
}
|
|
3656
|
-
negate() {
|
|
3657
|
-
if (!this.negated) {
|
|
3658
|
-
this.negated = ContextKeyEqualsExpr.create(this.key, this.value, this);
|
|
3659
|
-
}
|
|
3660
|
-
return this.negated;
|
|
3661
|
-
}
|
|
3662
|
-
}
|
|
3663
|
-
class ContextKeyNotExpr {
|
|
3664
|
-
constructor(key, negated) {
|
|
3665
|
-
this.key = key;
|
|
3666
|
-
this.negated = negated;
|
|
3667
|
-
this.type = 3 ;
|
|
3668
|
-
}
|
|
3669
|
-
static create(key, negated = null) {
|
|
3670
|
-
const constantValue = CONSTANT_VALUES.get(key);
|
|
3671
|
-
if (typeof constantValue === 'boolean') {
|
|
3672
|
-
return (constantValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);
|
|
3673
|
-
}
|
|
3674
|
-
return (
|
|
3675
|
-
(new ContextKeyNotExpr(key, negated))
|
|
3676
|
-
);
|
|
3677
|
-
}
|
|
3678
|
-
cmp(other) {
|
|
3679
|
-
if (other.type !== this.type) {
|
|
3680
|
-
return this.type - other.type;
|
|
3681
|
-
}
|
|
3682
|
-
return cmp1(this.key, other.key);
|
|
3683
|
-
}
|
|
3684
|
-
equals(other) {
|
|
3685
|
-
if (other.type === this.type) {
|
|
3686
|
-
return (this.key === other.key);
|
|
3687
|
-
}
|
|
3688
|
-
return false;
|
|
3689
|
-
}
|
|
3690
|
-
substituteConstants() {
|
|
3691
|
-
const constantValue = CONSTANT_VALUES.get(this.key);
|
|
3692
|
-
if (typeof constantValue === 'boolean') {
|
|
3693
|
-
return (constantValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);
|
|
3694
|
-
}
|
|
3695
|
-
return this;
|
|
3696
|
-
}
|
|
3697
|
-
evaluate(context) {
|
|
3698
|
-
return (!context.getValue(this.key));
|
|
3699
|
-
}
|
|
3700
|
-
serialize() {
|
|
3701
|
-
return `!${this.key}`;
|
|
3702
|
-
}
|
|
3703
|
-
keys() {
|
|
3704
|
-
return [this.key];
|
|
3705
|
-
}
|
|
3706
|
-
map(mapFnc) {
|
|
3707
|
-
return mapFnc.mapNot(this.key);
|
|
3708
|
-
}
|
|
3709
|
-
negate() {
|
|
3710
|
-
if (!this.negated) {
|
|
3711
|
-
this.negated = ContextKeyDefinedExpr.create(this.key, this);
|
|
3712
|
-
}
|
|
3713
|
-
return this.negated;
|
|
3714
|
-
}
|
|
3715
|
-
}
|
|
3716
|
-
class RawContextKey extends ContextKeyDefinedExpr {
|
|
3717
|
-
constructor(key, defaultValue, metaOrHide) {
|
|
3718
|
-
super(key, null);
|
|
3719
|
-
this._defaultValue = defaultValue;
|
|
3720
|
-
if (typeof metaOrHide === 'object') {
|
|
3721
|
-
RawContextKey._info.push({ ...metaOrHide, key });
|
|
3722
|
-
}
|
|
3723
|
-
else if (metaOrHide !== true) {
|
|
3724
|
-
RawContextKey._info.push({ key, description: metaOrHide, type: defaultValue !== null && defaultValue !== undefined ? typeof defaultValue : undefined });
|
|
3725
|
-
}
|
|
3726
|
-
}
|
|
3727
|
-
static all() {
|
|
3728
|
-
return (
|
|
3729
|
-
(RawContextKey._info.values())
|
|
3730
|
-
);
|
|
3731
|
-
}
|
|
3732
|
-
bindTo(target) {
|
|
3733
|
-
return target.createKey(this.key, this._defaultValue);
|
|
3734
|
-
}
|
|
3735
|
-
getValue(target) {
|
|
3736
|
-
return target.getContextKeyValue(this.key);
|
|
3737
|
-
}
|
|
3738
|
-
toNegated() {
|
|
3739
|
-
return this.negate();
|
|
3740
|
-
}
|
|
3741
|
-
isEqualTo(value) {
|
|
3742
|
-
return ContextKeyEqualsExpr.create(this.key, value);
|
|
3743
|
-
}
|
|
3744
|
-
notEqualsTo(value) {
|
|
3745
|
-
return ContextKeyNotEqualsExpr.create(this.key, value);
|
|
3746
|
-
}
|
|
3747
|
-
}
|
|
3748
|
-
RawContextKey._info = [];
|
|
3749
|
-
function cmp1(key1, key2) {
|
|
3750
|
-
if (key1 < key2) {
|
|
3751
|
-
return -1;
|
|
3752
|
-
}
|
|
3753
|
-
if (key1 > key2) {
|
|
3754
|
-
return 1;
|
|
3755
|
-
}
|
|
3756
|
-
return 0;
|
|
3757
|
-
}
|
|
3758
|
-
function cmp2(key1, value1, key2, value2) {
|
|
3759
|
-
if (key1 < key2) {
|
|
3760
|
-
return -1;
|
|
3761
|
-
}
|
|
3762
|
-
if (key1 > key2) {
|
|
3763
|
-
return 1;
|
|
3764
|
-
}
|
|
3765
|
-
if (value1 < value2) {
|
|
3766
|
-
return -1;
|
|
3767
|
-
}
|
|
3768
|
-
if (value1 > value2) {
|
|
3769
|
-
return 1;
|
|
3770
|
-
}
|
|
3771
|
-
return 0;
|
|
3772
|
-
}
|
|
3773
3417
|
function isWorkspaceIdentifier(obj) {
|
|
3774
3418
|
const workspaceIdentifier = obj;
|
|
3775
3419
|
return typeof workspaceIdentifier?.id === 'string' && URI.isUri(workspaceIdentifier.configPath);
|
|
@@ -5054,20 +4698,20 @@ class DefaultStyleController {
|
|
|
5054
4698
|
}
|
|
5055
4699
|
}
|
|
5056
4700
|
const defaultStyles = {
|
|
5057
|
-
listFocusBackground: ( (Color.fromHex('#7FB0D0'))),
|
|
5058
|
-
listActiveSelectionBackground: ( (Color.fromHex('#0E639C'))),
|
|
5059
|
-
listActiveSelectionForeground: ( (Color.fromHex('#FFFFFF'))),
|
|
5060
|
-
listActiveSelectionIconForeground: ( (Color.fromHex('#FFFFFF'))),
|
|
5061
|
-
listFocusAndSelectionOutline: ( (Color.fromHex('#90C2F9'))),
|
|
5062
|
-
listFocusAndSelectionBackground: ( (Color.fromHex('#094771'))),
|
|
5063
|
-
listFocusAndSelectionForeground: ( (Color.fromHex('#FFFFFF'))),
|
|
5064
|
-
listInactiveSelectionBackground: ( (Color.fromHex('#3F3F46'))),
|
|
5065
|
-
listInactiveSelectionIconForeground: ( (Color.fromHex('#FFFFFF'))),
|
|
5066
|
-
listHoverBackground: ( (Color.fromHex('#2A2D2E'))),
|
|
5067
|
-
listDropBackground: ( (Color.fromHex('#383B3D'))),
|
|
5068
|
-
treeIndentGuidesStroke: ( (Color.fromHex('#a9a9a9'))),
|
|
5069
|
-
tableColumnsBorder: ( (( (Color.fromHex('#cccccc'))).transparent(0.2))),
|
|
5070
|
-
tableOddRowsBackgroundColor: ( (( (Color.fromHex('#cccccc'))).transparent(0.04)))
|
|
4701
|
+
listFocusBackground: ( (Color$1.fromHex('#7FB0D0'))),
|
|
4702
|
+
listActiveSelectionBackground: ( (Color$1.fromHex('#0E639C'))),
|
|
4703
|
+
listActiveSelectionForeground: ( (Color$1.fromHex('#FFFFFF'))),
|
|
4704
|
+
listActiveSelectionIconForeground: ( (Color$1.fromHex('#FFFFFF'))),
|
|
4705
|
+
listFocusAndSelectionOutline: ( (Color$1.fromHex('#90C2F9'))),
|
|
4706
|
+
listFocusAndSelectionBackground: ( (Color$1.fromHex('#094771'))),
|
|
4707
|
+
listFocusAndSelectionForeground: ( (Color$1.fromHex('#FFFFFF'))),
|
|
4708
|
+
listInactiveSelectionBackground: ( (Color$1.fromHex('#3F3F46'))),
|
|
4709
|
+
listInactiveSelectionIconForeground: ( (Color$1.fromHex('#FFFFFF'))),
|
|
4710
|
+
listHoverBackground: ( (Color$1.fromHex('#2A2D2E'))),
|
|
4711
|
+
listDropBackground: ( (Color$1.fromHex('#383B3D'))),
|
|
4712
|
+
treeIndentGuidesStroke: ( (Color$1.fromHex('#a9a9a9'))),
|
|
4713
|
+
tableColumnsBorder: ( (( (Color$1.fromHex('#cccccc'))).transparent(0.2))),
|
|
4714
|
+
tableOddRowsBackgroundColor: ( (( (Color$1.fromHex('#cccccc'))).transparent(0.04)))
|
|
5071
4715
|
};
|
|
5072
4716
|
const DefaultOptions = {
|
|
5073
4717
|
keyboardSupport: true,
|
|
@@ -5713,6 +5357,490 @@ class List {
|
|
|
5713
5357
|
this._onDidDispose.dispose();
|
|
5714
5358
|
}
|
|
5715
5359
|
}
|
|
5360
|
+
function roundFloat(number, decimalPoints) {
|
|
5361
|
+
const decimal = Math.pow(10, decimalPoints);
|
|
5362
|
+
return Math.round(number * decimal) / decimal;
|
|
5363
|
+
}
|
|
5364
|
+
class RGBA {
|
|
5365
|
+
constructor(r, g, b, a = 1) {
|
|
5366
|
+
this._rgbaBrand = undefined;
|
|
5367
|
+
this.r = Math.min(255, Math.max(0, r)) | 0;
|
|
5368
|
+
this.g = Math.min(255, Math.max(0, g)) | 0;
|
|
5369
|
+
this.b = Math.min(255, Math.max(0, b)) | 0;
|
|
5370
|
+
this.a = roundFloat(Math.max(Math.min(1, a), 0), 3);
|
|
5371
|
+
}
|
|
5372
|
+
static equals(a, b) {
|
|
5373
|
+
return a.r === b.r && a.g === b.g && a.b === b.b && a.a === b.a;
|
|
5374
|
+
}
|
|
5375
|
+
}
|
|
5376
|
+
class HSLA {
|
|
5377
|
+
constructor(h, s, l, a) {
|
|
5378
|
+
this._hslaBrand = undefined;
|
|
5379
|
+
this.h = Math.max(Math.min(360, h), 0) | 0;
|
|
5380
|
+
this.s = roundFloat(Math.max(Math.min(1, s), 0), 3);
|
|
5381
|
+
this.l = roundFloat(Math.max(Math.min(1, l), 0), 3);
|
|
5382
|
+
this.a = roundFloat(Math.max(Math.min(1, a), 0), 3);
|
|
5383
|
+
}
|
|
5384
|
+
static equals(a, b) {
|
|
5385
|
+
return a.h === b.h && a.s === b.s && a.l === b.l && a.a === b.a;
|
|
5386
|
+
}
|
|
5387
|
+
static fromRGBA(rgba) {
|
|
5388
|
+
const r = rgba.r / 255;
|
|
5389
|
+
const g = rgba.g / 255;
|
|
5390
|
+
const b = rgba.b / 255;
|
|
5391
|
+
const a = rgba.a;
|
|
5392
|
+
const max = Math.max(r, g, b);
|
|
5393
|
+
const min = Math.min(r, g, b);
|
|
5394
|
+
let h = 0;
|
|
5395
|
+
let s = 0;
|
|
5396
|
+
const l = (min + max) / 2;
|
|
5397
|
+
const chroma = max - min;
|
|
5398
|
+
if (chroma > 0) {
|
|
5399
|
+
s = Math.min((l <= 0.5 ? chroma / (2 * l) : chroma / (2 - (2 * l))), 1);
|
|
5400
|
+
switch (max) {
|
|
5401
|
+
case r:
|
|
5402
|
+
h = (g - b) / chroma + (g < b ? 6 : 0);
|
|
5403
|
+
break;
|
|
5404
|
+
case g:
|
|
5405
|
+
h = (b - r) / chroma + 2;
|
|
5406
|
+
break;
|
|
5407
|
+
case b:
|
|
5408
|
+
h = (r - g) / chroma + 4;
|
|
5409
|
+
break;
|
|
5410
|
+
}
|
|
5411
|
+
h *= 60;
|
|
5412
|
+
h = Math.round(h);
|
|
5413
|
+
}
|
|
5414
|
+
return (
|
|
5415
|
+
(new HSLA(h, s, l, a))
|
|
5416
|
+
);
|
|
5417
|
+
}
|
|
5418
|
+
static _hue2rgb(p, q, t) {
|
|
5419
|
+
if (t < 0) {
|
|
5420
|
+
t += 1;
|
|
5421
|
+
}
|
|
5422
|
+
if (t > 1) {
|
|
5423
|
+
t -= 1;
|
|
5424
|
+
}
|
|
5425
|
+
if (t < 1 / 6) {
|
|
5426
|
+
return p + (q - p) * 6 * t;
|
|
5427
|
+
}
|
|
5428
|
+
if (t < 1 / 2) {
|
|
5429
|
+
return q;
|
|
5430
|
+
}
|
|
5431
|
+
if (t < 2 / 3) {
|
|
5432
|
+
return p + (q - p) * (2 / 3 - t) * 6;
|
|
5433
|
+
}
|
|
5434
|
+
return p;
|
|
5435
|
+
}
|
|
5436
|
+
static toRGBA(hsla) {
|
|
5437
|
+
const h = hsla.h / 360;
|
|
5438
|
+
const { s, l, a } = hsla;
|
|
5439
|
+
let r, g, b;
|
|
5440
|
+
if (s === 0) {
|
|
5441
|
+
r = g = b = l;
|
|
5442
|
+
}
|
|
5443
|
+
else {
|
|
5444
|
+
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
5445
|
+
const p = 2 * l - q;
|
|
5446
|
+
r = HSLA._hue2rgb(p, q, h + 1 / 3);
|
|
5447
|
+
g = HSLA._hue2rgb(p, q, h);
|
|
5448
|
+
b = HSLA._hue2rgb(p, q, h - 1 / 3);
|
|
5449
|
+
}
|
|
5450
|
+
return (
|
|
5451
|
+
(new RGBA(Math.round(r * 255), Math.round(g * 255), Math.round(b * 255), a))
|
|
5452
|
+
);
|
|
5453
|
+
}
|
|
5454
|
+
}
|
|
5455
|
+
class HSVA {
|
|
5456
|
+
constructor(h, s, v, a) {
|
|
5457
|
+
this._hsvaBrand = undefined;
|
|
5458
|
+
this.h = Math.max(Math.min(360, h), 0) | 0;
|
|
5459
|
+
this.s = roundFloat(Math.max(Math.min(1, s), 0), 3);
|
|
5460
|
+
this.v = roundFloat(Math.max(Math.min(1, v), 0), 3);
|
|
5461
|
+
this.a = roundFloat(Math.max(Math.min(1, a), 0), 3);
|
|
5462
|
+
}
|
|
5463
|
+
static equals(a, b) {
|
|
5464
|
+
return a.h === b.h && a.s === b.s && a.v === b.v && a.a === b.a;
|
|
5465
|
+
}
|
|
5466
|
+
static fromRGBA(rgba) {
|
|
5467
|
+
const r = rgba.r / 255;
|
|
5468
|
+
const g = rgba.g / 255;
|
|
5469
|
+
const b = rgba.b / 255;
|
|
5470
|
+
const cmax = Math.max(r, g, b);
|
|
5471
|
+
const cmin = Math.min(r, g, b);
|
|
5472
|
+
const delta = cmax - cmin;
|
|
5473
|
+
const s = cmax === 0 ? 0 : (delta / cmax);
|
|
5474
|
+
let m;
|
|
5475
|
+
if (delta === 0) {
|
|
5476
|
+
m = 0;
|
|
5477
|
+
}
|
|
5478
|
+
else if (cmax === r) {
|
|
5479
|
+
m = ((((g - b) / delta) % 6) + 6) % 6;
|
|
5480
|
+
}
|
|
5481
|
+
else if (cmax === g) {
|
|
5482
|
+
m = ((b - r) / delta) + 2;
|
|
5483
|
+
}
|
|
5484
|
+
else {
|
|
5485
|
+
m = ((r - g) / delta) + 4;
|
|
5486
|
+
}
|
|
5487
|
+
return (
|
|
5488
|
+
(new HSVA(Math.round(m * 60), s, cmax, rgba.a))
|
|
5489
|
+
);
|
|
5490
|
+
}
|
|
5491
|
+
static toRGBA(hsva) {
|
|
5492
|
+
const { h, s, v, a } = hsva;
|
|
5493
|
+
const c = v * s;
|
|
5494
|
+
const x = c * (1 - Math.abs((h / 60) % 2 - 1));
|
|
5495
|
+
const m = v - c;
|
|
5496
|
+
let [r, g, b] = [0, 0, 0];
|
|
5497
|
+
if (h < 60) {
|
|
5498
|
+
r = c;
|
|
5499
|
+
g = x;
|
|
5500
|
+
}
|
|
5501
|
+
else if (h < 120) {
|
|
5502
|
+
r = x;
|
|
5503
|
+
g = c;
|
|
5504
|
+
}
|
|
5505
|
+
else if (h < 180) {
|
|
5506
|
+
g = c;
|
|
5507
|
+
b = x;
|
|
5508
|
+
}
|
|
5509
|
+
else if (h < 240) {
|
|
5510
|
+
g = x;
|
|
5511
|
+
b = c;
|
|
5512
|
+
}
|
|
5513
|
+
else if (h < 300) {
|
|
5514
|
+
r = x;
|
|
5515
|
+
b = c;
|
|
5516
|
+
}
|
|
5517
|
+
else if (h <= 360) {
|
|
5518
|
+
r = c;
|
|
5519
|
+
b = x;
|
|
5520
|
+
}
|
|
5521
|
+
r = Math.round((r + m) * 255);
|
|
5522
|
+
g = Math.round((g + m) * 255);
|
|
5523
|
+
b = Math.round((b + m) * 255);
|
|
5524
|
+
return (
|
|
5525
|
+
(new RGBA(r, g, b, a))
|
|
5526
|
+
);
|
|
5527
|
+
}
|
|
5528
|
+
}
|
|
5529
|
+
class Color {
|
|
5530
|
+
constructor(arg) {
|
|
5531
|
+
if (!arg) {
|
|
5532
|
+
throw new Error('Color needs a value');
|
|
5533
|
+
}
|
|
5534
|
+
else if (arg instanceof RGBA) {
|
|
5535
|
+
this.rgba = arg;
|
|
5536
|
+
}
|
|
5537
|
+
else if (arg instanceof HSLA) {
|
|
5538
|
+
this._hsla = arg;
|
|
5539
|
+
this.rgba = HSLA.toRGBA(arg);
|
|
5540
|
+
}
|
|
5541
|
+
else if (arg instanceof HSVA) {
|
|
5542
|
+
this._hsva = arg;
|
|
5543
|
+
this.rgba = HSVA.toRGBA(arg);
|
|
5544
|
+
}
|
|
5545
|
+
else {
|
|
5546
|
+
throw new Error('Invalid color ctor argument');
|
|
5547
|
+
}
|
|
5548
|
+
}
|
|
5549
|
+
static fromHex(hex) {
|
|
5550
|
+
return Color.Format.CSS.parseHex(hex) || Color.red;
|
|
5551
|
+
}
|
|
5552
|
+
get hsla() {
|
|
5553
|
+
if (this._hsla) {
|
|
5554
|
+
return this._hsla;
|
|
5555
|
+
}
|
|
5556
|
+
else {
|
|
5557
|
+
return HSLA.fromRGBA(this.rgba);
|
|
5558
|
+
}
|
|
5559
|
+
}
|
|
5560
|
+
get hsva() {
|
|
5561
|
+
if (this._hsva) {
|
|
5562
|
+
return this._hsva;
|
|
5563
|
+
}
|
|
5564
|
+
return HSVA.fromRGBA(this.rgba);
|
|
5565
|
+
}
|
|
5566
|
+
equals(other) {
|
|
5567
|
+
return !!other && RGBA.equals(this.rgba, other.rgba) && HSLA.equals(this.hsla, other.hsla) && HSVA.equals(this.hsva, other.hsva);
|
|
5568
|
+
}
|
|
5569
|
+
getRelativeLuminance() {
|
|
5570
|
+
const R = Color._relativeLuminanceForComponent(this.rgba.r);
|
|
5571
|
+
const G = Color._relativeLuminanceForComponent(this.rgba.g);
|
|
5572
|
+
const B = Color._relativeLuminanceForComponent(this.rgba.b);
|
|
5573
|
+
const luminance = 0.2126 * R + 0.7152 * G + 0.0722 * B;
|
|
5574
|
+
return roundFloat(luminance, 4);
|
|
5575
|
+
}
|
|
5576
|
+
static _relativeLuminanceForComponent(color) {
|
|
5577
|
+
const c = color / 255;
|
|
5578
|
+
return (c <= 0.03928) ? c / 12.92 : Math.pow(((c + 0.055) / 1.055), 2.4);
|
|
5579
|
+
}
|
|
5580
|
+
getContrastRatio(another) {
|
|
5581
|
+
const lum1 = this.getRelativeLuminance();
|
|
5582
|
+
const lum2 = another.getRelativeLuminance();
|
|
5583
|
+
return lum1 > lum2 ? (lum1 + 0.05) / (lum2 + 0.05) : (lum2 + 0.05) / (lum1 + 0.05);
|
|
5584
|
+
}
|
|
5585
|
+
isDarker() {
|
|
5586
|
+
const yiq = (this.rgba.r * 299 + this.rgba.g * 587 + this.rgba.b * 114) / 1000;
|
|
5587
|
+
return yiq < 128;
|
|
5588
|
+
}
|
|
5589
|
+
isLighter() {
|
|
5590
|
+
const yiq = (this.rgba.r * 299 + this.rgba.g * 587 + this.rgba.b * 114) / 1000;
|
|
5591
|
+
return yiq >= 128;
|
|
5592
|
+
}
|
|
5593
|
+
isLighterThan(another) {
|
|
5594
|
+
const lum1 = this.getRelativeLuminance();
|
|
5595
|
+
const lum2 = another.getRelativeLuminance();
|
|
5596
|
+
return lum1 > lum2;
|
|
5597
|
+
}
|
|
5598
|
+
isDarkerThan(another) {
|
|
5599
|
+
const lum1 = this.getRelativeLuminance();
|
|
5600
|
+
const lum2 = another.getRelativeLuminance();
|
|
5601
|
+
return lum1 < lum2;
|
|
5602
|
+
}
|
|
5603
|
+
lighten(factor) {
|
|
5604
|
+
return (
|
|
5605
|
+
(new Color(
|
|
5606
|
+
(new HSLA(this.hsla.h, this.hsla.s, this.hsla.l + this.hsla.l * factor, this.hsla.a))
|
|
5607
|
+
))
|
|
5608
|
+
);
|
|
5609
|
+
}
|
|
5610
|
+
darken(factor) {
|
|
5611
|
+
return (
|
|
5612
|
+
(new Color(
|
|
5613
|
+
(new HSLA(this.hsla.h, this.hsla.s, this.hsla.l - this.hsla.l * factor, this.hsla.a))
|
|
5614
|
+
))
|
|
5615
|
+
);
|
|
5616
|
+
}
|
|
5617
|
+
transparent(factor) {
|
|
5618
|
+
const { r, g, b, a } = this.rgba;
|
|
5619
|
+
return (
|
|
5620
|
+
(new Color( (new RGBA(r, g, b, a * factor))))
|
|
5621
|
+
);
|
|
5622
|
+
}
|
|
5623
|
+
isTransparent() {
|
|
5624
|
+
return this.rgba.a === 0;
|
|
5625
|
+
}
|
|
5626
|
+
isOpaque() {
|
|
5627
|
+
return this.rgba.a === 1;
|
|
5628
|
+
}
|
|
5629
|
+
opposite() {
|
|
5630
|
+
return (
|
|
5631
|
+
(new Color(
|
|
5632
|
+
(new RGBA(255 - this.rgba.r, 255 - this.rgba.g, 255 - this.rgba.b, this.rgba.a))
|
|
5633
|
+
))
|
|
5634
|
+
);
|
|
5635
|
+
}
|
|
5636
|
+
blend(c) {
|
|
5637
|
+
const rgba = c.rgba;
|
|
5638
|
+
const thisA = this.rgba.a;
|
|
5639
|
+
const colorA = rgba.a;
|
|
5640
|
+
const a = thisA + colorA * (1 - thisA);
|
|
5641
|
+
if (a < 1e-6) {
|
|
5642
|
+
return Color.transparent;
|
|
5643
|
+
}
|
|
5644
|
+
const r = this.rgba.r * thisA / a + rgba.r * colorA * (1 - thisA) / a;
|
|
5645
|
+
const g = this.rgba.g * thisA / a + rgba.g * colorA * (1 - thisA) / a;
|
|
5646
|
+
const b = this.rgba.b * thisA / a + rgba.b * colorA * (1 - thisA) / a;
|
|
5647
|
+
return (
|
|
5648
|
+
(new Color( (new RGBA(r, g, b, a))))
|
|
5649
|
+
);
|
|
5650
|
+
}
|
|
5651
|
+
makeOpaque(opaqueBackground) {
|
|
5652
|
+
if (this.isOpaque() || opaqueBackground.rgba.a !== 1) {
|
|
5653
|
+
return this;
|
|
5654
|
+
}
|
|
5655
|
+
const { r, g, b, a } = this.rgba;
|
|
5656
|
+
return (
|
|
5657
|
+
(new Color( (new RGBA(
|
|
5658
|
+
opaqueBackground.rgba.r - a * (opaqueBackground.rgba.r - r),
|
|
5659
|
+
opaqueBackground.rgba.g - a * (opaqueBackground.rgba.g - g),
|
|
5660
|
+
opaqueBackground.rgba.b - a * (opaqueBackground.rgba.b - b),
|
|
5661
|
+
1
|
|
5662
|
+
))))
|
|
5663
|
+
);
|
|
5664
|
+
}
|
|
5665
|
+
flatten(...backgrounds) {
|
|
5666
|
+
const background = backgrounds.reduceRight((accumulator, color) => {
|
|
5667
|
+
return Color._flatten(color, accumulator);
|
|
5668
|
+
});
|
|
5669
|
+
return Color._flatten(this, background);
|
|
5670
|
+
}
|
|
5671
|
+
static _flatten(foreground, background) {
|
|
5672
|
+
const backgroundAlpha = 1 - foreground.rgba.a;
|
|
5673
|
+
return (
|
|
5674
|
+
(new Color( (new RGBA(
|
|
5675
|
+
backgroundAlpha * background.rgba.r + foreground.rgba.a * foreground.rgba.r,
|
|
5676
|
+
backgroundAlpha * background.rgba.g + foreground.rgba.a * foreground.rgba.g,
|
|
5677
|
+
backgroundAlpha * background.rgba.b + foreground.rgba.a * foreground.rgba.b
|
|
5678
|
+
))))
|
|
5679
|
+
);
|
|
5680
|
+
}
|
|
5681
|
+
toString() {
|
|
5682
|
+
if (!this._toString) {
|
|
5683
|
+
this._toString = Color.Format.CSS.format(this);
|
|
5684
|
+
}
|
|
5685
|
+
return this._toString;
|
|
5686
|
+
}
|
|
5687
|
+
static getLighterColor(of, relative, factor) {
|
|
5688
|
+
if (of.isLighterThan(relative)) {
|
|
5689
|
+
return of;
|
|
5690
|
+
}
|
|
5691
|
+
factor = factor ? factor : 0.5;
|
|
5692
|
+
const lum1 = of.getRelativeLuminance();
|
|
5693
|
+
const lum2 = relative.getRelativeLuminance();
|
|
5694
|
+
factor = factor * (lum2 - lum1) / lum2;
|
|
5695
|
+
return (
|
|
5696
|
+
(of.lighten(factor))
|
|
5697
|
+
);
|
|
5698
|
+
}
|
|
5699
|
+
static getDarkerColor(of, relative, factor) {
|
|
5700
|
+
if (of.isDarkerThan(relative)) {
|
|
5701
|
+
return of;
|
|
5702
|
+
}
|
|
5703
|
+
factor = factor ? factor : 0.5;
|
|
5704
|
+
const lum1 = of.getRelativeLuminance();
|
|
5705
|
+
const lum2 = relative.getRelativeLuminance();
|
|
5706
|
+
factor = factor * (lum1 - lum2) / lum1;
|
|
5707
|
+
return (
|
|
5708
|
+
(of.darken(factor))
|
|
5709
|
+
);
|
|
5710
|
+
}
|
|
5711
|
+
}
|
|
5712
|
+
Color.white = ( (new Color( (new RGBA(255, 255, 255, 1)))));
|
|
5713
|
+
Color.black = ( (new Color( (new RGBA(0, 0, 0, 1)))));
|
|
5714
|
+
Color.red = ( (new Color( (new RGBA(255, 0, 0, 1)))));
|
|
5715
|
+
Color.blue = ( (new Color( (new RGBA(0, 0, 255, 1)))));
|
|
5716
|
+
Color.green = ( (new Color( (new RGBA(0, 255, 0, 1)))));
|
|
5717
|
+
Color.cyan = ( (new Color( (new RGBA(0, 255, 255, 1)))));
|
|
5718
|
+
Color.lightgrey = ( (new Color( (new RGBA(211, 211, 211, 1)))));
|
|
5719
|
+
Color.transparent = ( (new Color( (new RGBA(0, 0, 0, 0)))));
|
|
5720
|
+
( ((function(Color) {
|
|
5721
|
+
( ((function(Format) {
|
|
5722
|
+
( ((function(CSS) {
|
|
5723
|
+
function formatRGB(color) {
|
|
5724
|
+
if (color.rgba.a === 1) {
|
|
5725
|
+
return `rgb(${color.rgba.r}, ${color.rgba.g}, ${color.rgba.b})`;
|
|
5726
|
+
}
|
|
5727
|
+
return Color.Format.CSS.formatRGBA(color);
|
|
5728
|
+
}
|
|
5729
|
+
CSS.formatRGB = formatRGB;
|
|
5730
|
+
function formatRGBA(color) {
|
|
5731
|
+
return `rgba(${color.rgba.r}, ${color.rgba.g}, ${color.rgba.b}, ${+(color.rgba.a).toFixed(2)})`;
|
|
5732
|
+
}
|
|
5733
|
+
CSS.formatRGBA = formatRGBA;
|
|
5734
|
+
function formatHSL(color) {
|
|
5735
|
+
if (color.hsla.a === 1) {
|
|
5736
|
+
return `hsl(${color.hsla.h}, ${(color.hsla.s * 100).toFixed(2)}%, ${(color.hsla.l * 100).toFixed(2)}%)`;
|
|
5737
|
+
}
|
|
5738
|
+
return Color.Format.CSS.formatHSLA(color);
|
|
5739
|
+
}
|
|
5740
|
+
CSS.formatHSL = formatHSL;
|
|
5741
|
+
function formatHSLA(color) {
|
|
5742
|
+
return `hsla(${color.hsla.h}, ${(color.hsla.s * 100).toFixed(2)}%, ${(color.hsla.l * 100).toFixed(2)}%, ${color.hsla.a.toFixed(2)})`;
|
|
5743
|
+
}
|
|
5744
|
+
CSS.formatHSLA = formatHSLA;
|
|
5745
|
+
function _toTwoDigitHex(n) {
|
|
5746
|
+
const r = ( (n.toString(16)));
|
|
5747
|
+
return r.length !== 2 ? '0' + r : r;
|
|
5748
|
+
}
|
|
5749
|
+
function formatHex(color) {
|
|
5750
|
+
return `#${_toTwoDigitHex(color.rgba.r)}${_toTwoDigitHex(color.rgba.g)}${_toTwoDigitHex(color.rgba.b)}`;
|
|
5751
|
+
}
|
|
5752
|
+
CSS.formatHex = formatHex;
|
|
5753
|
+
function formatHexA(color, compact = false) {
|
|
5754
|
+
if (compact && color.rgba.a === 1) {
|
|
5755
|
+
return Color.Format.CSS.formatHex(color);
|
|
5756
|
+
}
|
|
5757
|
+
return `#${_toTwoDigitHex(color.rgba.r)}${_toTwoDigitHex(color.rgba.g)}${_toTwoDigitHex(color.rgba.b)}${_toTwoDigitHex(Math.round(color.rgba.a * 255))}`;
|
|
5758
|
+
}
|
|
5759
|
+
CSS.formatHexA = formatHexA;
|
|
5760
|
+
function format(color) {
|
|
5761
|
+
if (color.isOpaque()) {
|
|
5762
|
+
return Color.Format.CSS.formatHex(color);
|
|
5763
|
+
}
|
|
5764
|
+
return Color.Format.CSS.formatRGBA(color);
|
|
5765
|
+
}
|
|
5766
|
+
CSS.format = format;
|
|
5767
|
+
function parseHex(hex) {
|
|
5768
|
+
const length = hex.length;
|
|
5769
|
+
if (length === 0) {
|
|
5770
|
+
return null;
|
|
5771
|
+
}
|
|
5772
|
+
if (hex.charCodeAt(0) !== 35 ) {
|
|
5773
|
+
return null;
|
|
5774
|
+
}
|
|
5775
|
+
if (length === 7) {
|
|
5776
|
+
const r = 16 * _parseHexDigit(hex.charCodeAt(1)) + _parseHexDigit(hex.charCodeAt(2));
|
|
5777
|
+
const g = 16 * _parseHexDigit(hex.charCodeAt(3)) + _parseHexDigit(hex.charCodeAt(4));
|
|
5778
|
+
const b = 16 * _parseHexDigit(hex.charCodeAt(5)) + _parseHexDigit(hex.charCodeAt(6));
|
|
5779
|
+
return (
|
|
5780
|
+
(new Color( (new RGBA(r, g, b, 1))))
|
|
5781
|
+
);
|
|
5782
|
+
}
|
|
5783
|
+
if (length === 9) {
|
|
5784
|
+
const r = 16 * _parseHexDigit(hex.charCodeAt(1)) + _parseHexDigit(hex.charCodeAt(2));
|
|
5785
|
+
const g = 16 * _parseHexDigit(hex.charCodeAt(3)) + _parseHexDigit(hex.charCodeAt(4));
|
|
5786
|
+
const b = 16 * _parseHexDigit(hex.charCodeAt(5)) + _parseHexDigit(hex.charCodeAt(6));
|
|
5787
|
+
const a = 16 * _parseHexDigit(hex.charCodeAt(7)) + _parseHexDigit(hex.charCodeAt(8));
|
|
5788
|
+
return (
|
|
5789
|
+
(new Color( (new RGBA(r, g, b, a / 255))))
|
|
5790
|
+
);
|
|
5791
|
+
}
|
|
5792
|
+
if (length === 4) {
|
|
5793
|
+
const r = _parseHexDigit(hex.charCodeAt(1));
|
|
5794
|
+
const g = _parseHexDigit(hex.charCodeAt(2));
|
|
5795
|
+
const b = _parseHexDigit(hex.charCodeAt(3));
|
|
5796
|
+
return (
|
|
5797
|
+
(new Color( (new RGBA(16 * r + r, 16 * g + g, 16 * b + b))))
|
|
5798
|
+
);
|
|
5799
|
+
}
|
|
5800
|
+
if (length === 5) {
|
|
5801
|
+
const r = _parseHexDigit(hex.charCodeAt(1));
|
|
5802
|
+
const g = _parseHexDigit(hex.charCodeAt(2));
|
|
5803
|
+
const b = _parseHexDigit(hex.charCodeAt(3));
|
|
5804
|
+
const a = _parseHexDigit(hex.charCodeAt(4));
|
|
5805
|
+
return (
|
|
5806
|
+
(new Color(
|
|
5807
|
+
(new RGBA(16 * r + r, 16 * g + g, 16 * b + b, (16 * a + a) / 255))
|
|
5808
|
+
))
|
|
5809
|
+
);
|
|
5810
|
+
}
|
|
5811
|
+
return null;
|
|
5812
|
+
}
|
|
5813
|
+
CSS.parseHex = parseHex;
|
|
5814
|
+
function _parseHexDigit(charCode) {
|
|
5815
|
+
switch (charCode) {
|
|
5816
|
+
case 48 : return 0;
|
|
5817
|
+
case 49 : return 1;
|
|
5818
|
+
case 50 : return 2;
|
|
5819
|
+
case 51 : return 3;
|
|
5820
|
+
case 52 : return 4;
|
|
5821
|
+
case 53 : return 5;
|
|
5822
|
+
case 54 : return 6;
|
|
5823
|
+
case 55 : return 7;
|
|
5824
|
+
case 56 : return 8;
|
|
5825
|
+
case 57 : return 9;
|
|
5826
|
+
case 97 : return 10;
|
|
5827
|
+
case 65 : return 10;
|
|
5828
|
+
case 98 : return 11;
|
|
5829
|
+
case 66 : return 11;
|
|
5830
|
+
case 99 : return 12;
|
|
5831
|
+
case 67 : return 12;
|
|
5832
|
+
case 100 : return 13;
|
|
5833
|
+
case 68 : return 13;
|
|
5834
|
+
case 101 : return 14;
|
|
5835
|
+
case 69 : return 14;
|
|
5836
|
+
case 102 : return 15;
|
|
5837
|
+
case 70 : return 15;
|
|
5838
|
+
}
|
|
5839
|
+
return 0;
|
|
5840
|
+
}
|
|
5841
|
+
})(Format.CSS || (Format.CSS = {}))));
|
|
5842
|
+
})(Color.Format || (Color.Format = {}))));
|
|
5843
|
+
})(Color || (Color = {}))));
|
|
5716
5844
|
var _a, _b;
|
|
5717
5845
|
if (SnippetParser.prototype.text == null) {
|
|
5718
5846
|
SnippetParser.prototype.text = function (value) {
|
|
@@ -5722,11 +5850,12 @@ if (SnippetParser.prototype.text == null) {
|
|
|
5722
5850
|
else {
|
|
5723
5851
|
console.warn('Useless polyfill: SnippetParser');
|
|
5724
5852
|
}
|
|
5853
|
+
Object.defineProperties(Color$1.prototype, Object.getOwnPropertyDescriptors(Color.prototype));
|
|
5725
5854
|
Object.defineProperties(List$1.prototype, Object.getOwnPropertyDescriptors(List.prototype));
|
|
5726
5855
|
Object.defineProperties(WorkspaceFolder$1.prototype, Object.getOwnPropertyDescriptors(WorkspaceFolder.prototype));
|
|
5727
5856
|
Object.defineProperties(LanguagesRegistry$1.prototype, Object.getOwnPropertyDescriptors(LanguagesRegistry.prototype));
|
|
5728
5857
|
Object.defineProperties(ErrorHandler$1.prototype, Object.getOwnPropertyDescriptors(ErrorHandler.prototype));
|
|
5729
|
-
Object.defineProperties(RawContextKey
|
|
5858
|
+
Object.defineProperties(RawContextKey.prototype, Object.getOwnPropertyDescriptors(RawContextKey$1.prototype));
|
|
5730
5859
|
Object.defineProperties(Configuration$1.prototype, Object.getOwnPropertyDescriptors(Configuration.prototype));
|
|
5731
5860
|
Object.defineProperties(TernarySearchTree$1.prototype, Object.getOwnPropertyDescriptors(TernarySearchTree.prototype));
|
|
5732
5861
|
Object.defineProperties(StandaloneConfigurationService$1.prototype, Object.getOwnPropertyDescriptors(StandaloneConfigurationService.prototype));
|
|
@@ -6736,7 +6865,7 @@ class BrowserHostColorSchemeService extends Disposable {
|
|
|
6736
6865
|
const IPreferencesService = ( (createDecorator('preferencesService')));
|
|
6737
6866
|
const ITextMateService = ( (createDecorator('textMateService')));
|
|
6738
6867
|
const IUserDataProfileService = ( (createDecorator('IUserDataProfileService')));
|
|
6739
|
-
ContextKeyExpr.and(ProductQualityContext.notEqualsTo('stable'), ContextKeyDefinedExpr
|
|
6868
|
+
ContextKeyExpr.and(ProductQualityContext.notEqualsTo('stable'), ContextKeyDefinedExpr.create(`config.${PROFILES_ENABLEMENT_CONFIG}`));
|
|
6740
6869
|
let UserDataProfileService = class UserDataProfileService extends Disposable {
|
|
6741
6870
|
constructor(currentProfile, userDataProfilesService) {
|
|
6742
6871
|
super();
|
|
@@ -7290,4 +7419,4 @@ registerSingleton(ISnippetsService, class SnippetsService {
|
|
|
7290
7419
|
this.getSnippetsSync = unsupported;
|
|
7291
7420
|
}
|
|
7292
7421
|
});
|
|
7293
|
-
export {
|
|
7422
|
+
export { transform as A, Barrier as B, isReadableBufferedStream as C, listenStream as D, Emitter as E, bufferedStreamToBuffer as F, readableToBuffer as G, newWriteableBufferStream as H, IExtensionService as I, newWriteableStream as J, IUserDataProfileService as K, IKeyboardLayoutService as L, IPreferencesService as M, NotImplementedError as N, ExtensionMessageCollector as O, parse as P, ITextMateService as Q, ResourceSet as R, getNodeType as S, IBrowserWorkbenchEnvironmentService as T, UserSettings as U, IHostColorSchemeService as V, IUserDataInitializationService as W, Sequencer as X, isProposedApiEnabled as a, readonly as b, checkProposedApiEnabled as c, disposed as d, ILifecycleService as e, IntervalCounter as f, assertAllDefined as g, ExtensionsRegistry as h, isStringArray as i, ILanguageDetectionService as j, IPolicyService as k, IUserDataProfilesService as l, isEmptyObject as m, NullPolicyService as n, format2 as o, getServiceMachineId as p, ResourceQueue as q, raceCancellationError as r, isReadableStream as s, peekStream as t, unsupported as u, peekReadable as v, withUndefinedAsNull as w, bufferToReadable as x, streamToBuffer as y, consumeStream as z };
|