mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 09:20:10 +01:00
Move into monaco-css folder
This commit is contained in:
parent
153561d989
commit
03834eb1ec
26 changed files with 0 additions and 0 deletions
3
monaco-css/.gitignore
vendored
Normal file
3
monaco-css/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
/node_modules/
|
||||
/out/
|
||||
/release/
|
||||
12
monaco-css/.npmignore
Normal file
12
monaco-css/.npmignore
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/.vscode/
|
||||
/out/
|
||||
/scripts/
|
||||
/src/
|
||||
/test/
|
||||
/.gitignore
|
||||
/.npmignore
|
||||
/.prettierrc
|
||||
/.prettierignore
|
||||
/package-lock.json
|
||||
/webpack.dev.config.js
|
||||
/webpack.min.config.js
|
||||
2
monaco-css/.prettierignore
Normal file
2
monaco-css/.prettierignore
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
/out/
|
||||
/release/
|
||||
8
monaco-css/.prettierrc
Normal file
8
monaco-css/.prettierrc
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"arrowParens": "always",
|
||||
"singleQuote": true,
|
||||
"trailingComma": "none",
|
||||
"semi": true,
|
||||
"useTabs": true,
|
||||
"printWidth": 100
|
||||
}
|
||||
9
monaco-css/.vscode/settings.json
vendored
Normal file
9
monaco-css/.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
// Place your settings in this file to overwrite default and user settings.
|
||||
{
|
||||
"files.trimTrailingWhitespace": true,
|
||||
"search.exclude": {
|
||||
"**/node_modules": true,
|
||||
"**/release": true,
|
||||
"**/out": true
|
||||
}
|
||||
}
|
||||
21
monaco-css/LICENSE.md
Normal file
21
monaco-css/LICENSE.md
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Microsoft Corporation
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
37
monaco-css/README.md
Normal file
37
monaco-css/README.md
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# Monaco CSS
|
||||
|
||||
CSS language plugin for the Monaco Editor. It provides the following features when editing CSS, LESS and SCSS files:
|
||||
|
||||
- Code completion
|
||||
- Hovers
|
||||
- Validation: Syntax errors and linting
|
||||
- Find definition, references & highlights for symbols in the same file
|
||||
- Document Symbols
|
||||
- Color Decorators
|
||||
|
||||
Linting an be configured through the API. See [here](https://github.com/Microsoft/monaco-css/blob/master/src/monaco.d.ts) for the API that the
|
||||
CSS plugin offers to configure the CSS/LESS/SCSS language support.
|
||||
|
||||
Internally the CSS plugin uses the [vscode-css-languageservice](https://github.com/Microsoft/vscode-css-languageservice)
|
||||
node module, providing the implementation of the functionally listed above. The same module is also used
|
||||
in [Visual Studio Code](https://github.com/Microsoft/vscode) to power the CSS, LESS and SCSS editing experience.
|
||||
|
||||
## Issues
|
||||
|
||||
Please file issues concering `monaco-css` in the [`monaco-editor` repository](https://github.com/Microsoft/monaco-editor/issues).
|
||||
|
||||
## Installing
|
||||
|
||||
This npm module is bundled and distributed in the [monaco-editor](https://www.npmjs.com/package/monaco-editor) npm module.
|
||||
|
||||
## Development
|
||||
|
||||
- `npm install .`
|
||||
- compile with `npm run compile`
|
||||
- watch with `npm run watch`
|
||||
- `npm run prepublishOnly`
|
||||
- open `$/monaco-css/test/index.html` in your favorite browser.
|
||||
|
||||
## License
|
||||
|
||||
[MIT](https://github.com/Microsoft/monaco-css/blob/master/LICENSE.md)
|
||||
41
monaco-css/SECURITY.md
Normal file
41
monaco-css/SECURITY.md
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.5 BLOCK -->
|
||||
|
||||
## Security
|
||||
|
||||
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
|
||||
|
||||
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](<https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)>), please report it to us as described below.
|
||||
|
||||
## Reporting Security Issues
|
||||
|
||||
**Please do not report security vulnerabilities through public GitHub issues.**
|
||||
|
||||
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).
|
||||
|
||||
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).
|
||||
|
||||
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
|
||||
|
||||
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
|
||||
|
||||
- Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
|
||||
- Full paths of source file(s) related to the manifestation of the issue
|
||||
- The location of the affected source code (tag/branch/commit or direct URL)
|
||||
- Any special configuration required to reproduce the issue
|
||||
- Step-by-step instructions to reproduce the issue
|
||||
- Proof-of-concept or exploit code (if possible)
|
||||
- Impact of the issue, including how an attacker might exploit the issue
|
||||
|
||||
This information will help us triage your report more quickly.
|
||||
|
||||
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs.
|
||||
|
||||
## Preferred Languages
|
||||
|
||||
We prefer all communications to be in English.
|
||||
|
||||
## Policy
|
||||
|
||||
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).
|
||||
|
||||
<!-- END MICROSOFT SECURITY.MD BLOCK -->
|
||||
171
monaco-css/monaco.d.ts
vendored
Normal file
171
monaco-css/monaco.d.ts
vendored
Normal file
|
|
@ -0,0 +1,171 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/// <reference path="node_modules/monaco-editor-core/monaco.d.ts" />
|
||||
|
||||
declare namespace monaco.languages.css {
|
||||
export interface Options {
|
||||
readonly validate?: boolean;
|
||||
readonly lint?: {
|
||||
readonly compatibleVendorPrefixes?: 'ignore' | 'warning' | 'error';
|
||||
readonly vendorPrefix?: 'ignore' | 'warning' | 'error';
|
||||
readonly duplicateProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly emptyRules?: 'ignore' | 'warning' | 'error';
|
||||
readonly importStatement?: 'ignore' | 'warning' | 'error';
|
||||
readonly boxModel?: 'ignore' | 'warning' | 'error';
|
||||
readonly universalSelector?: 'ignore' | 'warning' | 'error';
|
||||
readonly zeroUnits?: 'ignore' | 'warning' | 'error';
|
||||
readonly fontFaceProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly hexColorLength?: 'ignore' | 'warning' | 'error';
|
||||
readonly argumentsInColorFunction?: 'ignore' | 'warning' | 'error';
|
||||
readonly unknownProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly ieHack?: 'ignore' | 'warning' | 'error';
|
||||
readonly unknownVendorSpecificProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly propertyIgnoredDueToDisplay?: 'ignore' | 'warning' | 'error';
|
||||
readonly important?: 'ignore' | 'warning' | 'error';
|
||||
readonly float?: 'ignore' | 'warning' | 'error';
|
||||
readonly idSelector?: 'ignore' | 'warning' | 'error';
|
||||
};
|
||||
/**
|
||||
* Configures the CSS data types known by the langauge service.
|
||||
*/
|
||||
readonly data?: CSSDataConfiguration;
|
||||
}
|
||||
export interface ModeConfiguration {
|
||||
/**
|
||||
* Defines whether the built-in completionItemProvider is enabled.
|
||||
*/
|
||||
readonly completionItems?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in hoverProvider is enabled.
|
||||
*/
|
||||
readonly hovers?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in documentSymbolProvider is enabled.
|
||||
*/
|
||||
readonly documentSymbols?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in definitions provider is enabled.
|
||||
*/
|
||||
readonly definitions?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in references provider is enabled.
|
||||
*/
|
||||
readonly references?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in references provider is enabled.
|
||||
*/
|
||||
readonly documentHighlights?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in rename provider is enabled.
|
||||
*/
|
||||
readonly rename?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in color provider is enabled.
|
||||
*/
|
||||
readonly colors?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in foldingRange provider is enabled.
|
||||
*/
|
||||
readonly foldingRanges?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in diagnostic provider is enabled.
|
||||
*/
|
||||
readonly diagnostics?: boolean;
|
||||
/**
|
||||
* Defines whether the built-in selection range provider is enabled.
|
||||
*/
|
||||
readonly selectionRanges?: boolean;
|
||||
}
|
||||
export interface LanguageServiceDefaults {
|
||||
readonly languageId: string;
|
||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||
readonly modeConfiguration: ModeConfiguration;
|
||||
readonly options: Options;
|
||||
setOptions(options: Options): void;
|
||||
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
||||
/** @deprecated Use options instead */
|
||||
readonly diagnosticsOptions: DiagnosticsOptions;
|
||||
/** @deprecated Use setOptions instead */
|
||||
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
||||
}
|
||||
/** @deprecated Use Options instead */
|
||||
export type DiagnosticsOptions = Options;
|
||||
export const cssDefaults: LanguageServiceDefaults;
|
||||
export const scssDefaults: LanguageServiceDefaults;
|
||||
export const lessDefaults: LanguageServiceDefaults;
|
||||
export interface CSSDataConfiguration {
|
||||
/**
|
||||
* Defines whether the standard CSS properties, at-directives, pseudoClasses and pseudoElements are shown.
|
||||
*/
|
||||
useDefaultDataProvider?: boolean;
|
||||
/**
|
||||
* Provides a set of custom data providers.
|
||||
*/
|
||||
dataProviders?: {
|
||||
[providerId: string]: CSSDataV1;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Custom CSS properties, at-directives, pseudoClasses and pseudoElements
|
||||
* https://github.com/microsoft/vscode-css-languageservice/blob/main/docs/customData.md
|
||||
*/
|
||||
export interface CSSDataV1 {
|
||||
version: 1 | 1.1;
|
||||
properties?: IPropertyData[];
|
||||
atDirectives?: IAtDirectiveData[];
|
||||
pseudoClasses?: IPseudoClassData[];
|
||||
pseudoElements?: IPseudoElementData[];
|
||||
}
|
||||
export type EntryStatus = 'standard' | 'experimental' | 'nonstandard' | 'obsolete';
|
||||
export interface IReference {
|
||||
name: string;
|
||||
url: string;
|
||||
}
|
||||
export interface IPropertyData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
restrictions?: string[];
|
||||
status?: EntryStatus;
|
||||
syntax?: string;
|
||||
values?: IValueData[];
|
||||
references?: IReference[];
|
||||
relevance?: number;
|
||||
}
|
||||
export interface IAtDirectiveData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
status?: EntryStatus;
|
||||
references?: IReference[];
|
||||
}
|
||||
export interface IPseudoClassData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
status?: EntryStatus;
|
||||
references?: IReference[];
|
||||
}
|
||||
export interface IPseudoElementData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
status?: EntryStatus;
|
||||
references?: IReference[];
|
||||
}
|
||||
export interface IValueData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
status?: EntryStatus;
|
||||
references?: IReference[];
|
||||
}
|
||||
export interface MarkupContent {
|
||||
kind: MarkupKind;
|
||||
value: string;
|
||||
}
|
||||
export type MarkupKind = 'plaintext' | 'markdown';
|
||||
}
|
||||
497
monaco-css/package-lock.json
generated
Normal file
497
monaco-css/package-lock.json
generated
Normal file
|
|
@ -0,0 +1,497 @@
|
|||
{
|
||||
"name": "monaco-css",
|
||||
"version": "3.9.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@types/minimatch": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
|
||||
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==",
|
||||
"dev": true
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"color-convert": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"array-differ": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz",
|
||||
"integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==",
|
||||
"dev": true
|
||||
},
|
||||
"array-union": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
|
||||
"integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
|
||||
"dev": true
|
||||
},
|
||||
"arrify": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz",
|
||||
"integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==",
|
||||
"dev": true
|
||||
},
|
||||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
||||
"dev": true
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"buffer-from": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
|
||||
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
|
||||
"dev": true
|
||||
},
|
||||
"chalk": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
|
||||
"integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"color-name": "~1.1.4"
|
||||
}
|
||||
},
|
||||
"color-name": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||
"dev": true
|
||||
},
|
||||
"commander": {
|
||||
"version": "2.20.3",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
|
||||
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
|
||||
"dev": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
||||
"dev": true
|
||||
},
|
||||
"cross-spawn": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
||||
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"path-key": "^3.1.0",
|
||||
"shebang-command": "^2.0.0",
|
||||
"which": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"end-of-stream": {
|
||||
"version": "1.4.4",
|
||||
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
|
||||
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"once": "^1.4.0"
|
||||
}
|
||||
},
|
||||
"execa": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz",
|
||||
"integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"cross-spawn": "^7.0.0",
|
||||
"get-stream": "^5.0.0",
|
||||
"human-signals": "^1.1.1",
|
||||
"is-stream": "^2.0.0",
|
||||
"merge-stream": "^2.0.0",
|
||||
"npm-run-path": "^4.0.0",
|
||||
"onetime": "^5.1.0",
|
||||
"signal-exit": "^3.0.2",
|
||||
"strip-final-newline": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"find-up": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
|
||||
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"locate-path": "^5.0.0",
|
||||
"path-exists": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"get-stream": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
|
||||
"integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"pump": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
||||
"dev": true
|
||||
},
|
||||
"human-signals": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz",
|
||||
"integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==",
|
||||
"dev": true
|
||||
},
|
||||
"husky": {
|
||||
"version": "5.1.3",
|
||||
"resolved": "https://registry.npmjs.org/husky/-/husky-5.1.3.tgz",
|
||||
"integrity": "sha512-fbNJ+Gz5wx2LIBtMweJNY1D7Uc8p1XERi5KNRMccwfQA+rXlxWNSdUxswo0gT8XqxywTIw7Ywm/F4v/O35RdMg==",
|
||||
"dev": true
|
||||
},
|
||||
"ignore": {
|
||||
"version": "5.1.8",
|
||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz",
|
||||
"integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==",
|
||||
"dev": true
|
||||
},
|
||||
"is-stream": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz",
|
||||
"integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==",
|
||||
"dev": true
|
||||
},
|
||||
"isexe": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
||||
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
|
||||
"dev": true
|
||||
},
|
||||
"locate-path": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
|
||||
"integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-locate": "^4.1.0"
|
||||
}
|
||||
},
|
||||
"merge-stream": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
|
||||
"integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
|
||||
"dev": true
|
||||
},
|
||||
"mimic-fn": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
|
||||
"integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
|
||||
"dev": true
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
},
|
||||
"monaco-editor-core": {
|
||||
"version": "0.30.0",
|
||||
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.30.0.tgz",
|
||||
"integrity": "sha512-vFJ7BEOCqLv4xWgFW+UheI/PtccHHNht29lNmo79Re1kNhWCBLLb2nThjRMLPO1rd41vX9hhd9C07/iKOk9/jQ==",
|
||||
"dev": true
|
||||
},
|
||||
"monaco-languages": {
|
||||
"version": "2.11.0",
|
||||
"resolved": "https://registry.npmjs.org/monaco-languages/-/monaco-languages-2.11.0.tgz",
|
||||
"integrity": "sha512-fpeP8XUPejcdoUEMZ5bo4MW8VzEadhrsuyDtT48p2a2PSRT/CXptQm4eGnIfgxf5R95jrCZ0456c5dSEPBuktA==",
|
||||
"dev": true
|
||||
},
|
||||
"monaco-plugin-helpers": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/monaco-plugin-helpers/-/monaco-plugin-helpers-1.0.3.tgz",
|
||||
"integrity": "sha512-6AYI3ONAy8ki74qG2JqtFrLdiJHQlgeO5l4Rwr0OMyIpGXhc94y5rZuFxOtgGkxgSrZfHSwOt/MulUNZ/mOQOw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"typescript": "^2.7.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"typescript": {
|
||||
"version": "2.9.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz",
|
||||
"integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"mri": {
|
||||
"version": "1.1.6",
|
||||
"resolved": "https://registry.npmjs.org/mri/-/mri-1.1.6.tgz",
|
||||
"integrity": "sha512-oi1b3MfbyGa7FJMP9GmLTttni5JoICpYBRlq+x5V16fZbLsnL9N3wFqqIm/nIG43FjUFkFh9Epzp/kzUGUnJxQ==",
|
||||
"dev": true
|
||||
},
|
||||
"multimatch": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/multimatch/-/multimatch-4.0.0.tgz",
|
||||
"integrity": "sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/minimatch": "^3.0.3",
|
||||
"array-differ": "^3.0.0",
|
||||
"array-union": "^2.1.0",
|
||||
"arrify": "^2.0.1",
|
||||
"minimatch": "^3.0.4"
|
||||
}
|
||||
},
|
||||
"npm-run-path": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz",
|
||||
"integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"path-key": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"onetime": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
|
||||
"integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"mimic-fn": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"p-limit": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
|
||||
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-try": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"p-locate": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
|
||||
"integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-limit": "^2.2.0"
|
||||
}
|
||||
},
|
||||
"p-try": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
|
||||
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
|
||||
"dev": true
|
||||
},
|
||||
"path-exists": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
|
||||
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
|
||||
"dev": true
|
||||
},
|
||||
"path-key": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
|
||||
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
|
||||
"dev": true
|
||||
},
|
||||
"prettier": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz",
|
||||
"integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==",
|
||||
"dev": true
|
||||
},
|
||||
"pretty-quick": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/pretty-quick/-/pretty-quick-3.1.0.tgz",
|
||||
"integrity": "sha512-DtxIxksaUWCgPFN7E1ZZk4+Aav3CCuRdhrDSFZENb404sYMtuo9Zka823F+Mgeyt8Zt3bUiCjFzzWYE9LYqkmQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chalk": "^3.0.0",
|
||||
"execa": "^4.0.0",
|
||||
"find-up": "^4.1.0",
|
||||
"ignore": "^5.1.4",
|
||||
"mri": "^1.1.5",
|
||||
"multimatch": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"pump": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
|
||||
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"end-of-stream": "^1.1.0",
|
||||
"once": "^1.3.1"
|
||||
}
|
||||
},
|
||||
"requirejs": {
|
||||
"version": "2.3.6",
|
||||
"resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.6.tgz",
|
||||
"integrity": "sha512-ipEzlWQe6RK3jkzikgCupiTbTvm4S0/CAU5GlgptkN5SO6F3u0UD0K18wy6ErDqiCyP4J4YYe1HuAShvsxePLg==",
|
||||
"dev": true
|
||||
},
|
||||
"shebang-command": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
||||
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"shebang-regex": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"shebang-regex": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
|
||||
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
|
||||
"dev": true
|
||||
},
|
||||
"signal-exit": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
|
||||
"integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==",
|
||||
"dev": true
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.7.3",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz",
|
||||
"integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==",
|
||||
"dev": true
|
||||
},
|
||||
"source-map-support": {
|
||||
"version": "0.5.19",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz",
|
||||
"integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"buffer-from": "^1.0.0",
|
||||
"source-map": "^0.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"strip-final-newline": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
|
||||
"integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==",
|
||||
"dev": true
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"has-flag": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"terser": {
|
||||
"version": "5.7.0",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.7.0.tgz",
|
||||
"integrity": "sha512-HP5/9hp2UaZt5fYkuhNBR8YyRcT8juw8+uFbAme53iN9hblvKnLUTKkmwJG6ocWpIKf8UK4DoeWG4ty0J6S6/g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"commander": "^2.20.0",
|
||||
"source-map": "~0.7.2",
|
||||
"source-map-support": "~0.5.19"
|
||||
}
|
||||
},
|
||||
"typescript": {
|
||||
"version": "4.3.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.2.tgz",
|
||||
"integrity": "sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==",
|
||||
"dev": true
|
||||
},
|
||||
"vscode-css-languageservice": {
|
||||
"version": "5.1.8",
|
||||
"resolved": "https://registry.npmjs.org/vscode-css-languageservice/-/vscode-css-languageservice-5.1.8.tgz",
|
||||
"integrity": "sha512-Si1sMykS8U/p8LYgLGPCfZD1YFT0AtvUJQp9XJGw64DZWhtwYo28G2l64USLS9ge4ZPMZpwdpOK7PfbVKfgiiA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"vscode-languageserver-textdocument": "^1.0.1",
|
||||
"vscode-languageserver-types": "^3.16.0",
|
||||
"vscode-nls": "^5.0.0",
|
||||
"vscode-uri": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"vscode-languageserver-textdocument": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.2.tgz",
|
||||
"integrity": "sha512-T7uPC18+f8mYE4lbVZwb3OSmvwTZm3cuFhrdx9Bn2l11lmp3SvSuSVjy2JtvrghzjAo4G6Trqny2m9XGnFnWVA==",
|
||||
"dev": true
|
||||
},
|
||||
"vscode-languageserver-types": {
|
||||
"version": "3.16.0",
|
||||
"resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz",
|
||||
"integrity": "sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA==",
|
||||
"dev": true
|
||||
},
|
||||
"vscode-nls": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-5.0.0.tgz",
|
||||
"integrity": "sha512-u0Lw+IYlgbEJFF6/qAqG2d1jQmJl0eyAGJHoAJqr2HT4M2BNuQYSEiSE75f52pXHSJm8AlTjnLLbBFPrdz2hpA==",
|
||||
"dev": true
|
||||
},
|
||||
"vscode-uri": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.2.tgz",
|
||||
"integrity": "sha512-jkjy6pjU1fxUvI51P+gCsxg1u2n8LSt0W6KrCNQceaziKzff74GoWmjVG46KieVzybO1sttPQmYfrwSHey7GUA==",
|
||||
"dev": true
|
||||
},
|
||||
"which": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
||||
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"isexe": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
}
|
||||
43
monaco-css/package.json
Normal file
43
monaco-css/package.json
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"name": "monaco-css",
|
||||
"version": "3.9.0",
|
||||
"description": "CSS, LESS and SCSS plugin for the Monaco Editor",
|
||||
"scripts": {
|
||||
"compile": "mrmdir ./out && tsc -p ./src/tsconfig.json && tsc -p ./src/tsconfig.esm.json && node ./scripts/dts && prettier --write ./monaco.d.ts",
|
||||
"watch": "tsc -p ./src --watch",
|
||||
"prepublishOnly": "mrmdir ./release && npm run compile && node ./scripts/release.js && node ./scripts/bundle && mcopy ./monaco.d.ts ./release/monaco.d.ts && mcopy ./out/esm/monaco.contribution.d.ts ./release/esm/monaco.contribution.d.ts && mcopy ./out/esm/fillers/monaco-editor-core.d.ts ./release/esm/fillers/monaco-editor-core.d.ts",
|
||||
"install-service-next": "npm install vscode-css-languageservice@next -f -D && npm install vscode-languageserver-types@next -f -D",
|
||||
"install-service-local": "npm install ../vscode-css-languageservice -f -D && npm install ../vscode-languageserver-node/types -f -D",
|
||||
"prettier": "prettier --write ."
|
||||
},
|
||||
"author": "Microsoft Corporation",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Microsoft/monaco-css"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/Microsoft/monaco-css/issues"
|
||||
},
|
||||
"module": "./release/esm/monaco.contribution.js",
|
||||
"typings": "./release/esm/monaco.contribution.d.ts",
|
||||
"devDependencies": {
|
||||
"husky": "^5.1.3",
|
||||
"monaco-editor-core": "0.30.0",
|
||||
"monaco-languages": "2.11.0",
|
||||
"monaco-plugin-helpers": "^1.0.3",
|
||||
"prettier": "^2.2.1",
|
||||
"pretty-quick": "^3.1.0",
|
||||
"requirejs": "^2.3.6",
|
||||
"typescript": "4.3.2",
|
||||
"terser": "^5.7.0",
|
||||
"vscode-css-languageservice": "^5.1.8",
|
||||
"vscode-languageserver-types": "3.16.0",
|
||||
"vscode-languageserver-textdocument": "^1.0.2"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "pretty-quick --staged"
|
||||
}
|
||||
}
|
||||
}
|
||||
86
monaco-css/scripts/bundle.js
Normal file
86
monaco-css/scripts/bundle.js
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
const requirejs = require('requirejs');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const Terser = require('terser');
|
||||
const helpers = require('monaco-plugin-helpers');
|
||||
|
||||
const REPO_ROOT = path.resolve(__dirname, '..');
|
||||
|
||||
const sha1 = helpers.getGitVersion(REPO_ROOT);
|
||||
const semver = require('../package.json').version;
|
||||
const headerVersion = semver + '(' + sha1 + ')';
|
||||
|
||||
const BUNDLED_FILE_HEADER = [
|
||||
'/*!-----------------------------------------------------------------------------',
|
||||
' * Copyright (c) Microsoft Corporation. All rights reserved.',
|
||||
' * monaco-css version: ' + headerVersion,
|
||||
' * Released under the MIT license',
|
||||
' * https://github.com/Microsoft/monaco-css/blob/master/LICENSE.md',
|
||||
' *-----------------------------------------------------------------------------*/',
|
||||
''
|
||||
].join('\n');
|
||||
|
||||
bundleOne('monaco.contribution');
|
||||
bundleOne('cssMode', ['vs/language/css/monaco.contribution']);
|
||||
bundleOne('cssWorker');
|
||||
|
||||
function bundleOne(moduleId, exclude) {
|
||||
requirejs.optimize(
|
||||
{
|
||||
baseUrl: 'out/amd/',
|
||||
name: 'vs/language/css/' + moduleId,
|
||||
out: 'release/dev/' + moduleId + '.js',
|
||||
exclude: exclude,
|
||||
paths: {
|
||||
'vs/language/css': REPO_ROOT + '/out/amd',
|
||||
'vs/language/css/fillers/monaco-editor-core':
|
||||
REPO_ROOT + '/out/amd/fillers/monaco-editor-core-amd'
|
||||
},
|
||||
optimize: 'none',
|
||||
packages: [
|
||||
{
|
||||
name: 'vscode-css-languageservice',
|
||||
location: path.join(REPO_ROOT, 'node_modules/vscode-css-languageservice/lib/umd'),
|
||||
main: 'cssLanguageService'
|
||||
},
|
||||
{
|
||||
name: 'vscode-languageserver-types',
|
||||
location: path.join(REPO_ROOT, 'node_modules/vscode-languageserver-types/lib/umd'),
|
||||
main: 'main'
|
||||
},
|
||||
{
|
||||
name: 'vscode-languageserver-textdocument',
|
||||
location: path.join(REPO_ROOT, 'node_modules/vscode-languageserver-textdocument/lib/umd'),
|
||||
main: 'main'
|
||||
},
|
||||
{
|
||||
name: 'vscode-uri',
|
||||
location: path.join(REPO_ROOT, 'node_modules/vscode-uri/lib/umd'),
|
||||
main: 'index'
|
||||
},
|
||||
{
|
||||
name: 'vscode-nls',
|
||||
location: path.join(REPO_ROOT, '/out/amd/fillers'),
|
||||
main: 'vscode-nls'
|
||||
}
|
||||
]
|
||||
},
|
||||
async function (buildResponse) {
|
||||
const devFilePath = path.join(REPO_ROOT, 'release/dev/' + moduleId + '.js');
|
||||
const minFilePath = path.join(REPO_ROOT, 'release/min/' + moduleId + '.js');
|
||||
const fileContents = fs.readFileSync(devFilePath).toString();
|
||||
console.log();
|
||||
console.log(`Minifying ${devFilePath}...`);
|
||||
const result = await Terser.minify(fileContents, {
|
||||
output: {
|
||||
comments: 'some'
|
||||
}
|
||||
});
|
||||
console.log(`Done minifying ${devFilePath}.`);
|
||||
try {
|
||||
fs.mkdirSync(path.join(REPO_ROOT, 'release/min'));
|
||||
} catch (err) {}
|
||||
fs.writeFileSync(minFilePath, BUNDLED_FILE_HEADER + result.code);
|
||||
}
|
||||
);
|
||||
}
|
||||
41
monaco-css/scripts/dts.js
Normal file
41
monaco-css/scripts/dts.js
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
const REPO_ROOT = path.join(__dirname, '../');
|
||||
const SRC_PATH = path.join(REPO_ROOT, 'out/amd/monaco.contribution.d.ts');
|
||||
const DST_PATH = path.join(REPO_ROOT, 'monaco.d.ts');
|
||||
|
||||
const lines = fs
|
||||
.readFileSync(SRC_PATH)
|
||||
.toString()
|
||||
.split(/\r\n|\r|\n/);
|
||||
let result = [
|
||||
`/*---------------------------------------------------------------------------------------------`,
|
||||
` * Copyright (c) Microsoft Corporation. All rights reserved.`,
|
||||
` * Licensed under the MIT License. See License.txt in the project root for license information.`,
|
||||
` *--------------------------------------------------------------------------------------------*/`,
|
||||
``,
|
||||
`/// <reference path="node_modules/monaco-editor-core/monaco.d.ts" />`,
|
||||
``,
|
||||
`declare namespace monaco.languages.css {`
|
||||
];
|
||||
for (let line of lines) {
|
||||
if (/^import/.test(line)) {
|
||||
continue;
|
||||
}
|
||||
line = line.replace(/ /g, '\t');
|
||||
line = line.replace(/declare /g, '');
|
||||
if (line.length > 0) {
|
||||
line = `\t${line}`;
|
||||
result.push(line);
|
||||
}
|
||||
}
|
||||
result.push(`}`);
|
||||
result.push(``);
|
||||
|
||||
fs.writeFileSync(DST_PATH, result.join('\n'));
|
||||
26
monaco-css/scripts/release.js
Normal file
26
monaco-css/scripts/release.js
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
const path = require('path');
|
||||
const helpers = require('monaco-plugin-helpers');
|
||||
|
||||
const REPO_ROOT = path.join(__dirname, '../');
|
||||
|
||||
helpers.packageESM({
|
||||
repoRoot: REPO_ROOT,
|
||||
esmSource: 'out/esm',
|
||||
esmDestination: 'release/esm',
|
||||
entryPoints: ['monaco.contribution.js', 'cssMode.js', 'css.worker.js'],
|
||||
resolveAlias: {
|
||||
'vscode-nls': path.join(REPO_ROOT, 'out/esm/fillers/vscode-nls.js')
|
||||
},
|
||||
resolveSkip: ['monaco-editor-core'],
|
||||
destinationFolderSimplification: {
|
||||
node_modules: '_deps',
|
||||
'vscode-languageserver-types/lib/esm': 'vscode-languageserver-types',
|
||||
'vscode-uri/lib/esm': 'vscode-uri',
|
||||
'vscode-css-languageservice/lib/esm': 'vscode-css-languageservice'
|
||||
}
|
||||
});
|
||||
14
monaco-css/src/css.worker.ts
Normal file
14
monaco-css/src/css.worker.ts
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as worker from 'monaco-editor-core/esm/vs/editor/editor.worker';
|
||||
import { CSSWorker } from './cssWorker';
|
||||
|
||||
self.onmessage = () => {
|
||||
// ignore the first message
|
||||
worker.initialize((ctx, createData) => {
|
||||
return new CSSWorker(ctx, createData);
|
||||
});
|
||||
};
|
||||
122
monaco-css/src/cssMode.ts
Normal file
122
monaco-css/src/cssMode.ts
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { WorkerManager } from './workerManager';
|
||||
import type { CSSWorker } from './cssWorker';
|
||||
import { LanguageServiceDefaults } from './monaco.contribution';
|
||||
import * as languageFeatures from './languageFeatures';
|
||||
import { Uri, IDisposable, languages } from './fillers/monaco-editor-core';
|
||||
|
||||
export function setupMode(defaults: LanguageServiceDefaults): IDisposable {
|
||||
const disposables: IDisposable[] = [];
|
||||
const providers: IDisposable[] = [];
|
||||
|
||||
const client = new WorkerManager(defaults);
|
||||
disposables.push(client);
|
||||
|
||||
const worker: languageFeatures.WorkerAccessor = (...uris: Uri[]): Promise<CSSWorker> => {
|
||||
return client.getLanguageServiceWorker(...uris);
|
||||
};
|
||||
|
||||
function registerProviders(): void {
|
||||
const { languageId, modeConfiguration } = defaults;
|
||||
|
||||
disposeAll(providers);
|
||||
|
||||
if (modeConfiguration.completionItems) {
|
||||
providers.push(
|
||||
languages.registerCompletionItemProvider(
|
||||
languageId,
|
||||
new languageFeatures.CompletionAdapter(worker)
|
||||
)
|
||||
);
|
||||
}
|
||||
if (modeConfiguration.hovers) {
|
||||
providers.push(
|
||||
languages.registerHoverProvider(languageId, new languageFeatures.HoverAdapter(worker))
|
||||
);
|
||||
}
|
||||
if (modeConfiguration.documentHighlights) {
|
||||
providers.push(
|
||||
languages.registerDocumentHighlightProvider(
|
||||
languageId,
|
||||
new languageFeatures.DocumentHighlightAdapter(worker)
|
||||
)
|
||||
);
|
||||
}
|
||||
if (modeConfiguration.definitions) {
|
||||
providers.push(
|
||||
languages.registerDefinitionProvider(
|
||||
languageId,
|
||||
new languageFeatures.DefinitionAdapter(worker)
|
||||
)
|
||||
);
|
||||
}
|
||||
if (modeConfiguration.references) {
|
||||
providers.push(
|
||||
languages.registerReferenceProvider(
|
||||
languageId,
|
||||
new languageFeatures.ReferenceAdapter(worker)
|
||||
)
|
||||
);
|
||||
}
|
||||
if (modeConfiguration.documentSymbols) {
|
||||
providers.push(
|
||||
languages.registerDocumentSymbolProvider(
|
||||
languageId,
|
||||
new languageFeatures.DocumentSymbolAdapter(worker)
|
||||
)
|
||||
);
|
||||
}
|
||||
if (modeConfiguration.rename) {
|
||||
providers.push(
|
||||
languages.registerRenameProvider(languageId, new languageFeatures.RenameAdapter(worker))
|
||||
);
|
||||
}
|
||||
if (modeConfiguration.colors) {
|
||||
providers.push(
|
||||
languages.registerColorProvider(
|
||||
languageId,
|
||||
new languageFeatures.DocumentColorAdapter(worker)
|
||||
)
|
||||
);
|
||||
}
|
||||
if (modeConfiguration.foldingRanges) {
|
||||
providers.push(
|
||||
languages.registerFoldingRangeProvider(
|
||||
languageId,
|
||||
new languageFeatures.FoldingRangeAdapter(worker)
|
||||
)
|
||||
);
|
||||
}
|
||||
if (modeConfiguration.diagnostics) {
|
||||
providers.push(new languageFeatures.DiagnosticsAdapter(languageId, worker, defaults));
|
||||
}
|
||||
if (modeConfiguration.selectionRanges) {
|
||||
providers.push(
|
||||
languages.registerSelectionRangeProvider(
|
||||
languageId,
|
||||
new languageFeatures.SelectionRangeAdapter(worker)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
registerProviders();
|
||||
|
||||
disposables.push(asDisposable(providers));
|
||||
|
||||
return asDisposable(disposables);
|
||||
}
|
||||
|
||||
function asDisposable(disposables: IDisposable[]): IDisposable {
|
||||
return { dispose: () => disposeAll(disposables) };
|
||||
}
|
||||
|
||||
function disposeAll(disposables: IDisposable[]) {
|
||||
while (disposables.length) {
|
||||
disposables.pop().dispose();
|
||||
}
|
||||
}
|
||||
181
monaco-css/src/cssWorker.ts
Normal file
181
monaco-css/src/cssWorker.ts
Normal file
|
|
@ -0,0 +1,181 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import type { worker } from './fillers/monaco-editor-core';
|
||||
import * as cssService from 'vscode-css-languageservice';
|
||||
import { Options } from './monaco.contribution';
|
||||
|
||||
export class CSSWorker {
|
||||
// --- model sync -----------------------
|
||||
|
||||
private _ctx: worker.IWorkerContext;
|
||||
private _languageService: cssService.LanguageService;
|
||||
private _languageSettings: cssService.LanguageSettings;
|
||||
private _languageId: string;
|
||||
|
||||
constructor(ctx: worker.IWorkerContext, createData: ICreateData) {
|
||||
this._ctx = ctx;
|
||||
this._languageSettings = createData.options;
|
||||
this._languageId = createData.languageId;
|
||||
|
||||
const data = createData.options.data;
|
||||
|
||||
const useDefaultDataProvider = data?.useDefaultDataProvider;
|
||||
const customDataProviders: cssService.ICSSDataProvider[] = [];
|
||||
if (data?.dataProviders) {
|
||||
for (const id in data.dataProviders) {
|
||||
customDataProviders.push(cssService.newCSSDataProvider(data.dataProviders[id]));
|
||||
}
|
||||
}
|
||||
const lsOptions: cssService.LanguageServiceOptions = { customDataProviders, useDefaultDataProvider };
|
||||
|
||||
switch (this._languageId) {
|
||||
case 'css':
|
||||
this._languageService = cssService.getCSSLanguageService(lsOptions);
|
||||
break;
|
||||
case 'less':
|
||||
this._languageService = cssService.getLESSLanguageService(lsOptions);
|
||||
break;
|
||||
case 'scss':
|
||||
this._languageService = cssService.getSCSSLanguageService(lsOptions);
|
||||
break;
|
||||
default:
|
||||
throw new Error('Invalid language id: ' + this._languageId);
|
||||
}
|
||||
this._languageService.configure(this._languageSettings);
|
||||
}
|
||||
|
||||
// --- language service host ---------------
|
||||
|
||||
async doValidation(uri: string): Promise<cssService.Diagnostic[]> {
|
||||
let document = this._getTextDocument(uri);
|
||||
if (document) {
|
||||
let stylesheet = this._languageService.parseStylesheet(document);
|
||||
let diagnostics = this._languageService.doValidation(document, stylesheet);
|
||||
return Promise.resolve(diagnostics);
|
||||
}
|
||||
return Promise.resolve([]);
|
||||
}
|
||||
async doComplete(uri: string, position: cssService.Position): Promise<cssService.CompletionList> {
|
||||
let document = this._getTextDocument(uri);
|
||||
let stylesheet = this._languageService.parseStylesheet(document);
|
||||
let completions = this._languageService.doComplete(document, position, stylesheet);
|
||||
return Promise.resolve(completions);
|
||||
}
|
||||
async doHover(uri: string, position: cssService.Position): Promise<cssService.Hover> {
|
||||
let document = this._getTextDocument(uri);
|
||||
let stylesheet = this._languageService.parseStylesheet(document);
|
||||
let hover = this._languageService.doHover(document, position, stylesheet);
|
||||
return Promise.resolve(hover);
|
||||
}
|
||||
async findDefinition(uri: string, position: cssService.Position): Promise<cssService.Location> {
|
||||
let document = this._getTextDocument(uri);
|
||||
let stylesheet = this._languageService.parseStylesheet(document);
|
||||
let definition = this._languageService.findDefinition(document, position, stylesheet);
|
||||
return Promise.resolve(definition);
|
||||
}
|
||||
async findReferences(uri: string, position: cssService.Position): Promise<cssService.Location[]> {
|
||||
let document = this._getTextDocument(uri);
|
||||
let stylesheet = this._languageService.parseStylesheet(document);
|
||||
let references = this._languageService.findReferences(document, position, stylesheet);
|
||||
return Promise.resolve(references);
|
||||
}
|
||||
async findDocumentHighlights(
|
||||
uri: string,
|
||||
position: cssService.Position
|
||||
): Promise<cssService.DocumentHighlight[]> {
|
||||
let document = this._getTextDocument(uri);
|
||||
let stylesheet = this._languageService.parseStylesheet(document);
|
||||
let highlights = this._languageService.findDocumentHighlights(document, position, stylesheet);
|
||||
return Promise.resolve(highlights);
|
||||
}
|
||||
async findDocumentSymbols(uri: string): Promise<cssService.SymbolInformation[]> {
|
||||
let document = this._getTextDocument(uri);
|
||||
let stylesheet = this._languageService.parseStylesheet(document);
|
||||
let symbols = this._languageService.findDocumentSymbols(document, stylesheet);
|
||||
return Promise.resolve(symbols);
|
||||
}
|
||||
async doCodeActions(
|
||||
uri: string,
|
||||
range: cssService.Range,
|
||||
context: cssService.CodeActionContext
|
||||
): Promise<cssService.Command[]> {
|
||||
let document = this._getTextDocument(uri);
|
||||
let stylesheet = this._languageService.parseStylesheet(document);
|
||||
let actions = this._languageService.doCodeActions(document, range, context, stylesheet);
|
||||
return Promise.resolve(actions);
|
||||
}
|
||||
async findDocumentColors(uri: string): Promise<cssService.ColorInformation[]> {
|
||||
let document = this._getTextDocument(uri);
|
||||
let stylesheet = this._languageService.parseStylesheet(document);
|
||||
let colorSymbols = this._languageService.findDocumentColors(document, stylesheet);
|
||||
return Promise.resolve(colorSymbols);
|
||||
}
|
||||
async getColorPresentations(
|
||||
uri: string,
|
||||
color: cssService.Color,
|
||||
range: cssService.Range
|
||||
): Promise<cssService.ColorPresentation[]> {
|
||||
let document = this._getTextDocument(uri);
|
||||
let stylesheet = this._languageService.parseStylesheet(document);
|
||||
let colorPresentations = this._languageService.getColorPresentations(
|
||||
document,
|
||||
stylesheet,
|
||||
color,
|
||||
range
|
||||
);
|
||||
return Promise.resolve(colorPresentations);
|
||||
}
|
||||
async getFoldingRanges(
|
||||
uri: string,
|
||||
context?: { rangeLimit?: number }
|
||||
): Promise<cssService.FoldingRange[]> {
|
||||
let document = this._getTextDocument(uri);
|
||||
let ranges = this._languageService.getFoldingRanges(document, context);
|
||||
return Promise.resolve(ranges);
|
||||
}
|
||||
async getSelectionRanges(
|
||||
uri: string,
|
||||
positions: cssService.Position[]
|
||||
): Promise<cssService.SelectionRange[]> {
|
||||
let document = this._getTextDocument(uri);
|
||||
let stylesheet = this._languageService.parseStylesheet(document);
|
||||
let ranges = this._languageService.getSelectionRanges(document, positions, stylesheet);
|
||||
return Promise.resolve(ranges);
|
||||
}
|
||||
async doRename(
|
||||
uri: string,
|
||||
position: cssService.Position,
|
||||
newName: string
|
||||
): Promise<cssService.WorkspaceEdit> {
|
||||
let document = this._getTextDocument(uri);
|
||||
let stylesheet = this._languageService.parseStylesheet(document);
|
||||
let renames = this._languageService.doRename(document, position, newName, stylesheet);
|
||||
return Promise.resolve(renames);
|
||||
}
|
||||
private _getTextDocument(uri: string): cssService.TextDocument {
|
||||
let models = this._ctx.getMirrorModels();
|
||||
for (let model of models) {
|
||||
if (model.uri.toString() === uri) {
|
||||
return cssService.TextDocument.create(
|
||||
uri,
|
||||
this._languageId,
|
||||
model.version,
|
||||
model.getValue()
|
||||
);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
export interface ICreateData {
|
||||
languageId: string;
|
||||
options: Options
|
||||
}
|
||||
|
||||
export function create(ctx: worker.IWorkerContext, createData: ICreateData): CSSWorker {
|
||||
return new CSSWorker(ctx, createData);
|
||||
}
|
||||
12
monaco-css/src/fillers/monaco-editor-core-amd.ts
Normal file
12
monaco-css/src/fillers/monaco-editor-core-amd.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Resolves with the global monaco API
|
||||
|
||||
declare var define;
|
||||
|
||||
define([], function () {
|
||||
return (<any>self).monaco;
|
||||
});
|
||||
6
monaco-css/src/fillers/monaco-editor-core.ts
Normal file
6
monaco-css/src/fillers/monaco-editor-core.ts
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
export * from 'monaco-editor-core';
|
||||
46
monaco-css/src/fillers/vscode-nls.ts
Normal file
46
monaco-css/src/fillers/vscode-nls.ts
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
export interface Options {
|
||||
locale?: string;
|
||||
cacheLanguageResolution?: boolean;
|
||||
}
|
||||
export interface LocalizeInfo {
|
||||
key: string;
|
||||
comment: string[];
|
||||
}
|
||||
export interface LocalizeFunc {
|
||||
(info: LocalizeInfo, message: string, ...args: any[]): string;
|
||||
(key: string, message: string, ...args: any[]): string;
|
||||
}
|
||||
export interface LoadFunc {
|
||||
(file?: string): LocalizeFunc;
|
||||
}
|
||||
|
||||
function format(message: string, args: any[]): string {
|
||||
let result: string;
|
||||
|
||||
if (args.length === 0) {
|
||||
result = message;
|
||||
} else {
|
||||
result = message.replace(/\{(\d+)\}/g, (match, rest) => {
|
||||
let index = rest[0];
|
||||
return typeof args[index] !== 'undefined' ? args[index] : match;
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function localize(key: string | LocalizeInfo, message: string, ...args: any[]): string {
|
||||
return format(message, args);
|
||||
}
|
||||
|
||||
export function loadMessageBundle(file?: string): LocalizeFunc {
|
||||
return localize;
|
||||
}
|
||||
|
||||
export function config(opt?: Options | string): LoadFunc {
|
||||
return loadMessageBundle;
|
||||
}
|
||||
725
monaco-css/src/languageFeatures.ts
Normal file
725
monaco-css/src/languageFeatures.ts
Normal file
|
|
@ -0,0 +1,725 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { LanguageServiceDefaults } from './monaco.contribution';
|
||||
import type { CSSWorker } from './cssWorker';
|
||||
import * as cssService from 'vscode-css-languageservice';
|
||||
import {
|
||||
languages,
|
||||
editor,
|
||||
IMarkdownString,
|
||||
Uri,
|
||||
Position,
|
||||
IRange,
|
||||
Range,
|
||||
CancellationToken,
|
||||
IDisposable,
|
||||
MarkerSeverity
|
||||
} from './fillers/monaco-editor-core';
|
||||
import { TextEdit } from 'vscode-css-languageservice';
|
||||
import { InsertReplaceEdit } from 'vscode-languageserver-types';
|
||||
|
||||
export interface WorkerAccessor {
|
||||
(first: Uri, ...more: Uri[]): Promise<CSSWorker>;
|
||||
}
|
||||
|
||||
// --- diagnostics --- ---
|
||||
|
||||
export class DiagnosticsAdapter {
|
||||
private _disposables: IDisposable[] = [];
|
||||
private _listener: { [uri: string]: IDisposable } = Object.create(null);
|
||||
|
||||
constructor(
|
||||
private _languageId: string,
|
||||
private _worker: WorkerAccessor,
|
||||
defaults: LanguageServiceDefaults
|
||||
) {
|
||||
const onModelAdd = (model: editor.IModel): void => {
|
||||
let modeId = model.getLanguageId();
|
||||
if (modeId !== this._languageId) {
|
||||
return;
|
||||
}
|
||||
|
||||
let handle: number;
|
||||
this._listener[model.uri.toString()] = model.onDidChangeContent(() => {
|
||||
window.clearTimeout(handle);
|
||||
handle = window.setTimeout(() => this._doValidate(model.uri, modeId), 500);
|
||||
});
|
||||
|
||||
this._doValidate(model.uri, modeId);
|
||||
};
|
||||
|
||||
const onModelRemoved = (model: editor.IModel): void => {
|
||||
editor.setModelMarkers(model, this._languageId, []);
|
||||
|
||||
let uriStr = model.uri.toString();
|
||||
let listener = this._listener[uriStr];
|
||||
if (listener) {
|
||||
listener.dispose();
|
||||
delete this._listener[uriStr];
|
||||
}
|
||||
};
|
||||
|
||||
this._disposables.push(editor.onDidCreateModel(onModelAdd));
|
||||
this._disposables.push(editor.onWillDisposeModel(onModelRemoved));
|
||||
this._disposables.push(
|
||||
editor.onDidChangeModelLanguage((event) => {
|
||||
onModelRemoved(event.model);
|
||||
onModelAdd(event.model);
|
||||
})
|
||||
);
|
||||
|
||||
defaults.onDidChange((_) => {
|
||||
editor.getModels().forEach((model) => {
|
||||
if (model.getLanguageId() === this._languageId) {
|
||||
onModelRemoved(model);
|
||||
onModelAdd(model);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
this._disposables.push({
|
||||
dispose: () => {
|
||||
for (let key in this._listener) {
|
||||
this._listener[key].dispose();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
editor.getModels().forEach(onModelAdd);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
this._disposables.forEach((d) => d && d.dispose());
|
||||
this._disposables = [];
|
||||
}
|
||||
|
||||
private _doValidate(resource: Uri, languageId: string): void {
|
||||
this._worker(resource)
|
||||
.then((worker) => {
|
||||
return worker.doValidation(resource.toString());
|
||||
})
|
||||
.then((diagnostics) => {
|
||||
const markers = diagnostics.map((d) => toDiagnostics(resource, d));
|
||||
let model = editor.getModel(resource);
|
||||
if (model && model.getLanguageId() === languageId) {
|
||||
editor.setModelMarkers(model, languageId, markers);
|
||||
}
|
||||
})
|
||||
.then(undefined, (err) => {
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function toSeverity(lsSeverity: number): MarkerSeverity {
|
||||
switch (lsSeverity) {
|
||||
case cssService.DiagnosticSeverity.Error:
|
||||
return MarkerSeverity.Error;
|
||||
case cssService.DiagnosticSeverity.Warning:
|
||||
return MarkerSeverity.Warning;
|
||||
case cssService.DiagnosticSeverity.Information:
|
||||
return MarkerSeverity.Info;
|
||||
case cssService.DiagnosticSeverity.Hint:
|
||||
return MarkerSeverity.Hint;
|
||||
default:
|
||||
return MarkerSeverity.Info;
|
||||
}
|
||||
}
|
||||
|
||||
function toDiagnostics(resource: Uri, diag: cssService.Diagnostic): editor.IMarkerData {
|
||||
let code = typeof diag.code === 'number' ? String(diag.code) : <string>diag.code;
|
||||
|
||||
return {
|
||||
severity: toSeverity(diag.severity),
|
||||
startLineNumber: diag.range.start.line + 1,
|
||||
startColumn: diag.range.start.character + 1,
|
||||
endLineNumber: diag.range.end.line + 1,
|
||||
endColumn: diag.range.end.character + 1,
|
||||
message: diag.message,
|
||||
code: code,
|
||||
source: diag.source
|
||||
};
|
||||
}
|
||||
|
||||
// --- completion ------
|
||||
|
||||
function fromPosition(position: Position): cssService.Position {
|
||||
if (!position) {
|
||||
return void 0;
|
||||
}
|
||||
return { character: position.column - 1, line: position.lineNumber - 1 };
|
||||
}
|
||||
|
||||
function fromRange(range: IRange): cssService.Range {
|
||||
if (!range) {
|
||||
return void 0;
|
||||
}
|
||||
return {
|
||||
start: {
|
||||
line: range.startLineNumber - 1,
|
||||
character: range.startColumn - 1
|
||||
},
|
||||
end: { line: range.endLineNumber - 1, character: range.endColumn - 1 }
|
||||
};
|
||||
}
|
||||
|
||||
function toRange(range: cssService.Range): Range {
|
||||
if (!range) {
|
||||
return void 0;
|
||||
}
|
||||
return new Range(
|
||||
range.start.line + 1,
|
||||
range.start.character + 1,
|
||||
range.end.line + 1,
|
||||
range.end.character + 1
|
||||
);
|
||||
}
|
||||
|
||||
function isInsertReplaceEdit(edit: TextEdit | InsertReplaceEdit): edit is InsertReplaceEdit {
|
||||
return (
|
||||
typeof (<InsertReplaceEdit>edit).insert !== 'undefined' &&
|
||||
typeof (<InsertReplaceEdit>edit).replace !== 'undefined'
|
||||
);
|
||||
}
|
||||
|
||||
function toCompletionItemKind(kind: number): languages.CompletionItemKind {
|
||||
let mItemKind = languages.CompletionItemKind;
|
||||
|
||||
switch (kind) {
|
||||
case cssService.CompletionItemKind.Text:
|
||||
return mItemKind.Text;
|
||||
case cssService.CompletionItemKind.Method:
|
||||
return mItemKind.Method;
|
||||
case cssService.CompletionItemKind.Function:
|
||||
return mItemKind.Function;
|
||||
case cssService.CompletionItemKind.Constructor:
|
||||
return mItemKind.Constructor;
|
||||
case cssService.CompletionItemKind.Field:
|
||||
return mItemKind.Field;
|
||||
case cssService.CompletionItemKind.Variable:
|
||||
return mItemKind.Variable;
|
||||
case cssService.CompletionItemKind.Class:
|
||||
return mItemKind.Class;
|
||||
case cssService.CompletionItemKind.Interface:
|
||||
return mItemKind.Interface;
|
||||
case cssService.CompletionItemKind.Module:
|
||||
return mItemKind.Module;
|
||||
case cssService.CompletionItemKind.Property:
|
||||
return mItemKind.Property;
|
||||
case cssService.CompletionItemKind.Unit:
|
||||
return mItemKind.Unit;
|
||||
case cssService.CompletionItemKind.Value:
|
||||
return mItemKind.Value;
|
||||
case cssService.CompletionItemKind.Enum:
|
||||
return mItemKind.Enum;
|
||||
case cssService.CompletionItemKind.Keyword:
|
||||
return mItemKind.Keyword;
|
||||
case cssService.CompletionItemKind.Snippet:
|
||||
return mItemKind.Snippet;
|
||||
case cssService.CompletionItemKind.Color:
|
||||
return mItemKind.Color;
|
||||
case cssService.CompletionItemKind.File:
|
||||
return mItemKind.File;
|
||||
case cssService.CompletionItemKind.Reference:
|
||||
return mItemKind.Reference;
|
||||
}
|
||||
return mItemKind.Property;
|
||||
}
|
||||
|
||||
function toTextEdit(textEdit: cssService.TextEdit): editor.ISingleEditOperation {
|
||||
if (!textEdit) {
|
||||
return void 0;
|
||||
}
|
||||
return {
|
||||
range: toRange(textEdit.range),
|
||||
text: textEdit.newText
|
||||
};
|
||||
}
|
||||
|
||||
function toCommand(c: cssService.Command | undefined): languages.Command {
|
||||
return c && c.command === 'editor.action.triggerSuggest' ? { id: c.command, title: c.title, arguments: c.arguments } : undefined
|
||||
}
|
||||
|
||||
export class CompletionAdapter implements languages.CompletionItemProvider {
|
||||
constructor(private _worker: WorkerAccessor) {}
|
||||
|
||||
public get triggerCharacters(): string[] {
|
||||
return ['/', '-', ':'];
|
||||
}
|
||||
|
||||
provideCompletionItems(
|
||||
model: editor.IReadOnlyModel,
|
||||
position: Position,
|
||||
context: languages.CompletionContext,
|
||||
token: CancellationToken
|
||||
): Promise<languages.CompletionList> {
|
||||
const resource = model.uri;
|
||||
|
||||
return this._worker(resource)
|
||||
.then((worker) => {
|
||||
return worker.doComplete(resource.toString(), fromPosition(position));
|
||||
})
|
||||
.then((info) => {
|
||||
if (!info) {
|
||||
return;
|
||||
}
|
||||
const wordInfo = model.getWordUntilPosition(position);
|
||||
const wordRange = new Range(
|
||||
position.lineNumber,
|
||||
wordInfo.startColumn,
|
||||
position.lineNumber,
|
||||
wordInfo.endColumn
|
||||
);
|
||||
|
||||
let items: languages.CompletionItem[] = info.items.map((entry) => {
|
||||
let item: languages.CompletionItem = {
|
||||
label: entry.label,
|
||||
insertText: entry.insertText || entry.label,
|
||||
sortText: entry.sortText,
|
||||
filterText: entry.filterText,
|
||||
documentation: entry.documentation,
|
||||
detail: entry.detail,
|
||||
command: toCommand(entry.command),
|
||||
range: wordRange,
|
||||
kind: toCompletionItemKind(entry.kind)
|
||||
};
|
||||
if (entry.textEdit) {
|
||||
if (isInsertReplaceEdit(entry.textEdit)) {
|
||||
item.range = {
|
||||
insert: toRange(entry.textEdit.insert),
|
||||
replace: toRange(entry.textEdit.replace)
|
||||
};
|
||||
} else {
|
||||
item.range = toRange(entry.textEdit.range);
|
||||
}
|
||||
item.insertText = entry.textEdit.newText;
|
||||
}
|
||||
if (entry.additionalTextEdits) {
|
||||
item.additionalTextEdits = entry.additionalTextEdits.map(toTextEdit);
|
||||
}
|
||||
if (entry.insertTextFormat === cssService.InsertTextFormat.Snippet) {
|
||||
item.insertTextRules = languages.CompletionItemInsertTextRule.InsertAsSnippet;
|
||||
}
|
||||
return item;
|
||||
});
|
||||
|
||||
return {
|
||||
isIncomplete: info.isIncomplete,
|
||||
suggestions: items
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function isMarkupContent(thing: any): thing is cssService.MarkupContent {
|
||||
return (
|
||||
thing && typeof thing === 'object' && typeof (<cssService.MarkupContent>thing).kind === 'string'
|
||||
);
|
||||
}
|
||||
|
||||
function toMarkdownString(
|
||||
entry: cssService.MarkupContent | cssService.MarkedString
|
||||
): IMarkdownString {
|
||||
if (typeof entry === 'string') {
|
||||
return {
|
||||
value: entry
|
||||
};
|
||||
}
|
||||
if (isMarkupContent(entry)) {
|
||||
if (entry.kind === 'plaintext') {
|
||||
return {
|
||||
value: entry.value.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&')
|
||||
};
|
||||
}
|
||||
return {
|
||||
value: entry.value
|
||||
};
|
||||
}
|
||||
|
||||
return { value: '```' + entry.language + '\n' + entry.value + '\n```\n' };
|
||||
}
|
||||
|
||||
function toMarkedStringArray(
|
||||
contents: cssService.MarkupContent | cssService.MarkedString | cssService.MarkedString[]
|
||||
): IMarkdownString[] {
|
||||
if (!contents) {
|
||||
return void 0;
|
||||
}
|
||||
if (Array.isArray(contents)) {
|
||||
return contents.map(toMarkdownString);
|
||||
}
|
||||
return [toMarkdownString(contents)];
|
||||
}
|
||||
|
||||
// --- hover ------
|
||||
|
||||
export class HoverAdapter implements languages.HoverProvider {
|
||||
constructor(private _worker: WorkerAccessor) {}
|
||||
|
||||
provideHover(
|
||||
model: editor.IReadOnlyModel,
|
||||
position: Position,
|
||||
token: CancellationToken
|
||||
): Promise<languages.Hover> {
|
||||
let resource = model.uri;
|
||||
|
||||
return this._worker(resource)
|
||||
.then((worker) => {
|
||||
return worker.doHover(resource.toString(), fromPosition(position));
|
||||
})
|
||||
.then((info) => {
|
||||
if (!info) {
|
||||
return;
|
||||
}
|
||||
return <languages.Hover>{
|
||||
range: toRange(info.range),
|
||||
contents: toMarkedStringArray(info.contents)
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// --- document highlights ------
|
||||
|
||||
function toDocumentHighlightKind(kind: number): languages.DocumentHighlightKind {
|
||||
switch (kind) {
|
||||
case cssService.DocumentHighlightKind.Read:
|
||||
return languages.DocumentHighlightKind.Read;
|
||||
case cssService.DocumentHighlightKind.Write:
|
||||
return languages.DocumentHighlightKind.Write;
|
||||
case cssService.DocumentHighlightKind.Text:
|
||||
return languages.DocumentHighlightKind.Text;
|
||||
}
|
||||
return languages.DocumentHighlightKind.Text;
|
||||
}
|
||||
|
||||
export class DocumentHighlightAdapter implements languages.DocumentHighlightProvider {
|
||||
constructor(private _worker: WorkerAccessor) {}
|
||||
|
||||
public provideDocumentHighlights(
|
||||
model: editor.IReadOnlyModel,
|
||||
position: Position,
|
||||
token: CancellationToken
|
||||
): Promise<languages.DocumentHighlight[]> {
|
||||
const resource = model.uri;
|
||||
|
||||
return this._worker(resource)
|
||||
.then((worker) => {
|
||||
return worker.findDocumentHighlights(resource.toString(), fromPosition(position));
|
||||
})
|
||||
.then((entries) => {
|
||||
if (!entries) {
|
||||
return;
|
||||
}
|
||||
return entries.map((entry) => {
|
||||
return <languages.DocumentHighlight>{
|
||||
range: toRange(entry.range),
|
||||
kind: toDocumentHighlightKind(entry.kind)
|
||||
};
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// --- definition ------
|
||||
|
||||
function toLocation(location: cssService.Location): languages.Location {
|
||||
return {
|
||||
uri: Uri.parse(location.uri),
|
||||
range: toRange(location.range)
|
||||
};
|
||||
}
|
||||
|
||||
export class DefinitionAdapter {
|
||||
constructor(private _worker: WorkerAccessor) {}
|
||||
|
||||
public provideDefinition(
|
||||
model: editor.IReadOnlyModel,
|
||||
position: Position,
|
||||
token: CancellationToken
|
||||
): Promise<languages.Definition> {
|
||||
const resource = model.uri;
|
||||
|
||||
return this._worker(resource)
|
||||
.then((worker) => {
|
||||
return worker.findDefinition(resource.toString(), fromPosition(position));
|
||||
})
|
||||
.then((definition) => {
|
||||
if (!definition) {
|
||||
return;
|
||||
}
|
||||
return [toLocation(definition)];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// --- references ------
|
||||
|
||||
export class ReferenceAdapter implements languages.ReferenceProvider {
|
||||
constructor(private _worker: WorkerAccessor) {}
|
||||
|
||||
provideReferences(
|
||||
model: editor.IReadOnlyModel,
|
||||
position: Position,
|
||||
context: languages.ReferenceContext,
|
||||
token: CancellationToken
|
||||
): Promise<languages.Location[]> {
|
||||
const resource = model.uri;
|
||||
|
||||
return this._worker(resource)
|
||||
.then((worker) => {
|
||||
return worker.findReferences(resource.toString(), fromPosition(position));
|
||||
})
|
||||
.then((entries) => {
|
||||
if (!entries) {
|
||||
return;
|
||||
}
|
||||
return entries.map(toLocation);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// --- rename ------
|
||||
|
||||
function toWorkspaceEdit(edit: cssService.WorkspaceEdit): languages.WorkspaceEdit {
|
||||
if (!edit || !edit.changes) {
|
||||
return void 0;
|
||||
}
|
||||
let resourceEdits: languages.WorkspaceTextEdit[] = [];
|
||||
for (let uri in edit.changes) {
|
||||
const _uri = Uri.parse(uri);
|
||||
// let edits: languages.TextEdit[] = [];
|
||||
for (let e of edit.changes[uri]) {
|
||||
resourceEdits.push({
|
||||
resource: _uri,
|
||||
edit: {
|
||||
range: toRange(e.range),
|
||||
text: e.newText
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
return {
|
||||
edits: resourceEdits
|
||||
};
|
||||
}
|
||||
|
||||
export class RenameAdapter implements languages.RenameProvider {
|
||||
constructor(private _worker: WorkerAccessor) {}
|
||||
|
||||
provideRenameEdits(
|
||||
model: editor.IReadOnlyModel,
|
||||
position: Position,
|
||||
newName: string,
|
||||
token: CancellationToken
|
||||
): Promise<languages.WorkspaceEdit> {
|
||||
const resource = model.uri;
|
||||
|
||||
return this._worker(resource)
|
||||
.then((worker) => {
|
||||
return worker.doRename(resource.toString(), fromPosition(position), newName);
|
||||
})
|
||||
.then((edit) => {
|
||||
return toWorkspaceEdit(edit);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// --- document symbols ------
|
||||
|
||||
function toSymbolKind(kind: cssService.SymbolKind): languages.SymbolKind {
|
||||
let mKind = languages.SymbolKind;
|
||||
|
||||
switch (kind) {
|
||||
case cssService.SymbolKind.File:
|
||||
return mKind.Array;
|
||||
case cssService.SymbolKind.Module:
|
||||
return mKind.Module;
|
||||
case cssService.SymbolKind.Namespace:
|
||||
return mKind.Namespace;
|
||||
case cssService.SymbolKind.Package:
|
||||
return mKind.Package;
|
||||
case cssService.SymbolKind.Class:
|
||||
return mKind.Class;
|
||||
case cssService.SymbolKind.Method:
|
||||
return mKind.Method;
|
||||
case cssService.SymbolKind.Property:
|
||||
return mKind.Property;
|
||||
case cssService.SymbolKind.Field:
|
||||
return mKind.Field;
|
||||
case cssService.SymbolKind.Constructor:
|
||||
return mKind.Constructor;
|
||||
case cssService.SymbolKind.Enum:
|
||||
return mKind.Enum;
|
||||
case cssService.SymbolKind.Interface:
|
||||
return mKind.Interface;
|
||||
case cssService.SymbolKind.Function:
|
||||
return mKind.Function;
|
||||
case cssService.SymbolKind.Variable:
|
||||
return mKind.Variable;
|
||||
case cssService.SymbolKind.Constant:
|
||||
return mKind.Constant;
|
||||
case cssService.SymbolKind.String:
|
||||
return mKind.String;
|
||||
case cssService.SymbolKind.Number:
|
||||
return mKind.Number;
|
||||
case cssService.SymbolKind.Boolean:
|
||||
return mKind.Boolean;
|
||||
case cssService.SymbolKind.Array:
|
||||
return mKind.Array;
|
||||
}
|
||||
return mKind.Function;
|
||||
}
|
||||
|
||||
export class DocumentSymbolAdapter implements languages.DocumentSymbolProvider {
|
||||
constructor(private _worker: WorkerAccessor) {}
|
||||
|
||||
public provideDocumentSymbols(
|
||||
model: editor.IReadOnlyModel,
|
||||
token: CancellationToken
|
||||
): Promise<languages.DocumentSymbol[]> {
|
||||
const resource = model.uri;
|
||||
|
||||
return this._worker(resource)
|
||||
.then((worker) => worker.findDocumentSymbols(resource.toString()))
|
||||
.then((items) => {
|
||||
if (!items) {
|
||||
return;
|
||||
}
|
||||
return items.map((item) => ({
|
||||
name: item.name,
|
||||
detail: '',
|
||||
containerName: item.containerName,
|
||||
kind: toSymbolKind(item.kind),
|
||||
tags: [],
|
||||
range: toRange(item.location.range),
|
||||
selectionRange: toRange(item.location.range)
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export class DocumentColorAdapter implements languages.DocumentColorProvider {
|
||||
constructor(private _worker: WorkerAccessor) {}
|
||||
|
||||
public provideDocumentColors(
|
||||
model: editor.IReadOnlyModel,
|
||||
token: CancellationToken
|
||||
): Promise<languages.IColorInformation[]> {
|
||||
const resource = model.uri;
|
||||
|
||||
return this._worker(resource)
|
||||
.then((worker) => worker.findDocumentColors(resource.toString()))
|
||||
.then((infos) => {
|
||||
if (!infos) {
|
||||
return;
|
||||
}
|
||||
return infos.map((item) => ({
|
||||
color: item.color,
|
||||
range: toRange(item.range)
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
public provideColorPresentations(
|
||||
model: editor.IReadOnlyModel,
|
||||
info: languages.IColorInformation,
|
||||
token: CancellationToken
|
||||
): Promise<languages.IColorPresentation[]> {
|
||||
const resource = model.uri;
|
||||
|
||||
return this._worker(resource)
|
||||
.then((worker) =>
|
||||
worker.getColorPresentations(resource.toString(), info.color, fromRange(info.range))
|
||||
)
|
||||
.then((presentations) => {
|
||||
if (!presentations) {
|
||||
return;
|
||||
}
|
||||
return presentations.map((presentation) => {
|
||||
let item: languages.IColorPresentation = {
|
||||
label: presentation.label
|
||||
};
|
||||
if (presentation.textEdit) {
|
||||
item.textEdit = toTextEdit(presentation.textEdit);
|
||||
}
|
||||
if (presentation.additionalTextEdits) {
|
||||
item.additionalTextEdits = presentation.additionalTextEdits.map(toTextEdit);
|
||||
}
|
||||
return item;
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export class FoldingRangeAdapter implements languages.FoldingRangeProvider {
|
||||
constructor(private _worker: WorkerAccessor) {}
|
||||
|
||||
public provideFoldingRanges(
|
||||
model: editor.IReadOnlyModel,
|
||||
context: languages.FoldingContext,
|
||||
token: CancellationToken
|
||||
): Promise<languages.FoldingRange[]> {
|
||||
const resource = model.uri;
|
||||
|
||||
return this._worker(resource)
|
||||
.then((worker) => worker.getFoldingRanges(resource.toString(), context))
|
||||
.then((ranges) => {
|
||||
if (!ranges) {
|
||||
return;
|
||||
}
|
||||
return ranges.map((range) => {
|
||||
let result: languages.FoldingRange = {
|
||||
start: range.startLine + 1,
|
||||
end: range.endLine + 1
|
||||
};
|
||||
if (typeof range.kind !== 'undefined') {
|
||||
result.kind = toFoldingRangeKind(<cssService.FoldingRangeKind>range.kind);
|
||||
}
|
||||
return result;
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function toFoldingRangeKind(kind: cssService.FoldingRangeKind): languages.FoldingRangeKind {
|
||||
switch (kind) {
|
||||
case cssService.FoldingRangeKind.Comment:
|
||||
return languages.FoldingRangeKind.Comment;
|
||||
case cssService.FoldingRangeKind.Imports:
|
||||
return languages.FoldingRangeKind.Imports;
|
||||
case cssService.FoldingRangeKind.Region:
|
||||
return languages.FoldingRangeKind.Region;
|
||||
}
|
||||
}
|
||||
|
||||
export class SelectionRangeAdapter implements languages.SelectionRangeProvider {
|
||||
constructor(private _worker: WorkerAccessor) {}
|
||||
|
||||
public provideSelectionRanges(
|
||||
model: editor.IReadOnlyModel,
|
||||
positions: Position[],
|
||||
token: CancellationToken
|
||||
): Promise<languages.SelectionRange[][]> {
|
||||
const resource = model.uri;
|
||||
|
||||
return this._worker(resource)
|
||||
.then((worker) => worker.getSelectionRanges(resource.toString(), positions.map(fromPosition)))
|
||||
.then((selectionRanges) => {
|
||||
if (!selectionRanges) {
|
||||
return;
|
||||
}
|
||||
return selectionRanges.map((selectionRange) => {
|
||||
const result: languages.SelectionRange[] = [];
|
||||
while (selectionRange) {
|
||||
result.push({ range: toRange(selectionRange.range) });
|
||||
selectionRange = selectionRange.parent;
|
||||
}
|
||||
return result;
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
318
monaco-css/src/monaco.contribution.ts
Normal file
318
monaco-css/src/monaco.contribution.ts
Normal file
|
|
@ -0,0 +1,318 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as mode from './cssMode';
|
||||
import { languages, Emitter, IEvent } from './fillers/monaco-editor-core';
|
||||
|
||||
export interface Options {
|
||||
readonly validate?: boolean;
|
||||
readonly lint?: {
|
||||
readonly compatibleVendorPrefixes?: 'ignore' | 'warning' | 'error';
|
||||
readonly vendorPrefix?: 'ignore' | 'warning' | 'error';
|
||||
readonly duplicateProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly emptyRules?: 'ignore' | 'warning' | 'error';
|
||||
readonly importStatement?: 'ignore' | 'warning' | 'error';
|
||||
readonly boxModel?: 'ignore' | 'warning' | 'error';
|
||||
readonly universalSelector?: 'ignore' | 'warning' | 'error';
|
||||
readonly zeroUnits?: 'ignore' | 'warning' | 'error';
|
||||
readonly fontFaceProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly hexColorLength?: 'ignore' | 'warning' | 'error';
|
||||
readonly argumentsInColorFunction?: 'ignore' | 'warning' | 'error';
|
||||
readonly unknownProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly ieHack?: 'ignore' | 'warning' | 'error';
|
||||
readonly unknownVendorSpecificProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly propertyIgnoredDueToDisplay?: 'ignore' | 'warning' | 'error';
|
||||
readonly important?: 'ignore' | 'warning' | 'error';
|
||||
readonly float?: 'ignore' | 'warning' | 'error';
|
||||
readonly idSelector?: 'ignore' | 'warning' | 'error';
|
||||
};
|
||||
/**
|
||||
* Configures the CSS data types known by the langauge service.
|
||||
*/
|
||||
readonly data?: CSSDataConfiguration;
|
||||
}
|
||||
|
||||
export interface ModeConfiguration {
|
||||
/**
|
||||
* Defines whether the built-in completionItemProvider is enabled.
|
||||
*/
|
||||
readonly completionItems?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in hoverProvider is enabled.
|
||||
*/
|
||||
readonly hovers?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in documentSymbolProvider is enabled.
|
||||
*/
|
||||
readonly documentSymbols?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in definitions provider is enabled.
|
||||
*/
|
||||
readonly definitions?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in references provider is enabled.
|
||||
*/
|
||||
readonly references?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in references provider is enabled.
|
||||
*/
|
||||
readonly documentHighlights?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in rename provider is enabled.
|
||||
*/
|
||||
readonly rename?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in color provider is enabled.
|
||||
*/
|
||||
readonly colors?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in foldingRange provider is enabled.
|
||||
*/
|
||||
readonly foldingRanges?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in diagnostic provider is enabled.
|
||||
*/
|
||||
readonly diagnostics?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in selection range provider is enabled.
|
||||
*/
|
||||
readonly selectionRanges?: boolean;
|
||||
}
|
||||
|
||||
export interface LanguageServiceDefaults {
|
||||
readonly languageId: string;
|
||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||
|
||||
readonly modeConfiguration: ModeConfiguration;
|
||||
readonly options: Options;
|
||||
setOptions(options: Options): void;
|
||||
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
||||
|
||||
/** @deprecated Use options instead */
|
||||
readonly diagnosticsOptions: DiagnosticsOptions;
|
||||
/** @deprecated Use setOptions instead */
|
||||
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
||||
}
|
||||
|
||||
/** @deprecated Use Options instead */
|
||||
export type DiagnosticsOptions = Options;
|
||||
|
||||
// --- CSS configuration and defaults ---------
|
||||
|
||||
class LanguageServiceDefaultsImpl implements LanguageServiceDefaults {
|
||||
private _onDidChange = new Emitter<LanguageServiceDefaults>();
|
||||
private _options: Options;
|
||||
private _modeConfiguration: ModeConfiguration;
|
||||
private _languageId: string;
|
||||
|
||||
constructor(
|
||||
languageId: string,
|
||||
options: Options,
|
||||
modeConfiguration: ModeConfiguration
|
||||
) {
|
||||
this._languageId = languageId;
|
||||
this.setOptions(options);
|
||||
this.setModeConfiguration(modeConfiguration);
|
||||
}
|
||||
|
||||
get onDidChange(): IEvent<LanguageServiceDefaults> {
|
||||
return this._onDidChange.event;
|
||||
}
|
||||
|
||||
get languageId(): string {
|
||||
return this._languageId;
|
||||
}
|
||||
|
||||
get modeConfiguration(): ModeConfiguration {
|
||||
return this._modeConfiguration;
|
||||
}
|
||||
|
||||
get diagnosticsOptions(): Options {
|
||||
return this.options;
|
||||
}
|
||||
|
||||
get options(): Options {
|
||||
return this._options;
|
||||
}
|
||||
|
||||
setOptions(options: Options): void {
|
||||
this._options = options || Object.create(null);
|
||||
this._onDidChange.fire(this);
|
||||
}
|
||||
|
||||
setDiagnosticsOptions(options: Options): void {
|
||||
this.setOptions(options);
|
||||
}
|
||||
|
||||
setModeConfiguration(modeConfiguration: ModeConfiguration): void {
|
||||
this._modeConfiguration = modeConfiguration || Object.create(null);
|
||||
this._onDidChange.fire(this);
|
||||
}
|
||||
}
|
||||
|
||||
const optionsDefault: Required<Options> = {
|
||||
validate: true,
|
||||
lint: {
|
||||
compatibleVendorPrefixes: 'ignore',
|
||||
vendorPrefix: 'warning',
|
||||
duplicateProperties: 'warning',
|
||||
emptyRules: 'warning',
|
||||
importStatement: 'ignore',
|
||||
boxModel: 'ignore',
|
||||
universalSelector: 'ignore',
|
||||
zeroUnits: 'ignore',
|
||||
fontFaceProperties: 'warning',
|
||||
hexColorLength: 'error',
|
||||
argumentsInColorFunction: 'error',
|
||||
unknownProperties: 'warning',
|
||||
ieHack: 'ignore',
|
||||
unknownVendorSpecificProperties: 'ignore',
|
||||
propertyIgnoredDueToDisplay: 'warning',
|
||||
important: 'ignore',
|
||||
float: 'ignore',
|
||||
idSelector: 'ignore'
|
||||
},
|
||||
data: { useDefaultDataProvider: true }
|
||||
};
|
||||
|
||||
const modeConfigurationDefault: Required<ModeConfiguration> = {
|
||||
completionItems: true,
|
||||
hovers: true,
|
||||
documentSymbols: true,
|
||||
definitions: true,
|
||||
references: true,
|
||||
documentHighlights: true,
|
||||
rename: true,
|
||||
colors: true,
|
||||
foldingRanges: true,
|
||||
diagnostics: true,
|
||||
selectionRanges: true
|
||||
};
|
||||
|
||||
export const cssDefaults: LanguageServiceDefaults = new LanguageServiceDefaultsImpl(
|
||||
'css',
|
||||
optionsDefault,
|
||||
modeConfigurationDefault
|
||||
);
|
||||
export const scssDefaults: LanguageServiceDefaults = new LanguageServiceDefaultsImpl(
|
||||
'scss',
|
||||
optionsDefault,
|
||||
modeConfigurationDefault
|
||||
);
|
||||
export const lessDefaults: LanguageServiceDefaults = new LanguageServiceDefaultsImpl(
|
||||
'less',
|
||||
optionsDefault,
|
||||
modeConfigurationDefault
|
||||
);
|
||||
|
||||
// export to the global based API
|
||||
(<any>languages).css = { cssDefaults, lessDefaults, scssDefaults };
|
||||
|
||||
// --- Registration to monaco editor ---
|
||||
|
||||
function getMode(): Promise<typeof mode> {
|
||||
return import('./cssMode');
|
||||
}
|
||||
|
||||
languages.onLanguage('less', () => {
|
||||
getMode().then((mode) => mode.setupMode(lessDefaults));
|
||||
});
|
||||
|
||||
languages.onLanguage('scss', () => {
|
||||
getMode().then((mode) => mode.setupMode(scssDefaults));
|
||||
});
|
||||
|
||||
languages.onLanguage('css', () => {
|
||||
getMode().then((mode) => mode.setupMode(cssDefaults));
|
||||
});
|
||||
|
||||
|
||||
// CSS Data
|
||||
|
||||
export interface CSSDataConfiguration {
|
||||
/**
|
||||
* Defines whether the standard CSS properties, at-directives, pseudoClasses and pseudoElements are shown.
|
||||
*/
|
||||
useDefaultDataProvider?: boolean;
|
||||
/**
|
||||
* Provides a set of custom data providers.
|
||||
*/
|
||||
dataProviders?: { [providerId: string]: CSSDataV1 };
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom CSS properties, at-directives, pseudoClasses and pseudoElements
|
||||
* https://github.com/microsoft/vscode-css-languageservice/blob/main/docs/customData.md
|
||||
*/
|
||||
export interface CSSDataV1 {
|
||||
version: 1 | 1.1;
|
||||
properties?: IPropertyData[];
|
||||
atDirectives?: IAtDirectiveData[];
|
||||
pseudoClasses?: IPseudoClassData[];
|
||||
pseudoElements?: IPseudoElementData[];
|
||||
}
|
||||
|
||||
export type EntryStatus = 'standard' | 'experimental' | 'nonstandard' | 'obsolete';
|
||||
|
||||
export interface IReference {
|
||||
name: string;
|
||||
url: string;
|
||||
}
|
||||
|
||||
export interface IPropertyData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
restrictions?: string[];
|
||||
status?: EntryStatus;
|
||||
syntax?: string;
|
||||
values?: IValueData[];
|
||||
references?: IReference[];
|
||||
relevance?: number;
|
||||
}
|
||||
export interface IAtDirectiveData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
status?: EntryStatus;
|
||||
references?: IReference[];
|
||||
}
|
||||
export interface IPseudoClassData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
status?: EntryStatus;
|
||||
references?: IReference[];
|
||||
}
|
||||
export interface IPseudoElementData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
status?: EntryStatus;
|
||||
references?: IReference[];
|
||||
}
|
||||
|
||||
export interface IValueData {
|
||||
name: string;
|
||||
description?: string | MarkupContent;
|
||||
browsers?: string[];
|
||||
status?: EntryStatus;
|
||||
references?: IReference[];
|
||||
}
|
||||
export interface MarkupContent {
|
||||
kind: MarkupKind;
|
||||
value: string;
|
||||
}
|
||||
export declare type MarkupKind = 'plaintext' | 'markdown';
|
||||
10
monaco-css/src/tsconfig.esm.json
Normal file
10
monaco-css/src/tsconfig.esm.json
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"outDir": "../out/esm",
|
||||
"declaration": true,
|
||||
"target": "es5",
|
||||
"lib": ["dom", "es5", "es2015.collection", "es2015.promise", "es2015.iterable"]
|
||||
}
|
||||
}
|
||||
10
monaco-css/src/tsconfig.json
Normal file
10
monaco-css/src/tsconfig.json
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"module": "amd",
|
||||
"moduleResolution": "node",
|
||||
"outDir": "../out/amd",
|
||||
"declaration": true,
|
||||
"target": "es5",
|
||||
"lib": ["dom", "es5", "es2015.collection", "es2015.promise", "es2015.iterable"]
|
||||
}
|
||||
}
|
||||
87
monaco-css/src/workerManager.ts
Normal file
87
monaco-css/src/workerManager.ts
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { LanguageServiceDefaults } from './monaco.contribution';
|
||||
import type { CSSWorker } from './cssWorker';
|
||||
import { editor, IDisposable, Uri } from './fillers/monaco-editor-core';
|
||||
|
||||
const STOP_WHEN_IDLE_FOR = 2 * 60 * 1000; // 2min
|
||||
|
||||
export class WorkerManager {
|
||||
private _defaults: LanguageServiceDefaults;
|
||||
private _idleCheckInterval: number;
|
||||
private _lastUsedTime: number;
|
||||
private _configChangeListener: IDisposable;
|
||||
|
||||
private _worker: editor.MonacoWebWorker<CSSWorker>;
|
||||
private _client: Promise<CSSWorker>;
|
||||
|
||||
constructor(defaults: LanguageServiceDefaults) {
|
||||
this._defaults = defaults;
|
||||
this._worker = null;
|
||||
this._idleCheckInterval = window.setInterval(() => this._checkIfIdle(), 30 * 1000);
|
||||
this._lastUsedTime = 0;
|
||||
this._configChangeListener = this._defaults.onDidChange(() => this._stopWorker());
|
||||
}
|
||||
|
||||
private _stopWorker(): void {
|
||||
if (this._worker) {
|
||||
this._worker.dispose();
|
||||
this._worker = null;
|
||||
}
|
||||
this._client = null;
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
clearInterval(this._idleCheckInterval);
|
||||
this._configChangeListener.dispose();
|
||||
this._stopWorker();
|
||||
}
|
||||
|
||||
private _checkIfIdle(): void {
|
||||
if (!this._worker) {
|
||||
return;
|
||||
}
|
||||
let timePassedSinceLastUsed = Date.now() - this._lastUsedTime;
|
||||
if (timePassedSinceLastUsed > STOP_WHEN_IDLE_FOR) {
|
||||
this._stopWorker();
|
||||
}
|
||||
}
|
||||
|
||||
private _getClient(): Promise<CSSWorker> {
|
||||
this._lastUsedTime = Date.now();
|
||||
|
||||
if (!this._client) {
|
||||
this._worker = editor.createWebWorker<CSSWorker>({
|
||||
// module that exports the create() method and returns a `CSSWorker` instance
|
||||
moduleId: 'vs/language/css/cssWorker',
|
||||
|
||||
label: this._defaults.languageId,
|
||||
|
||||
// passed in to the create() method
|
||||
createData: {
|
||||
options: this._defaults.options,
|
||||
languageId: this._defaults.languageId
|
||||
}
|
||||
});
|
||||
|
||||
this._client = <Promise<CSSWorker>>(<any>this._worker.getProxy());
|
||||
}
|
||||
|
||||
return this._client;
|
||||
}
|
||||
|
||||
getLanguageServiceWorker(...resources: Uri[]): Promise<CSSWorker> {
|
||||
let _client: CSSWorker;
|
||||
return this._getClient()
|
||||
.then((client) => {
|
||||
_client = client;
|
||||
})
|
||||
.then((_) => {
|
||||
return this._worker.withSyncedResources(resources);
|
||||
})
|
||||
.then((_) => _client);
|
||||
}
|
||||
}
|
||||
877
monaco-css/test/index.html
Normal file
877
monaco-css/test/index.html
Normal file
|
|
@ -0,0 +1,877 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
data-name="vs/editor/editor.main"
|
||||
href="../node_modules/monaco-editor-core/dev/vs/editor/editor.main.css"
|
||||
/>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Monaco Editor CSS test page</h2>
|
||||
<div id="container" style="width: 800px; height: 600px; border: 1px solid grey"></div>
|
||||
|
||||
<script>
|
||||
// Loading basic-languages to get the css language definition
|
||||
var paths = {
|
||||
'vs/basic-languages': '../node_modules/monaco-languages/release/dev',
|
||||
'vs/language/css': '../release/dev',
|
||||
vs: '../node_modules/monaco-editor-core/dev/vs'
|
||||
};
|
||||
if (document.location.protocol === 'http:') {
|
||||
// Add support for running local http server
|
||||
let testIndex = document.location.pathname.indexOf('/test/');
|
||||
if (testIndex !== -1) {
|
||||
let prefix = document.location.pathname.substr(0, testIndex);
|
||||
paths['vs/language/css'] = prefix + '/release/dev';
|
||||
}
|
||||
}
|
||||
var require = {
|
||||
paths: paths
|
||||
};
|
||||
</script>
|
||||
<script src="../node_modules/monaco-editor-core/dev/vs/loader.js"></script>
|
||||
<script src="../node_modules/monaco-editor-core/dev/vs/editor/editor.main.nls.js"></script>
|
||||
<script src="../node_modules/monaco-editor-core/dev/vs/editor/editor.main.js"></script>
|
||||
|
||||
<script>
|
||||
require([
|
||||
'vs/basic-languages/monaco.contribution',
|
||||
'vs/language/css/monaco.contribution'
|
||||
], function () {
|
||||
var editor = monaco.editor.create(document.getElementById('container'), {
|
||||
value: [
|
||||
'html {',
|
||||
' background-color: #e2e2e2;',
|
||||
' margin: 0;',
|
||||
' padding: 0;',
|
||||
'}',
|
||||
'',
|
||||
'body {',
|
||||
' background-color: #fff;',
|
||||
' border-top: solid 10px #000;',
|
||||
' color: #333;',
|
||||
' font-size: .85em;',
|
||||
' font-family: "Segoe UI", "HelveticaNeue-Light", sans-serif;',
|
||||
' margin: 0;',
|
||||
' padding: 0;',
|
||||
'}',
|
||||
'',
|
||||
'a:link, a:visited,',
|
||||
'a:active, a:hover {',
|
||||
' color: #333;',
|
||||
' outline: none;',
|
||||
' padding-left: 0;',
|
||||
' padding-right: 3px;',
|
||||
' text-decoration: none;',
|
||||
'}',
|
||||
'',
|
||||
'',
|
||||
'a:hover {',
|
||||
' background-color: #c7d1d6;',
|
||||
'}',
|
||||
'',
|
||||
'',
|
||||
'header, footer, hgroup',
|
||||
'nav, section {',
|
||||
' display: block;',
|
||||
'}',
|
||||
'',
|
||||
'.float-left {',
|
||||
' float: left;',
|
||||
'}',
|
||||
'',
|
||||
'.float-right {',
|
||||
' float: right;',
|
||||
'}',
|
||||
'',
|
||||
'.highlight {',
|
||||
'/* background-color: #a6dbed;',
|
||||
' padding-left: 5px;',
|
||||
' padding-right: 5px;*/',
|
||||
'}',
|
||||
'',
|
||||
'.clear-fix:after {',
|
||||
' content: ".";',
|
||||
' clear: both;',
|
||||
' display: block;',
|
||||
' height: 0;',
|
||||
' visibility: hidden;',
|
||||
'}',
|
||||
'',
|
||||
'h1, h2, h3,',
|
||||
'h4, h5, h6 {',
|
||||
' color: #000;',
|
||||
' margin-bottom: 0;',
|
||||
' padding-bottom: 0;',
|
||||
'',
|
||||
'}',
|
||||
'',
|
||||
'h1 {',
|
||||
' font-size: 2em;',
|
||||
'}',
|
||||
'',
|
||||
'h2 {',
|
||||
' font-size: 1.75em;',
|
||||
'}',
|
||||
'',
|
||||
'h3 {',
|
||||
' font-size: 1.2em;',
|
||||
'}',
|
||||
'',
|
||||
'h4 {',
|
||||
' font-size: 1.1em;',
|
||||
'}',
|
||||
'',
|
||||
'h5, h6 {',
|
||||
' font-size: 1em;',
|
||||
'}',
|
||||
'',
|
||||
'',
|
||||
'.tile {',
|
||||
' /* 2px solid #7ac0da; */',
|
||||
' border: 0;',
|
||||
'',
|
||||
' float: left;',
|
||||
' width: 200px;',
|
||||
' height: 325px;',
|
||||
'',
|
||||
' padding: 5px;',
|
||||
' margin-right: 5px;',
|
||||
' margin-bottom: 20px;',
|
||||
' margin-top: 20px;',
|
||||
' -webkit-perspective: 0;',
|
||||
' -webkit-transform-style: preserve-3d;',
|
||||
' -webkit-transition: -webkit-transform 0.2s;',
|
||||
' -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.3);',
|
||||
' background-position: center center;',
|
||||
' background-repeat: no-repeat;',
|
||||
'',
|
||||
' background-color: #fff;',
|
||||
'}',
|
||||
'',
|
||||
'.tile-item {',
|
||||
' /* 2px solid #7ac0da; */',
|
||||
' border-color: inherit;',
|
||||
' float: left;',
|
||||
' width: 50px;',
|
||||
' height: 70px;',
|
||||
' margin-right: 20px;',
|
||||
' margin-bottom: 20px;',
|
||||
' margin-top: 20px;',
|
||||
" background-image: url('../Images/documents.png');",
|
||||
' background-repeat: no-repeat;',
|
||||
'}',
|
||||
'',
|
||||
'.tile-wrapper {',
|
||||
' width: 100%;',
|
||||
' font-family: "Segoe UI" , Tahoma, Geneva, Verdana, sans-serif;',
|
||||
' line-height: 21px;',
|
||||
' font-size: 14px;',
|
||||
'}',
|
||||
'',
|
||||
'a.blue-box {',
|
||||
' font-size: 28px;',
|
||||
' height: 100px;',
|
||||
' display: block;',
|
||||
' border-style: solid;',
|
||||
' border-width: 1px 1px 4px 1px;',
|
||||
' border-color: #C0C0C0 #C0C0C0 #8ABAE4 #C0C0C0;',
|
||||
' padding-top: 15px;',
|
||||
' padding-left: 15px;',
|
||||
'}',
|
||||
'',
|
||||
' a.blue-box:hover {',
|
||||
' border: 4px solid #8ABAE4;',
|
||||
' padding-top: 12px;',
|
||||
' padding-left: 12px;',
|
||||
' background-color: #FFFFFF;',
|
||||
' }',
|
||||
'',
|
||||
'a.green-box {',
|
||||
' font-size: 28px;',
|
||||
' height: 100px;',
|
||||
' display: block;',
|
||||
' border-style: solid;',
|
||||
' border-width: 1px 1px 4px 1px;',
|
||||
' border-color: #C0C0C0 #C0C0C0 #9CCF42 #C0C0C0;',
|
||||
' padding-top: 15px;',
|
||||
' padding-left: 15px;',
|
||||
'}',
|
||||
'',
|
||||
' a.green-box:hover {',
|
||||
' border: 4px solid #9CCF42;',
|
||||
' padding-top: 12px;',
|
||||
' padding-left: 12px;',
|
||||
' background-color: #FFFFFF;',
|
||||
' }',
|
||||
'',
|
||||
'',
|
||||
'a.green-box2 {',
|
||||
' font-size: 14px;',
|
||||
' height: 48px;',
|
||||
' width: 48px;',
|
||||
' display: block; /* border-color: #C0C0C0; */',
|
||||
' padding-top: 6px;',
|
||||
' font-weight: bold;',
|
||||
'',
|
||||
'}',
|
||||
'',
|
||||
' a.green-box2:hover {',
|
||||
' border: solid #8ABAE4;',
|
||||
' padding-top: 0px;',
|
||||
' padding-left: 0px;',
|
||||
" background-image: url('../Images/documents.png');",
|
||||
' background-color: #EFEFEF;',
|
||||
' }',
|
||||
'',
|
||||
'a.yellow-box {',
|
||||
' font-size: 28px;',
|
||||
' height: 100px;',
|
||||
' display: block;',
|
||||
' border-style: solid;',
|
||||
' border-width: 1px 1px 4px 1px;',
|
||||
' border-color: #C0C0C0 #C0C0C0 #DECF6B #C0C0C0;',
|
||||
' padding-top: 15px;',
|
||||
' padding-left: 15px;',
|
||||
'}',
|
||||
'',
|
||||
' a.yellow-box:hover {',
|
||||
' border: 4px solid #DECF6B;',
|
||||
' padding-top: 12px;',
|
||||
' padding-left: 12px;',
|
||||
' background-color: #FFFFFF;',
|
||||
' }',
|
||||
'',
|
||||
'',
|
||||
'a.red-box {',
|
||||
' font-size: 28px;',
|
||||
' height: 100px;',
|
||||
' display: block;',
|
||||
' border-style: solid;',
|
||||
' border-width: 1px 1px 4px 1px;',
|
||||
' border-color: #C0C0C0 #C0C0C0 #F79E84 #C0C0C0;',
|
||||
' padding-top: 15px;',
|
||||
' padding-left: 15px;',
|
||||
'}',
|
||||
'',
|
||||
' a.red-box:hover {',
|
||||
' border: 4px solid #F79E84;',
|
||||
' padding-top: 12px;',
|
||||
' padding-left: 12px;',
|
||||
' background-color: #FFFFFF;',
|
||||
' }',
|
||||
'',
|
||||
'/* main layout',
|
||||
'----------------------------------------------------------*/',
|
||||
'.content-wrapper {',
|
||||
' margin: 0 auto;',
|
||||
' max-width: 960px;',
|
||||
'}',
|
||||
'',
|
||||
'#body {',
|
||||
' background-color: #efeeef;',
|
||||
' clear: both;',
|
||||
' padding-bottom: 35px;',
|
||||
'}',
|
||||
'',
|
||||
' .main-content {',
|
||||
' background: url("../images/accent.png") no-repeat;',
|
||||
' padding-left: 10px;',
|
||||
' padding-top: 30px;',
|
||||
' }',
|
||||
'',
|
||||
' .featured + .main-content {',
|
||||
' background: url("../images/heroaccent.png") no-repeat;',
|
||||
' }',
|
||||
'',
|
||||
'footer {',
|
||||
' clear: both;',
|
||||
' background-color: #e2e2e2;',
|
||||
' font-size: .8em;',
|
||||
' height: 100px;',
|
||||
'}',
|
||||
'',
|
||||
'',
|
||||
'/* site title',
|
||||
'----------------------------------------------------------*/',
|
||||
'.site-title {',
|
||||
' color: #0066CC; /* font-family: Rockwell, Consolas, "Courier New", Courier, monospace; */',
|
||||
' font-size: 3.3em;',
|
||||
' margin-top: 40px;',
|
||||
' margin-bottom: 0;',
|
||||
'}',
|
||||
'',
|
||||
'.site-title a, .site-title a:hover, .site-title a:active {',
|
||||
' background: none;',
|
||||
' color: #0066CC;',
|
||||
' outline: none;',
|
||||
' text-decoration: none;',
|
||||
'}',
|
||||
'',
|
||||
'',
|
||||
'/* login',
|
||||
'----------------------------------------------------------*/',
|
||||
'#login {',
|
||||
' display: block;',
|
||||
' font-size: .85em;',
|
||||
' margin-top: 20px;',
|
||||
' text-align: right;',
|
||||
'}',
|
||||
'',
|
||||
' #login a {',
|
||||
' background-color: #d3dce0;',
|
||||
' margin-left: 10px;',
|
||||
' margin-right: 3px;',
|
||||
' padding: 2px 3px;',
|
||||
' text-decoration: none;',
|
||||
' }',
|
||||
'',
|
||||
' #login a.username {',
|
||||
' background: none;',
|
||||
' margin-left: 0px;',
|
||||
' text-decoration: underline;',
|
||||
' }',
|
||||
'',
|
||||
' #login li {',
|
||||
' display: inline;',
|
||||
' list-style: none;',
|
||||
' }',
|
||||
'',
|
||||
'',
|
||||
'/* menu',
|
||||
'----------------------------------------------------------*/',
|
||||
'ul#menu {',
|
||||
' font-size: 1.3em;',
|
||||
' font-weight: 600;',
|
||||
' margin: 0;',
|
||||
' text-align: right;',
|
||||
' text-decoration: none;',
|
||||
'',
|
||||
'}',
|
||||
'',
|
||||
' ul#menu li {',
|
||||
' display: inline;',
|
||||
' list-style: none;',
|
||||
' padding-left: 15px;',
|
||||
' }',
|
||||
'',
|
||||
' ul#menu li a {',
|
||||
' background: none;',
|
||||
' color: #999;',
|
||||
' text-decoration: none;',
|
||||
' }',
|
||||
'',
|
||||
' ul#menu li a:hover {',
|
||||
' color: #333;',
|
||||
' text-decoration: none;',
|
||||
' }',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'/* page elements',
|
||||
'----------------------------------------------------------*/',
|
||||
'/* featured */',
|
||||
'.featured {',
|
||||
' background-color: #fff;',
|
||||
'}',
|
||||
'',
|
||||
' .featured .content-wrapper {',
|
||||
' /*background-color: #7ac0da;',
|
||||
' background-image: -ms-linear-gradient(left, #7AC0DA 0%, #A4D4E6 100%);',
|
||||
' background-image: -o-linear-gradient(left, #7AC0DA 0%, #A4D4E6 100%);',
|
||||
' background-image: -webkit-gradient(linear, left top, right top, color-stop(0, #7AC0DA), color-stop(1, #A4D4E6));',
|
||||
' background-image: -webkit-linear-gradient(left, #7AC0DA 0%, #A4D4E6 100%);',
|
||||
' background-image: linear-gradient(left, #7AC0DA 0%, #A4D4E6 100%);',
|
||||
' color: #3e5667;',
|
||||
' */',
|
||||
' padding: 0px 40px 30px 40px;',
|
||||
' }',
|
||||
'',
|
||||
' .featured hgroup.title h1, .featured hgroup.title h2 {',
|
||||
' /* color: #fff; */',
|
||||
' }',
|
||||
'',
|
||||
' .featured p {',
|
||||
' font-size: 1.1em;',
|
||||
' }',
|
||||
'',
|
||||
'/* page titles */',
|
||||
'hgroup.title {',
|
||||
' margin-bottom: 10px;',
|
||||
'}',
|
||||
'',
|
||||
'hgroup.title h1, hgroup.title h2 {',
|
||||
'display: inline;',
|
||||
'}',
|
||||
'',
|
||||
'hgroup.title h2 {',
|
||||
' font-weight: normal;',
|
||||
'}',
|
||||
'',
|
||||
'/* releases */',
|
||||
'.milestone {',
|
||||
' color: #fff;',
|
||||
' background-color: #8ABAE4;',
|
||||
' font-weight: normal;',
|
||||
' padding: 10px 10px 10px 10px;',
|
||||
' margin: 0 0 0 0;',
|
||||
'}',
|
||||
' .milestone .primary {',
|
||||
' font-size: 1.75em;',
|
||||
' }',
|
||||
'',
|
||||
' .milestone .secondary {',
|
||||
' font-size: 1.2em;',
|
||||
' font-weight: normal;',
|
||||
' /* padding: 5px 5px 5px 10px;*/',
|
||||
' }',
|
||||
'',
|
||||
'/* features */',
|
||||
'section.feature {',
|
||||
' width: 200px;',
|
||||
' float: left;',
|
||||
' padding: 10px;',
|
||||
'}',
|
||||
'',
|
||||
'/* ordered list */',
|
||||
'ol.round {',
|
||||
' list-style-type: none;',
|
||||
' padding-left: 0;',
|
||||
'}',
|
||||
'',
|
||||
' ol.round li {',
|
||||
' margin: 25px 0;',
|
||||
' padding-left: 45px;',
|
||||
' }',
|
||||
'',
|
||||
' ol.round li.one {',
|
||||
' background: url("../images/orderedlistOne.png") no-repeat;',
|
||||
' }',
|
||||
'',
|
||||
' ol.round li.two {',
|
||||
' background: url("../images/orderedlistTwo.png") no-repeat;',
|
||||
' }',
|
||||
'',
|
||||
' ol.round li.three {',
|
||||
' background: url("../images/orderedlistThree.png") no-repeat;',
|
||||
' }',
|
||||
'',
|
||||
'/* content */',
|
||||
'article {',
|
||||
' float: left;',
|
||||
' width: 70%;',
|
||||
'}',
|
||||
'',
|
||||
'aside {',
|
||||
' float: right;',
|
||||
' width: 25%;',
|
||||
'}',
|
||||
'',
|
||||
' aside ul {',
|
||||
' list-style: none;',
|
||||
' padding: 0;',
|
||||
' }',
|
||||
'',
|
||||
' aside ul li {',
|
||||
' background: url("../images/bullet.png") no-repeat 0 50%;',
|
||||
' padding: 2px 0 2px 20px;',
|
||||
' }',
|
||||
'',
|
||||
'.label {',
|
||||
' font-weight: 700;',
|
||||
'}',
|
||||
'',
|
||||
'/* login page */',
|
||||
'#loginForm {',
|
||||
' border-right: solid 2px #c8c8c8;',
|
||||
' float: left;',
|
||||
' width: 45%;',
|
||||
'}',
|
||||
'',
|
||||
' #loginForm .validation-error {',
|
||||
' display: block;',
|
||||
' margin-left: 15px;',
|
||||
' }',
|
||||
'',
|
||||
'#socialLoginForm {',
|
||||
' margin-left: 40px;',
|
||||
' float: left;',
|
||||
' width: 50%;',
|
||||
'}',
|
||||
'',
|
||||
'/* contact */',
|
||||
'.contact h3 {',
|
||||
' font-size: 1.2em;',
|
||||
'}',
|
||||
'',
|
||||
'.contact p {',
|
||||
' margin: 5px 0 0 10px;',
|
||||
'}',
|
||||
'',
|
||||
'.contact iframe {',
|
||||
' border: solid 1px #333;',
|
||||
' margin: 5px 0 0 10px;',
|
||||
'}',
|
||||
'',
|
||||
'/* forms */',
|
||||
'fieldset {',
|
||||
' border: none;',
|
||||
' margin: 0;',
|
||||
' padding: 0;',
|
||||
'}',
|
||||
'',
|
||||
' fieldset legend {',
|
||||
' display: none;',
|
||||
' }',
|
||||
'',
|
||||
' fieldset ol {',
|
||||
' padding: 0;',
|
||||
' list-style: none;',
|
||||
' }',
|
||||
'',
|
||||
' fieldset ol li {',
|
||||
' padding-bottom: 5px;',
|
||||
' }',
|
||||
'',
|
||||
' fieldset label {',
|
||||
' display: block;',
|
||||
' font-size: 1.2em;',
|
||||
' font-weight: 600;',
|
||||
' }',
|
||||
'',
|
||||
' fieldset label.checkbox {',
|
||||
' display: inline;',
|
||||
' }',
|
||||
'',
|
||||
' fieldset input[type="text"],',
|
||||
' fieldset input[type="password"] {',
|
||||
' border: 1px solid #e2e2e2;',
|
||||
' color: #333;',
|
||||
' font-size: 1.2em;',
|
||||
' margin: 5px 0 6px 0;',
|
||||
' padding: 5px;',
|
||||
' width: 300px;',
|
||||
' }',
|
||||
'',
|
||||
' fieldset input[type="text"]:focus,',
|
||||
' fieldset input[type="password"]:focus {',
|
||||
' border: 1px solid #7ac0da;',
|
||||
' }',
|
||||
'',
|
||||
' fieldset input[type="submit"] {',
|
||||
' background-color: #d3dce0;',
|
||||
' border: solid 1px #787878;',
|
||||
' cursor: pointer;',
|
||||
' font-size: 1.2em;',
|
||||
' font-weight: 600;',
|
||||
' padding: 7px;',
|
||||
' }',
|
||||
'',
|
||||
'/* ajax login/registration dialog */',
|
||||
'.modal-popup {',
|
||||
' font-size: 0.7em;',
|
||||
'}',
|
||||
'',
|
||||
'/* info and errors */',
|
||||
'.message-info {',
|
||||
' border: solid 1px;',
|
||||
' clear: both;',
|
||||
' padding: 10px 20px;',
|
||||
'}',
|
||||
'',
|
||||
'.message-error {',
|
||||
' clear: both;',
|
||||
' color: #e80c4d;',
|
||||
' font-size: 1.1em;',
|
||||
' font-weight: bold;',
|
||||
' margin: 20px 0 10px 0;',
|
||||
'}',
|
||||
'',
|
||||
'.message-success {',
|
||||
' color: #7ac0da;',
|
||||
' font-size: 1.3em;',
|
||||
' font-weight: bold;',
|
||||
' margin: 20px 0 10px 0;',
|
||||
'}',
|
||||
'',
|
||||
'.success {',
|
||||
' color: #7ac0da;',
|
||||
'}',
|
||||
'',
|
||||
'.error {',
|
||||
' color: #e80c4d;',
|
||||
'}',
|
||||
'',
|
||||
'/* styles for validation helpers */',
|
||||
'.field-validation-error {',
|
||||
' color: #e80c4d;',
|
||||
' font-weight: bold;',
|
||||
'}',
|
||||
'',
|
||||
'.field-validation-valid {',
|
||||
' display: none;',
|
||||
'}',
|
||||
'',
|
||||
'input[type="text"].input-validation-error,',
|
||||
'input[type="password"].input-validation-error {',
|
||||
' border: solid 1px #e80c4d;',
|
||||
'}',
|
||||
'',
|
||||
'.validation-summary-errors {',
|
||||
' color: #e80c4d;',
|
||||
' font-weight: bold;',
|
||||
' font-size: 1.1em;',
|
||||
'}',
|
||||
'',
|
||||
'.validation-summary-valid {',
|
||||
' display: none;',
|
||||
'}',
|
||||
'',
|
||||
'',
|
||||
'/* social */',
|
||||
'ul#social li {',
|
||||
' display: inline;',
|
||||
' list-style: none;',
|
||||
'}',
|
||||
'',
|
||||
' ul#social li a {',
|
||||
' color: #999;',
|
||||
' text-decoration: none;',
|
||||
' }',
|
||||
'',
|
||||
' a.facebook, a.twitter {',
|
||||
' display: block;',
|
||||
' float: left;',
|
||||
' height: 24px;',
|
||||
' padding-left: 17px;',
|
||||
' text-indent: -9999px;',
|
||||
' width: 16px;',
|
||||
' }',
|
||||
'',
|
||||
' a.facebook {',
|
||||
' background: url("../images/facebook.png") no-repeat;',
|
||||
' }',
|
||||
'',
|
||||
' a.twitter {',
|
||||
' background: url("../images/twitter.png") no-repeat;',
|
||||
' }',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'/********************',
|
||||
'* Mobile Styles *',
|
||||
'********************/',
|
||||
'@media only screen and (max-width: 850px) {',
|
||||
'',
|
||||
' /* header',
|
||||
' ----------------------------------------------------------*/',
|
||||
' header .float-left,',
|
||||
' header .float-right {',
|
||||
' float: none;',
|
||||
' }',
|
||||
'',
|
||||
' /* logo */',
|
||||
' header .site-title {',
|
||||
' /*margin: 0; */',
|
||||
' /*margin: 10px;*/',
|
||||
' text-align: left;',
|
||||
' padding-left: 0;',
|
||||
' }',
|
||||
'',
|
||||
' /* login */',
|
||||
' #login {',
|
||||
' font-size: .85em;',
|
||||
' margin-top: 0;',
|
||||
' text-align: center;',
|
||||
' }',
|
||||
'',
|
||||
' #login ul {',
|
||||
' margin: 5px 0;',
|
||||
' padding: 0;',
|
||||
' }',
|
||||
'',
|
||||
' #login li {',
|
||||
' display: inline;',
|
||||
' list-style: none;',
|
||||
' margin: 0;',
|
||||
' padding:0;',
|
||||
' }',
|
||||
'',
|
||||
' #login a {',
|
||||
' background: none;',
|
||||
' color: #999;',
|
||||
' font-weight: 600;',
|
||||
' margin: 2px;',
|
||||
' padding: 0;',
|
||||
' }',
|
||||
'',
|
||||
' #login a:hover {',
|
||||
' color: #333;',
|
||||
' }',
|
||||
'',
|
||||
' /* menu */',
|
||||
' nav {',
|
||||
' margin-bottom: 5px;',
|
||||
' }',
|
||||
'',
|
||||
' ul#menu {',
|
||||
' margin: 0;',
|
||||
' padding:0;',
|
||||
' text-align: center;',
|
||||
' }',
|
||||
'',
|
||||
' ul#menu li {',
|
||||
' margin: 0;',
|
||||
' padding: 0;',
|
||||
' }',
|
||||
'',
|
||||
'',
|
||||
' /* main layout',
|
||||
' ----------------------------------------------------------*/',
|
||||
' .main-content,',
|
||||
' .featured + .main-content {',
|
||||
' background-position: 10px 0;',
|
||||
' }',
|
||||
'',
|
||||
' .content-wrapper {',
|
||||
' padding-right: 10px;',
|
||||
' padding-left: 10px;',
|
||||
' }',
|
||||
'',
|
||||
' .featured .content-wrapper {',
|
||||
' padding: 10px;',
|
||||
' }',
|
||||
'',
|
||||
' /* page content */',
|
||||
' article, aside {',
|
||||
' float: none;',
|
||||
' width: 100%;',
|
||||
' }',
|
||||
'',
|
||||
' /* ordered list */',
|
||||
' ol.round {',
|
||||
' list-style-type: none;',
|
||||
' padding-left: 0;',
|
||||
' }',
|
||||
'',
|
||||
' ol.round li {',
|
||||
' padding-left: 10px;',
|
||||
' margin: 25px 0;',
|
||||
' }',
|
||||
'',
|
||||
' ol.round li.one,',
|
||||
' ol.round li.two,',
|
||||
' ol.round li.three {',
|
||||
' background: none;',
|
||||
' }',
|
||||
'',
|
||||
' /* features */',
|
||||
' section.feature {',
|
||||
' float: none;',
|
||||
' padding: 10px;',
|
||||
' width: auto;',
|
||||
' }',
|
||||
'',
|
||||
' section.feature img {',
|
||||
' color: #999;',
|
||||
' content: attr(alt);',
|
||||
' font-size: 1.5em;',
|
||||
' font-weight: 600;',
|
||||
' }',
|
||||
'',
|
||||
' /* forms */',
|
||||
' fieldset input[type="text"],',
|
||||
' fieldset input[type="password"] {',
|
||||
' width: 90%;',
|
||||
' }',
|
||||
'',
|
||||
' /* login page */',
|
||||
' #loginForm {',
|
||||
' border-right: none;',
|
||||
' float: none;',
|
||||
' width: auto;',
|
||||
' }',
|
||||
'',
|
||||
' #loginForm .validation-error {',
|
||||
' display: block;',
|
||||
' margin-left: 15px;',
|
||||
' }',
|
||||
'',
|
||||
' #socialLoginForm {',
|
||||
' margin-left: 0;',
|
||||
' float: none;',
|
||||
' width: auto;',
|
||||
' }',
|
||||
'',
|
||||
' /* footer',
|
||||
' ----------------------------------------------------------*/',
|
||||
' footer .float-left,',
|
||||
' footer .float-right {',
|
||||
' float: none;',
|
||||
' }',
|
||||
'',
|
||||
' footer {',
|
||||
' text-align: center;',
|
||||
' height: auto;',
|
||||
' padding: 10px 0;',
|
||||
' }',
|
||||
'',
|
||||
' footer p {',
|
||||
' margin: 0;',
|
||||
' }',
|
||||
'',
|
||||
' ul#social {',
|
||||
' padding:0;',
|
||||
' margin: 0;',
|
||||
' }',
|
||||
'',
|
||||
' a.facebook, a.twitter {',
|
||||
' background: none;',
|
||||
' display: inline;',
|
||||
' float: none;',
|
||||
' height: auto;',
|
||||
' padding-left: 0;',
|
||||
' text-indent: 0;',
|
||||
' width: auto;',
|
||||
' }',
|
||||
'}',
|
||||
'',
|
||||
'.subsite {',
|
||||
' color: #444;',
|
||||
'}',
|
||||
'',
|
||||
'h3 {',
|
||||
' font-weight: normal;',
|
||||
' font-size: 24px;',
|
||||
' color: #444;',
|
||||
' margin-bottom: 20px;',
|
||||
'}',
|
||||
'',
|
||||
'.tiles {',
|
||||
' padding-bottom: 20px;',
|
||||
' background-color: #e3e3e3;',
|
||||
'}',
|
||||
'',
|
||||
'#editor {',
|
||||
' margin: 0 auto;',
|
||||
' height: 500px;',
|
||||
' border: 1px solid #ccc;',
|
||||
'}',
|
||||
'',
|
||||
'.monaco-editor.monaco, .monaco-editor.vs, .monaco-editor.eclipse {',
|
||||
' background: #F9F9F9;',
|
||||
'}',
|
||||
'',
|
||||
'.monaco-editor.monaco .monaco-editor-background, .monaco-editor.vs .monaco-editor-background, .monaco-editor.eclipse .monaco-editor-background {',
|
||||
' background: #F9F9F9;',
|
||||
'}'
|
||||
].join('\n'),
|
||||
language: 'css'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue