@xano/xanoscript-monaco-editor 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +77 -126
- package/dist/.vite/manifest.json +54 -54
- package/dist/assets/{editor-BivTGeL1.js → editor-4HUBGwOu.js} +1 -1
- package/dist/assets/{extensionHost.worker-bYZXB0kM.js → extensionHost.worker-BEj8h9xB.js} +7 -7
- package/dist/assets/{files.contribution._fileEditorFactory-vS4ZLYi1.js → files.contribution._fileEditorFactory-YNF_vxMj.js} +1 -1
- package/dist/assets/{iconv-lite-umd-DQaTktu2.js → iconv-lite-umd-BCZHOywd.js} +2 -7
- package/dist/assets/{iconv-lite-umd-DYWd8cEa.js → iconv-lite-umd-BGIeO9cR.js} +2 -7
- package/dist/assets/{index-CrbRjSB_.js → index-9GTRLRSC.js} +1 -1
- package/dist/assets/{index-BGwiFEyd.js → index-B48SQPT2.js} +1 -1
- package/dist/assets/{index-VRHnXpb2.js → index-B7W-kS7G.js} +1 -1
- package/dist/assets/{index-51WpeTZl.js → index-CBODr4QR.js} +3 -3
- package/dist/assets/{index-C3pnKX8a.js → index-Cw1WVxjJ.js} +1 -1
- package/dist/assets/{index-BwfWF2CI.js → index-DSexFukl.js} +47 -47
- package/dist/assets/{index-C25FTAfE.js → index-DV2XmbY1.js} +1 -1
- package/dist/assets/{index-B132pG6E.js → index-DoXiLhIy.js} +2 -2
- package/dist/assets/{index-DgK2LcnW.js → index-r-mEMSNw.js} +2 -2
- package/dist/assets/{index-yPQeQvu7.js → index-sQEJqDvC.js} +1 -1
- package/dist/assets/main--VvQJcub.js +4 -0
- package/dist/assets/main-DUUA0eUQ.js +4 -0
- package/dist/assets/main-DWv94O3B.js +1 -0
- package/dist/assets/main-Du3mMy1c.js +1 -0
- package/dist/assets/{tokenClassificationRegistry-DcBtqg2t.js → tokenClassificationRegistry-CZyxOMX0.js} +1 -1
- package/dist/assets/{views-hUfpm9tT.js → views-Bu3Oa5Y-.js} +3 -3
- package/dist/assets/{views-C4cPu3oQ.css → views-qXWInm-E.css} +1 -1
- package/dist/assets/workbenchThemeService.service-CXlQNmVU.js +1 -0
- package/dist/assets/{worker-BIMDXoFp.js → worker-BiA-ZZ0u.js} +2 -2
- package/dist/index.html +1 -1
- package/dist/logic-assistant-script.js +22301 -16325
- package/dist/logic-assistant-script.js.map +4 -4
- package/dist/worker.js +20541 -14435
- package/dist/worker.js.map +4 -4
- package/package.json +3 -1
- package/dist/assets/main-D6ceXGB_.js +0 -4
- package/dist/assets/main-DNugpDp4.js +0 -4
- package/dist/assets/main-FP17jmvp.js +0 -1
- package/dist/assets/main-b5eBH2vx.js +0 -1
- package/dist/assets/workbenchThemeService.service-qBFVnuYD.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as _t}from"./_commonjsHelpers-CqkleIqs.js";function yt(j,$){return $.forEach(function(S){S&&typeof S!="string"&&!Array.isArray(S)&&Object.keys(S).forEach(function(w){if(w!=="default"&&!(w in j)){var P=Object.getOwnPropertyDescriptor(S,w);Object.defineProperty(j,w,P.get?P:{enumerable:!0,get:function(){return S[w]}})}})}),Object.freeze(j)}var z={exports:{}},vt=z.exports,X;function wt(){return X||(X=1,(function(j,$){(function(S,w){j.exports=w()})(vt,(()=>{return S={770:function(P,d,O){var U=this&&this.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(d,"__esModule",{value:!0}),d.setDefaultDebugCall=d.createOnigScanner=d.createOnigString=d.loadWASM=d.OnigScanner=d.OnigString=void 0;const D=U(O(418));let t=null,W=!1;class R{static _utf8ByteLength(e){let f=0;for(let c=0,p=e.length;c<p;c++){const s=e.charCodeAt(c);let i=s,o=!1;if(s>=55296&&s<=56319&&c+1<p){const a=e.charCodeAt(c+1);a>=56320&&a<=57343&&(i=65536+(s-55296<<10)|a-56320,o=!0)}f+=i<=127?1:i<=2047?2:i<=65535?3:4,o&&c++}return f}constructor(e){const f=e.length,c=R._utf8ByteLength(e),p=c!==f,s=p?new Uint32Array(f+1):null;p&&(s[f]=c);const i=p?new Uint32Array(c+1):null;p&&(i[c]=f);const o=new Uint8Array(c);let a=0;for(let u=0;u<f;u++){const A=e.charCodeAt(u);let l=A,b=!1;if(A>=55296&&A<=56319&&u+1<f){const x=e.charCodeAt(u+1);x>=56320&&x<=57343&&(l=65536+(A-55296<<10)|x-56320,b=!0)}p&&(s[u]=a,b&&(s[u+1]=a),l<=127?i[a+0]=u:l<=2047?(i[a+0]=u,i[a+1]=u):l<=65535?(i[a+0]=u,i[a+1]=u,i[a+2]=u):(i[a+0]=u,i[a+1]=u,i[a+2]=u,i[a+3]=u)),l<=127?o[a++]=l:l<=2047?(o[a++]=192|(1984&l)>>>6,o[a++]=128|(63&l)>>>0):l<=65535?(o[a++]=224|(61440&l)>>>12,o[a++]=128|(4032&l)>>>6,o[a++]=128|(63&l)>>>0):(o[a++]=240|(1835008&l)>>>18,o[a++]=128|(258048&l)>>>12,o[a++]=128|(4032&l)>>>6,o[a++]=128|(63&l)>>>0),b&&u++}this.utf16Length=f,this.utf8Length=c,this.utf16Value=e,this.utf8Value=o,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=i}createString(e){const f=e._omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,f),f}}class _{constructor(e){if(this.id=++_.LAST_ID,!t)throw new Error("Must invoke loadWASM first.");this._onigBinding=t,this.content=e;const f=new R(e);this.utf16Length=f.utf16Length,this.utf8Length=f.utf8Length,this.utf16OffsetToUtf8=f.utf16OffsetToUtf8,this.utf8OffsetToUtf16=f.utf8OffsetToUtf16,this.utf8Length<1e4&&!_._sharedPtrInUse?(_._sharedPtr||(_._sharedPtr=t._omalloc(1e4)),_._sharedPtrInUse=!0,t.HEAPU8.set(f.utf8Value,_._sharedPtr),this.ptr=_._sharedPtr):this.ptr=f.createString(t)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===_._sharedPtr?_._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}d.OnigString=_,_.LAST_ID=0,_._sharedPtr=0,_._sharedPtrInUse=!1;class B{constructor(e){if(!t)throw new Error("Must invoke loadWASM first.");const f=[],c=[];for(let o=0,a=e.length;o<a;o++){const u=new R(e[o]);f[o]=u.createString(t),c[o]=u.utf8Length}const p=t._omalloc(4*e.length);t.HEAPU32.set(f,p/4);const s=t._omalloc(4*e.length);t.HEAPU32.set(c,s/4);const i=t._createOnigScanner(p,s,e.length);for(let o=0,a=e.length;o<a;o++)t._ofree(f[o]);t._ofree(s),t._ofree(p),i===0&&(function(o){throw new Error(o.UTF8ToString(o._getLastOnigError()))})(t),this._onigBinding=t,this._ptr=i}dispose(){this._onigBinding._freeOnigScanner(this._ptr)}findNextMatchSync(e,f,c){let p=W,s=0;if(typeof c=="number"?(8&c&&(p=!0),s=c):typeof c=="boolean"&&(p=c),typeof e=="string"){e=new _(e);const i=this._findNextMatchSync(e,f,p,s);return e.dispose(),i}return this._findNextMatchSync(e,f,p,s)}_findNextMatchSync(e,f,c,p){const s=this._onigBinding;let i;if(i=c?s._findNextOnigScannerMatchDbg(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(f),p):s._findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(f),p),i===0)return null;const o=s.HEAPU32;let a=i/4;const u=o[a++],A=o[a++];let l=[];for(let b=0;b<A;b++){const x=e.convertUtf8OffsetToUtf16(o[a++]),k=e.convertUtf8OffsetToUtf16(o[a++]);l[b]={start:x,end:k,length:k-x}}return{index:u,captureIndices:l}}}d.OnigScanner=B;let M=!1,T=null;d.loadWASM=function(m){if(M)return T;let e,f,c,p;if(M=!0,(function(s){return typeof s.instantiator=="function"})(m))e=m.instantiator,f=m.print;else{let s;(function(i){return i.data!==void 0})(m)?(s=m.data,f=m.print):s=m,e=(function(i){return typeof Response<"u"&&i instanceof Response})(s)?typeof WebAssembly.instantiateStreaming=="function"?(function(i){return o=>WebAssembly.instantiateStreaming(i,o)})(s):(function(i){return async o=>{const a=await i.arrayBuffer();return WebAssembly.instantiate(a,o)}})(s):(function(i){return o=>WebAssembly.instantiate(i,o)})(s)}return T=new Promise(((s,i)=>{c=s,p=i})),(function(s,i,o,a){(0,D.default)({print:i,instantiateWasm:(u,A)=>{if(typeof performance>"u"){const l=()=>Date.now();u.env.emscripten_get_now=l,u.wasi_snapshot_preview1.emscripten_get_now=l}return s(u).then((l=>A(l.instance)),a),{}}}).then((u=>{t=u,o()}))})(e,f,c,p),T},d.createOnigString=function(m){return new _(m)},d.createOnigScanner=function(m){return new B(m)},d.setDefaultDebugCall=function(m){W=m}},418:P=>{var d=(typeof document<"u"&&document.currentScript&&document.currentScript.src,function(O){var U,D,t=(O=O||{})!==void 0?O:{};t.ready=new Promise((function(n,r){U=n,D=r}));var W,R=Object.assign({},t),_="";function B(n){return t.locateFile?t.locateFile(n,_):_+n}W=function(n){let r;return typeof readbuffer=="function"?new Uint8Array(readbuffer(n)):(r=read(n,"binary"),c(typeof r=="object"),r)},typeof scriptArgs<"u"&&scriptArgs,typeof onig_print<"u"&&(typeof console>"u"&&(console={}),console.log=onig_print,console.warn=console.error=typeof printErr<"u"?printErr:onig_print);var M,T,m=t.print||console.log.bind(console),e=t.printErr||console.warn.bind(console);Object.assign(t,R),R=null,t.arguments&&t.arguments,t.thisProgram&&t.thisProgram,t.quit&&t.quit,t.wasmBinary&&(M=t.wasmBinary),t.noExitRuntime,typeof WebAssembly!="object"&&F("no native wasm support detected");var f=!1;function c(n,r){n||F(r)}var p,s,i,o=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function a(n,r,y){for(var E=r+y,h=r;n[h]&&!(h>=E);)++h;if(h-r>16&&n.buffer&&o)return o.decode(n.subarray(r,h));for(var g="";r<h;){var v=n[r++];if(128&v){var C=63&n[r++];if((224&v)!=192){var N=63&n[r++];if((v=(240&v)==224?(15&v)<<12|C<<6|N:(7&v)<<18|C<<12|N<<6|63&n[r++])<65536)g+=String.fromCharCode(v);else{var Q=v-65536;g+=String.fromCharCode(55296|Q>>10,56320|1023&Q)}}else g+=String.fromCharCode((31&v)<<6|C)}else g+=String.fromCharCode(v)}return g}function u(n,r){return n?a(s,n,r):""}function A(n){p=n,t.HEAP8=new Int8Array(n),t.HEAP16=new Int16Array(n),t.HEAP32=new Int32Array(n),t.HEAPU8=s=new Uint8Array(n),t.HEAPU16=new Uint16Array(n),t.HEAPU32=i=new Uint32Array(n),t.HEAPF32=new Float32Array(n),t.HEAPF64=new Float64Array(n)}t.INITIAL_MEMORY;var l=[],b=[],x=[];function k(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)et(t.preRun.shift());V(l)}function tt(){V(b)}function nt(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)it(t.postRun.shift());V(x)}function et(n){l.unshift(n)}function rt(n){b.unshift(n)}function it(n){x.unshift(n)}var L=0,H=null;function ot(n){L++,t.monitorRunDependencies&&t.monitorRunDependencies(L)}function at(n){if(L--,t.monitorRunDependencies&&t.monitorRunDependencies(L),L==0&&H){var r=H;H=null,r()}}function F(n){t.onAbort&&t.onAbort(n),e(n="Aborted("+n+")"),f=!0,n+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(n);throw D(r),r}var I,Y,st="data:application/octet-stream;base64,";function G(n){return n.startsWith(st)}function ft(n){try{if(n==I&&M)return new Uint8Array(M);if(W)return W(n);throw"both async and sync fetching of the wasm failed"}catch(r){F(r)}}function ut(){return Promise.resolve().then((function(){return ft(I)}))}function ct(){var n={env:J,wasi_snapshot_preview1:J};function r(h,g){var v=h.exports;t.asm=v,A((T=t.asm.memory).buffer),t.asm.__indirect_function_table,rt(t.asm.__wasm_call_ctors),at()}function y(h){r(h.instance)}function E(h){return ut().then((function(g){return WebAssembly.instantiate(g,n)})).then((function(g){return g})).then(h,(function(g){e("failed to asynchronously prepare wasm: "+g),F(g)}))}if(ot(),t.instantiateWasm)try{return t.instantiateWasm(n,r)}catch(h){e("Module.instantiateWasm callback failed with error: "+h),D(h)}return(M||typeof WebAssembly.instantiateStreaming!="function"||G(I)||typeof fetch!="function"?E(y):fetch(I,{credentials:"same-origin"}).then((function(h){return WebAssembly.instantiateStreaming(h,n).then(y,(function(g){return e("wasm streaming compile failed: "+g),e("falling back to ArrayBuffer instantiation"),E(y)}))}))).catch(D),{}}function V(n){for(;n.length>0;)n.shift()(t)}function lt(n,r,y){s.copyWithin(n,r,r+y)}function pt(n){try{return T.grow(n-p.byteLength+65535>>>16),A(T.buffer),1}catch{}}function ht(n){var r,y=s.length,E=2147483648;if((n>>>=0)>E)return!1;for(var h=1;h<=4;h*=2){var g=y*(1+.2/h);if(g=Math.min(g,n+100663296),pt(Math.min(E,(r=Math.max(n,g))+(65536-r%65536)%65536)))return!0}return!1}G(I="onig.wasm")||(I=B(I)),Y=typeof dateNow<"u"?dateNow:()=>performance.now();var gt=[null,[],[]];function mt(n,r){var y=gt[n];r===0||r===10?((n===1?m:e)(a(y,0)),y.length=0):y.push(r)}function dt(n,r,y,E){for(var h=0,g=0;g<y;g++){var v=i[r>>2],C=i[r+4>>2];r+=8;for(var N=0;N<C;N++)mt(n,s[v+N]);h+=C}return i[E>>2]=h,0}var q,J={emscripten_get_now:Y,emscripten_memcpy_big:lt,emscripten_resize_heap:ht,fd_write:dt};function K(n){function r(){q||(q=!0,t.calledRun=!0,f||(tt(),U(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),nt()))}L>0||(k(),L>0||(t.setStatus?(t.setStatus("Running..."),setTimeout((function(){setTimeout((function(){t.setStatus("")}),1),r()}),1)):r()))}if(ct(),t.___wasm_call_ctors=function(){return(t.___wasm_call_ctors=t.asm.__wasm_call_ctors).apply(null,arguments)},t.___errno_location=function(){return(t.___errno_location=t.asm.__errno_location).apply(null,arguments)},t._omalloc=function(){return(t._omalloc=t.asm.omalloc).apply(null,arguments)},t._ofree=function(){return(t._ofree=t.asm.ofree).apply(null,arguments)},t._getLastOnigError=function(){return(t._getLastOnigError=t.asm.getLastOnigError).apply(null,arguments)},t._createOnigScanner=function(){return(t._createOnigScanner=t.asm.createOnigScanner).apply(null,arguments)},t._freeOnigScanner=function(){return(t._freeOnigScanner=t.asm.freeOnigScanner).apply(null,arguments)},t._findNextOnigScannerMatch=function(){return(t._findNextOnigScannerMatch=t.asm.findNextOnigScannerMatch).apply(null,arguments)},t._findNextOnigScannerMatchDbg=function(){return(t._findNextOnigScannerMatchDbg=t.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},t.stackSave=function(){return(t.stackSave=t.asm.stackSave).apply(null,arguments)},t.stackRestore=function(){return(t.stackRestore=t.asm.stackRestore).apply(null,arguments)},t.stackAlloc=function(){return(t.stackAlloc=t.asm.stackAlloc).apply(null,arguments)},t.dynCall_jiji=function(){return(t.dynCall_jiji=t.asm.dynCall_jiji).apply(null,arguments)},t.UTF8ToString=u,H=function n(){q||K(),q||(H=n)},t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();return K(),O.ready});P.exports=d}},w={},(function P(d){var O=w[d];if(O!==void 0)return O.exports;var U=w[d]={exports:{}};return S[d].call(U.exports,U,U.exports,P),U.exports})(770);var S,w}))})(z)),z.exports}var Z=wt(),At=_t(Z),bt=yt({__proto__:null,default:At},[Z]);export{bt as m};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{q as o,D as R,E,aH as _,aV as $,bo as x,N as y}from"./index-
|
|
1
|
+
import{q as o,D as R,E,aH as _,aV as $,bo as x,N as y}from"./index-DSexFukl.js";const A="*",I=":",M=".",h="\\w+[-_\\w+]*",b=`^${h}$`,B=`^(${h}|\\*)(\\${M}${h})*(${I}${h})?$`,j="^(\\s*(italic|bold|underline|strikethrough))*\\s*$";class f{constructor(e,r,n,c,s){this.foreground=e,this.bold=r,this.underline=n,this.strikethrough=c,this.italic=s}}(function(i){function e(t){return{_foreground:t.foreground===void 0?null:y.Format.CSS.formatHexA(t.foreground,!0),_bold:t.bold===void 0?null:t.bold,_underline:t.underline===void 0?null:t.underline,_italic:t.italic===void 0?null:t.italic,_strikethrough:t.strikethrough===void 0?null:t.strikethrough}}i.toJSONObject=e;function r(t){if(t){const l=u=>typeof u=="boolean"?u:void 0,d=u=>typeof u=="string"?y.fromHex(u):void 0;return new i(d(t._foreground),l(t._bold),l(t._underline),l(t._strikethrough),l(t._italic))}}i.fromJSONObject=r;function n(t,l){return t===l?!0:t!==void 0&&l!==void 0&&(t.foreground instanceof y?t.foreground.equals(l.foreground):l.foreground===void 0)&&t.bold===l.bold&&t.underline===l.underline&&t.strikethrough===l.strikethrough&&t.italic===l.italic}i.equals=n;function c(t){return t instanceof i}i.is=c;function s(t){return new i(t.foreground,t.bold,t.underline,t.strikethrough,t.italic)}i.fromData=s;function a(t,l,d,u,g,m){let k;if(t!==void 0&&(k=y.fromHex(t)),l!==void 0){d=m=u=g=!1;const N=/italic|bold|underline|strikethrough/g;let T;for(;T=N.exec(l);)switch(T[0]){case"bold":d=!0;break;case"italic":m=!0;break;case"underline":u=!0;break;case"strikethrough":g=!0;break}}return new i(k,d,u,g,m)}i.fromSettings=a})(f||(f={}));var O;(function(i){function e(s,a){if(a&&typeof a._selector=="string"&&a._style){const t=f.fromJSONObject(a._style);if(t)try{return{selector:s.parseTokenSelector(a._selector),style:t}}catch{}}}i.fromJSONObject=e;function r(s){return{_selector:s.selector.id,_style:f.toJSONObject(s.style)}}i.toJSONObject=r;function n(s,a){return s===a?!0:s!==void 0&&a!==void 0&&s.selector&&a.selector&&s.selector.id===a.selector.id&&f.equals(s.style,a.style)}i.equals=n;function c(s){return s&&s.selector&&typeof s.selector.id=="string"&&f.is(s.style)}i.is=c})(O||(O={}));const L={TokenClassificationContribution:"base.contributions.tokenClassification"};class H extends R{constructor(){super(),this._onDidChangeSchema=this._register(new E),this.onDidChangeSchema=this._onDidChangeSchema.event,this.currentTypeNumber=0,this.currentModifierBit=1,this.tokenStylingDefaultRules=[],this.tokenStylingSchema={type:"object",properties:{},patternProperties:{[B]:S()},additionalProperties:!1,definitions:{style:{type:"object",description:o(2298,"Colors and styles for the token."),properties:{foreground:{type:"string",description:o(2299,"Foreground color for the token."),format:"color-hex",default:"#ff0000"},background:{type:"string",deprecationMessage:o(2300,"Token background colors are currently not supported.")},fontStyle:{type:"string",description:o(2301,"Sets the all font styles of the rule: 'italic', 'bold', 'underline' or 'strikethrough' or a combination. All styles that are not listed are unset. The empty string unsets all styles."),pattern:j,patternErrorMessage:o(2302,"Font style must be 'italic', 'bold', 'underline' or 'strikethrough' or a combination. The empty string unsets all styles."),defaultSnippets:[{label:o(2303,"None (clear inherited style)"),bodyText:'""'},{body:"italic"},{body:"bold"},{body:"underline"},{body:"strikethrough"},{body:"italic bold"},{body:"italic underline"},{body:"italic strikethrough"},{body:"bold underline"},{body:"bold strikethrough"},{body:"underline strikethrough"},{body:"italic bold underline"},{body:"italic bold strikethrough"},{body:"italic underline strikethrough"},{body:"bold underline strikethrough"},{body:"italic bold underline strikethrough"}]},bold:{type:"boolean",description:o(2304,"Sets or unsets the font style to bold. Note, the presence of 'fontStyle' overrides this setting.")},italic:{type:"boolean",description:o(2305,"Sets or unsets the font style to italic. Note, the presence of 'fontStyle' overrides this setting.")},underline:{type:"boolean",description:o(2306,"Sets or unsets the font style to underline. Note, the presence of 'fontStyle' overrides this setting.")},strikethrough:{type:"boolean",description:o(2307,"Sets or unsets the font style to strikethrough. Note, the presence of 'fontStyle' overrides this setting.")}},defaultSnippets:[{body:{foreground:"${1:#FF0000}",fontStyle:"${2:bold}"}}]}}},this.tokenTypeById=Object.create(null),this.tokenModifierById=Object.create(null),this.typeHierarchy=Object.create(null)}registerTokenType(e,r,n,c){if(!e.match(b))throw new Error("Invalid token type id.");if(n&&!n.match(b))throw new Error("Invalid token super type id.");const a={num:this.currentTypeNumber++,id:e,superType:n,description:r,deprecationMessage:c};this.tokenTypeById[e]=a;const t=S(r,c);this.tokenStylingSchema.properties[e]=t,this.typeHierarchy=Object.create(null)}registerTokenModifier(e,r,n){if(!e.match(b))throw new Error("Invalid token modifier id.");const c=this.currentModifierBit;this.currentModifierBit=this.currentModifierBit*2;const s={num:c,id:e,description:r,deprecationMessage:n};this.tokenModifierById[e]=s,this.tokenStylingSchema.properties[`*.${e}`]=S(r,n)}parseTokenSelector(e,r){const n=F(e,r);return n.type?{match:(c,s,a)=>{let t=0;if(n.language!==void 0){if(n.language!==a)return-1;t+=10}if(n.type!==A){const d=this.getTypeHierarchy(c).indexOf(n.type);if(d===-1)return-1;t+=100-d}for(const l of n.modifiers)if(s.indexOf(l)===-1)return-1;return t+n.modifiers.length*100},id:`${[n.type,...n.modifiers.sort()].join(".")}${n.language!==void 0?":"+n.language:""}`}:{match:()=>-1,id:"$invalid"}}registerTokenStyleDefault(e,r){this.tokenStylingDefaultRules.push({selector:e,defaults:r})}deregisterTokenStyleDefault(e){const r=e.id;this.tokenStylingDefaultRules=this.tokenStylingDefaultRules.filter(n=>n.selector.id!==r)}deregisterTokenType(e){delete this.tokenTypeById[e],delete this.tokenStylingSchema.properties[e],this.typeHierarchy=Object.create(null)}deregisterTokenModifier(e){delete this.tokenModifierById[e],delete this.tokenStylingSchema.properties[`*.${e}`]}getTokenTypes(){return Object.keys(this.tokenTypeById).map(e=>this.tokenTypeById[e])}getTokenModifiers(){return Object.keys(this.tokenModifierById).map(e=>this.tokenModifierById[e])}getTokenStylingSchema(){return this.tokenStylingSchema}getTokenStylingDefaultRules(){return this.tokenStylingDefaultRules}getTypeHierarchy(e){let r=this.typeHierarchy[e];if(!r){this.typeHierarchy[e]=r=[e];let n=this.tokenTypeById[e];for(;n&&n.superType;)r.push(n.superType),n=this.tokenTypeById[n.superType]}return r}toString(){const e=(r,n)=>{const c=r.indexOf(".")===-1?0:1,s=n.indexOf(".")===-1?0:1;return c!==s?c-s:r.localeCompare(n)};return Object.keys(this.tokenTypeById).sort(e).map(r=>`- \`${r}\`: ${this.tokenTypeById[r].description}`).join(`
|
|
2
2
|
`)}}const v=I.charCodeAt(0),J=M.charCodeAt(0);function F(i,e){let r=i.length,n=e;const c=[];for(let a=r-1;a>=0;a--){const t=i.charCodeAt(a);if(t===v||t===J){const l=i.substring(a+1,r);r=a,t===v?n=l:c.push(l)}}return{type:i.substring(0,r),modifiers:c,language:n}}const p=P();_.add(L.TokenClassificationContribution,p);function P(){const i=new H;function e(n,c,s=[],a,t){return i.registerTokenType(n,c,a,t),s&&r(n,s),n}function r(n,c){try{const s=i.parseTokenSelector(n);i.registerTokenStyleDefault(s,{scopesToProbe:c})}catch(s){console.log(s)}}return e("comment",o(2308,"Style for comments."),[["comment"]]),e("string",o(2309,"Style for strings."),[["string"]]),e("keyword",o(2310,"Style for keywords."),[["keyword.control"]]),e("number",o(2311,"Style for numbers."),[["constant.numeric"]]),e("regexp",o(2312,"Style for expressions."),[["constant.regexp"]]),e("operator",o(2313,"Style for operators."),[["keyword.operator"]]),e("namespace",o(2314,"Style for namespaces."),[["entity.name.namespace"]]),e("type",o(2315,"Style for types."),[["entity.name.type"],["support.type"]]),e("struct",o(2316,"Style for structs."),[["entity.name.type.struct"]]),e("class",o(2317,"Style for classes."),[["entity.name.type.class"],["support.class"]]),e("interface",o(2318,"Style for interfaces."),[["entity.name.type.interface"]]),e("enum",o(2319,"Style for enums."),[["entity.name.type.enum"]]),e("typeParameter",o(2320,"Style for type parameters."),[["entity.name.type.parameter"]]),e("function",o(2321,"Style for functions"),[["entity.name.function"],["support.function"]]),e("member",o(2322,"Style for member functions"),[],"method","Deprecated use `method` instead"),e("method",o(2323,"Style for method (member functions)"),[["entity.name.function.member"],["support.function"]]),e("macro",o(2324,"Style for macros."),[["entity.name.function.preprocessor"]]),e("variable",o(2325,"Style for variables."),[["variable.other.readwrite"],["entity.name.variable"]]),e("parameter",o(2326,"Style for parameters."),[["variable.parameter"]]),e("property",o(2327,"Style for properties."),[["variable.other.property"]]),e("enumMember",o(2328,"Style for enum members."),[["variable.other.enummember"]]),e("event",o(2329,"Style for events."),[["variable.other.event"]]),e("decorator",o(2330,"Style for decorators & annotations."),[["entity.name.decorator"],["entity.name.function"]]),e("label",o(2331,"Style for labels. "),void 0),i.registerTokenModifier("declaration",o(2332,"Style for all symbol declarations."),void 0),i.registerTokenModifier("documentation",o(2333,"Style to use for references in documentation."),void 0),i.registerTokenModifier("static",o(2334,"Style to use for symbols that are static."),void 0),i.registerTokenModifier("abstract",o(2335,"Style to use for symbols that are abstract."),void 0),i.registerTokenModifier("deprecated",o(2336,"Style to use for symbols that are deprecated."),void 0),i.registerTokenModifier("modification",o(2337,"Style to use for write accesses."),void 0),i.registerTokenModifier("async",o(2338,"Style to use for symbols that are async."),void 0),i.registerTokenModifier("readonly",o(2339,"Style to use for symbols that are read-only."),void 0),r("variable.readonly",[["variable.other.constant"]]),r("property.readonly",[["variable.other.constant.property"]]),r("type.defaultLibrary",[["support.type"]]),r("class.defaultLibrary",[["support.class"]]),r("interface.defaultLibrary",[["support.class"]]),r("variable.defaultLibrary",[["support.variable"],["support.other.variable"]]),r("variable.defaultLibrary.readonly",[["support.constant"]]),r("property.defaultLibrary",[["support.variable.property"]]),r("property.defaultLibrary.readonly",[["support.constant.property"]]),r("function.defaultLibrary",[["support.function"]]),r("member.defaultLibrary",[["support.function"]]),i}function G(){return p}function S(i,e){return{description:i,deprecationMessage:e,defaultSnippets:[{body:"${1:#ff0000}"}],anyOf:[{type:"string",format:"color-hex"},{$ref:"#/definitions/style"}]}}const D="vscode://schemas/token-styling",w=_.as($.JSONContribution);w.registerSchema(D,p.getTokenStylingSchema());const C=new x(()=>w.notifySchemaChanged(D),200);p.onDidChangeSchema(()=>{C.isScheduled()||C.schedule()});export{O as S,f as T,D as a,G as g,F as p,b as t};
|