Use monaco editor in demo

This commit is contained in:
Harvey committed 2021-12-08 11:48:56 +08:00
1 parent b056a3a8d6
commit 09fbbe5b0d
107 files changed
+1593 -10109

No files matched your search

@@ -0,0 +1,7 @@
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* monaco-css version: 0.30.1(5a7ba61be909ae9e4889768a3453ebb0dec392e2)
* Released under the MIT license
* https://github.com/Microsoft/monaco-css/blob/master/LICENSE.md
*-----------------------------------------------------------------------------*/
define("vs/language/css/workerManager",["require","exports","./fillers/monaco-editor-core"],(function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WorkerManager=void 0;var i=function(){function e(e){var n=this;this._defaults=e,this._worker=null,this._idleCheckInterval=window.setInterval((function(){return n._checkIfIdle()}),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange((function(){return n._stopWorker()}))}return e.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},e.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},e.prototype._checkIfIdle=function(){this._worker&&(Date.now()-this._lastUsedTime>12e4&&this._stopWorker())},e.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=t.editor.createWebWorker({moduleId:"vs/language/css/cssWorker",label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client},e.prototype.getLanguageServiceWorker=function(){for(var e,n=this,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return this._getClient().then((function(n){e=n})).then((function(e){return n._worker.withSyncedResources(t)})).then((function(n){return e}))},e}();n.WorkerManager=i})),function(e){if("object"==typeof module&&"object"==typeof module.exports){var n=e(require,exports);void 0!==n&&(module.exports=n)}else"function"==typeof define&&define.amd&&define("vscode-languageserver-types/main",["require","exports"],e)}((function(e,n){"use strict";var t,i,r,o,a,s,u,c,d,g,l,f,h,p,m,v,y;Object.defineProperty(n,"__esModule",{value:!0}),n.TextDocument=n.EOL=n.SelectionRange=n.DocumentLink=n.FormattingOptions=n.CodeLens=n.CodeAction=n.CodeActionContext=n.CodeActionKind=n.DocumentSymbol=n.SymbolInformation=n.SymbolTag=n.SymbolKind=n.DocumentHighlight=n.DocumentHighlightKind=n.SignatureInformation=n.ParameterInformation=n.Hover=n.MarkedString=n.CompletionList=n.CompletionItem=n.InsertTextMode=n.InsertReplaceEdit=n.CompletionItemTag=n.InsertTextFormat=n.CompletionItemKind=n.MarkupContent=n.MarkupKind=n.TextDocumentItem=n.OptionalVersionedTextDocumentIdentifier=n.VersionedTextDocumentIdentifier=n.TextDocumentIdentifier=n.WorkspaceChange=n.WorkspaceEdit=n.DeleteFile=n.RenameFile=n.CreateFile=n.TextDocumentEdit=n.AnnotatedTextEdit=n.ChangeAnnotationIdentifier=n.ChangeAnnotation=n.TextEdit=n.Command=n.Diagnostic=n.CodeDescription=n.DiagnosticTag=n.DiagnosticSeverity=n.DiagnosticRelatedInformation=n.FoldingRange=n.FoldingRangeKind=n.ColorPresentation=n.ColorInformation=n.Color=n.LocationLink=n.Location=n.Range=n.Position=n.uinteger=n.integer=void 0,function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647}(n.integer||(n.integer={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647}(t=n.uinteger||(n.uinteger={})),function(e){e.create=function(e,n){return e===Number.MAX_VALUE&&(e=t.MAX_VALUE),n===Number.MAX_VALUE&&(n=t.MAX_VALUE),{line:e,character:n}},e.is=function(e){var n=e;return A.objectLiteral(n)&&A.uinteger(n.line)&&A.uinteger(n.character)}}(i=n.Position||(n.Position={})),function(e){e.create=function(e,n,t,r){if(A.uinteger(e)&&A.uinteger(n)&&A.uinteger(t)&&A.uinteger(r))return{start:i.create(e,n),end:i.create(t,r)};if(i.is(e)&&i.is(n))return{start:e,end:n};throw new Error("Range#create called with invalid arguments["+e+", "+n+", "+t+", "+r+"]")},e.is=function(e){var n=e;return A.objectLiteral(n)&&i.is(n.start)&&i.is(n.end)}}(r=n.Range||(n.Range={})),function(e){e.create=function(e,n){return{uri:e,range:n}},e.is=function(e){var n=e;return A.defined(n)&&r.is(n.range)&&(A.string(n.uri)||A.undefined(n.uri))}}(o=n.Location||(n.Location={})),function(e){e.create=function(e,n,t,i){return{targetUri:e,targetRange:n,targetSelectionRange:t,originSelectionRange:i}},e.is=function(e){var n=e;return A.defined(n)&&r.is(n.targetRange)&&A.string(n.targetUri)&&(r.is(n.targetSelectionRange)||A.undefined(n.targetSelectionRange))&&(r.is(n.originSelectionRange)||A.undefined(n.originSelectionRange))}}(n.LocationLink||(n.LocationLink={})),function(e){e.create=function(e,n,t,i){return{red:e,green:n,blue:t,alpha:i}},e.is=function(e){var n=e;return A.numberRange(n.red,0,1)&&A.numberRange(n.green,0,1)&&A.numberRange(n.blue,0,1)&&A.numberRange(n.alpha,0,1)}}(a=n.Color||(n.Color={})),function(e){e.create=function(e,n){return{range:e,color:n}},e.is=function(e){var n=e;return r.is(n.range)&&a.is(n.color)}}(n.ColorInformation||(n.ColorInformation={})),function(e){e.create=function(e,n,t){return{label:e,textEdit:n,additionalTextEdits:t}},e.is=function(e){var n=e;return A.string(n.label)&&(A.undefined(n.textEdit)||d.is(n))&&(A.undefined(n.additionalTextEdits)||A.typedArray(n.additionalTextEdits,d.is))}}(n.ColorPresentation||(n.ColorPresentation={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(n.Line truncated
@@ -0,0 +1,7 @@
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* monaco-css version: 0.30.1(5a7ba61be909ae9e4889768a3453ebb0dec392e2)
* Released under the MIT license
* https://github.com/Microsoft/monaco-css/blob/master/LICENSE.md
*-----------------------------------------------------------------------------*/
!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("vscode-css-languageservice/parser/cssScanner",["require","exports"],e)}((function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Scanner=t.MultiLineStream=t.TokenType=void 0,function(e){e[e.Ident=0]="Ident",e[e.AtKeyword=1]="AtKeyword",e[e.String=2]="String",e[e.BadString=3]="BadString",e[e.UnquotedString=4]="UnquotedString",e[e.Hash=5]="Hash",e[e.Num=6]="Num",e[e.Percentage=7]="Percentage",e[e.Dimension=8]="Dimension",e[e.UnicodeRange=9]="UnicodeRange",e[e.CDO=10]="CDO",e[e.CDC=11]="CDC",e[e.Colon=12]="Colon",e[e.SemiColon=13]="SemiColon",e[e.CurlyL=14]="CurlyL",e[e.CurlyR=15]="CurlyR",e[e.ParenthesisL=16]="ParenthesisL",e[e.ParenthesisR=17]="ParenthesisR",e[e.BracketL=18]="BracketL",e[e.BracketR=19]="BracketR",e[e.Whitespace=20]="Whitespace",e[e.Includes=21]="Includes",e[e.Dashmatch=22]="Dashmatch",e[e.SubstringOperator=23]="SubstringOperator",e[e.PrefixOperator=24]="PrefixOperator",e[e.SuffixOperator=25]="SuffixOperator",e[e.Delim=26]="Delim",e[e.EMS=27]="EMS",e[e.EXS=28]="EXS",e[e.Length=29]="Length",e[e.Angle=30]="Angle",e[e.Time=31]="Time",e[e.Freq=32]="Freq",e[e.Exclamation=33]="Exclamation",e[e.Resolution=34]="Resolution",e[e.Comma=35]="Comma",e[e.Charset=36]="Charset",e[e.EscapedJavaScript=37]="EscapedJavaScript",e[e.BadEscapedJavaScript=38]="BadEscapedJavaScript",e[e.Comment=39]="Comment",e[e.SingleLineComment=40]="SingleLineComment",e[e.EOF=41]="EOF",e[e.CustomToken=42]="CustomToken"}(n=t.TokenType||(t.TokenType={}));var r=function(){function e(e){this.source=e,this.len=e.length,this.position=0}return e.prototype.substring=function(e,t){return void 0===t&&(t=this.position),this.source.substring(e,t)},e.prototype.eos=function(){return this.len<=this.position},e.prototype.pos=function(){return this.position},e.prototype.goBackTo=function(e){this.position=e},e.prototype.goBack=function(e){this.position-=e},e.prototype.advance=function(e){this.position+=e},e.prototype.nextChar=function(){return this.source.charCodeAt(this.position++)||0},e.prototype.peekChar=function(e){return void 0===e&&(e=0),this.source.charCodeAt(this.position+e)||0},e.prototype.lookbackChar=function(e){return void 0===e&&(e=0),this.source.charCodeAt(this.position-e)||0},e.prototype.advanceIfChar=function(e){return e===this.source.charCodeAt(this.position)&&(this.position++,!0)},e.prototype.advanceIfChars=function(e){if(this.position+e.length>this.source.length)return!1;for(var t=0;t<e.length;t++)if(this.source.charCodeAt(this.position+t)!==e[t])return!1;return this.advance(t),!0},e.prototype.advanceWhileChar=function(e){for(var t=this.position;this.position<this.len&&e(this.source.charCodeAt(this.position));)this.position++;return this.position-t},e}();t.MultiLineStream=r;var i="a".charCodeAt(0),o="f".charCodeAt(0),s="z".charCodeAt(0),a="A".charCodeAt(0),l="F".charCodeAt(0),c="Z".charCodeAt(0),d="0".charCodeAt(0),p="9".charCodeAt(0),h="~".charCodeAt(0),u="^".charCodeAt(0),m="=".charCodeAt(0),f="|".charCodeAt(0),g="-".charCodeAt(0),b="_".charCodeAt(0),y="%".charCodeAt(0),v="*".charCodeAt(0),w="(".charCodeAt(0),x=")".charCodeAt(0),S="<".charCodeAt(0),k=">".charCodeAt(0),C="@".charCodeAt(0),T="#".charCodeAt(0),E="$".charCodeAt(0),F="\\".charCodeAt(0),D="/".charCodeAt(0),_="\n".charCodeAt(0),R="\r".charCodeAt(0),P="\f".charCodeAt(0),z='"'.charCodeAt(0),I="'".charCodeAt(0),N=" ".charCodeAt(0),M="\t".charCodeAt(0),A=";".charCodeAt(0),O=":".charCodeAt(0),W="{".charCodeAt(0),L="}".charCodeAt(0),j="[".charCodeAt(0),U="]".charCodeAt(0),V=",".charCodeAt(0),K=".".charCodeAt(0),q="!".charCodeAt(0),B={};B[A]=n.SemiColon,B[O]=n.Colon,B[W]=n.CurlyL,B[L]=n.CurlyR,B[U]=n.BracketR,B[j]=n.BracketL,B[w]=n.ParenthesisL,B[x]=n.ParenthesisR,B[V]=n.Comma;var $={};$.em=n.EMS,$.ex=n.EXS,$.px=n.Length,$.cm=n.Length,$.mm=n.Length,$.in=n.Length,$.pt=n.Length,$.pc=n.Length,$.deg=n.Angle,$.rad=n.Angle,$.grad=n.Angle,$.ms=n.Time,$.s=n.Time,$.hz=n.Freq,$.khz=n.Freq,$["%"]=n.Percentage,$.fr=n.Percentage,$.dpi=n.Resolution,$.dpcm=n.Resolution;var G=function(){function e(){this.stream=new r(""),this.ignoreComment=!0,this.ignoreWhitespace=!0,this.inURL=!1}return e.prototype.setSource=function(e){this.stream=new r(e)},e.prototype.finishToken=function(e,t,n){return{offset:e,len:this.stream.pos()-e,type:t,text:n||this.stream.substring(e)}},e.prototype.substring=function(e,t){return this.stream.substring(e,e+t)},e.prototype.pos=function(){return this.stream.pos()},e.prototype.goBackTo=function(e){this.stream.goBackTo(e)},e.prototype.scanUnquotedString=function(){var e=this.stream.pos(),t=[];return this._unquotedString(t)?this.finishToken(e,n.UnquotedString,t.join("")):null},e.prototype.scan=function(){var e=this.trivia();if(null!==e)return e;var t=this.stream.pos();return this.stream.eos()?this.finishToken(t,n.EOF):this.scanNext(t)},e.prototype.scanNext=function(eLine truncated